Merge branch 'master' of 47.111.118.107:wmtx/platform into feature/platfrom_aggregate_finance

master
chenzhi 4 years ago
commit 945f033df5

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

@ -379,6 +379,9 @@ class PromoteService {
'promote_id' => $toPromote['id'], 'promote_id' => $toPromote['id'],
'promote_account' => $toPromote['account'] 'promote_account' => $toPromote['account']
]; ];
$updateMarket = [
'market_admin_id' => $toPromote['admin_id'],
];
$map = $otherMap = ['promote_id' => $fromPromote['id']]; $map = $otherMap = ['promote_id' => $fromPromote['id']];
if (count($shiftIds) > 0) { if (count($shiftIds) > 0) {
@ -397,12 +400,12 @@ class PromoteService {
$orderMap1 = $otherMap; $orderMap1 = $otherMap;
$orderMap1['pay_time'] = ['egt', $orderTime]; $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); M('bind_spend', 'tab_')->where($orderMap1)->save($updateData);
$orderMap2 = $otherMap; $orderMap2 = $otherMap;
$orderMap2['create_time'] = ['egt', $orderTime]; $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']]); 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()]); $status = M('shift_task', 'sys_')->where('id=' . $task['id'])->save(['status' => 1, 'handle_time' => time()]);

Loading…
Cancel
Save