diff --git a/jshERP-boot/src/main/java/com/jsh/erp/datasource/mappers/RoleMapperEx.java b/jshERP-boot/src/main/java/com/jsh/erp/datasource/mappers/RoleMapperEx.java index 43e24142..5124f636 100644 --- a/jshERP-boot/src/main/java/com/jsh/erp/datasource/mappers/RoleMapperEx.java +++ b/jshERP-boot/src/main/java/com/jsh/erp/datasource/mappers/RoleMapperEx.java @@ -12,11 +12,13 @@ public interface RoleMapperEx { List selectByConditionRole( @Param("name") String name, + @Param("description") String description, @Param("offset") Integer offset, @Param("rows") Integer rows); Long countsByRole( - @Param("name") String name); + @Param("name") String name, + @Param("description") String description); int batchDeleteRoleByIds(@Param("updateTime") Date updateTime, @Param("updater") Long updater, @Param("ids") String ids[]); diff --git a/jshERP-boot/src/main/java/com/jsh/erp/service/role/RoleComponent.java b/jshERP-boot/src/main/java/com/jsh/erp/service/role/RoleComponent.java index 6db85c7c..bf0ff52f 100644 --- a/jshERP-boot/src/main/java/com/jsh/erp/service/role/RoleComponent.java +++ b/jshERP-boot/src/main/java/com/jsh/erp/service/role/RoleComponent.java @@ -32,14 +32,16 @@ public class RoleComponent implements ICommonQuery { private List getRoleList(Map map) throws Exception{ String search = map.get(Constants.SEARCH); String name = StringUtil.getInfo(search, "name"); - return roleService.select(name, QueryUtils.offset(map), QueryUtils.rows(map)); + String description = StringUtil.getInfo(search, "description"); + return roleService.select(name, description, QueryUtils.offset(map), QueryUtils.rows(map)); } @Override public Long counts(Map map) throws Exception{ String search = map.get(Constants.SEARCH); String name = StringUtil.getInfo(search, "name"); - return roleService.countRole(name); + String description = StringUtil.getInfo(search, "description"); + return roleService.countRole(name, description); } @Override diff --git a/jshERP-boot/src/main/java/com/jsh/erp/service/role/RoleService.java b/jshERP-boot/src/main/java/com/jsh/erp/service/role/RoleService.java index 20a112e0..1ef45779 100644 --- a/jshERP-boot/src/main/java/com/jsh/erp/service/role/RoleService.java +++ b/jshERP-boot/src/main/java/com/jsh/erp/service/role/RoleService.java @@ -75,10 +75,10 @@ public class RoleService { return list; } - public List select(String name, int offset, int rows)throws Exception { + public List select(String name, String description, int offset, int rows)throws Exception { List list=null; try{ - list=roleMapperEx.selectByConditionRole(name, offset, rows); + list=roleMapperEx.selectByConditionRole(name, description, offset, rows); for(RoleEx roleEx: list) { String priceLimit = roleEx.getPriceLimit(); if(StringUtil.isNotEmpty(priceLimit)) { @@ -94,10 +94,10 @@ public class RoleService { return list; } - public Long countRole(String name)throws Exception { + public Long countRole(String name, String description)throws Exception { Long result=null; try{ - result=roleMapperEx.countsByRole(name); + result=roleMapperEx.countsByRole(name, description); }catch(Exception e){ JshException.readFail(logger, e); } diff --git a/jshERP-boot/src/main/resources/mapper_xml/RoleMapperEx.xml b/jshERP-boot/src/main/resources/mapper_xml/RoleMapperEx.xml index c7ecd1eb..68bd0a9d 100644 --- a/jshERP-boot/src/main/resources/mapper_xml/RoleMapperEx.xml +++ b/jshERP-boot/src/main/resources/mapper_xml/RoleMapperEx.xml @@ -12,6 +12,10 @@ and name like #{bindName} + + + and description like #{bindDescription} + order by sort asc, id desc limit #{offset},#{rows} @@ -27,6 +31,10 @@ and name like #{bindName} + + + and description like #{bindDescription} + update jsh_role