-
Notifications
You must be signed in to change notification settings - Fork 15.4k
del_flag代码不规范问题 #169
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
你用的是那个版本,现在已经修复了 |
希望针对系统字典类型,不可以修改与删除,以免产生系统不可预估为题,影响运维以及研发上面的不必要的抢修时间消耗 @Getter
@AllArgsConstructor
public enum DictTypeEnum {
/**
* 字典类型-系统内置(不可修改)
*/
SYSTEM("1", "系统内置"),
/**
* 字典类型-业务类型
*/
BIZ("0", "业务类");
/**
* 类型
*/
private String type;
/**
* 描述
*/
private String description;
} |
使用的是 jeecg-boot 2.0 版本 |
看到了,感谢,这块写的不规范 |
在代码充简单的一个删除,系统居然要查一遍,然后再删除。两次动用了数据库,如下: /**
* @功能:删除
* @param id
* @return
*/
@RequestMapping(value = "/delete", method = RequestMethod.DELETE)
@CacheEvict(value="dictCache", allEntries=true)
public Result<SysDict> delete(@RequestParam(name="id",required=true) String id) {
Result<SysDict> result = new Result<SysDict>();
SysDict sysDict = sysDictService.getById(id);
if(sysDict==null) {
result.error500("未找到对应实体");
}else {
boolean ok = sysDictService.removeById(sysDict);
if(ok) {
result.success("删除成功!");
}
}
return result;
} 建议一次性删除语句,且同时优化代码生成器里面代码。 |
ok |
第一个问题, 下个版本发布 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
在版本中出现,删除状态应该统一规范 0是正常,1是删除;
但是在字典表数据管理中,研发人员使用1为正常,2标识删除;
如何后期引用mybatis-plus 3.1.1版本既可以删除@TableLogic就可了。
The text was updated successfully, but these errors were encountered: