Commit 4b50ef26 authored by zhuwei's avatar zhuwei

删除

parent 0752963c
......@@ -96,6 +96,26 @@ class PerformanceReport extends Basic
}
/**
* 删除
* @return \think\Response
*/
public function delPerformanceReport(){
$params = $this->params;
$checkResult = $this->validate($params, "ImageDepot.getImageDepotById");
if (true !== $checkResult) {
return $this->response("101", $checkResult);
}
$params_['is_del'] = 1;
$res = $this->rAgentReport->updatePerformanceReport($params['id'],$params_);//int(1)
if($res == 1){
return $this->response("200", "成功",['data'=>$res]);
}else{
return $this->response("300", "失败");
}
}
}
\ No newline at end of file
......@@ -44,4 +44,16 @@ class RAgentReport extends BaseModel
//dump($this->getLastSql());
return $result;
}
/**
* 更新数据
*/
public function updatePerformanceReport($id,$params)
{
$result = $this
->where('id', $id)
->update($params);
//dump($this->getLastSql());
return $result;
}
}
\ No newline at end of file
......@@ -327,6 +327,8 @@ Route::group('index', [
//后台业绩日报,周报
'getPerformanceReportList' => [ 'index/PerformanceReport/getPerformanceReportList', [ 'method' => 'get | post' ] ],
'delPerformanceReport' => [ 'index/PerformanceReport/delPerformanceReport', [ 'method' => 'get | post' ] ],//删除
]);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment