diff --git a/src/main/resources/modules/SpringBoot/java/module/mgr/managerImpl.ftl b/src/main/resources/modules/SpringBoot/java/module/mgr/managerImpl.ftl index 43e72a5b..4f56c46a 100644 --- a/src/main/resources/modules/SpringBoot/java/module/mgr/managerImpl.ftl +++ b/src/main/resources/modules/SpringBoot/java/module/mgr/managerImpl.ftl @@ -147,7 +147,9 @@ public class ${table.getCName()}ManagerImpl implements ${table.getCName()}Manage return response; } - PageHelper.startPage(request.getPageNumber(), request.getPageSize()); + if (request.getPageSize() != 0) { + PageHelper.startPage(request.getPageNumber(), request.getPageSize()); + } if (StringUtil.isNotEmpty(request.getSortKey())) { PageHelper.orderBy(request.getSortKey() + " " + request.getSortType()); } @@ -206,7 +208,9 @@ public class ${table.getCName()}ManagerImpl implements ${table.getCName()}Manage return response; } - PageHelper.startPage(request.getPageNumber(), request.getPageSize()); + if (request.getPageSize() != 0) { + PageHelper.startPage(request.getPageNumber(), request.getPageSize()); + } if (StringUtil.isNotEmpty(request.getSortKey())) { PageHelper.orderBy(request.getSortKey() + " " + request.getSortType()); } diff --git a/src/main/resources/modules/SpringBoot/java/module/system/ent/User.java b/src/main/resources/modules/SpringBoot/java/module/system/ent/User.java index 2df2bd16..51ccaee3 100644 --- a/src/main/resources/modules/SpringBoot/java/module/system/ent/User.java +++ b/src/main/resources/modules/SpringBoot/java/module/system/ent/User.java @@ -64,6 +64,8 @@ public class User extends BaseEntity { @ColumnDescription("") private String deptName; + private String roleNames; + public String getUserName() { return this.userName; } @@ -127,4 +129,12 @@ public class User extends BaseEntity { public void setDeptName(String deptName) { this.deptName = deptName; } + + public String getRoleNames() { + return this.roleNames; + } + + public void setRoleNames(String roleNames) { + this.roleNames = roleNames; + } } \ No newline at end of file diff --git a/src/main/resources/modules/SpringBoot/java/module/system/mgr/DeptManagerImpl.java b/src/main/resources/modules/SpringBoot/java/module/system/mgr/DeptManagerImpl.java index 13651e7f..4cf7388a 100644 --- a/src/main/resources/modules/SpringBoot/java/module/system/mgr/DeptManagerImpl.java +++ b/src/main/resources/modules/SpringBoot/java/module/system/mgr/DeptManagerImpl.java @@ -80,8 +80,8 @@ public class DeptManagerImpl implements DeptManager { entity.setId(id); if (StringUtil.isEmpty(entity.getSupCode()) || StringUtil.isEmpty(entity.getSupName())) { String deptCode = entity.getDeptCode(); - while (deptCode.contains("_")) { - deptCode = deptCode.substring(0, deptCode.lastIndexOf("_")); + while (deptCode.length() > 0) { + deptCode = deptCode.substring(0, deptCode.length() - 1); DeptFindRequest deptFindRequest = new DeptFindRequest(); deptFindRequest.setDeptCode(deptCode); DeptFindResponse deptFindResponse = this.find(deptFindRequest, token); @@ -89,6 +89,7 @@ public class DeptManagerImpl implements DeptManager { Dept supDept = deptFindResponse.getResult().get(0); entity.setSupCode(supDept.getDeptCode()); entity.setSupName(supDept.getDeptName()); + break; } } } @@ -169,7 +170,9 @@ public class DeptManagerImpl implements DeptManager { return response; } - PageHelper.startPage(request.getPageNumber(), request.getPageSize()); + if (request.getPageSize() != 0) { + PageHelper.startPage(request.getPageNumber(), request.getPageSize()); + } if (StringUtil.isNotEmpty(request.getSortKey())) { PageHelper.orderBy(request.getSortKey() + " " + request.getSortType()); } @@ -208,7 +211,6 @@ public class DeptManagerImpl implements DeptManager { return response; } - @Override public DeptTreeResponse tree(DeptTreeRequest request, Token token) { DeptTreeResponse response = new DeptTreeResponse(); @@ -221,8 +223,8 @@ public class DeptManagerImpl implements DeptManager { DeptFindRequest deptFindRequest = new DeptFindRequest(); deptFindRequest.setPageSize(0); deptFindRequest.setValid(true); - deptFindRequest.setSortType(SortType.ASC); deptFindRequest.setSortKey("DEPT_CODE"); + deptFindRequest.setSortType(SortType.ASC); DeptFindResponse deptFindResponse = this.find(deptFindRequest, token); if (deptFindResponse.hasError()) { @@ -233,8 +235,6 @@ public class DeptManagerImpl implements DeptManager { List data = new ArrayList<>(); Map allMap = new HashMap<>(); List result = deptFindResponse.getResult(); - // 获取最顶级资源 - int level = 1; while (result.size() > 0) { Iterator iterator = result.iterator(); while (iterator.hasNext()) { @@ -250,25 +250,22 @@ public class DeptManagerImpl implements DeptManager { tree.setValue(next.getDeptCode()); tree.setLabel(next.getDeptName()); - if (next.getDeptCode() != null && next.getDeptCode().split("_").length == level) { - allMap.put(tree.getValue(), tree); - iterator.remove(); - //尝试获取上级资源 - String code = next.getDeptCode(); - DeptTree Ptree = null; - while (code.contains("_")) { - code = code.substring(0, code.lastIndexOf("_")); - Ptree = allMap.get(code); - if (Ptree != null) break; - } - if (Ptree != null) { - Ptree.addChild(tree); - } else { - data.add(tree); - } + allMap.put(tree.getValue(), tree); + iterator.remove(); + //尝试获取上级资源 + String code = next.getDeptCode(); + DeptTree Ptree = null; + while (code.length() > 0) { + code = code.substring(0, code.length() - 1); + Ptree = allMap.get(code); + if (Ptree != null) break; + } + if (Ptree != null) { + Ptree.addChild(tree); + } else { + data.add(tree); } } - level++; } response.setResult(data); diff --git a/src/main/resources/modules/SpringBoot/java/module/system/mgr/DictItemManagerImpl.java b/src/main/resources/modules/SpringBoot/java/module/system/mgr/DictItemManagerImpl.java index 398b59db..2a85fc58 100644 --- a/src/main/resources/modules/SpringBoot/java/module/system/mgr/DictItemManagerImpl.java +++ b/src/main/resources/modules/SpringBoot/java/module/system/mgr/DictItemManagerImpl.java @@ -134,7 +134,9 @@ public class DictItemManagerImpl implements DictItemManager { return response; } - PageHelper.startPage(request.getPageNumber(), request.getPageSize()); + if (request.getPageSize() != 0) { + PageHelper.startPage(request.getPageNumber(), request.getPageSize()); + } if (StringUtil.isNotEmpty(request.getSortKey())) { PageHelper.orderBy(request.getSortKey() + " " + request.getSortType()); } diff --git a/src/main/resources/modules/SpringBoot/java/module/system/mgr/DictManagerImpl.java b/src/main/resources/modules/SpringBoot/java/module/system/mgr/DictManagerImpl.java index d7456589..690709da 100644 --- a/src/main/resources/modules/SpringBoot/java/module/system/mgr/DictManagerImpl.java +++ b/src/main/resources/modules/SpringBoot/java/module/system/mgr/DictManagerImpl.java @@ -143,7 +143,9 @@ public class DictManagerImpl implements DictManager { return response; } - PageHelper.startPage(request.getPageNumber(), request.getPageSize()); + if (request.getPageSize() != 0) { + PageHelper.startPage(request.getPageNumber(), request.getPageSize()); + } if (StringUtil.isNotEmpty(request.getSortKey())) { PageHelper.orderBy(request.getSortKey() + " " + request.getSortType()); } diff --git a/src/main/resources/modules/SpringBoot/java/module/system/mgr/FileManagerImpl.java b/src/main/resources/modules/SpringBoot/java/module/system/mgr/FileManagerImpl.java index 3bc04ab9..de2afb38 100644 --- a/src/main/resources/modules/SpringBoot/java/module/system/mgr/FileManagerImpl.java +++ b/src/main/resources/modules/SpringBoot/java/module/system/mgr/FileManagerImpl.java @@ -107,7 +107,9 @@ public class FileManagerImpl implements FileManager { return response; } - PageHelper.startPage(request.getPageNumber(), request.getPageSize()); + if (request.getPageSize() != 0) { + PageHelper.startPage(request.getPageNumber(), request.getPageSize()); + } if (StringUtil.isNotEmpty(request.getSortKey())) { PageHelper.orderBy(request.getSortKey() + " " + request.getSortType()); } diff --git a/src/main/resources/modules/SpringBoot/java/module/system/mgr/ResManagerImpl.java b/src/main/resources/modules/SpringBoot/java/module/system/mgr/ResManagerImpl.java index 9089499d..f50a0887 100644 --- a/src/main/resources/modules/SpringBoot/java/module/system/mgr/ResManagerImpl.java +++ b/src/main/resources/modules/SpringBoot/java/module/system/mgr/ResManagerImpl.java @@ -144,7 +144,9 @@ public class ResManagerImpl implements ResManager { return response; } - PageHelper.startPage(request.getPageNumber(), request.getPageSize()); + if (request.getPageSize() != 0) { + PageHelper.startPage(request.getPageNumber(), request.getPageSize()); + } if (StringUtil.isNotEmpty(request.getSortKey())) { PageHelper.orderBy(request.getSortKey() + " " + request.getSortType()); } @@ -195,8 +197,8 @@ public class ResManagerImpl implements ResManager { ResFindRequest resourceFindRequest = new ResFindRequest(); resourceFindRequest.setPageSize(0); resourceFindRequest.setValid(true); + resourceFindRequest.setSortKey("RES_CODE"); resourceFindRequest.setSortType(SortType.ASC); - resourceFindRequest.setSortKey("CODE"); ResFindResponse resourceFindResponse = this.find(resourceFindRequest, token); if (resourceFindResponse.hasError()) { @@ -207,8 +209,6 @@ public class ResManagerImpl implements ResManager { List data = new ArrayList<>(); Map allMap = new HashMap<>(); List result = resourceFindResponse.getResult(); - // 获取最顶级资源 - int level = 1; while (result.size() > 0) { Iterator iterator = result.iterator(); while (iterator.hasNext()) { @@ -223,25 +223,22 @@ public class ResManagerImpl implements ResManager { tree.setRowVersion(next.getRowVersion()); tree.setLabel(next.getResName()); - if (next.getResCode() != null && next.getResCode().split("_").length == level) { - allMap.put(tree.getResCode(), tree); - iterator.remove(); - //尝试获取上级资源 - String code = next.getResCode(); - ResTree Ptree = null; - while (code.contains("_")) { - code = code.substring(0, code.lastIndexOf("_")); - Ptree = allMap.get(code); - if (Ptree != null) break; - } - if (Ptree != null) { - Ptree.addChild(tree); - } else { - data.add(tree); - } + allMap.put(tree.getResCode(), tree); + iterator.remove(); + //尝试获取上级资源 + String code = next.getResCode(); + ResTree Ptree = null; + while (code.length() > 0) { + code = code.substring(0, code.length() - 1); + Ptree = allMap.get(code); + if (Ptree != null) break; + } + if (Ptree != null) { + Ptree.addChild(tree); + } else { + data.add(tree); } } - level++; } response.setResult(data); diff --git a/src/main/resources/modules/SpringBoot/java/module/system/mgr/RoleManagerImpl.java b/src/main/resources/modules/SpringBoot/java/module/system/mgr/RoleManagerImpl.java index 1f2c1aa1..68bcf613 100644 --- a/src/main/resources/modules/SpringBoot/java/module/system/mgr/RoleManagerImpl.java +++ b/src/main/resources/modules/SpringBoot/java/module/system/mgr/RoleManagerImpl.java @@ -134,7 +134,9 @@ public class RoleManagerImpl implements RoleManager { return response; } - PageHelper.startPage(request.getPageNumber(), request.getPageSize()); + if (request.getPageSize() != 0) { + PageHelper.startPage(request.getPageNumber(), request.getPageSize()); + } if (StringUtil.isNotEmpty(request.getSortKey())) { PageHelper.orderBy(request.getSortKey() + " " + request.getSortType()); } diff --git a/src/main/resources/modules/SpringBoot/java/module/system/mgr/RoleResManagerImpl.java b/src/main/resources/modules/SpringBoot/java/module/system/mgr/RoleResManagerImpl.java index d0c01282..e95b378a 100644 --- a/src/main/resources/modules/SpringBoot/java/module/system/mgr/RoleResManagerImpl.java +++ b/src/main/resources/modules/SpringBoot/java/module/system/mgr/RoleResManagerImpl.java @@ -137,7 +137,9 @@ public class RoleResManagerImpl implements RoleResManager { return response; } - PageHelper.startPage(request.getPageNumber(), request.getPageSize()); + if (request.getPageSize() != 0) { + PageHelper.startPage(request.getPageNumber(), request.getPageSize()); + } if (StringUtil.isNotEmpty(request.getSortKey())) { PageHelper.orderBy(request.getSortKey() + " " + request.getSortType()); } diff --git a/src/main/resources/modules/SpringBoot/java/module/system/mgr/TokensManagerImpl.java b/src/main/resources/modules/SpringBoot/java/module/system/mgr/TokensManagerImpl.java index d0849423..0091219f 100644 --- a/src/main/resources/modules/SpringBoot/java/module/system/mgr/TokensManagerImpl.java +++ b/src/main/resources/modules/SpringBoot/java/module/system/mgr/TokensManagerImpl.java @@ -146,7 +146,9 @@ public class TokensManagerImpl implements ${basePackage}.module.system.mgr.Token return response; } - PageHelper.startPage(request.getPageNumber(), request.getPageSize()); + if (request.getPageSize() != 0) { + PageHelper.startPage(request.getPageNumber(), request.getPageSize()); + } if (StringUtil.isNotEmpty(request.getSortKey())) { PageHelper.orderBy(request.getSortKey() + " " + request.getSortType()); } diff --git a/src/main/resources/modules/SpringBoot/java/module/system/mgr/UserManagerImpl.java b/src/main/resources/modules/SpringBoot/java/module/system/mgr/UserManagerImpl.java index 67dc0a83..df30671d 100644 --- a/src/main/resources/modules/SpringBoot/java/module/system/mgr/UserManagerImpl.java +++ b/src/main/resources/modules/SpringBoot/java/module/system/mgr/UserManagerImpl.java @@ -1,4 +1,4 @@ -package xyz.wbsite.module.system.mgr; +package ${basePackage}.module.system.mgr; import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageInfo; @@ -7,26 +7,30 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.interceptor.TransactionAspectSupport; -import xyz.wbsite.frame.base.ErrorType; -import xyz.wbsite.frame.base.Token; -import xyz.wbsite.frame.utils.IDgenerator; -import xyz.wbsite.frame.utils.MapperUtil; -import xyz.wbsite.frame.utils.Message; -import xyz.wbsite.frame.utils.ValidationUtil; -import xyz.wbsite.module.system.ent.User; -import xyz.wbsite.module.system.mpr.UserMapper; -import xyz.wbsite.module.system.req.UserCreateRequest; -import xyz.wbsite.module.system.req.UserDeleteRequest; -import xyz.wbsite.module.system.req.UserFindRequest; -import xyz.wbsite.module.system.req.UserGetRequest; -import xyz.wbsite.module.system.req.UserRoleCreateRequest; -import xyz.wbsite.module.system.req.UserUpdateRequest; -import xyz.wbsite.module.system.rsp.UserCreateResponse; -import xyz.wbsite.module.system.rsp.UserDeleteResponse; -import xyz.wbsite.module.system.rsp.UserFindResponse; -import xyz.wbsite.module.system.rsp.UserGetResponse; -import xyz.wbsite.module.system.rsp.UserRoleCreateResponse; -import xyz.wbsite.module.system.rsp.UserUpdateResponse; +import ${basePackage}.frame.base.ErrorType; +import ${basePackage}.frame.base.Token; +import ${basePackage}.frame.utils.IDgenerator; +import ${basePackage}.frame.utils.MD5Util; +import ${basePackage}.frame.utils.MapperUtil; +import ${basePackage}.frame.utils.Message; +import ${basePackage}.frame.utils.ValidationUtil; +import ${basePackage}.module.system.ent.Dept; +import ${basePackage}.module.system.ent.User; +import ${basePackage}.module.system.mpr.UserMapper; +import ${basePackage}.module.system.req.DeptFindRequest; +import ${basePackage}.module.system.req.UserCreateRequest; +import ${basePackage}.module.system.req.UserDeleteRequest; +import ${basePackage}.module.system.req.UserFindRequest; +import ${basePackage}.module.system.req.UserGetRequest; +import ${basePackage}.module.system.req.UserRoleCreateRequest; +import ${basePackage}.module.system.req.UserUpdateRequest; +import ${basePackage}.module.system.rsp.DeptFindResponse; +import ${basePackage}.module.system.rsp.UserCreateResponse; +import ${basePackage}.module.system.rsp.UserDeleteResponse; +import ${basePackage}.module.system.rsp.UserFindResponse; +import ${basePackage}.module.system.rsp.UserGetResponse; +import ${basePackage}.module.system.rsp.UserRoleCreateResponse; +import ${basePackage}.module.system.rsp.UserUpdateResponse; /** * USER - 用户 @@ -42,6 +46,8 @@ public class UserManagerImpl implements UserManager { @Autowired private UserMapper userMapper; @Autowired + private DeptManager deptManager; + @Autowired private UserRoleManager userRoleManager; /** @@ -62,6 +68,25 @@ public class UserManagerImpl implements UserManager { long id = IDgenerator.nextId(); User entity = MapperUtil.map(request, User.class); entity.setId(id); + entity.setUserPwd(MD5Util.generatePwd(entity.getUserPwd())); + + { + DeptFindRequest deptFindRequest = new DeptFindRequest(); + deptFindRequest.setDeptCode(request.getDeptCode()); + deptFindRequest.setPageSize(1); + DeptFindResponse deptFindResponse = deptManager.find(deptFindRequest, token); + if (deptFindResponse.hasError()) { + response.addErrors(deptFindResponse.getErrors()); + return response; + } + if (deptFindResponse.getResult().size() == 0) { + response.addError(ErrorType.BUSINESS_ERROR, "[" + request.getDeptCode() + "]机构代码不存在"); + return response; + } + Dept dept = deptFindResponse.getResult().get(0); + entity.setDeptId(dept.getId()); + entity.setDeptName(dept.getDeptName()); + } long result = userMapper.insert(entity, token); if (1L != result) { @@ -154,7 +179,9 @@ public class UserManagerImpl implements UserManager { return response; } - PageHelper.startPage(request.getPageNumber(), request.getPageSize()); + if (request.getPageSize() != 0) { + PageHelper.startPage(request.getPageNumber(), request.getPageSize()); + } if (StringUtil.isNotEmpty(request.getSortKey())) { PageHelper.orderBy(request.getSortKey() + " " + request.getSortType()); } diff --git a/src/main/resources/modules/SpringBoot/java/module/system/mgr/UserRoleManagerImpl.java b/src/main/resources/modules/SpringBoot/java/module/system/mgr/UserRoleManagerImpl.java index aaa92e0c..17960451 100644 --- a/src/main/resources/modules/SpringBoot/java/module/system/mgr/UserRoleManagerImpl.java +++ b/src/main/resources/modules/SpringBoot/java/module/system/mgr/UserRoleManagerImpl.java @@ -134,7 +134,9 @@ public class UserRoleManagerImpl implements UserRoleManager { return response; } - PageHelper.startPage(request.getPageNumber(), request.getPageSize()); + if (request.getPageSize() != 0) { + PageHelper.startPage(request.getPageNumber(), request.getPageSize()); + } if (StringUtil.isNotEmpty(request.getSortKey())) { PageHelper.orderBy(request.getSortKey() + " " + request.getSortType()); } diff --git a/src/main/resources/modules/SpringBoot/java/module/system/mpr/MySQL_UserMapper.xml b/src/main/resources/modules/SpringBoot/java/module/system/mpr/MySQL_UserMapper.xml index adcce906..1968769d 100644 --- a/src/main/resources/modules/SpringBoot/java/module/system/mpr/MySQL_UserMapper.xml +++ b/src/main/resources/modules/SpringBoot/java/module/system/mpr/MySQL_UserMapper.xml @@ -20,6 +20,7 @@ + @@ -30,31 +31,42 @@ @@ -136,10 +148,7 @@ UPDATE SET - `USER_NAME` = ${r"#"}{request.userName,jdbcType=VARCHAR}, - `USER_CODE` = ${r"#"}{request.userCode,jdbcType=VARCHAR}, `USER_ALIAS` = ${r"#"}{request.userAlias,jdbcType=VARCHAR}, - `USER_PWD` = ${r"#"}{request.userPwd,jdbcType=VARCHAR}, `USER_STATUS` = ${r"#"}{request.userStatus,jdbcType=VARCHAR}, `DEPT_ID` = ${r"#"}{request.deptId,jdbcType=BIGINT}, `DEPT_CODE` = ${r"#"}{request.deptCode,jdbcType=VARCHAR}, diff --git a/src/main/resources/modules/SpringBoot/java/module/system/req/UserUpdateRequest.java b/src/main/resources/modules/SpringBoot/java/module/system/req/UserUpdateRequest.java index ae061e9c..6404425e 100644 --- a/src/main/resources/modules/SpringBoot/java/module/system/req/UserUpdateRequest.java +++ b/src/main/resources/modules/SpringBoot/java/module/system/req/UserUpdateRequest.java @@ -22,33 +22,12 @@ public class UserUpdateRequest extends BaseUpdateRequest { @NotNull(message = "[id]主键不能为NULL") private Long id; - /** - * 用户账户 - */ - @NotEmpty(message = "[userName]用户账户不能为空") - @Length(min = 0, max = 100, message = "[userName]用户账户长度不合法(0-100)") - private String userName; - - /** - * 用户代码 - */ - @NotEmpty(message = "[userCode]用户代码不能为空") - @Length(min = 0, max = 50, message = "[userCode]用户代码长度不合法(0-50)") - private String userCode; - /** * 用户别名 */ @Length(min = 0, max = 50, message = "[userAlias]用户别名长度不合法(0-50)") private String userAlias; - /** - * 用户密码 - */ - @NotEmpty(message = "[userPwd]用户密码不能为空") - @Length(min = 0, max = 50, message = "[userPwd]用户密码长度不合法(0-50)") - private String userPwd; - /** * 用户状态 */ @@ -81,22 +60,6 @@ public class UserUpdateRequest extends BaseUpdateRequest { this.id = id; } - public String getUserName() { - return this.userName; - } - - public void setUserName(String userName) { - this.userName = userName; - } - - public String getUserCode() { - return this.userCode; - } - - public void setUserCode(String userCode) { - this.userCode = userCode; - } - public String getUserAlias() { return this.userAlias; } @@ -105,14 +68,6 @@ public class UserUpdateRequest extends BaseUpdateRequest { this.userAlias = userAlias; } - public String getUserPwd() { - return this.userPwd; - } - - public void setUserPwd(String userPwd) { - this.userPwd = userPwd; - } - public String getUserStatus() { return this.userStatus; } diff --git a/src/main/resources/modules/SpringBoot/resources/templates/control/nav.ftl b/src/main/resources/modules/SpringBoot/resources/templates/control/nav.ftl index 2d4d61dd..b2a5b9c5 100644 --- a/src/main/resources/modules/SpringBoot/resources/templates/control/nav.ftl +++ b/src/main/resources/modules/SpringBoot/resources/templates/control/nav.ftl @@ -389,6 +389,14 @@ }); } }, + beforeDialogClose:function (done) { + this.$confirm('确认关闭?') + .then(function () { + done(); + }).catch(function () { + + }); + } }, created: function () { }, diff --git a/src/main/resources/modules/SpringBoot/resources/templates/screen/module/mgr.ftl b/src/main/resources/modules/SpringBoot/resources/templates/screen/module/mgr.ftl index 294f88d8..6dcb37d7 100644 --- a/src/main/resources/modules/SpringBoot/resources/templates/screen/module/mgr.ftl +++ b/src/main/resources/modules/SpringBoot/resources/templates/screen/module/mgr.ftl @@ -165,7 +165,7 @@ - + <#list fields as item> <#if !item.isSystem> diff --git a/src/main/resources/modules/SpringBoot/resources/templates/screen/module/system/dept.ftl b/src/main/resources/modules/SpringBoot/resources/templates/screen/module/system/dept.ftl index c77419e2..e53524be 100644 --- a/src/main/resources/modules/SpringBoot/resources/templates/screen/module/system/dept.ftl +++ b/src/main/resources/modules/SpringBoot/resources/templates/screen/module/system/dept.ftl @@ -201,7 +201,7 @@ - + @@ -301,7 +301,7 @@ this.form.title = "部门新增"; this.form.dialog = true; this.form.id = ""; - this.form.deptCode = pItem.value + "_"; + this.form.deptCode = pItem.value; this.form.deptName = ""; this.form.deptAlias = ""; this.form.valid = true; diff --git a/src/main/resources/modules/SpringBoot/resources/templates/screen/module/system/dict.ftl b/src/main/resources/modules/SpringBoot/resources/templates/screen/module/system/dict.ftl index 325fb269..d08aa9df 100644 --- a/src/main/resources/modules/SpringBoot/resources/templates/screen/module/system/dict.ftl +++ b/src/main/resources/modules/SpringBoot/resources/templates/screen/module/system/dict.ftl @@ -128,7 +128,7 @@ - + diff --git a/src/main/resources/modules/SpringBoot/resources/templates/screen/module/system/dictItem.ftl b/src/main/resources/modules/SpringBoot/resources/templates/screen/module/system/dictItem.ftl index ab6e2c1f..25e768a9 100644 --- a/src/main/resources/modules/SpringBoot/resources/templates/screen/module/system/dictItem.ftl +++ b/src/main/resources/modules/SpringBoot/resources/templates/screen/module/system/dictItem.ftl @@ -130,7 +130,7 @@ - + diff --git a/src/main/resources/modules/SpringBoot/resources/templates/screen/module/system/file.ftl b/src/main/resources/modules/SpringBoot/resources/templates/screen/module/system/file.ftl index 7e00abb9..d35f97ed 100644 --- a/src/main/resources/modules/SpringBoot/resources/templates/screen/module/system/file.ftl +++ b/src/main/resources/modules/SpringBoot/resources/templates/screen/module/system/file.ftl @@ -119,7 +119,7 @@ - + diff --git a/src/main/resources/modules/SpringBoot/resources/templates/screen/module/system/res.ftl b/src/main/resources/modules/SpringBoot/resources/templates/screen/module/system/res.ftl index adadc3e6..b2068745 100644 --- a/src/main/resources/modules/SpringBoot/resources/templates/screen/module/system/res.ftl +++ b/src/main/resources/modules/SpringBoot/resources/templates/screen/module/system/res.ftl @@ -196,7 +196,7 @@ - + @@ -305,7 +305,7 @@ this.form.title = "资源新增"; this.form.dialog = true; this.form.id = ""; - this.form.resCode = pItem.resCode + "_"; + this.form.resCode = pItem.resCode; this.form.resName = ""; this.form.resType = ""; this.form.resValue = ""; diff --git a/src/main/resources/modules/SpringBoot/resources/templates/screen/module/system/role.ftl b/src/main/resources/modules/SpringBoot/resources/templates/screen/module/system/role.ftl index 8c612f6f..bb204236 100644 --- a/src/main/resources/modules/SpringBoot/resources/templates/screen/module/system/role.ftl +++ b/src/main/resources/modules/SpringBoot/resources/templates/screen/module/system/role.ftl @@ -114,7 +114,7 @@ - + diff --git a/src/main/resources/modules/SpringBoot/resources/templates/screen/module/system/user.ftl b/src/main/resources/modules/SpringBoot/resources/templates/screen/module/system/user.ftl index 44080aaa..ac669a04 100644 --- a/src/main/resources/modules/SpringBoot/resources/templates/screen/module/system/user.ftl +++ b/src/main/resources/modules/SpringBoot/resources/templates/screen/module/system/user.ftl @@ -87,13 +87,17 @@ + prop="roleNames" + label="用户角色"> + - + - - - - + - + @@ -213,7 +214,6 @@ {min: 1, max: 50, message: '用户别名长度在 1 到 50 个字符', trigger: 'blur'} ], userPwd: [ - {required: true, message: '用户密码不能为空', trigger: 'blur'}, { pattern:/^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{6,20}$/, message: '密码至少包含 数字和英文,长度6-20'} ], userStatus: [ diff --git a/src/main/resources/modules/SpringBoot/test/system/UserTest.java b/src/main/resources/modules/SpringBoot/test/system/UserTest.java index baf3ea5a..f51e53ee 100644 --- a/src/main/resources/modules/SpringBoot/test/system/UserTest.java +++ b/src/main/resources/modules/SpringBoot/test/system/UserTest.java @@ -96,10 +96,7 @@ public class UserTest { //更新数据 UserUpdateRequest request = new UserUpdateRequest(); request.setId(createResponse.getId()); - request.setUserName("test"); - request.setUserCode(""); request.setUserAlias("test"); - request.setUserPwd("123456"); request.setUserStatus("code"); request.setDeptCode("A01");