Commit e55a9540 authored by zhengyi's avatar zhengyi

跟进列表查询参数与返回值修改

parent 7cceaf7c
package cn.iocoder.yudao.module.customer.dal.dataobject.customerFollowup;
import com.alibaba.excel.annotation.ExcelProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import java.util.*;
import com.baomidou.mybatisplus.annotation.*;
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
import org.springframework.format.annotation.DateTimeFormat;
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
/**
* 客户跟进 DO
......@@ -113,6 +117,8 @@ public class CustomerFollowupDO extends BaseDO {
@TableField(exist = false)
private String customerNumber;
@TableField(exist = false)
private String customerName;
@TableField(exist = false)
private String offerNumber;
//creator_name
@TableField(exist = false)
......@@ -124,8 +130,15 @@ public class CustomerFollowupDO extends BaseDO {
@TableField(exist = false)
private String followUserName;
@TableField(exist = false)
@ApiModelProperty(value = "客户来源")
private String customerSource;
@TableField(exist = false)
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
@JsonFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
@ApiModelProperty(value = "客户创建时间")
private Date customerCreateTime;
@ApiModelProperty(value = "联系人电话")
@TableField(exist = false)
......
......@@ -52,6 +52,20 @@ public class CustomerFollowupBackVO {
@ApiModelProperty(value = "客户编号")
private String customerNumber;
@ExcelProperty("客户名称")
@ApiModelProperty(value = "客户名称")
private String customerName;
@ExcelProperty("客户来源")
@ApiModelProperty(value = "客户来源")
private String customerSource;
@ExcelProperty("客户创建时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
@JsonFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
@ApiModelProperty(value = "客户创建时间")
private Date customerCreateTime;
// 联系人id
@ApiModelProperty(value = "联系人id")
private Long contactId;
......@@ -97,6 +111,7 @@ public class CustomerFollowupBackVO {
@ExcelProperty("下次跟进时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
@JsonFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
@ApiModelProperty(value = "下次跟进时间")
private Date nextTime;
......@@ -141,6 +156,7 @@ public class CustomerFollowupBackVO {
@ExcelProperty("最后更新时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
@JsonFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
@ApiModelProperty(value = "更新时间")
private Date updateTime;
......
......@@ -118,18 +118,28 @@ public class CustomerFollowupQueryVO extends PageParam {
@ApiModelProperty(value = "跟进状态,下拉多选")
private List<Integer> statuses;
@ApiModelProperty(value = "客户经理/跟进业务员ids")
private List<Long> followUserIds;
@ApiModelProperty(value = "联系人电话")
private String contactPhone;
@ApiModelProperty(value = "客户名称")
private String customerName;
@ApiModelProperty(value = "操作用户的所属权限部门ID列表")
private List<Long> deptIdList;
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
@ApiModelProperty(value = "开始客户创建时间")
private Date beginCustomerCreateTime;
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
@ApiModelProperty(value = "结束客户创建时间")
private Date endCustomerCreateTime;
@ApiModelProperty(value = "客户来源")
private List<Integer> customerSourceList;
}
......@@ -89,11 +89,20 @@
<if test="query.contactPhone != null and query.contactPhone != '' ">
AND concat('+', g.area_code, g.phone_new, '') LIKE concat('%', concat( #{query.contactPhone}, '%' ))
</if>
<!-- 客户相关查询条件 -->
<if test="query.customerNumber != null and query.customerNumber != '' ">
AND b.number LIKE concat('%', concat( #{query.customerNumber}, '%' ))
</if>
<if test="query.customerName != null and query.customerName != '' ">
AND b.name LIKE concat('%', concat( #{query.customerName}, '%' ))
</if>
<if test="query.customerSourceList != null and query.customerSourceList.size() > 0">
AND b.source in
<foreach item='item' index="index" collection='query.customerSourceList' open='(' separator=',' close=')'>#{item}</foreach>
</if>
<if test="query.beginCustomerCreateTime!= null and query.endCustomerCreateTime!= null">
AND b.create_time BETWEEN #{query.beginCustomerCreateTime} AND #{query.endCustomerCreateTime}
</if>
<if test="query.offerNumber != null and query.offerNumber != '' ">
AND c.number LIKE concat('%', concat( #{query.offerNumber}, '%' ))
</if>
......@@ -101,8 +110,14 @@
<select id="selectPage1" resultType="cn.iocoder.yudao.module.customer.dal.dataobject.customerFollowup.CustomerFollowupDO">
select a.*, b.number as customer_number, c.number as offer_number,
d.nickname as creator_name, e.nickname as updater_name,
select a.*,
b.number as customer_number,
b.name as customer_name,
b.source as customer_source,
b.create_time as customer_create_time,
c.number as offer_number,
d.nickname as creator_name,
e.nickname as updater_name,
f.nickname as follow_user_name,
concat('+', g.area_code, g.phone_new) as contact_phone
from ecw_customer_followup a
......
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