Merge branch 'hotfix/recharge_statistics' into feature/admin_optimize

master
liuweiwen 5 years ago
commit 2ed47500f0

@ -7212,7 +7212,7 @@ class ExportController extends Controller
if (!empty(I('timestart'))) {
$timestart = strtotime(I('timestart'));
$map['_string'] = "pay_time > {$timestart}";
$map['_string'] = "pay_time >= {$timestart}";
}
if (!empty(I('timeend'))) {

@ -715,7 +715,7 @@ class FinanceController extends ThinkController
if (!empty(I('timestart'))) {
$timestart = strtotime(I('timestart'));
$map['_string'] = "s.pay_time > {$timestart}";
$map['_string'] = "s.pay_time >= {$timestart}";
}
if (!empty(I('timeend'))) {
@ -784,7 +784,7 @@ class FinanceController extends ThinkController
if (!empty(I('timestart'))) {
$timestart = strtotime(I('timestart'));
$map['_string'] = "pay_time > {$timestart}";
$map['_string'] = "pay_time >= {$timestart}";
}
if (!empty(I('timeend'))) {

@ -116,6 +116,7 @@ class PromoteController extends ThinkController
$map['oa_associated'] = I('oa_associated');
$oa_data = [];
for ($i = 1; $i > 0; $i++) {
$arr = [];
$arr['time'] = time();
$arr['page'] = $i;
$arr['pageSize'] = 1000;
@ -125,7 +126,7 @@ class PromoteController extends ThinkController
$arr['sign'] = $sign;
$re_data = curl_post(C('OA.formalUrl') . '/api/wanmeng/platformAccount', $arr);
$re_data = json_decode($re_data, true);
if ($re_data['code'] == 1) {
if (!empty($re_data['data'])) {
$oa = $re_data['data'];
$oa_data = array_merge($oa_data, $oa);
} else {

@ -138,19 +138,24 @@ class TestWhiteListController extends ThinkController
$user = M('user','tab_')->where($userData)->find();
if ($user) {
$this->error('账号已经存在');
if (!$user) {
$this->error('账号存在');
}
$userData['password'] = md5(sha1('123456') . UC_AUTH_KEY);
$userData['promote_id'] = 0;
$userData['promote_account'] = '官方渠道';
$userData['register_time'] = time();
$userData['check_status'] = $data['status']?$data['status']:0;
// $userData['password'] = md5(sha1('123456') . UC_AUTH_KEY);
// $userData['promote_id'] = 0;
// $userData['promote_account'] = '官方渠道';
// $userData['register_time'] = time();
// $userData['check_status'] = $data['status']?$data['status']:0;
//
// $userAdd = M('user','tab_')->add($userData);
// if ($userAdd) {
// dump($user);die();
$userAdd = M('user','tab_')->add($userData);
if ($userAdd) {
$data['user_id'] = $userAdd;
$userWhite = M('test_white_list','tab_')->where(['user_id'=>$user['id']])->find();
if (!$userWhite) {
$data['user_id'] = $user['id'];
$data['show_status'] = $data['status']?$data['status']:0;
$data['add_user'] = $_SESSION['onethink_admin']['user_auth']['username'];
$data['create_ime'] = time();
@ -161,11 +166,16 @@ class TestWhiteListController extends ThinkController
} else {
$this->error('添加白名单失败');
}
} else {
$this->error('添加用户失败');
$this->error('白名单以添加,请勿重复添加');
}
// } else {
// $this->error('添加用户失败');
// }
}
public function freezeSupport() {
@ -190,4 +200,32 @@ class TestWhiteListController extends ThinkController
}
}
public function deleteWhileUser() {
$userId = $_REQUEST['id'];
// dump($userId);die();
$userWhite = M('test_white_list','tab_')->where(['id'=>$userId])->find();
if ($userWhite) {
$del = M('test_white_list','tab_')->where(['id'=>$userId])->delete();
if ($del) {
$this->ajaxReturn(['status'=>0,'msg'=>"删除成功"]);
} else {
$this->ajaxReturn(['status'=>0,'msg'=>"删除失败"]);
}
} else {
$this->ajaxReturn(['status'=>0,'msg'=>"账号不存在,删除失败"]);
}
}
}

@ -81,7 +81,11 @@
<td>{$data.add_user}</td>
<td>{$data.create_ime}</td>
<td>
<a href="{:U('TestWhiteList/edit',array('user_id'=>$data['user_id'],'account'=>$data['account'],'status'=>$data['show_status']))}" style="width:100%;">编辑</a>
<!-- <a href="{:U('TestWhiteList/edit',array('user_id'=>$data['user_id'],'account'=>$data['account'],'status'=>$data['show_status']))}" style="width:100%;">编辑</a>-->
<!-- <a href="{:U('TestWhiteList/deleteWhileUser',array('id'=>$data['id']))}" style="width:100%;">删除</a>-->
<a class="del_user" href-hhh="{:U('TestWhiteList/deleteWhileUser',array('id'=>$data['id']))}" style="width:100%;">删除</a>
<if condition="$data['show_status'] eq 1">
<a class="froze-btn" href-hhh="{:U('TestWhiteList/edit_user1',array('user_id'=>$data['user_id'],'status'=>0,'account'=>$data['account']))}" style="width:100%;">锁定</a>
<else />
@ -151,6 +155,25 @@
}
})
$('.del_user').on({
click: function() {
var url = $(this).attr('href-hhh');
console.log(url);
layer.confirm('是否确认删除测试账号?', {icon: 3, title:'提示',skin:'textColor'}, function(index){
$.ajax({
url: url,
type: 'post',
dataType: 'json',
success: function(response) {
layer.msg(response.msg, {time: 1000,skin:'msgClolor'}, function() {
window.location.href = window.location.href
})
}
})
})
}
})
//搜索功能
$("#search").click(function () {
var url = $(this).attr('url');

Loading…
Cancel
Save