Skip to content

Commit

Permalink
refactor: 移除部门、角色、菜单、用户、存储的状态默认值
Browse files Browse the repository at this point in the history
  • Loading branch information
Charles7c committed Apr 11, 2024
1 parent 9ec5945 commit bd5ede2
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ protected void beforeAdd(DeptReq req) {
boolean isExists = this.isNameExists(name, req.getParentId(), null);
CheckUtils.throwIf(isExists, "新增失败,[{}] 已存在", name);
req.setAncestors(this.getAncestors(req.getParentId()));
req.setStatus(DisEnableStatusEnum.ENABLE);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ public class MenuServiceImpl extends BaseServiceImpl<MenuMapper, MenuDO, MenuRes
public Long add(MenuReq req) {
String title = req.getTitle();
CheckUtils.throwIf(this.isNameExists(title, req.getParentId(), null), "新增失败,[{}] 已存在", title);
req.setStatus(DisEnableStatusEnum.ENABLE);
return super.add(req);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ public Long add(RoleReq req) {
String code = req.getCode();
CheckUtils.throwIf(this.isCodeExists(code, null), "新增失败,[{}] 已存在", code);
// 新增信息
req.setStatus(DisEnableStatusEnum.ENABLE);
Long roleId = super.add(req);
// 保存角色和菜单关联
roleMenuService.add(req.getMenuIds(), roleId);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ protected void beforeAdd(StorageReq req) {
CheckUtils.throwIf(Boolean.TRUE.equals(req.getIsDefault()) && this.isDefaultExists(null), "请先取消原有默认存储库");
String code = req.getCode();
CheckUtils.throwIf(this.isCodeExists(code, null), "新增失败,[{}] 已存在", code);
req.setStatus(DisEnableStatusEnum.ENABLE);
this.load(req);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@ protected void beforeAdd(UserReq req) {
CheckUtils.throwIf(StrUtil.isNotBlank(email) && this.isEmailExists(email, null), errorMsgTemplate, email);
String phone = req.getPhone();
CheckUtils.throwIf(StrUtil.isNotBlank(phone) && this.isPhoneExists(phone, null), errorMsgTemplate, phone);
req.setStatus(DisEnableStatusEnum.ENABLE);
}

@Override
Expand Down

0 comments on commit bd5ede2

Please sign in to comment.