From 9fb91c4a66ced49355c4ffa8809cdbaf8c023b6d Mon Sep 17 00:00:00 2001 From: ELF <360197197@qq.com> Date: Fri, 18 Jun 2021 17:27:26 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Admin/Common/extend.php | 5 ++++- .../Controller/AuthManagerController.class.php | 5 ++++- .../Admin/Controller/MendController.class.php | 13 +++++++++---- Application/Admin/Model/MemberModel.class.php | 1 + .../Admin/View/AuthManager/dataempower.html | 17 +++++++++++++++++ Application/Admin/View/Mend/edit.html | 16 ++++++++++++++++ Application/Base/Service/MendService.class.php | 16 ++++++++-------- Data/update.sql | 4 +++- 8 files changed, 62 insertions(+), 15 deletions(-) diff --git a/Application/Admin/Common/extend.php b/Application/Admin/Common/extend.php index ecbb4c51d..9b59e1d3b 100644 --- a/Application/Admin/Common/extend.php +++ b/Application/Admin/Common/extend.php @@ -1621,7 +1621,7 @@ function getGameList($partner_id) { function getAdminData ($uid) { $adminData = SM('auth_group_access','sys_') - ->field('data_empower_type,data_president,show_data,show_market_admin,show_promote') + ->field('data_empower_type,data_president,show_data,show_market_admin,show_promote,allow_over_week') ->join('left join sys_auth_group on sys_auth_group_access.group_id=sys_auth_group.id') ->where(array('uid'=>$uid))->find(); @@ -1697,6 +1697,9 @@ function resetUserAuth() $userAuth['data_empower_type'] = $adminData['data_empower_type']; $userAuth['data_president'] = $adminData['data_president']; $userAuth['show_data'] = $adminData['show_data']; + $userAuth['show_market_admin'] = $adminData['show_market_admin']; + $userAuth['allow_over_week'] = $adminData['allow_over_week']; + $userAuth['show_promote'] = $adminData['show_promote']; session('user_group_id',$groupId); session('user_auth', $userAuth); session('user_auth_sign', data_auth_sign($userAuth)); diff --git a/Application/Admin/Controller/AuthManagerController.class.php b/Application/Admin/Controller/AuthManagerController.class.php index 76176d0ac..577327e58 100644 --- a/Application/Admin/Controller/AuthManagerController.class.php +++ b/Application/Admin/Controller/AuthManagerController.class.php @@ -529,7 +529,7 @@ class AuthManagerController extends AdminController{ $auth_group = M('AuthGroup')->where( array('status'=>array('egt','0'),'module'=>'admin','type'=>AuthGroupModel::TYPE_ADMIN) ) ->getfield('id,id,title,rules'); // var_dump($auth_group);die(); - $empower_type = M('AuthGroup')->field('data_empower_type,show_data,show_market_admin,show_promote')->where(array('id'=>$_GET['group_id']))->find(); + $empower_type = M('AuthGroup')->field('data_empower_type,show_data,show_market_admin,show_promote,allow_over_week')->where(array('id'=>$_GET['group_id']))->find(); // var_dump($empower_type);die(); $this->assign('data_empower_type', $empower_type['data_empower_type']); @@ -537,6 +537,7 @@ class AuthManagerController extends AdminController{ $this->assign('auth_group', $auth_group); $this->assign('show_market_admin', $empower_type['show_market_admin']); $this->assign('show_promote', $empower_type['show_promote']); + $this->assign('allow_over_week', $empower_type['allow_over_week']); $this->display(); } @@ -547,6 +548,7 @@ class AuthManagerController extends AdminController{ $data_empower_type = I('data_empower_type'); $show_data = I('show_data'); $show_market_admin = I('show_market_admin'); + $allow_over_week = I('allow_over_week'); $show_promote = I('show_promote'); $promoteData = I('promote_data'); @@ -577,6 +579,7 @@ class AuthManagerController extends AdminController{ 'data_president' => $promoteData, 'show_data' => $show_data, 'show_market_admin' => $show_market_admin, + 'allow_over_week' => $allow_over_week, 'show_promote' => $show_promote, ))) { diff --git a/Application/Admin/Controller/MendController.class.php b/Application/Admin/Controller/MendController.class.php index 2705ede07..e937f5b80 100644 --- a/Application/Admin/Controller/MendController.class.php +++ b/Application/Admin/Controller/MendController.class.php @@ -127,6 +127,11 @@ class MendController extends ThinkController { $service = new MendService(); try { + if (session('user_auth')['allow_over_week'] && $params['allow_over_week'] == 1) { + $params['allow_over_week'] = 1; + } else { + $params['allow_over_week'] = 0; + } $service->addMendTask($params); $userData = M('user','tab_')->field(['account', 'promote_id', 'promote_account'])->where(['id' => $params['user_id']])->find(); @@ -136,7 +141,8 @@ class MendController extends ThinkController { 'key' => $userData['account'].'/'.$userData['promote_account'].'/'.$promoteToData['account'], 'op_name' => '编辑推广补链', 'url' => U('Mend/edit', ['id' => $userData['id']]), - 'menu' => '推广员-推广员管理-推广补链-编辑推广补链' + 'menu' => '推广员-推广员管理-推广补链-编辑推广补链', + 'content' => json_encode($params) ]); $this->success('补链成功', U('lists'), 2); @@ -157,8 +163,7 @@ class MendController extends ThinkController { $this->m_title = '推广补链'; $this->assign('commonset',M('Kuaijieicon')->where(['url'=>'Mend/lists','status'=>1])->find()); - - + $this->assign('allow_over_week', session('user_auth')['allow_over_week']); $this->display(); } } @@ -264,7 +269,7 @@ class MendController extends ThinkController { { $id = I('id'); $info = M("mend", 'tab_')->where("id = {$id} and status = 0")->find(); - if(empty($mend)){ + if(empty($info)){ $this->error("补链不存在或已处理"); } $info['order_time'] = date("Y-m-d",$info['order_time']); diff --git a/Application/Admin/Model/MemberModel.class.php b/Application/Admin/Model/MemberModel.class.php index 811fb087b..4742829ee 100644 --- a/Application/Admin/Model/MemberModel.class.php +++ b/Application/Admin/Model/MemberModel.class.php @@ -81,6 +81,7 @@ class MemberModel extends Model { 'data_president'=>$adminData['data_president'], 'show_data'=>$adminData['show_data'], 'show_market_admin'=>$adminData['show_market_admin'], + 'allow_over_week' => $adminData['allow_over_week'], 'show_promote'=>$adminData['show_promote'], ); session('user_group_id',$groupId); diff --git a/Application/Admin/View/AuthManager/dataempower.html b/Application/Admin/View/AuthManager/dataempower.html index b2037ce38..5ee3d36fe 100644 --- a/Application/Admin/View/AuthManager/dataempower.html +++ b/Application/Admin/View/AuthManager/dataempower.html @@ -113,6 +113,23 @@ +