diff --git a/Application/Admin/Controller/MendController.class.php b/Application/Admin/Controller/MendController.class.php index fdadcef2e..16625e9d8 100644 --- a/Application/Admin/Controller/MendController.class.php +++ b/Application/Admin/Controller/MendController.class.php @@ -81,6 +81,8 @@ class MendController extends ThinkController { "order_time"=>$create['order_time'], "type"=>2, "shift_ids"=>[$create['user_id']], + "creator_type"=>0, + "creator_id"=>$_SESSION["onethink_admin"]["user_auth"]["uid"] ); if(!empty($create['remark'])){ $params['remark'] = $create['remark']; diff --git a/Application/Admin/View/Mend/lists.html b/Application/Admin/View/Mend/lists.html index 2e87bce63..8cb0c4723 100644 --- a/Application/Admin/View/Mend/lists.html +++ b/Application/Admin/View/Mend/lists.html @@ -107,6 +107,7 @@ 补链前渠道 补链后渠道 备注 + 切分时间 补链时间 操作人员 @@ -126,6 +127,7 @@ {:get_title($data['remark'])} + {$data.order_time|date='Y-m-d H:i:s',###} {$data.create_time|date='Y-m-d H:i:s',###} {$data.op_account} diff --git a/Application/Base/Service/PromoteService.class.php b/Application/Base/Service/PromoteService.class.php index 41c60fb55..403ef5db5 100644 --- a/Application/Base/Service/PromoteService.class.php +++ b/Application/Base/Service/PromoteService.class.php @@ -92,7 +92,8 @@ class PromoteService { $balanceCoinMode = isset($params['balance_coin_mode']) ? $params['balance_coin_mode'] : 0; $type = isset($params['type']) ? $params['type'] : 0; $shiftIds = isset($params['shift_ids']) && $params['shift_ids'] ? $params['shift_ids'] : []; - $createPromoteId = empty(session('promote_auth.pid')) ? 0 : session('promote_auth.pid'); + $creatorId = isset($params['creator_id']) ? $params['creator_id'] : 0; + $creatorType = isset($params['creator_type']) ? $params['creator_type'] : 0; if ($fromPromoteId == $toPromoteId) { return [ @@ -140,7 +141,8 @@ class PromoteService { 'order_time' => strtotime($orderTime), 'balance_coin_mode' => $balanceCoinMode, 'create_time' => time(), - 'create_promote_id' => $createPromoteId, + 'creator_id' => $creatorId, + 'creator_type' => $creatorType, 'status' => 0, 'type' => $type, 'shift_ids' => json_encode($shiftIds) @@ -299,9 +301,18 @@ class PromoteService { { $toPromoteId = $task['to_promote_id']; $fromPromoteId = $task['from_promote_id']; + $orderTime = $task['order_time']; $shiftIds = json_decode($task['shift_ids'], true) ?? []; - $createPromote = M('promote', 'tab_')->where(['create_promote_id' => $task['create_promote_id']])->find(); + $creator = null; + $opAccount = ''; + if ($task['creator_type'] == 1) { + $creator = M('promote', 'tab_')->where(['id' => $task['creator_id']])->find(); + $opAccount = $creator ? $creator['account'] : ''; + } else { + $creator = M('ucenter_member', 'sys_')->where(['id' => $task['creator_id']])->find(); + $opAccount = $creator ? $creator['username'] : ''; + } $toPromote = M('promote', 'tab_')->where(['id' => $toPromoteId])->find(); $fromPromote = M('promote', 'tab_')->where(['id' => $fromPromoteId])->find(); @@ -332,11 +343,12 @@ class PromoteService { 'promote_account' => $fromPromote['account'], 'promote_id_to' => $toPromote['id'], 'promote_account_to' => $toPromote['account'], - 'remark' => '玩家迁移', + 'remark' => $task['creator_type'] == 0 ? '后台补链' : '玩家迁移', + 'order_time' => $orderTime, 'create_time' => time(), - 'op_id' => $createPromote ? $createPromote['id'] : 0, - 'op_account' => $createPromote ? $createPromote['account'] : '', - 'op_type' => 1, + 'op_id' => $creator ? $creator['id'] : 0, + 'op_account' => $opAccount, + 'op_type' => $task['creator_type'], 'bind_type' => 1, ]; } @@ -370,9 +382,14 @@ class PromoteService { M('user_play', 'tab_')->where($otherMap)->save($updateData); M('user_play_info', 'tab_')->where($otherMap)->save($updateData); - M('spend', 'tab_')->where($otherMap)->where(['is_check' => ['in','1,2']])->save($updateData); // 只改未对账的数据 - M('deposit', 'tab_')->where($otherMap)->save($updateData); - M('bind_spend', 'tab_')->where($otherMap)->save($updateData); + $orderMap1 = $otherMap; + $orderMap1['pay_time'] = ['egt', $orderTime]; + M('spend', 'tab_')->where($orderMap1)->where(['is_check' => ['in','1,2']])->save($updateData); // 只改未对账的数据 + M('bind_spend', 'tab_')->where($orderMap1)->save($updateData); + + $orderMap2 = $otherMap; + $orderMap2['create_time'] = ['egt', $orderTime]; + M('deposit', 'tab_')->where($orderMap2)->save($updateData); $status = M('shift_task', 'sys_')->where('id=' . $task['id'])->save(['status' => 1, 'handle_time' => time()]); if (!$status) { diff --git a/Application/Home/Controller/PromoteController.class.php b/Application/Home/Controller/PromoteController.class.php index 0335835b6..f505a8857 100644 --- a/Application/Home/Controller/PromoteController.class.php +++ b/Application/Home/Controller/PromoteController.class.php @@ -1935,8 +1935,12 @@ class PromoteController extends BaseController public function shift() { + $loginPromote = $this->getLoginPromote(); + $params = $_POST; + $params['creator_id'] = $loginPromote['id']; + $params['creator_type'] = 1; $promoteService = new PromoteService(); - $result = $promoteService->addShiftTask($_POST); + $result = $promoteService->addShiftTask($params); $this->ajaxReturn($result); } diff --git a/Application/Home/Controller/QueryController.class.php b/Application/Home/Controller/QueryController.class.php index d751d4150..91ff94681 100644 --- a/Application/Home/Controller/QueryController.class.php +++ b/Application/Home/Controller/QueryController.class.php @@ -1719,7 +1719,7 @@ class QueryController extends BaseController $sortName = trim(I('sort_name', '')); $sort = intval(I('sort', 1)); $sortNameData = ['recharge_cost', 'recharge_count', 'recharge_cost_today', 'unlogin_day']; - $nowTime = date('Y-m-d'); + $nowTime = date('Y-m-d', time() - 3600 * 24); $initBegTime = date('Y-m-d', strtotime('-6 day', strtotime($nowTime))); $initBegTime = empty(I('begtime')) ? $initBegTime : I('begtime'); $initEndTime = $nowTime; @@ -1842,6 +1842,7 @@ class QueryController extends BaseController $this->assign('initBegTime', $initBegTime); $this->assign('initEndTime', $initEndTime); $this->assign('sort', $sort); + $this->assign('setdate', $nowTime); $this->display('userRecharges'); } diff --git a/Application/Home/View/default/Query/userRecharges.html b/Application/Home/View/default/Query/userRecharges.html index 9e7f9172f..abc69c383 100644 --- a/Application/Home/View/default/Query/userRecharges.html +++ b/Application/Home/View/default/Query/userRecharges.html @@ -31,6 +31,7 @@ 玩家充值 + 说明:充值数据不包含当日