Merge branch 'hotfix/market_shift_rebind' of wmtx/platform into master

修改换绑影响市场专员数据
master
廖金灵 4 years ago committed by Gogs
commit da4b2ea60b

@ -275,6 +275,9 @@ class FinancePromoteController extends AdminController
if($istimeselect){
$map['s.payed_time']=$istimeselect;
}
if ($isMarketLeader) {
$map['s.market_admin_id'] = ['gt', 0];
}
if ($adminId > 0) {
$map['s.market_admin_id'] = $adminId;
}

@ -379,6 +379,9 @@ class PromoteService {
'promote_id' => $toPromote['id'],
'promote_account' => $toPromote['account']
];
$updateMarket = [
'market_admin_id' => $toPromote['admin_id'],
];
$map = $otherMap = ['promote_id' => $fromPromote['id']];
if (count($shiftIds) > 0) {
@ -397,12 +400,12 @@ class PromoteService {
$orderMap1 = $otherMap;
$orderMap1['pay_time'] = ['egt', $orderTime];
M('spend', 'tab_')->where($orderMap1)->where(['is_check' => ['in','1,2'], 'settle_check' => 0, 'selle_status' => 0])->save($updateData); // 只改未对账的数据
M('spend', 'tab_')->where($orderMap1)->where(['is_check' => ['in','1,2'], 'settle_check' => 0, 'selle_status' => 0])->save(array_merge($updateData, $updateMarket)); // 只改未对账的数据
M('bind_spend', 'tab_')->where($orderMap1)->save($updateData);
$orderMap2 = $otherMap;
$orderMap2['create_time'] = ['egt', $orderTime];
M('deposit', 'tab_')->where($orderMap2)->save($updateData);
M('deposit', 'tab_')->where($orderMap2)->save(array_merge($updateData, $updateMarket));
M('user_play_data_count', 'tab_')->where($orderMap2)->save(['promote_id' => $toPromote['id']]);
$status = M('shift_task', 'sys_')->where('id=' . $task['id'])->save(['status' => 1, 'handle_time' => time()]);

Loading…
Cancel
Save