Merge branch 'dev' of 47.111.118.107:/srv/git/platform into dev

master
yulingwei 5 years ago
commit bf9d52ba15

@ -140,29 +140,14 @@ class ConsoleController extends Think {
public function deleteRepeatUserPlayInfo()
{
/* INSERT INTO `tab_server`(`game_id`, `game_name`, `server_name`, `server_num`, `recommend_status`, `show_status`, `stop_status`, `server_status`, `icon`, `start_time`, `desride`, `prompt`, `parent_id`, `create_time`, `server_version`, `developers`, `server_id`) VALUES
(148, '王者纷争(安卓版)', 'O3-潜龙于渊', 3294, 1, 1, 0, 0, NULL, 1571399818, NULL, NULL, NULL, 1571399818, 1, 0, '3294'),
(148, '王者纷争(安卓版)', 'O4-攻心为上', 3301, 1, 1, 0, 0, NULL, 1571399818, NULL, NULL, NULL, 1571399818, 1, 0, '3301'),
(148, '王者纷争(安卓版)', 'O5-知人善用', 3311, 1, 1, 0, 0, NULL, 1571399818, NULL, NULL, NULL, 1571399818, 1, 0, '3311'),
(148, '王者纷争(安卓版)', 'O8-剑拔弩张', 3332, 1, 1, 0, 0, NULL, 1571399818, NULL, NULL, NULL, 1571399818, 1, 0, '3332'),
(148, '王者纷争(安卓版)', 'O12-七擒七纵', 3336, 1, 1, 0, 0, NULL, 1571399818, NULL, NULL, NULL, 1571399818, 1, 0, '3336'),
(148, '王者纷争(安卓版)', 'O15-遮空蔽日', 3375, 1, 1, 0, 0, NULL, 1571399818, NULL, NULL, NULL, 1571399818, 1, 0, '3375'); */
$gameIds = [157, 155, 153, 150, 151, 148, 175, 142, 143, 172, 173, 155, 154];
foreach($gameIds as $gameId) {
$this->doDeleteRepeatUserPlayInfo($gameId);
}
}
// $gameId = 157;
// $gameId = 155;
// $gameId = 153;
// $gameId = 150;
// $gameId = 151;
// 需要先执行上面sql插入区服才能清理干净
// $gameId = 148;
// $gameId = 175;
// $gameId = 142;
// $gameId = 143;
// $gameId = 172;
// $gameId = 173;
// $gameId = 155;
// $gameId = 154;
$gameId = 153;
public function doDeleteRepeatUserPlayInfo($gameId)
{
$sql = 'select id from tab_user_play_info a left join (
select role_id, server_id, game_id, count(1) from tab_user_play_info where server_id="' . $serverId . '" and game_id = ' . $gameId . ' GROUP BY role_id, server_id, game_id, server_name having count(1) > 1
) b on a.role_id=b.role_id where a.server_id=b.server_id and a.game_id=b.game_id and a.server_id="' . $serverId . '" and a.game_id = ' . $gameId . ' order by a.role_id, a.server_id, a.game_id';
@ -209,24 +194,14 @@ class ConsoleController extends Think {
public function deleteRepeatUserPlayInfo2()
{
// $gameId = 157;
// $gameId = 148;
// $gameId = 150;
// $gameId = 151;
// $gameId = 158;
// $gameId = 175;
// $gameId = 142;
// $gameId = 143;
// $gameId = 172;
// $gameId = 173;
// $gameId = 154;
// $gameId = 155;
// $gameId = 176;
// $gameId = 165;
// $gameId = 164;
// $gameId = 179;
// $gameId = 156;
$gameId = 153;
$gameIds = [157, 148, 150, 151, 158, 175, 142, 143, 172, 173, 154, 155, 176, 165, 164, 179, 156, 153];
foreach ($gameIds as $gameId) {
$this->doDeleteRepeatUserPlayInfo2($gameId);
}
}
public function doDeleteRepeatUserPlayInfo2($gameId)
{
$sql = 'select id from tab_user_play_info a left join (
select role_id, server_id, game_id, count(1) from tab_user_play_info where server_id="' . $serverId . '" and game_id = ' . $gameId . ' GROUP BY role_id, server_id, game_id, server_name having count(1) > 1
) b on a.role_id=b.role_id where a.server_id=b.server_id and a.game_id=b.game_id and a.server_id="' . $serverId . '" and a.game_id = ' . $gameId . ' order by a.role_id, a.server_id, a.game_id';

@ -2376,7 +2376,6 @@ class DownloadController extends BaseController {
'绑定币分成比例',
'订单状态',
);
$xlsCell1 = $xlsCell;
$spendModel = M('spend', 'tab_');
$withdrawId = $map['withdraw_id'];
$withdraw = M('withdraw', 'tab_')->field('promote_id,status')->where(array('id' => $withdrawId))->find();
@ -2451,6 +2450,7 @@ class DownloadController extends BaseController {
}
fclose($fp);
$this->backSuccessExport($id);
}
public function withdrawRecordExcelInfo($id,$map) {
@ -2932,27 +2932,51 @@ class DownloadController extends BaseController {
public function rechargeExcelInfo($id,$map) {
$xlsName = "订单查询";
$xlsCell = array(
array('user_account','玩家账号'),
array('order_number','游戏订单'),
array('pay_amount','订单金额'),
array('pay_way','支付方式'),
array('game_name','游戏名称'),
array('server_name','区服'),
array('game_player_name','角色名'),
array('p_p_proinfo','部门长'),
array('p_proinfo','组长'),
array('proinfo','推广员'),
array('pay_time','付款时间'),
'玩家账号',
'游戏订单',
'订单金额',
'支付方式',
'游戏名称',
'区服',
'角色名',
'部门长',
'组长',
'推广员',
'付款时间',
);
$model = M('spend','tab_');
$data1 = $model
->field('tab_spend.id')
->join('tab_game on tab_spend.game_id = tab_game.id')
->join('left join tab_promote on tab_spend.promote_id = tab_promote.id')
->where($map)
->order('tab_spend.id desc')
->select();
$csvFileName = $xlsName.'.csv';
//设置好告诉浏览器要下载excel文件的headers
header('Content-Description: File Transfer');
header('Content-Type: application/vnd.ms-excel');
header('Content-Disposition: attachment; filename="'. $csvFileName .'"');
header('Expires: 0');
header('Cache-Control: must-revalidate');
header('Pragma: public');
$fp = fopen('php://output', 'a');//打开output流
mb_convert_variables('gb2312', 'UTF-8', $xlsCell);
fputcsv($fp, $xlsCell);//将数据格式化为CSV格式并写入到output流中
$accessNum = count($data1)?:0 ;
$perSize = 5000;//每次查询的条数
$pages = ceil($accessNum / $perSize);
for($i = 1; $i <= $pages; $i++) {
$model = M('spend','tab_');
$data = $model
->field('tab_spend.*,tab_promote.account as pro_account,tab_promote.real_name as pro_real_name,tab_promote.chain as chain')
->join('tab_game on tab_spend.game_id = tab_game.id')
->join('left join tab_promote on tab_spend.promote_id = tab_promote.id')
->where($map)
->limit(($i-1)*$perSize ,$perSize)
->order('tab_spend.id desc')
->select();
$xlsData = [];
foreach ($data as $key1 => $value1) {
$value1['pay_way'] = $this->payWay[$value1['pay_way']];
$value1['pay_time'] = date('Y-m-d H:i:s',$value1['pay_time']);
@ -2982,9 +3006,29 @@ class DownloadController extends BaseController {
}
$xlsData[] = $value1;
$csvData["user_account"] = $value1["user_account"];
$csvData["order_number"] = $value1["order_number"];
$csvData["pay_amount"] = $value1["pay_amount"];
$csvData["pay_way"] = $value1["pay_way"];
$csvData["game_name"] = $value1["game_name"];
$csvData["server_name"] = $value1["server_name"];
$csvData["game_player_name"] = $value1["game_player_name"];
$csvData["p_p_proinfo"] = $value1["p_p_proinfo"];
$csvData["p_proinfo"] = $value1["p_proinfo"];
$csvData["proinfo"] = $value1["proinfo"];
$csvData["pay_time"] = $value1["pay_time"];
$xlsData[] = $csvData;
}
$this->exportExcel($xlsName, $xlsCell, $xlsData,$id);
foreach($xlsData as $value) {
mb_convert_variables('GBK', 'UTF-8', $value);
fputcsv($fp, $value);
}
unset($xlsData);
ob_flush();
flush();
}
fclose($fp);
$this->backSuccessExport($id);
}
public function backSuccessExport($id) { //导出成功后

@ -525,7 +525,7 @@ CREATE TABLE `tab_user_play_data_count` (
KEY `search` (`user_id`,`promote_id`,`game_id`,`server_id`,`role_id`,`create_time`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8;
--
-- 身份证认证信
CREATE TABLE `tab_idcard_log` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(80) NOT NULL COMMENT '姓名',
@ -538,15 +538,51 @@ CREATE TABLE `tab_idcard_log` (
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=12 DEFAULT CHARSET=utf8 COMMENT='身份证认证信息';
-- 公告已读表
CREATE TABLE `tab_notice_read` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`notice_id` int(11) NOT NULL COMMENT '广告id',
`game_id` int(11) DEFAULT NULL,
`user_id` int(11) NOT NULL COMMENT '用户id',
`is_read` tinyint(2) DEFAULT '0' COMMENT '0未读1已读',
`create_time` int(11) DEFAULT NULL COMMENT '创建时间',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8;
-- 短信日志
CREATE TABLE `tab_sms_log` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`code` int(11) DEFAULT NULL COMMENT '验证码',
`phone` varchar(20) NOT NULL COMMENT '手机号',
`content` text NOT NULL COMMENT '发送内容',
`status` tinyint(2) NOT NULL COMMENT '发送状态',
`msg` varchar(80) DEFAULT NULL COMMENT '发送返回的信息',
`ip` varchar(20) DEFAULT NULL COMMENT 'ip地址',
`create_time` int(11) DEFAULT NULL COMMENT '创建时间',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8 COMMENT='短信日志';
--
ALTER TABLE `tab_withdraw`
ADD COLUMN `last_up_update_time` int(10) NOT NULL DEFAULT 0 COMMENT '最后更新时间',
ADD COLUMN `spend_ids` longtext NOT NULL COMMENT '充值订单id';
--广oa
-- 推广员添加oa关
ALTER TABLE `tab_promote`
ADD COLUMN`oa_associated` tinyint(1) DEFAULT '0' COMMENT 'oa是否关联',
----
ALTER TABLE `tab_user_play_info`
ADD INDEX `game_id`(`game_id`, `server_id`, `role_id`);
-- SDK菜单配置
INSERT INTO `tab_tool` (`name`, `title`, `config`, `template`, `type`, `status`, `create_time` )
VALUES
('personal_menu', '个人中心列表', '[{\"name\":\"gift\",\"title\":\"\\u793c\\u5305\",\"menu_version\":\"0\",\"url\":\"\\/sdk.php\\/GameGiftPage\\/gift_list\",\"type\":\"0\",\"act\":\"gift\",\"ios_url\":\"?action=gift\",\"sort\":\"1\",\"id\":1,\"icon\":\"\\/Uploads\\/Picture\\/2019-11-20\\/5dd526395e339.png\",\"cover\":\"1986\"},{\"name\":\"balance\",\"title\":\"\\u4f59\\u989d\",\"menu_version\":\"0\",\"url\":\"\\/sdk.php\\/UserH\\/get_user_money\",\"type\":\"0\",\"act\":\"\\/sdk.php\\/UserH\\/get_user_money\",\"ios_url\":\"\\/sdk.php\\/UserH\\/get_user_money\",\"sort\":\"2\",\"id\":\"2\",\"icon\":\"\\/Uploads\\/Picture\\/2019-11-20\\/5dd5264d1e202.png\",\"cover\":\"1987\"},{\"name\":\"message\",\"title\":\"\\u6d88\\u606f\",\"menu_version\":\"0\",\"url\":\"\",\"type\":\"1\",\"act\":\"msg\",\"ios_url\":\"\",\"sort\":\"3\",\"id\":3,\"icon\":\"\\/Uploads\\/Picture\\/2019-11-20\\/5dd5265fb396d.png\",\"cover\":\"1988\"},{\"name\":\"support\",\"title\":\"\\u5ba2\\u670d\",\"menu_version\":\"0\",\"url\":\"\",\"type\":\"1\",\"act\":\"support\",\"ios_url\":\"\",\"sort\":\"4\",\"id\":4,\"icon\":\"\\/Uploads\\/Picture\\/2019-11-20\\/5dd52674492b7.png\",\"cover\":\"1989\"}]', '', 5, 1, 1571723212 );
INSERT INTO `tab_tool` (`name`, `title`, `config`, `template`, `type`, `status`, `create_time` )
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 );
Loading…
Cancel
Save