Commit c7f7b535 by 朱继来

取消更改

parent 92c08160
Showing with 7 additions and 36 deletions
...@@ -35,23 +35,14 @@ class CronController extends Controller ...@@ -35,23 +35,14 @@ class CronController extends Controller
$OrderRefundModel = new OrderRefundModel(); $OrderRefundModel = new OrderRefundModel();
$OrderReturnModel = new OrderReturnModel(); $OrderReturnModel = new OrderReturnModel();
// // 查询联营、自营线上支付记录
// $pay_log_list = $PayLogModel->getPayLog($start_time, $end_time);
// $pay_log_amount = $this->countByCurrency($pay_log_list); // 统计金额
// // 联营线下支付记录
// $joint_offline_list = $ErpPayLogModel->getErpPayLog($start_time, $end_time);
// $joint_offline = $this->filterData($joint_offline_list); // 过滤数据
// $joint_offline_amount = $this->countByCurrency($joint_offline, 'receipt_amount'); // 统计金额
// 查询联营、自营线上支付记录 // 查询联营、自营线上支付记录
$pay_log_list = $PayLogModel->getPayLog($start_time, $end_time); $pay_log_list = $PayLogModel->getPayLog($start_time, $end_time);
$pay_log = $this->filterData($pay_log_list); // 过滤数据 $pay_log_amount = $this->countByCurrency($pay_log_list); // 统计金额
$pay_log_amount = $this->countByCurrency($pay_log); // 统计金额
// 联营线下支付记录 // 联营线下支付记录
$joint_offline_list = $ErpPayLogModel->getErpPayLog($start_time, $end_time); $joint_offline_list = $ErpPayLogModel->getErpPayLog($start_time, $end_time);
$joint_offline_amount = $this->countByCurrency($joint_offline_list, 'receipt_amount'); // 统计金额 $joint_offline = $this->filterData($joint_offline_list); // 过滤数据
$joint_offline_amount = $this->countByCurrency($joint_offline, 'receipt_amount'); // 统计金额
// 自营账期支付记录 // 自营账期支付记录
$self_accounts_list = $RemovalModel->getSelfAccounts($start_time, $end_time); $self_accounts_list = $RemovalModel->getSelfAccounts($start_time, $end_time);
...@@ -128,13 +119,13 @@ class CronController extends Controller ...@@ -128,13 +119,13 @@ class CronController extends Controller
{ {
if (!$data) return false; if (!$data) return false;
$ErpPayLogModel = new ErpPayLogModel(); $PayLogModel = new PayLogModel();
foreach ($data as $k=>$v) { foreach ($data as $k=>$v) {
$erp_pay_log = $ErpPayLogModel->where(['order_id'=>$v['order_id']])->select('log_id')->first(); $pay_log = $PayLogModel->where(['order_id'=>$v['order_id']])->select('pay_log_id')->first();
// 以ERP推送过来的收款金额为准,若erp_pay_log表里已存在支付记录,则pay_log需要清除 // 若pay_log表里已存在订单支付记录,则说明该订单已收款完成,需要清除
if ($erp_pay_log) { if ($pay_log) {
unset($data[$k]); unset($data[$k]);
continue; continue;
} }
...@@ -143,26 +134,6 @@ class CronController extends Controller ...@@ -143,26 +134,6 @@ class CronController extends Controller
return $data; return $data;
} }
// // 过滤联营线下支付数据
// public function filterData($data)
// {
// if (!$data) return false;
// $PayLogModel = new PayLogModel();
// foreach ($data as $k=>$v) {
// $pay_log = $PayLogModel->where(['order_id'=>$v['order_id']])->select('pay_log_id')->first();
// // 若pay_log表里已存在订单支付记录,则说明该订单已收款完成,需要清除
// if ($pay_log) {
// unset($data[$k]);
// continue;
// }
// }
// return $data;
// }
// 根据币种统计用户金额 // 根据币种统计用户金额
public function countByCurrency($data, $field='pay_amount') public function countByCurrency($data, $field='pay_amount')
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment