From 25fa79ea5557b01ef77b7fea96bd8a954a3e001a Mon Sep 17 00:00:00 2001 From: ELF <360197197@qq.com> Date: Thu, 28 Nov 2019 15:19:02 +0800 Subject: [PATCH 1/9] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=8E=A9=E5=AE=B6?= =?UTF-8?q?=E8=BF=81=E7=A7=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Base/Service/PromoteService.class.php | 34 ++++++++++++++----- 1 file changed, 25 insertions(+), 9 deletions(-) diff --git a/Application/Base/Service/PromoteService.class.php b/Application/Base/Service/PromoteService.class.php index 41c60fb55..59ecd333a 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(); @@ -334,9 +345,9 @@ class PromoteService { 'promote_account_to' => $toPromote['account'], 'remark' => '玩家迁移', '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 +381,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) { From bdd4e8ed813fcd16f86df70daaae4ec411355085 Mon Sep 17 00:00:00 2001 From: ELF <360197197@qq.com> Date: Thu, 28 Nov 2019 15:20:13 +0800 Subject: [PATCH 2/9] =?UTF-8?q?=E4=BF=AE=E6=94=B9sql?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Data/update.sql | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Data/update.sql b/Data/update.sql index 14be61b6d..f29b78f3e 100644 --- a/Data/update.sql +++ b/Data/update.sql @@ -585,4 +585,12 @@ VALUES ('contact_cs', '联系客服', '[{\"name\":\"support\",\"title\":\"\\u8054\\u7cfb\\u5ba2\\u670d\",\"menu_version\":\"0\",\"url\":\"\",\"type\":\"2\",\"act\":\"3007567814\",\"ios_url\":\"3007567814\",\"sort\":\"1\",\"id\":1,\"icon\":\"\",\"cover\":\"\"}]', '', 5, 1, 1571723212 ); INSERT INTO `tab_tool` (`name`, `title`, `config`, `template`, `type`, `status`, `create_time` ) VALUES - ('sdk_menu', 'SDK用户菜单', '[{\"name\":\"mine\",\"title\":\"\\u6211\\u7684\",\"menu_version\":\"0\",\"url\":\"\",\"type\":\"1\",\"act\":\"my\",\"ios_url\":\"\",\"sort\":\"1\",\"id\":\"1\",\"icon\":\"\\/Uploads\\/Picture\\/2019-11-20\\/5dd524dfd76fa.png\",\"cover\":\"1980\"},{\"name\":\"gift\",\"title\":\"\\u793c\\u5305\",\"menu_version\":\"0\",\"url\":\"\\/sdk.php\\/GameGiftPage\\/gift_list\",\"type\":\"0\",\"act\":\"gift\",\"ios_url\":\"?action=gift\",\"sort\":\"2\",\"id\":2,\"icon\":\"\\/Uploads\\/Picture\\/2019-11-20\\/5dd52509f3767.png\",\"cover\":\"1981\"},{\"name\":\"support\",\"title\":\"\\u5ba2\\u670d\",\"menu_version\":\"0\",\"url\":\"\",\"type\":\"1\",\"act\":\"support\",\"ios_url\":\"\",\"sort\":\"3\",\"id\":3,\"icon\":\"\\/Uploads\\/Picture\\/2019-11-20\\/5dd5251e0aee3.png\",\"cover\":\"1982\"},{\"name\":\"message\",\"title\":\"\\u6d88\\u606f\",\"menu_version\":\"0\",\"url\":\"\",\"type\":\"1\",\"act\":\"msg\",\"ios_url\":\"\",\"sort\":\"4\",\"id\":4,\"icon\":\"\\/Uploads\\/Picture\\/2019-11-20\\/5dd525606ff53.png\",\"cover\":\"1983\"},{\"name\":\"logout\",\"title\":\"\\u9000\\u51fa\",\"menu_version\":\"0\",\"url\":\"\",\"type\":\"1\",\"act\":\"logout\",\"ios_url\":\"\",\"sort\":\"5\",\"id\":5,\"icon\":\"\\/Uploads\\/Picture\\/2019-11-20\\/5dd525d99ed99.png\",\"cover\":\"1984\"},{\"name\":\"suppersign\",\"title\":\"\\u8d85\\u7ea7\\u7b7e\",\"menu_version\":\"2\",\"url\":\"\\/mobile.php\\/ssg\\/home\",\"type\":\"2\",\"act\":\"suppersign\",\"ios_url\":\"http:\\/\\/m.wmtxkj.cn\\/mobile.php\\/ssg\\/home\",\"sort\":\"6\",\"id\":6,\"icon\":\"\\/Uploads\\/Picture\\/2019-11-20\\/5dd525f388843.png\",\"cover\":\"1985\"}]', '', 5, 1, 1571723212 ); \ No newline at end of file + ('sdk_menu', 'SDK用户菜单', '[{\"name\":\"mine\",\"title\":\"\\u6211\\u7684\",\"menu_version\":\"0\",\"url\":\"\",\"type\":\"1\",\"act\":\"my\",\"ios_url\":\"\",\"sort\":\"1\",\"id\":\"1\",\"icon\":\"\\/Uploads\\/Picture\\/2019-11-20\\/5dd524dfd76fa.png\",\"cover\":\"1980\"},{\"name\":\"gift\",\"title\":\"\\u793c\\u5305\",\"menu_version\":\"0\",\"url\":\"\\/sdk.php\\/GameGiftPage\\/gift_list\",\"type\":\"0\",\"act\":\"gift\",\"ios_url\":\"?action=gift\",\"sort\":\"2\",\"id\":2,\"icon\":\"\\/Uploads\\/Picture\\/2019-11-20\\/5dd52509f3767.png\",\"cover\":\"1981\"},{\"name\":\"support\",\"title\":\"\\u5ba2\\u670d\",\"menu_version\":\"0\",\"url\":\"\",\"type\":\"1\",\"act\":\"support\",\"ios_url\":\"\",\"sort\":\"3\",\"id\":3,\"icon\":\"\\/Uploads\\/Picture\\/2019-11-20\\/5dd5251e0aee3.png\",\"cover\":\"1982\"},{\"name\":\"message\",\"title\":\"\\u6d88\\u606f\",\"menu_version\":\"0\",\"url\":\"\",\"type\":\"1\",\"act\":\"msg\",\"ios_url\":\"\",\"sort\":\"4\",\"id\":4,\"icon\":\"\\/Uploads\\/Picture\\/2019-11-20\\/5dd525606ff53.png\",\"cover\":\"1983\"},{\"name\":\"logout\",\"title\":\"\\u9000\\u51fa\",\"menu_version\":\"0\",\"url\":\"\",\"type\":\"1\",\"act\":\"logout\",\"ios_url\":\"\",\"sort\":\"5\",\"id\":5,\"icon\":\"\\/Uploads\\/Picture\\/2019-11-20\\/5dd525d99ed99.png\",\"cover\":\"1984\"},{\"name\":\"suppersign\",\"title\":\"\\u8d85\\u7ea7\\u7b7e\",\"menu_version\":\"2\",\"url\":\"\\/mobile.php\\/ssg\\/home\",\"type\":\"2\",\"act\":\"suppersign\",\"ios_url\":\"http:\\/\\/m.wmtxkj.cn\\/mobile.php\\/ssg\\/home\",\"sort\":\"6\",\"id\":6,\"icon\":\"\\/Uploads\\/Picture\\/2019-11-20\\/5dd525f388843.png\",\"cover\":\"1985\"}]', '', 5, 1, 1571723212 ); + +-- 修改迁移 +ALTER TABLE `sys_shift_task` +CHANGE COLUMN `create_promote_id` `creator_id` int(11) NOT NULL DEFAULT 0 COMMENT '创建渠道ID' AFTER `status`; +ALTER TABLE `sys_shift_task` +ADD COLUMN `creator_type` tinyint(1) NOT NULL DEFAULT 0 COMMENT '创建者类型 0 后台管理员 1 推广员' AFTER `creator_id`; +ALTER TABLE `platform`.`tab_mend` +ADD COLUMN `op_type` tinyint(0) NOT NULL DEFAULT 0 COMMENT '0 管理员 1 推广员' AFTER `op_account`; \ No newline at end of file From f09ee9495261e1242b0949b645692c4f23dcccb4 Mon Sep 17 00:00:00 2001 From: chenzhi <“chenzhi063@qq.com> Date: Thu, 28 Nov 2019 15:30:39 +0800 Subject: [PATCH 3/9] =?UTF-8?q?=E4=BC=98=E5=8C=96=E8=A1=A5=E9=93=BE?= =?UTF-8?q?=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Admin/Controller/MendController.class.php | 2 ++ 1 file changed, 2 insertions(+) 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']; From 895cd1e861d9b5cd88b8bb8a0c057c56f8ff5bab Mon Sep 17 00:00:00 2001 From: ELF <360197197@qq.com> Date: Thu, 28 Nov 2019 15:32:38 +0800 Subject: [PATCH 4/9] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Home/Controller/PromoteController.class.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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); } From 375c9904afad24fa5bcf505c8d1b7ee158291d25 Mon Sep 17 00:00:00 2001 From: chenxiaojun <956334972@qq.com> Date: Thu, 28 Nov 2019 15:32:46 +0800 Subject: [PATCH 5/9] =?UTF-8?q?=E6=8E=A8=E5=B9=BF=E5=B9=B3=E5=8F=B0->?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E7=AE=A1=E7=90=86->=E5=85=85=E5=80=BC?= =?UTF-8?q?=E7=8E=A9=E5=AE=B6--=E6=B7=BB=E5=8A=A0=E8=AF=B4=E6=98=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Home/View/default/Query/userRecharges.html | 1 + 1 file changed, 1 insertion(+) 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 @@ 玩家充值 + 说明:充值数据不包含当日