From 276db1df74848994ecc488b24d78f8361c9da987 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E8=A3=95=E8=B4=A2?= Date: Mon, 23 Oct 2023 23:37:59 +0800 Subject: [PATCH] 2.0 --- .../com/xm/core/ctrl/XmProductController.java | 6 +++-- .../com/xm/core/mapper/XmIterationMapper.xml | 1 - .../com/xm/core/mapper/XmProductMapper.java | 2 +- .../com/xm/core/mapper/XmProductMapper.xml | 22 +++++++++---------- .../com/xm/core/mapper/XmWorkloadMapper.xml | 3 --- .../com/xm/core/service/XmProductService.java | 5 ++--- 6 files changed, 18 insertions(+), 21 deletions(-) diff --git a/xm-core/src/main/java/com/xm/core/ctrl/XmProductController.java b/xm-core/src/main/java/com/xm/core/ctrl/XmProductController.java index 315ddf5b..727a7c62 100644 --- a/xm-core/src/main/java/com/xm/core/ctrl/XmProductController.java +++ b/xm-core/src/main/java/com/xm/core/ctrl/XmProductController.java @@ -176,8 +176,10 @@ public class XmProductController { } params.put("platformBranchId",platformBranchId); params.put("linkBranchId",user.getBranchId()); - List> datas = xmProductService.selectListMapByWhereWithState(params); //列出XmProduct列表 - return Result.ok().setData(datas).setTotal(page.getTotal()); + + QueryWrapper qw = QueryTools.initQueryWrapper(XmProduct.class , params); + List> datas = xmProductService.selectListMapByWhereWithState(page,qw,params); + return Result.ok().setData(datas).setTotal(page.getTotal()); } /***/ diff --git a/xm-core/src/main/java/com/xm/core/mapper/XmIterationMapper.xml b/xm-core/src/main/java/com/xm/core/mapper/XmIterationMapper.xml index b3224525..43a43405 100644 --- a/xm-core/src/main/java/com/xm/core/mapper/XmIterationMapper.xml +++ b/xm-core/src/main/java/com/xm/core/mapper/XmIterationMapper.xml @@ -20,7 +20,6 @@ and res.ctime < #{createTimeEnd} and res.online_time > #{onlineTimeStart} and res.online_time < #{onlineTimeEnd} - and exists ( select 1 from xm_menu im where im.iteration_id=res.id and im.menu_id=#{menuId} and im.product_id=#{productId} diff --git a/xm-core/src/main/java/com/xm/core/mapper/XmProductMapper.java b/xm-core/src/main/java/com/xm/core/mapper/XmProductMapper.java index 2378adc2..3dca14d2 100644 --- a/xm-core/src/main/java/com/xm/core/mapper/XmProductMapper.java +++ b/xm-core/src/main/java/com/xm/core/mapper/XmProductMapper.java @@ -23,6 +23,6 @@ public interface XmProductMapper extends BaseMapper { */ List> selectListMapByWhere(IPage page, @Param("ew") QueryWrapper ew,@Param("ext") Map ext); - List> selectListMapByWhereWithState(Map iterationMap); + List> selectListMapByWhereWithState(IPage page, @Param("ew") QueryWrapper ew,@Param("ext") Map ext); } diff --git a/xm-core/src/main/java/com/xm/core/mapper/XmProductMapper.xml b/xm-core/src/main/java/com/xm/core/mapper/XmProductMapper.xml index b642dd5b..f89500da 100644 --- a/xm-core/src/main/java/com/xm/core/mapper/XmProductMapper.xml +++ b/xm-core/src/main/java/com/xm/core/mapper/XmProductMapper.xml @@ -5,12 +5,12 @@ - and ext.res.product_name like concat('%',#{ext.key} ,'%') + and res.product_name like concat('%',#{ext.key} ,'%') - and ext.exists( select 1 from xm_iteration ppl where ppl.product_id=res.id and ext.ppl.id=#{ext.linkIterationId} ) + and exists( select 1 from xm_iteration ppl where ppl.product_id=res.id and ppl.id=#{ext.linkIterationId} ) - and ext.( exists ( select 1 from xm_group_user gu inner join xm_product_project_link t on (gu.project_id=t.project_id or gu.product_id=t.product_id ) and ext.t.product_id=res.id where gu.userid=#{ext.compete} and ext.t.product_id=res.id ) + and ( exists ( select 1 from xm_group_user gu inner join xm_product_project_link t on (gu.project_id=t.project_id or gu.product_id=t.product_id ) and t.product_id=res.id where gu.userid=#{ext.compete} and t.product_id=res.id ) or res.pm_userid=#{ext.compete} or res.adm_userid=#{ext.compete} or res.ass_userid=#{ext.compete} ) - and ext.ctime between #{ext.ctimeStart} and ext.#{ext.ctimeEnd} + and ctime between #{ext.ctimeStart} and #{ext.ctimeEnd} - and ext.(res.branch_id in( #{ext.platformBranchId},#{ext.linkBranchId}) and ext.res.is_tpl='1') + and (res.branch_id in( #{ext.platformBranchId},#{ext.linkBranchId}) and res.is_tpl='1') - and ext.res.del!="1" + and res.del!="1" - and ext.( res.branch_id = #{ext.linkBranchId} + and ( res.branch_id = #{ext.linkBranchId} - or (res.branch_id in( #{ext.platformBranchId},#{ext.linkBranchId}) and ext.res.is_tpl='1') + or (res.branch_id in( #{ext.platformBranchId},#{ext.linkBranchId}) and res.is_tpl='1') ) @@ -51,7 +51,7 @@