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

This commit is contained in:
zhangchenbiao
2023-06-13 09:50:18 +08:00
38 changed files with 1938 additions and 47 deletions

View File

@@ -111,4 +111,7 @@ public class CommonConstants {
public static final String NINE_STR = "9";
public static final String TEN_STR = "10";
public static final String FOLLOW = "follow";
public static final String PENDING = "pending";
}

View File

@@ -44,6 +44,14 @@ public enum ErrorCodeEnum {
USER_GROUP_NAME_EXIST(1021076, "用户分组名称已存在", null),
USER_GROUP_NOT_EXIST(1021077, "用户分组不存在", null),
GET_INFO_ERROR(1021078, "获取信息异常", null),
PARAMS_REQUIRED(400002, "参数缺失!", null),
LINE_ID_IS_NOT_EXIST(500001, "线索ID不存在", null),
;

View File

@@ -0,0 +1,33 @@
package com.cool.store.enums;
/**
* @Author suzhuhong
* @Date 2023/6/9 16:17
* @Version 1.0
*/
public enum WorkflowStageEnum {
INTENT("1","意向申请阶段"),
RESERVATION("2","预约面试阶段"),
INTERVIEW("3","合格资格面试"),
;
private String code;
private String message;
WorkflowStageEnum(String code, String message) {
this.code = code;
this.message = message;
}
public String getCode() {
return code;
}
public String getMessage() {
return message;
}
}

View File

@@ -0,0 +1,49 @@
package com.cool.store.enums;
/**
* @Author suzhuhong
* @Date 2023/6/9 16:35
* @Version 1.0
*/
public enum WorkflowStatusEnum {
//意向申请阶段
INTENT_0("0","待提交"),
INTENT_1("1","待审核"),
INTENT_2("2","已通过"),
INTENT_3("3","未通过"),
//预约面试阶段
RESERVATION_0("0","待预约"),
RESERVATION_6("6","到期未预约"),
//合格资格面试
INTERVIEW_1("1","待面试"),
INTERVIEW_2("2","已开始"),
INTERVIEW_3("3","待审核"),
INTERVIEW_4("4","审核中"),
INTERVIEW_5("5","审核通过"),
INTERVIEW_6("6","拒绝"),
;
private String code;
private String message;
WorkflowStatusEnum(String code, String message) {
this.code = code;
this.message = message;
}
public String getCode() {
return code;
}
public String getMessage() {
return message;
}
}

View File

@@ -0,0 +1,35 @@
package com.cool.store.utils;
import java.util.Calendar;
import java.util.Date;
/**
* @Author suzhuhong
* @Date 2023/6/8 17:17
* @Version 1.0
*/
public class CoolDateUtils {
public static final String DATE_FORMAT_DAY = "yyyy-MM-dd";
public static final String DATE_FORMAT_DAY_2 = "yyyy/MM/dd";
public static final String TIME_FORMAT_SEC = "HH:mm:ss";
public static final String TIME_FORMAT_SEC2 = "HH:mm";
public static final String DATE_FORMAT_SEC = "yyyy-MM-dd HH:mm:ss";
public static final String DATE_FORMAT_SEC_2 = "yyyy/MM/dd HH:mm:ss";
public static final String DATE_FORMAT_SEC_3 = "yyyy.MM.dd HH:mm:ss";
public static final String DATE_FORMAT_SEC_4 = "yyyy.MM.dd HH:mm";
public static final String DATE_FORMAT_SEC_5 = "yyyy.MM.dd HH:mm";
public static final String DATE_FORMAT_SEC_6 = "yyyy.MM.dd";
/**
* 几天后的当前
* @param d
* @param day
* @return
*/
public static Date getDateBefore(Date d, int day) {
Calendar now = Calendar.getInstance();
now.setTime(d);
now.set(Calendar.DATE, now.get(Calendar.DATE) + day);
return now.getTime();
}
}

View File

@@ -0,0 +1,59 @@
package com.cool.store.dao;
import com.cool.store.dto.partner.PartnerIntentApplyInfoDTO;
import com.cool.store.entity.HyPartnerIntentInfoDO;
import com.cool.store.mapper.HyPartnerIntentInfoMapper;
import com.github.pagehelper.PageInfo;
import com.google.common.collect.Lists;
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;
/**
* @Author suzhuhong
* @Date 2023/6/9 15:02
* @Version 1.0
*/
@Repository
public class HyPartnerIntentInfoDAO {
@Resource
HyPartnerIntentInfoMapper hyPartnerIntentInfoMapper;
public int insertSelective( HyPartnerIntentInfoDO record){
return hyPartnerIntentInfoMapper.insertSelective(record);
}
public int updateByPrimaryKeySelective(HyPartnerIntentInfoDO record){
return hyPartnerIntentInfoMapper.updateByPrimaryKeySelective(record);
}
public HyPartnerIntentInfoDO selectByPrimaryKeySelective(Long id){
if (id==null){
return null;
}
return hyPartnerIntentInfoMapper.selectByPrimaryKeySelective(id);
}
public PageInfo<PartnerIntentApplyInfoDTO> selectPartnerIntentApplyInfoList(String userId, String workflowStage, String workflowStatus){
if (StringUtils.isEmpty(userId)){
return new PageInfo<>();
}
return hyPartnerIntentInfoMapper.selectPartnerIntentApplyInfoList(userId,workflowStage,workflowStatus);
}
public PartnerIntentApplyInfoDTO selectByLineId(Long lineId){
if (lineId==null){
return null;
}
return hyPartnerIntentInfoMapper.selectByLineId(lineId);
}
}

View File

@@ -0,0 +1,85 @@
package com.cool.store.dao;
import com.cool.store.dto.partner.PartnerInterviewInfoDTO;
import com.cool.store.dto.partner.SpecialDateRangeInterviewCountDTO;
import com.cool.store.entity.HyPartnerInterviewPlanDO;
import com.cool.store.mapper.HyPartnerInterviewPlanMapper;
import com.github.pagehelper.PageInfo;
import org.apache.commons.lang3.StringUtils;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List;
/**
* @Author suzhuhong
* @Date 2023/6/8 14:54
* @Version 1.0
*/
@Repository
public class HyPartnerInterviewPlanDAO {
@Resource
HyPartnerInterviewPlanMapper hyPartnerInterviewPlanMapper;
/**
* 查询当前用户当天是否有面试
* @param userId
* @param currentDate
* @return
*/
public Integer getCurrentDateInterviewCount(String userId,String currentDate){
if (StringUtils.isEmpty(userId)){
return 0;
}
return hyPartnerInterviewPlanMapper.getCurrentDateInterviewCount(userId,currentDate);
}
/**
* 查询指定日期面试数量 与未来7天面试数量
* @param userId
* @param currentDate
* @param startTime
* @param endTime
* @return
*/
public SpecialDateRangeInterviewCountDTO getInterviewCount(String userId, String currentDate, String startTime, String endTime){
if (StringUtils.isEmpty(userId)){
return new SpecialDateRangeInterviewCountDTO();
}
return hyPartnerInterviewPlanMapper.getInterviewCount(userId,currentDate,startTime,endTime);
}
/**
* 当天还有几场面试
* @param userId
* @param currentDate
* @return
*/
public List<HyPartnerInterviewPlanDO> getInterviewPlanList(String userId, String currentDate){
if (StringUtils.isEmpty(userId)){
return new ArrayList<>();
}
return hyPartnerInterviewPlanMapper.getInterviewPlanList(userId,currentDate);
}
/**
* 工作台 招商经理 预约面试时间 合格资格面试 列表
* @param userId
* @param workflowStage
* @param workflowStatus
* @return
*/
public PageInfo<PartnerInterviewInfoDTO> getPartnerInterviewInfoList(String userId, String workflowStage,String workflowStatus){
if (StringUtils.isEmpty(userId)){
return new PageInfo();
}
return hyPartnerInterviewPlanMapper.getPartnerInterviewInfoList(userId,workflowStage,workflowStatus);
}
}

View File

@@ -0,0 +1,111 @@
package com.cool.store.dao;
import com.cool.store.dto.partner.PartnerIntentApplyInfoDTO;
import com.cool.store.dto.partner.PartnerLineInfoAndBaseInfoDTO;
import com.cool.store.dto.partner.StageCountDTO;
import com.cool.store.entity.HyPartnerLineInfoDO;
import com.cool.store.mapper.HyPartnerLineInfoMapper;
import com.github.pagehelper.PageInfo;
import com.google.common.collect.Lists;
import org.apache.commons.collections4.CollectionUtils;
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;
/**
* @Author suzhuhong
* @Date 2023/6/8 15:10
* @Version 1.0
*/
@Repository
public class HyPartnerLineInfoDAO {
@Resource
HyPartnerLineInfoMapper hyPartnerLineInfoMapper;
public int insertSelective(HyPartnerLineInfoDO hyPartnerLineInfoDO){
return hyPartnerLineInfoMapper.insertSelective(hyPartnerLineInfoDO);
}
public int batchInsert(List<HyPartnerLineInfoDO> hyPartnerLineInfoDOS){
if (CollectionUtils.isEmpty(hyPartnerLineInfoDOS)){
return -1;
}
return hyPartnerLineInfoMapper.batchInsert(hyPartnerLineInfoDOS);
}
public int batchDeleted(List<Long> lineIdList){
if (CollectionUtils.isEmpty(lineIdList)){
return -1;
}
return hyPartnerLineInfoMapper.batchDeleted(lineIdList);
}
public HyPartnerLineInfoDO selectByPrimaryKeySelective(Long id){
if (id==null){
return null;
}
return hyPartnerLineInfoMapper.selectByPrimaryKeySelective(id);
}
public Integer getAdventLineCount( String userId, String currentDate){
if (StringUtils.isEmpty(userId)){
return 0;
}
return hyPartnerLineInfoMapper.getAdventLineCount(userId,currentDate);
}
public StageCountDTO selectStagePendingCount(String userId){
if (StringUtils.isEmpty(userId)){
return new StageCountDTO(0,0);
}
return hyPartnerLineInfoMapper.selectStagePendingCount(userId);
}
public StageCountDTO selectStageFollowCount(String userId){
if (StringUtils.isEmpty(userId)){
return new StageCountDTO(0,0,0);
}
return hyPartnerLineInfoMapper.selectStageFollowCount(userId);
}
public PartnerLineInfoAndBaseInfoDTO selectPartnerLineInfoAndBaseInfo(Long lineId){
if (lineId==null){
return null;
}
return hyPartnerLineInfoMapper.selectPartnerLineInfoAndBaseInfo(lineId);
}
public PageInfo<HyPartnerLineInfoDO> lastMonthCloseLine(String userId, String lastMonthTodayDate){
if (userId==null){
return new PageInfo<>();
}
return hyPartnerLineInfoMapper.lastMonthCloseLine(userId,lastMonthTodayDate);
}
public int updateInvestmentManager(String userId, List<Long> lineIdList){
if (StringUtils.isEmpty(userId)||CollectionUtils.isEmpty(lineIdList)){
return -1;
}
return hyPartnerLineInfoMapper.updateInvestmentManager(lineIdList,userId);
}
public List<HyPartnerLineInfoDO> getLineListByLineIds( List<Long> lineIdList){
if (CollectionUtils.isEmpty(lineIdList)){
return Lists.newArrayList();
}
return hyPartnerLineInfoMapper.getLineListByLineIds(lineIdList);
}
}

View File

@@ -0,0 +1,51 @@
package com.cool.store.dao;
import com.cool.store.entity.HyPartnerUserInfoDO;
import com.cool.store.mapper.HyPartnerUserInfoMapper;
import com.google.common.collect.Lists;
import org.apache.commons.collections4.CollectionUtils;
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;
/**
* @Author suzhuhong
* @Date 2023/6/8 19:41
* @Version 1.0
*/
@Repository
public class HyPartnerUserInfoDAO {
@Resource
HyPartnerUserInfoMapper hyPartnerUserInfoMapper;
/**
* 根据PartnerId查询用户
* @param partnerId
* @return
*/
public HyPartnerUserInfoDO selectByPartnerId(String partnerId){
if (StringUtils.isEmpty(partnerId)){
return null;
}
return hyPartnerUserInfoMapper.selectByPartnerId(partnerId);
}
/**
* 根据PartnerIds批量查询用户
* @param partnerIds
* @return
*/
public List<HyPartnerUserInfoDO> selectByPartnerIds(List<String> partnerIds){
if (CollectionUtils.isEmpty(partnerIds)){
return Lists.newArrayList();
}
return hyPartnerUserInfoMapper.selectByPartnerIds(partnerIds);
}
}

View File

@@ -1,8 +1,12 @@
package com.cool.store.mapper;
import com.cool.store.dto.partner.PartnerIntentApplyInfoDTO;
import com.cool.store.entity.HyPartnerIntentInfoDO;
import com.github.pagehelper.PageInfo;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* @author zhangchenbiao
* @date 2023-05-29 03:52
@@ -16,10 +20,31 @@ public interface HyPartnerIntentInfoMapper {
*/
int insertSelective(@Param("record") HyPartnerIntentInfoDO record);
HyPartnerIntentInfoDO selectByPrimaryKeySelective(@Param("id") Long id);
/**
*
* 默认更新方法根据主键更新不会把null值更新到数据库避免覆盖之前有值的
* dateTime:2023-05-29 03:52
*/
int updateByPrimaryKeySelective(@Param("record") HyPartnerIntentInfoDO record);
/**
* 工作台 招商经理 意向申请阶段 待处理 待跟进 列表
* @param userId
* @param workflowStage
* @param workflowStatus
* @return
*/
PageInfo<PartnerIntentApplyInfoDTO> selectPartnerIntentApplyInfoList(@Param("userId") String userId,
@Param("workflowStage") String workflowStage ,
@Param("workflowStatus") String workflowStatus);
/**
* 根据线索ID查询数据
* @param lineId
* @return
*/
PartnerIntentApplyInfoDTO selectByLineId(@Param("lineId") Long lineId);
}

View File

@@ -1,8 +1,14 @@
package com.cool.store.mapper;
import com.cool.store.dto.partner.PartnerInterviewInfoDTO;
import com.cool.store.dto.partner.SpecialDateRangeInterviewCountDTO;
import com.cool.store.entity.HyPartnerInterviewPlanDO;
import com.github.pagehelper.PageInfo;
import org.apache.ibatis.annotations.Param;
import java.util.Date;
import java.util.List;
/**
* @author zhangchenbiao
* @date 2023-05-29 03:52
@@ -22,4 +28,46 @@ public interface HyPartnerInterviewPlanMapper {
* dateTime:2023-05-29 03:52
*/
int updateByPrimaryKeySelective(@Param("record") HyPartnerInterviewPlanDO record);
/**
* 查询当天面试数量
* @param userId
* @param currentDate
* @return
*/
Integer getCurrentDateInterviewCount(@Param("userId") String userId, @Param("currentDate") String currentDate);
/**
* todo 当天面试数据需要修改
* 查询指定日期面试数量 与未来7天面试数量
* @param userId
* @param currentDate
* @param startTime
* @param endTime
* @return
*/
SpecialDateRangeInterviewCountDTO getInterviewCount(@Param("userId") String userId,
@Param("currentDate") String currentDate,
@Param("startTime") String startTime,
@Param("endTime") String endTime);
/**
* 查询面试列表
* @param userId
* @param currentDate
* @return
*/
List<HyPartnerInterviewPlanDO> getInterviewPlanList(@Param("userId") String userId,
@Param("currentDate") String currentDate);
/**
* 工作台 招商经理 预约面试时间 合格资格面试 列表
* @param userId
* @param workflowStage
* @param workflowStatus
* @return
*/
PageInfo<PartnerInterviewInfoDTO> getPartnerInterviewInfoList(@Param("userId") String userId,
@Param("workflowStage") String workflowStage ,
@Param("workflowStatus") String workflowStatus);
}

