Commit 1642fbfd authored by pengfei's avatar pengfei

update 修改团长奖励脚本

parent f7e6520c
......@@ -42,14 +42,14 @@ class ColonelorderController extends Cli
$userIdList = array_chunk($userIdList, self::DEFAULT_USER_BATCH_SIZE);
$colonelPayInfoData = [];
foreach ($userIdList as $userIds) {
$batchPayInfoData = [];
// 完成目标单数
if (!empty($this->colonelConfigList)) {
$batchPayInfoData[] = $this->getInviteOrderData($userIds);
if ($inviteOrderData = $this->getInviteOrderData($userIds)) {
$colonelPayInfoData = array_merge($colonelPayInfoData,$inviteOrderData);
}
// 邀请新用户奖励
$batchPayInfoData[] = $this->getInviteNewUserData($userIds);
$colonelPayInfoData = array_merge($colonelPayInfoData, $batchPayInfoData);
if ($inviteNewUserData = $this->getInviteNewUserData($userIds)) {
$colonelPayInfoData = array_merge($colonelPayInfoData,$inviteNewUserData);
}
}
$this->handleSavePayInfo($colonelPayInfoData);
}
......@@ -118,8 +118,11 @@ class ColonelorderController extends Cli
public function getInviteOrderData($userIds)
{
//完成目标单数
$inviteOrderNumList = $this->getInviteOrderNum($userIds, $this->yesterday, $this->today);
$inviteOrderData = [];
if (empty($this->colonelConfigList)) {
return $inviteOrderData;
}
$inviteOrderNumList = $this->getInviteOrderNum($userIds, $this->yesterday, $this->today);
foreach ($inviteOrderNumList as $orderNum) {
foreach ($this->colonelConfigList as $config) {
if (!empty($orderNum["num"]) && $orderNum["num"] >= $config["assess_order_num"]) {
......
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