Merge branch 'hotfix/task-65' into release-1.0.0

master
ELF 5 years ago
commit c8bef581f5

@ -11,25 +11,25 @@ class BehaviorLogController extends ThinkController
$map = [];
if (isset($params['user_account'])) {
$map['tab_pay_info.user_account'] = $params['user_account'];
$map['user_account'] = $params['user_account'];
}
if (isset($params['extend'])) {
$map['tab_pay_info.extend'] = $params['extend'];
$map['_string'] = 'extend = "'.$params["extend"]. '" or order_id = "'.$params["extend"] . '"';
}
if (isset($params['game_name'])) {
$game_id = ['in', array_column(getGameByName($params['game_name'], $params['sdk_version']), 'id')];
$map['tab_pay_info.game_id'] = $game_id;
$map['game_id'] = $game_id;
}
if (isset($params['server_name'])) {
$game_id = M('game', 'tab_')->where(['relation_game_name' => $params['game_name'],'sdk_version' => $params['sdk_version']])->getField('id');
$server_id = M('server', 'tab_')->where(['server_name' => $params['server_name'], 'game_id' => $game_id])->getField('server_num');
$map['tab_pay_info.server_id'] = $server_id;
$map['server_id'] = $server_id;
}
if (isset($params['game_player_name'])) {
$map['tab_pay_info.game_player_name'] = $params['game_player_name'];
$map['game_player_name'] = $params['game_player_name'];
}
if (isset($params['game_player_id'])) {
$map['tab_pay_info.game_player_id'] = $params['game_player_id'];
$map['game_player_id'] = $params['game_player_id'];
}
@ -40,7 +40,7 @@ class BehaviorLogController extends ThinkController
$endDate = empty($params['timeend']) ? date('Y-m-d') : $params['timeend'];
$startTime = strtotime($startDate);
$endTime = strtotime($endDate) + 86399;
$map['tab_pay_info.create_time'] = array('BETWEEN', [$startTime, $endTime]);
$map['create_time'] = array('BETWEEN', [$startTime, $endTime]);
if (isset($params['promote_id'])) {
$promoteId = $params['promote_id'];
if ($promoteId == 0) {
@ -52,13 +52,22 @@ class BehaviorLogController extends ThinkController
$map['promote_id'] = ['in', $promoteIds];
}
}
$data = M('pay_info', 'tab_')->field('tab_pay_info.id,tab_pay_info.user_account,extend,tab_pay_info.create_time,tab_pay_info.game_name,tab_pay_info.server_name,tab_pay_info.promote_account,tab_pay_info.order_id,tab_pay_info.game_player_id,tab_pay_info.game_player_name,price,tab_server.server_name')->join('tab_server on tab_pay_info.server_id = tab_server.server_num AND tab_pay_info.game_id = tab_server.game_id')->where($map)->order('tab_pay_info.id DESC')->page($p, $row)->select();
// $data = M('pay_info', 'tab_')->field('tab_pay_info.id,tab_pay_info.user_account,extend,tab_pay_info.create_time,tab_pay_info.game_name,tab_pay_info.server_name,tab_pay_info.promote_account,tab_pay_info.order_id,tab_pay_info.game_player_id,tab_pay_info.game_player_name,price,tab_server.server_name')->join('LEFT JOIN tab_server on tab_pay_info.server_id = tab_server.server_num AND tab_pay_info.game_id = tab_server.game_id AND tab_pay_info.server_id <> 0')->where($map)->order('tab_pay_info.id DESC')->page($p, $row)->select();
$data = M('pay_info', 'tab_')->where($map)->order('id DESC')->page($p, $row)->select();
foreach($data as $k => $v) {
if(empty($v['extend'])) {
$data[$k]['extend'] = $v['order_id'];
}
if ($v['server_id'] > 0 && !empty($v['extend'])){
$data[$k]['server_name'] = M('server', 'tab_')->where(['game_id' => $v['game_id'],'server_num' =>$v['server_id']])->getField('server_name');
} else {
$data[$k]['server_name'] = '';
$data[$k]['game_player_name'] = '';
$data[$k]['game_player_id'] = '';
}
}
$count = M('pay_info', 'tab_')->join('tab_server on tab_pay_info.server_id = tab_server.server_num AND tab_pay_info.game_id = tab_server.game_id')->where($map)->count();
$count = M('pay_info', 'tab_')->where($map)->count();
$page = set_pagination($count, $row);
if ($page) {
$this->assign('_page', $page);

@ -865,12 +865,7 @@ class PromoteService {
'message' => '账号只能为数字,字母和下划线',
];
}
if ($mobile == '') {
return [
'status' => false,
'message' => '请输入手机号',
];
} else {
if ($mobile != '') {
if (!preg_match("/^1[3456789]{1}\d{9}$/", $mobile)) {
return [
'status' => false,
@ -878,12 +873,7 @@ class PromoteService {
];
}
}
if ($idcard == '') {
return [
'status' => false,
'message' => '请输入身份证号',
];
} else {
if ($idcard != '') {
if (!IdCard::isIdcard($idcard)) {
return [
'status' => false,
@ -891,12 +881,7 @@ class PromoteService {
];
}
}
if ($realName == '') {
return [
'status' => false,
'message' => '请输入姓名',
];
} else {
if ($realName != '') {
if (mb_strlen($realName) < 2 || mb_strlen($realName) > 4) {
return [
'status' => false,

@ -1909,16 +1909,26 @@ class DownloadController extends BaseController {
foreach($data as $key => $v) {
$v['create_time'] = date('Y-m-d H:i:s',$v['create_time']);
$promoteInfo = M('promote','tab_')->field("account")->where(['id' => intval($v['promote_id'])])->find();
$serverId = $v['server_id'];
$gameId = $v['game_id'];
$serverInfo = M('server','tab_')->field('server_name')->where(['server_num'=>$serverId,'game_id'=>$gameId])->find();
if($v['server_id'] != 0 && !empty($v['extend'])) {
$serverId1 = $v['server_id'];
$gameId = $v['game_id'];
$serverInfo = M('server','tab_')->field('server_name')->where(['server_num'=>$serverId1,'game_id'=>$gameId])->find();
$servername = $serverInfo['server_name'];
}else {
$servername = "";
$v['game_player_id'] = "";
$v['game_player_name'] = "";
}
$v['promote_id']= $promoteInfo['account'];
if(empty($v['extend'])) {
$v['extend'] = $v['order_id'];
}
$csvData['extend'] = $this->encryption($v['extend']);
$csvData['create_time'] = $v['create_time'];
$csvData['user_account'] = $v['user_account'];
$csvData['game_name'] = $v['game_name'];
$csvData['promote_id'] = $v['promote_id'];
$csvData['server_name'] = $serverInfo['server_name'];
$csvData['server_name'] = $servername;
$csvData['user_id'] = $v['game_player_id'];
$csvData['game_player_name'] = $v['game_player_name'];
$csvData['price'] = $v['price'];
@ -3446,7 +3456,7 @@ class DownloadController extends BaseController {
->where($map)
->order('tab_spend.id desc')
->find()['income'];
$csvData1["user_account"] = "合计";
$csvData1["user_account"] = "合计(此数据根据充值状态进行统计)";
$csvData1["pay_order_number"] = "--";
$csvData1["pay_amount"] = $income;
$csvData1["pay_way"] = "--";

@ -74,15 +74,26 @@ class PlayersController extends BaseController {
$rs = M('pay_info','tab_')->where($map)->order('tab_pay_info.create_time desc')
->page($page, $row)->select();
foreach($rs as $key => $v) {
$rs[$key]['extend'] = encryption($v['extend']);
$rs[$key]['create_time'] = date('Y-m-d H:i:s',$v['create_time']);
$promoteInfo = M('promote','tab_')->field("account")->where(['id' => intval($v['promote_id'])])->find();
$serverId1 = $v['server_id'];
$gameId = $v['game_id'];
$serverInfo = M('server','tab_')->field('server_name')->where(['server_num'=>$serverId1,'game_id'=>$gameId])->find();
$rs[$key]['server_name'] = $serverInfo['server_name'];
$rs[$key]['promote_id']= $promoteInfo['account'];
}
if($v['server_id'] != 0 && !empty($v['extend'])) {
$serverId1 = $v['server_id'];
$gameId = $v['game_id'];
$serverInfo = M('server','tab_')->field('server_name')->where(['server_num'=>$serverId1,'game_id'=>$gameId])->find();
$rs[$key]['server_name'] = $serverInfo['server_name'];
}else {
$rs[$key]['server_name'] = "";
$rs[$key]['game_player_id'] = "";
$rs[$key]['game_player_name'] = "";
}
if(empty($v['extend'])) {
$v['extend'] = $v['order_id'];
}
$rs[$key]['extend'] = encryption($v['extend']);
$rs[$key]['create_time'] = date('Y-m-d H:i:s',$v['create_time']);
$promoteInfo = M('promote','tab_')->field("account")->where(['id' => intval($v['promote_id'])])->find();
$rs[$key]['promote_id']= $promoteInfo['account'];
}
$count = M('pay_info', 'tab_')
->field('tab_pay_info.id')
->where($map)

@ -1893,13 +1893,15 @@ class PromoteController extends BaseController
public function shift()
{
$this->ajaxReturn([
'status' => false,
'msg'=>'该功能暂时关闭'
]);
$loginPromote = $this->getLoginPromote();
$params = $_POST;
if (isset($params['type']) && $params['type'] == 2) {
$this->ajaxReturn([
'status' => false,
'msg'=>'该功能暂时关闭'
]);
}
$params['creator_id'] = $loginPromote['id'];
$params['creator_type'] = 1;
$promoteService = new PromoteService();

@ -36,19 +36,19 @@
</td>
</tr>
<tr>
<td class="l"><span class="req">*</span>姓名:</td>
<td class="l">姓名:</td>
<td class="r">
<input type="text" class="name input-txt txt" name="real_name" id="real_name" maxlength="4" minlength="2" placeholder="请输入姓名">
</td>
</tr>
<tr>
<td class="l"><span class="req">*</span>身份证:</td>
<td class="l">身份证:</td>
<td class="r">
<input type="text" class="name input-txt txt" name="idcard" id="idcard" placeholder="请输入身份证">
</td>
</tr>
<tr>
<td class="l"><span class="req">*</span>手机号:</td>
<td class="l">手机号:</td>
<td class="r">
<input type="text" class="name input-txt txt" name="mobile_phone" id="mobile_phone" placeholder="请输入手机号">
</td>
@ -147,8 +147,10 @@
if($.trim($('#account').val()).length < 6 || $.trim($('#account').val()).length > 15){
return json_data = {'status':0,'msg':'子渠道账号长度为6-15位字符'}
}
if($.trim($('#real_name').val()).length < 2 || $.trim($('#real_name').val()).length > 4){
return json_data = {'status':0,'msg':'子渠道姓名长度为2-4位字符'}
if ($.trim($('#real_name').val()) != '') {
if($.trim($('#real_name').val()).length < 2 || $.trim($('#real_name').val()).length > 4){
return json_data = {'status':0,'msg':'子渠道姓名长度为2-4位字符'}
}
}
if($('#password').val()==""){
return json_data = {'status':0,'msg':'子渠道密码不能为空'}

@ -224,7 +224,7 @@
</tr>
</volist>
<tr>
<td>合计</td>
<td>合计(此数据根据充值状态进行统计)</td>
<td>--</td>
<td>--</td>
<td>--</td>

@ -0,0 +1,2 @@
User-agent: *
Disallow: /
Loading…
Cancel
Save