From 6939c7cb6f6caf4f5069da2439f049934db47236 Mon Sep 17 00:00:00 2001 From: lyt Date: Wed, 23 Oct 2019 11:15:34 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=94=B6=E6=AC=BE=E5=90=8E=E6=A0=87?= =?UTF-8?q?=E8=AE=B0=E8=AE=A2=E5=8D=95=E6=88=90=E8=A1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- webht/third_party/pay/models/Alipay_model.php | 6 +++++- webht/third_party/pay/models/IPayLinks_model.php | 6 +++++- .../third_party/pay/models/Online_payment_account_model.php | 6 +++++- webht/third_party/paypal/models/paypal_model.php | 6 +++++- 4 files changed, 20 insertions(+), 4 deletions(-) diff --git a/webht/third_party/pay/models/Alipay_model.php b/webht/third_party/pay/models/Alipay_model.php index 89d57865..f441c038 100644 --- a/webht/third_party/pay/models/Alipay_model.php +++ b/webht/third_party/pay/models/Alipay_model.php @@ -120,6 +120,7 @@ class Alipay_model extends CI_Model { //修改订单状态 public function update_biz_coli_state($coli_sn, $coli_state) { + $success_sql = in_array($coli_state, array(8,13)) ? ", COLI_IsSuccess=1" : ""; $sql = " IF EXISTS ( SELECT OPI_DEI_SN @@ -129,10 +130,13 @@ class Alipay_model extends CI_Model { ) UPDATE BIZ_ConfirmLineInfo SET COLI_State=? + $success_sql WHERE COLI_SN=? ELSE UPDATE BIZ_ConfirmLineInfo - SET COLI_State=? WHERE COLI_SN=? + SET COLI_State=? + $success_sql + WHERE COLI_SN=? AND COLI_State IN (0,1,11,12,13,14,40,50,60,101,102,999) "; $query = $this->HT->query($sql, array($coli_sn, $coli_state, $coli_sn, $coli_state, $coli_sn)); diff --git a/webht/third_party/pay/models/IPayLinks_model.php b/webht/third_party/pay/models/IPayLinks_model.php index 7cd61b15..dfa93cc7 100644 --- a/webht/third_party/pay/models/IPayLinks_model.php +++ b/webht/third_party/pay/models/IPayLinks_model.php @@ -120,6 +120,7 @@ class IPayLinks_model extends CI_Model { //修改订单状态 public function update_biz_coli_state($coli_sn, $coli_state) { + $success_sql = in_array($coli_state, array(8,13)) ? ", COLI_IsSuccess=1" : ""; $sql = " IF EXISTS ( SELECT OPI_DEI_SN @@ -129,10 +130,13 @@ class IPayLinks_model extends CI_Model { ) UPDATE BIZ_ConfirmLineInfo SET COLI_State=? + $success_sql WHERE COLI_SN=? ELSE UPDATE BIZ_ConfirmLineInfo - SET COLI_State=? WHERE COLI_SN=? + SET COLI_State=? + $success_sql + WHERE COLI_SN=? AND COLI_State IN (0,1,11,12,13,14,40,50,60,101,102,999) "; $query = $this->HT->query($sql, array($coli_sn, $coli_state, $coli_sn, $coli_state, $coli_sn)); diff --git a/webht/third_party/pay/models/Online_payment_account_model.php b/webht/third_party/pay/models/Online_payment_account_model.php index b9856bf6..200fab57 100644 --- a/webht/third_party/pay/models/Online_payment_account_model.php +++ b/webht/third_party/pay/models/Online_payment_account_model.php @@ -115,6 +115,7 @@ class Online_payment_account_model extends CI_Model { //修改订单状态 public function update_biz_coli_state($coli_sn, $coli_state) { + $success_sql = in_array($coli_state, array(8,13)) ? ", COLI_IsSuccess=1" : ""; $sql = " IF EXISTS ( SELECT OPI_DEI_SN @@ -124,10 +125,13 @@ class Online_payment_account_model extends CI_Model { ) UPDATE BIZ_ConfirmLineInfo SET COLI_State=? + $success_sql WHERE COLI_SN=? ELSE UPDATE BIZ_ConfirmLineInfo - SET COLI_State=? WHERE COLI_SN=? + SET COLI_State=? + $success_sql + WHERE COLI_SN=? AND COLI_State IN (0,1,9,11,12,13,14,40,50,60,101,102,999) "; $query = $this->HT->query($sql, array($coli_sn, $coli_state, $coli_sn, $coli_state, $coli_sn)); diff --git a/webht/third_party/paypal/models/paypal_model.php b/webht/third_party/paypal/models/paypal_model.php index 5bf5e9d7..ee8dab72 100644 --- a/webht/third_party/paypal/models/paypal_model.php +++ b/webht/third_party/paypal/models/paypal_model.php @@ -127,6 +127,7 @@ class Paypal_model extends CI_Model { //修改订单状态 public function update_biz_coli_state($coli_sn, $coli_state) { + $success_sql = in_array($coli_state, array(8,13)) ? ", COLI_IsSuccess=1" : ""; $sql = " IF EXISTS ( SELECT OPI_DEI_SN @@ -136,10 +137,13 @@ class Paypal_model extends CI_Model { ) UPDATE BIZ_ConfirmLineInfo SET COLI_State=? + $success_sql WHERE COLI_SN=? ELSE UPDATE BIZ_ConfirmLineInfo - SET COLI_State=? WHERE COLI_SN=? + SET COLI_State=? + $success_sql + WHERE COLI_SN=? AND COLI_State IN (0,1,11,12,13,14,40,50,60,101,102,999) "; $query = $this->HT->query($sql, array($coli_sn, $coli_state, $coli_sn, $coli_state, $coli_sn));