diff --git a/webht/third_party/pay/models/note_model.php b/webht/third_party/pay/models/note_model.php index 8f5fc052..44e0ba71 100644 --- a/webht/third_party/pay/models/note_model.php +++ b/webht/third_party/pay/models/note_model.php @@ -218,7 +218,13 @@ class Note_model extends CI_Model { 1=1 $this->date -- AND (IPL_noticeTime BETWEEN '2018-07-27 00:00:00' AND '2018-07-27 23:59:59' or IPL_sent<>'send') - or ((ISNULL(gaib.GAI_SN, 0)+ISNULL(gai.GAI_SN, 0))=0 and IPL_payType='pay' AND (IPL_sent<>'closeRecord') and COLI.COLI_ID is null) + or ( + ( + (ISNULL(gaib.GAI_SN, 0)+ISNULL(gai.GAI_SN, 0))=0 and COLI.COLI_ID is null + and IPL_sent not in ('send','closeRecord') + ) + or (ISNULL(IPL_sent,'') in ('sendfail','unsend','') + ) ) order by isRecord asc,ipl.IPL_sent desc,IPL_sn desc"; $query = $this->INFO->query($sql);