From 7b0a69ef79a8821be185a84a4469c9f52a4e86b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=A3=E5=9C=A3=E5=8D=8E?= <752718920@qq.com> Date: Mon, 6 Mar 2023 23:12:48 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=99=E8=A7=92=E8=89=B2=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=A4=87=E6=B3=A8=E7=9A=84=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=E6=9D=A1=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/jsh/erp/datasource/mappers/RoleMapperEx.java | 4 +++- .../main/java/com/jsh/erp/service/role/RoleComponent.java | 6 ++++-- .../main/java/com/jsh/erp/service/role/RoleService.java | 8 ++++---- .../src/main/resources/mapper_xml/RoleMapperEx.xml | 8 ++++++++ 4 files changed, 19 insertions(+), 7 deletions(-) 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