|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 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.Company; | 
|---|
|  |  |  | 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; | 
|---|
|  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 企业可用保险方案关联表Service实现 | 
|---|
|  |  |  | * @author 江蹄蹄 | 
|---|
|  |  |  | * @date 2024/01/15 11:15 | 
|---|
|  |  |  | * @date 2024/01/16 10:03 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @Service | 
|---|
|  |  |  | public class CompanySolutionServiceImpl implements CompanySolutionService { | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Autowired | 
|---|
|  |  |  | private CompanySolutionJoinMapper companySolutionJoinMapper; | 
|---|
|  |  |  | @Autowired | 
|---|
|  |  |  | private CompanySolutionMapper companySolutionMapper; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | 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::getType,CompanySolution::getSolutionType); | 
|---|
|  |  |  | csWrapper.selectAs(Solutions::getName,CompanySolution::getSolutionName); | 
|---|
|  |  |  | csWrapper.selectAs(Company::getName,CompanySolution::getShopName); | 
|---|
|  |  |  | csWrapper.leftJoin(Solutions.class,Solutions::getId,CompanySolution::getSolutionBaseId); | 
|---|
|  |  |  | csWrapper.leftJoin(Company.class, Company::getId,CompanySolution::getShopId); | 
|---|
|  |  |  | 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); | 
|---|