|
|
|
|
@ -2,9 +2,9 @@ package org.dromara.oa.crm.service.impl;
|
|
|
|
|
|
|
|
|
|
import org.dromara.common.core.utils.MapstructUtils;
|
|
|
|
|
import org.dromara.common.core.utils.StringUtils;
|
|
|
|
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
|
|
|
|
import org.dromara.common.mybatis.core.page.PageQuery;
|
|
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
|
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
|
|
|
|
import org.dromara.common.mybatis.core.page.PageQuery;
|
|
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
|
|
import com.github.yulichang.toolkit.JoinWrappers;
|
|
|
|
|
import com.github.yulichang.wrapper.MPJLambdaWrapper;
|
|
|
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
|
|
|
@ -39,7 +39,7 @@ public class CrmCustomerInfoServiceImpl implements ICrmCustomerInfoService {
|
|
|
|
|
* @return 客户信息
|
|
|
|
|
*/
|
|
|
|
|
@Override
|
|
|
|
|
public CrmCustomerInfoVo queryById(Long customerId){
|
|
|
|
|
public CrmCustomerInfoVo queryById(Long customerId) {
|
|
|
|
|
return baseMapper.selectVoById(customerId);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ -53,7 +53,7 @@ public class CrmCustomerInfoServiceImpl implements ICrmCustomerInfoService {
|
|
|
|
|
@Override
|
|
|
|
|
public TableDataInfo<CrmCustomerInfoVo> queryPageList(CrmCustomerInfoBo bo, PageQuery pageQuery) {
|
|
|
|
|
MPJLambdaWrapper<CrmCustomerInfo> lqw = buildQueryWrapper(bo);
|
|
|
|
|
Page<CrmCustomerInfoVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
|
|
|
|
Page<CrmCustomerInfoVo> result = baseMapper.selectCustomCrmCustomerInfoVoList(pageQuery.build(), lqw);
|
|
|
|
|
return TableDataInfo.build(result);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ -66,7 +66,7 @@ public class CrmCustomerInfoServiceImpl implements ICrmCustomerInfoService {
|
|
|
|
|
@Override
|
|
|
|
|
public List<CrmCustomerInfoVo> queryList(CrmCustomerInfoBo bo) {
|
|
|
|
|
MPJLambdaWrapper<CrmCustomerInfo> lqw = buildQueryWrapper(bo);
|
|
|
|
|
return baseMapper.selectVoList(lqw);
|
|
|
|
|
return baseMapper.selectCustomCrmCustomerInfoVoList(lqw);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private MPJLambdaWrapper<CrmCustomerInfo> buildQueryWrapper(CrmCustomerInfoBo bo) {
|
|
|
|
|
@ -83,7 +83,6 @@ public class CrmCustomerInfoServiceImpl implements ICrmCustomerInfoService {
|
|
|
|
|
.eq(bo.getOwnerId() != null, CrmCustomerInfo::getOwnerId, bo.getOwnerId())
|
|
|
|
|
.eq(StringUtils.isNotBlank(bo.getDetailedAddress()), CrmCustomerInfo::getDetailedAddress, bo.getDetailedAddress())
|
|
|
|
|
.eq(bo.getCustomerScale() != null, CrmCustomerInfo::getCustomerScale, bo.getCustomerScale())
|
|
|
|
|
.eq(bo.getParentCustomerId() != null, CrmCustomerInfo::getParentCustomerId, bo.getParentCustomerId())
|
|
|
|
|
.eq(StringUtils.isNotBlank(bo.getCustomerRelationship()), CrmCustomerInfo::getCustomerRelationship, bo.getCustomerRelationship())
|
|
|
|
|
.eq(StringUtils.isNotBlank(bo.getLegalRepresentative()), CrmCustomerInfo::getLegalRepresentative, bo.getLegalRepresentative())
|
|
|
|
|
.eq(StringUtils.isNotBlank(bo.getBusinessLicenseNumber()), CrmCustomerInfo::getBusinessLicenseNumber, bo.getBusinessLicenseNumber())
|
|
|
|
|
@ -91,7 +90,10 @@ public class CrmCustomerInfoServiceImpl implements ICrmCustomerInfoService {
|
|
|
|
|
.eq(StringUtils.isNotBlank(bo.getBankAccountOpening()), CrmCustomerInfo::getBankAccountOpening, bo.getBankAccountOpening())
|
|
|
|
|
.eq(StringUtils.isNotBlank(bo.getBankNumber()), CrmCustomerInfo::getBankNumber, bo.getBankNumber())
|
|
|
|
|
.eq(StringUtils.isNotBlank(bo.getOssId()), CrmCustomerInfo::getOssId, bo.getOssId())
|
|
|
|
|
.eq(StringUtils.isNotBlank(bo.getActiveFlag()), CrmCustomerInfo::getActiveFlag, bo.getActiveFlag());
|
|
|
|
|
.eq(StringUtils.isNotBlank(bo.getActiveFlag()), CrmCustomerInfo::getActiveFlag, bo.getActiveFlag())
|
|
|
|
|
.eq(StringUtils.isNotBlank(bo.getOurCompanyFlag()), CrmCustomerInfo::getOurCompanyFlag, bo.getOurCompanyFlag())
|
|
|
|
|
.eq(bo.getParentCustomerId() != null, CrmCustomerInfo::getParentCustomerId, bo.getParentCustomerId())
|
|
|
|
|
.eq("t.del_flag", "0");
|
|
|
|
|
return lqw;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|