|
|
|
@ -381,9 +381,26 @@ class Online_payment_account_model extends CI_Model {
|
|
|
|
|
left join BIZ_ConfirmLineInfo bcoli on bcoli.COLI_SN=bgai.GAI_COLI_SN
|
|
|
|
|
where IPL_sent='send-to-finance' ";
|
|
|
|
|
$ipaylinks_list = $this->HT->query($ipaylinks_sql)->result_array();
|
|
|
|
|
if ( ! empty($ipaylinks_list)) {
|
|
|
|
|
$ret = array_merge($paypal_list, $ipaylinks_list);
|
|
|
|
|
}
|
|
|
|
|
empty($ipaylinks_list) ? $ipaylinks_list=array() : false;
|
|
|
|
|
$alipay_sql = "SELECT 'alipay' as 'payment_type', ALI_sn note_sn,ALI_dealId transaction_id,
|
|
|
|
|
(select DEI_DepartmentName from OperatorInfo inner join DepartmentInfo on OPI_DEI_SN=DEI_SN
|
|
|
|
|
where OPI_SN=ISNULL(coli.COLI_OPI_ID, bcoli.COLI_OPI_ID)) as department,
|
|
|
|
|
(select GRI_Name from GRoupInfo where gri_sn=ISNULL(coli.COLI_GRI_SN,bcoli.COLI_GRI_SN)) as gri_name,
|
|
|
|
|
pn.ALI_completeTime payment_date,
|
|
|
|
|
pn.ALI_orderAmount amount,
|
|
|
|
|
isnull(ALI_currencyCode,isnull(gai.GAI_SQJECurrency,bgai.GAI_SQJECurrency)) currency,
|
|
|
|
|
isnull(gai.GAI_SSJE,bgai.GAI_SSJE) amount_CNY,
|
|
|
|
|
isnull(ALI_payerName,isnull(gai.GAI_CusName,bgai.GAI_CusName)) payer,
|
|
|
|
|
isnull(ALI_payerEmail,ISNULL(gai.gai_cusEmail,bgai.gai_cusemail)) payer_email
|
|
|
|
|
from InfoManager.dbo.AlipayLog pn
|
|
|
|
|
left join GroupAccountInfo gai on gai.GAI_AccreditNo=pn.ALI_dealId
|
|
|
|
|
left join ConfirmLineInfo coli on coli.COLI_SN=gai.GAI_COLI_SN
|
|
|
|
|
left join BIZ_GroupAccountInfo bgai on bgai.GAI_AccreditNo=pn.ALI_dealId
|
|
|
|
|
left join BIZ_ConfirmLineInfo bcoli on bcoli.COLI_SN=bgai.GAI_COLI_SN
|
|
|
|
|
where ALI_sent='send-to-finance' ";
|
|
|
|
|
$alipay_list = $this->HT->query($alipay_sql)->result_array();
|
|
|
|
|
empty($alipay_list) ? $alipay_list=array() : false;
|
|
|
|
|
$ret = array_merge($paypal_list, $ipaylinks_list, $alipay_list);
|
|
|
|
|
return $ret;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -397,6 +414,9 @@ class Online_payment_account_model extends CI_Model {
|
|
|
|
|
case 'ipaylinks':
|
|
|
|
|
$sql = " UPDATE InfoManager.dbo.IPayLinksLog SET IPL_sent = 'send-finance' WHERE IPL_sn = ? ";
|
|
|
|
|
break;
|
|
|
|
|
case 'alipay':
|
|
|
|
|
$sql = " UPDATE InfoManager.dbo.AlipayLog SET ALI_sent = 'send-finance' WHERE ALI_sn = ? ";
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
default:
|
|
|
|
|
# code...
|
|
|
|
|