@ -270,7 +270,7 @@ class CompanyGameRatioController extends AdminController
$v['verify_log'] = json_encode($v['verify_log']);
$v['verify_log'] = json_encode($v['verify_log']);
$v['status']=1;
$v['status']=1;
$company_game_ratio_log->save($v);
$company_game_ratio_log->save($v);
addOperationLog(['op_type'=>1,'key'=>$v['id'],"op_name"=>"市场部审核",'url'=>U('index ')]);
addOperationLog(['op_type'=>1,'key'=>$v['id'],"op_name"=>"市场部审核",'url'=>U('lists ')]);
}
}
$this->ajaxReturn(array(
$this->ajaxReturn(array(
'status' => 1,
'status' => 1,
@ -290,7 +290,7 @@ class CompanyGameRatioController extends AdminController
$v['verify_log'] = json_encode($v['verify_log']);
$v['verify_log'] = json_encode($v['verify_log']);
$v['status']=-1;
$v['status']=-1;
$company_game_ratio_log->save($v);
$company_game_ratio_log->save($v);
addOperationLog(['op_type'=>1,'key'=>$v['id'],"op_name"=>"市场部审核",'url'=>U('index ')]);
addOperationLog(['op_type'=>1,'key'=>$v['id'],"op_name"=>"市场部审核",'url'=>U('lists ')]);
}
}
$this->ajaxReturn(array(
$this->ajaxReturn(array(
'status' => 1,
'status' => 1,
@ -310,7 +310,7 @@ class CompanyGameRatioController extends AdminController
$v['verify_log'] = json_encode($v['verify_log']);
$v['verify_log'] = json_encode($v['verify_log']);
$v['status']=-2;
$v['status']=-2;
$company_game_ratio_log->save($v);
$company_game_ratio_log->save($v);
addOperationLog(['op_type'=>1,'key'=>$v['id'],"op_name"=>"管理员审核",'url'=>U('index ')]);
addOperationLog(['op_type'=>1,'key'=>$v['id'],"op_name"=>"管理员审核",'url'=>U('lists ')]);
}
}
$this->ajaxReturn(array(
$this->ajaxReturn(array(
'status' => 1,
'status' => 1,
@ -351,7 +351,7 @@ class CompanyGameRatioController extends AdminController
$company_game_ratio->add($ratiov);
$company_game_ratio->add($ratiov);
}
}
//
//
addOperationLog(['op_type'=>1,'key'=>$v['id'],"op_name"=>"管理员审核",'url'=>U('index ')]);
addOperationLog(['op_type'=>1,'key'=>$v['id'],"op_name"=>"管理员审核",'url'=>U('lists ')]);
}
}
$this->ajaxReturn(array(
$this->ajaxReturn(array(
'status' => 1,
'status' => 1,
@ -397,8 +397,8 @@ class CompanyGameRatioController extends AdminController
}
}
$id = M("company_game_ratio_log","tab_")->add($save);
$id = M("company_game_ratio_log","tab_")->add($save);
addOperationLog(['op_type'=>0,'key'=>$id,'op_name'=>'新增','url'=>U('index ')]);
addOperationLog(['op_type'=>0,'key'=>$id,'op_name'=>'新增','url'=>U('lists ')]);
$this->ajaxReturn(["msg"=>"添加成功","code"=>1,"url"=>U("index ")]);
$this->ajaxReturn(["msg"=>"添加成功","code"=>1,"url"=>U("lists ")]);
} else {
} else {
$companyList = D("PromoteCompany")->getList();
$companyList = D("PromoteCompany")->getList();
@ -431,6 +431,7 @@ class CompanyGameRatioController extends AdminController
$save['id'] = $params['id'];
$save['id'] = $params['id'];
$save['ratio'] = $params['ratio'] ?? 0;
$save['ratio'] = $params['ratio'] ?? 0;
$save['turnover_ratio'] = $this->setTurnoverRatio($params);
$save['turnover_ratio'] = $this->setTurnoverRatio($params);
$save['begin_time'] = strtotime($params['begin_time']);
$save['begin_time'] = strtotime($params['begin_time']);
$save['end_time'] = $params['end_time'] ? strtotime($params['end_time'])+86399 : 0;
$save['end_time'] = $params['end_time'] ? strtotime($params['end_time'])+86399 : 0;
$save['remark'] = $params['remark'] ?? '';
$save['remark'] = $params['remark'] ?? '';
@ -439,8 +440,8 @@ class CompanyGameRatioController extends AdminController
$save['verify_log'] = json_encode(["create_user"=>$this->admininfo["username"],"create_time"=>date("Y-m-d H:i:s")]);
$save['verify_log'] = json_encode(["create_user"=>$this->admininfo["username"],"create_time"=>date("Y-m-d H:i:s")]);
}
}
M("company_game_ratio_log","tab_")->save($save);
M("company_game_ratio_log","tab_")->save($save);
addOperationLog(['op_type'=>1,'key'=>$save['id'],'op_name'=>'修改','url'=>U('index ')]);
addOperationLog(['op_type'=>1,'key'=>$save['id'],'op_name'=>'修改','url'=>U('lists ')]);
$this->ajaxReturn(["msg"=>"修改成功","code"=>1,"url"=>U("index ")]);
$this->ajaxReturn(["msg"=>"修改成功","code"=>1,"url"=>U("lists ")]);
} else {
} else {
$params = I('get.');
$params = I('get.');
$id = $params['id'] ?? 0;
$id = $params['id'] ?? 0;
@ -596,6 +597,9 @@ class CompanyGameRatioController extends AdminController
$save['turnover_ratio'] = json_encode($save['turnover_ratio']);
$save['turnover_ratio'] = json_encode($save['turnover_ratio']);
}
}
}
}
if(empty($save['turnover_ratio'])){
$save['turnover_ratio'] = '';
}
return $save['turnover_ratio'];
return $save['turnover_ratio'];
}
}