跟进任务初始化
This commit is contained in:
@@ -126,4 +126,8 @@ public class CommonConstants {
|
||||
// 短信模版-资质审核通过
|
||||
public static final String SMS_TEMPLATE_CODE_VERIFY = "SMS_461980876";
|
||||
|
||||
public static final String DAY_END_TIME_SUFFIX = " 23:59:59";
|
||||
|
||||
public static final String DAY_START_TIME_SUFFIX = " 00:00:00";
|
||||
|
||||
}
|
||||
|
||||
@@ -61,6 +61,8 @@ public enum ErrorCodeEnum {
|
||||
INTENT_AREA_NOT_BING_ZONE(500007, "意向区域没有绑定战区 分配招商经理失败!", null),
|
||||
PUBLIC_LINE_NOT_OPERATE(500008, "公海线索不允许操作!", null),
|
||||
PARTNER_BASE_INFO_NOT_EXIST(500009, "加盟商信息不存在!", null),
|
||||
LINE_STATUS_NOT_ALLOW_OPERATE(500010, "当前线索状态不允许该操作!", null),
|
||||
TASK_STATUS_NOT_ALLOW_OPERATE(500011, "当前任务状态不允许该操作!", null),
|
||||
|
||||
INTERVIEW_ENTER_FAIL(1021101, "进入面试间失败", null),
|
||||
DINGDING_USER_NOT_EXIST(1021102, "用户钉钉信息不存在,无法发起资质审核!", null),
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
package com.cool.store.enums;
|
||||
|
||||
/**
|
||||
* @author zhangchenbiao
|
||||
* @FileName: FollowTaskStatusEnum
|
||||
* @Description:
|
||||
* @date 2023-08-10 10:47
|
||||
*/
|
||||
public enum FollowTaskStatusEnum {
|
||||
|
||||
TODO(0, "待完成"),
|
||||
FINISHED(1, "已完成"),
|
||||
OVERDUE(2, "已逾期"),
|
||||
CANCELLED(3, "作废"),
|
||||
;
|
||||
//任务状态:0:待完成、1:已完成、2:已逾期、3:作废
|
||||
|
||||
private Integer code;
|
||||
|
||||
private String remark;
|
||||
|
||||
FollowTaskStatusEnum(Integer code, String remark) {
|
||||
this.code = code;
|
||||
this.remark = remark;
|
||||
}
|
||||
|
||||
public Integer getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public String getRemark() {
|
||||
return remark;
|
||||
}
|
||||
}
|
||||
@@ -46,6 +46,8 @@ public enum OperateLogFieldValueEnum {
|
||||
|
||||
BEFORE_CLERK_INFO_UPDATE("beforeClerkUpdate", "修改前的意向书员工信息"),
|
||||
AFTER_CLERK_INFO_UPDATE("afterClerkUpdate", "修改后的意向书员工信息"),
|
||||
FOLLOW_LOG("followLog", "跟进日志"),
|
||||
FOLLOW_TASK_ID("followTaskId", "跟进任务id")
|
||||
;
|
||||
|
||||
|
||||
|
||||
@@ -35,6 +35,8 @@ public enum OperateTypeEnum {
|
||||
INTENT_INFO_SUBMIT("intent_info_submit", "提交意向申请书", Arrays.asList(OPERATE_USER_ID,OPERATE_USER_NAME, MOBILE, OPERATE_TIME, AFTER_BASE_INFO_UPDATE, AFTER_INTENT_INFO_UPDATE, AFTER_CLERK_INFO_UPDATE)),
|
||||
INTENT_INFO_UPDATE("intent_info_update", "修改意向申请书", Arrays.asList(OPERATE_USER_ID,OPERATE_USER_NAME, MOBILE, OPERATE_TIME, BEFORE_BASE_INFO_UPDATE, AFTER_BASE_INFO_UPDATE, BEFORE_INTENT_INFO_UPDATE, AFTER_INTENT_INFO_UPDATE, BEFORE_CLERK_INFO_UPDATE, AFTER_CLERK_INFO_UPDATE)),
|
||||
ADD_TAGS("add_tags", "修改意向申请书", Arrays.asList(OPERATE_USER_ID,OPERATE_USER_NAME, MOBILE, OPERATE_TIME)),
|
||||
ADD_FOLLOW_LOG("add_follow_log", "新增根据日志", Arrays.asList(FOLLOW_LOG)),
|
||||
ADD_FOLLOW_TASK("add_follow_task", "新增跟进任务", Arrays.asList(FOLLOW_TASK_ID))
|
||||
;
|
||||
|
||||
private String code;
|
||||
|
||||
@@ -50,6 +50,11 @@
|
||||
<version>1.3.7</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>tk.mybatis</groupId>
|
||||
<artifactId>mapper</artifactId>
|
||||
<version>4.1.4</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
</project>
|
||||
@@ -0,0 +1,143 @@
|
||||
package com.cool.store.dao;
|
||||
|
||||
import com.cool.store.entity.HyFollowTaskDO;
|
||||
import com.cool.store.enums.FollowTaskStatusEnum;
|
||||
import com.cool.store.mapper.HyFollowTaskMapper;
|
||||
import com.github.pagehelper.Page;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.google.common.collect.Lists;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* @author zhangchenbiao
|
||||
* @FileName: HyFollowTaskDAO
|
||||
* @Description:
|
||||
* @date 2023-08-10 10:35
|
||||
*/
|
||||
@Repository
|
||||
public class HyFollowTaskDAO {
|
||||
|
||||
@Resource
|
||||
private HyFollowTaskMapper hyFollowTaskMapper;
|
||||
|
||||
/**
|
||||
* 获取跟进任务想去
|
||||
* @param followTaskId
|
||||
* @return
|
||||
*/
|
||||
public HyFollowTaskDO getFollowTask(Long followTaskId){
|
||||
if(Objects.isNull(followTaskId)){
|
||||
return null;
|
||||
}
|
||||
return hyFollowTaskMapper.getFollowTask(followTaskId);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 新增跟进任务
|
||||
* @param request
|
||||
* @return
|
||||
*/
|
||||
public Long addFollowTask(HyFollowTaskDO request){
|
||||
if(StringUtils.isBlank(request.getFollowUserId()) || Objects.isNull(request.getPartnerLineId())){
|
||||
return null;
|
||||
}
|
||||
hyFollowTaskMapper.insertSelective(request);
|
||||
return request.getId();
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新跟进任务
|
||||
* @param request
|
||||
* @return
|
||||
*/
|
||||
public Integer updateFollowTask(HyFollowTaskDO request){
|
||||
if(Objects.isNull(request.getId())){
|
||||
return null;
|
||||
}
|
||||
return hyFollowTaskMapper.updateByPrimaryKeySelective(request);
|
||||
}
|
||||
|
||||
/**
|
||||
* 完成更近任务
|
||||
* @param followTaskId
|
||||
* @return
|
||||
*/
|
||||
public Integer finishFollowTask(Long followTaskId){
|
||||
HyFollowTaskDO update = new HyFollowTaskDO();
|
||||
update.setId(followTaskId);
|
||||
update.setTaskStatus(FollowTaskStatusEnum.FINISHED.getCode());
|
||||
return updateFollowTask(update);
|
||||
}
|
||||
|
||||
/**
|
||||
* 取消跟进任务
|
||||
* @param followTaskId
|
||||
* @return
|
||||
*/
|
||||
public Integer cancelFollowTask(Long followTaskId){
|
||||
HyFollowTaskDO update = new HyFollowTaskDO();
|
||||
update.setId(followTaskId);
|
||||
update.setTaskStatus(FollowTaskStatusEnum.CANCELLED.getCode());
|
||||
return updateFollowTask(update);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取线索的所有任务
|
||||
* @param partnerLineId
|
||||
* @return
|
||||
*/
|
||||
public List<HyFollowTaskDO> getTaskListByLineId(Long partnerLineId){
|
||||
if(Objects.isNull(partnerLineId)){
|
||||
return Lists.newArrayList();
|
||||
}
|
||||
return hyFollowTaskMapper.getTaskListByLineId(partnerLineId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页获取任务
|
||||
* @param followUserId
|
||||
* @param taskStatus
|
||||
* @param deadlineStartTIme
|
||||
* @param deadlineEndTIme
|
||||
* @param pageNum
|
||||
* @param pageSize
|
||||
* @return
|
||||
*/
|
||||
public Page<HyFollowTaskDO> getTaskPage(String followUserId, Integer taskStatus, String deadlineStartTIme, String deadlineEndTIme, Integer pageNum, Integer pageSize){
|
||||
if(StringUtils.isBlank(followUserId)){
|
||||
return new Page<>();
|
||||
}
|
||||
PageHelper.startPage(pageNum, pageSize);
|
||||
return hyFollowTaskMapper.getTaskPage(followUserId, taskStatus, deadlineStartTIme, deadlineEndTIme);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新未完成的任务跟进人
|
||||
* @param partnerLineId
|
||||
* @param userId
|
||||
*/
|
||||
public void updateUndoTaskFollowUserId(Long partnerLineId, String userId){
|
||||
if(Objects.isNull(partnerLineId) || StringUtils.isNotBlank(userId)){
|
||||
return;
|
||||
}
|
||||
hyFollowTaskMapper.updateUndoTaskFollowUserId(partnerLineId, userId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 作废待完成&已逾期的任务
|
||||
* @param partnerLineId
|
||||
*/
|
||||
public void cancelUndoFollowTask(Long partnerLineId){
|
||||
if(Objects.isNull(partnerLineId)){
|
||||
return;
|
||||
}
|
||||
hyFollowTaskMapper.cancelUndoFollowTask(partnerLineId);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.cool.store.dao;
|
||||
|
||||
import cn.hutool.core.map.MapUtil;
|
||||
import com.cool.store.dto.partner.PartnerBlackListDTO;
|
||||
import com.cool.store.dto.partner.PartnerLineInfoAndBaseInfoDTO;
|
||||
import com.cool.store.dto.partner.StageCountDTO;
|
||||
@@ -8,6 +9,8 @@ import com.cool.store.entity.HyPartnerLineInfoDO;
|
||||
import com.cool.store.mapper.HyPartnerLineInfoMapper;
|
||||
import com.google.common.collect.Lists;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.collections4.ListUtils;
|
||||
import org.apache.commons.collections4.MapUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
@@ -15,6 +18,9 @@ import javax.annotation.Resource;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.function.Function;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @Author suzhuhong
|
||||
@@ -180,4 +186,17 @@ public class HyPartnerLineInfoDAO {
|
||||
return hyPartnerLineInfoMapper.getLineFollowHistoryList(partnerId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取线索加盟商简要信息
|
||||
* @param partnerLineIds
|
||||
* @return
|
||||
*/
|
||||
public Map<Long, PartnerSimpleInfoDTO> getPartnerSimpleInfoByLineIds(List<Long> partnerLineIds){
|
||||
if(CollectionUtils.isEmpty(partnerLineIds)){
|
||||
return MapUtil.newHashMap();
|
||||
}
|
||||
List<PartnerSimpleInfoDTO> partnerList = hyPartnerLineInfoMapper.getPartnerSimpleInfoByLineIds(partnerLineIds);
|
||||
return ListUtils.emptyIfNull(partnerList).stream().collect(Collectors.toMap(k->k.getPartnerLineId(), Function.identity(), (k1, k2)->k1));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,66 @@
|
||||
package com.cool.store.mapper;
|
||||
|
||||
import com.cool.store.entity.HyFollowTaskDO;
|
||||
import com.github.pagehelper.Page;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author zhangchenbiao
|
||||
* @date 2023-08-10 10:10
|
||||
*/
|
||||
public interface HyFollowTaskMapper {
|
||||
/**
|
||||
*
|
||||
* 默认插入方法,只会给有值的字段赋值
|
||||
* 会对传进来的字段做判空处理,如果字段为空,则使用数据库默认字段或者null
|
||||
* dateTime:2023-08-10 10:10
|
||||
*/
|
||||
int insertSelective(@Param("record") HyFollowTaskDO record);
|
||||
|
||||
/**
|
||||
*
|
||||
* 默认更新方法,根据主键更新,不会把null值更新到数据库,避免覆盖之前有值的
|
||||
* dateTime:2023-08-10 10:10
|
||||
*/
|
||||
int updateByPrimaryKeySelective(@Param("record") HyFollowTaskDO record);
|
||||
|
||||
/**
|
||||
* 根据线索获取任务列表
|
||||
* @param partnerLineId
|
||||
* @return
|
||||
*/
|
||||
List<HyFollowTaskDO> getTaskListByLineId(@Param("partnerLineId")Long partnerLineId);
|
||||
|
||||
/**
|
||||
* 获取任务列表
|
||||
* @param followUserId
|
||||
* @param taskStatus
|
||||
* @param deadlineStartTIme
|
||||
* @param deadlineEndTIme
|
||||
* @return
|
||||
*/
|
||||
Page<HyFollowTaskDO> getTaskPage(@Param("followUserId")String followUserId, @Param("taskStatus")Integer taskStatus, @Param("deadlineStartTIme")String deadlineStartTIme, @Param("deadlineEndTIme")String deadlineEndTIme);
|
||||
|
||||
/**
|
||||
* 获取跟进任务详情
|
||||
* @param followTaskId
|
||||
* @return
|
||||
*/
|
||||
HyFollowTaskDO getFollowTask(@Param("followTaskId") Long followTaskId);
|
||||
|
||||
/**
|
||||
* 更新任务跟进人
|
||||
* @param partnerLineId
|
||||
* @param followUserId
|
||||
*/
|
||||
Integer updateUndoTaskFollowUserId(@Param("partnerLineId") Long partnerLineId, @Param("followUserId") String followUserId);
|
||||
|
||||
/**
|
||||
* 作废未完成的跟进任务
|
||||
* @param partnerLineId
|
||||
* @return
|
||||
*/
|
||||
Integer cancelUndoFollowTask(@Param("partnerLineId") Long partnerLineId);
|
||||
}
|
||||
@@ -225,4 +225,12 @@ public interface HyPartnerLineInfoMapper {
|
||||
@Param("endTime") Date endTime);
|
||||
|
||||
void batchUpdateStatusByLineIds(@Param("lineIds") List<Long> lineIds, @Param("status")Integer status);
|
||||
|
||||
/**
|
||||
* 获取线索简要信息
|
||||
* @param partnerLineIds
|
||||
* @return
|
||||
*/
|
||||
List<PartnerSimpleInfoDTO> getPartnerSimpleInfoByLineIds(@Param("partnerLineIds") List<Long> partnerLineIds);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,168 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.cool.store.mapper.HyFollowTaskMapper">
|
||||
<resultMap id="BaseResultMap" type="com.cool.store.entity.HyFollowTaskDO">
|
||||
<id column="id" jdbcType="BIGINT" property="id"/>
|
||||
<result column="partner_line_id" jdbcType="BIGINT" property="partnerLineId"/>
|
||||
<result column="follow_user_id" jdbcType="VARCHAR" property="followUserId"/>
|
||||
<result column="task_title" jdbcType="VARCHAR" property="taskTitle"/>
|
||||
<result column="communication_type" jdbcType="TINYINT" property="communicationType"/>
|
||||
<result column="deadline" jdbcType="TIMESTAMP" property="deadline"/>
|
||||
<result column="communication_content" jdbcType="VARCHAR" property="communicationContent"/>
|
||||
<result column="task_status" jdbcType="TINYINT" property="taskStatus"/>
|
||||
<result column="deleted" jdbcType="BIT" property="deleted"/>
|
||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime"/>
|
||||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/>
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
id, partner_line_id, follow_user_id, task_title, communication_type, deadline, communication_content,
|
||||
task_status, deleted, create_time, update_time
|
||||
</sql>
|
||||
<insert id="insertSelective" keyColumn="id" keyProperty="record.id" useGeneratedKeys="true">
|
||||
insert into hy_follow_task
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="record.partnerLineId != null">
|
||||
partner_line_id,
|
||||
</if>
|
||||
<if test="record.followUserId != null">
|
||||
follow_user_id,
|
||||
</if>
|
||||
<if test="record.taskTitle != null">
|
||||
task_title,
|
||||
</if>
|
||||
<if test="record.communicationType != null">
|
||||
communication_type,
|
||||
</if>
|
||||
<if test="record.deadline != null">
|
||||
deadline,
|
||||
</if>
|
||||
<if test="record.communicationContent != null">
|
||||
communication_content,
|
||||
</if>
|
||||
<if test="record.taskStatus != null">
|
||||
task_status,
|
||||
</if>
|
||||
<if test="record.deleted != null">
|
||||
deleted,
|
||||
</if>
|
||||
<if test="record.createTime != null">
|
||||
create_time,
|
||||
</if>
|
||||
<if test="record.updateTime != null">
|
||||
update_time,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="record.partnerLineId != null">
|
||||
#{record.partnerLineId},
|
||||
</if>
|
||||
<if test="record.followUserId != null">
|
||||
#{record.followUserId},
|
||||
</if>
|
||||
<if test="record.taskTitle != null">
|
||||
#{record.taskTitle},
|
||||
</if>
|
||||
<if test="record.communicationType != null">
|
||||
#{record.communicationType},
|
||||
</if>
|
||||
<if test="record.deadline != null">
|
||||
#{record.deadline},
|
||||
</if>
|
||||
<if test="record.communicationContent != null">
|
||||
#{record.communicationContent},
|
||||
</if>
|
||||
<if test="record.taskStatus != null">
|
||||
#{record.taskStatus},
|
||||
</if>
|
||||
<if test="record.deleted != null">
|
||||
#{record.deleted},
|
||||
</if>
|
||||
<if test="record.createTime != null">
|
||||
#{record.createTime},
|
||||
</if>
|
||||
<if test="record.updateTime != null">
|
||||
#{record.updateTime},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<update id="updateByPrimaryKeySelective">
|
||||
update hy_follow_task
|
||||
<set>
|
||||
<if test="record.partnerLineId != null">
|
||||
partner_line_id = #{record.partnerLineId},
|
||||
</if>
|
||||
<if test="record.followUserId != null">
|
||||
follow_user_id = #{record.followUserId},
|
||||
</if>
|
||||
<if test="record.taskTitle != null">
|
||||
task_title = #{record.taskTitle},
|
||||
</if>
|
||||
<if test="record.communicationType != null">
|
||||
communication_type = #{record.communicationType},
|
||||
</if>
|
||||
<if test="record.deadline != null">
|
||||
deadline = #{record.deadline},
|
||||
</if>
|
||||
<if test="record.communicationContent != null">
|
||||
communication_content = #{record.communicationContent},
|
||||
</if>
|
||||
<if test="record.taskStatus != null">
|
||||
task_status = #{record.taskStatus},
|
||||
</if>
|
||||
<if test="record.deleted != null">
|
||||
deleted = #{record.deleted},
|
||||
</if>
|
||||
<if test="record.createTime != null">
|
||||
create_time = #{record.createTime},
|
||||
</if>
|
||||
<if test="record.updateTime != null">
|
||||
update_time = #{record.updateTime},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{record.id}
|
||||
</update>
|
||||
|
||||
<select id="getTaskListByLineId" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
from
|
||||
hy_follow_task
|
||||
where
|
||||
deleted = '0' and partner_line_id = #{partnerLineId}
|
||||
</select>
|
||||
|
||||
<select id="getTaskPage" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
from
|
||||
hy_follow_task
|
||||
where
|
||||
deleted = '0' and follow_user_id = #{followUserId}
|
||||
<if test="taskStatus != null">
|
||||
and task_status = #{taskStatus}
|
||||
</if>
|
||||
<if test="deadlineStartTIme != null">
|
||||
and deadline >= #{deadlineStartTIme}
|
||||
</if>
|
||||
<if test="deadlineEndTIme != null">
|
||||
<![CDATA[ and deadline <= #{deadlineEndTIme}]]>
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="getFollowTask" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
from
|
||||
hy_follow_task
|
||||
where
|
||||
deleted = '0' and id = #{followTaskId}
|
||||
</select>
|
||||
|
||||
<update id="updateUndoTaskFollowUserId">
|
||||
update hy_follow_task set follow_user_id = #{followUserId} where partner_line_id = #{partnerLineId}
|
||||
</update>
|
||||
|
||||
<update id="cancelUndoFollowTask">
|
||||
update hy_follow_task set task_status = '3' where partner_line_id = #{partnerLineId} and task_status in ('0', '2')
|
||||
</update>
|
||||
</mapper>
|
||||
@@ -660,4 +660,18 @@
|
||||
</foreach>
|
||||
</update>
|
||||
|
||||
<select id="getPartnerSimpleInfoByLineIds" resultType="com.cool.store.dto.partner.PartnerSimpleInfoDTO">
|
||||
select
|
||||
a.id as partnerLineId,
|
||||
a.partner_id as partnerId,
|
||||
a.workflow_stage as workflowStage,
|
||||
a.line_status as lineStatus,
|
||||
b.username as username,
|
||||
b.mobile as mobile
|
||||
from
|
||||
hy_partner_line_info a inner join hy_partner_user_info b on a.partner_id = b.partner_id and a.deleted = '0'
|
||||
where
|
||||
a.id in <foreach collection="partnerLineIds" open="(" close=")" separator="," item="lineId">#{lineId}</foreach>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -15,7 +15,7 @@ public class GeneratorCodeMain {
|
||||
try {
|
||||
// 解析
|
||||
ConfigurationParser cp = new ConfigurationParser(warnings);
|
||||
Configuration config = cp.parseConfiguration(GeneratorCodeMain.class.getResourceAsStream("/mybatis-generator.xml"));
|
||||
Configuration config = cp.parseConfiguration(GeneratorCodeMain.class.getResourceAsStream("/mybatis-generator-tk.xml"));
|
||||
// 是否覆盖
|
||||
DefaultShellCallback dsc = new DefaultShellCallback(false);
|
||||
MyBatisGenerator mg = new MyBatisGenerator(config, dsc, warnings);
|
||||
|
||||
@@ -14,16 +14,20 @@ import org.mybatis.generator.codegen.mybatis3.IntrospectedTableMyBatis3Impl;
|
||||
import org.mybatis.generator.codegen.mybatis3.ListUtilities;
|
||||
import org.mybatis.generator.codegen.mybatis3.MyBatis3FormattingUtilities;
|
||||
import org.mybatis.generator.codegen.mybatis3.javamapper.JavaMapperGenerator;
|
||||
import org.mybatis.generator.codegen.mybatis3.javamapper.elements.SelectByExampleWithBLOBsMethodGenerator;
|
||||
import org.mybatis.generator.codegen.mybatis3.xmlmapper.XMLMapperGenerator;
|
||||
import org.mybatis.generator.codegen.mybatis3.xmlmapper.elements.AbstractXmlElementGenerator;
|
||||
import org.mybatis.generator.codegen.mybatis3.xmlmapper.elements.InsertSelectiveElementGenerator;
|
||||
import org.mybatis.generator.codegen.mybatis3.xmlmapper.elements.UpdateByPrimaryKeySelectiveElementGenerator;
|
||||
import org.mybatis.generator.config.GeneratedKey;
|
||||
import org.mybatis.generator.config.PropertyRegistry;
|
||||
import org.mybatis.generator.internal.rules.Rules;
|
||||
import org.mybatis.generator.internal.util.JavaBeansUtil;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.util.TreeSet;
|
||||
|
||||
import static org.mybatis.generator.internal.util.StringUtility.stringHasValue;
|
||||
import static org.mybatis.generator.internal.util.messages.Messages.getString;
|
||||
@@ -204,12 +208,17 @@ public class MyIntrospectedTableMyBatis3Impl extends IntrospectedTableMyBatis3Im
|
||||
context.getCommentGenerator().addRootComment(answer);
|
||||
addResultMapWithoutBLOBsElement(answer);
|
||||
addResultMapWithBLOBsElement(answer);
|
||||
addExampleWhereClauseElement(answer);
|
||||
addMyBatis3UpdateByExampleWhereClauseElement(answer);
|
||||
addBaseColumnListElement(answer);
|
||||
addBlobColumnListElement(answer);
|
||||
addInsertSelectiveElement(answer);
|
||||
addUpdateByPrimaryKeySelectiveElement(answer);
|
||||
addMyBatis3UpdateByExampleWhereClauseElement(answer);
|
||||
addExampleWhereClauseElement(answer);
|
||||
addSelectByExampleWithBLOBsElement(answer);
|
||||
addSelectByExampleWithoutBLOBsElement(answer);
|
||||
addUpdateByExampleWithBLOBsElement(answer);
|
||||
addUpdateByExampleWithoutBLOBsElement(answer);
|
||||
addUpdateByExampleSelectiveElement(answer);
|
||||
return answer;
|
||||
}
|
||||
|
||||
@@ -244,7 +253,6 @@ public class MyIntrospectedTableMyBatis3Impl extends IntrospectedTableMyBatis3Im
|
||||
|
||||
@Override
|
||||
public List<CompilationUnit> getCompilationUnits() {
|
||||
boolean isConfig = isConfigTable();
|
||||
progressCallback.startTask(getString("Progress.17", //$NON-NLS-1$
|
||||
introspectedTable.getFullyQualifiedTable().toString()));
|
||||
CommentGenerator commentGenerator = context.getCommentGenerator();
|
||||
@@ -268,30 +276,23 @@ public class MyIntrospectedTableMyBatis3Impl extends IntrospectedTableMyBatis3Im
|
||||
interfaze.addSuperInterface(fqjt);
|
||||
interfaze.addImportedType(fqjt);
|
||||
}
|
||||
if(!isConfig){
|
||||
interfaze.addImportedType(new FullyQualifiedJavaType("org.apache.ibatis.annotations.Param"));
|
||||
}
|
||||
interfaze.addImportedType(new FullyQualifiedJavaType("org.apache.ibatis.annotations.Param"));
|
||||
addInsertSelectiveMethod(interfaze);
|
||||
addUpdateByPrimaryKeySelectiveMethod(interfaze);
|
||||
List<Method> methods = interfaze.getMethods();
|
||||
for (Method method : methods) {
|
||||
List<Parameter> parameters = method.getParameters();
|
||||
for (Parameter parameter : parameters) {
|
||||
if(!isConfig){
|
||||
String name = parameter.getName();
|
||||
parameter.addAnnotation("@Param(\""+ name+"\")");
|
||||
}
|
||||
}
|
||||
if(!isConfig){
|
||||
Parameter enterpriseId = new Parameter(FullyQualifiedJavaType.getStringInstance(), "enterpriseId");
|
||||
enterpriseId.addAnnotation("@Param(\"enterpriseId\")");
|
||||
method.addParameter(enterpriseId);
|
||||
String name = parameter.getName();
|
||||
parameter.addAnnotation("@Param(\""+ name+"\")");
|
||||
}
|
||||
}
|
||||
|
||||
addSelectByExampleWithBLOBsMethod(interfaze);
|
||||
addSelectByExampleWithoutBLOBsMethod(interfaze);
|
||||
addUpdateByExampleSelectiveMethod(interfaze);
|
||||
addUpdateByExampleWithoutBLOBsMethod(interfaze);
|
||||
List<CompilationUnit> answer = new ArrayList<CompilationUnit>();
|
||||
if (context.getPlugins().clientGenerated(interfaze, null,
|
||||
introspectedTable)) {
|
||||
if (context.getPlugins().clientGenerated(interfaze, null, introspectedTable)) {
|
||||
answer.add(interfaze);
|
||||
}
|
||||
|
||||
@@ -312,7 +313,6 @@ public class MyIntrospectedTableMyBatis3Impl extends IntrospectedTableMyBatis3Im
|
||||
|
||||
@Override
|
||||
public void addElements(XmlElement parentElement) {
|
||||
boolean isConfig = isConfigTable();
|
||||
XmlElement answer = new XmlElement("insert"); //$NON-NLS-1$
|
||||
|
||||
answer.addAttribute(new Attribute(
|
||||
@@ -383,9 +383,7 @@ public class MyIntrospectedTableMyBatis3Impl extends IntrospectedTableMyBatis3Im
|
||||
}
|
||||
|
||||
sb.setLength(0);
|
||||
if(!isConfig){
|
||||
sb.append("record.");
|
||||
}
|
||||
sb.append("record.");
|
||||
sb.append(introspectedColumn.getJavaProperty());
|
||||
sb.append(" != null"); //$NON-NLS-1$
|
||||
XmlElement insertNotNullElement = new XmlElement("if"); //$NON-NLS-1$
|
||||
@@ -400,9 +398,7 @@ public class MyIntrospectedTableMyBatis3Impl extends IntrospectedTableMyBatis3Im
|
||||
insertTrimElement.addElement(insertNotNullElement);
|
||||
|
||||
sb.setLength(0);
|
||||
if(!isConfig){
|
||||
sb.append("record.");
|
||||
}
|
||||
sb.append("record.");
|
||||
sb.append(introspectedColumn.getJavaProperty());
|
||||
sb.append(" != null"); //$NON-NLS-1$
|
||||
XmlElement valuesNotNullElement = new XmlElement("if"); //$NON-NLS-1$
|
||||
@@ -410,11 +406,7 @@ public class MyIntrospectedTableMyBatis3Impl extends IntrospectedTableMyBatis3Im
|
||||
"test", sb.toString())); //$NON-NLS-1$
|
||||
|
||||
sb.setLength(0);
|
||||
if(isConfig){
|
||||
sb.append("#{"+introspectedColumn.getJavaProperty() + "}");
|
||||
}else{
|
||||
sb.append("#{record."+introspectedColumn.getJavaProperty() + "}");
|
||||
}
|
||||
sb.append("#{record."+introspectedColumn.getJavaProperty() + "}");
|
||||
sb.append(',');
|
||||
valuesNotNullElement.addElement(new TextElement(sb.toString()));
|
||||
valuesTrimElement.addElement(valuesNotNullElement);
|
||||
@@ -433,7 +425,6 @@ public class MyIntrospectedTableMyBatis3Impl extends IntrospectedTableMyBatis3Im
|
||||
|
||||
@Override
|
||||
public void addElements(XmlElement parentElement) {
|
||||
boolean isConfig = isConfigTable();
|
||||
XmlElement answer = new XmlElement("update"); //$NON-NLS-1$
|
||||
|
||||
answer.addAttribute(new Attribute(
|
||||
@@ -446,10 +437,6 @@ public class MyIntrospectedTableMyBatis3Impl extends IntrospectedTableMyBatis3Im
|
||||
} else {
|
||||
parameterType = introspectedTable.getBaseRecordType();
|
||||
}
|
||||
|
||||
/*answer.addAttribute(new Attribute("parameterType", //$NON-NLS-1$
|
||||
parameterType));*/
|
||||
|
||||
context.getCommentGenerator().addComment(answer);
|
||||
|
||||
StringBuilder sb = new StringBuilder();
|
||||
@@ -463,9 +450,7 @@ public class MyIntrospectedTableMyBatis3Impl extends IntrospectedTableMyBatis3Im
|
||||
|
||||
for (IntrospectedColumn introspectedColumn : ListUtilities.removeGeneratedAlwaysColumns(introspectedTable.getNonPrimaryKeyColumns())) {
|
||||
sb.setLength(0);
|
||||
if(!isConfig){
|
||||
sb.append("record.");
|
||||
}
|
||||
sb.append("record.");
|
||||
sb.append(introspectedColumn.getJavaProperty());
|
||||
sb.append(" != null"); //$NON-NLS-1$
|
||||
XmlElement isNotNullElement = new XmlElement("if"); //$NON-NLS-1$
|
||||
@@ -476,11 +461,7 @@ public class MyIntrospectedTableMyBatis3Impl extends IntrospectedTableMyBatis3Im
|
||||
sb.append(MyBatis3FormattingUtilities
|
||||
.getEscapedColumnName(introspectedColumn));
|
||||
sb.append(" = ");
|
||||
if(!isConfig){
|
||||
sb.append("#{record."+introspectedColumn.getJavaProperty() + "}");
|
||||
}else{
|
||||
sb.append("#{"+introspectedColumn.getJavaProperty() + "}");
|
||||
}
|
||||
sb.append("#{record."+introspectedColumn.getJavaProperty() + "}");
|
||||
sb.append(',');
|
||||
|
||||
isNotNullElement.addElement(new TextElement(sb.toString()));
|
||||
@@ -499,11 +480,7 @@ public class MyIntrospectedTableMyBatis3Impl extends IntrospectedTableMyBatis3Im
|
||||
sb.append(MyBatis3FormattingUtilities
|
||||
.getEscapedColumnName(introspectedColumn));
|
||||
sb.append(" = ");
|
||||
if(isConfig){
|
||||
sb.append("#{"+introspectedColumn.getJavaProperty() + "}");
|
||||
}else{
|
||||
sb.append("#{record."+introspectedColumn.getJavaProperty() + "}");
|
||||
}
|
||||
sb.append("#{record."+introspectedColumn.getJavaProperty() + "}");
|
||||
answer.addElement(new TextElement(sb.toString()));
|
||||
}
|
||||
|
||||
@@ -514,4 +491,54 @@ public class MyIntrospectedTableMyBatis3Impl extends IntrospectedTableMyBatis3Im
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class MySelectByExampleWithBLOBsMethodGenerator extends SelectByExampleWithBLOBsMethodGenerator {
|
||||
public MySelectByExampleWithBLOBsMethodGenerator() {
|
||||
super();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInterfaceElements(Interface interfaze) {
|
||||
Set<FullyQualifiedJavaType> importedTypes = new TreeSet<FullyQualifiedJavaType>();
|
||||
FullyQualifiedJavaType type = new FullyQualifiedJavaType(
|
||||
introspectedTable.getExampleType());
|
||||
importedTypes.add(type);
|
||||
importedTypes.add(FullyQualifiedJavaType.getNewListInstance());
|
||||
|
||||
Method method = new Method();
|
||||
method.setVisibility(JavaVisibility.PUBLIC);
|
||||
|
||||
FullyQualifiedJavaType returnType = FullyQualifiedJavaType
|
||||
.getNewListInstance();
|
||||
FullyQualifiedJavaType listType;
|
||||
if (introspectedTable.getRules().generateRecordWithBLOBsClass()) {
|
||||
listType = new FullyQualifiedJavaType(introspectedTable
|
||||
.getRecordWithBLOBsType());
|
||||
} else {
|
||||
// the blob fields must be rolled up into the base class
|
||||
listType = new FullyQualifiedJavaType(introspectedTable
|
||||
.getBaseRecordType());
|
||||
}
|
||||
|
||||
importedTypes.add(listType);
|
||||
returnType.addTypeArgument(listType);
|
||||
method.setReturnType(returnType);
|
||||
method.setName(introspectedTable
|
||||
.getSelectByExampleWithBLOBsStatementId());
|
||||
method.addParameter(new Parameter(type, "example")); //$NON-NLS-1$
|
||||
|
||||
context.getCommentGenerator().addGeneralMethodComment(method,
|
||||
introspectedTable);
|
||||
|
||||
addMapperAnnotations(interfaze, method);
|
||||
|
||||
if (context.getPlugins()
|
||||
.clientSelectByExampleWithBLOBsMethodGenerated(method, interfaze,
|
||||
introspectedTable)) {
|
||||
addExtraImports(interfaze);
|
||||
interfaze.addImportedTypes(importedTypes);
|
||||
interfaze.addMethod(method);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE generatorConfiguration
|
||||
PUBLIC "-//mybatis.org//DTD MyBatis Generator Configuration 1.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-generator-config_1_0.dtd">
|
||||
<generatorConfiguration>
|
||||
<properties resource="mybatis-generator.properties" />
|
||||
<context id="Mysql" targetRuntime="MyBatis3Simple" defaultModelType="flat">
|
||||
<plugin type="tk.mybatis.mapper.generator.MapperPlugin">
|
||||
<property name="mappers" value="tk.mybatis.mapper.common.Mapper" />
|
||||
<!-- caseSensitive默认false,当数据库表名区分大小写时,可以将该属性设置为true -->
|
||||
<property name="caseSensitive" value="true" />
|
||||
</plugin>
|
||||
|
||||
<jdbcConnection driverClass="com.mysql.cj.jdbc.Driver" connectionURL="${jdbc.url}" userId="${jdbc.user}" password="${jdbc.password}">
|
||||
<property name="nullCatalogMeansCurrent" value="true" />
|
||||
</jdbcConnection>
|
||||
|
||||
<!-- targetProject:生成PO类的位置 -->
|
||||
<javaModelGenerator targetPackage="com.cool.store.entity" targetProject="coolstore-partner-model/src/main/java">
|
||||
<property name="enableSubPackages" value="true"/>
|
||||
</javaModelGenerator>
|
||||
|
||||
<!-- targetProject:mapperXML映射文件生成的位置 -->
|
||||
<sqlMapGenerator targetPackage="mapper" targetProject="coolstore-partner-dao/src/main/resources" />
|
||||
|
||||
<!-- targetPackage:mapper接口生成的位置 -->
|
||||
<javaClientGenerator targetPackage="com.cool.store.mapper" targetProject="coolstore-partner-dao/src/main/java" type="XMLMAPPER" />
|
||||
|
||||
<table tableName="${table.name}" enableCountByExample="false" enableUpdateByExample="true" enableDeleteByExample="false"
|
||||
enableSelectByExample="true" selectByExampleQueryId="true">
|
||||
<generatedKey column="id" sqlStatement="Mysql" identity="true" type=""/>
|
||||
</table>
|
||||
</context>
|
||||
</generatorConfiguration>
|
||||
@@ -3,4 +3,4 @@ jdbc.url = jdbc:mysql://dingpushcoolcollege.mysql.rds.aliyuncs.com:3306/coolcoll
|
||||
jdbc.user= coolstore
|
||||
jdbc.password = CSCErYcXniNYm7bT
|
||||
|
||||
table.name = hy_inspection_setting_mapping
|
||||
table.name = sys_menu_copy1
|
||||
@@ -29,8 +29,8 @@
|
||||
<!-- targetPackage:mapper接口生成的位置 -->
|
||||
<javaClientGenerator targetPackage="com.cool.store.mapper" targetProject="coolstore-partner-dao/src/main/java" type="XMLMAPPER" />
|
||||
|
||||
<table tableName="${table.name}" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false"
|
||||
enableSelectByExample="false" selectByExampleQueryId="false">
|
||||
<table tableName="${table.name}" enableCountByExample="false" enableUpdateByExample="true" enableDeleteByExample="false"
|
||||
enableSelectByExample="true" selectByExampleQueryId="true">
|
||||
<generatedKey column="id" sqlStatement="Mysql" identity="true" type=""/>
|
||||
</table>
|
||||
</context>
|
||||
|
||||
@@ -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,58 @@
|
||||
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(UpdateFollowTaskRequest request){
|
||||
HyFollowTaskDO result = new HyFollowTaskDO();
|
||||
result.setId(request.getFollowTaskId());
|
||||
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;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,78 @@
|
||||
package com.cool.store.service;
|
||||
|
||||
import com.cool.store.request.follow.AddFollowLogRequest;
|
||||
import com.cool.store.request.follow.AddFollowTaskRequest;
|
||||
import com.cool.store.request.follow.FollowTaskIdRequest;
|
||||
import com.cool.store.request.follow.UpdateFollowTaskRequest;
|
||||
import com.cool.store.vo.follow.FollowTaskLogVO;
|
||||
import com.cool.store.vo.follow.FollowTaskPageVO;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
|
||||
/**
|
||||
* @author zhangchenbiao
|
||||
* @FileName: FollowTaskService
|
||||
* @Description:
|
||||
* @date 2023-08-10 11:10
|
||||
*/
|
||||
public interface FollowTaskService {
|
||||
|
||||
/**
|
||||
* 工作台获取跟进任务
|
||||
* @param pageNum
|
||||
* @param pageSize
|
||||
* @param taskStatus
|
||||
* @param queryDate
|
||||
* @param followUserId
|
||||
* @return
|
||||
*/
|
||||
PageInfo<FollowTaskPageVO> getFollowTaskPage(Integer pageNum, Integer pageSize, Integer taskStatus, String queryDate, String followUserId);
|
||||
|
||||
/**
|
||||
* 获取线索跟进日志
|
||||
* @param pageNum
|
||||
* @param pageSize
|
||||
* @param partnerLineId
|
||||
* @return
|
||||
*/
|
||||
PageInfo<FollowTaskLogVO> getFollowLogPage(Integer pageNum, Integer pageSize, Long partnerLineId);
|
||||
|
||||
/**
|
||||
* 添加跟进日志
|
||||
* @param request
|
||||
* @param userId
|
||||
* @return
|
||||
*/
|
||||
Integer addFollowLog(AddFollowLogRequest request, String userId);
|
||||
|
||||
/**
|
||||
* 新增跟进任务
|
||||
* @param request
|
||||
* @param userId
|
||||
* @return
|
||||
*/
|
||||
Long addFollowTask(AddFollowTaskRequest request, String userId);
|
||||
|
||||
/**
|
||||
* 编辑跟进任务
|
||||
* @param request
|
||||
* @param userId
|
||||
* @return
|
||||
*/
|
||||
Integer updateFollowTask(UpdateFollowTaskRequest request, String userId);
|
||||
|
||||
/**
|
||||
* 完成跟进任务
|
||||
* @param request
|
||||
* @param userId
|
||||
* @return
|
||||
*/
|
||||
Integer finishFollowTask(FollowTaskIdRequest request, String userId);
|
||||
|
||||
/**
|
||||
* 作废跟进任务
|
||||
* @param request
|
||||
* @param userId
|
||||
* @return
|
||||
*/
|
||||
Integer cancelFollowTask(FollowTaskIdRequest request, String userId);
|
||||
}
|
||||
@@ -0,0 +1,150 @@
|
||||
package com.cool.store.service.impl;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.cool.store.constants.CommonConstants;
|
||||
import com.cool.store.dao.EnterpriseUserDAO;
|
||||
import com.cool.store.dao.HyFollowTaskDAO;
|
||||
import com.cool.store.dao.HyPartnerLineInfoDAO;
|
||||
import com.cool.store.dao.HyPartnerTaskInfoLogDAO;
|
||||
import com.cool.store.dto.log.LineLogInfo;
|
||||
import com.cool.store.dto.partner.PartnerSimpleInfoDTO;
|
||||
import com.cool.store.entity.HyFollowTaskDO;
|
||||
import com.cool.store.entity.HyPartnerLineInfoDO;
|
||||
import com.cool.store.enums.*;
|
||||
import com.cool.store.exception.ServiceException;
|
||||
import com.cool.store.request.follow.AddFollowLogRequest;
|
||||
import com.cool.store.request.follow.AddFollowTaskRequest;
|
||||
import com.cool.store.request.follow.FollowTaskIdRequest;
|
||||
import com.cool.store.request.follow.UpdateFollowTaskRequest;
|
||||
import com.cool.store.service.FollowTaskService;
|
||||
import com.cool.store.vo.follow.FollowTaskLogVO;
|
||||
import com.cool.store.vo.follow.FollowTaskPageVO;
|
||||
import com.github.pagehelper.Page;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @author zhangchenbiao
|
||||
* @FileName: FollowTaskServiceImpl
|
||||
* @Description:
|
||||
* @date 2023-08-10 11:10
|
||||
*/
|
||||
@Service
|
||||
public class FollowTaskServiceImpl implements FollowTaskService {
|
||||
|
||||
@Resource
|
||||
private HyFollowTaskDAO hyFollowTaskDAO;
|
||||
@Resource
|
||||
private HyPartnerLineInfoDAO hyPartnerLineInfoDAO;
|
||||
@Resource
|
||||
private HyPartnerTaskInfoLogDAO hyPartnerTaskInfoLogDAO;
|
||||
@Resource
|
||||
private EnterpriseUserDAO enterpriseUserDAO;
|
||||
|
||||
@Override
|
||||
public PageInfo<FollowTaskPageVO> getFollowTaskPage(Integer pageNum, Integer pageSize, Integer taskStatus, String queryDate, String followUserId) {
|
||||
String deadlineStartTIme = null, deadlineEndTIme = null;
|
||||
if(StringUtils.isNotBlank(queryDate) && FollowTaskStatusEnum.TODO.getCode().equals(taskStatus)){
|
||||
//只有待完成的时候需要根据截止时间查询
|
||||
deadlineStartTIme = queryDate + CommonConstants.DAY_START_TIME_SUFFIX;
|
||||
deadlineEndTIme = queryDate + CommonConstants.DAY_END_TIME_SUFFIX;
|
||||
}
|
||||
Page<HyFollowTaskDO> taskPage = hyFollowTaskDAO.getTaskPage(followUserId, taskStatus, deadlineStartTIme, deadlineEndTIme, pageNum, pageSize);
|
||||
PageInfo resultPage = new PageInfo(taskPage);
|
||||
if(CollectionUtils.isNotEmpty(taskPage)){
|
||||
List<Long> partnerLineIds = taskPage.stream().map(HyFollowTaskDO::getPartnerLineId).distinct().collect(Collectors.toList());
|
||||
Map<Long, PartnerSimpleInfoDTO> partnerSimpleInfoMap = hyPartnerLineInfoDAO.getPartnerSimpleInfoByLineIds(partnerLineIds);
|
||||
List<FollowTaskPageVO> resultList = FollowTaskPageVO.convertVO(taskPage, partnerSimpleInfoMap);
|
||||
resultPage.setList(resultList);
|
||||
}
|
||||
return resultPage;
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageInfo<FollowTaskLogVO> getFollowLogPage(Integer pageNum, Integer pageSize, Long partnerLineId) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer addFollowLog(AddFollowLogRequest request, String userId) {
|
||||
HyPartnerLineInfoDO lineInfo = checkLine(request.getPartnerLineId());
|
||||
String userName = enterpriseUserDAO.getUserName(userId);
|
||||
LineLogInfo lineLogInfo = new LineLogInfo(lineInfo.getPartnerId(), request.getPartnerLineId(), userId, userName, OperateTypeEnum.ADD_FOLLOW_LOG, WorkflowStageEnum.getWorkflowStageByCode(lineInfo.getWorkflowStage()), lineInfo.getWorkflowStatus(), null);
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.put(OperateLogFieldValueEnum.FOLLOW_LOG.getCode(), request.getFollowLog());
|
||||
lineLogInfo.setData(jsonObject);
|
||||
hyPartnerTaskInfoLogDAO.addOperateLog(lineLogInfo);
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Long addFollowTask(AddFollowTaskRequest request, String userId) {
|
||||
HyPartnerLineInfoDO lineInfo = checkLine(request.getPartnerLineId());
|
||||
HyFollowTaskDO task = AddFollowTaskRequest.convertDO(request);
|
||||
task.setFollowUserId(lineInfo.getInvestmentManager());
|
||||
Long followTaskId = hyFollowTaskDAO.addFollowTask(task);
|
||||
String userName = enterpriseUserDAO.getUserName(userId);
|
||||
LineLogInfo lineLogInfo = new LineLogInfo(lineInfo.getPartnerId(), request.getPartnerLineId(), userId, userName, OperateTypeEnum.ADD_FOLLOW_TASK, WorkflowStageEnum.getWorkflowStageByCode(lineInfo.getWorkflowStage()), lineInfo.getWorkflowStatus(), null);
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.put(OperateLogFieldValueEnum.FOLLOW_TASK_ID.getCode(), followTaskId);
|
||||
lineLogInfo.setData(jsonObject);
|
||||
hyPartnerTaskInfoLogDAO.addOperateLog(lineLogInfo);
|
||||
return followTaskId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer updateFollowTask(UpdateFollowTaskRequest request, String userId) {
|
||||
HyFollowTaskDO followTask = hyFollowTaskDAO.getFollowTask(request.getFollowTaskId());
|
||||
if(!FollowTaskStatusEnum.TODO.getCode().equals(followTask.getTaskStatus())){
|
||||
throw new ServiceException(ErrorCodeEnum.TASK_STATUS_NOT_ALLOW_OPERATE);
|
||||
}
|
||||
checkLine(followTask.getPartnerLineId());
|
||||
HyFollowTaskDO task = UpdateFollowTaskRequest.convertDO(request);
|
||||
return hyFollowTaskDAO.updateFollowTask(task);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer finishFollowTask(FollowTaskIdRequest request, String userId) {
|
||||
HyFollowTaskDO followTask = hyFollowTaskDAO.getFollowTask(request.getFollowTaskId());
|
||||
if(!FollowTaskStatusEnum.TODO.getCode().equals(followTask.getTaskStatus()) && !FollowTaskStatusEnum.OVERDUE.getCode().equals(followTask.getTaskStatus())){
|
||||
throw new ServiceException(ErrorCodeEnum.TASK_STATUS_NOT_ALLOW_OPERATE);
|
||||
}
|
||||
checkLine(followTask.getPartnerLineId());
|
||||
return hyFollowTaskDAO.finishFollowTask(request.getFollowTaskId());
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer cancelFollowTask(FollowTaskIdRequest request, String userId) {
|
||||
HyFollowTaskDO followTask = hyFollowTaskDAO.getFollowTask(request.getFollowTaskId());
|
||||
if(!FollowTaskStatusEnum.TODO.getCode().equals(followTask.getTaskStatus())){
|
||||
throw new ServiceException(ErrorCodeEnum.TASK_STATUS_NOT_ALLOW_OPERATE);
|
||||
}
|
||||
checkLine(followTask.getPartnerLineId());
|
||||
return hyFollowTaskDAO.cancelFollowTask(request.getFollowTaskId());
|
||||
}
|
||||
|
||||
/**
|
||||
* 线索校验
|
||||
* @param partnerLineId
|
||||
* @return
|
||||
*/
|
||||
public HyPartnerLineInfoDO checkLine(Long partnerLineId){
|
||||
HyPartnerLineInfoDO lineInfo = hyPartnerLineInfoDAO.selectByPrimaryKeySelective(partnerLineId);
|
||||
if(Objects.isNull(lineInfo) || lineInfo.getDeleted()){
|
||||
throw new ServiceException(ErrorCodeEnum.LINE_ID_IS_NOT_EXIST);
|
||||
}
|
||||
if(!LineStatusEnum.PRIVATE_SEAS.getCode().equals(lineInfo.getLineStatus())){
|
||||
//线索只有私海的时候才能操作
|
||||
throw new ServiceException(ErrorCodeEnum.LINE_STATUS_NOT_ALLOW_OPERATE);
|
||||
}
|
||||
return lineInfo;
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,6 @@
|
||||
package com.cool.store;
|
||||
|
||||
import com.zaxxer.hikari.HikariDataSource;
|
||||
import org.mybatis.spring.annotation.MapperScan;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.boot.autoconfigure.jdbc.DataSourceProperties;
|
||||
@@ -10,6 +9,7 @@ import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Primary;
|
||||
import org.springframework.scheduling.annotation.EnableAsync;
|
||||
import tk.mybatis.spring.annotation.MapperScan;
|
||||
|
||||
import javax.sql.DataSource;
|
||||
|
||||
|
||||
@@ -0,0 +1,79 @@
|
||||
package com.cool.store.controller;
|
||||
|
||||
import com.cool.store.context.CurrentUserHolder;
|
||||
import com.cool.store.request.follow.AddFollowLogRequest;
|
||||
import com.cool.store.request.follow.AddFollowTaskRequest;
|
||||
import com.cool.store.request.follow.FollowTaskIdRequest;
|
||||
import com.cool.store.request.follow.UpdateFollowTaskRequest;
|
||||
import com.cool.store.response.ResponseResult;
|
||||
import com.cool.store.service.FollowTaskService;
|
||||
import com.cool.store.vo.follow.FollowTaskLogVO;
|
||||
import com.cool.store.vo.follow.FollowTaskPageVO;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @author zhangchenbiao
|
||||
* @FileName: FollowTaskController
|
||||
* @Description:
|
||||
* @date 2023-08-08 14:35
|
||||
*/
|
||||
@RestController
|
||||
@Slf4j
|
||||
@Api(tags = "跟进任务")
|
||||
public class FollowTaskController {
|
||||
|
||||
@Resource
|
||||
private FollowTaskService followTaskService;
|
||||
|
||||
@ApiOperation("工作台获取跟进任务")
|
||||
@GetMapping("/follow/task/page")
|
||||
public ResponseResult<PageInfo<FollowTaskPageVO>> getFollowTaskPage(@RequestParam("pageNum")Integer pageNum, @RequestParam("pageSize")Integer pageSize,
|
||||
@RequestParam("taskStatus")Integer taskStatus, @RequestParam(value = "queryDate", required = false) String queryDate){
|
||||
return ResponseResult.success(followTaskService.getFollowTaskPage(pageNum, pageSize, taskStatus, queryDate, CurrentUserHolder.getUserId()));
|
||||
}
|
||||
|
||||
@ApiOperation("获取线索跟进日志")
|
||||
@GetMapping("/follow/log/page")
|
||||
public ResponseResult<PageInfo<FollowTaskLogVO>> getFollowLogPage(@RequestParam("pageNum")Integer pageNum, @RequestParam("pageSize")Integer pageSize, @RequestParam("partnerLineId")Long partnerLineId){
|
||||
return ResponseResult.success(followTaskService.getFollowLogPage(pageNum, pageSize, partnerLineId));
|
||||
}
|
||||
|
||||
@ApiOperation("添加跟进日志")
|
||||
@PostMapping("/follow/log/add")
|
||||
public ResponseResult<Integer> addFollowLog(@RequestBody @Validated AddFollowLogRequest request){
|
||||
return ResponseResult.success(followTaskService.addFollowLog(request, CurrentUserHolder.getUserId()));
|
||||
}
|
||||
|
||||
@ApiOperation("新增跟进任务")
|
||||
@PostMapping("/follow/task/add")
|
||||
public ResponseResult<Long> addFollowTask(@RequestBody @Validated AddFollowTaskRequest request){
|
||||
return ResponseResult.success(followTaskService.addFollowTask(request, CurrentUserHolder.getUserId()));
|
||||
}
|
||||
|
||||
@ApiOperation("编辑跟进任务")
|
||||
@PostMapping("/follow/task/update")
|
||||
public ResponseResult<Integer> updateFollowTask(@RequestBody @Validated UpdateFollowTaskRequest request){
|
||||
return ResponseResult.success(followTaskService.updateFollowTask(request, CurrentUserHolder.getUserId()));
|
||||
}
|
||||
|
||||
@ApiOperation("完成跟进任务")
|
||||
@PostMapping("/follow/task/finish")
|
||||
public ResponseResult<Integer> finishFollowTask(@RequestBody @Validated FollowTaskIdRequest request){
|
||||
return ResponseResult.success(followTaskService.finishFollowTask(request, CurrentUserHolder.getUserId()));
|
||||
}
|
||||
|
||||
@ApiOperation("作废跟进任务")
|
||||
@PostMapping("/follow/task/cancel")
|
||||
public ResponseResult<Integer> cancelFollowTask(@RequestBody @Validated FollowTaskIdRequest request){
|
||||
return ResponseResult.success(followTaskService.cancelFollowTask(request, CurrentUserHolder.getUserId()));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -258,7 +258,7 @@ public class TestController {
|
||||
}
|
||||
|
||||
@GetMapping("/getWechatAccessToken")
|
||||
public ResponseResult getWechatAccessToken(@RequestParam(value = "appId")String appId, @RequestParam("appSecret")String appSecret){
|
||||
public ResponseResult getWechatAccessToken(@RequestParam(value = "appId")String appId, @RequestParam("appSecret")String appSecret) {
|
||||
try {
|
||||
return ResponseResult.success(isvHttpRequest.getWechatAccessToken(appId, appSecret));
|
||||
} catch (ApiException e) {
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package com.cool.store;
|
||||
|
||||
import com.zaxxer.hikari.HikariDataSource;
|
||||
import org.mybatis.spring.annotation.MapperScan;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.boot.autoconfigure.jdbc.DataSourceProperties;
|
||||
@@ -12,6 +11,7 @@ import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Primary;
|
||||
import org.springframework.scheduling.annotation.EnableAsync;
|
||||
import tk.mybatis.spring.annotation.MapperScan;
|
||||
|
||||
import javax.sql.DataSource;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user