Merge remote-tracking branch 'origin/dev' into dev

master
liuweiwen 5 years ago
commit 8d52d52785

@ -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'];

@ -107,6 +107,7 @@
<th>补链前渠道</th>
<th>补链后渠道</th>
<th style="width: 450px;">备注</th>
<th>切分时间</th>
<th>补链时间</th>
<th>操作人员</th>
</tr>
@ -126,6 +127,7 @@
<td class="js-pop" >
<a href="javascript:" title="点击查看" class="remarkView" info="{$data['remark']}">{:get_title($data['remark'])}</a>
</td>
<td>{$data.order_time|date='Y-m-d H:i:s',###}</td>
<td>{$data.create_time|date='Y-m-d H:i:s',###}</td>
<td>{$data.op_account}</td>
</tr>

@ -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) {

@ -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);
}

@ -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');
}

@ -31,6 +31,7 @@
</div>
<img src="__IMG__/20180207/icon_normal_game.png">
<span class="title_main">玩家充值</span>
<span class="details">说明:充值数据不包含当日</span>
</div>
<div class="trunk-content article">
<div class="trunk-search clearfix jssearch">

@ -585,4 +585,14 @@ 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 );
('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 `tab_mend`
ADD COLUMN `order_time` int(11) NOT NULL DEFAULT 0 COMMENT '订单时间' AFTER `remark`;
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 `tab_mend`
ADD COLUMN `op_type` tinyint(0) NOT NULL DEFAULT 0 COMMENT '0 管理员 1 推广员' AFTER `op_account`;
Loading…
Cancel
Save