From 1f6de9be578b3cf0d524578746c862a4c7409d07 Mon Sep 17 00:00:00 2001 From: sunke <18850253506@163.com> Date: Thu, 27 Feb 2020 12:47:48 +0800 Subject: [PATCH] =?UTF-8?q?=E6=93=8D=E4=BD=9C=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Base/Service/PromoteService.class.php | 1 + Application/Home/Common/function.php | 16 +- .../Home/Controller/ApplyController.class.php | 2 +- .../Controller/CoinOrderController.class.php | 1 + .../Controller/DownloadController.class.php | 154 ++++++++- .../PromoteCoinController.class.php | 1 + .../Controller/PromoteController.class.php | 7 + .../Home/Controller/SafeController.class.php | 72 ++++ .../Controller/SupportController.class.php | 1 + .../TestResourceController.class.php | 1 + .../View/default/Public/promote_base.html | 1 + .../Home/View/default/Safe/promoteLogs.html | 327 ++++++++++++++++++ Data/update.sql | 12 + 13 files changed, 586 insertions(+), 10 deletions(-) create mode 100644 Application/Home/View/default/Safe/promoteLogs.html diff --git a/Application/Base/Service/PromoteService.class.php b/Application/Base/Service/PromoteService.class.php index 6595b95ab..30f8b41b7 100644 --- a/Application/Base/Service/PromoteService.class.php +++ b/Application/Base/Service/PromoteService.class.php @@ -152,6 +152,7 @@ class PromoteService { ]; if (M('shift_task', 'sys_')->add($data)) { + recordPromoteLogs('管理中心','渠道迁移'); return [ 'status' => true, 'msg'=>'迁移任务创建成功' diff --git a/Application/Home/Common/function.php b/Application/Home/Common/function.php index 28fbfc621..e52beea47 100644 --- a/Application/Home/Common/function.php +++ b/Application/Home/Common/function.php @@ -1286,4 +1286,18 @@ function convertAmountToCn($num) { } return $daxie . '整'; -} \ No newline at end of file +} + +//记录工作人员相关操作日志 +function recordPromoteLogs($module,$action_type) { + $id = get_pid(); + $promoteInfo = M("promote","tab_")->field('account')->where(['id'=>$id])->find(); + $promoteLogsData['action_type'] = $action_type; + $promoteLogsData['module'] = $module; + $promoteLogsData['promote'] = $promoteInfo['account']; + $promoteLogsData['promote_id'] = $id; + $promoteLogsData['ip'] = $_SERVER['REMOTE_ADDR']; + $promoteLogsData['create_time'] = time(); + M('promote_action_logs','tab_')->add($promoteLogsData); + +} diff --git a/Application/Home/Controller/ApplyController.class.php b/Application/Home/Controller/ApplyController.class.php index c7cf38695..76fe0b534 100644 --- a/Application/Home/Controller/ApplyController.class.php +++ b/Application/Home/Controller/ApplyController.class.php @@ -1139,7 +1139,7 @@ class ApplyController extends BaseController if ($_POST['sdk_type'] > 0 && empty($res)) { $this->ajaxReturn(array("status" => 1, "msg" => "已申请过该游戏")); } - + recordPromoteLogs('游戏管理','专服管理添加游戏'); $this->ajaxReturn(array("status" => 1, "msg" => "申请成功")); } else { $this->ajaxReturn(array("status" => "0", "msg" => "数据有误")); diff --git a/Application/Home/Controller/CoinOrderController.class.php b/Application/Home/Controller/CoinOrderController.class.php index 1cd7cca4c..f713d0af1 100644 --- a/Application/Home/Controller/CoinOrderController.class.php +++ b/Application/Home/Controller/CoinOrderController.class.php @@ -154,6 +154,7 @@ class CoinOrderController extends BaseController $data['pay_way'] = 3; } M("coin_pay_order", 'tab_')->add($data); + recordPromoteLogs('平台币管理','提交充值订单'); $this->ajaxReturn(['status'=>1,'info'=>'充值提交成功','pay_type'=>$pay_type,'trade_no'=>$order_no,'time'=>1000],"JSON"); }else{ $account = $_SESSION['onethink_home']['promote_auth']['account']; diff --git a/Application/Home/Controller/DownloadController.class.php b/Application/Home/Controller/DownloadController.class.php index 2e8c7ec04..31f6d6830 100644 --- a/Application/Home/Controller/DownloadController.class.php +++ b/Application/Home/Controller/DownloadController.class.php @@ -1227,6 +1227,57 @@ class DownloadController extends BaseController { } $this->success('添加下载成功',U('listsIndex')); } + + public function promotelogs_data_export() { + $begTime = I('begtime'); + $endTime = I('endtime'); + // $map1['chain'] = ['like','%'.'/'.PID.'/'.'%']; + // $rs = M('promote','tab_')->where($map1)->field('id,account,nickname')->select(); + // $childPromoteIds = ''; + // if(empty($rs)) { + // $map['promote_id'] = PID; + // }else { + // foreach ($rs as $rsKey => $rsValue) { + // $id = $rsValue['id']; + // $childPromoteIds .= $id.','; + // } + // $childPromoteIds = rtrim($childPromoteIds, ','); + // $childPromoteIds .= ',' . PID; + // $map['promote_id'] = ['in', $childPromoteIds]; + // } + + $map['pid'] = PID; + empty(I('user_account')) || $map['promote'] = ['like', '%' . I('user_account') . '%']; + empty(I('action_type')) || $map['action_type'] = ['like', '%' . I('action_type') . '%']; + if (!empty($begTime) && !empty($endTime)) { + $map['create_time'] = ['between', [strtotime($begTime), strtotime($endTime) +24*3600- 1]]; + }else if (empty($begTime) && !empty($endTime)) { + $map['create_time'] = ['elt',strtotime($endTime) + 24*3600]; + }else if (!empty($begTime) && empty($endTime)) { + $map['create_time'] = ['EGT',strtotime($begTime) + 24*3600]; + } + + + $conditions = json_encode($map,TRUE); + $addtime = time(); + $data = [ + 'logid' => 'promoteLogs_'.time(), + 'promote_id' => PID, + 'type' => '/Home/Safe/promoteLogs', + 'dataname' => '推广员操作日志', + 'status' => 0, + 'addtime' => $addtime, + 'begintime' => 0, + 'content' => '', + 'conditions' =>$conditions + ]; + $res = M('downloadlog','tab_')->add($data); + if (!$res) { + // $this->ajaxReturn(array("status" => -1, "msg" => "添加导出日志失败", 'ret' => $res)); + $this->error('添加下载失败'); + } + $this->success('添加下载成功',U('listsIndex')); + } /** * 充值明细添加下载 * @author sunke @@ -2049,12 +2100,82 @@ class DownloadController extends BaseController { case "推广员详情": $this->promotequotaDtlExcelInfo($id,$map); break; + case "推广员操作日志": + $this->promotelogsExcelInfo($id,$map); + break; default: break; } } + public function promotelogsExcelInfo($id,$map) { + $xlsName = "推广员操作日志"; + $xlsCell = array( + '位置', + '类型', + '操作人', + '时间', + 'ip地址', + ); + $pid = $map['pid']; + unset($map['pid']); + $map1['chain'] = ['like','%'.'/'.$pid.'/'.'%']; + $rs = M('promote','tab_')->where($map1)->field('id,account,nickname')->select(); + $childPromoteIds = ''; + if(empty($rs)) { + $map['promote_id'] = $pid; + }else { + foreach ($rs as $rsKey => $rsValue) { + $id = $rsValue['id']; + $childPromoteIds .= $id.','; + } + $childPromoteIds = rtrim($childPromoteIds, ','); + $childPromoteIds .= ',' . $pid; + $map['promote_id'] = ['in', $childPromoteIds]; + } + $records = M('promote_action_logs', 'tab_')->where($map)->order('create_time')->select(); + $csvFileName = $xlsName.'.csv'; + 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($records)?:0 ; + $perSize = 5000;//每次查询的条数 + $pages = ceil($accessNum / $perSize); + for($i = 1; $i <= $pages; $i++) { + $data = M('promote_action_logs', 'tab_')->where($map)->order('create_time') + ->limit(($i-1)*$perSize ,$perSize)->select(); + foreach($data as $dataKey => $dataValue) { + $orderLen = strlen($dataValue['promote']); + $strLen = 3; + $hideChar = ''; + + if ($orderLen <= 8) { $strLen = 2;} + for ($i = 0; $i < $orderLen - $strLen * 2; $i++) { + $hideChar .= '*'; + } + $csvData['module'] = $dataValue['module']; + $csvData['action_type'] = $dataValue['action_type']; + $csvData['user_account'] = substr($dataValue['promote'], 0, $strLen) . $hideChar . substr($dataValue['promote'], $orderLen - $strLen); + $csvData['create_time'] = date("Y-m-d H:i:s",$dataValue['create_time']); + $csvData['ip'] = $dataValue['ip']; + mb_convert_variables('GBK', 'UTF-8', $csvData); + fputcsv($fp, $csvData); + } + unset($csvData); + ob_flush(); + flush(); + } + fclose($fp); + $this->backSuccessExport($id); + } + public function promotequotaDtlExcelInfo($id,$map) { $xlsName = "推广员详情"; $xlsCell = array( @@ -2067,6 +2188,7 @@ class DownloadController extends BaseController { '等级', '创建时间', ); + $records = recordPromoteLogs('数据管理','推广员详情导出'); $records = M('user_play_info', 'tab_')->where($map)->order('create_time desc')->select(); $csvFileName = $xlsName.'.csv'; //设置好告诉浏览器要下载excel文件的headers @@ -2130,6 +2252,7 @@ class DownloadController extends BaseController { array('server_name','游戏区服'), array('role_num','角色数量'), ); + $records = recordPromoteLogs('数据管理','推广员指标导出'); $params['isContainSubs'] = $map['isContainSubs']; $params['basicPromotes'] = json_decode($map['basicPromotes'],TRUE); $ids = $map['ids']; @@ -2276,7 +2399,8 @@ class DownloadController extends BaseController { '注册ip', '登陆时间', '登陆ip' - ); + ); + $records = recordPromoteLogs('数据管理','注册明细导出'); $model = M('user','tab_'); $data1 = $model->field('account')->where($map)->order('tab_user.id desc')->select(); @@ -2335,7 +2459,8 @@ class DownloadController extends BaseController { array('role_name','游戏昵称'), array('role_level','等级'), array('create_time','创建时间'), - ); + ); + $records = recordPromoteLogs('数据管理','角色查询导出'); $model = M('user_play_info','tab_'); $data = $model->field('user_account,promote_account,game_name,server_name,role_name,role_level,create_time')->where($map)->order('create_time desc')->select(); $xlsData = []; @@ -2360,6 +2485,7 @@ class DownloadController extends BaseController { array('new_ip_num','新增创角ip'), array('login_user_num','登陆用户数'), ); + $records = recordPromoteLogs('数据管理','数据汇总导出'); if($this->canViewUserRecharge) { $xlsCell[] = array('spend_user_num','充值人数'); $xlsCell[] = array('spend_num','充值次数'); @@ -2526,6 +2652,7 @@ class DownloadController extends BaseController { array('create_time','创建时间'), ); + $records = recordPromoteLogs('数据管理','渠道管理导出'); $model = M('promote','tab_'); $data = $model->where($map)->select(); $xlsData = []; @@ -2551,14 +2678,15 @@ class DownloadController extends BaseController { } public function mycoinExcelInfo($id,$map) { - $xlsName = "我的平台币"; - $xlsCell = array( + $xlsName = "我的平台币"; + $xlsCell = array( array('cointype','平台币类型'), array('game_name','游戏名称'), array('num','平台币余额'), array('status','资产状态'), ); + $records = recordPromoteLogs('平台币管理','我的平台币导出'); $data = M('PromoteBalanceCoin', 'tab_') ->field('tab_promote_balance_coin.*,tab_game.game_name') ->join('left join tab_game on tab_promote_balance_coin.game_id = tab_game.id') @@ -2585,8 +2713,8 @@ class DownloadController extends BaseController { } public function mycoinRecordExcelInfo($id,$map) { - $xlsName = "我的平台币明细"; - $xlsCell = array( + $xlsName = "我的平台币明细"; + $xlsCell = array( array('sn','流水号'), array('type_text','操作类型'), array('sub_type_text','操作方式'), @@ -2596,6 +2724,7 @@ class DownloadController extends BaseController { array('description','交易说明'), array('create_time','交易时间'), ); + $records = recordPromoteLogs('平台币管理','我的平台币明细导出'); $service = new PromoteCoinRecordService(); $data = M('promote_coin_record','tab_')->where($map)->select(); $records = []; @@ -2632,6 +2761,7 @@ class DownloadController extends BaseController { array('create_time',"交易时间"), array('status',"交易状态"), ); + $records = recordPromoteLogs('平台币管理','平台币转移导出'); $model = M('promote_coin_transfer_log', 'tab_'); $logs = $model->where($map)->select(); $service = new PromoteCoinTransferLogService(); @@ -2702,7 +2832,7 @@ class DownloadController extends BaseController { array('check_status',"状态"), array('create_time',"创建时间"), ); - + $records = recordPromoteLogs('测试资源','测试资源导出'); $data = M('test_resource','tab_') ->field("tab_test_resource.*,user.check_status") ->join('tab_user user on tab_test_resource.user_id=user.id','left') @@ -2759,6 +2889,7 @@ class DownloadController extends BaseController { array('create_time',"申请时间"), array('verify_time',"审核时间"), ); + $records = recordPromoteLogs('测试资源','测试资源记录导出'); $data=M('test_resource','tab_')->where($map)->order('id desc')->select(); foreach($data as $key => $value) { $data[$key]['user_account'] = $this->encryption($value['user_account']); @@ -2790,6 +2921,7 @@ class DownloadController extends BaseController { array('check_status',"状态"), array('create_time',"创建时间"), ); + $records = recordPromoteLogs('测试资源','扶持号管理导出'); $data = M('test_resource','tab_') ->field('tab_test_resource.id,tab_test_resource.user_id,tab_test_resource.game_name,tab_test_resource.server_name,tab_test_resource.user_account,tab_test_resource.promote_account,tab_test_resource.role_name,tab_test_resource.create_time,device_number,lock_status as check_status') ->join('left join tab_user as user on tab_test_resource.user_id = user.id') @@ -2824,7 +2956,8 @@ class DownloadController extends BaseController { array('historyPayCount','累计付费用户'), array('arpu','ARPU'), array('arppu','ARPPU'), - ); + ); + $records = recordPromoteLogs('数据管理','ARPU统计导出'); $dayList = $params["dayList"]; $arr = explode(',', $params['promote_id'][1]); $params['promote_id'] = $arr; @@ -2877,6 +3010,7 @@ class DownloadController extends BaseController { array('order_status1','订单状态'), array('time','申请时间'), ); + $records = recordPromoteLogs('平台币管理','平台币充值导出'); $model = M('coin_pay_order','tab_'); $data = $model->where($map)->order('id DESC')->select(); foreach ($data as $key => $value) { @@ -3248,6 +3382,7 @@ class DownloadController extends BaseController { array('login_user_num','登陆用户数'), ); + $records = recordPromoteLogs('数据管理','每日概况导出'); if ($this->canViewUserRecharge) { $xlsCell[] = array('spend_user_num','充值人数'); @@ -3392,6 +3527,7 @@ class DownloadController extends BaseController { array('new_create_role_ip_count','新创角ip'), array('login_user_count','登陆用户数'), ); + $records = recordPromoteLogs('数据管理','推广员业绩导出'); if ($this->canViewUserRecharge) { $xlsCell[] = array('recharge_user_count','充值人数'); $xlsCell[] = array('recharge_count','充值次数'); @@ -3534,6 +3670,7 @@ class DownloadController extends BaseController { '推广员账号', ); + $records = recordPromoteLogs('数据管理','充值玩家导出'); $subMap = []; if(!empty($map['game_id'])) { $subMap['game_id'] = $map['game_id']; @@ -3734,6 +3871,7 @@ class DownloadController extends BaseController { '推广员', '付款时间', ); + $records = recordPromoteLogs('数据管理','充值明细导出'); $model = M('spend','tab_'); if(!empty($map['tab_spend.pay_status'])) { $map['tab_spend.pay_status'] = $map['tab_spend.pay_status'] -2 ; diff --git a/Application/Home/Controller/PromoteCoinController.class.php b/Application/Home/Controller/PromoteCoinController.class.php index a9dcc566c..501abb5db 100644 --- a/Application/Home/Controller/PromoteCoinController.class.php +++ b/Application/Home/Controller/PromoteCoinController.class.php @@ -306,6 +306,7 @@ class PromoteCoinController extends BaseController } if ($result['status']) { + recordPromoteLogs('平台币管理','平台币转移'); $this->ajaxReturn(['status' => 1, 'msg' => '转账成功!']); } else { $this->ajaxReturn(['status' => -1, 'msg' => $result['msg']]); diff --git a/Application/Home/Controller/PromoteController.class.php b/Application/Home/Controller/PromoteController.class.php index 08b424fe3..c6ecc94fa 100644 --- a/Application/Home/Controller/PromoteController.class.php +++ b/Application/Home/Controller/PromoteController.class.php @@ -1091,6 +1091,7 @@ class PromoteController extends BaseController $status = $promoteService->addPromote($params, $parent); if ($status) { + recordPromoteLogs('管理中心','添加会员'); $this->ajaxReturn(['status' => 1, 'msg' => '添加成功']); } else { $this->ajaxReturn(['status' => 0, 'msg' => '添加失败']); @@ -1145,6 +1146,7 @@ class PromoteController extends BaseController $promoteService = new PromoteService(); if ($password = $promoteService->resetPassword($promoteId)) { + recordPromoteLogs('管理中心','重置密码'); $this->ajaxReturn(['status' => 1, 'msg' => '重置密码成功', 'data' => ['password' => $password]]); } else { $this->ajaxReturn(['status' => 0, 'msg' => '重置密码失败']); @@ -1159,6 +1161,7 @@ class PromoteController extends BaseController } $promoteService = new PromoteService(); if ($promoteService->froze($promoteId)) { + recordPromoteLogs('管理中心','冻结账号'); $this->ajaxReturn(['status' => 1, 'msg' => '冻结成功']); } else { $this->ajaxReturn(['status' => 0, 'msg' => '冻结失败']); @@ -1173,6 +1176,7 @@ class PromoteController extends BaseController } $promoteService = new PromoteService(); if ($promoteService->unfreeze($promoteId)) { + recordPromoteLogs('管理中心','解冻账号'); $this->ajaxReturn(['status' => 1, 'msg' => '解冻成功']); } else { $this->ajaxReturn(['status' => 0, 'msg' => '解冻失败']); @@ -1271,6 +1275,7 @@ class PromoteController extends BaseController $res = $user->edit($_POST); if ($res !== false) { + recordPromoteLogs('管理中心','修改管理成员'); $this->success("子账号修改成功", U('Promote/children')); } else { $this->error("修改子账号失败"); @@ -1311,6 +1316,7 @@ class PromoteController extends BaseController $res = M("promote", "tab_")->where($map)->save($se); if ($res !== false) { + recordPromoteLogs('管理中心','修改管理成员'); $this->success("修改成功", U('Promote/edit_chlid', array('id' => $id, 'type' => $type))); } else { $this->error('修改失败', U('Promote/edit_chlid', array('id' => $id, 'type' => $type))); @@ -2038,6 +2044,7 @@ class PromoteController extends BaseController $promoteId = $_POST['promote_id']; $applyService = new ApplyService(); $applyService->cancelGame($gameId, $promoteId); + recordPromoteLogs('游戏管理','专服管理下架游戏'); $this->ajaxReturn(['status' => true, 'msg' => '下架成功']); } diff --git a/Application/Home/Controller/SafeController.class.php b/Application/Home/Controller/SafeController.class.php index b3cc2d263..db530113d 100644 --- a/Application/Home/Controller/SafeController.class.php +++ b/Application/Home/Controller/SafeController.class.php @@ -48,6 +48,7 @@ class SafeController extends BaseController{ $id = get_pid(); $updateRs = M("promote","tab_")->where(['id'=>$id])->save($data); if($updateRs) { + recordPromoteLogs('安全管理','设置安全密码'); $this->success("安全密码设置成功"); } } @@ -146,6 +147,7 @@ class SafeController extends BaseController{ $data['password'] = $this->think_ucenter_md5($newpwd, UC_AUTH_KEY); $updateRs = M('promote','tab_')->where(['id'=>$id])->save($data); if($updateRs) { + recordPromoteLogs('安全管理','修改登陆密码'); $this->success("修改成功"); }else { $this->error("修改失败"); @@ -286,6 +288,7 @@ class SafeController extends BaseController{ $updateRs = M("promote","tab_")->where(['id'=>$id])->save($data); if($updateRs) { + recordPromoteLogs('安全管理','修改用户信息'); $this->success("更新信息成功"); }else { $this->error("更新信息失败"); @@ -424,6 +427,7 @@ class SafeController extends BaseController{ $id = get_pid(); $updateRs = M("promote","tab_")->where(['id'=>$id])->save($data); if($updateRs) { + recordPromoteLogs('安全管理','二次修改信息'); $this->success("更新信息成功",U('modifyBaseInfo')); }else { $this->error("更新信息失败"); @@ -487,4 +491,72 @@ class SafeController extends BaseController{ $this->assign('phone',$phone); $this->display(); } + + public function promoteLogs() { + $page = intval(I('p', 1)); + $row = intval(I('row', 10)); + $user_account = I('user_account'); + $action_type = I('action_type'); + $begTime = strtotime(I('begtime')); + $endTime = strtotime(I('endtime')); + $id = get_pid(); + + $loginPromote = $this->getLoginPromote(); + $map1['chain'] = ['like', $loginPromote['chain'] . $loginPromote['id'] . '/%']; + $ids = M('promote', 'tab_')->where($map1)->getField('id', true); + $ids[] = $loginPromote['id']; + $map = []; + $map['promote_id'] = ['in', $ids]; + if (!empty($user_account)) { + $map['promote'] = ['like','%'.$user_account.'%']; + } + if (!empty($action_type)) { + $map['action_type'] = ['like','%'.$action_type.'%']; + } + + if (!empty($begTime) && !empty($endTime)) { + $map['create_time'] = ['between', [$begTime, $endTime + 24*3600 - 1]]; + }else if (empty($begTime) && !empty($endTime)) { + $map['create_time'] = ['elt',$endTime + 24*3600]; + }else if (!empty($begTime) && empty($endTime)) { + $map['create_time'] = ['EGT',$begTime + 24*3600]; + } + $page = intval(I('get.p', 1)); + $page = $page ? $page : 1; //默认显示第一页数据arraypage + $rs = M('promote_action_logs','tab_')->where($map)->order('create_time') + ->page($page, $row)->select(); + foreach($rs as $key => $v) { + $rs[$key]['create_time'] = date('Y-m-d H:i:s',$v['create_time']); + + } + $count = M('promote_action_logs', 'tab_') + ->field('id') + ->where($map) + ->select(); + $count = count($count); + + //分页 + $parameter['p'] = $page; + $parameter['row'] = $row; + $parameter['begtime'] = I('begtime'); + $parameter['endtime'] = I('endtime'); + $parameter['user_account'] = $user_account; + $parameter['action_type'] = $action_type; + $page = set_pagination($count, $row, $parameter); + if ($page) { + $this->assign('_page', $page); + } + $this->assign('listData',$rs); + $this->assign('initBegTime', I('begtime')); + $this->assign('initEndTime', I('endtime')); + $this->display(); + } + + public function deletePromoteLogs() { + $id = $_REQUEST['id']; + $rs = M('promote_action_logs','tab_')->where(['id'=>$id])->delete(); + if($rs) { + $this->ajaxReturn(['code'=>0000,'mes'=>'删除成功']); + } + } } \ No newline at end of file diff --git a/Application/Home/Controller/SupportController.class.php b/Application/Home/Controller/SupportController.class.php index a719b33ff..bb31209f6 100644 --- a/Application/Home/Controller/SupportController.class.php +++ b/Application/Home/Controller/SupportController.class.php @@ -322,6 +322,7 @@ class SupportController extends BaseController { $data['status']=C('SUPPORT_AUTO_AUDIT')==1?2:1; $model = M('support','tab_')->add($data); if($model){ + recordPromoteLogs('测试资源','新增扶持号'); session('apply_status',1); } if(C('SUPPORT_AUTO_AUDIT')==1){ //自动审核开启,请求cp发放扶持 diff --git a/Application/Home/Controller/TestResourceController.class.php b/Application/Home/Controller/TestResourceController.class.php index 2febe1a97..4102ed564 100644 --- a/Application/Home/Controller/TestResourceController.class.php +++ b/Application/Home/Controller/TestResourceController.class.php @@ -606,6 +606,7 @@ class TestResourceController extends BaseController } } M('test_resource','tab_')->commit(); //提交事物 + recordPromoteLogs('测试资源','批量申请'); $this->ajaxReturn(['status'=>1,'msg'=>'申请成功']); } public function lists( $p = 1){ diff --git a/Application/Home/View/default/Public/promote_base.html b/Application/Home/View/default/Public/promote_base.html index 1c44f3efa..287c3590e 100644 --- a/Application/Home/View/default/Public/promote_base.html +++ b/Application/Home/View/default/Public/promote_base.html @@ -107,6 +107,7 @@ 用户基本信息 + 操作日志