管理后台日志唯一键值bug修改

master
zhengyongxing 5 years ago
parent 958fb41227
commit d5561209fd

@ -55,11 +55,12 @@ 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'=>'推广员-结算管理-结算单管理-删除上游对账单']);
$this->ajaxReturn(array("success"=>"ok","code"=>0));

@ -230,13 +230,12 @@ 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'=>'推广员-结算管理-结算单管理-删除下游对账单']);
$this->ajaxReturn(['code'=>0,'success'=>'ok']);

Loading…
Cancel
Save