diff --git a/webht/third_party/pay/controllers/iPayLinksService.php b/webht/third_party/pay/controllers/iPayLinksService.php
index 115b51f1..d787b765 100644
--- a/webht/third_party/pay/controllers/iPayLinksService.php
+++ b/webht/third_party/pay/controllers/iPayLinksService.php
@@ -76,6 +76,22 @@ class IPayLinksService extends CI_Controller
return;
}
+ public function note_list2()
+ {
+ $data = array();
+ $data["paytext"] = $this->payment_status();
+ $data["keywords"] = $this->input->get_post("keywords");
+ $data["date"] = $this->input->get_post("date");
+ empty($data['date']) ? $data['date'] = date('Y-m-d') : false;
+ if (!empty($data['keywords'])) {
+ $data['notelist'] = $this->Note_model->search_key2($data['keywords']);
+ } else {
+ $data['notelist'] = $this->Note_model->search_date2($data['date']);
+ }
+ $this->load->view("iPayLinks_list2",$data);
+ return;
+ }
+
//失败记录列表
public function note_faillist() {
$data = array();
diff --git a/webht/third_party/pay/models/note_model.php b/webht/third_party/pay/models/note_model.php
index 6bdf5fcf..fb6bb8f0 100644
--- a/webht/third_party/pay/models/note_model.php
+++ b/webht/third_party/pay/models/note_model.php
@@ -47,6 +47,13 @@ class Note_model extends CI_Model {
$this->orderby=" ORDER BY IPL_sent DESC ,IPL_sn DESC ";
return $this->get_list();
}
+ public function search_date2($date) {
+ $this->init();
+ $search_sql = " AND (IPL_noticeTime BETWEEN '$date 00:00:00' AND '$date 23:59:59' or IPL_sent<>'send') ";
+ $this->search = $search_sql;
+ $this->orderby=" ORDER BY IPL_sent DESC ,IPL_sn DESC ";
+ return $this->get_list_with_order();
+ }
public function note($txn_id, $pn_id=null){
$this->init();
@@ -77,6 +84,19 @@ class Note_model extends CI_Model {
$this->search = $search_sql;
return $this->get_list();
}
+ public function search_key2($search_key) {
+ $this->init();
+ $this->topnum = 300; //限制最大数量,防止查询单词过短
+ $search_sql = '';
+ $search_key = trim($search_key);
+ if (!empty($search_key)) {
+ $search_sql.=" AND ( IPL_dealId = '$search_key'
+ OR IPL_orderId like '%$search_key%'
+ OR IPL_memo like '%$search_key%' )";
+ }
+ $this->search = $search_sql;
+ return $this->get_list_with_order();
+ }
public function note_exists($dealId)
{
@@ -158,6 +178,58 @@ class Note_model extends CI_Model {
}
}
+ /*!
+ * 查询异步通知记录
+ * isRecord
+ * * 9999 已录入到订单收款记录表GAI;
+ * * 99999 APP组的收款记录, 由他们手动处理
+ * * 10000 已忽略的退款记录; 关闭检测是否记录[已忽略]
+ * * 1 未录入到订单GAI
+ * @date 2018-07-27
+ * @return [type] [description]
+ */
+ public function get_list_with_order()
+ {
+ $sql = "SELECT
+ -- gai.GAI_SN,
+ -- gaib.GAI_SN,
+ -- COLI.COLI_ID,
+ case
+ when IPL_payType='pay' and (ISNULL(gaib.GAI_SN, 0)+ISNULL(gai.GAI_SN, 0))>0 then 9999
+ when IPL_payType='pay' and coli.COLI_ID is not null then 99999
+ when IPL_payType<>'pay' then 10000
+ when IPL_sent=' closeRecord' then 10000
+ else 1
+ end isRecord,
+ ipl.*
+ from InfoManager.dbo.IPayLinksLog ipl
+ left join Tourmanager.dbo.BIZ_ConfirmLineInfo coli on coli.COLI_ID=ipl.IPL_orderId and coli.COLI_Department=16
+ left join Tourmanager.dbo.BIZ_GroupAccountInfo gaib on ipl.IPL_dealId=gaib.GAI_AccreditNo and gaib.DeleteFlag=0 and ipl.IPL_payType='pay'
+ left join Tourmanager.dbo.GroupAccountInfo gai on gai.GAI_AccreditNo=ipl.IPL_dealId and gai.DeleteFlag=0 and ipl.IPL_payType='pay'
+ where 1=1
+ and ( ipl.IPL_stateCode=2 or ipl.IPL_resultCode='0000')
+ and (
+ 1=1
+ $this->send
+ $this->search
+ $this->dealId
+ -- 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 COLI.COLI_ID is null)
+ )
+ order by isRecord asc,ipl.IPL_sent desc,IPL_sn desc";
+ $query = $this->INFO->query($sql);
+ if ($this->topnum === 1) {
+ if ($query->num_rows() > 0) {
+ $row = $query->row();
+ return $row;
+ } else {
+ return FALSE;
+ }
+ } else {
+ return $query->result();
+ }
+ }
+
public function update_send($pn_txn_id, $pn_send) {
$sql = "
UPDATE IPayLinksLog
diff --git a/webht/third_party/pay/views/iPayLinks_list2.php b/webht/third_party/pay/views/iPayLinks_list2.php
new file mode 100644
index 00000000..36c5a1e1
--- /dev/null
+++ b/webht/third_party/pay/views/iPayLinks_list2.php
@@ -0,0 +1,336 @@
+
+* @date 2017-09-06
+*/
+?>
+
+
+
+
+
+ iPayLinks Notes - China Highlights
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
通知状态:
+
1.send 表示通知正确发送给外联
+
2.unsend 表示通知在等待处理,5~10分钟系统处理一遍
+
3.sendfail 状态的需要手工设置正确的订单号
+
4.Pending 还未到账,需要人工检查,确认支付或者取消,需要手工关闭此通知
+
5.Denied 银行拒付,需要手工关闭此通知
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+