Merge remote-tracking branch 'origin/cc_partner_init' into cc_partner_init

This commit is contained in:
zhangchenbiao
2024-03-28 13:51:54 +08:00
41 changed files with 948 additions and 48 deletions

View File

@@ -0,0 +1,33 @@
package com.cool.store.enums;
public enum JoinTypeEnum {
JOIN_TYPE_ONE(1,"个人加盟"),
JOIN_TYPE_TWO(2,"企业加盟"),
;
private Integer code;
private String typeName;
JoinTypeEnum(Integer code, String typeName) {
this.code = code;
this.typeName = typeName;
}
public Integer getCode() {
return code;
}
public void setCode(Integer code) {
this.code = code;
}
public String getTypeName() {
return typeName;
}
public void setTypeName(String typeName) {
this.typeName = typeName;
}
}

View File

@@ -10,11 +10,12 @@ public enum WorkflowSubStageStatusEnum {
//意向申请
INTENT_0(0,"待提交"),
INTENT_5(5,"待审核"),
INTENT_7(7,"未通过"),
//邀约面谈
INVITING_INTERVIEWS_10(10,"待预约"),
INVITING_INTERVIEWS_15(15,"待面谈"),
INVITING_INTERVIEWS_20(20,"面谈未通过"),
INVITING_INTERVIEWS_20(20,"待审核"),
//一审面试
FIRST_INTERVIEWS_25(25,"待预约"),
@@ -31,6 +32,7 @@ public enum WorkflowSubStageStatusEnum {
//签署意向协议
SIGN_INTENT_AGREEMENT_60(60,"待补充"),
SIGN_INTENT_AGREEMENT_63(63,"待审核"),
SIGN_INTENT_AGREEMENT_65(65,"不通过"),
SIGN_INTENT_AGREEMENT_70(70,"待提交"),
SIGN_INTENT_AGREEMENT_75(75,"待OA审核"),

View File

@@ -0,0 +1,33 @@
package com.cool.store.dao;
import com.cool.store.entity.HyPartnerLabelDO;
import com.cool.store.mapper.HyPartnerLabelMapper;
import org.apache.commons.collections4.CollectionUtils;
import org.springframework.stereotype.Repository;
import javax.annotation.Resource;
import java.util.List;
/**
* @Author suzhuhong
* @Date 2024/3/26 16:39
* @Version 1.0
*/
@Repository
public class HyPartnerLabelDAO {
@Resource
HyPartnerLabelMapper hyPartnerLabelMapper;
public List<HyPartnerLabelDO> listByIds(List<Long> ids ){
if (CollectionUtils.isEmpty(ids)){
return null;
}
return hyPartnerLabelMapper.getLabelListByIds(ids);
}
}

View File

@@ -7,10 +7,14 @@ import com.cool.store.enums.WorkflowSubStageEnum;
import com.cool.store.enums.WorkflowSubStageStatusEnum;
import com.cool.store.exception.ServiceException;
import com.cool.store.mapper.LineInfoMapper;
import com.cool.store.request.LineListRequest;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import javax.annotation.Resource;
import java.util.List;
import java.util.Objects;
/**
@@ -72,4 +76,16 @@ public class LineInfoDAO {
}
return null;
}
public List<LineInfoDO> listByInvestmentManager(String investmentManagerUserId,Integer subStageStatus) {
if (StringUtils.isBlank(investmentManagerUserId)){
return null;
}
List<LineInfoDO> lineInfo = lineInfoMapper.listByInvestmentManager(investmentManagerUserId,subStageStatus);
return lineInfo;
}
public List<LineInfoDO> lineList(LineListRequest lineListRequest, String userId, List<Long> wantShopAreaIds) {
List<LineInfoDO> lineInfo = lineInfoMapper.lineList(lineListRequest,userId,wantShopAreaIds);
return lineInfo;
}
}

View File

@@ -8,9 +8,11 @@ import com.cool.store.request.LineInterviewPageRequest;
import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.apache.commons.collections4.CollectionUtils;
import org.springframework.stereotype.Repository;
import javax.annotation.Resource;
import java.util.List;
import java.util.Objects;
/**
@@ -32,6 +34,13 @@ public class LineInterviewDAO {
return lineInterviewMapper.getInterviewInfo(lineId, interviewType.getCode());
}
public List<LineInterviewDO> getInterviewByLindIds(List<Long> lineIds, InterviewTypeEnum interviewType){
if(CollectionUtils.isEmpty(lineIds) || Objects.isNull(interviewType)){
return null;
}
return lineInterviewMapper.getInterviewByLindIds(lineIds, interviewType.getCode());
}
public Integer updateInterviewInfo(LineInterviewDO interview){
return lineInterviewMapper.updateByPrimaryKeySelective(interview);
}

View File

@@ -1,13 +1,33 @@
package com.cool.store.mapper;
import com.cool.store.entity.LineInfoDO;
import com.cool.store.enums.WorkflowSubStageStatusEnum;
import com.cool.store.request.LineListRequest;
import org.apache.ibatis.annotations.Param;
import tk.mybatis.mapper.common.Mapper;
import java.util.List;
public interface LineInfoMapper extends Mapper<LineInfoDO> {
LineInfoDO getByPartnerId(@Param("partnerId") String partnerId);
LineInfoDO getByLineId(@Param("lineId") Long lineId);
/**
* 查询招商经理待处理数据
* @param investmentManagerUserId
* @return
*/
List<LineInfoDO> listByInvestmentManager(@Param("investmentManagerUserId") String investmentManagerUserId, @Param("code") Integer code);
/**
* 我的线索列表
* @param lineListRequest
* @return
*/
List<LineInfoDO> lineList(@Param("request") LineListRequest lineListRequest,
@Param("userId") String userId,
@Param("wantShopAreaIds") List<Long> wantShopAreaIds);
void insertOrUpdate(@Param("param") LineInfoDO lineInfoParam);
}

View File

@@ -7,6 +7,8 @@ import com.github.pagehelper.Page;
import org.apache.ibatis.annotations.Param;
import tk.mybatis.mapper.common.Mapper;
import java.util.List;
public interface LineInterviewMapper extends Mapper<LineInterviewDO> {
/**
@@ -17,6 +19,14 @@ public interface LineInterviewMapper extends Mapper<LineInterviewDO> {
*/
LineInterviewDO getInterviewInfo(@Param("lineId") Long lineId, @Param("interviewType") Integer interviewType);
/**
* getInterviewByLindIds
* @param lineIds
* @param interviewType
* @return
*/
List<LineInterviewDO> getInterviewByLindIds(@Param("lineIds") List<Long> lineIds, @Param("interviewType") Integer interviewType);
/**
* 获取面试分页
* @param request

View File

@@ -14,4 +14,6 @@ public interface TrainingExperienceMapper {
void updateStatus(@Param("lineId") Long lineId,
@Param("status") Integer status,
@Param("abandonCause") String abandonCause);
LeaseBaseInfoDO selectByLineId(@Param("lineId") Long lineId);
}

View File

@@ -16,13 +16,13 @@
<result column="select_site_num" jdbcType="INTEGER" property="selectSiteNum" />
<result column="prepare_shop_num" jdbcType="INTEGER" property="prepareShopNum" />
<result column="open_shop_num" jdbcType="INTEGER" property="openShopNum" />
<result column="line_source" jdbcType="TINYINT" property="lineSource" />
<result column="line_source" jdbcType="BIGINT" property="lineSource" />
<result column="investment_manager" jdbcType="VARCHAR" property="investmentManager" />
<result column="development_manager" jdbcType="VARCHAR" property="developmentManager" />
<result column="first_interviewer" jdbcType="VARCHAR" property="firstInterviewer" />
<result column="second_interviewer" jdbcType="VARCHAR" property="secondInterviewer" />
<result column="user_portrait" jdbcType="VARCHAR" property="userPortrait" />
<result column="is_join" jdbcType="BIT" property="isJoin" />
<result column="join_status" jdbcType="BIT" property="joinStatus" />
<result column="line_status" jdbcType="TINYINT" property="lineStatus" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
@@ -93,8 +93,8 @@
<if test="param.userPortrait != null and param.userPortrait != ''">
user_portrait,
</if>
<if test="param.isJoin != null">
is_join,
<if test="param.joinStatus != null">
join_status,
</if>
<if test="param.lineStatus != null">
line_status,
@@ -237,4 +237,46 @@
select * from xfsg_line_info where id = #{lineId} and deleted = 0
</select>
<select id="listByInvestmentManager" resultMap="BaseResultMap">
select * from xfsg_line_info
where deleted = 0
and workflow_sub_stage_status = 5
<if test="investmentManagerUserId != null and investmentManagerUserId != ''">
and investment_manager = #{investmentManagerUserId}
</if>
<if test="code != null">
and workflow_sub_stage_status = #{code}
</if>
</select>
<select id="lineList" resultMap="BaseResultMap">
select * from xfsg_line_info
where deleted = 0
<if test="userId != null and userId != ''">
and investment_manager = #{userId}
</if>
<if test="request.userName != null and request.username!=''">
and username = #{request.userName}
</if>
<if test="request.mobile != null and request.mobile!=''">
and mobile = #{request.mobile}
</if>
<if test="request.wantShopAreaId != null">
and want_shop_area_id = #{request.wantShopAreaId}
</if>
<if test="request.lineSource != null">
and line_source = #{request.lineSource}
</if>
<if test="request.createTimeStart!=null and request.createTimeEnd!=null">
and create_time between #{request.createTimeStart} and #{request.createTimeEnd}
</if>
<if test="wantShopAreaIds !=null and wantShopAreaIds.size>0">
<foreach collection="wantShopAreaIds" item="wantShopAreaId" open="and want_shop_area_id in (" close=")" separator=",">
#{wantShopAreaId}
</foreach>
</if>
</select>
</mapper>

View File

@@ -30,6 +30,15 @@
select * from xfsg_line_interview where line_id = #{lineId} and interview_type = #{interviewType} and deleted = '0'
</select>
<select id="getInterviewByLindIds" resultMap="BaseResultMap">
select * from xfsg_line_interview where interview_type = #{interviewType} and deleted = '0'
<if test="lineIds != null">
<foreach collection="lineIds" item="item" separator="," open="and line_id in (" close=")">
#{item}
</foreach>
</if>
</select>
<select id="getInterviewerPage" resultType="com.cool.store.dto.interview.LineInterviewPageDTO">
select
a.id as interviewId,

View File

@@ -42,14 +42,14 @@
<if test="entity.abandonCause != null">abandon_cause,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="entity.partnerId != null">#{request.partnerId},</if>
<if test="entity.lineId != null">#{request.lineId},</if>
<if test="entity.storeName != null">#{request.storeName},</if>
<if test="entity.storeId != null">#{request.storeId},</if>
<if test="entity.experienceStartTime != null">#{request.experienceStartTime},</if>
<if test="entity.experienceEndTime != null">#{request.experienceEndTime},</if>
<if test="entity.experienceStatus != null">#{request.experienceStatus},</if>
<if test="entity.abandonCause != null">#{request.abandonCause},</if>
<if test="entity.partnerId != null">#{entity.partnerId},</if>
<if test="entity.lineId != null">#{entity.lineId},</if>
<if test="entity.storeName != null">#{entity.storeName},</if>
<if test="entity.storeId != null">#{entity.storeId},</if>
<if test="entity.experienceStartTime != null">#{entity.experienceStartTime},</if>
<if test="entity.experienceEndTime != null">#{entity.experienceEndTime},</if>
<if test="entity.experienceStatus != null">#{entity.experienceStatus},</if>
<if test="entity.abandonCause != null">#{entity.abandonCause},</if>
</trim>
</insert>
<update id="updateStatus">
@@ -60,6 +60,12 @@
abandon_cause=#{abandonCause}
where line_id = #{lineId}
</update>
<select id="selectByLineId" resultType="com.cool.store.entity.LeaseBaseInfoDO">
select
<include refid="Base_Column_List"/>
from xfsg_lease_base_info
where line_id = #{lineId}
</select>
</mapper>

View File

@@ -1,5 +1,6 @@
package com.cool.store.entity;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Date;
@@ -19,9 +20,9 @@ public class LeaseBaseInfoDO {
private Date experienceStartTime;
private Date experienceEndTime;
@ApiModelProperty("体验状态 0完成 1放弃")
private Integer experienceStatus;
@ApiModelProperty("放弃原因")
private String abandonCause;
private Date createTime;

View File

@@ -123,8 +123,8 @@ public class LineInfoDO {
/**
* 是否是加盟商0.否 1.是
*/
@Column(name = "is_join")
private Boolean isJoin;
@Column(name = "join_status")
private Boolean joinStatus;
/**
* 0.公海 1.私海 2黑名单

View File

@@ -0,0 +1,32 @@
package com.cool.store.request;
import com.cool.store.common.PageBasicInfo;
import com.github.pagehelper.PageInfo;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.models.auth.In;
import lombok.Data;
/**
* @Author suzhuhong
* @Date 2024/3/27 16:32
* @Version 1.0
*/
@Data
public class LineListRequest extends PageBasicInfo {
@ApiModelProperty("线索姓名")
private String userName;
@ApiModelProperty("线索手机号")
private String mobile;
@ApiModelProperty("线索子阶段")
private Integer workflowSubStage;
@ApiModelProperty("线索创建时间_开始")
private String createTimeStart;
@ApiModelProperty("线索创建时间_结束")
private String createTimeEnd;
@ApiModelProperty("意向区域ID")
private Integer wantShopAreaId;
@ApiModelProperty("线索来源")
private Integer lineSource;
}

View File

@@ -0,0 +1,16 @@
package com.cool.store.request;
import com.cool.store.enums.ExperienceStatusEnum;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.ApiParam;
import lombok.Data;
@Data
public class TrainingExperienceChangeRequest {
@ApiModelProperty("实训体验状态 DONE:完成 ABANDON:放弃")
private ExperienceStatusEnum statusEnum;
@ApiModelProperty("线索id")
private Long lineId;
@ApiParam(value = "放弃原因状态为ABANDON才填写")
private String abandonCause;
}

View File

@@ -2,6 +2,7 @@ package com.cool.store.response;
import com.cool.store.entity.SigningBaseInfoDO;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.models.auth.In;
import lombok.Data;
import java.util.Date;
@@ -43,6 +44,9 @@ public class SigningBaseInfoResponse {
@ApiModelProperty("更新时间")
private Date updateTime;
@ApiModelProperty("加盟身份 1个人加盟 2企业加盟")
private Integer type;
public static SigningBaseInfoResponse from(SigningBaseInfoDO signingBaseInfoDO) {
if (signingBaseInfoDO == null) {

View File

@@ -0,0 +1,58 @@
package com.cool.store.vo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.List;
/**
* @Author suzhuhong
* @Date 2024/3/26 15:18
* @Version 1.0
*/
@Data
public class BaseInfoVO {
@ApiModelProperty("线索ID")
private Long lineId;
@ApiModelProperty("partnerId")
private Integer partnerId;
@ApiModelProperty("线索名称")
private String username;
@ApiModelProperty("手机号")
private String mobile;
@ApiModelProperty("意向加盟区域")
private String wantShopAreaName;
@ApiModelProperty("线索标签")
private List<LabelBaseInfoVO> userPortraitList;
private Integer workflowSubStage;
@ApiModelProperty("子阶段状态")
private Integer workflowSubStageStatus;
public BaseInfoVO(){}
/**
* 写一个构造方法 参数是BaseInfoVO
* @param baseInfoVO
*/
public BaseInfoVO(BaseInfoVO baseInfoVO) {
this.lineId = baseInfoVO.getLineId();
this.partnerId = baseInfoVO.getPartnerId();
this.username = baseInfoVO.getUsername();
this.mobile = baseInfoVO.getMobile();
this.workflowSubStage = baseInfoVO.getWorkflowSubStage();
this.wantShopAreaName = baseInfoVO.getWantShopAreaName();
this.userPortraitList = baseInfoVO.getUserPortraitList();
this.workflowSubStageStatus = baseInfoVO.getWorkflowSubStageStatus();
}
}

View File

@@ -0,0 +1,22 @@
package com.cool.store.vo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @Author suzhuhong
* @Date 2024/3/26 15:24
* @Version 1.0
*/
@Data
public class LabelBaseInfoVO {
@ApiModelProperty("标签ID")
private Long labelId;
@ApiModelProperty("标签名称")
private String labelName;
}

View File

@@ -149,9 +149,9 @@ public class LineInfoVO {
/**
* 是否是加盟商0.否 1.是
*/
@Column(name = "is_join")
@ApiModelProperty("是否是加盟商0.否 1.是")
private Boolean isJoin;
@Column(name = "join_status")
@ApiModelProperty("0-线索 1-蓄水池 2-加盟商")
private Boolean joinStatus;
/**
* 0.公海 1.私海 2黑名单

View File

@@ -0,0 +1,36 @@
package com.cool.store.vo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @Author suzhuhong
* @Date 2024/3/27 16:13
* @Version 1.0
*/
@Data
public class LineListVO extends BaseInfoVO{
@ApiModelProperty("招商经理名称")
private String investmentManagerUserName;
@ApiModelProperty("线索来源名称")
private String lineSourceName;
@ApiModelProperty("创建时间")
private String createTime;
@ApiModelProperty("更新时间")
private String updateTime;
@ApiModelProperty("更新人名称")
private String updateUserName;
public LineListVO(){}
public LineListVO(BaseInfoVO baseInfoVO) {
super(baseInfoVO);
}
}

View File

@@ -25,6 +25,8 @@ public class PartnerBaseInfoVO {
private String mobile;
@ApiModelProperty("1男 2女")
private Integer sex;
@ApiModelProperty("意向加盟区域")
private String area;
@ApiModelProperty("意向区域编码")
private String areaCode;
@ApiModelProperty("常驻区域详细地址(居住地址)")

View File

@@ -0,0 +1,25 @@
package com.cool.store.vo.desk;
import com.cool.store.vo.BaseInfoVO;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Date;
/**
* @Author suzhuhong
* @Date 2024/3/26 15:33
* @Version 1.0
*/
@Data
public class IntendPendingVO extends BaseInfoVO {
@ApiModelProperty("提交时间")
private Date joinTime;
public IntendPendingVO(){}
public IntendPendingVO(BaseInfoVO baseInfoVO) {
super(baseInfoVO);
}
}

View File

@@ -0,0 +1,28 @@
package com.cool.store.vo.desk;
import com.cool.store.vo.BaseInfoVO;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @Author suzhuhong
* @Date 2024/3/27 11:36
* @Version 1.0
*/
@Data
public class InterviewPendingVO extends BaseInfoVO {
@ApiModelProperty("面谈开始时间 2024年04月23日 16:00")
private String startTime;
@ApiModelProperty("面谈结束时间 10:00")
private String endTime;
public InterviewPendingVO(){};
public InterviewPendingVO(BaseInfoVO baseInfoVO) {
super(baseInfoVO);
}
}

View File

@@ -0,0 +1,55 @@
package com.cool.store.service;
import com.cool.store.entity.HyPartnerLabelDO;
import com.cool.store.entity.LineInfoDO;
import com.cool.store.vo.BaseInfoVO;
import com.cool.store.vo.desk.IntendPendingVO;
import com.cool.store.vo.desk.InterviewPendingVO;
import com.github.pagehelper.PageInfo;
import java.util.List;
import java.util.Map;
/**
* @Author suzhuhong
* @Date 2024/3/26 15:15
* @Version 1.0
*/
public interface DeskService {
/**
* 加盟申请待处理
* @param pageNum
* @param pageSize
* @param userId
* @return
*/
PageInfo<IntendPendingVO> intendPendingList(Integer pageNum, Integer pageSize,String userId);
/**
* 面试待处理
* @param pageNum
* @param pageSize
* @param userId
* @return
*/
PageInfo<InterviewPendingVO> interviewPendingList(Integer pageNum, Integer pageSize,String userId);
/**
* convertToBaseInfoVO
* @param lineInfoDO
* @param userPortraitMap
* @param wantShopAreaMap
* @return
*/
BaseInfoVO convertToBaseInfoVO(LineInfoDO lineInfoDO, Map<Long, HyPartnerLabelDO> userPortraitMap, Map<Long,String> wantShopAreaMap);
/**
* getUserPortraitMap
* @param lineInfoDOList
* @return
*/
Map<Long, HyPartnerLabelDO> getUserPortraitMap(List<LineInfoDO> lineInfoDOList);
}

View File

@@ -1,6 +1,10 @@
package com.cool.store.service;
import com.cool.store.context.LoginUserInfo;
import com.cool.store.request.LineListRequest;
import com.cool.store.vo.LineInfoVO;
import com.cool.store.vo.LineListVO;
import com.github.pagehelper.PageInfo;
/**
* @Author suzhuhong
@@ -18,6 +22,13 @@ public interface LineService {
LineInfoVO getLineInfo(Long lineId);
/**
* 我的线索 团队线索
* @param lineListRequest
* @param loginUserInfo
* @return
*/
PageInfo<LineListVO> getLineList(LineListRequest lineListRequest, LoginUserInfo loginUserInfo,Boolean teamFlag);
}

View File

@@ -1,5 +1,6 @@
package com.cool.store.service;
import com.cool.store.entity.LeaseBaseInfoDO;
import com.cool.store.request.TrainingExperienceDistributionRequest;
public interface TrainingExperienceService {
@@ -18,4 +19,5 @@ public interface TrainingExperienceService {
*/
void experienceStatusChange(Long lineId, Integer status, String abandonCause);
LeaseBaseInfoDO getTrainingExperience(Long lineId);
}

View File

@@ -0,0 +1,147 @@
package com.cool.store.service.impl;
import cn.hutool.core.bean.BeanUtil;
import com.cool.store.dao.HyOpenAreaInfoDAO;
import com.cool.store.dao.HyPartnerLabelDAO;
import com.cool.store.dao.LineInfoDAO;
import com.cool.store.dao.LineInterviewDAO;
import com.cool.store.entity.HyOpenAreaInfoDO;
import com.cool.store.entity.HyPartnerLabelDO;
import com.cool.store.entity.LineInfoDO;
import com.cool.store.entity.LineInterviewDO;
import com.cool.store.enums.InterviewTypeEnum;
import com.cool.store.enums.WorkflowSubStageStatusEnum;
import com.cool.store.mapper.LineInterviewMapper;
import com.cool.store.service.DeskService;
import com.cool.store.utils.StringUtil;
import com.cool.store.utils.poi.DateUtils;
import com.cool.store.vo.BaseInfoVO;
import com.cool.store.vo.LabelBaseInfoVO;
import com.cool.store.vo.desk.IntendPendingVO;
import com.cool.store.vo.desk.InterviewPendingVO;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.apache.commons.collections4.CollectionUtils;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.*;
import java.util.stream.Collectors;
/**
* @Author suzhuhong
* @Date 2024/3/26 15:15
* @Version 1.0
*/
@Service
public class DeskServiceImpl implements DeskService {
@Resource
LineInfoDAO lineInfoDAO;
@Resource
HyPartnerLabelDAO hyPartnerLabelDAO;
@Resource
HyOpenAreaInfoDAO hyOpenAreaInfoDAO;
@Resource
LineInterviewDAO lineInterviewDAO;
@Override
public PageInfo<IntendPendingVO> intendPendingList(Integer pageNum, Integer pageSize,String userId) {
PageHelper.startPage(pageNum, pageSize);
List<LineInfoDO> lineInfoDOS = lineInfoDAO.listByInvestmentManager(userId, WorkflowSubStageStatusEnum.INTENT_5.getCode());
PageInfo page = new PageInfo(lineInfoDOS);
Map<Long, HyPartnerLabelDO> userPortraitMap = this.getUserPortraitMap(lineInfoDOS);
List<Long> wantShopAreaIds = lineInfoDOS.stream().filter(lineInfoDO -> lineInfoDO.getWantShopAreaId() != null).map(LineInfoDO::getWantShopAreaId).collect(Collectors.toList());
Map<Long, String> wantShopAreaMap = hyOpenAreaInfoDAO.selectNameMapByIds(wantShopAreaIds);
List<IntendPendingVO> list = new ArrayList<>();
lineInfoDOS.forEach(x->{
BaseInfoVO baseInfoVO = convertToBaseInfoVO(x, userPortraitMap, wantShopAreaMap);
IntendPendingVO intendPendingVO = new IntendPendingVO(baseInfoVO);
intendPendingVO.setJoinTime(new Date());
list.add(intendPendingVO);
});
page.setList(list);
return page ;
}
@Override
public PageInfo<InterviewPendingVO> interviewPendingList(Integer pageNum, Integer pageSize, String userId) {
PageHelper.startPage(pageNum, pageSize);
List<LineInfoDO> lineInfoDOS = lineInfoDAO.listByInvestmentManager(userId,WorkflowSubStageStatusEnum.INTENT_5.getCode());
PageInfo page = new PageInfo(lineInfoDOS);
Map<Long, HyPartnerLabelDO> userPortraitMap = this.getUserPortraitMap(lineInfoDOS);
List<Long> wantShopAreaIds = lineInfoDOS.stream().filter(lineInfoDO -> lineInfoDO.getWantShopAreaId() != null).map(LineInfoDO::getWantShopAreaId).collect(Collectors.toList());
Map<Long, String> wantShopAreaMap = hyOpenAreaInfoDAO.selectNameMapByIds(wantShopAreaIds);
List<Long> lineIds = lineInfoDOS.stream().filter(lineInfoDO -> lineInfoDO.getId() != null).map(LineInfoDO::getId).collect(Collectors.toList());
List<LineInterviewDO> interviewByLindIds = lineInterviewDAO.getInterviewByLindIds(lineIds, InterviewTypeEnum.MEET);
Map<Long, LineInterviewDO> interviewDOMap = interviewByLindIds.stream().collect(Collectors.toMap(LineInterviewDO::getLineId, x -> x, (k1, k2) -> k1));
List<InterviewPendingVO> list = new ArrayList<>();
lineInfoDOS.forEach(x->{
BaseInfoVO baseInfoVO = convertToBaseInfoVO(x, userPortraitMap, wantShopAreaMap);
InterviewPendingVO interviewPendingVO = new InterviewPendingVO(baseInfoVO);
LineInterviewDO lineInterviewDO = interviewDOMap.get(x.getId());
if (lineInterviewDO != null){
interviewPendingVO.setStartTime(DateUtils.parseDateToStr(DateUtils.SPECIAL_DATE_START,lineInterviewDO.getStartTime()));
interviewPendingVO.setEndTime(DateUtils.parseDateToStr(DateUtils.SPECIAL_DATE_END,lineInterviewDO.getEndTime()));
}
list.add(interviewPendingVO);
});
page.setList(list);
return page;
}
/**
* convertToBaseInfoVO
* @param lineInfoDO
* @param userPortraitMap
* @param wantShopAreaMap
* @return
*/
@Override
public BaseInfoVO convertToBaseInfoVO(LineInfoDO lineInfoDO, Map<Long, HyPartnerLabelDO> userPortraitMap, Map<Long,String> wantShopAreaMap){
BaseInfoVO baseInfoVO = new BaseInfoVO();
BeanUtil.copyProperties(lineInfoDO, baseInfoVO);
baseInfoVO.setLineId(lineInfoDO.getId());
String userPortrait = lineInfoDO.getUserPortrait();
List<LabelBaseInfoVO> labelBaseInfoList = new ArrayList<>();
if (StringUtil.isNotEmpty(userPortrait)){
Arrays.asList(userPortrait.split(",")).subList(1, userPortrait.split(",").length).forEach(x->{
LabelBaseInfoVO labelBaseInfoVO = new LabelBaseInfoVO();
HyPartnerLabelDO hyPartnerLabelDO = userPortraitMap.get(Long.valueOf(x));
if (hyPartnerLabelDO != null){
labelBaseInfoVO.setLabelId(userPortraitMap.getOrDefault(Long.valueOf(x), new HyPartnerLabelDO()).getId());
labelBaseInfoVO.setLabelName(userPortraitMap.getOrDefault(Long.valueOf(x),new HyPartnerLabelDO()).getLabelName());
labelBaseInfoList.add(labelBaseInfoVO);
}
});
}
baseInfoVO.setUserPortraitList(labelBaseInfoList);
baseInfoVO.setWantShopAreaName(wantShopAreaMap.get(lineInfoDO.getWantShopAreaId()));
return baseInfoVO;
}
/**
* 用户画像MAP
* @param lineInfoDOList
* @return
*/
@Override
public Map<Long, HyPartnerLabelDO> getUserPortraitMap(List<LineInfoDO> lineInfoDOList){
List<Long> libelIds = new ArrayList<>();
lineInfoDOList.stream().forEach(x->{
if (StringUtil.isNotEmpty(x.getUserPortrait())){
List<String> list = Arrays.asList(x.getUserPortrait().split(",")).subList(1, x.getUserPortrait().split(",").length);
libelIds.addAll(list.stream().map(Long::valueOf).collect(Collectors.toList()));
}
});
List<HyPartnerLabelDO> hyPartnerLabelDOS = hyPartnerLabelDAO.listByIds(libelIds);
if (CollectionUtils.isEmpty(hyPartnerLabelDOS)){
return new HashMap<>();
}
return hyPartnerLabelDOS.stream().collect(Collectors.toMap(HyPartnerLabelDO::getId, x -> x));
}
}

View File

@@ -1,11 +1,14 @@
package com.cool.store.service.impl;
import com.cool.store.entity.LineInfoDO;
import com.cool.store.entity.MemberQuestionDO;
import com.cool.store.entity.SigningBaseInfoDO;
import com.cool.store.enums.ErrorCodeEnum;
import com.cool.store.enums.JoinTypeEnum;
import com.cool.store.enums.WorkflowSubStageStatusEnum;
import com.cool.store.exception.ServiceException;
import com.cool.store.mapper.IntentAgreementMapper;
import com.cool.store.mapper.JoinIntentionMapper;
import com.cool.store.mapper.LineInfoMapper;
import com.cool.store.request.IntentAgreementSubmitRequest;
import com.cool.store.response.SigningBaseInfoResponse;
@@ -32,6 +35,9 @@ public class IntentAgreementServiceImpl implements IntentAgreementService {
@Resource
LineInfoMapper lineInfoMapper;
@Resource
JoinIntentionMapper joinIntentionMapper;
@Override
@Transactional(rollbackFor = Exception.class)
@@ -62,6 +68,8 @@ public class IntentAgreementServiceImpl implements IntentAgreementService {
return null;
}
SigningBaseInfoResponse response = SigningBaseInfoResponse.from(signingBaseInfoDO);
MemberQuestionDO byLineId = joinIntentionMapper.getByLineId(lineId);
response.setType(byLineId.getJoinType());
return response;
}
}

View File

@@ -1,16 +1,21 @@
package com.cool.store.service.impl;
import com.cool.store.dao.HyOpenAreaInfoDAO;
import com.cool.store.entity.HyOpenAreaInfoDO;
import com.cool.store.entity.LineInfoDO;
import com.cool.store.entity.MemberQuestionDO;
import com.cool.store.entity.PartnerBaseInfoDO;
import com.cool.store.enums.ErrorCodeEnum;
import com.cool.store.enums.WorkflowStageEnum;
import com.cool.store.enums.WorkflowSubStageEnum;
import com.cool.store.enums.WorkflowSubStageStatusEnum;
import com.cool.store.exception.ServiceException;
import com.cool.store.mapper.HyOpenAreaInfoMapper;
import com.cool.store.mapper.JoinIntentionMapper;
import com.cool.store.mapper.LineInfoMapper;
import com.cool.store.request.JoinIntentionRequest;
import com.cool.store.service.JoinIntentionService;
import com.cool.store.service.OpenAreaService;
import com.cool.store.vo.PartnerBaseInfoVO;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
@@ -36,25 +41,32 @@ public class JoinIntentionServiceImpl extends LineFlowService implements JoinInt
@Resource
LineInfoMapper lineInfoMapper;
@Resource
HyOpenAreaInfoMapper openAreaInfoMapper;
@Override
@Transactional(rollbackFor = Exception.class)
public boolean submit(JoinIntentionRequest request) {
if (Objects.isNull(request)){
if (Objects.isNull(request)) {
throw new ServiceException(ErrorCodeEnum.PARAMS_REQUIRED);
}
MemberQuestionDO memberQuestionDO = request.toMemberQuestionDO();
boolean submitStatus = joinIntentionMapper.insertOrUpdate(memberQuestionDO);
if (submitStatus){
//更改线索流程子状态为【待审核】
LineInfoDO lineInfoParam = request.toLineInfoDO();
lineInfoParam.setWorkflowSubStageStatus(WorkflowSubStageStatusEnum.INTENT_5.getCode());
if (Objects.isNull(lineInfoParam)){
throw new ServiceException(ErrorCodeEnum.INTERVIEW_PARTNER_NOT_EXIST);
}
lineInfoMapper.insertOrUpdate(lineInfoParam);
return Boolean.TRUE;
//更改线索流程子状态为【待审核】
LineInfoDO lineInfoParam = request.toLineInfoDO();
lineInfoParam.setWorkflowStage(WorkflowStageEnum.INTENT.getCode());
lineInfoParam.setWorkflowSubStage(WorkflowSubStageEnum.INTEND.getCode());
lineInfoParam.setWorkflowSubStageStatus(WorkflowSubStageStatusEnum.INTENT_5.getCode());
if (Objects.isNull(lineInfoParam)) {
throw new ServiceException(ErrorCodeEnum.INTERVIEW_PARTNER_NOT_EXIST);
}
return Boolean.FALSE;
//todo 目前写死为进入私海
lineInfoParam.setLineStatus(1);
lineInfoMapper.insertOrUpdate(lineInfoParam);
MemberQuestionDO memberQuestionDO = request.toMemberQuestionDO();
memberQuestionDO.setLineId(lineInfoParam.getId());
joinIntentionMapper.insertOrUpdate(memberQuestionDO);
return Boolean.TRUE;
}
@Override
@@ -84,10 +96,12 @@ public class JoinIntentionServiceImpl extends LineFlowService implements JoinInt
public PartnerBaseInfoVO getByLineId(Long lineId) {
MemberQuestionDO result = joinIntentionMapper.getByLineId(lineId);
LineInfoDO byLineId = lineInfoMapper.getByLineId(lineId);
if (Objects.isNull(result)){
if (Objects.isNull(result)) {
throw new ServiceException(LINE_ID_IS_NOT_EXIST);
}
PartnerBaseInfoVO response = PartnerBaseInfoVO.from(result,byLineId);
PartnerBaseInfoVO response = PartnerBaseInfoVO.from(result, byLineId);
HyOpenAreaInfoDO openAreaInfoDO = openAreaInfoMapper.selectById(Long.valueOf(response.getAreaCode()));
response.setArea(openAreaInfoDO.getAreaPath());
return response;
}
}

View File

@@ -1,15 +1,33 @@
package com.cool.store.service.impl;
import cn.hutool.core.bean.BeanUtil;
import com.cool.store.context.LoginUserInfo;
import com.cool.store.dao.EnterpriseUserDAO;
import com.cool.store.dao.HyOpenAreaInfoDAO;
import com.cool.store.dao.HyPartnerUserChannelDAO;
import com.cool.store.dao.LineInfoDAO;
import com.cool.store.entity.EnterpriseUserDO;
import com.cool.store.entity.HyOpenAreaInfoDO;
import com.cool.store.entity.HyPartnerLabelDO;
import com.cool.store.entity.LineInfoDO;
import com.cool.store.enums.ErrorCodeEnum;
import com.cool.store.exception.ServiceException;
import com.cool.store.request.LineListRequest;
import com.cool.store.service.DeskService;
import com.cool.store.service.LineService;
import com.cool.store.utils.poi.DateUtils;
import com.cool.store.vo.BaseInfoVO;
import com.cool.store.vo.LineInfoVO;
import com.cool.store.vo.LineListVO;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/**
* @Author suzhuhong
@@ -21,6 +39,14 @@ public class LineServiceImpl implements LineService {
@Resource
LineInfoDAO lineInfoDAO;
@Resource
HyOpenAreaInfoDAO hyOpenAreaInfoDAO;
@Resource
DeskService deskService;
@Resource
HyPartnerUserChannelDAO hyPartnerUserChannelDAO;
@Resource
EnterpriseUserDAO enterpriseUserDAO;
@Override
public LineInfoVO getLineInfo(Long lineId) {
@@ -33,4 +59,35 @@ public class LineServiceImpl implements LineService {
BeanUtil.copyProperties(lineInfo,result);
return result;
}
@Override
public PageInfo<LineListVO> getLineList(LineListRequest lineListRequest, LoginUserInfo loginUserInfo,Boolean teamFlag) {
//确定意向区域
PageHelper.startPage(lineListRequest.getPageNum(), lineListRequest.getPageSize());
List<LineInfoDO> lineInfoDOS = lineInfoDAO.lineList(lineListRequest, loginUserInfo.getUserId(), null);
PageInfo page = new PageInfo(lineInfoDOS);
Map<Long, HyPartnerLabelDO> userPortraitMap = deskService.getUserPortraitMap(lineInfoDOS);
List<Long> wantShopAreaIds = lineInfoDOS.stream().filter(lineInfoDO -> lineInfoDO.getWantShopAreaId() != null).map(LineInfoDO::getWantShopAreaId).collect(Collectors.toList());
Map<Long, String> wantShopAreaMap = hyOpenAreaInfoDAO.selectNameMapByIds(wantShopAreaIds);
List<Integer> lineSourceIds = lineInfoDOS.stream().filter(lineInfoDO -> lineInfoDO.getLineSource() != null).map(LineInfoDO::getLineSource).collect(Collectors.toList());
Map<Integer, String> channelMapByIds = hyPartnerUserChannelDAO.getChannelMapByIds(lineSourceIds);
List<String> userIds = lineInfoDOS.stream().filter(lineInfoDO -> lineInfoDO.getInvestmentManager() != null).map(LineInfoDO::getInvestmentManager).collect(Collectors.toList());
userIds.addAll(lineInfoDOS.stream().filter(lineInfoDO -> lineInfoDO.getCreateUserId() != null).map(LineInfoDO::getCreateUserId).collect(Collectors.toList()));
userIds.addAll(lineInfoDOS.stream().filter(lineInfoDO -> lineInfoDO.getUpdateUserId() != null).map(LineInfoDO::getUpdateUserId).collect(Collectors.toList()));
Map<String, String> userNameMap = enterpriseUserDAO.getUserNameMap(userIds);
List<LineListVO> result = new ArrayList<>();
lineInfoDOS.forEach(x->{
BaseInfoVO baseInfoVO = deskService.convertToBaseInfoVO(x, userPortraitMap, wantShopAreaMap);
LineListVO lineListVO = new LineListVO(baseInfoVO);
lineListVO.setCreateTime(DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD_HH_MM_SS, x.getCreateTime()));
lineListVO.setUpdateTime(DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD_HH_MM_SS, x.getUpdateTime()));
lineListVO.setLineSourceName(channelMapByIds.get(x.getLineSource()));
lineListVO.setInvestmentManagerUserName(userNameMap.get(x.getInvestmentManager()));
lineListVO.setUpdateUserName(userNameMap.get(x.getUpdateUserId()));
result.add(lineListVO);
});
page.setList(result);
return page;
}
}

View File

@@ -56,4 +56,10 @@ public class TrainingExperienceServiceImpl implements TrainingExperienceService
}
}
@Override
public LeaseBaseInfoDO getTrainingExperience(Long lineId) {
LeaseBaseInfoDO leaseBaseInfoDO = trainingExperienceMapper.selectByLineId(lineId);
return leaseBaseInfoDO;
}
}

View File

@@ -29,6 +29,10 @@ public class DateUtils extends org.apache.commons.lang3.time.DateUtils
public static String YYYY_MM_DD_HH_MM_SS = "yyyy-MM-dd HH:mm:ss";
public static String SPECIAL_DATE_START = "yyyy年MM月dd日 HH:mm";
public static String SPECIAL_DATE_END = "HH:mm";
private static String[] parsePatterns = {
"yyyy-MM-dd", "yyyy-MM-dd HH:mm:ss", "yyyy-MM-dd HH:mm", "yyyy-MM",
"yyyy/MM/dd", "yyyy/MM/dd HH:mm:ss", "yyyy/MM/dd HH:mm", "yyyy/MM",

View File

@@ -56,8 +56,8 @@ public class SignValidateFilter implements Filter {
"/xfsg/mini/program/v1/partnerManage/partner/getIdentityCardInfo",
"/**/swagger*/**",
"/**/webjars/**",
"/xfsg/mini/program/v1/partnerManage/openArea/areaApplyQuery",
"/xfsg/mini/**"
"/xfsg/mini/program/v1/partnerManage/openArea/areaApplyQuery"
// "/xfsg/mini/**"
);

View File

@@ -0,0 +1,51 @@
package com.cool.store.controller.webb;
import com.cool.store.response.ResponseResult;
import com.cool.store.service.DeskService;
import com.cool.store.vo.desk.IntendPendingVO;
import com.cool.store.vo.desk.InterviewPendingVO;
import com.github.pagehelper.PageInfo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
/**
* @Author suzhuhong
* @Date 2024/3/26 17:49
* @Version 1.0
*/
@Api(tags = "工作台接口")
@RestController
@RequestMapping("pc/desk")
public class DeskController {
@Resource
DeskService deskService;
@ApiOperation("待处理-加盟申请")
@GetMapping("/intendPendingList")
public ResponseResult<PageInfo<IntendPendingVO>> intendPendingList(@RequestParam(value = "pageNumber",required = true,defaultValue = "1")Integer pageNumber,
@RequestParam(value = "pageSize",required = true,defaultValue = "10")Integer pageSize) {
// LoginUserInfo userInfo = CurrentUserHolder.getUser();
return ResponseResult.success(deskService.intendPendingList(pageNumber,pageSize,"055740241221153440"));
}
@ApiOperation("待处理-邀约面谈")
@GetMapping("/interviewPendingList")
public ResponseResult<PageInfo<InterviewPendingVO>> interviewPendingList(@RequestParam(value = "pageNumber",required = true,defaultValue = "1")Integer pageNumber,
@RequestParam(value = "pageSize",required = true,defaultValue = "10")Integer pageSize) {
// LoginUserInfo userInfo = CurrentUserHolder.getUser();
return ResponseResult.success(deskService.interviewPendingList(pageNumber,pageSize,"055740241221153440"));
}
}

View File

@@ -0,0 +1,66 @@
package com.cool.store.controller.webb;
import com.cool.store.context.CurrentUserHolder;
import com.cool.store.context.LoginUserInfo;
import com.cool.store.request.LineListRequest;
import com.cool.store.response.ResponseResult;
import com.cool.store.service.LineService;
import com.cool.store.vo.LineInfoVO;
import com.cool.store.vo.LineListVO;
import com.github.pagehelper.PageInfo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
/**
* @Author suzhuhong
* @Date 2024/3/27 15:57
* @Version 1.0
*/
@RestController
@RequestMapping("/pc/line")
@Api(tags = "PC线索信息")
@Slf4j
public class LineInfoController {
@Resource
LineService lineService;
@ApiOperation("查询线索详情")
@GetMapping("/getLineDetail")
@ApiImplicitParams({
@ApiImplicitParam(name = "lineId", value = "线索id", required = true)
})
public ResponseResult<LineInfoVO> getLineInfo(@RequestParam("lineId")Long lineId) {
return ResponseResult.success(lineService.getLineInfo(lineId));
}
@ApiOperation("我的线索")
@PostMapping("/getMyLineList")
public ResponseResult<PageInfo<LineListVO>> getLineList(@RequestBody LineListRequest lineListRequest) {
LoginUserInfo user = CurrentUserHolder.getUser();
user.setUserId("055740241221153440");
return ResponseResult.success(lineService.getLineList(lineListRequest,user,Boolean.FALSE));
}
@ApiOperation("团队线索")
@PostMapping("/getTeamLineList")
public ResponseResult<PageInfo<LineListVO>> getTeamLineList(@RequestBody LineListRequest lineListRequest) {
LoginUserInfo user = CurrentUserHolder.getUser();
user.setUserId("055740241221153440");
return ResponseResult.success(lineService.getLineList(lineListRequest,user,Boolean.TRUE));
}
}

View File

@@ -0,0 +1,30 @@
package com.cool.store.controller.webb;
import com.cool.store.response.ResponseResult;
import com.cool.store.response.SigningBaseInfoResponse;
import com.cool.store.service.IntentAgreementService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
@RestController
@RequestMapping({"/pc/IntentAgreement"})
@Slf4j
@Api(tags = "PC意向协议")
public class PCIntentAgreementController {
@Resource
IntentAgreementService intentAgreementService;
@GetMapping(path = "/get")
@ApiOperation("查询意向协议信息")
public ResponseResult<SigningBaseInfoResponse> getMiniIntentAgreement(
@RequestParam(value = "partnerId", required = false) String partnerId,
@RequestParam(value = "lineId", required = false) Long lineId) {
SigningBaseInfoResponse resp = intentAgreementService.getMiniIntentAgreement(partnerId, lineId);
return ResponseResult.success(resp);
}
}

View File

@@ -0,0 +1,32 @@
package com.cool.store.controller.webb;
import com.cool.store.response.ResponseResult;
import com.cool.store.service.JoinIntentionService;
import com.cool.store.vo.PartnerBaseInfoVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
@RestController
@RequestMapping({"/pc/JoinIntention"})
@Slf4j
@Api(tags = "PC意向加盟")
public class PCJoinIntentionController {
@Resource
private JoinIntentionService joinIntentionService;
@GetMapping(path = "/getByLineId")
@ApiOperation("查找加盟意向申请书")
public ResponseResult<PartnerBaseInfoVO> getByLineId(@RequestParam("lineId") Long lineId) {
return ResponseResult.success(joinIntentionService.getByLineId(lineId));
}
}

View File

@@ -1,5 +1,6 @@
package com.cool.store.controller.webb;
import com.cool.store.entity.LeaseBaseInfoDO;
import com.cool.store.enums.ExperienceStatusEnum;
import com.cool.store.request.TrainingExperienceDistributionRequest;
import com.cool.store.response.ResponseResult;
@@ -28,4 +29,10 @@ public class PCTrainingExperienceController {
return ResponseResult.success(trainingExperienceService.distribution(request));
}
@ApiOperation("查询实训体验")
@GetMapping("/get")
public ResponseResult<LeaseBaseInfoDO> getTrainingExperience(@RequestParam("lineId") Long lineId) {
return ResponseResult.success(trainingExperienceService.getTrainingExperience(lineId));
}
}

View File

@@ -42,6 +42,12 @@ public class LineController {
return ResponseResult.success(lineService.getLineInfo(lineId));
}
@ApiOperation("根据线索id查询大区的支付二维码图片")
@GetMapping("/getRegionPayPic")
public ResponseResult<String> getRegionPayPic(@RequestParam("lineId")Long lineId) {
String pic = "https://coolstore-storage.oss-cn-hangzhou.aliyuncs.com/120207001943.png";
return ResponseResult.success(pic);
}

View File

@@ -28,7 +28,7 @@ public class MiniIntentAgreementController {
return ResponseResult.success(resp);
}
@PostMapping(path = "/get")
@GetMapping(path = "/get")
@ApiOperation("查询意向协议信息")
public ResponseResult<SigningBaseInfoResponse> getMiniIntentAgreement(
@RequestParam(value = "partnerId",required = false) String partnerId,

View File

@@ -1,14 +1,15 @@
package com.cool.store.controller.webc;
import com.cool.store.enums.ExperienceStatusEnum;
import com.cool.store.request.TrainingExperienceDistributionRequest;
import com.cool.store.request.TrainingExperienceChangeRequest;
import com.cool.store.response.ResponseResult;
import com.cool.store.service.TrainingExperienceService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
@@ -22,12 +23,9 @@ public class MiniTrainingExperienceController {
TrainingExperienceService trainingExperienceService;
@ApiOperation("实训体验状态变更")
@GetMapping("/experience/{status}")
public ResponseResult experienceStatusChange(@ApiParam(value = "实训体验状态 DONE:完成 ABANDON:放弃") @PathVariable(value = "status") ExperienceStatusEnum statusEnum,
@ApiParam(value = "线索id")@RequestParam(value = "lineId") Long lineId,
@ApiParam(value = "放弃原因状态为ABANDON才填写")@RequestParam(value = "abandonCause",required = false)String abandonCause) {
trainingExperienceService.experienceStatusChange(lineId,statusEnum.getExperienceStatus(),abandonCause);
@PostMapping("/experience/change")
public ResponseResult experienceStatusChange(@RequestBody TrainingExperienceChangeRequest request) {
trainingExperienceService.experienceStatusChange(request.getLineId(), request.getStatusEnum().getExperienceStatus(), request.getAbandonCause());
return ResponseResult.success();
}