奖罚记录管理-》编辑,无修改时提示错误

master
liuweiwen 5 years ago
parent 578948347f
commit daec62ec95

@ -316,7 +316,11 @@ class StatementMangementController extends ThinkController
} }
if ($id) { if ($id) {
$upt = M('reward_record', 'tab_')->where(['id'=>$id])->save($data); $upt = M('reward_record', 'tab_')->where(['id'=>$id])->save($data);
return $upt ? $this->success('更新成功', U('StatementMangement/rewardManageList')) : $this->error('更新失败'); if ($upt === false) {
$this->error('保存失败');
} else {
$this->success('保存成功', U('StatementMangement/rewardManageList'));
}
} else { } else {
$data['create_time'] = time(); $data['create_time'] = time();
$data['creater_id'] = is_login(); $data['creater_id'] = is_login();

Loading…
Cancel
Save