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> { ...@@ -36,7 +36,7 @@ public interface CustomerMapper extends BaseMapperX<CustomerDO> {
IPage<CustomerDO> getPage(IPage<CustomerDO> page, IPage<CustomerDO> getPage(IPage<CustomerDO> page,
@Param(Constants.WRAPPER) Wrapper<CustomerDO> queryWrapper); @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); List<CustomerDO> getWaitToAssignedCustomerPageReq(@Param("start") int start, @Param("size") int size, @Param("query")CustomerPageReqDTO customerPageReqDTO);
/** /**
......
...@@ -11,90 +11,90 @@ import java.util.List; ...@@ -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; import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
@Data @Data
public class CustomerExportReqDTO { public class CustomerExportReqDTO extends CustomerPageReqDTO {
@ApiModelProperty(value = "客户编号") // @ApiModelProperty(value = "客户编号")
private String number; // private String number;
//
@ApiModelProperty(value = "客户名称") // @ApiModelProperty(value = "客户名称")
private String name; // private String name;
//
@ApiModelProperty(value = "客户等级") // @ApiModelProperty(value = "客户等级")
private List<Integer> level; // private List<Integer> level;
//
@ApiModelProperty(value = "客户来源") // @ApiModelProperty(value = "客户来源")
private List<Integer> source; // private List<Integer> source;
//
@ApiModelProperty(value = "客户类别") // @ApiModelProperty(value = "客户类别")
private List<String> type; // private List<String> type;
//
@ApiModelProperty(value = "客户货运类型", notes = "参见customer_transport_type数据字典") // @ApiModelProperty(value = "客户货运类型", notes = "参见customer_transport_type数据字典")
private String transportType; // private String transportType;
//
@ApiModelProperty(value = "客户资源类型", notes = "参见customer_resource_type数据字典") // @ApiModelProperty(value = "客户资源类型", notes = "参见customer_resource_type数据字典")
private List<Integer> resourceType; // private List<Integer> resourceType;
//
@ApiModelProperty(value = "跟进客服") // @ApiModelProperty(value = "跟进客服")
private List<Long> customerService; // private List<Long> customerService;
//
@ApiModelProperty(value = "客户状态") // @ApiModelProperty(value = "客户状态")
private List<Integer> status; // private List<Integer> status;
//
@ApiModelProperty(value = "部门") // @ApiModelProperty(value = "部门")
private String department; // private String department;
//
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) // @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
@ApiModelProperty(value = "开始创建时间") // @ApiModelProperty(value = "开始创建时间")
private Date beginCreateTime; // private Date beginCreateTime;
//
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) // @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
@ApiModelProperty(value = "结束创建时间") // @ApiModelProperty(value = "结束创建时间")
private Date endCreateTime; // private Date endCreateTime;
//
//
//
@ApiModelProperty(value = "主联系人") // @ApiModelProperty(value = "主联系人")
private String defaultContactName; // private String defaultContactName;
//
@ApiModelProperty(value = "主联系电话") // @ApiModelProperty(value = "主联系电话")
private String defaultContactPhone; // private String defaultContactPhone;
//
//
//
@ApiModelProperty(value = "信用等级") // @ApiModelProperty(value = "信用等级")
private List<Integer> creditLevel; // private List<Integer> creditLevel;
//
@ApiModelProperty(value = "国家") // @ApiModelProperty(value = "国家")
private List<Integer> country; // private List<Integer> country;
//
@ApiModelProperty(value = "是否在公海") // @ApiModelProperty(value = "是否在公海")
private Boolean isInOpenSea; // private Boolean isInOpenSea;
//
@ApiModelProperty(value = "是否潜在客户") // @ApiModelProperty(value = "是否潜在客户")
private Boolean isPotential; // private Boolean isPotential;
//
//
//
//api不显示此3个字段 // //api不显示此3个字段
//是否接收,后台使用 // //是否接收,后台使用
@JsonIgnore // @JsonIgnore
private Boolean isCustomerServiceConfirmed; // private Boolean isCustomerServiceConfirmed;
//
//因接口公用方法新增:24小时内数据查询条件标识 // //因接口公用方法新增:24小时内数据查询条件标识
private String flag4QueryCondition; // private String flag4QueryCondition;
//
private List<Integer> marketType; // private List<Integer> marketType;
//
private int deptId ; // private int deptId ;
//
@ApiModelProperty(value = "会员编号") // @ApiModelProperty(value = "会员编号")
private String memberCode; // private String memberCode;
@ApiModelProperty(value = "会员名称") // @ApiModelProperty(value = "会员名称")
private String memberName; // private String memberName;
@ApiModelProperty(value = "会员手机") // @ApiModelProperty(value = "会员手机")
private String memberMobile; // private String memberMobile;
@ApiModelProperty(value = "会员区号") // @ApiModelProperty(value = "会员区号")
private String memberAreaCode; // private String memberAreaCode;
} }
...@@ -1251,20 +1251,27 @@ public class CustomerServiceImpl extends AbstractService<CustomerMapper, ...@@ -1251,20 +1251,27 @@ public class CustomerServiceImpl extends AbstractService<CustomerMapper,
deptId = loginUser.getDeptId(); deptId = loginUser.getDeptId();
} }
List<CustomerDO> list = // List<CustomerDO> list =
customerMapper.getDeptCustomerPageReq(start, size, pageReqVO, deptId); // customerMapper.getDeptCustomerPageReq(start, size, pageReqVO, deptId);
long total = customerMapper.getDeptCustomerPageReqCount(pageReqVO, deptId); // long total = customerMapper.getDeptCustomerPageReqCount(pageReqVO, deptId);
return new PageResult<>(list, total, mpPage.getSize(), page.getPage(), (total + mpPage.getSize() - 1) / mpPage.getSize()); // 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 @Override
public List<CustomerDO> getDeptCustomerExcelVoListReq(CustomerExportReqDTO exportReqVO) { public List<CustomerDO> getDeptCustomerExcelVoListReq(CustomerExportReqDTO reqVO) {
LoginUser loginUser = SecurityFrameworkUtils.getLoginUser(); LoginUser loginUser = SecurityFrameworkUtils.getLoginUser();
Long deptId = null; Long deptId = null;
if (null != loginUser && loginUser.getDeptId() > 0) { if (null != loginUser && loginUser.getDeptId() > 0) {
deptId = loginUser.getDeptId(); 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 @Override
...@@ -1384,18 +1391,19 @@ public class CustomerServiceImpl extends AbstractService<CustomerMapper, ...@@ -1384,18 +1391,19 @@ public class CustomerServiceImpl extends AbstractService<CustomerMapper,
pageReqVO.setIsInOpenSea(false); pageReqVO.setIsInOpenSea(false);
pageReqVO.setIsCustomerServiceConfirmed(false); pageReqVO.setIsCustomerServiceConfirmed(false);
pageReqVO.setCustomerService(null); pageReqVO.setCustomerService(null);
IPage<CustomerDO> mpPage = MyBatisUtils.buildPage(page); // IPage<CustomerDO> mpPage = MyBatisUtils.buildPage(page);
log.warn(I18nMessage.getLang().toString()); // log.warn(I18nMessage.getLang().toString());
//
page.setPage(pageReqVO.getPageNo()); // page.setPage(pageReqVO.getPageNo());
page.setRows(pageReqVO.getPageSize()); // page.setRows(pageReqVO.getPageSize());
//
int start = (page.getPage() - 1) * page.getRows(); // int start = (page.getPage() - 1) * page.getRows();
int size = page.getRows(); // int size = page.getRows();
List<CustomerDO> list = // List<CustomerDO> list =
customerMapper.getWaitToAssignedCustomerPageReq(start, size, pageReqVO); // customerMapper.getWaitToAssignedCustomerPageReq(start, size, pageReqVO);
long total = customerMapper.getWaitToAssignedCustomerPageReqCount(pageReqVO); // long total = customerMapper.getWaitToAssignedCustomerPageReqCount(pageReqVO);
return new PageResult<>(list, total, mpPage.getSize(), page.getPage(), (total + mpPage.getSize() - 1) / mpPage.getSize()); // return new PageResult<>(list, total, mpPage.getSize(), page.getPage(), (total + mpPage.getSize() - 1) / mpPage.getSize());
return this.getMyCustomerPage(pageReqVO, page);
} }
@Override @Override
...@@ -1446,8 +1454,9 @@ public class CustomerServiceImpl extends AbstractService<CustomerMapper, ...@@ -1446,8 +1454,9 @@ public class CustomerServiceImpl extends AbstractService<CustomerMapper,
} }
@Override @Override
public List<CustomerDO> getWaitToAssignedCustomerExcelVoListReq(CustomerExportReqDTO exportReqVO) { public List<CustomerDO> getWaitToAssignedCustomerExcelVoListReq(CustomerExportReqDTO reqVO) {
return customerMapper.getWaitToAssignedCustomerListReq(exportReqVO); // return customerMapper.getWaitToAssignedCustomerListReq(reqVO);
return customerMapper.getMyPage(null, null, reqVO);
} }
@Override @Override
...@@ -1509,18 +1518,20 @@ public class CustomerServiceImpl extends AbstractService<CustomerMapper, ...@@ -1509,18 +1518,20 @@ public class CustomerServiceImpl extends AbstractService<CustomerMapper,
public PageResult<CustomerDO> getWaitToConfirmCustomerPageReq(CustomerPageReqDTO pageReqVO, PageVO page) { public PageResult<CustomerDO> getWaitToConfirmCustomerPageReq(CustomerPageReqDTO pageReqVO, PageVO page) {
pageReqVO.setIsCustomerServiceConfirmed(false); pageReqVO.setIsCustomerServiceConfirmed(false);
pageReqVO.setIsInOpenSea(false); pageReqVO.setIsInOpenSea(false);
IPage<CustomerDO> mpPage = MyBatisUtils.buildPage(page); // IPage<CustomerDO> mpPage = MyBatisUtils.buildPage(page);
log.warn(I18nMessage.getLang().toString()); // log.warn(I18nMessage.getLang().toString());
//
page.setPage(pageReqVO.getPageNo()); // page.setPage(pageReqVO.getPageNo());
page.setRows(pageReqVO.getPageSize()); // 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(); return this.getMyCustomerPage(pageReqVO, page);
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());
} }
@Override @Override
...@@ -1589,7 +1600,8 @@ public class CustomerServiceImpl extends AbstractService<CustomerMapper, ...@@ -1589,7 +1600,8 @@ public class CustomerServiceImpl extends AbstractService<CustomerMapper,
reqVO.setCustomerService(setCustomerService); reqVO.setCustomerService(setCustomerService);
} }
return customerMapper.getWaitToConfirmCustomerExcelVoListReq(reqVO); // return customerMapper.getWaitToConfirmCustomerExcelVoListReq(reqVO);
return customerMapper.getMyPage(null, null, reqVO);
} }
@Override @Override
...@@ -1648,18 +1660,20 @@ public class CustomerServiceImpl extends AbstractService<CustomerMapper, ...@@ -1648,18 +1660,20 @@ public class CustomerServiceImpl extends AbstractService<CustomerMapper,
public PageResult<CustomerDO> getOpenSeaCustomerPageReq(CustomerPageReqDTO pageReqVO, PageVO page) { public PageResult<CustomerDO> getOpenSeaCustomerPageReq(CustomerPageReqDTO pageReqVO, PageVO page) {
pageReqVO.setIsInOpenSea(true); pageReqVO.setIsInOpenSea(true);
IPage<CustomerDO> mpPage = MyBatisUtils.buildPage(page); // IPage<CustomerDO> mpPage = MyBatisUtils.buildPage(page);
log.warn(I18nMessage.getLang().toString()); // log.warn(I18nMessage.getLang().toString());
//
page.setPage(pageReqVO.getPageNo()); // page.setPage(pageReqVO.getPageNo());
page.setRows(pageReqVO.getPageSize()); // 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(); return this.getMyCustomerPage(pageReqVO, page);
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());
} }
@Override @Override
...@@ -1712,7 +1726,8 @@ public class CustomerServiceImpl extends AbstractService<CustomerMapper, ...@@ -1712,7 +1726,8 @@ public class CustomerServiceImpl extends AbstractService<CustomerMapper,
@Override @Override
public List<CustomerDO> getPublicCustomerExcelVoReqList(@Param("query") CustomerExportReqDTO reqVO) { public List<CustomerDO> getPublicCustomerExcelVoReqList(@Param("query") CustomerExportReqDTO reqVO) {
reqVO.setIsInOpenSea(true); reqVO.setIsInOpenSea(true);
return customerMapper.getPublicCustomerExcelVoReqList(reqVO); // return customerMapper.getPublicCustomerExcelVoReqList(reqVO);
return customerMapper.getMyPage(null, null, reqVO);
} }
@Override @Override
...@@ -1760,7 +1775,8 @@ public class CustomerServiceImpl extends AbstractService<CustomerMapper, ...@@ -1760,7 +1775,8 @@ public class CustomerServiceImpl extends AbstractService<CustomerMapper,
@Override @Override
public List<CustomerDO> getMyCustomerExcelVoList(CustomerExportReqDTO reqVO) { public List<CustomerDO> getMyCustomerExcelVoList(CustomerExportReqDTO reqVO) {
return customerMapper.getMyCustomerExcelVoList(reqVO); // return customerMapper.getMyCustomerExcelVoList(reqVO);
return customerMapper.getMyPage(null, null, reqVO);
} }
@Override @Override
......
...@@ -97,7 +97,10 @@ ...@@ -97,7 +97,10 @@
GROUP BY contact.id GROUP BY contact.id
order by contact.id desc order by contact.id desc
limit #{start}, #{size} <if test="start != null and size != null">
limit #{start}, #{size}
</if>
</select> </select>
<select id="getWaitToAssignedCustomerPageReq" <select id="getWaitToAssignedCustomerPageReq"
...@@ -656,8 +659,8 @@ ...@@ -656,8 +659,8 @@
</if> </if>
<!--是否新客户--> <!--是否新客户-->
<if test="query.isInOpenSea != null"> <if test="query.isNew != null">
AND contact.is_in_open_sea = #{query.isInOpenSea} AND contact.is_new = #{query.isNew}
</if> </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