View File

@@ -1,9 +1,15 @@
package com.cool.store.mapper;
import com.cool.store.dto.partner.PartnerIntentApplyInfoDTO;
import com.cool.store.dto.partner.PartnerLineInfoAndBaseInfoDTO;
import com.cool.store.dto.partner.StageCountDTO;
import com.cool.store.entity.HyPartnerLineInfoDO;
import com.cool.store.entity.HyPartnerLineInfoDO;
import com.github.pagehelper.PageInfo;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* @author zhangchenbiao
* @date 2023-05-29 03:52
@@ -17,10 +23,86 @@ public interface HyPartnerLineInfoMapper {
*/
int insertSelective(@Param("record") HyPartnerLineInfoDO record);
/**
* 批量新增线索
* @param recordList
* @return
*/
int batchInsert(@Param("recordList") List<HyPartnerLineInfoDO> recordList);
/**
* 批量将线索置为删除状态
* @param lineIdList
* @return
*/
int batchDeleted(@Param("lineIdList") List<Long> lineIdList);
/**
* 根据ID查询数据
* @param id
* @return
*/
HyPartnerLineInfoDO selectByPrimaryKeySelective(Long id);
/**
*
* 默认更新方法根据主键更新不会把null值更新到数据库避免覆盖之前有值的
* dateTime:2023-05-29 03:52
*/
int updateByPrimaryKeySelective(@Param("record") HyPartnerLineInfoDO record);
/**
* 当前用户指定时间 临期线索
* @param userId
* @param currentDate
* @return
*/
Integer getAdventLineCount(@Param("userId") String userId, @Param("currentDate") String currentDate);
/**
* 招商经理 对应各阶段待处理数据
* @param userId
* @return
*/
StageCountDTO selectStagePendingCount(@Param("userId") String userId);
/**
* 招商经理 对应各个阶段 待跟进数据
* @param userId
* @return
*/
StageCountDTO selectStageFollowCount(@Param("userId") String userId);
/**
* 查询线索信息与加盟商基本信息
* @param lineId
* @return
*/
PartnerLineInfoAndBaseInfoDTO selectPartnerLineInfoAndBaseInfo(@Param("lineId") Long lineId);
/**
* 最近30天结束的线索
* @param userId
* @param lastMonthTodayDate
* @return
*/
PageInfo<HyPartnerLineInfoDO> lastMonthCloseLine(@Param("userId") String userId,
@Param("lastMonthTodayDate") String lastMonthTodayDate);
/**
* 修改招商经理
* @param lineIdList
* @param userId
* @return
*/
int updateInvestmentManager(@Param("lineIdList") List<Long> lineIdList, @Param("userId") String userId);
/**
* 根据线索ID查询线索
* @param lineIdList
* @return
*/
List<HyPartnerLineInfoDO> getLineListByLineIds(List<Long> lineIdList);
}

View File

@@ -3,6 +3,8 @@ package com.cool.store.mapper;
import com.cool.store.entity.HyPartnerUserInfoDO;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* @author zhangchenbiao
* @date 2023-05-29 03:53
@@ -22,4 +24,18 @@ public interface HyPartnerUserInfoMapper {
* dateTime:2023-05-29 03:53
*/
int updateByPrimaryKeySelective(@Param("record") HyPartnerUserInfoDO record);
/**
* 根据partnerID查询用户信息
* @param partnerId
* @return
*/
HyPartnerUserInfoDO selectByPartnerId(@Param("partnerId") String partnerId);
/**
* 根据partnerIDs批量查询用户信息
* @param partnerIdList
* @return
*/
List<HyPartnerUserInfoDO> selectByPartnerIds(@Param("partnerIdList") List<String> partnerIdList);
}

