Commit a47c2b86 authored by 332784038@qq.com's avatar 332784038@qq.com

Merge remote-tracking branch 'origin/release-fix' into release-fix

parents e1503e42 10f2983e
......@@ -356,12 +356,12 @@ public class CustomerDO extends BaseDO {
/**
* 默认付款,1-是,0-否
*/
private Boolean defaultPay ;
private Boolean defaultPay;
/**
* 控货无收货人,1-是,0-否
*/
private Boolean noConsignee ;
private Boolean noConsignee;
@ApiModelProperty("延期申请次数")
private int delayApprovalNum ;
......@@ -504,6 +504,12 @@ public class CustomerDO extends BaseDO {
@TableField(exist = false)
private String customerServiceName;
/**
* 创建者名字
*/
@TableField(exist = false)
private String createUsername;
/**
* 国家名称
......
......@@ -36,7 +36,7 @@ public interface CustomerMapper extends BaseMapperX<CustomerDO> {
IPage<CustomerDO> getPage(IPage<CustomerDO> page,
@Param(Constants.WRAPPER) Wrapper<CustomerDO> queryWrapper);
List<CustomerDO> getMyPage(@Param("start") int start, @Param("size") int size, @Param("query")CustomerPageReqDTO customerPageReqDTO);
List<CustomerDO> getMyPage(@Param("start") Integer start, @Param("size") Integer size, @Param("query")CustomerPageReqDTO customerPageReqDTO);
List<CustomerDO> getWaitToAssignedCustomerPageReq(@Param("start") int start, @Param("size") int size, @Param("query")CustomerPageReqDTO customerPageReqDTO);
/**
......
......@@ -11,90 +11,90 @@ import java.util.List;
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
@Data
public class CustomerExportReqDTO {
@ApiModelProperty(value = "客户编号")
private String number;
@ApiModelProperty(value = "客户名称")
private String name;
@ApiModelProperty(value = "客户等级")
private List<Integer> level;
@ApiModelProperty(value = "客户来源")
private List<Integer> source;
@ApiModelProperty(value = "客户类别")
private List<String> type;
@ApiModelProperty(value = "客户货运类型", notes = "参见customer_transport_type数据字典")
private String transportType;
@ApiModelProperty(value = "客户资源类型", notes = "参见customer_resource_type数据字典")
private List<Integer> resourceType;
@ApiModelProperty(value = "跟进客服")
private List<Long> customerService;
@ApiModelProperty(value = "客户状态")
private List<Integer> status;
@ApiModelProperty(value = "部门")
private String department;
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
@ApiModelProperty(value = "开始创建时间")
private Date beginCreateTime;
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
@ApiModelProperty(value = "结束创建时间")
private Date endCreateTime;
@ApiModelProperty(value = "主联系人")
private String defaultContactName;
@ApiModelProperty(value = "主联系电话")
private String defaultContactPhone;
@ApiModelProperty(value = "信用等级")
private List<Integer> creditLevel;
@ApiModelProperty(value = "国家")
private List<Integer> country;
@ApiModelProperty(value = "是否在公海")
private Boolean isInOpenSea;
@ApiModelProperty(value = "是否潜在客户")
private Boolean isPotential;
//api不显示此3个字段
//是否接收,后台使用
@JsonIgnore
private Boolean isCustomerServiceConfirmed;
//因接口公用方法新增:24小时内数据查询条件标识
private String flag4QueryCondition;
private List<Integer> marketType;
private int deptId ;
@ApiModelProperty(value = "会员编号")
private String memberCode;
@ApiModelProperty(value = "会员名称")
private String memberName;
@ApiModelProperty(value = "会员手机")
private String memberMobile;
@ApiModelProperty(value = "会员区号")
private String memberAreaCode;
public class CustomerExportReqDTO extends CustomerPageReqDTO {
// @ApiModelProperty(value = "客户编号")
// private String number;
//
// @ApiModelProperty(value = "客户名称")
// private String name;
//
// @ApiModelProperty(value = "客户等级")
// private List<Integer> level;
//
// @ApiModelProperty(value = "客户来源")
// private List<Integer> source;
//
// @ApiModelProperty(value = "客户类别")
// private List<String> type;
//
// @ApiModelProperty(value = "客户货运类型", notes = "参见customer_transport_type数据字典")
// private String transportType;
//
// @ApiModelProperty(value = "客户资源类型", notes = "参见customer_resource_type数据字典")
// private List<Integer> resourceType;
//
// @ApiModelProperty(value = "跟进客服")
// private List<Long> customerService;
//
// @ApiModelProperty(value = "客户状态")
// private List<Integer> status;
//
// @ApiModelProperty(value = "部门")
// private String department;
//
// @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
// @ApiModelProperty(value = "开始创建时间")
// private Date beginCreateTime;
//
// @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
// @ApiModelProperty(value = "结束创建时间")
// private Date endCreateTime;
//
//
//
// @ApiModelProperty(value = "主联系人")
// private String defaultContactName;
//
// @ApiModelProperty(value = "主联系电话")
// private String defaultContactPhone;
//
//
//
// @ApiModelProperty(value = "信用等级")
// private List<Integer> creditLevel;
//
// @ApiModelProperty(value = "国家")
// private List<Integer> country;
//
// @ApiModelProperty(value = "是否在公海")
// private Boolean isInOpenSea;
//
// @ApiModelProperty(value = "是否潜在客户")
// private Boolean isPotential;
//
//
//
// //api不显示此3个字段
// //是否接收,后台使用
// @JsonIgnore
// private Boolean isCustomerServiceConfirmed;
//
// //因接口公用方法新增:24小时内数据查询条件标识
// private String flag4QueryCondition;
//
// private List<Integer> marketType;
//
// private int deptId ;
//
// @ApiModelProperty(value = "会员编号")
// private String memberCode;
// @ApiModelProperty(value = "会员名称")
// private String memberName;
// @ApiModelProperty(value = "会员手机")
// private String memberMobile;
// @ApiModelProperty(value = "会员区号")
// private String memberAreaCode;
}
......@@ -9,6 +9,7 @@ import lombok.EqualsAndHashCode;
import lombok.ToString;
import org.springframework.format.annotation.DateTimeFormat;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
......@@ -35,8 +36,8 @@ public class CustomerPageReqDTO extends PageParam {
@ApiModelProperty(value = "客户类别")
private List<String> type;
@ApiModelProperty(value = "客户货运类型", notes = "参见customer_transport_type数据字典")
private String transportType;
@ApiModelProperty(value = "出货渠道", notes = "参见customer_transport_type数据字典")
private List<String> transportType;
@ApiModelProperty(value = "客户资源类型", notes = "参见customer_resource_type数据字典")
private List<Integer> resourceType;
......@@ -51,8 +52,11 @@ public class CustomerPageReqDTO extends PageParam {
@ApiModelProperty(value = "客户状态")
private List<Integer> status;
// @ApiModelProperty(value = "部门")
// private String department;
@ApiModelProperty(value = "部门")
private String department;
private List<Long> deptIds;
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
@ApiModelProperty(value = "开始创建时间")
......@@ -100,4 +104,112 @@ public class CustomerPageReqDTO extends PageParam {
private String memberMobile;
@ApiModelProperty(value = "会员区号")
private String memberAreaCode;
// 20240904 add start
@ApiModelProperty(value = "客户角色")
private List<String> role;
/**
* 业务国家 逗号分隔
*/
@ApiModelProperty(value = "业务国家")
private List<Long> busiCountryIds;
@ApiModelProperty(value = "常用提货网点")
private List<Long> pickupPoints;
@ApiModelProperty(value = "创建人")
private Long founder;
// 开始入公海时间和结束入公海时间
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
@ApiModelProperty(value = "开始入公海时间")
private Date beginEnterOpenSeaTime;
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
@ApiModelProperty(value = "结束入公海时间")
private Date endEnterOpenSeaTime;
@ApiModelProperty(value = "业绩类型(老客户:0 新客户:1)")
private Boolean isNew;
// 大于等于年度发货量
@ApiModelProperty(value = "大于等于年度发货量")
private BigDecimal geWeightYearly;
// 小于等于年度发货量
@ApiModelProperty(value = "小于等于年度发货量")
private BigDecimal leWeightYearly;
// 等于年度发货量
@ApiModelProperty(value = "等于年度发货量")
private BigDecimal eqWeightYearly;
// 大于等于年度发货次数
@ApiModelProperty(value = "大于等于年度发货次数")
private Integer geNumYearly;
// 小于等于年度发货次数
@ApiModelProperty(value = "小于等于年度发货次数")
private Integer leNumYearly;
// 等于年度发货次数
@ApiModelProperty(value = "等于年度发货次数")
private Integer eqNumYearly;
@ApiModelProperty(value = "主营商品类型")
private List<Long> productTypes;
@ApiModelProperty(value = "主营商品名称")
private List<Long> productIds;
@ApiModelProperty(value = "主要竞争对手")
private List<Long> competitorIds;
@ApiModelProperty(value = "推介人")
private Long promoter;
@ApiModelProperty(value = "到仓确认")
private Integer arrivalConfirm;
@ApiModelProperty(value = "控货无收货人,1-是,0-否")
private Boolean noConsignee;
@ApiModelProperty(value = "默认付款")
private Boolean defaultPay;
@ApiModelProperty(value = "是否显示提单价格")
private Boolean isShowTidanPrice;
//归属时间
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
@ApiModelProperty(value = "开始归属时间")
private Date beginCustomerServiceConfirmedTime;
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
@ApiModelProperty(value = "结束归属时间")
private Date endCustomerServiceConfirmedTime;
// 首次成交时间
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
@ApiModelProperty(value = "开始首次成交时间")
private Date beginFirstDealTime;
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
@ApiModelProperty(value = "结束首次成交时间")
private Date endFirstDealTime;
@ApiModelProperty(value = "获取方式")
private List<String> getMethods;
//创建入口
@ApiModelProperty(value = "创建入口")
private List<String> createFroms;
// 结算方式
@ApiModelProperty(value = "结算方式")
private List<String> balances;
// 20240904 add end
}
......@@ -1251,20 +1251,27 @@ public class CustomerServiceImpl extends AbstractService<CustomerMapper,
deptId = loginUser.getDeptId();
}
List<CustomerDO> list =
customerMapper.getDeptCustomerPageReq(start, size, pageReqVO, deptId);
long total = customerMapper.getDeptCustomerPageReqCount(pageReqVO, deptId);
return new PageResult<>(list, total, mpPage.getSize(), page.getPage(), (total + mpPage.getSize() - 1) / mpPage.getSize());
// List<CustomerDO> list =
// customerMapper.getDeptCustomerPageReq(start, size, pageReqVO, deptId);
// long total = customerMapper.getDeptCustomerPageReqCount(pageReqVO, deptId);
// return new PageResult<>(list, total, mpPage.getSize(), page.getPage(), (total + mpPage.getSize() - 1) / mpPage.getSize());
// 20240905 注释上面内容,调整使用全部客户分页查询语句
pageReqVO.setDeptIds(Arrays.asList(deptId));
return this.getMyCustomerPage(pageReqVO, page);
}
@Override
public List<CustomerDO> getDeptCustomerExcelVoListReq(CustomerExportReqDTO exportReqVO) {
public List<CustomerDO> getDeptCustomerExcelVoListReq(CustomerExportReqDTO reqVO) {
LoginUser loginUser = SecurityFrameworkUtils.getLoginUser();
Long deptId = null;
if (null != loginUser && loginUser.getDeptId() > 0) {
deptId = loginUser.getDeptId();
}
return customerMapper.getDeptCustomerExcelVoListReq(exportReqVO, deptId);
// return customerMapper.getDeptCustomerExcelVoListReq(reqVO, deptId);
reqVO.setDeptIds(Arrays.asList(deptId));
return customerMapper.getMyPage(null, null, reqVO);
}
@Override
......@@ -1384,18 +1391,19 @@ public class CustomerServiceImpl extends AbstractService<CustomerMapper,
pageReqVO.setIsInOpenSea(false);
pageReqVO.setIsCustomerServiceConfirmed(false);
pageReqVO.setCustomerService(null);
IPage<CustomerDO> mpPage = MyBatisUtils.buildPage(page);
log.warn(I18nMessage.getLang().toString());
page.setPage(pageReqVO.getPageNo());
page.setRows(pageReqVO.getPageSize());
int start = (page.getPage() - 1) * page.getRows();
int size = page.getRows();
List<CustomerDO> list =
customerMapper.getWaitToAssignedCustomerPageReq(start, size, pageReqVO);
long total = customerMapper.getWaitToAssignedCustomerPageReqCount(pageReqVO);
return new PageResult<>(list, total, mpPage.getSize(), page.getPage(), (total + mpPage.getSize() - 1) / mpPage.getSize());
// IPage<CustomerDO> mpPage = MyBatisUtils.buildPage(page);
// log.warn(I18nMessage.getLang().toString());
//
// page.setPage(pageReqVO.getPageNo());
// page.setRows(pageReqVO.getPageSize());
//
// int start = (page.getPage() - 1) * page.getRows();
// int size = page.getRows();
// List<CustomerDO> list =
// customerMapper.getWaitToAssignedCustomerPageReq(start, size, pageReqVO);
// long total = customerMapper.getWaitToAssignedCustomerPageReqCount(pageReqVO);
// return new PageResult<>(list, total, mpPage.getSize(), page.getPage(), (total + mpPage.getSize() - 1) / mpPage.getSize());
return this.getMyCustomerPage(pageReqVO, page);
}
@Override
......@@ -1446,8 +1454,9 @@ public class CustomerServiceImpl extends AbstractService<CustomerMapper,
}
@Override
public List<CustomerDO> getWaitToAssignedCustomerExcelVoListReq(CustomerExportReqDTO exportReqVO) {
return customerMapper.getWaitToAssignedCustomerListReq(exportReqVO);
public List<CustomerDO> getWaitToAssignedCustomerExcelVoListReq(CustomerExportReqDTO reqVO) {
// return customerMapper.getWaitToAssignedCustomerListReq(reqVO);
return customerMapper.getMyPage(null, null, reqVO);
}
@Override
......@@ -1509,18 +1518,20 @@ public class CustomerServiceImpl extends AbstractService<CustomerMapper,
public PageResult<CustomerDO> getWaitToConfirmCustomerPageReq(CustomerPageReqDTO pageReqVO, PageVO page) {
pageReqVO.setIsCustomerServiceConfirmed(false);
pageReqVO.setIsInOpenSea(false);
IPage<CustomerDO> mpPage = MyBatisUtils.buildPage(page);
log.warn(I18nMessage.getLang().toString());
page.setPage(pageReqVO.getPageNo());
page.setRows(pageReqVO.getPageSize());
// IPage<CustomerDO> mpPage = MyBatisUtils.buildPage(page);
// log.warn(I18nMessage.getLang().toString());
//
// page.setPage(pageReqVO.getPageNo());
// page.setRows(pageReqVO.getPageSize());
//
// int start = (page.getPage() - 1) * page.getRows();
// int size = page.getRows();
// List<CustomerDO> list =
// customerMapper.getWaitToConfirmCustomerPageReq(start, size, pageReqVO);
// long total = customerMapper.getWaitToConfirmCustomerPageReqCount(pageReqVO);
// return new PageResult<>(list, total, mpPage.getSize(), page.getPage(), (total + mpPage.getSize() - 1) / mpPage.getSize());
int start = (page.getPage() - 1) * page.getRows();
int size = page.getRows();
List<CustomerDO> list =
customerMapper.getWaitToConfirmCustomerPageReq(start, size, pageReqVO);
long total = customerMapper.getWaitToConfirmCustomerPageReqCount(pageReqVO);
return new PageResult<>(list, total, mpPage.getSize(), page.getPage(), (total + mpPage.getSize() - 1) / mpPage.getSize());
return this.getMyCustomerPage(pageReqVO, page);
}
@Override
......@@ -1589,7 +1600,8 @@ public class CustomerServiceImpl extends AbstractService<CustomerMapper,
reqVO.setCustomerService(setCustomerService);
}
return customerMapper.getWaitToConfirmCustomerExcelVoListReq(reqVO);
// return customerMapper.getWaitToConfirmCustomerExcelVoListReq(reqVO);
return customerMapper.getMyPage(null, null, reqVO);
}
@Override
......@@ -1648,18 +1660,20 @@ public class CustomerServiceImpl extends AbstractService<CustomerMapper,
public PageResult<CustomerDO> getOpenSeaCustomerPageReq(CustomerPageReqDTO pageReqVO, PageVO page) {
pageReqVO.setIsInOpenSea(true);
IPage<CustomerDO> mpPage = MyBatisUtils.buildPage(page);
log.warn(I18nMessage.getLang().toString());
page.setPage(pageReqVO.getPageNo());
page.setRows(pageReqVO.getPageSize());
// IPage<CustomerDO> mpPage = MyBatisUtils.buildPage(page);
// log.warn(I18nMessage.getLang().toString());
//
// page.setPage(pageReqVO.getPageNo());
// page.setRows(pageReqVO.getPageSize());
//
// int start = (page.getPage() - 1) * page.getRows();
// int size = page.getRows();
// List<CustomerDO> list =
// customerMapper.getOpenSeaCustomerPageReq(start, size, pageReqVO);
// long total = customerMapper.getOpenSeaCustomerPageReqCount(pageReqVO);
// return new PageResult<>(list, total, mpPage.getSize(), page.getPage(), (total + mpPage.getSize() - 1) / mpPage.getSize());
int start = (page.getPage() - 1) * page.getRows();
int size = page.getRows();
List<CustomerDO> list =
customerMapper.getOpenSeaCustomerPageReq(start, size, pageReqVO);
long total = customerMapper.getOpenSeaCustomerPageReqCount(pageReqVO);
return new PageResult<>(list, total, mpPage.getSize(), page.getPage(), (total + mpPage.getSize() - 1) / mpPage.getSize());
return this.getMyCustomerPage(pageReqVO, page);
}
@Override
......@@ -1712,7 +1726,8 @@ public class CustomerServiceImpl extends AbstractService<CustomerMapper,
@Override
public List<CustomerDO> getPublicCustomerExcelVoReqList(@Param("query") CustomerExportReqDTO reqVO) {
reqVO.setIsInOpenSea(true);
return customerMapper.getPublicCustomerExcelVoReqList(reqVO);
// return customerMapper.getPublicCustomerExcelVoReqList(reqVO);
return customerMapper.getMyPage(null, null, reqVO);
}
@Override
......@@ -1760,7 +1775,8 @@ public class CustomerServiceImpl extends AbstractService<CustomerMapper,
@Override
public List<CustomerDO> getMyCustomerExcelVoList(CustomerExportReqDTO reqVO) {
return customerMapper.getMyCustomerExcelVoList(reqVO);
// return customerMapper.getMyCustomerExcelVoList(reqVO);
return customerMapper.getMyPage(null, null, reqVO);
}
@Override
......
......@@ -77,7 +77,7 @@
su.nickname as customer_service_name,
su.dept_id as dept_id,
(SELECT GROUP_CONCAT(name) FROM ecw_customer_competitor n WHERE FIND_IN_SET(n.id,(SELECT competitor_ids FROM ecw_customer WHERE id=a.id))) AS competitor_names,
su2.creator as create_username
su2.nickname as create_username
from ecw_customer a
left join (select * from ecw_customer_contacts where is_default = 1 and deleted = 0) as c on a.id = c.customer_id
left join system_user su on a.customer_service = su.id
......@@ -97,7 +97,10 @@
GROUP BY contact.id
order by contact.id desc
<if test="start != null and size != null">
limit #{start}, #{size}
</if>
</select>
<select id="getWaitToAssignedCustomerPageReq"
......@@ -519,27 +522,22 @@
AND contact.is_customer_service_confirmed = #{query.isCustomerServiceConfirmed}
</if>
<if test="query.department != null and query.department != '' ">
AND contact.department = #{query.department}
</if>
<!--跟进客服 -->
<if test="query.customerService != null and query.customerService.size()>0">
<if test="query.customerService != null and query.customerService != '' and query.customerService.size()==1 ">
AND contact.customer_service =
<foreach item='customerService' index="index" collection='query.customerService' >
#{customerService}
<!--部门deptIds-->
<if test="query.deptIds != null and query.deptIds.size()>0">
AND
<foreach item='item' index="index" collection='query.deptIds' open='(' separator='or' close=')'>
FIND_IN_SET(#{item}, contact.dept_id)
</foreach>
</if>
<if test="query.customerService != null and query.customerService != '' and query.customerService.size()>1 ">
AND contact.customer_service in
<foreach item='customerService' index="index" collection='query.customerService' open='(' separator=',' close=')'>
#{customerService}
<!--跟进客服 -->
<if test="query.customerService != null and query.customerService.size()>0">
AND
<foreach item='item' index="index" collection='query.customerService' open='(' separator='or' close=')'>
FIND_IN_SET(#{item}, contact.customer_service)
</foreach>
</if>
</if>
<!--市场获客 -->
......@@ -577,111 +575,192 @@
<!--信用等级 -->
<if test="query.creditLevel != null and query.creditLevel.size()>0">
<if test="query.creditLevel != null and query.creditLevel != '' and query.creditLevel.size()==1 ">
AND contact.credit_level =
<foreach item='creditLevel' index="index" collection='query.creditLevel' >
#{creditLevel}
</foreach>
</if>
<if test="query.creditLevel != null and query.creditLevel != '' and query.creditLevel.size()>1 ">
AND contact.credit_level in
<foreach item='creditLevel' index="index" collection='query.creditLevel' open='(' separator=',' close=')'>
#{creditLevel}
AND
<foreach item='item' index="index" collection='query.creditLevel' open='(' separator='or' close=')'>
FIND_IN_SET(#{item}, contact.credit_level)
</foreach>
</if>
</if>
<!--客户类别 -->
<if test="query.type != null and query.type.size()>0">
AND
<foreach item='item' index="index" collection='query.type' open='(' separator='or' close=')'>
FIND_IN_SET(#{item}, contact.type)
</foreach>
</if>
<if test="query.type != null and query.type != '' and query.type.size()==1 ">
AND contact.type =
<foreach item='type' index="index" collection='query.type' >
#{type}
<!--客户来源 -->
<if test="query.source != null and query.source.size()>0">
AND
<foreach item='item' index="index" collection='query.source' open='(' separator='or' close=')'>
FIND_IN_SET(#{item}, contact.source)
</foreach>
</if>
<if test="query.type != null and query.type != '' and query.type.size()>1 ">
AND contact.type in
<foreach item='type' index="index" collection='query.type' open='(' separator=',' close=')'>
#{type}
<!--国家 -->
<if test="query.country != null and query.country.size()>0">
AND
<foreach item='item' index="index" collection='query.country' open='(' separator='or' close=')'>
FIND_IN_SET(#{item}, contact.country)
</foreach>
</if>
<!--客户状态 -->
<if test="query.status != null and query.status.size()>0">
AND
<foreach item='item' index="index" collection='query.status' open='(' separator='or' close=')'>
FIND_IN_SET(#{item}, contact.status)
</foreach>
</if>
<!--客户等级 -->
<if test="query.level != null and query.level.size()>0">
AND
<foreach item='item' index="index" collection='query.level' open='(' separator='or' close=')'>
FIND_IN_SET(#{item}, contact.level)
</foreach>
</if>
<!--客户来源 -->
<if test="query.source != null and query.source.size()>0">
<!--角色-->
<if test="query.role != null and query.role.size()>0">
AND
<foreach item='item' index="index" collection='query.role' open='(' separator='or' close=')'>
FIND_IN_SET(#{item}, contact.roles)
</foreach>
</if>
<if test="query.source != null and query.source != '' and query.source.size()==1 ">
AND contact.source =
<foreach item='source' index="index" collection='query.source' >
#{source}
<!--出货渠道-->
<if test="query.transportType != null and query.transportType.size()>0">
AND
<foreach item='item' index="index" collection='query.transportType' open='(' separator='or' close=')'>
FIND_IN_SET(#{item}, contact.transport_type)
</foreach>
</if>
<if test="query.source != null and query.source != '' and query.source.size()>1 ">
AND contact.source in
<foreach item='source' index="index" collection='query.source' open='(' separator=',' close=')'>
#{source}
<!--业务国家-->
<if test="query.busiCountryIds != null and query.busiCountryIds.size()>0">
AND
<foreach item='item' index="index" collection='query.busiCountryIds' open='(' separator='or' close=')'>
FIND_IN_SET(#{item}, contact.busi_country_ids)
</foreach>
</if>
<!--创建人-->
<if test="query.founder != null">
AND contact.founder = #{query.founder}
</if>
<!--国家 -->
<if test="query.country != null and query.country.size()>0">
<!--开始入公海时间和结束入公海时间-->
<if test="query.beginEnterOpenSeaTime != null and query.endEnterOpenSeaTime != null">
AND (
(contact.enter_open_sea_time is not null and contact.enter_open_sea_time BETWEEN #{query.beginEnterOpenSeaTime} AND #{query.endEnterOpenSeaTime})
or (contact.enter_open_sea_time is null and contact.estimate_enter_open_sea_time BETWEEN #{query.beginEnterOpenSeaTime} AND #{query.endEnterOpenSeaTime})
)
</if>
<if test="query.country != null and query.country != '' and query.country.size()==1 ">
AND contact.country =
<foreach item='country' index="index" collection='query.country' >
#{country}
</foreach>
<!--是否新客户-->
<if test="query.isNew != null">
AND contact.is_new = #{query.isNew}
</if>
<if test="query.country != null and query.country != '' and query.country.size()>1 ">
AND contact.country in
<foreach item='country' index="index" collection='query.country' open='(' separator=',' close=')'>
#{country}
</foreach>
<!--年度发货量 大于等于/小于等于/等于-->
<if test="query.geWeightYearly != null">
AND contact.weight_yearly <![CDATA[ >= ]]> #{query.geWeightYearly}
</if>
<if test="query.leWeightYearly != null">
AND contact.weight_yearly <![CDATA[ <= ]]> #{query.leWeightYearly}
</if>
<if test="query.eqWeightYearly != null">
AND contact.weight_yearly = #{query.eqWeightYearly}
</if>
<!--客户状态 -->
<if test="query.status != null and query.status.size()>0">
<!--年度发货次数 大于等于/小于等于/等于-->
<if test="query.geNumYearly != null">
AND contact.num_yearly <![CDATA[ >= ]]> #{query.geNumYearly}
</if>
<if test="query.leNumYearly != null">
AND contact.num_yearly <![CDATA[ <= ]]> #{query.leNumYearly}
</if>
<if test="query.leNumYearly != null">
AND contact.num_yearly = #{query.leNumYearly}
</if>
<if test="query.status != null and query.status != '' and query.status.size()==1 ">
AND contact.status =
<foreach item='status' index="index" collection='query.status' >
#{status}
<!--主营商品类型-->
<if test="query.productTypes != null and query.productTypes.size()>0">
AND
<foreach item='item' index="index" collection='query.productTypes' open='(' separator='or' close=')'>
FIND_IN_SET(#{item}, contact.product_type)
</foreach>
</if>
<!--主营商品名称-->
<if test="query.productIds != null and query.productIds.size()>0">
AND
<foreach item='item' index="index" collection='query.productIds' open='(' separator='or' close=')'>
FIND_IN_SET(#{item}, contact.product_ids)
</foreach>
</if>
<if test="query.status != null and query.status != '' and query.status.size()>1 ">
AND contact.status in
<foreach item='status' index="index" collection='query.status' open='(' separator=',' close=')'>
#{status}
<!--主要竞争对手-->
<if test="query.competitorIds != null and query.competitorIds.size()>0">
AND
<foreach item='item' index="index" collection='query.competitorIds' open='(' separator='or' close=')'>
FIND_IN_SET(#{item}, contact.competitor_ids)
</foreach>
</if>
<!--推介人 promoter-->
<if test="query.promoter != null">
AND contact.promoter = #{query.promoter}
</if>
<!--到仓确认-->
<if test="query.arrivalConfirm != null">
AND contact.arrival_confirm = #{query.arrivalConfirm}
</if>
<!--控货无收货人-->
<if test="query.noConsignee != null">
AND contact.no_consignee = #{query.noConsignee}
</if>
<!--默认付款-->
<if test="query.defaultPay != null">
AND contact.default_pay = #{query.defaultPay}
</if>
<!--是否显示提单价格-->
<if test="query.isShowTidanPrice != null">
AND contact.is_show_tidan_price = #{query.isShowTidanPrice}
</if>
<!--客户等级 -->
<if test="query.level != null and query.level.size()>0">
<if test="query.level != null and query.level != '' and query.level.size()==1 ">
AND contact.level =
<foreach item='level' index="index" collection='query.level' >
#{level}
</foreach>
<!--归属时间-->
<if test="query.beginCustomerServiceConfirmedTime != null and query.endCustomerServiceConfirmedTime != null">
AND contact.customer_service_confirmed_time BETWEEN #{query.beginCustomerServiceConfirmedTime} AND #{query.endCustomerServiceConfirmedTime}
</if>
<!--首次成交时间-->
<if test="query.beginFirstDealTime != null and query.endFirstDealTime != null">
AND contact.first_deal_time BETWEEN #{query.beginFirstDealTime} AND #{query.endFirstDealTime}
</if>
<if test="query.level != null and query.level != '' and query.level.size()>1 ">
AND contact.level in
<foreach item='level' index="index" collection='query.level' open='(' separator=',' close=')'>
#{level}
<!--获取方式-->
<if test="query.getMethods != null and query.getMethods.size()>0">
AND
<foreach item='item' index="index" collection='query.getMethods' open='(' separator='or' close=')'>
FIND_IN_SET(#{item}, contact.get_method)
</foreach>
</if>
<!--创建入口-->
<if test="query.createFroms != null and query.createFroms.size()>0">
AND
<foreach item='item' index="index" collection='query.createFroms' open='(' separator='or' close=')'>
FIND_IN_SET(#{item}, contact.create_from)
</foreach>
</if>
<!--结算方式balances-->
<if test="query.balances != null and query.balances.size()>0">
AND
<foreach item='item' index="index" collection='query.balances' open='(' separator='or' close=')'>
FIND_IN_SET(#{item}, contact.balance)
</foreach>
</if>
<!-- 会员信息 -->
<if test="query.memberCode != null and query.memberCode != '' ">
......
......@@ -41,7 +41,7 @@ Content-Type: application/json
{"inquiry":null,"id":"38155","number":"SGP00004","name":"yh2345","nameEn":null,"level":1,"country":194,"type":"0,1","transportType":"1","agentId":null,"company":"","companyEn":null,"payerName":null,"address":null,"productType":null,"productId":null,"pickupPoint":null,"memberId":null,"birthday":null,"balance":null,"source":5,"picture":null,"customerService":null,"customerContacts":[{"customerId":38155,"department":"","position":"","name":"yh12345","nameEn":"","social":null,"socialNumber":"","email":"","isDefault":1,"userid":null,"username":null,"areaCode":"65","phoneNew":"66666666","createTime":1692929203000,"id":69056,"customerContactsId":69056,"customerName":null,"company":""}],"customerLines":[],"lightUnit":null,"promoter":null,"status":1,"founder":118,"department":null,"invoiceTitle":null,"licenseNumber":null,"bank":null,"bankNumber":null,"project":null,"billingAddress":null,"billingTell":null,"taxRate":0,"remarks":null,"arrivalConfirm":0,"weightUnit":null,"createTime":1692924735000,"isShowTidanPrice":true,"carName":null,"carNo":null,"customerBanks":[],"creditLevel":3,"vipLevelScore":1,"vipLevelNameZh":"普通","vipLevelNameEn":"common","creditLevelScore":400,"creditLevelNameZh":"信用良好","creditLevelNameEn":"good credit","customerServiceName":null,"consigneeFirstCustomerService":null,"isNew":true,"resourceType":1,"isInOpenSea":false,"enterOpenSeaTime":null,"estimateEnterOpenSeaTime":null,"catchTime":null,"promoterName":null,"enquiryInfo":null,"isCustomerServiceConfirmed":false,"isWebOrderConsigneeSync":false,"isPotential":false,"founderName":"yanghao","customerBankBackVOList":[],"countryNameZh":"新加坡","countryNameEn":"Singapore","productTypeNameZh":null,"productTypeNameEn":null,"productNameZh":null,"productNameEn":null,"pickupPointNameZh":null,"pickupPointNameEn":null}
### page
GET {{baseUrl}}/ecw/customer/page?pageNo=1&pageSize=100&name=
GET {{baseUrl}}/ecw/customer/page?pageNo=1&pageSize=10&customerService[0]=1144&customerService[1]=2659&beginEnterOpenSeaTime=2024-10-02%2000%3A00%3A00&endEnterOpenSeaTime=2024-10-05%2000%3A00%3A00
Authorization: Bearer {{token}}
tenant-id: {{adminTenentId}}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment