mirror of
https://gitee.com/ssssssss-team/magic-api.git
synced 2026-05-07 19:07:21 +08:00
修复 MagicEntity.getId()" because "entity" is null 异常
This commit is contained in:
@@ -83,6 +83,9 @@ public class MagicResourceController extends MagicController implements MagicExc
|
||||
.read(bytes);
|
||||
isTrue(allowVisit(request, Authorization.SAVE, entity), PERMISSION_INVALID);
|
||||
// 自动保存的代码,和旧版代码对比,如果一致,则不保存,直接返回。
|
||||
if (entity!= null){
|
||||
return new JsonBean<>(null);
|
||||
}
|
||||
if(entity.getId() != null && "1".equals(auto)){
|
||||
MagicEntity oldInfo = service.file(entity.getId());
|
||||
if(oldInfo != null && Objects.equals(oldInfo, entity)){
|
||||
|
||||
Reference in New Issue
Block a user