View File

@@ -32,6 +32,14 @@
work_exp, is_consumer, other_band, brand_strength, need_improve, strength, weakness,
create_time, update_time
</sql>
<select id="selectByPrimaryKeySelective" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"></include>
from hy_partner_intent_info
<where>
and id = #{id}
</where>
</select>
<insert id="insertSelective" keyColumn="id" keyProperty="record.id" useGeneratedKeys="true">
insert into hy_partner_intent_info
<trim prefix="(" suffix=")" suffixOverrides=",">
@@ -243,4 +251,41 @@
</set>
where id = #{record.id}
</update>
<select id="selectPartnerIntentApplyInfoList" resultType="com.cool.store.dto.partner.PartnerIntentApplyInfoDTO">
select
a.id as partnerLineId,
a.partner_id as partnerId,
a.workflow_stage as workflowStage,
a.workflow_status as workflowStatus,
b.id as id,
b.create_time as partnerSubmitTime,
b.live_area as liveArea,
b.want_shop_area as wantShopArea,
b.accept_adjust_type as acceptAdjustType,
b.deadline as deadline
from hy_partner_intent_info b left join hy_partner_line_info a on a.id = b.partner_line_id
<where>
<if test="userId!=null and userId!=''">
and a.investment_manager = #{userId}
</if>
<if test="workflowStage!=null and workflowStage!=''">
and a.workflow_stage= #{workflowStage}
</if>
<if test="workflowStatus!=null and workflowStatus!=''">
and a.workflow_status = #{workflowStatus}
</if>
</where>
order by b.create_time
</select>
<select id="selectByLineId" resultType="com.cool.store.dto.partner.PartnerIntentApplyInfoDTO">
select
<include refid="Base_Column_List"></include>
from hy_partner_intent_info
<where>
and partner_line_id = #{lineId}
</where>
</select>
</mapper>

View File

