Commit 286f1274 authored by pengfei's avatar pengfei

update 团长分销-奖励结算脚本

parent 74cacad8
...@@ -40,10 +40,7 @@ class ColonelorderController extends Job ...@@ -40,10 +40,7 @@ class ColonelorderController extends Job
$this->settlementDate = $timeRange['date']; $this->settlementDate = $timeRange['date'];
$this->startTime = $timeRange['start_time']; $this->startTime = $timeRange['start_time'];
$this->endTime = $timeRange['end_time']; $this->endTime = $timeRange['end_time'];
$colonelConfig = $this->getColonelConfig($this->settlementDate); $this->colonelConfigList = $this->getColonelConfig($this->settlementDate);
if (!empty($colonelConfig['data'])) {
$this->colonelConfigList = json_decode($colonelConfig['data'], true);
}
} }
/** /**
...@@ -129,7 +126,7 @@ class ColonelorderController extends Job ...@@ -129,7 +126,7 @@ class ColonelorderController extends Job
*/ */
private function getInviteOrderData($userIds, &$colonelPayInfoData) private function getInviteOrderData($userIds, &$colonelPayInfoData)
{ {
if (empty($this->colonelConfigList)) { if (!empty($this->colonelConfigList)) {
$inviteOrderNumList = $this->getInviteOrderNum($userIds, $this->settlementDate); $inviteOrderNumList = $this->getInviteOrderNum($userIds, $this->settlementDate);
foreach ($inviteOrderNumList as $orderNum) { foreach ($inviteOrderNumList as $orderNum) {
foreach ($this->colonelConfigList as $config) { foreach ($this->colonelConfigList as $config) {
...@@ -165,7 +162,11 @@ class ColonelorderController extends Job ...@@ -165,7 +162,11 @@ class ColonelorderController extends Job
'LIMIT' => 1 'LIMIT' => 1
]); ]);
} }
return (array)$config; $configData = [];
if (empty($config['data'])) {
$configData = json_decode($config['data'],true);
}
return $configData;
} }
/** /**
......
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 to comment