Merge remote-tracking branch 'hsayi/dev/feat/partner1.3_20230828' into dev/feat/partner1.3_20230828
This commit is contained in:
@@ -25,6 +25,12 @@
|
||||
<groupId>com.github.xiaoymin</groupId>
|
||||
<artifactId>knife4j-spring-boot-starter</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax.persistence</groupId>
|
||||
<artifactId>persistence-api</artifactId>
|
||||
<version>1.0</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
</project>
|
||||
@@ -0,0 +1,33 @@
|
||||
package com.cool.store.dto.partner;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author zhangchenbiao
|
||||
* @FileName: PartnerSimpleInfoDTO
|
||||
* @Description:
|
||||
* @date 2023-08-10 14:04
|
||||
*/
|
||||
@Data
|
||||
public class PartnerSimpleInfoDTO {
|
||||
|
||||
@ApiModelProperty("线索id")
|
||||
private Long partnerLineId;
|
||||
|
||||
@ApiModelProperty("加盟商姓名")
|
||||
private String username;
|
||||
|
||||
@ApiModelProperty("加盟商手机号")
|
||||
private String mobile;
|
||||
|
||||
@ApiModelProperty("加盟商id")
|
||||
private String partnerId;
|
||||
|
||||
@ApiModelProperty("线索阶段")
|
||||
private String workflowStage;
|
||||
|
||||
@ApiModelProperty("线索状态")
|
||||
private Integer lineStatus;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
package com.cool.store.entity;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author zhangchenbiao
|
||||
* @date 2023-08-10 10:10
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class HyFollowTaskDO implements Serializable {
|
||||
@ApiModelProperty("")
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty("hy_partner_line_info.id")
|
||||
private Long partnerLineId;
|
||||
|
||||
@ApiModelProperty("任务跟进人id")
|
||||
private String followUserId;
|
||||
|
||||
@ApiModelProperty("任务标题")
|
||||
private String taskTitle;
|
||||
|
||||
@ApiModelProperty("沟通方式: 0:电话、1:短信、2:微信、3:QQ、4:邮件、5:拜访、6:提醒")
|
||||
private Integer communicationType;
|
||||
|
||||
@ApiModelProperty("任务截止时间")
|
||||
private Date deadline;
|
||||
|
||||
@ApiModelProperty("计划沟通内容")
|
||||
private String communicationContent;
|
||||
|
||||
@ApiModelProperty("任务状态:0:待完成、1:已完成、2:已逾期、3:作废")
|
||||
private Integer taskStatus;
|
||||
|
||||
@ApiModelProperty("删除标识")
|
||||
private Boolean deleted;
|
||||
|
||||
@ApiModelProperty("创建时间")
|
||||
private Date createTime;
|
||||
|
||||
@ApiModelProperty("更新时间")
|
||||
private Date updateTime;
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
package com.cool.store.request.follow;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.hibernate.validator.constraints.Length;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* @author zhangchenbiao
|
||||
* @FileName: AddFollowLogRequest
|
||||
* @Description:新增跟进日志
|
||||
* @date 2023-08-08 15:38
|
||||
*/
|
||||
@Data
|
||||
public class AddFollowLogRequest {
|
||||
|
||||
@NotNull
|
||||
@ApiModelProperty("线索id")
|
||||
private Long partnerLineId;
|
||||
|
||||
@NotBlank
|
||||
@Length(max = 200)
|
||||
@ApiModelProperty("跟进日志")
|
||||
private String followLog;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
package com.cool.store.request.follow;
|
||||
|
||||
import com.cool.store.entity.HyFollowTaskDO;
|
||||
import com.cool.store.enums.FollowTaskStatusEnum;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.hibernate.validator.constraints.Length;
|
||||
|
||||
import javax.validation.constraints.Max;
|
||||
import javax.validation.constraints.Min;
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @author zhangchenbiao
|
||||
* @FileName: FollowTaskPageVO
|
||||
* @Description:新增跟进任务
|
||||
* @date 2023-08-08 14:47
|
||||
*/
|
||||
@Data
|
||||
public class AddFollowTaskRequest {
|
||||
|
||||
@NotNull
|
||||
@ApiModelProperty("线索id")
|
||||
private Long partnerLineId;
|
||||
|
||||
@NotBlank
|
||||
@Length(max = 50)
|
||||
@ApiModelProperty("任务标题")
|
||||
private String taskTitle;
|
||||
|
||||
@NotNull
|
||||
@Min(0)
|
||||
@Max(6)
|
||||
@ApiModelProperty("沟通方式: 0:电话、1:短信、2:微信、3:QQ、4:邮件、5:拜访、6:提醒")
|
||||
private Integer communicationType;
|
||||
|
||||
@NotBlank
|
||||
@Length(max = 300)
|
||||
@ApiModelProperty("计划沟通内容")
|
||||
private String communicationContent;
|
||||
|
||||
@NotNull
|
||||
@ApiModelProperty("任务截止时间")
|
||||
private Date deadline;
|
||||
|
||||
public static HyFollowTaskDO convertDO(AddFollowTaskRequest request){
|
||||
HyFollowTaskDO result = new HyFollowTaskDO();
|
||||
result.setPartnerLineId(request.getPartnerLineId());
|
||||
result.setTaskTitle(request.getTaskTitle());
|
||||
result.setCommunicationType(request.getCommunicationType());
|
||||
result.setDeadline(request.getDeadline());
|
||||
result.setCommunicationContent(request.getCommunicationContent());
|
||||
result.setTaskStatus(FollowTaskStatusEnum.TODO.getCode());
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
package com.cool.store.request.follow;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @author zhangchenbiao
|
||||
* @FileName: FollowTaskPageVO
|
||||
* @Description:新增跟进任务
|
||||
* @date 2023-08-08 14:47
|
||||
*/
|
||||
@Data
|
||||
public class FollowTaskIdRequest {
|
||||
|
||||
@NotNull
|
||||
@ApiModelProperty("跟进任务Id")
|
||||
private Long followTaskId;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
package com.cool.store.request.follow;
|
||||
|
||||
import com.cool.store.entity.HyFollowTaskDO;
|
||||
import com.cool.store.enums.FollowTaskStatusEnum;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.hibernate.validator.constraints.Length;
|
||||
|
||||
import javax.validation.constraints.Max;
|
||||
import javax.validation.constraints.Min;
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @author zhangchenbiao
|
||||
* @FileName: FollowTaskPageVO
|
||||
* @Description:新增跟进任务
|
||||
* @date 2023-08-08 14:47
|
||||
*/
|
||||
@Data
|
||||
public class UpdateFollowTaskRequest {
|
||||
|
||||
@NotNull
|
||||
@ApiModelProperty("跟进任务Id")
|
||||
private Long followTaskId;
|
||||
|
||||
@NotBlank
|
||||
@Length(max = 50)
|
||||
@ApiModelProperty("任务标题")
|
||||
private String taskTitle;
|
||||
|
||||
@NotNull
|
||||
@Min(0)
|
||||
@Max(6)
|
||||
@ApiModelProperty("沟通方式: 0:电话、1:短信、2:微信、3:QQ、4:邮件、5:拜访、6:提醒")
|
||||
private Integer communicationType;
|
||||
|
||||
@NotBlank
|
||||
@Length(max = 300)
|
||||
@ApiModelProperty("计划沟通内容")
|
||||
private String communicationContent;
|
||||
|
||||
@NotNull
|
||||
@ApiModelProperty("任务截止时间")
|
||||
private Date deadline;
|
||||
|
||||
public static HyFollowTaskDO convertDO(Long partnerLineId, UpdateFollowTaskRequest request){
|
||||
HyFollowTaskDO result = new HyFollowTaskDO();
|
||||
result.setId(request.getFollowTaskId());
|
||||
result.setPartnerLineId(partnerLineId);
|
||||
result.setTaskTitle(request.getTaskTitle());
|
||||
result.setCommunicationType(request.getCommunicationType());
|
||||
result.setDeadline(request.getDeadline());
|
||||
result.setCommunicationContent(request.getCommunicationContent());
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
package com.cool.store.vo.follow;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @author zhangchenbiao
|
||||
* @FileName: FollowTaskPageVO
|
||||
* @Description:跟进任务分页
|
||||
* @date 2023-08-08 14:47
|
||||
*/
|
||||
@Data
|
||||
public class FollowTaskLogVO {
|
||||
|
||||
@ApiModelProperty("日志id")
|
||||
private Long followLogId;
|
||||
|
||||
@ApiModelProperty("线索id")
|
||||
private Long partnerLineId;
|
||||
|
||||
@ApiModelProperty("操作时间")
|
||||
private Date operateTime;
|
||||
|
||||
@ApiModelProperty("操作人id")
|
||||
private String operateUserId;
|
||||
|
||||
@ApiModelProperty("操作人名称")
|
||||
private String operateUsername;
|
||||
|
||||
@ApiModelProperty("跟进操作类型")
|
||||
private String operateType;
|
||||
|
||||
@ApiModelProperty("操作内容")
|
||||
private String operateContent;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,68 @@
|
||||
package com.cool.store.vo.follow;
|
||||
|
||||
import com.cool.store.dto.partner.PartnerSimpleInfoDTO;
|
||||
import com.cool.store.entity.HyFollowTaskDO;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* @author zhangchenbiao
|
||||
* @FileName: FollowTaskPageVO
|
||||
* @Description:跟进任务分页
|
||||
* @date 2023-08-08 14:47
|
||||
*/
|
||||
@Data
|
||||
public class FollowTaskPageVO {
|
||||
|
||||
@ApiModelProperty("线索id")
|
||||
private Long partnerLineId;
|
||||
|
||||
@ApiModelProperty("任务标题")
|
||||
private String taskTitle;
|
||||
|
||||
@ApiModelProperty("沟通方式: 0:电话、1:短信、2:微信、3:QQ、4:邮件、5:拜访、6:提醒")
|
||||
private Integer communicationType;
|
||||
|
||||
@ApiModelProperty("任务截止时间")
|
||||
private Date deadline;
|
||||
|
||||
@ApiModelProperty("任务状态:0:待完成、1:已完成、2:已逾期、3:作废")
|
||||
private Integer taskStatus;
|
||||
|
||||
@ApiModelProperty("跟进阶段")
|
||||
private String workflowStage;
|
||||
|
||||
@ApiModelProperty("线索用户名")
|
||||
private String partnerUsername;
|
||||
|
||||
@ApiModelProperty("线索手机号")
|
||||
private String partnerMobile;
|
||||
|
||||
|
||||
public static List<FollowTaskPageVO> convertVO(List<HyFollowTaskDO> taskList, Map<Long, PartnerSimpleInfoDTO> partnerSimpleInfoMap){
|
||||
List<FollowTaskPageVO> resultList = new ArrayList<>();
|
||||
if(CollectionUtils.isNotEmpty(taskList)){
|
||||
for (HyFollowTaskDO task : taskList) {
|
||||
PartnerSimpleInfoDTO partnerInfo = partnerSimpleInfoMap.get(task.getPartnerLineId());
|
||||
if(Objects.isNull(partnerInfo)){
|
||||
continue;
|
||||
}
|
||||
FollowTaskPageVO result = new FollowTaskPageVO();
|
||||
result.setPartnerLineId(task.getPartnerLineId());
|
||||
result.setTaskTitle(task.getTaskTitle());
|
||||
result.setCommunicationType(task.getCommunicationType());
|
||||
result.setDeadline(task.getDeadline());
|
||||
result.setTaskStatus(task.getTaskStatus());
|
||||
result.setWorkflowStage(partnerInfo.getWorkflowStage());
|
||||
result.setPartnerUsername(partnerInfo.getUsername());
|
||||
result.setPartnerMobile(partnerInfo.getMobile());
|
||||
resultList.add(result);
|
||||
}
|
||||
}
|
||||
return resultList;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user