From 3fee8832ca52667b26f702255677d62775ce5cd6 Mon Sep 17 00:00:00 2001 From: nidapeng <jp@doumee.com> Date: 星期二, 09 四月 2024 19:06:40 +0800 Subject: [PATCH] 提交一把 --- server/service/src/main/java/com/doumee/service/business/impl/SolutionsServiceImpl.java | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-) diff --git a/server/service/src/main/java/com/doumee/service/business/impl/SolutionsServiceImpl.java b/server/service/src/main/java/com/doumee/service/business/impl/SolutionsServiceImpl.java index 99e04df..076bb39 100644 --- a/server/service/src/main/java/com/doumee/service/business/impl/SolutionsServiceImpl.java +++ b/server/service/src/main/java/com/doumee/service/business/impl/SolutionsServiceImpl.java @@ -370,12 +370,13 @@ if(solutions.getDataType() == null){ solutions.setDataType(Constants.TWO); } + QueryWrapper<Solutions> wrapper = new QueryWrapper<>(solutions); if(Constants.equalsObject(user.getType(),Constants.TWO)){ //濡傛灉鏄垹闄� - solutions.setShopId(user.getCompanyId()); +// wrapper.lambda().exists("select c.id from company_solution c left join solutions d on c.solution_id=d.id where c.isdeleted=0 and d.base_id=solutions.base_id and c.shop_id="+user.getCompanyId());//璁剧疆鏃犳晥璁块棶 + wrapper.apply("((solutions.type=0 and exists(select cs.id from company_solution cs left join solutions s on cs.solution_id=s.id where cs.isdeleted=0 and s.base_id=solutions.base_id and cs.shop_id="+user.getCompanyId()+")) or (" + + "solutions.type=1 and solutions.shop_id="+user.getCompanyId()+"))") ; } - QueryWrapper<Solutions> wrapper = new QueryWrapper<>(solutions); - return solutionsMapper.selectList(wrapper); } -- Gitblit v1.9.3