From 7beb0938e3d63f0fa86045169cb615d460c7a36c Mon Sep 17 00:00:00 2001 From: zyx Date: Mon, 3 Feb 2020 14:39:45 +0800 Subject: [PATCH 1/5] =?UTF-8?q?=E6=B5=8B=E8=AF=95=E7=99=BD=E5=90=8D?= =?UTF-8?q?=E5=8D=95=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../TestWhiteListController.class.php | 34 ++++++++++++------- 1 file changed, 22 insertions(+), 12 deletions(-) diff --git a/Application/Admin/Controller/TestWhiteListController.class.php b/Application/Admin/Controller/TestWhiteListController.class.php index da0f11cc7..0b7f0e280 100644 --- a/Application/Admin/Controller/TestWhiteListController.class.php +++ b/Application/Admin/Controller/TestWhiteListController.class.php @@ -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() { From a85c217c6bca79b583712655e0baac3e3e191e26 Mon Sep 17 00:00:00 2001 From: xxxx <2222@qq.com> Date: Mon, 3 Feb 2020 14:51:12 +0800 Subject: [PATCH 2/5] =?UTF-8?q?OA=E7=AE=A1=E7=90=86=E5=91=98=E7=BB=91?= =?UTF-8?q?=E5=AE=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Admin/Controller/PromoteController.class.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Application/Admin/Controller/PromoteController.class.php b/Application/Admin/Controller/PromoteController.class.php index 223d6d0fc..6ac74ba0f 100644 --- a/Application/Admin/Controller/PromoteController.class.php +++ b/Application/Admin/Controller/PromoteController.class.php @@ -111,6 +111,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; @@ -120,7 +121,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 { From 2ad5017fae32d7820fc5414d7b2b717d12289fe7 Mon Sep 17 00:00:00 2001 From: zyx Date: Mon, 3 Feb 2020 15:53:20 +0800 Subject: [PATCH 3/5] =?UTF-8?q?=E6=B5=8B=E8=AF=95=E7=99=BD=E5=90=8D?= =?UTF-8?q?=E5=8D=95=E7=BC=96=E8=BE=91=E4=BF=AE=E6=94=B9=E6=88=90=E5=88=A0?= =?UTF-8?q?=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../TestWhiteListController.class.php | 28 +++++++++++++++++++ .../Admin/View/TestWhiteList/lists.html | 25 ++++++++++++++++- 2 files changed, 52 insertions(+), 1 deletion(-) diff --git a/Application/Admin/Controller/TestWhiteListController.class.php b/Application/Admin/Controller/TestWhiteListController.class.php index 0b7f0e280..98566be9a 100644 --- a/Application/Admin/Controller/TestWhiteListController.class.php +++ b/Application/Admin/Controller/TestWhiteListController.class.php @@ -200,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'=>"账号不存在,删除失败"]); + + } + + + } + } diff --git a/Application/Admin/View/TestWhiteList/lists.html b/Application/Admin/View/TestWhiteList/lists.html index 2d24fc52a..bd767247c 100644 --- a/Application/Admin/View/TestWhiteList/lists.html +++ b/Application/Admin/View/TestWhiteList/lists.html @@ -81,7 +81,11 @@ {$data.add_user} {$data.create_ime} - 编辑 + + + + 删除 + 锁定 @@ -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'); From b5a2ddba3c0c6c8ff182b8c7f08bb0f4b8a09d96 Mon Sep 17 00:00:00 2001 From: liuweiwen <529520975@qq.com> Date: Tue, 4 Feb 2020 19:35:42 +0800 Subject: [PATCH 4/5] =?UTF-8?q?=E6=B8=B8=E6=88=8F=E8=AE=A2=E5=8D=95?= =?UTF-8?q?=E6=9F=A5=E7=9C=8B=EF=BC=8C=E6=9F=A5=E8=AF=A2=E6=97=B60?= =?UTF-8?q?=E7=82=B9=E5=B1=9E=E4=BA=8E=E5=BD=93=E5=A4=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Admin/Controller/ExportController.class.php | 2 +- Application/Admin/Controller/FinanceController.class.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Application/Admin/Controller/ExportController.class.php b/Application/Admin/Controller/ExportController.class.php index 118624446..d61e779d8 100644 --- a/Application/Admin/Controller/ExportController.class.php +++ b/Application/Admin/Controller/ExportController.class.php @@ -7203,7 +7203,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'))) { diff --git a/Application/Admin/Controller/FinanceController.class.php b/Application/Admin/Controller/FinanceController.class.php index f3a6da5fb..78788ca45 100644 --- a/Application/Admin/Controller/FinanceController.class.php +++ b/Application/Admin/Controller/FinanceController.class.php @@ -778,7 +778,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'))) { From b94bf938230931f5388f0592b0271a896cf62ccc Mon Sep 17 00:00:00 2001 From: liuweiwen <529520975@qq.com> Date: Thu, 6 Feb 2020 23:08:24 +0800 Subject: [PATCH 5/5] =?UTF-8?q?0=E7=82=B9=E6=B8=B8=E6=88=8F=E7=BB=9F?= =?UTF-8?q?=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Admin/Controller/FinanceController.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Application/Admin/Controller/FinanceController.class.php b/Application/Admin/Controller/FinanceController.class.php index 78788ca45..eb832bfaf 100644 --- a/Application/Admin/Controller/FinanceController.class.php +++ b/Application/Admin/Controller/FinanceController.class.php @@ -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'))) {