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));