|
|
|
@ -87,10 +87,10 @@ class Alipay_model extends CI_Model {
|
|
|
|
|
*/
|
|
|
|
|
public function get_group_accout_info($coli_sn, $pn_txn_id) {
|
|
|
|
|
// select * from BIZ_GroupAccountInfo where GAI_COLI_SN = 559007281 and GAI_AccreditNo = '91R84932UM059045C'
|
|
|
|
|
$info_sql = "select GAI_SN, GAI_State from BIZ_GroupAccountInfo
|
|
|
|
|
$info_sql = "select GAI_SN, GAI_State from BIZ_GroupAccountInfo
|
|
|
|
|
where GAI_COLI_SN = $coli_sn and GAI_AccreditNo = '$pn_txn_id'
|
|
|
|
|
union
|
|
|
|
|
select GAI_SN, GAI_State from GroupAccountInfo
|
|
|
|
|
select GAI_SN, GAI_State from GroupAccountInfo
|
|
|
|
|
where GAI_COLI_SN = $coli_sn and GAI_AccreditNo = '$pn_txn_id'";
|
|
|
|
|
|
|
|
|
|
$info_query = $this->HT->query($info_sql);
|
|
|
|
@ -204,8 +204,15 @@ class Alipay_model extends CI_Model {
|
|
|
|
|
,DeleteFlag
|
|
|
|
|
) VALUES (?,?,15015,?,?,?,?,?,?,?,?,?,?,?,0,0)";
|
|
|
|
|
$query = $this->HT->query($sql, array($GAI_COLI_SN, $GAI_SQJE, $GAI_COLI_SN, $GAI_COLI_ID, $GAI_SQJE, $GAI_SQDate, $GAI_SQJECurrency, $GAI_SSJE, $GAI_SSDate, $GAI_AccountDate, $GAI_SubmitDate, $GAI_CusName, $GAI_CusEmail, substr($GAI_AccreditNo,0, 30), $GAI_Memo));
|
|
|
|
|
$insertid = $this->HT->last_id('BIZ_GroupAccountInfo');
|
|
|
|
|
return $query;
|
|
|
|
|
// $insertid = $this->HT->last_id('BIZ_GroupAccountInfo');
|
|
|
|
|
// return $query;
|
|
|
|
|
return $query->num_rows() > 0;
|
|
|
|
|
// affected_rows() doesn't work with the 'sqlsrv' driver in CI2
|
|
|
|
|
// The solution: Upgrade to the latest CodeIgniter 3.0.x version
|
|
|
|
|
// $ssql = "SELECT 1 as 'exist' from BIZ_GroupAccountInfo where GAI_AccreditNo=? ";
|
|
|
|
|
// $squery = $this->HT->query($ssql, array($GAI_AccreditNo));
|
|
|
|
|
// $ret = $squery->result();
|
|
|
|
|
// return !empty($ret);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//添加收款记录(商务订单)
|
|
|
|
|