内置数据空指针BUG

v1.4.1
Parker 4 years ago
parent 341d3512fb
commit de3d1c7eb6

@ -126,7 +126,7 @@ public class DictDetailRestController extends BaseRestController<SysDictDetail,
if(model != null){
DictDetailModel dictDetailModel = IService.get(model.getId());
// 内置数据 只有超级管理员可以修改
if(LOCK_DATA.equals(dictDetailModel.getIzLock()) ){
if(dictDetailModel != null && LOCK_DATA.equals(dictDetailModel.getIzLock()) ){
UserModel user = UserUtil.getUser();
if(!UserUtil.SUPER_ADMIN.equals(user.getUsername())){
@ -154,7 +154,7 @@ public class DictDetailRestController extends BaseRestController<SysDictDetail,
DictDetailModel dictDetailModel = IService.get(id);
// 内置数据 只有超级管理员可以修改
if(LOCK_DATA.equals(dictDetailModel.getIzLock()) ){
if(dictDetailModel != null && LOCK_DATA.equals(dictDetailModel.getIzLock()) ){
UserModel user = UserUtil.getUser();
if(!UserUtil.SUPER_ADMIN.equals(user.getUsername())){
@ -187,7 +187,7 @@ public class DictDetailRestController extends BaseRestController<SysDictDetail,
List<SysDictDetail> dictList = IService.findList(wrapper);
for (SysDictDetail sysDictDetail : dictList) {
// 内置数据 只有超级管理员可以修改
if(LOCK_DATA.equals(sysDictDetail.getIzLock()) ){
if(sysDictDetail != null && LOCK_DATA.equals(sysDictDetail.getIzLock()) ){
UserModel user = UserUtil.getUser();
if(!UserUtil.SUPER_ADMIN.equals(user.getUsername())){
throw new ServiceException(SystemMsg.EXCEPTION_LOCK_DATA);

@ -128,7 +128,7 @@ public class DictRestController extends BaseRestController<SysDict, DictModel, I
if(model != null){
DictModel dictModel = IService.get(model.getId());
// 内置数据 只有超级管理员可以修改
if(LOCK_DATA.equals(dictModel.getIzLock()) ){
if(dictModel != null && LOCK_DATA.equals(dictModel.getIzLock()) ){
UserModel user = UserUtil.getUser();
if(!UserUtil.SUPER_ADMIN.equals(user.getUsername())){
@ -156,7 +156,7 @@ public class DictRestController extends BaseRestController<SysDict, DictModel, I
DictModel dictModel = IService.get(id);
// 内置数据 只有超级管理员可以修改
if(LOCK_DATA.equals(dictModel.getIzLock()) ){
if(dictModel != null && LOCK_DATA.equals(dictModel.getIzLock()) ){
UserModel user = UserUtil.getUser();
if(!UserUtil.SUPER_ADMIN.equals(user.getUsername())){
@ -189,7 +189,7 @@ public class DictRestController extends BaseRestController<SysDict, DictModel, I
List<SysDict> dictList = IService.findList(wrapper);
for (SysDict sysDict : dictList) {
// 内置数据 只有超级管理员可以修改
if(LOCK_DATA.equals(sysDict.getIzLock()) ){
if(sysDict != null && LOCK_DATA.equals(sysDict.getIzLock()) ){
UserModel user = UserUtil.getUser();
if(!UserUtil.SUPER_ADMIN.equals(user.getUsername())){
throw new ServiceException(SystemMsg.EXCEPTION_LOCK_DATA);

@ -114,7 +114,7 @@ public class RoleMenuRefRestController implements RoleMenuRefApi {
RoleModel roleModel = iRoleService.get(model.getRoleId());
// 内置数据 只有超级管理员可以修改
if(LOCK_DATA.equals(roleModel.getIzLock()) ){
if(roleModel != null && LOCK_DATA.equals(roleModel.getIzLock()) ){
UserModel user = UserUtil.getUser();
if(!UserUtil.SUPER_ADMIN.equals(user.getUsername())){
throw new ServiceException(SystemMsg.EXCEPTION_LOCK_DATA);

@ -129,7 +129,7 @@ public class RoleRestController extends BaseRestController<SysRole, RoleModel, I
if(model != null){
RoleModel roleModel = IService.get(model.getId());
// 内置数据 只有超级管理员可以修改
if(LOCK_DATA.equals(roleModel.getIzLock()) ){
if(roleModel != null && LOCK_DATA.equals(roleModel.getIzLock()) ){
UserModel user = UserUtil.getUser();
if(!UserUtil.SUPER_ADMIN.equals(user.getUsername())){
@ -159,7 +159,7 @@ public class RoleRestController extends BaseRestController<SysRole, RoleModel, I
RoleModel roleModel = IService.get(id);
// 内置数据 只有超级管理员可以修改
if(LOCK_DATA.equals(roleModel.getIzLock()) ){
if(roleModel != null && LOCK_DATA.equals(roleModel.getIzLock()) ){
UserModel user = UserUtil.getUser();
if(!UserUtil.SUPER_ADMIN.equals(user.getUsername())){
throw new ServiceException(SystemMsg.EXCEPTION_LOCK_DATA);
@ -195,7 +195,7 @@ public class RoleRestController extends BaseRestController<SysRole, RoleModel, I
List<SysRole> roleList = IService.findList(wrapper);
for (SysRole sysRole : roleList) {
// 内置数据 只有超级管理员可以修改
if(LOCK_DATA.equals(sysRole.getIzLock()) ){
if(sysRole != null && LOCK_DATA.equals(sysRole.getIzLock()) ){
UserModel user = UserUtil.getUser();
if(!UserUtil.SUPER_ADMIN.equals(user.getUsername())){
throw new ServiceException(SystemMsg.EXCEPTION_LOCK_DATA);

Loading…
Cancel
Save