Commit 2d917bd9 authored by yanghao's avatar yanghao

Merge branch 'release-fix' into release

parents 5e8d7644 10f2983e
......@@ -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;
}
......@@ -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
......
......@@ -97,7 +97,10 @@
GROUP BY contact.id
order by contact.id desc
limit #{start}, #{size}
<if test="start != null and size != null">
limit #{start}, #{size}
</if>
</select>
<select id="getWaitToAssignedCustomerPageReq"
......@@ -656,8 +659,8 @@
</if>
<!--是否新客户-->
<if test="query.isInOpenSea != null">
AND contact.is_in_open_sea = #{query.isInOpenSea}
<if test="query.isNew != null">
AND contact.is_new = #{query.isNew}
</if>
......
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