Merge branch 'feature/add_opertion_log' of wmtx/platform into release

管理后台日志唯一键值bug修改
master
廖金灵 5 years ago committed by Gogs
commit be993a3a76

@ -2221,7 +2221,6 @@ function a_array_unique($array){
*/
function addOperationLog($options)
{
return;
$checkarr = ['op_type','url','key'];
foreach ($checkarr as $v) {
if(!array_key_exists($v,$options)){

@ -274,7 +274,7 @@ class ApplyController extends ThinkController
foreach ($data as $key => $value) {
addOperationLog(['op_type'=>1,'key'=>$value['game_name'].$value['promote_account'],'op_name'=>'审核游戏分包','url'=>U('Apply/and_lists'),'menu'=>'推广员-推广员管理-游戏分包-审核游戏分包']);
addOperationLog(['op_type'=>1,'key'=>$value['promote_account'].'/'.$value['game_name'],'op_name'=>'审核游戏分包','url'=>U('Apply/and_lists'),'menu'=>'推广员-推广员管理-游戏分包-审核游戏分包']);
}
@ -455,7 +455,7 @@ class ApplyController extends ThinkController
foreach ($data as $key => $value) {
addOperationLog(['op_type'=>1,'key'=>$value['game_name'].$value['promote_account'],'op_name'=>'审核游戏分包','url'=>U('Apply/and_lists'),'menu'=>'推广员-推广员管理-游戏分包-审核游戏分包']);
addOperationLog(['op_type'=>1,'key'=>$value['promote_account'].'/'.$value['game_name'],'op_name'=>'审核游戏分包','url'=>U('Apply/and_lists'),'menu'=>'推广员-推广员管理-游戏分包-删除游戏分包']);
}
@ -493,7 +493,7 @@ class ApplyController extends ThinkController
foreach ($data as $key => $value) {
addOperationLog(['op_type'=>1,'key'=>$value['game_name'].$value['promote_account'],'op_name'=>'打包游戏分包','url'=>U('Apply/and_lists'),'menu'=>'推广员-推广员管理-游戏分包-打包游戏分包']);
addOperationLog(['op_type'=>1,'key'=>$value['promote_account'].'/'.$value['game_name'],'op_name'=>'打包游戏分包','url'=>U('Apply/and_lists'),'menu'=>'推广员-推广员管理-游戏分包-打包游戏分包']);
}
@ -550,7 +550,7 @@ class ApplyController extends ThinkController
foreach ($data as $key => $value) {
addOperationLog(['op_type'=>1,'key'=>$value['game_name'].$value['promote_account'],'op_name'=>'打包游戏分包','url'=>U('Apply/and_lists'),'menu'=>'推广员-推广员管理-游戏分包-打包游戏分包']);
addOperationLog(['op_type'=>1,'key'=>$value['game_name'].'/'.$value['promote_account'],'op_name'=>'打包游戏分包','url'=>U('Apply/and_lists'),'menu'=>'推广员-推广员管理-游戏分包-打包游戏分包']);
}

@ -146,12 +146,20 @@ class MendController extends ThinkController {
if(!empty($create['remark'])){
$params['remark'] = $create['remark'];
}
// dump($create);die();
$res = $promoteService->addShiftTask($params);
if($res['status']){
$userData = M('user','tab_')->field('account')->where(['id'=>$create['user_id']])->find();
$promoteToData = M('promote','tab_')->field('account')->where(['id'=>$create['prmoote_id_to']])->find();
$promoteFromData = M('promote','tab_')->field('account')->where(['id'=>$create['promote_id']])->find();
if ($create['promote_id'] == '0') {
$promoteFromData['account'] = '官方渠道';
}
addOperationLog(['op_type'=>1,'key'=>$userData['account'],'op_name'=>'编辑推广补链','url'=>U('Mend/edit',['id'=>$create['user_id']]),'menu'=>'推广员-推广员管理-推广补链-编辑推广补链']);
addOperationLog(['op_type'=>1,'key'=>$userData['account'].'/'.$promoteFromData['account'].'/'.$promoteToData['account'],'op_name'=>'编辑推广补链','url'=>U('Mend/edit',['id'=>$create['user_id']]),'menu'=>'推广员-推广员管理-推广补链-编辑推广补链']);
$this->success('补链成功', U('lists'), 2);
}else{

@ -236,7 +236,7 @@ class PresidentDepositController extends ThinkController
$data['update_time'] = time();
M('president_deposit', 'tab_')->add($data);
addOperationLog(['op_type'=>0,'key'=>$promoteData['account'].$amount,'op_name'=>'新增会长押金','url'=>U('PresidentDeposit/edit',['id'=>$promoteId]),'menu'=>'推广员-结算单管理-奖罚记录管理-新增会长押金']);
addOperationLog(['op_type'=>0,'key'=>$promoteData['account'].'/'.$amount,'op_name'=>'新增会长押金','url'=>U('PresidentDeposit/edit',['id'=>$promoteId]),'menu'=>'推广员-结算单管理-奖罚记录管理-新增会长押金']);
return $this->success('保存成功', U('PresidentDeposit/records'));
}
@ -271,7 +271,7 @@ class PresidentDepositController extends ThinkController
$data['update_time'] = time();
M('president_deposit', 'tab_')->where(['promote_id' => $promoteId])->save($data);
addOperationLog(['op_type'=>1,'key'=>$promoteData['account'].$amount,'op_name'=>'编辑会长押金','url'=>U('PresidentDeposit/edit',['id'=>$promoteId]),'menu'=>'推广员-结算单管理-会长押金管理-编辑会长押金']);
addOperationLog(['op_type'=>1,'key'=>$promoteData['account'].'/'.$amount,'op_name'=>'编辑会长押金','url'=>U('PresidentDeposit/edit',['id'=>$promoteId]),'menu'=>'推广员-结算单管理-会长押金管理-编辑会长押金']);
return $this->success('保存成功');
}
@ -352,7 +352,7 @@ class PresidentDepositController extends ThinkController
foreach ($promoteData as $key => $value) {
if ($value['amount']) {
addOperationLog(['op_type'=>1,'key'=>$value['account'].$value['amount'],'op_name'=>'编辑押金已退款','url'=>U('PresidentDeposit/records'),'menu'=>'推广员-结算单管理-会长押金管理-押金已退款']);
addOperationLog(['op_type'=>1,'key'=>$value['account'].'/'.$value['amount'],'op_name'=>'编辑押金已退款','url'=>U('PresidentDeposit/records'),'menu'=>'推广员-结算单管理-会长押金管理-押金已退款']);
}
}
@ -402,7 +402,7 @@ class PresidentDepositController extends ThinkController
foreach ($promoteData as $key => $value) {
if ($value['amount']) {
addOperationLog(['op_type'=>1,'key'=>$value['account'].$value['amount'],'op_name'=>'编辑确认押金到账','url'=>U('PresidentDeposit/records'),'menu'=>'推广员-结算单管理-会长押金管理-确认押金到账']);
addOperationLog(['op_type'=>1,'key'=>$value['account'].'/'.$value['amount'],'op_name'=>'编辑确认押金到账','url'=>U('PresidentDeposit/records'),'menu'=>'推广员-结算单管理-会长押金管理-确认押金到账']);
}
}

@ -388,7 +388,7 @@ class PromoteController extends ThinkController
}
addOperationLog(['op_type'=>1,
'key'=>$data['account'].$data['password'].$data['second_pwd'].$data['status'].$data['child_game_permission'].$data['mark1'].$data['mark2'],
'key'=>$data['account'],
'op_name'=>'编辑推广员',
'url'=>U('Promote/edit',['id'=>$_POST['id']]),
'menu'=>'推广员-推广员管理-推广员列表-编辑推广员']);

@ -206,7 +206,7 @@ class PromoteGameRatioController extends ThinkController
$GetData = $_GET;
unset($GetData['export']);
addOperationLog(['op_type'=>3,'key'=>getNowDate(),'op_name'=>'导出公会分成管理','url'=>U('PromoteGameRatio/lists',$GetData),'menu'=>'统计-结算管理-公会分成管理']);
addOperationLog(['op_type'=>3,'key'=>getNowDate(),'op_name'=>'导出公会分成管理','url'=>U('PromoteGameRatio/lists',$GetData),'menu'=>'统计-结算管理-公会分成管理-导出数据']);
data2csv($records,$csvTitle, $field);
exit;
@ -337,7 +337,7 @@ class PromoteGameRatioController extends ThinkController
}
}
addOperationLog(['op_type'=>1,'key'=>getPromoteName($promoteGameRatio['promote_id']).getrelationGameName($promoteGameRatio['game_id']),'op_name'=>'修改游戏分成比例申请','url'=>U('PromoteGameRatio/applyRatio',['id'=>$promoteGameRatio['id']]),'menu'=>'推广员-结算单管理-公会分成管理']);
addOperationLog(['op_type'=>1,'key'=>getPromoteName($promoteGameRatio['promote_id']).'/'.getrelationGameName($promoteGameRatio['game_id']),'op_name'=>'修改游戏分成比例申请','url'=>U('PromoteGameRatio/applyRatio',['id'=>$promoteGameRatio['id']]),'menu'=>'推广员-结算单管理-公会分成管理']);
} else {//新增
if (empty($params['promote_id'])) {
@ -392,7 +392,7 @@ class PromoteGameRatioController extends ThinkController
}
M()->commit();
addOperationLog(['op_type'=>0,'key'=>getPromoteName($promoteId).getrelationGameName($relationGameId),'op_name'=>'生成游戏分成比例申请','url'=>U('PromoteGameRatio/lists'),'menu'=>'推广员-结算单管理-公会分成管理-生成游戏分成比例申请']);
addOperationLog(['op_type'=>0,'key'=>getPromoteName($promoteId).'/'.getrelationGameName($relationGameId),'op_name'=>'生成游戏分成比例申请','url'=>U('PromoteGameRatio/lists'),'menu'=>'推广员-结算单管理-公会分成管理-生成游戏分成比例申请']);
}
@ -541,10 +541,10 @@ class PromoteGameRatioController extends ThinkController
$spendSave['selle_ratio'] = $promoteGameRatio['ratio'];
M('spend', 'tab_')->where($spendMap)->save($spendSave);
addOperationLog(['op_type'=>1,'key'=>getPromoteName($promoteGameRatio['promote_id']).getrelationGameName($promoteGameRatio['relation_game_id']),'op_name'=>'审核游戏分成比例订单','url'=>U('PromoteGameRatio/lists'),'menu'=>'推广员-结算单管理-公会分成管理-审核通过']);
addOperationLog(['op_type'=>1,'key'=>getPromoteName($promoteGameRatio['promote_id']).'/'.getrelationGameName($promoteGameRatio['relation_game_id']),'op_name'=>'审核游戏分成比例订单','url'=>U('PromoteGameRatio/lists'),'menu'=>'推广员-结算单管理-公会分成管理-审核通过']);
}
} else {
addOperationLog(['op_type'=>1,'key'=>getPromoteName($promoteGameRatio['promote_id']).getrelationGameName($promoteGameRatio['relation_game_id']),'op_name'=>'审核游戏分成比例订单','url'=>U('PromoteGameRatio/lists'),'menu'=>'推广员-结算单管理-公会分成管理-审核拒绝']);
addOperationLog(['op_type'=>1,'key'=>getPromoteName($promoteGameRatio['promote_id']).'/'.getrelationGameName($promoteGameRatio['relation_game_id']),'op_name'=>'审核游戏分成比例订单','url'=>U('PromoteGameRatio/lists'),'menu'=>'推广员-结算单管理-公会分成管理-审核拒绝']);
}
}

@ -398,7 +398,7 @@ class SettlementController extends ThinkController
$GetData = $_POST;
addOperationLog(['op_type'=>0,'key'=>getNowDate(),'op_name'=>'生成汇总结算单','url'=>U('settlement/generateSettlementSheet',$GetData),'menu'=>'推广员-结算单管理-生成汇总结算单']);
addOperationLog(['op_type'=>0,'key'=>$data['orderid'],'op_name'=>'生成汇总结算单','url'=>U('settlement/generateSettlementSheet',$GetData),'menu'=>'推广员-结算单管理-生成汇总结算单']);
return $res ? $this->success('生成成功', true, true) : $this->error('生成失败', true, true);
}

@ -55,12 +55,13 @@ class StatementController extends ThinkController
{
if(!isset($_REQUEST['id'])) $this->error("参数错误");
$id = $_REQUEST['id'];
$statementData = M('statement','tab_')->where(['id'=>$id])->find();
$res = M("statement","tab_")->where("id = '{$id}'")->delete();
if($res !== false){
$statementData = M('statement','tab_')->where(['id'=>$id])->find();
addOperationLog(['op_type'=>2,'key'=>$statementData['company_name'].date('YmdHis',$statementData['statement_begin_time']).date('YmdHis',$statementData['statement_end_time']),'op_name'=>'删除上游对账单','url'=>U('StatementMangement/lists'),'menu'=>'推广员-结算管理-结算单管理-删除上游对账单']);
addOperationLog(['op_type'=>2,'key'=>$statementData['company_name'].'/'.date('YmdHis',$statementData['statement_begin_time']).'/'.date('YmdHis',$statementData['statement_end_time']),'op_name'=>'删除上游对账单','url'=>U('StatementMangement/lists'),'menu'=>'推广员-结算管理-结算单管理-删除上游对账单']);
$this->ajaxReturn(array("success"=>"ok","code"=>0));
}else{
@ -325,12 +326,12 @@ class StatementController extends ThinkController
);
if($id == 0){
// var_dump(1);die();
addOperationLog(['op_type'=>0,'key'=>$company['partner'].getNowDate(),'op_name'=>'新增上游对账单','url'=>U('StatementMangement/lists'),'menu'=>'推广员-结算管理-结算单管理-新增上游对账单']);
addOperationLog(['op_type'=>0,'key'=>$company['partner'].'/'.getNowDate(),'op_name'=>'新增上游对账单','url'=>U('StatementMangement/lists'),'menu'=>'推广员-结算管理-结算单管理-新增上游对账单']);
$res = M("statement","tab_")->add($adddata);
}else{
addOperationLog(['op_type'=>1,'key'=>$company['partner'].getNowDate(),'op_name'=>'编辑上游对账单','url'=>U('StatementMangement/lists'),'menu'=>'推广员-结算管理-结算单管理-编辑上游对账单']);
addOperationLog(['op_type'=>1,'key'=>$company['partner'].'/'.getNowDate(),'op_name'=>'编辑上游对账单','url'=>U('StatementMangement/lists'),'menu'=>'推广员-结算管理-结算单管理-编辑上游对账单']);
$res = M("statement","tab_")->where("id = '{$id}'")->save($adddata);
}

@ -157,7 +157,7 @@ class StatementMangementController extends ThinkController
if (!(M('statement','tab_')->where(['ext_field'=>$_REQUEST['ext_field']])->find())) {
addOperationLog(['op_type'=>0,'key'=>$second_party_info['partner'].getNowDate(),'op_name'=>'新增下游对账单','url'=>U('StatementMangement/lists'),'menu'=>'推广员-结算管理-结算单管理-新增下游对账单']);
addOperationLog(['op_type'=>0,'key'=>$second_party_info['partner'].'/'.getNowDate(),'op_name'=>'新增下游对账单','url'=>U('StatementMangement/lists'),'menu'=>'推广员-结算管理-结算单管理-新增下游对账单']);
M('statement','tab_')->add($insert);
$this->ajaxReturn(['code'=>1, 'msg'=>'生成结算单成功']);
@ -216,7 +216,7 @@ class StatementMangementController extends ThinkController
if ((M('statement','tab_')->where(['ext_field'=>$_REQUEST['ext_field']])->save($insert))) {
addOperationLog(['op_type'=>1,'key'=>$second_party_info['partner'].getNowDate(),'op_name'=>'编辑下游对账单','url'=>U('StatementMangement/lists'),'menu'=>'推广员-结算管理-结算单管理-新增下游对账单']);
addOperationLog(['op_type'=>1,'key'=>$second_party_info['partner'].'/'.getNowDate(),'op_name'=>'编辑下游对账单','url'=>U('StatementMangement/lists'),'menu'=>'推广员-结算管理-结算单管理-新增下游对账单']);
$this->ajaxReturn(['code'=>1, 'msg'=>'结算单编辑成功']);
} else {
@ -230,14 +230,13 @@ class StatementMangementController extends ThinkController
if (!$id) {
$this->ajaxReturn(['code'=>2000,'error'=>'no']);
}
$statementData = M('statement','tab_')->where(['id'=>$id])->find();
$is_del = M('statement','tab_')->where(['id'=>$id])->delete();
if ($is_del) {
$statementData = M('statement','tab_')->where(['id'=>$id])->find();
addOperationLog(['op_type'=>2,'key'=>$statementData['company_name'].date('YmdHis',$statementData['statement_begin_time']).date('YmdHis',$statementData['statement_end_time']),'op_name'=>'删除下游对账单','url'=>U('StatementMangement/lists'),'menu'=>'推广员-结算管理-结算单管理-删除下游对账单']);
addOperationLog(['op_type'=>2,'key'=>$statementData['company_name'].'/'.date('YmdHis',$statementData['statement_begin_time']).'/'.date('YmdHis',$statementData['statement_end_time']),'op_name'=>'删除下游对账单','url'=>U('StatementMangement/lists'),'menu'=>'推广员-结算管理-结算单管理-删除下游对账单']);
$this->ajaxReturn(['code'=>0,'success'=>'ok']);
} else {
@ -305,6 +304,7 @@ class StatementMangementController extends ThinkController
'remark' => I('remark'),
'reward_time' => strtotime(I('reward_time'))
];
$accounts = I('account');
$user_types = I('user_type');
if ($accounts) {
@ -335,8 +335,8 @@ class StatementMangementController extends ThinkController
if ($upt === false) {
$this->error('保存失败');
} else {
addOperationLog(['op_type'=>1,'key'=>$data['reward_type'].$data['company_type'].$data['money'],'op_name'=>'修改奖惩记录','url'=>U('Query/settlement'),'menu'=>'推广员-结算单管理-奖罚记录管理']);
$companyName = M('partner','tab_')->field('partner')->where(['id'=>$data['company_id']])->find();
addOperationLog(['op_type'=>1,'key'=>$companyName['partner'].'/'.(($data['reward_type']==1)?'奖励':'惩罚').'/'.$data['money'],'op_name'=>'修改奖惩记录','url'=>U('Query/settlement'),'menu'=>'推广员-结算单管理-奖罚记录管理-修改奖惩记录']);
$this->success('保存成功', U('StatementMangement/rewardManageList'));
}
@ -345,7 +345,8 @@ class StatementMangementController extends ThinkController
$data['creater_id'] = is_login();
$ins = M('reward_record', 'tab_')->add($data);
addOperationLog(['op_type'=>0,'key'=>$data['reward_type'].$data['company_type'].$data['money'],'op_name'=>'新增奖惩记录','url'=>U('Query/settlement'),'menu'=>'推广员-结算单管理-奖罚记录管理']);
$companyName = M('partner','tab_')->field('partner')->where(['id'=>$data['company_id']])->find();
addOperationLog(['op_type'=>0,'key'=>$companyName['partner'].'/'.(($data['reward_type']==1)?'奖励':'惩罚').'/'.$data['money'],'op_name'=>'新增奖惩记录','url'=>U('Query/settlement'),'menu'=>'推广员-结算单管理-奖罚记录管理-新增奖惩记录']);
return $ins ? $this->success('新增成功', U('StatementMangement/rewardManageList')) : $this->error('新增失败');
}
@ -359,7 +360,9 @@ class StatementMangementController extends ThinkController
$upt = M('reward_record', 'tab_')->where(['id'=>$id])->delete();
addOperationLog(['op_type'=>2,'key'=>$rewardRecordData['reward_type'].$rewardRecordData['company_type'].$rewardRecordData['money'],'op_name'=>'删除奖惩记录','url'=>U('StatementMangement/rewardManageList'),'menu'=>'推广员-结算单管理-奖罚记录管理']);
$companyName = M('partner','tab_')->field('partner')->where(['id'=>$rewardRecordData['company_id']])->find();
addOperationLog(['op_type'=>2,'key'=>$companyName['partner'].'/'.(($rewardRecordData['reward_type']==1)?'奖励':'惩罚').'/'.$rewardRecordData['money'],'op_name'=>'删除奖惩记录','url'=>U('StatementMangement/rewardManageList'),'menu'=>'推广员-结算单管理-奖罚记录管理']);
return $upt ? $this->success('删除成功') : $this->error('删除失败');
} else {
@ -607,7 +610,7 @@ class StatementMangementController extends ThinkController
if ($is_save) {
addOperationLog(['op_type'=>0,'key'=>'个人结算单'.getNowDate(),'op_name'=>'生成下游个人结算单','url'=>U('StatementMangement/lists'),'menu'=>'推广员-结算管理-结算单管理-生成下游个人结算单']);
addOperationLog(['op_type'=>0,'key'=>'个人结算单'.'/'.getNowDate(),'op_name'=>'生成下游个人结算单','url'=>U('StatementMangement/lists'),'menu'=>'推广员-结算管理-结算单管理-生成下游个人结算单']);
$this->ajaxReturn(['status'=>1,'msg'=>'生成成功']);
} else {
@ -837,7 +840,7 @@ class StatementMangementController extends ThinkController
if ($is_save) {
addOperationLog(['op_type'=>1,'key'=>'个人结算单'.getNowDate(),'op_name'=>'编辑下游个人结算单','url'=>U('StatementMangement/lists'),'menu'=>'推广员-结算管理-结算单管理-编辑下游个人结算单']);
addOperationLog(['op_type'=>1,'key'=>'个人结算单'.'/'.getNowDate(),'op_name'=>'编辑下游个人结算单','url'=>U('StatementMangement/lists'),'menu'=>'推广员-结算管理-结算单管理-编辑下游个人结算单']);
$this->ajaxReturn(['status'=>1,'msg'=>'修改成功']);
} else {
@ -884,7 +887,7 @@ class StatementMangementController extends ThinkController
foreach ($data as $key => $value) {
addOperationLog(['op_type'=>1,'key'=>$value['company_name'].date('YmdHis',$value['statement_begin_time']).date('YmdHis',$value['statement_end_time']),'op_name'=>'编辑结算单审核通过','url'=>U('StatementMangement/lists'),'menu'=>'推广员-结算管理-结算单管理-结算单审核通过']);
addOperationLog(['op_type'=>1,'key'=>$value['company_name'].'/'.date('YmdHis',$value['statement_begin_time']).'/'.date('YmdHis',$value['statement_end_time']),'op_name'=>'编辑结算单审核通过','url'=>U('StatementMangement/lists'),'menu'=>'推广员-结算管理-结算单管理-结算单审核通过']);
}
@ -912,7 +915,7 @@ class StatementMangementController extends ThinkController
foreach ($data as $key => $value) {
addOperationLog(['op_type'=>1,'key'=>$value['company_name'].date('YmdHis',$value['statement_begin_time']).date('YmdHis',$value['statement_end_time']),'op_name'=>'编辑结算单审核通过','url'=>U('StatementMangement/lists'),'menu'=>'推广员-结算管理-结算单管理-结算单审核通过']);
addOperationLog(['op_type'=>1,'key'=>$value['company_name'].'/'.date('YmdHis',$value['statement_begin_time']).'/'.date('YmdHis',$value['statement_end_time']),'op_name'=>'编辑结算单审核通过','url'=>U('StatementMangement/lists'),'menu'=>'推广员-结算管理-结算单管理-结算单审核通过']);
}

@ -95,7 +95,7 @@ class SupportController extends ThinkController {
->where(['tab_test_resource.id'=>$map['id']])
->find();
addOperationLog(['op_type'=>1,'key'=>$resourceData['promote_account'].$resourceData['user_account'],'op_name'=>'资源发放审核','url'=>U('Support/lists'),'menu'=>'推广员-推广员管理-推广补链-资源发放审核']);
addOperationLog(['op_type'=>1,'key'=>$resourceData['promote_account'].'/'.$resourceData['user_account'],'op_name'=>'资源发放审核','url'=>U('Support/lists'),'menu'=>'推广员-推广员管理-推广补链-资源发放审核']);
$this->ajaxReturn(['status'=>1,'msg'=>'操作成功!']);
}else{
@ -124,7 +124,7 @@ class SupportController extends ThinkController {
->where(['tab_test_resource.id'=>$map['id']])
->find();
addOperationLog(['op_type'=>1,'key'=>$resourceData['promote_account'].$resourceData['user_account'],'op_name'=>'资源发放拒绝','url'=>U('Support/lists'),'menu'=>'推广员-推广员管理-推广补链-资源发放拒绝']);
addOperationLog(['op_type'=>1,'key'=>$resourceData['promote_account'].'/'.$resourceData['user_account'],'op_name'=>'资源发放拒绝','url'=>U('Support/lists'),'menu'=>'推广员-推广员管理-推广补链-资源发放拒绝']);
$this->ajaxReturn(['status'=>1,'msg'=>'操作成功!']);
}else{

@ -487,7 +487,7 @@ class TestResourceController extends ThinkController
}
}
addOperationLog(['op_type'=>0,'key'=>$i_account.'-'.I('game_name').'-'.I('server_name'),'op_name'=>'新增测试账号','url'=>U('testResource/index'),'menu'=>'推广员-测试资源-测试资源申请-新增测试账号']);
addOperationLog(['op_type'=>0,'key'=>$i_account.'/'.I('game_name').'/'.I('server_name'),'op_name'=>'新增测试账号','url'=>U('testResource/index'),'menu'=>'推广员-测试资源-测试资源申请-新增测试账号']);
}
if (session('apply_status')==0) {
@ -603,7 +603,7 @@ class TestResourceController extends ThinkController
$userData = M('test_resource','tab_')->where($map)->find();
addOperationLog(['op_type'=>1,'key'=>$userData['user_account'].'-'.$userData['game_name'].'-'.$userData['server_name'],'op_name'=>'测试资源申请编辑','url'=>U('TestResource/edit',['id'=>$userData['id']]),'menu'=>'推广员-测试资源-测试资源申请-测试资源申请编辑']);
addOperationLog(['op_type'=>1,'key'=>$userData['user_account'].'/'.$userData['game_name'].'/'.$userData['server_name'],'op_name'=>'测试资源申请编辑','url'=>U('TestResource/edit',['id'=>$userData['id']]),'menu'=>'推广员-测试资源-测试资源申请-测试资源申请编辑']);
$this->success('更新成功', U('index'));
}
@ -695,7 +695,7 @@ class TestResourceController extends ThinkController
//成功
}
addOperationLog(['op_type'=>0,'key'=>$support['user_account'].'-'.$support['game_name'].'-'.$support['server_name'],'op_name'=>'测试资源申请后续','url'=>U('TestResource/apply',['id'=>$value]),'menu'=>'推广员-测试资源-测试资源申请-测试资源申请后续']);
addOperationLog(['op_type'=>0,'key'=>$support['user_account'].'/'.$support['game_name'].'/'.$support['server_name'],'op_name'=>'测试资源申请后续','url'=>U('TestResource/apply',['id'=>$value]),'menu'=>'推广员-测试资源-测试资源申请-测试资源申请后续']);
}
M('test_resource','tab_')->commit(); //提交事物

@ -167,6 +167,8 @@ class TestWhiteListController extends ThinkController
$data['add_user'] = $_SESSION['onethink_admin']['user_auth']['username'];
$data['create_ime'] = time();
M('user','tab_')->where(array('id'=>$data['user_id']))->save(['check_status'=>$data['show_status']]);
$whiteList = M('test_white_list','tab_')->add($data);
if($whiteList) {
//操作日志

@ -241,7 +241,7 @@ class WithdrawModel extends Model{
return -1;
}
addOperationLog(['op_type'=>1,'key'=>$promote['account'].$data['begin_time'].$data['end_time'].$balance,'op_name'=>'推广结算提现','url'=>U('Query/settlement'),'menu'=>'推广员-结算管理-推广结算-推广结算提现']);
addOperationLog(['op_type'=>1,'key'=>$promote['account'].'/'.date('YmdHis',$data['begin_time']).'/'.date('YmdHis',$data['end_time']).'/'.$balance,'op_name'=>'推广结算提现','url'=>U('Query/settlement'),'menu'=>'推广员-结算管理-推广结算-推广结算提现']);
M()->commit();//事物提交
return 1;
@ -385,6 +385,8 @@ class WithdrawModel extends Model{
return -1;
}
addOperationLog(['op_type'=>1,'key'=>$promote['account'].'/'.date('YmdHis',$data['begin_time']).'/'.date('YmdHis',$data['end_time']).'/'.$balance,'op_name'=>'推广结算提现','url'=>U('Query/settlement'),'menu'=>'推广员-结算管理-推广结算-推广结算提现']);
M()->commit();//事物提交
return 1;
}
@ -496,7 +498,7 @@ class WithdrawModel extends Model{
if (!$withdrawId) {
return 0;//补点失败
}
addOperationLog(['op_type'=>1,'key'=>$promote['account'].'/'.date('YmdHis',$data['begin_time']).'/'.date('YmdHis',$data['end_time']).'/'.$balance,'op_name'=>'推广结算提现','url'=>U('Query/settlement'),'menu'=>'推广员-结算管理-推广结算-推广结算提现']);
return 1;
}

@ -1995,6 +1995,8 @@ function getPrmoteChlidAccount($id=0,$field="*")
$map['status'] = 1;
$map["chain"] = array("LIKE","%{$self['chain']}%");
$map["level"] = array("GT",$self['level']);
$data = $promote->field($field)->where($map)->select();
if(empty($data)){return array();}
return $data;

Loading…
Cancel
Save