mirror of
https://gitee.com/freshday/radar.git
synced 2025-12-26 07:16:26 +08:00
template model can't delete
Signed-off-by: 烈日下的从容 <wfh45678@163.com>
This commit is contained in:
parent
af439ea362
commit
8b7f197749
@ -153,6 +153,12 @@ public class ModelServiceImpl implements ModelService, SubscribeHandle {
|
||||
public CommonResult delete(Long[] id) {
|
||||
CommonResult result = new CommonResult();
|
||||
ModelVO model = modelDal.getModelById(id[0]);
|
||||
if (model.getTemplate()) {
|
||||
result.setCode("701");
|
||||
result.setSuccess(false);
|
||||
result.setMsg("系统模板禁止删除!");
|
||||
return result;
|
||||
}
|
||||
int count = modelDal.delete(id);
|
||||
if (count > 0) {
|
||||
result.setSuccess(true);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user