|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 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; | 
|---|
|  |  |  | 
|---|
|  |  |  | @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::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); | 
|---|