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..9bca36c1e 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 
@@ -1964,12 +2015,12 @@ class DownloadController extends BaseController {
       */
      public function export() {             //开始导出
          $id = $_REQUEST['lid'];
-         $dataname = $_REQUEST['dname'];
-         $downloadStatus = M('downloadlog','tab_')->where(['id'=>$id])->field('status')->select();
+         $downloadStatus = M('downloadlog','tab_')->where(['id'=>$id])->field('dataname,status,conditions')->select();
          if($downloadStatus[0]['status'] == 1) {
              $this->error("该数据已下载请重新添加",U('listsIndex'));
          }
-         $conditions = $_REQUEST['conditions'];
+         $dataname = $downloadStatus[0]['dataname'];
+         $conditions = $downloadStatus[0]['conditions'];
          $map = array();
          foreach (json_decode($conditions,FALSE) as $key => $value) {
             if($value !== 0 && $value !== "" ) {
@@ -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'];
@@ -2228,7 +2351,7 @@ class DownloadController extends BaseController {
             fputcsv($fp, $xlsCell);//将数据格式化为CSV格式并写入到output流中
             $accessNum = '100000';//从数据库获取总量,假设是十万
             $accessNum = count($data1)?:0 ;
-    
+            var_dump($data1);die();
             $perSize = 5000;//每次查询的条数
             $pages   = ceil($accessNum / $perSize);
             for($i = 1; $i <= $pages; $i++) {
@@ -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 d7d9e865e..e6dc2f37f 100644
--- a/Application/Home/Controller/TestResourceController.class.php
+++ b/Application/Home/Controller/TestResourceController.class.php
@@ -610,6 +610,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/Download/listsIndex.html b/Application/Home/View/default/Download/listsIndex.html
index 4580da579..3b626d6f6 100644
--- a/Application/Home/View/default/Download/listsIndex.html
+++ b/Application/Home/View/default/Download/listsIndex.html
@@ -179,10 +179,8 @@
                         <td>
                             <if condition="$vo['status'] eq 0">
                              <form action="{:U('download/export')}" method="post" id="downloadForm">
-                                <input type="hidden" name="conditions" value='{$vo["conditions"]}'/>
-                                <input type="hidden" name="lid" value="{$vo['id']}"/>
-                                <input type="hidden" name="dname" value="{$vo['dataname']}"/>
-                                <a  style="cursor: pointer" onclick="reload()" target="_blank" class="chakan"><span>可下载</span></a>
+                                <input type="hidden" name="lid" value=""/>
+                                <a  style="cursor: pointer" onclick="reload('{$vo.id}')" target="_blank" class="chakan"><span>可下载</span></a>
                               </form>
                             <else /> <a href="javascript:;"  class="current"><span style="color:#9D9D9D">已下载</span></a>
                            </if> 
@@ -283,7 +281,8 @@
       });
   </script>
   <script>
-      function reload() {
+      function reload(id) {
+            $('input[name=lid]').val(id);
             document.getElementById('downloadForm').submit()
             setTimeout(function(){ window.location.reload(); }, 7000);
         }  
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 @@
 			<?php if ($loginer['level'] == 1) :?>
 			<a href="{:U('Safe/modifyBaseInfo')}" class="<if condition='CONTROLLER_NAME eq Safe and (ACTION_NAME eq modifyBaseInfo or ACTION_NAME eq my_game or ACTION_NAME eq my_game_ch or ACTION_NAME eq child_game ) '>active</if> ">用户基本信息</a>
 			<?php endif;?>
+			<a href="{:U('Safe/promoteLogs')}" class="<if condition='CONTROLLER_NAME eq Safe and (ACTION_NAME eq promoteLogs or ACTION_NAME eq promoteLogs or ACTION_NAME eq promoteLogs or ACTION_NAME eq promoteLogs ) '>active</if> ">操作日志</a>
 		</div>
 		<div class="subNav jssubNav"><i class="prev_icon icon_fenbao"></i><span>测试资源</span><i class="arrow_icon"></i></div>
 		<div class="navContent jsnavContent">
diff --git a/Application/Home/View/default/Safe/promoteLogs.html b/Application/Home/View/default/Safe/promoteLogs.html
new file mode 100644
index 000000000..8ab4736de
--- /dev/null
+++ b/Application/Home/View/default/Safe/promoteLogs.html
@@ -0,0 +1,327 @@
+<extend name="Public/promote_base"/>
+<block name="css">
+  <link href="__CSS__/20180207/data.css" rel="stylesheet">
+  <link href="__CSS__/20180207/manager.css" rel="stylesheet">
+  <link href="__CSS__/20180207/finance.css" rel="stylesheet">
+  <link href="__STATIC__/icons_alibaba/iconfont.css?v=1.2" rel="stylesheet">
+</block>
+
+<block name="body">
+  <style>
+    @media screen and (max-width: 1500px) {
+      .normal_form {
+        padding-top: 45px;
+      }
+
+      .trunk-search .normal_txt {
+        width: 100px
+      }
+
+      .select2-container--default .select2-selection--single {
+        width: 125px;
+      }
+
+      .trunk-search .select-time .txt {
+        width: 100px;
+      }
+
+      .form-group .submit {
+        width: 55px;
+      }
+    }
+
+    .normal_space {
+      margin-left: 0;
+      margin-right: 10px;
+      margin-bottom: 10px;
+    }
+
+    .selected-color {
+      color: #2bd8ed;
+    }
+
+    .pointer-hand {
+      cursor: pointer;
+    }
+
+    .icon-spend {
+      position: relative;
+      font-size: 1.2rem;
+      top: 3px;
+      float: right;
+      right: 10px;
+    }
+
+    .form-group {
+      float: left;
+      margin-bottom: 10px;
+    }
+    .form-group label {
+      line-height: 34px;
+      height: 34px;
+    }
+    .form-group .txt {
+      width: 180px;
+      height: 34px;
+    }
+  </style>
+  <div class="page-search normal_list query-recharge-search jssearch">
+    <div class="trunk-title">
+      <div class="location">
+        <div class="location-container">当前位置:<span>安全管理></span><span>操作日志</span></div>
+      </div>
+      <img src="__IMG__/20180207/icon_chongzhi.png">
+      <span class="title_main">说明</span>
+      <span class="details">工作人员在推广平台内的操作日志</span>
+    </div>
+    <div class="trunk-content article">
+      <div class="trunk-search clearfix">
+ 
+
+
+        <div class="form-group normal_space">
+          <input type="text" name="user_account" class="txt normal_txt" placeholder="操作人"
+                 value="{:I('user_account')}">
+        </div>
+
+        <div class="form-group normal_space">
+          <input type="text" name="action_type" class="txt normal_txt" id="uid" placeholder="操作类型"
+                 value="{:I('action_type')}">
+        </div>
+
+
+        <div class="form-group normal_space">
+          <label class="form-title select-title" style="position: relative;">起止时间:</label>
+          <div class="select-time">
+            <input type="text" readonly id="sdate" class="txt" name="begtime" placeholder="开始时间" value="{$initBegTime}">
+          </div>
+          <label class="form-title select-title zhi_color">&nbsp;—&nbsp;</label>
+          <div class="select-time">
+            <input type="text" readonly id="edate" class="txt" name="endtime" placeholder="结束时间" value="{$initEndTime}">
+          </div>
+        </div>
+
+
+
+        <div class="form-group normal_space">
+          <input type="submit" class="submit" id='submit' url="{:U('Safe/promoteLogs','model='.$model['name'],false)}"
+                 value="查询">
+        </div>
+
+        <!-- <input type="hidden" name="version" value="{:I('version',1)}"> -->
+<!--        </form>-->
+      </div>
+    </div>
+    <div class="page-list apply-app_apply-list query-recharge-list">
+      <div class="trunk-content article">
+
+        <div class="tabcon trunk-list">
+          <table class="table normal_table">
+            <tr class="odd">
+              <th>编号</th>
+              <th>位置</th>
+              <th>类型</th>
+              <th>操作人</th>
+              <th>时间</th>
+              <th>IP地址</th>
+            </tr>
+            <empty name="listData">
+              <tr class="num2">
+                <td colspan="10" style="text-align: center;height: 45vh;">
+                  <img src="__IMG__/20180207/icon_wushujv2.png"/>
+                  <p style="line-height: 40px;color: #A5A5A5;">暂无数据</p>
+                </td>
+              </tr>
+              <else/>
+              <volist name="listData" id="vo">
+                <tr class="num2">
+                  <td>{$vo.id}</td>
+                  <td>{$vo.module}</td>
+                  <td>{$vo.action_type}</td>
+                  <td>{$vo.promote}</td>
+                  <td>{$vo.create_time}</td>
+                  <td>{$vo.ip}</td>
+                </tr>
+              </volist>
+            </empty>
+          </table>
+        </div>
+        <div class="pagenation clearfix">
+            <?php if ($loginer['level'] !== 4) :?>
+           <a id="sch-btn" data-href="{:U('download/promotelogs_data_export',array_merge(['xlsname'=>'ceshi'],I('get.')))}" class="ajax-get">导出</a>
+           <?php endif ;?>
+          {$_page}
+        </div>
+      </div>
+    </div>
+  </div>
+</block>
+<block name="script">
+  <link href="__STATIC__/datetimepicker/css/datetimepicker.css" rel="stylesheet" type="text/css">
+  <link href="__STATIC__/datetimepicker/css/dropdown.css" rel="stylesheet" type="text/css">
+  <script type="text/javascript" src="__STATIC__/datetimepicker/js/bootstrap-datetimepicker.min.js"></script>
+  <script type="text/javascript" src="__STATIC__/datetimepicker/js/locales/bootstrap-datetimepicker.zh-CN.js"
+          charset="UTF-8"></script>
+  <script type="text/javascript" src="__JS__/20170831/select2.min.js"></script>
+  <script src="__STATIC__/layer/layer.js"></script>
+
+  <script type="text/javascript" src="__JS__/common.js"></script>
+  <script>
+
+
+  function deleteLogs(id) {
+    layer.confirm('是否确认删除日志?', {icon: 3, title:'提示'}, function(index){
+        $.ajax({
+          url: "{:U('Safe/deletePormoteLogs')}",
+          data: {id: id},
+          type: 'post',
+          dataType: 'json',
+          success: function(response) {
+            layer.msg(response.msg, {time: 1000}, function() {
+              window.location.href = window.location.href
+            })
+          }
+        })
+      })
+  }
+  </script>
+  <script type="text/javascript">
+  
+      var promoteUrl = "{:U('Query/getSubPromotes')}"
+      initPromoteSelect(promoteUrl)
+      $().ready(function () {
+          setValue('relation_game_id', {$Think.request.relation_game_id |default = '""'});
+          setValue('sdk_version', {$Think.request.sdk_version |default = '""'});
+          setValue('server_id', {$Think.request.server_id |default = '""'});
+          setValue('row', '{:I("get.row",10)}');
+
+          var date = "{$setdate}";
+          $('#sdate').datetimepicker({
+              format: 'yyyy-mm-dd',
+              language: "zh-CN",
+              minView: 2,
+              autoclose: true,
+              scrollMonth: false,
+              scrollTime: false,
+              scrollInput: false,
+              endDate: date
+          });
+
+          $('#edate').datetimepicker({
+              format: 'yyyy-mm-dd',
+              language: "zh-CN",
+              minView: 2,
+              autoclose: true,
+              pickerPosition: 'bottom-left',
+              scrollMonth: false,
+              scrollTime: false,
+              scrollInput: false,
+              endDate: date
+          });
+
+          function showPromoteSelect(html)
+          {
+              $("#promote_id").empty();
+              $('#promote_id').html(html);
+              $("#promote_id").select2();
+          }
+
+          $('#own').on('click',function () {
+              var own = $('#own_id');
+              var checkBox = $(this).children('i');
+
+              if (own.is(':checked')) {
+                  checkBox.removeClass('iconfangxingxuanzhongfill');
+                  checkBox.removeClass('selected-color');
+                  checkBox.addClass('iconfangxingweixuanzhong');
+
+                  own.prop('checked', false);
+              } else {
+                  checkBox.removeClass('iconfangxingweixuanzhong');
+                  checkBox.addClass('iconfangxingxuanzhongfill');
+                  checkBox.addClass('selected-color');
+
+                  own.prop('checked', true);
+              }
+          });
+
+          $('#relation_game_id').change(function () {
+              var relationGameId = $(this).val();
+              var sdkVersion = $('#sdk_version').val();
+
+              getServerList(relationGameId, sdkVersion);
+          });
+
+          $('#sdk_version').change(function () {
+              var sdkVersion = $(this).val();
+              var relationGameId = $('#relation_game_id').val();
+
+              if (relationGameId > 0) {
+                  getServerList(relationGameId, sdkVersion);
+              }
+          });
+
+          function getServerList(relationGameId, sdkVersion)
+          {
+              $.ajax({
+                  url: "{:U('getServerAjax')}",
+                  type: "post",
+                  data: {relation_game_id: relationGameId,sdk_version:sdkVersion},
+                  dataType: 'json',
+                  success: function (data) {
+                      var html = "<option value='' selected>请选择区服</option>";
+
+                      if (data.status == 1) {
+                          var serverData = data.data;
+
+                          if (serverData.length > 0) {
+                              for (var i in serverData) {
+                                  html += "<option value='" + serverData[i]['server_id'] + "'>" + serverData[i]['server_name'] + "</option>";
+                              }
+                          }
+                      }
+
+                      $("#server_id").empty();
+                      $('#server_id').html(html);
+                      $("#server_id").select2();
+                  }
+              })
+          }
+
+          $("#pagehtml a").on("click", function (event) {
+              event.preventDefault();//使a自带的方法失效,即无法调整到href中的URL(http://www.baidu.com)
+              var geturl = $(this).attr('href');
+              $('#data_form').attr('action', geturl);
+              $('#data_form').submit();
+          });
+
+          $('#submit').click(function () {
+              var sdate = Date.parse($('#sdate').val()) / 1000;
+              var edate = Date.parse($('#edate').val()) / 1000;
+              if (sdate > edate) {
+                  layer.msg('开始时间必须小于等于结束时间');
+                  return false;
+              }
+              if ((edate - sdate) > 2592000) {
+                  layer.msg('时间间隔不能超过31天,请重新选择日期');
+                  return false;
+              }
+
+              var url = $(this).attr('url');
+              var query = $('.jssearch').find('input').serialize();
+              query += "&" + $('.jssearch').find('select').serialize();
+              query = query.replace(/(&|^)(\w*?\d*?\-*?_*?)*?=?((?=&)|(?=$))/g, '');
+              query = query.replace(/^&/g, '');
+              if (url.indexOf('?') > 0) {
+                  url += '&' + query;
+              } else {
+                  url += '?' + query;
+              }
+              window.location.href = url;
+
+          });
+
+          $(".select_gallery").select2();
+      });
+  </script>
+</block>
diff --git a/Data/update.sql b/Data/update.sql
index 51bebf63a..9e79728f9 100644
--- a/Data/update.sql
+++ b/Data/update.sql
@@ -1379,3 +1379,15 @@ CREATE TABLE `tab_resource_verify_config` (
 ) ENGINE=InnoDB AUTO_INCREMENT=28 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='资源审核配置';
 
 ALTER TABLE tab_test_resource ADD COLUMN `is_new` tinyint(1) DEFAULT '0' COMMENT '0-未知;1-新用户;2-非新用户';
+
+--2020-2-27 sunke--
+CREATE TABLE `tab_promote_action_logs` (
+	`id` INT(11) NOT NULL AUTO_INCREMENT,
+	`action_type` CHAR(254) NOT NULL DEFAULT '' COMMENT '操作类型',
+	`module` CHAR(254) NOT NULL DEFAULT '' COMMENT '所属模块',
+	`promote` CHAR(254) NOT NULL DEFAULT '' COMMENT '操作人',
+	`promote_id` INT(11) NOT NULL DEFAULT '0',
+	`ip` VARCHAR(254) NOT NULL DEFAULT '0' COMMENT 'ip',
+	`create_time` CHAR(254) NOT NULL DEFAULT '' COMMENT '创建时间',
+	PRIMARY KEY (`id`)
+) COMMENT='推广员操作日志' COLLATE='utf8mb4_bin';