From 22271e641e4505ba906c3770905b7e84e3ad8d85 Mon Sep 17 00:00:00 2001 From: MrShi <1878285526@qq.com> Date: 星期二, 02 四月 2024 17:05:57 +0800 Subject: [PATCH] mrshi --- server/service/src/main/java/com/doumee/service/business/impl/CompanySolutionServiceImpl.java | 21 +++++++++++++++++++-- 1 files changed, 19 insertions(+), 2 deletions(-) diff --git a/server/service/src/main/java/com/doumee/service/business/impl/CompanySolutionServiceImpl.java b/server/service/src/main/java/com/doumee/service/business/impl/CompanySolutionServiceImpl.java index 5ca7afe..45572e8 100644 --- a/server/service/src/main/java/com/doumee/service/business/impl/CompanySolutionServiceImpl.java +++ b/server/service/src/main/java/com/doumee/service/business/impl/CompanySolutionServiceImpl.java @@ -2,14 +2,18 @@ import com.doumee.core.model.PageData; import com.doumee.core.model.PageWrap; +import com.doumee.core.utils.Constants; import com.doumee.core.utils.Utils; import com.doumee.dao.business.CompanySolutionMapper; +import com.doumee.dao.business.join.CompanySolutionJoinMapper; import com.doumee.dao.business.model.CompanySolution; +import com.doumee.dao.business.model.Solutions; import com.doumee.service.business.CompanySolutionService; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.github.yulichang.wrapper.MPJLambdaWrapper; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.util.CollectionUtils; @@ -19,11 +23,13 @@ /** * 浼佷笟鍙敤淇濋櫓鏂规鍏宠仈琛⊿ervice瀹炵幇 * @author 姹熻箘韫� - * @date 2024/01/15 15:07 + * @date 2024/01/16 10:03 */ @Service public class CompanySolutionServiceImpl implements CompanySolutionService { + @Autowired + private CompanySolutionJoinMapper companySolutionJoinMapper; @Autowired private CompanySolutionMapper companySolutionMapper; @@ -77,7 +83,18 @@ QueryWrapper<CompanySolution> wrapper = new QueryWrapper<>(companySolution); return companySolutionMapper.selectOne(wrapper); } - + @Override + public List<CompanySolution> findListForCompany(CompanySolution companySolution) { + MPJLambdaWrapper<CompanySolution> csWrapper = new MPJLambdaWrapper<>(); + csWrapper.selectAll(CompanySolution.class); + csWrapper.selectAs(Solutions::getName,CompanySolution::getSolutionName); + csWrapper.leftJoin(Solutions.class,Solutions::getId,CompanySolution::getSolutionBaseId); + csWrapper.eq(CompanySolution::getCompanyId,companySolution.getCompanyId()); + csWrapper.eq(CompanySolution::getIsdeleted, Constants.ZERO); + csWrapper.eq(Solutions::getIsdeleted, Constants.ZERO); + csWrapper.orderByAsc(CompanySolution::getSortnum); + return companySolutionJoinMapper.selectJoinList(CompanySolution.class,csWrapper); + } @Override public List<CompanySolution> findList(CompanySolution companySolution) { QueryWrapper<CompanySolution> wrapper = new QueryWrapper<>(companySolution); -- Gitblit v1.9.3