@@ -172,4 +172,69 @@
</set>
where id = #{record.id}
</update>
<select id="getCurrentDateInterviewCount" resultType="java.lang.Integer">
select count(1) from hy_partner_interview_plan
<where>
<if test="userId!=null and userId!=''">
and interviewer = #{userId}
</if>
<if test="currentDate!=null and currentDate!=''">
and interview_date = #{currentDate}
</if>
</where>
</select>
<select id="getInterviewCount" resultType="com.cool.store.dto.partner.SpecialDateRangeInterviewCountDTO">
select
sum(if(interview_date=#{currentDate},1,0)) as currentDayInterviewCount,
sum(if(start_time>#{startTime} and #{endTime},1,0)) as lastSevenDayInterviewCount
FROM hy_partner_interview_plan
where interviewer = #{userId}
</select>
<select id="getInterviewPlanList" resultMap="BaseResultMap">
select * from hy_partner_interview_plan
<where>
<if test="userId!=null and userId!=''">
and interviewer = #{userId}
</if>
<if test="currentDate!=null and currentDate!=''">
and interview_date = #{currentDate}
</if>
and (start_time>now() or (start_time<![CDATA[<]]>now() and room_status!=2))
order by start_time
</where>
</select>
<select id="getPartnerInterviewInfoList" resultType="com.cool.store.dto.partner.PartnerInterviewInfoDTO">
select
a.id as id,
a.deadline as deadline,
a.status as status,
a.auth_code as authCode,
a.approve_time as approveTime,
a.process_info as processInfo,
b.id as interviewId,
b.partner_line_id as partnerLineId,
b.partner_id as partnerId,
b.start_time as startTime,
b.end_time as endTime,
b.interviewer as interviewer,
b.create_time as createTime,
b.room_id as roomId
from hy_partner_interview a inner join hy_partner_interview_plan b on a.interview_plan_id = b.id
<where>
<if test="userId!=null and userId!=''">
and a.interviewer = #{userId}
</if>
<if test="workflowStage!=null and workflowStage!=''">
and a.workflow_stage= #{workflowStage}
</if>
<if test="workflowStatus!=null and workflowStatus!=''">
and a.workflow_status = #{workflowStatus}
</if>
</where>
</select>
</mapper>

View File

@@ -27,6 +27,49 @@
reject_real_reason, certify_file, deleted, create_time, update_time, close_time,
close_user_id
</sql>
<select id="selectByPrimaryKeySelective" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"></include>
from hy_partner_line_info
where id = #{id}
</select>
<insert id="batchInsert">
insert into
hy_partner_line_info
(
partner_id,
workflow_stage,
workflow_status,
line_status,
investment_manager
)
values
<foreach collection="recordList" item="record" separator=",">
(#{record.partnerId},
#{record.workflowStage},
#{record.workflowStatus},
#{record.lineStatus},
#{record.investmentManager})
</foreach>
</insert>
<update id="batchDeleted">
update hy_partner_line_info
set deleted = 1
<where>
<if test="lineIdList!=null and lineIdList.size>0">
<foreach collection="lineIdList" open="and id in (" close=")" separator="," item="lineId">
#{lineId}
</foreach>
</if>
</where>
</update>
<insert id="insertSelective" keyColumn="id" keyProperty="record.id" useGeneratedKeys="true">
insert into hy_partner_line_info
<trim prefix="(" suffix=")" suffixOverrides=",">
@@ -193,4 +236,104 @@
</set>
where id = #{record.id}
</update>
<select id="getAdventLineCount" resultType="java.lang.Integer">
select count(1) from hy_partner_line_info
<where>
<if test="userId!=null and userId!=''">
and investment_manager = #{userId}
</if>
<if test="currentDate!=null and currentDate!=''">
and deadline = #{currentDate}
</if>
and
(
(workflow_stage = 1 and workflow_status = 0) or
(workflow_stage = 2 and workflow_status = 0) or
(workflow_stage = 3 and workflow_status = 4)
)
</where>
</select>
<select id="selectStagePendingCount" resultType="com.cool.store.dto.partner.StageCountDTO">
select
IFNULL(sum(if(workflow_stage=1 and workflow_status = 1,1,0)),0) as intentApplyApproveCount,
IFNULL(sum(if(workflow_stage=3 and workflow_status = 3,1,0)),0) as qualifiedInterviewCount
from hy_partner_line_info
<where>
<if test="userId!=null and userId!=''">
and investment_manager = #{userId}
</if>
</where>
</select>
<select id="selectStageFollowCount" resultType="com.cool.store.dto.partner.StageCountDTO">
select
IFNULL(sum(if(workflow_stage=1 and workflow_status = 1,1,0)),0) as intentApplyApproveCount,
IFNULL(sum(if(workflow_stage=2 and workflow_status = 0,1,0)),0) as reservationInterviewCount,
IFNULL(sum(if(workflow_stage=3 and workflow_status = 4,1,0)),0) as qualifiedInterviewCount
from hy_partner_line_info
<where>
<if test="userId!=null and userId!=''">
and investment_manager = #{userId}
</if>
</where>
</select>
<select id="selectPartnerLineInfoAndBaseInfo" resultType="com.cool.store.dto.partner.PartnerLineInfoAndBaseInfoDTO">
select
a.id as id,
a.partner_id as partnerId,
a.workflow_stage as workflowStage,
a.workflow_status as workflowStatus,
a.partner_id as partnerUserId,
a.investment_manager as investmentManager,
b.user_portrait as user_portrait
from hy_partner_line_info a inner join hy_partner_base_info b
on a.id = b.partner_line_id
<where>
<if test="lineId!=null">
and a.id = #{id}
</if>
</where>
</select>
<select id="lastMonthCloseLine" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"></include>
from hy_partner_line_info
<where>
<if test="userId">
and investment_manager = #{userId}
</if>
<if test="lastMonthTodayDate!=null">
and close_time > #{lastMonthTodayDate} and close_time <![CDATA[<]]> now
</if>
</where>
</select>
<update id="updateInvestmentManager">
update hy_partner_line_info
set investment_manager = #{userId}
<if test="lineIdList!=null and lineIdList.size>0">
<foreach collection="lineIdList" open="where id in (" close=")" separator="," item="lineId">
#{lineId}
</foreach>
</if>
</update>
<select id="getLineListByLineIds" resultMap="BaseResultMap" >
select
<include refid="Base_Column_List"></include>
from hy_partner_line_info
where deleted = 0
<if test="lineIdList!=null and lineIdList.size>0">
<foreach collection="lineIdList" open="and id in (" close=")" separator="," item="lineId">
#{lineId}
</foreach>
</if>
</select>
</mapper>

View File

@@ -18,6 +18,25 @@
id, partner_id, mobile, username, live_area, want_shop_area, accept_adjust_type,
invite_code, is_write_partner_know, create_time, update_time
</sql>
<select id="selectByPartnerId" resultMap="BaseResultMap" >
select
<include refid="Base_Column_List"></include>
from hy_partner_user_info
where partner_id = #{partnerId}
</select>
<select id="selectByPartnerIds" resultMap="BaseResultMap" >
select
<include refid="Base_Column_List"></include>
from hy_partner_user_info
<if test="partnerIdList!=null and partnerIdList.size>0">
<foreach collection="partnerIdList" open="and partner_id in (" close=")" separator="," item="partnerId">
#{partnerId}
</foreach>
</if>
</select>
<insert id="insertSelective" keyColumn="id" keyProperty="record.id" useGeneratedKeys="true">
insert into hy_partner_user_info
<trim prefix="(" suffix=")" suffixOverrides=",">

View File

@@ -0,0 +1,49 @@
package com.cool.store.dto.partner;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Date;
/**
* @Author suzhuhong
* @Date 2023/6/9 15:37
* @Version 1.0
*/
@Data
public class PartnerIntentApplyInfoDTO {
@ApiModelProperty("")
private Long id;
@ApiModelProperty("加盟商用户名称")
private String partnerUserName;
@ApiModelProperty("hy_partner_user_info.partner_id")
private String partnerId;
@ApiModelProperty("hy_partner_line_info.id")
private Long partnerLineId;
@ApiModelProperty("常驻区域")
private String liveArea;
@ApiModelProperty("意向开店区域")
private String wantShopArea;
@ApiModelProperty("0不接受调剂、1全国调剂、2省内调剂、3市内调剂")
private Integer acceptAdjustType;
@ApiModelProperty("截止时间")
private Date deadline;
@ApiModelProperty("阶段提交时间")
private Date partnerSubmitTime;
@ApiModelProperty("所属阶段")
private String workflowStage;
@ApiModelProperty("子流程状态")
private String workflowStatus;
}

View File

@@ -0,0 +1,64 @@
package com.cool.store.dto.partner;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Date;
/**
* @Author suzhuhong
* @Date 2023/6/9 19:40
* @Version 1.0
*/
@Data
public class PartnerInterviewInfoDTO {
@ApiModelProperty("hy_partner_interview.id")
private Long interviewId;
@ApiModelProperty("hy_partner_interview_plan.id")
private Long id;
@ApiModelProperty("加盟商用户名称")
private String partnerUserName;
@ApiModelProperty("预约状态 0 待预约;1待面试;2已开始;3待审核;4审批中;5审批通过;6拒绝")
private Integer status;
@ApiModelProperty("hy_partner_line_info.id")
private Long partnerLineId;
@ApiModelProperty("加盟商用户ID")
private String partnerId;
@ApiModelProperty("截止时间")
private Date deadline;
@ApiModelProperty("审批发起时间")
private Date approveTime;
@ApiModelProperty("意向合同号")
private String authCode;
@ApiModelProperty("面试开始时间")
private Date startTime;
@ApiModelProperty("面试结束时间")
private Date endTime;
@ApiModelProperty("面试官ID")
private String interviewer;
@ApiModelProperty("面试官名称")
private String interviewerName;
@ApiModelProperty("预约时间")
private Date createTime;
@ApiModelProperty("房间号")
private String roomId;
@ApiModelProperty("过程信息")
private String processInfo;
}

View File

@@ -0,0 +1,44 @@
package com.cool.store.dto.partner;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @Author suzhuhong
* @Date 2023/6/12 16:05
* @Version 1.0
*/
@Data
public class PartnerLineInfoAndBaseInfoDTO {
@ApiModelProperty("线索ID")
private Long id;
@ApiModelProperty("hy_partner_user_info.partner_id")
private String partnerId;
@ApiModelProperty("流程阶段:1意向申请审核;2预约面试时间;3加盟资格面试;4分配选址开发经理;5商圈点位评估;6上传店铺租赁信息;7完善加盟签约信息;8支付加盟费用;9签订加盟合同")
private String workflowStage;
@ApiModelProperty("流程子状态")
private String workflowStatus;
@ApiModelProperty("加盟商用户ID")
private String partnerUserId;
@ApiModelProperty("加盟商用户名称")
private String partnerUserName;
@ApiModelProperty("加盟商用户手机号")
private String partnerUserPhone;
@ApiModelProperty("手机号归属地")
private String phoneAddress;
@ApiModelProperty("招商经理")
private String investmentManager;
@ApiModelProperty("招商经理手机号")
private String investmentManagerPhone;
@ApiModelProperty("用户画像")
private String userPortrait;
}

View File

@@ -0,0 +1,17 @@
package com.cool.store.dto.partner;
import lombok.Data;
/**
* @Author suzhuhong
* @Date 2023/6/8 16:38
* @Version 1.0
*/
@Data
public class SpecialDateRangeInterviewCountDTO {
private Integer currentDayInterviewCount;
private Integer lastSevenDayInterviewCount;
}

View File

@@ -0,0 +1,38 @@
package com.cool.store.dto.partner;
import lombok.Data;
/**
* @Author suzhuhong
* @Date 2023/6/9 10:16
* @Version 1.0
*/
@Data
public class StageCountDTO {
/**
* 意向申请待处理或者待跟进数量
*/
private Integer intentApplyApproveCount;
/**
* 预约面试阶段 待跟进数量
*/
private Integer reservationInterviewCount;
/**
* 合格资格面试 待处理或者待跟进数量
*/
private Integer qualifiedInterviewCount;
public StageCountDTO(Integer intentApplyApproveCount, Integer reservationInterviewCount, Integer qualifiedInterviewCount) {
this.intentApplyApproveCount = intentApplyApproveCount;
this.reservationInterviewCount = reservationInterviewCount;
this.qualifiedInterviewCount = qualifiedInterviewCount;
}
public StageCountDTO(Integer intentApplyApproveCount, Integer qualifiedInterviewCount) {
this.intentApplyApproveCount = intentApplyApproveCount;
this.qualifiedInterviewCount = qualifiedInterviewCount;
}
public StageCountDTO() {
}
}

View File

@@ -0,0 +1,21 @@
package com.cool.store.request;
import io.swagger.annotations.ApiModel;
import lombok.Data;
import java.util.List;
/**
* @Author suzhuhong
* @Date 2023/5/30 21:22
* @Version 1.0
*/
@Data
@ApiModel
public class TransferInvestmentManagerRequest {
private Long lineId;
private String userId;
}

View File

@@ -0,0 +1,27 @@
package com.cool.store.vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Date;
/**
* @Author suzhuhong
* @Date 2023/6/8 16:12
* @Version 1.0
*/
@Data
@ApiModel
public class InterviewDetailInfoVO {
@ApiModelProperty("面试者ID")
private String userId;
@ApiModelProperty("面试者名称")
private String userName;
@ApiModelProperty("面试者手机号")
private String userPhone;
@ApiModelProperty("线索ID")
private Long lineId;
@ApiModelProperty("面试开始时间")
private Date startTime;
}

View File

@@ -0,0 +1,20 @@
package com.cool.store.vo;
import io.swagger.annotations.ApiModel;
import lombok.Data;
/**
* @Author suzhuhong
* @Date 2023/6/8 14:39
* @Version 1.0
*/
@Data
@ApiModel
public class InterviewPlanVO {
private Boolean hasInterview;
private Boolean hasAdventLine;
}

View File

@@ -5,6 +5,7 @@ import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Date;
import java.util.List;
/**
* @Author suzhuhong
@@ -19,15 +20,7 @@ public class InterviewScheduleInfoVO {
private Integer currentDayInterviewCount;
@ApiModelProperty("当前日期后七天面试数量")
private Integer lastSevenDayInterviewCount;
@ApiModelProperty("面试者ID")
private String userId;
@ApiModelProperty("面试者名称")
private String userName;
@ApiModelProperty("面试者手机号")
private String userPhone;
@ApiModelProperty("线索ID")
private Long lineId;
@ApiModelProperty("面试开始时间")
private Date startTime;
@ApiModelProperty("面试日程列表")
private List<InterviewDetailInfoVO> interviewDetailInfoVOS;
}

View File

@@ -6,6 +6,7 @@ import lombok.Data;
import java.util.Date;
/**
* @Author suzhuhong
* @Date 2023/5/30 20:11
@@ -22,6 +23,9 @@ public class PartnerIntentApplyInfoVO {
@ApiModelProperty("加盟商用户名称")
private String partnerUserName;
@ApiModelProperty("加盟商手机号码")
private String partnerUserPhone;
@ApiModelProperty("hy_partner_user_info.partner_id")
private String partnerId;
@@ -34,6 +38,9 @@ public class PartnerIntentApplyInfoVO {
@ApiModelProperty("意向开店区域")
private String wantShopArea;
@ApiModelProperty("意向开店区域")
private String wantShopAreaName;
@ApiModelProperty("0不接受调剂、1全国调剂、2省内调剂、3市内调剂")
private Integer acceptAdjustType;
@@ -43,7 +50,4 @@ public class PartnerIntentApplyInfoVO {
@ApiModelProperty("阶段提交时间")
private Date partnerSubmitTime;
}

View File

@@ -4,6 +4,8 @@ import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Date;
/**
* @Author suzhuhong
* @Date 2023/5/30 20:28
@@ -14,7 +16,7 @@ import lombok.Data;
public class PartnerInterviewInfoVO {
@ApiModelProperty("会议id")
private String interviewId;
private Long interviewId;
@ApiModelProperty("预约状态 0 待预约;1待面试;2已开始;3待审核;4审批中;5审批通过;6拒绝")
private Integer status;
@@ -40,4 +42,9 @@ public class PartnerInterviewInfoVO {
@ApiModelProperty("面试官名称")
private String interviewerName;
@ApiModelProperty("预约时间")
private String createTime;
@ApiModelProperty("过程信息")
private String processInfo;
}

View File

@@ -13,14 +13,11 @@ import java.util.List;
*/
@Data
@ApiModel
public class PartnerLineDetailVO {
public class PartnerLineInfoAndBaseInfoVO {
@ApiModelProperty("线索ID")
private Long id;
@ApiModelProperty("hy_partner_user_info.partner_id")
private String partnerId;
@ApiModelProperty("流程阶段:1意向申请审核;2预约面试时间;3加盟资格面试;4分配选址开发经理;5商圈点位评估;6上传店铺租赁信息;7完善加盟签约信息;8支付加盟费用;9签订加盟合同")
private String workflowStage;
@@ -42,13 +39,11 @@ public class PartnerLineDetailVO {
@ApiModelProperty("招商经理")
private String investmentManager;
@ApiModelProperty("招商经理")
private String investmentManagerName;
@ApiModelProperty("招商经理手机号")
private String investmentManagerPhone;
@ApiModelProperty("用户画像")
private String userPortrait;
}

View File

@@ -0,0 +1,49 @@
package com.cool.store.Service;
import com.cool.store.vo.InterviewPlanVO;
import com.cool.store.vo.InterviewScheduleInfoVO;
import com.cool.store.vo.StageCountVO;
import java.util.Date;
/**
* @Author suzhuhong
* @Date 2023/6/8 14:45
* @Version 1.0
*/
public interface DeskService {
/**
* 是否有临期线索与面试
* @param userId
* @return
*/
InterviewPlanVO getInterviewPlan(String userId);
/**
* 面试日程
* @param userId
* @param selectedData
* @return
*/
InterviewScheduleInfoVO interviewSchedule(String userId,Date selectedData);
/**
* 招商经理 各阶段 待处理 待跟进数量
* @param userId
* @param type
* @return
*/
StageCountVO getStageCountByType(String userId,String type);
}

View File

@@ -0,0 +1,31 @@
package com.cool.store.Service;
import com.cool.store.vo.PartnerIntentApplyInfoVO;
import com.github.pagehelper.PageInfo;
/**
* @Author suzhuhong
* @Date 2023/6/9 14:54
* @Version 1.0
*/
public interface HyPartnerIntentInfoService {
/**
* 招商经理 意向申请阶段 待处理 待跟进列表
* @param userId
* @param type
* @param pageSize
* @param pageNumber
* @return
*/
PageInfo<PartnerIntentApplyInfoVO> getPartnerIntentApplyList(String userId, String type, Integer pageSize, Integer pageNumber);
/**
* 根据线索查询加盟商意向申请信息
* @param lineId
* @return
*/
PartnerIntentApplyInfoVO getPartnerIntentApplyInfo(Long lineId);
}

View File

@@ -0,0 +1,45 @@
package com.cool.store.Service;
import com.cool.store.entity.HyPartnerInterviewPlanDO;
import com.cool.store.vo.InterviewDetailInfoVO;
import com.cool.store.vo.PartnerInterviewInfoVO;
import com.github.pagehelper.PageInfo;
import org.apache.commons.lang3.StringUtils;
import java.util.ArrayList;
import java.util.List;
/**
* @Author suzhuhong
* @Date 2023/6/8 19:32
* @Version 1.0
*/
public interface HyPartnerInterviewPlanService {
/**
* 招商经理今日面试列表
* @param userId
* @return
*/
List<InterviewDetailInfoVO> getInterviewPlanList(String userId);
/**
* getPartnerInterviewInfoList
* @param userId
* @param pageSize
* @param pageNumber
* @return
*/
PageInfo<PartnerInterviewInfoVO> getPartnerInterviewInfoList(String userId,Integer pageSize,Integer pageNumber);
/**
* getQualifiedInterviewList
* @param userId
* @param type
* @param pageSize
* @param pageNumber
* @return
*/
PageInfo<PartnerInterviewInfoVO> getQualifiedInterviewList(String userId,String type,Integer pageSize,Integer pageNumber);
}

View File

@@ -0,0 +1,67 @@
package com.cool.store.Service;
import com.cool.store.vo.PartnerLineInfoAndBaseInfoVO;
import com.cool.store.vo.PartnerLineInfoVO;
import com.cool.store.vo.StageCountVO;
import com.github.pagehelper.PageInfo;
import java.util.List;
/**
* @Author suzhuhong
* @Date 2023/6/9 10:30
* @Version 1.0
*/
public interface HyPartnerLineInfoService {
/**
* 查询招商经理 待处理
* @param userId
* @return
*/
StageCountVO selectStagePendingCount(String userId);
/**
* 查询招商经理 待跟进
* @param userId
* @return
*/
StageCountVO selectStageFollowCount(String userId);
/**
* 查询加盟商线索详情之一 线索信息与基本信息
* @param lineId
* @return
*/
PartnerLineInfoAndBaseInfoVO selectPartnerLineInfoAndBaseInfo(Long lineId);
/**
* 最近30天结束的线索
* @param userId
* @param pageSize
* @param pageNumber
* @return
*/
PageInfo<PartnerLineInfoVO> lastMonthCloseLine(String userId,Integer pageSize,Integer pageNumber);
/**
* 转让招商经理
* @param userId
* @param lineId
* @return
*/
Boolean transferInvestmentManager(String userId,Long lineId);
/**
* 分配招商经理
* @param userId
* @param lineIdList
* @return
*/
Boolean allocationInvestmentManager(String userId, List<Long> lineIdList);
}

View File

@@ -0,0 +1,92 @@
package com.cool.store.Service.impl;
import cn.hutool.core.date.DateUtil;
import com.cool.store.Service.DeskService;
import com.cool.store.Service.HyPartnerInterviewPlanService;
import com.cool.store.Service.HyPartnerLineInfoService;
import com.cool.store.constants.CommonConstants;
import com.cool.store.dao.HyPartnerInterviewPlanDAO;
import com.cool.store.dao.HyPartnerLineInfoDAO;
import com.cool.store.dto.partner.SpecialDateRangeInterviewCountDTO;
import com.cool.store.entity.HyPartnerInterviewPlanDO;
import com.cool.store.enums.ErrorCodeEnum;
import com.cool.store.exception.ServiceException;
import com.cool.store.utils.CoolDateUtils;
import com.cool.store.vo.InterviewDetailInfoVO;
import com.cool.store.vo.InterviewPlanVO;
import com.cool.store.vo.InterviewScheduleInfoVO;
import com.cool.store.vo.StageCountVO;
import org.apache.commons.lang3.StringUtils;
import org.apache.http.client.utils.DateUtils;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.Date;
import java.util.List;
/**
* @Author suzhuhong
* @Date 2023/6/8 14:45
* @Version 1.0
*/
@Service
public class DeskServiceImpl implements DeskService {
@Resource
HyPartnerInterviewPlanDAO hyPartnerInterviewPlanDAO;
@Resource
HyPartnerLineInfoDAO hyPartnerLineInfoDAO;
@Resource
HyPartnerInterviewPlanService hyPartnerInterviewPlanService;
@Resource
HyPartnerLineInfoService hyPartnerLineInfoService;
@Override
public InterviewPlanVO getInterviewPlan(String userId) {
InterviewPlanVO interviewPlanVO = new InterviewPlanVO();
String currentDate = DateUtil.format(new Date(), CoolDateUtils.DATE_FORMAT_DAY);
Integer currentDateInterviewCount = hyPartnerInterviewPlanDAO.getCurrentDateInterviewCount(userId, currentDate);
interviewPlanVO.setHasInterview(currentDateInterviewCount>0);
//临期数量
Integer adventLineCount = hyPartnerLineInfoDAO.getAdventLineCount(userId, currentDate);
interviewPlanVO.setHasAdventLine(adventLineCount>0);
return interviewPlanVO;
}
@Override
public InterviewScheduleInfoVO interviewSchedule(String userId,Date selectedData) {
if (StringUtils.isEmpty(userId)||selectedData==null){
throw new ServiceException(ErrorCodeEnum.PARAMS_REQUIRED);
}
InterviewScheduleInfoVO interviewScheduleInfoVO = new InterviewScheduleInfoVO();
//查询面试数量
String currentDate = DateUtil.format(selectedData, CoolDateUtils.DATE_FORMAT_DAY);
String startTime = DateUtil.format(selectedData, CoolDateUtils.DATE_FORMAT_SEC);
String endTime = DateUtil.format(CoolDateUtils.getDateBefore(selectedData, 7), CoolDateUtils.DATE_FORMAT_SEC);
SpecialDateRangeInterviewCountDTO interviewCount = hyPartnerInterviewPlanDAO.getInterviewCount(userId, currentDate, startTime, endTime);
interviewScheduleInfoVO.setCurrentDayInterviewCount(interviewCount.getCurrentDayInterviewCount());
interviewScheduleInfoVO.setLastSevenDayInterviewCount(interviewCount.getLastSevenDayInterviewCount());
//查询面试列表
//当天时间 与入参无关
List<InterviewDetailInfoVO> interviewPlanList = hyPartnerInterviewPlanService.getInterviewPlanList(userId);
interviewScheduleInfoVO.setInterviewDetailInfoVOS(interviewPlanList);
return interviewScheduleInfoVO;
}
@Override
public StageCountVO getStageCountByType(String userId, String type) {
if (CommonConstants.PENDING.equals(type)){
return hyPartnerLineInfoService.selectStagePendingCount(userId);
}
if (CommonConstants.FOLLOW.equals(type)){
return hyPartnerLineInfoService.selectStageFollowCount(userId);
}
return null;
}
}

View File

@@ -0,0 +1,104 @@
package com.cool.store.Service.impl;
import com.cool.store.Service.HyPartnerIntentInfoService;
import com.cool.store.constants.CommonConstants;
import com.cool.store.dao.HyPartnerIntentInfoDAO;
import com.cool.store.dao.HyPartnerLineInfoDAO;
import com.cool.store.dao.HyPartnerUserInfoDAO;
import com.cool.store.dto.partner.PartnerIntentApplyInfoDTO;
import com.cool.store.entity.HyPartnerIntentInfoDO;
import com.cool.store.entity.HyPartnerLineInfoDO;
import com.cool.store.entity.HyPartnerUserInfoDO;
import com.cool.store.enums.ErrorCodeEnum;
import com.cool.store.enums.WorkflowStageEnum;
import com.cool.store.enums.WorkflowStatusEnum;
import com.cool.store.exception.ServiceException;
import com.cool.store.vo.PartnerIntentApplyInfoVO;
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
* @Date 2023/6/9 15:00
* @Version 1.0
*/
@Service
public class HyPartnerIntentInfoServiceImpl implements HyPartnerIntentInfoService {
@Resource
HyPartnerIntentInfoDAO hyPartnerIntentInfoDAO;
@Resource
HyPartnerUserInfoDAO hyPartnerUserInfoDAO;
@Resource
HyPartnerLineInfoDAO hyPartnerLineInfoDAO;
@Override
public PageInfo<PartnerIntentApplyInfoVO> getPartnerIntentApplyList(String userId, String type, Integer pageSize, Integer pageNumber) {
PartnerIntentApplyInfoVO partnerIntentApplyInfoVO = new PartnerIntentApplyInfoVO();
String workflowStatus = "";
if (CommonConstants.PENDING.equals(type)) {
workflowStatus = WorkflowStatusEnum.RESERVATION_0.getCode();
}
if (CommonConstants.FOLLOW.equals(type)) {
workflowStatus = WorkflowStatusEnum.INTERVIEW_4.getCode();
}
PageHelper.startPage(pageNumber,pageSize);
PageInfo partnerIntentApplyInfo = hyPartnerIntentInfoDAO.selectPartnerIntentApplyInfoList(userId, WorkflowStageEnum.INTENT.getCode(), workflowStatus);
if (partnerIntentApplyInfo==null){
return new PageInfo<>();
}
List<PartnerIntentApplyInfoDTO> list = partnerIntentApplyInfo.getList();
List<String> partnerIds = list.stream().map(PartnerIntentApplyInfoDTO::getPartnerId).collect(Collectors.toList());
List<HyPartnerUserInfoDO> hyPartnerUserInfoDOS = hyPartnerUserInfoDAO.selectByPartnerIds(partnerIds);
Map<String, HyPartnerUserInfoDO> infoDOMap = hyPartnerUserInfoDOS.stream().collect(Collectors.toMap(HyPartnerUserInfoDO::getPartnerId, data -> data));
List<PartnerIntentApplyInfoVO> result = new ArrayList<>();
list.stream().forEach(x->{
PartnerIntentApplyInfoVO pat = partnerIntentApplyInfoDTOToVo(x);
HyPartnerUserInfoDO infoDOMapOrDefault = infoDOMap.getOrDefault(x.getPartnerId(), new HyPartnerUserInfoDO());
pat.setPartnerUserName(infoDOMapOrDefault.getUsername());
pat.setPartnerUserPhone(infoDOMapOrDefault.getMobile());
result.add(pat);
});
partnerIntentApplyInfo.setList(result);
return partnerIntentApplyInfo;
}
@Override
public PartnerIntentApplyInfoVO getPartnerIntentApplyInfo(Long lineId) {
PartnerIntentApplyInfoDTO partnerIntentApplyInfoDTO= hyPartnerIntentInfoDAO.selectByLineId(lineId);
PartnerIntentApplyInfoVO partnerIntentApplyInfoVO = partnerIntentApplyInfoDTOToVo(partnerIntentApplyInfoDTO);
HyPartnerUserInfoDO hyPartnerUserInfoDO = hyPartnerUserInfoDAO.selectByPartnerId(partnerIntentApplyInfoDTO.getPartnerId());
partnerIntentApplyInfoVO.setPartnerUserName(hyPartnerUserInfoDO.getUsername());
partnerIntentApplyInfoVO.setPartnerUserPhone(hyPartnerUserInfoDO.getMobile());
//todo su 手机号归属地 意向申请区域名称
return partnerIntentApplyInfoVO;
}
/**
* partnerIntentApplyInfoDTOToVo
* @param partnerIntentApplyInfoDTO
* @return
*/
private PartnerIntentApplyInfoVO partnerIntentApplyInfoDTOToVo(PartnerIntentApplyInfoDTO partnerIntentApplyInfoDTO){
PartnerIntentApplyInfoVO partnerIntentApplyInfoVO = new PartnerIntentApplyInfoVO();
partnerIntentApplyInfoVO.setId(partnerIntentApplyInfoDTO.getId());
partnerIntentApplyInfoVO.setPartnerId(partnerIntentApplyInfoDTO.getPartnerId());
partnerIntentApplyInfoVO.setPartnerLineId(partnerIntentApplyInfoDTO.getPartnerLineId());
partnerIntentApplyInfoVO.setPartnerSubmitTime(partnerIntentApplyInfoDTO.getPartnerSubmitTime());
partnerIntentApplyInfoVO.setAcceptAdjustType(partnerIntentApplyInfoDTO.getAcceptAdjustType());
partnerIntentApplyInfoVO.setLiveArea(partnerIntentApplyInfoDTO.getLiveArea());
partnerIntentApplyInfoVO.setWantShopArea(partnerIntentApplyInfoDTO.getWantShopArea());
partnerIntentApplyInfoVO.setDeadline(partnerIntentApplyInfoDTO.getDeadline());
return partnerIntentApplyInfoVO;
}
}

View File

@@ -0,0 +1,141 @@
package com.cool.store.Service.impl;
import cn.hutool.core.date.DateUtil;
import com.cool.store.Service.HyPartnerInterviewPlanService;
import com.cool.store.constants.CommonConstants;
import com.cool.store.dao.HyPartnerInterviewPlanDAO;
import com.cool.store.dao.HyPartnerUserInfoDAO;
import com.cool.store.dto.partner.PartnerInterviewInfoDTO;
import com.cool.store.entity.HyPartnerInterviewPlanDO;
import com.cool.store.entity.HyPartnerUserInfoDO;
import com.cool.store.enums.WorkflowStageEnum;
import com.cool.store.enums.WorkflowStatusEnum;
import com.cool.store.utils.CoolDateUtils;
import com.cool.store.vo.InterviewDetailInfoVO;
import com.cool.store.vo.PartnerInterviewInfoVO;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.google.common.collect.Lists;
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 2023/6/8 19:32
* @Version 1.0
*/
@Service
public class HyPartnerInterviewPlanServiceImpl implements HyPartnerInterviewPlanService {
@Resource
HyPartnerInterviewPlanDAO hyPartnerInterviewPlanDAO;
@Resource
HyPartnerUserInfoDAO hyPartnerUserInfoDAO;
@Override
public List<InterviewDetailInfoVO> getInterviewPlanList(String userId) {
String currentTime = DateUtil.format(new Date(), CoolDateUtils.DATE_FORMAT_DAY);
List<HyPartnerInterviewPlanDO> interviewPlanList = hyPartnerInterviewPlanDAO.getInterviewPlanList(userId, currentTime);
if (CollectionUtils.isEmpty(interviewPlanList)){
return Lists.newArrayList();
}
List<String> partnerIdList = interviewPlanList.stream().map(HyPartnerInterviewPlanDO::getPartnerId).collect(Collectors.toList());
List<HyPartnerUserInfoDO> hyPartnerUserInfoDOS = hyPartnerUserInfoDAO.selectByPartnerIds(partnerIdList);
Map<String, HyPartnerUserInfoDO> hyPartnerUserInfoDOMap = hyPartnerUserInfoDOS.stream().collect(Collectors.toMap(HyPartnerUserInfoDO::getPartnerId, data -> data));
List<InterviewDetailInfoVO> result = new ArrayList<>();
interviewPlanList.stream().forEach(x->{
InterviewDetailInfoVO interviewDetailInfoVO = convertDoToInterviewDetailInfoVO(x);
HyPartnerUserInfoDO userInfoDO = hyPartnerUserInfoDOMap.getOrDefault(x.getPartnerId(), new HyPartnerUserInfoDO());
interviewDetailInfoVO.setUserId(userInfoDO.getPartnerId());
interviewDetailInfoVO.setUserName(userInfoDO.getUsername());
interviewDetailInfoVO.setUserPhone(userInfoDO.getMobile());
result.add(interviewDetailInfoVO);
});
return result;
}
@Override
public PageInfo<PartnerInterviewInfoVO> getPartnerInterviewInfoList(String userId ,Integer pageSize,Integer pageNumber) {
PageHelper.startPage(pageNumber,pageSize);
//查询预约面试列表
PageInfo partnerInterviewInfoList = hyPartnerInterviewPlanDAO.getPartnerInterviewInfoList(userId, WorkflowStageEnum.RESERVATION.getCode(), WorkflowStatusEnum.RESERVATION_0.getCode());
List<PartnerInterviewInfoDTO> list = partnerInterviewInfoList.getList();
if (CollectionUtils.isEmpty(list)){
return partnerInterviewInfoList;
}
List<PartnerInterviewInfoVO> result = new ArrayList<>();
list.stream().forEach(x->{
PartnerInterviewInfoVO partnerInterviewInfoVO = convertPartnerInterviewInfoDTOToVo(x);
result.add(partnerInterviewInfoVO);
});
partnerInterviewInfoList.setList(result);
return partnerInterviewInfoList;
}
@Override
public PageInfo<PartnerInterviewInfoVO> getQualifiedInterviewList(String userId, String type, Integer pageSize, Integer pageNumber) {
String workflowStatus = "";
if (CommonConstants.PENDING.equals(type)) {
workflowStatus = WorkflowStatusEnum.INTERVIEW_3.getCode();
}
if (CommonConstants.FOLLOW.equals(type)) {
workflowStatus = WorkflowStatusEnum.INTERVIEW_4.getCode();
}
PageHelper.startPage(pageNumber,pageSize);
//查询预约面试列表
PageInfo partnerInterviewInfoList = hyPartnerInterviewPlanDAO.getPartnerInterviewInfoList(userId, WorkflowStageEnum.INTERVIEW.getCode(),workflowStatus);
List<PartnerInterviewInfoDTO> list = partnerInterviewInfoList.getList();
if (CollectionUtils.isEmpty(list)){
return partnerInterviewInfoList;
}
List<PartnerInterviewInfoVO> result = new ArrayList<>();
list.stream().forEach(x->{
PartnerInterviewInfoVO partnerInterviewInfoVO = convertPartnerInterviewInfoDTOToVo(x);
result.add(partnerInterviewInfoVO);
});
partnerInterviewInfoList.setList(result);
return partnerInterviewInfoList;
}
/**
* convertDoToInterviewDetailInfoVO
* @param hyPartnerInterviewPlanDO
* @return
*/
private InterviewDetailInfoVO convertDoToInterviewDetailInfoVO(HyPartnerInterviewPlanDO hyPartnerInterviewPlanDO){
InterviewDetailInfoVO interviewDetailInfoVO = new InterviewDetailInfoVO();
if (hyPartnerInterviewPlanDO==null){
return interviewDetailInfoVO;
}
interviewDetailInfoVO.setLineId(hyPartnerInterviewPlanDO.getPartnerLineId());
interviewDetailInfoVO.setStartTime(hyPartnerInterviewPlanDO.getStartTime());
return interviewDetailInfoVO;
}
/**
* PartnerInterviewInfoDTOToVo
* @param partnerInterviewInfoDTO
* @return
*/
private PartnerInterviewInfoVO convertPartnerInterviewInfoDTOToVo(PartnerInterviewInfoDTO partnerInterviewInfoDTO){
PartnerInterviewInfoVO partnerInterviewInfoVO = new PartnerInterviewInfoVO();
partnerInterviewInfoVO.setInterviewId(partnerInterviewInfoDTO.getInterviewId());
partnerInterviewInfoVO.setPartnerId(partnerInterviewInfoDTO.getPartnerId());
partnerInterviewInfoVO.setInterviewerId(partnerInterviewInfoDTO.getInterviewer());
partnerInterviewInfoVO.setProcessInfo(partnerInterviewInfoDTO.getProcessInfo());
partnerInterviewInfoVO.setCreateTime(DateUtil.format(partnerInterviewInfoDTO.getCreateTime(),CoolDateUtils.DATE_FORMAT_SEC));
partnerInterviewInfoVO.setRoomId(partnerInterviewInfoDTO.getRoomId());
partnerInterviewInfoVO.setStartTime(DateUtil.format(partnerInterviewInfoDTO.getStartTime(),CoolDateUtils.DATE_FORMAT_SEC));
partnerInterviewInfoVO.setStatus(partnerInterviewInfoDTO.getStatus());
partnerInterviewInfoVO.setEndTime(DateUtil.format(partnerInterviewInfoDTO.getEndTime(),CoolDateUtils.DATE_FORMAT_SEC));
return partnerInterviewInfoVO;
}
}

View File

@@ -0,0 +1,163 @@
package com.cool.store.Service.impl;
import cn.hutool.core.date.DateUtil;
import com.cool.store.Service.HyPartnerLineInfoService;
import com.cool.store.dao.HyPartnerLineInfoDAO;
import com.cool.store.dao.HyPartnerUserInfoDAO;
import com.cool.store.dto.partner.PartnerLineInfoAndBaseInfoDTO;
import com.cool.store.dto.partner.StageCountDTO;
import com.cool.store.entity.HyPartnerLineInfoDO;
import com.cool.store.entity.HyPartnerUserInfoDO;
import com.cool.store.enums.ErrorCodeEnum;
import com.cool.store.enums.WorkflowStageEnum;
import com.cool.store.enums.WorkflowStatusEnum;
import com.cool.store.exception.ServiceException;
import com.cool.store.utils.CoolDateUtils;
import com.cool.store.utils.StringUtil;
import com.cool.store.vo.PartnerLineInfoAndBaseInfoVO;
import com.cool.store.vo.PartnerLineInfoVO;
import com.cool.store.vo.StageCountVO;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.apache.commons.collections4.CollectionUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
import java.util.List;
import java.util.stream.Collectors;
/**
* @Author suzhuhong
* @Date 2023/6/9 10:30
* @Version 1.0
*/
@Service
public class HyPartnerLineInfoServiceImpl implements HyPartnerLineInfoService {
@Resource
HyPartnerLineInfoDAO hyPartnerLineInfoDAO;
@Resource
HyPartnerUserInfoDAO hyPartnerUserInfoDAO;
@Override
public StageCountVO selectStagePendingCount(String userId) {
StageCountDTO stageCountDTO = hyPartnerLineInfoDAO.selectStagePendingCount(userId);
return stageCountDTOToVo(stageCountDTO);
}
@Override
public StageCountVO selectStageFollowCount(String userId) {
StageCountDTO stageCountDTO = hyPartnerLineInfoDAO.selectStageFollowCount(userId);
return stageCountDTOToVo(stageCountDTO);
}
@Override
public PartnerLineInfoAndBaseInfoVO selectPartnerLineInfoAndBaseInfo(Long lineId) {
PartnerLineInfoAndBaseInfoDTO partnerLineInfoAndBaseInfoDTO = hyPartnerLineInfoDAO.selectPartnerLineInfoAndBaseInfo(lineId);
if (partnerLineInfoAndBaseInfoDTO==null){
throw new ServiceException(ErrorCodeEnum.LINE_ID_IS_NOT_EXIST);
}
PartnerLineInfoAndBaseInfoVO partnerLineInfoAndBaseInfoVO = convertPartnerLineInfoAndBaseInfoDTOToVo(partnerLineInfoAndBaseInfoDTO);
HyPartnerUserInfoDO hyPartnerUserInfoDO = hyPartnerUserInfoDAO.selectByPartnerId(partnerLineInfoAndBaseInfoVO.getPartnerUserId());
if (hyPartnerUserInfoDO!=null){
partnerLineInfoAndBaseInfoVO.setPartnerUserName(hyPartnerUserInfoDO.getUsername());
partnerLineInfoAndBaseInfoVO.setPartnerUserPhone(hyPartnerUserInfoDO.getMobile());
}
//todo su 1、招商经理名称 手机号归属地 2、加盟商手机号归属地
return partnerLineInfoAndBaseInfoVO;
}
@Override
public PageInfo<PartnerLineInfoVO> lastMonthCloseLine(String userId, Integer pageSize, Integer pageNumber) {
PageHelper.startPage(pageNumber,pageSize);
String lastMonthTodayDate = DateUtil.format(CoolDateUtils.getDateBefore(new Date(),-30), CoolDateUtils.DATE_FORMAT_SEC);
PageInfo hyPartnerLineInfoDOPageInfo = hyPartnerLineInfoDAO.lastMonthCloseLine(userId, lastMonthTodayDate);
List<HyPartnerLineInfoDO> list = hyPartnerLineInfoDOPageInfo.getList();
List<PartnerLineInfoVO> result = new ArrayList<>();
list.stream().forEach(x->{
PartnerLineInfoVO partnerLineInfoVO = new PartnerLineInfoVO();
BeanUtils.copyProperties(x,partnerLineInfoVO);
result.add(partnerLineInfoVO);
});
hyPartnerLineInfoDOPageInfo.setList(result);
return hyPartnerLineInfoDOPageInfo;
}
@Override
public Boolean transferInvestmentManager(String userId, Long lineId) {
if (StringUtil.isBlank(userId)||lineId==null){
throw new ServiceException(ErrorCodeEnum.PARAMS_REQUIRED);
}
hyPartnerLineInfoDAO.updateInvestmentManager(userId, Arrays.asList(lineId));
return Boolean.TRUE;
}
@Override
public Boolean allocationInvestmentManager(String userId, List<Long> lineIdList) {
if (StringUtil.isBlank(userId)|| CollectionUtils.isEmpty(lineIdList)){
throw new ServiceException(ErrorCodeEnum.PARAMS_REQUIRED);
}
//加盟上线索集合
List<HyPartnerLineInfoDO> partnerLineInfoList= hyPartnerLineInfoDAO.getLineListByLineIds(lineIdList);
//过滤出已结束的线索 这块线索需要重新生成新的线索
List<HyPartnerLineInfoDO> closeLineList = partnerLineInfoList.stream().filter(x -> x.getCloseTime() != null).collect(Collectors.toList());
List<Long> closeLineIdList = closeLineList.stream().map(HyPartnerLineInfoDO::getId).collect(Collectors.toList());
//已结束的线索 需要重新生成一条新的线索
List<HyPartnerLineInfoDO> list = new ArrayList<>();
closeLineList.stream().forEach(x->{
HyPartnerLineInfoDO hyPartnerLineInfoDO = new HyPartnerLineInfoDO();
hyPartnerLineInfoDO.setPartnerId(x.getPartnerId());
hyPartnerLineInfoDO.setInvestmentManager(userId);
hyPartnerLineInfoDO.setWorkflowStage(WorkflowStageEnum.INTENT.getCode());
hyPartnerLineInfoDO.setWorkflowStatus(WorkflowStatusEnum.INTENT_0.getCode());
hyPartnerLineInfoDO.setLineStatus(1);
list.add(hyPartnerLineInfoDO);
});
hyPartnerLineInfoDAO.batchInsert(list);
//将老的线索置为删除状态
hyPartnerLineInfoDAO.batchDeleted(closeLineIdList);
//没有结束的线索直接分配招商经理
List<HyPartnerLineInfoDO> otherLineList = partnerLineInfoList.stream().filter(x -> x.getCloseTime() == null).collect(Collectors.toList());
List<Long> otherLineIdList = otherLineList.stream().map(HyPartnerLineInfoDO::getId).collect(Collectors.toList());
hyPartnerLineInfoDAO.updateInvestmentManager(userId, otherLineIdList);
return null;
}
/**
* convertPartnerLineInfoAndBaseInfoDTOToVo
* @param partnerLineInfoAndBaseInfoDTO
* @return
*/
private PartnerLineInfoAndBaseInfoVO convertPartnerLineInfoAndBaseInfoDTOToVo(PartnerLineInfoAndBaseInfoDTO partnerLineInfoAndBaseInfoDTO){
PartnerLineInfoAndBaseInfoVO partnerLineInfoAndBaseInfoVO = new PartnerLineInfoAndBaseInfoVO();
partnerLineInfoAndBaseInfoVO.setId(partnerLineInfoAndBaseInfoDTO.getId());
partnerLineInfoAndBaseInfoVO.setPartnerUserId(partnerLineInfoAndBaseInfoDTO.getPartnerId());
partnerLineInfoAndBaseInfoVO.setInvestmentManager(partnerLineInfoAndBaseInfoDTO.getInvestmentManager());
partnerLineInfoAndBaseInfoVO.setUserPortrait(partnerLineInfoAndBaseInfoDTO.getUserPortrait());
partnerLineInfoAndBaseInfoVO.setWorkflowStage(partnerLineInfoAndBaseInfoDTO.getWorkflowStage());
partnerLineInfoAndBaseInfoVO.setWorkflowStatus(partnerLineInfoAndBaseInfoDTO.getWorkflowStatus());
return partnerLineInfoAndBaseInfoVO;
}
/**
* stageCountDTOToVo
* @param stageCountDTO
* @return
*/
private StageCountVO stageCountDTOToVo(StageCountDTO stageCountDTO){
StageCountVO stageCountVO = new StageCountVO();
stageCountVO.setQualifiedInterviewCount(stageCountDTO.getQualifiedInterviewCount());
stageCountVO.setIntentApplyApproveCount(stageCountDTO.getIntentApplyApproveCount());
stageCountVO.setReservationInterviewCount(stageCountDTO.getReservationInterviewCount());
return stageCountVO;
}
}

View File

@@ -1,5 +1,9 @@
package com.cool.store.controller;
import com.cool.store.Service.DeskService;
import com.cool.store.Service.HyPartnerIntentInfoService;
import com.cool.store.Service.HyPartnerInterviewPlanService;
import com.cool.store.Service.HyPartnerLineInfoService;
import com.cool.store.request.*;
import com.cool.store.response.ResponseResult;
import com.cool.store.vo.*;
@@ -10,6 +14,7 @@ import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.Date;
import java.util.List;
@@ -22,12 +27,22 @@ import java.util.List;
@Slf4j
public class DeskController {
@Resource
DeskService deskService;
@Resource
HyPartnerIntentInfoService hyPartnerIntentInfoService;
@Resource
HyPartnerInterviewPlanService hyPartnerInterviewPlanService;
@Resource
HyPartnerLineInfoService hyPartnerLineInfoService;
@GetMapping(path = "/interviewSchedule")
@ApiOperation("面试日程信息 面试信息有限 不做分页")
public ResponseResult<InterviewScheduleInfoVO> interviewSchedule(@RequestParam(value = "selectedData",required = false) Date selectedData){
public ResponseResult<InterviewScheduleInfoVO> interviewSchedule(@RequestParam(value = "userId",required = false) String userId,
@RequestParam(value = "selectedData",required = false) Date selectedData){
return ResponseResult.success();
return ResponseResult.success(deskService.interviewSchedule(userId,selectedData));
}
@@ -36,9 +51,18 @@ public class DeskController {
@ApiImplicitParams({
@ApiImplicitParam(name = "type", value = "类型 待处理-Pending 待跟进-follow", required = false),
})
public ResponseResult<StageCountVO> queryStageCount(@RequestParam(value = "type",required = false)Integer type){
public ResponseResult<StageCountVO> queryStageCount(@RequestParam(value = "type",required = false)String type){
String userId = "";
return ResponseResult.success(deskService.getStageCountByType(userId,type));
}
return ResponseResult.success();
@GetMapping(path = "/queryInterviewPlan")
@ApiOperation("是否有面试与临期线索")
@ApiImplicitParams({
@ApiImplicitParam(name = "userId", value = "招商经理ID", required = false),
})
public ResponseResult<InterviewPlanVO> queryInterviewPlanVO(@RequestParam(value = "userId",required = false)String userId){
return ResponseResult.success(deskService.getInterviewPlan(userId));
}
@@ -46,32 +70,46 @@ public class DeskController {
@ApiOperation("招商经理视角===意向申请审核列表")
@ApiImplicitParams({
@ApiImplicitParam(name = "type", value = "类型 待处理-Pending 待跟进-follow", required = false),
@ApiImplicitParam(name = "pageNumber", value = "1", required = false),
@ApiImplicitParam(name = "pageSize", value = "10", required = false),
})
public ResponseResult<PageInfo<PartnerIntentApplyInfoVO>> queryIntentApplyList(@RequestParam(value = "type",required = false)Integer type){
return ResponseResult.success();
public ResponseResult<PageInfo<PartnerIntentApplyInfoVO>> queryIntentApplyList(@RequestParam(value = "type",required = false)String type,
@RequestParam(value = "pageNumber",required = false,defaultValue = "1")Integer pageNumber,
@RequestParam(value = "pageSize",required = false,defaultValue = "10")Integer pageSize){
String userId = "";
return ResponseResult.success(hyPartnerIntentInfoService.getPartnerIntentApplyList(userId,type,pageSize,pageNumber));
}
@PostMapping(path = "/querySubscribeInterviewTimeList")
@ApiOperation("招商经理视角===预约面试时间/合格资格面试 列表")
@ApiOperation("招商经理视角===预约面试时间 列表")
public ResponseResult<PageInfo<PartnerInterviewInfoVO>> querySubscribeInterviewTimeList(@RequestParam(value = "pageNumber",required = false,defaultValue = "1")Integer pageNumber,
@RequestParam(value = "pageSize",required = false,defaultValue = "10")Integer pageSize){
String userId = "";
return ResponseResult.success(hyPartnerInterviewPlanService.getPartnerInterviewInfoList(userId,pageSize,pageNumber));
}
@PostMapping(path = "/queryQualifiedInterviewList")
@ApiOperation("招商经理视角===合格资格面试 列表")
@ApiImplicitParams({
@ApiImplicitParam(name = "type", value = "类型 待处理-Pending 待跟进-follow", required = false),
})
public ResponseResult<PageInfo<PartnerInterviewInfoVO>> querySubscribeInterviewTimeList(@RequestParam(value = "type",required = false)Integer type){
return ResponseResult.success();
public ResponseResult<PageInfo<PartnerInterviewInfoVO>> queryQualifiedInterviewList(@RequestParam(value = "type",required = false)String type,
@RequestParam(value = "pageNumber",required = false,defaultValue = "1")Integer pageNumber,
@RequestParam(value = "pageSize",required = false,defaultValue = "10")Integer pageSize){
String userId = "";
return ResponseResult.success(hyPartnerInterviewPlanService.getQualifiedInterviewList(userId,type,pageSize,pageNumber));
}
@GetMapping(path = "/getPartnerLineDetail")
@ApiOperation("查询加盟商线索详情 线索信息与基本信息")
@GetMapping(path = "/getPartnerLineInfoAndBaseInfo")
@ApiOperation("查询加盟商线索详情之一 线索信息与基本信息")
@ApiImplicitParams({
@ApiImplicitParam(name = "lineId", value = "线索ID", required = false),
})
public ResponseResult<PartnerLineDetailVO> getPartnerLineDetail(@RequestParam(value = "lineId",required = false)Long lineId){
return ResponseResult.success();
public ResponseResult<PartnerLineInfoAndBaseInfoVO> getPartnerLineInfoAndBaseInfo(@RequestParam(value = "lineId",required = false)Long lineId){
return ResponseResult.success(hyPartnerLineInfoService.selectPartnerLineInfoAndBaseInfo(lineId));
}
@@ -81,9 +119,7 @@ public class DeskController {
@ApiImplicitParam(name = "lineId", value = "线索ID", required = false),
})
public ResponseResult<PartnerIntentApplyInfoVO> getPartnerIntentInfo(@RequestParam(value = "lineId",required = false)Long lineId){
return ResponseResult.success();
return ResponseResult.success(hyPartnerIntentInfoService.getPartnerIntentApplyInfo(lineId));
}
@@ -120,16 +156,23 @@ public class DeskController {
public ResponseResult<PageInfo<PartnerLineInfoVO>> lastMonthCloseLine(@RequestParam(value = "pageNumber",required = false,defaultValue = "1")Integer pageNumber,
@RequestParam(value = "pageSize",required = false,defaultValue = "10")Integer pageSize){
return ResponseResult.success();
String userId = "";
return ResponseResult.success(hyPartnerLineInfoService.lastMonthCloseLine(userId,pageSize,pageNumber));
}
@PostMapping(path = "/allocationInvestmentManager")
@ApiOperation("分配招商经理/转让招商经理")
public ResponseResult<Boolean> allocationInvestmentManager(@RequestBody AllocationInvestmentManagerRequest allocationInvestmentManagerRequest){
@ApiOperation("分配招商经理/批量分配招商经理")
public ResponseResult<Boolean> allocationInvestmentManager(@RequestBody AllocationInvestmentManagerRequest request){
return ResponseResult.success();
return ResponseResult.success(hyPartnerLineInfoService.allocationInvestmentManager(request.getUserId(),request.getLineIdList()));
}
@PostMapping(path = "/transferInvestmentManager")
@ApiOperation("转让招商经理")
public ResponseResult<Boolean> transferInvestmentManager(@RequestBody TransferInvestmentManagerRequest request){
return ResponseResult.success(hyPartnerLineInfoService.transferInvestmentManager(request.getUserId(),request.getLineId()));
}