接口开发 接口补充

This commit is contained in:
苏竹红
2023-06-18 20:45:18 +08:00
parent af47bb4c24
commit fa26330573
29 changed files with 208 additions and 50 deletions

View File

@@ -15,7 +15,8 @@ public enum WorkflowStatusEnum {
//预约面试阶段 //预约面试阶段
RESERVATION_0("0","待预约"), RESERVATION_0("0","待预约"),
RESERVATION_1("1","预约时间待审核"), RESERVATION_1("1","预约时间待审核"),
RESERVATION_7("7","到期未预约"), RESERVATION_7("7","拒绝"),
RESERVATION_8("8","到期未预约"),
//合格资格面试 //合格资格面试

View File

@@ -29,8 +29,8 @@ public class HyOpenAreaInfoDAO {
return hyOpenAreaInfoMapper.queryKeyOpenArea(); return hyOpenAreaInfoMapper.queryKeyOpenArea();
} }
public List<HyOpenAreaInfoDO> queryByKeyword(String keyword,Boolean filterData){ public List<HyOpenAreaInfoDO> queryByKeyword(String keyword,String areaStatus,Boolean filterData){
return hyOpenAreaInfoMapper.queryByKeyword(keyword,filterData); return hyOpenAreaInfoMapper.queryByKeyword(keyword,areaStatus,filterData);
} }
public List<HyOpenAreaInfoDO> queryFirstLevel(){ public List<HyOpenAreaInfoDO> queryFirstLevel(){

View File

@@ -8,6 +8,8 @@ import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Repository; import org.springframework.stereotype.Repository;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects; import java.util.Objects;
/** /**
@@ -38,9 +40,9 @@ public class HyPartnerIntentInfoDAO {
} }
public PageInfo<PartnerIntentApplyInfoDTO> selectPartnerIntentApplyInfoList(String userId, String workflowStage, String workflowStatus){ public List<PartnerIntentApplyInfoDTO> selectPartnerIntentApplyInfoList(String userId, String workflowStage, String workflowStatus){
if (StringUtils.isEmpty(userId)){ if (StringUtils.isEmpty(userId)){
return new PageInfo<>(); return new ArrayList<>();
} }
return hyPartnerIntentInfoMapper.selectPartnerIntentApplyInfoList(userId,workflowStage,workflowStatus); return hyPartnerIntentInfoMapper.selectPartnerIntentApplyInfoList(userId,workflowStage,workflowStatus);
} }

View File

@@ -5,6 +5,7 @@ import com.cool.store.dto.partner.SpecialDateRangeInterviewCountDTO;
import com.cool.store.entity.HyPartnerInterviewPlanDO; import com.cool.store.entity.HyPartnerInterviewPlanDO;
import com.cool.store.mapper.HyPartnerInterviewPlanMapper; import com.cool.store.mapper.HyPartnerInterviewPlanMapper;
import com.github.pagehelper.PageInfo; import com.github.pagehelper.PageInfo;
import com.google.common.collect.Lists;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository; import org.springframework.stereotype.Repository;
@@ -74,9 +75,9 @@ public class HyPartnerInterviewPlanDAO {
* @param workflowStatus * @param workflowStatus
* @return * @return
*/ */
public PageInfo<PartnerInterviewInfoDTO> getPartnerInterviewInfoList(String userId, String workflowStage,String workflowStatus){ public List<PartnerInterviewInfoDTO> getPartnerInterviewInfoList(String userId, String workflowStage,String workflowStatus){
if (StringUtils.isEmpty(userId)){ if (StringUtils.isEmpty(userId)){
return new PageInfo(); return Lists.newArrayList();
} }
return hyPartnerInterviewPlanMapper.getPartnerInterviewInfoList(userId,workflowStage,workflowStatus); return hyPartnerInterviewPlanMapper.getPartnerInterviewInfoList(userId,workflowStage,workflowStatus);
} }

View File

@@ -6,6 +6,7 @@ import com.cool.store.dto.partner.StageCountDTO;
import com.cool.store.dto.partner.*; import com.cool.store.dto.partner.*;
import com.cool.store.entity.HyPartnerLineInfoDO; import com.cool.store.entity.HyPartnerLineInfoDO;
import com.cool.store.mapper.HyPartnerLineInfoMapper; import com.cool.store.mapper.HyPartnerLineInfoMapper;
import com.cool.store.vo.LineFollowHistoryVO;
import com.github.pagehelper.PageInfo; import com.github.pagehelper.PageInfo;
import com.google.common.collect.Lists; import com.google.common.collect.Lists;
import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.collections4.CollectionUtils;
@@ -159,4 +160,16 @@ public class HyPartnerLineInfoDAO {
return hyPartnerLineInfoMapper.getHyPartnerLineInfoListByIds(lineIds); return hyPartnerLineInfoMapper.getHyPartnerLineInfoListByIds(lineIds);
} }
/**
* 查询根据历史
* @param partnerId
* @return
*/
public List<HyPartnerLineInfoDO> getLineFollowHistoryList(String partnerId){
if (partnerId==null){
return new ArrayList<>();
}
return hyPartnerLineInfoMapper.getLineFollowHistoryList(partnerId);
}
} }

View File

@@ -40,6 +40,7 @@ public interface HyOpenAreaInfoMapper {
* @return * @return
*/ */
List<HyOpenAreaInfoDO> queryByKeyword(@Param("keyword") String keyword, List<HyOpenAreaInfoDO> queryByKeyword(@Param("keyword") String keyword,
@Param("areaStatus") String areaStatus,
@Param("filterData") Boolean filterData); @Param("filterData") Boolean filterData);
/** /**

View File

@@ -37,7 +37,7 @@ public interface HyPartnerIntentInfoMapper {
* @param workflowStatus * @param workflowStatus
* @return * @return
*/ */
PageInfo<PartnerIntentApplyInfoDTO> selectPartnerIntentApplyInfoList(@Param("userId") String userId, List<PartnerIntentApplyInfoDTO> selectPartnerIntentApplyInfoList(@Param("userId") String userId,
@Param("workflowStage") String workflowStage , @Param("workflowStage") String workflowStage ,
@Param("workflowStatus") String workflowStatus); @Param("workflowStatus") String workflowStatus);

View File

@@ -69,7 +69,7 @@ public interface HyPartnerInterviewPlanMapper {
* @param workflowStatus * @param workflowStatus
* @return * @return
*/ */
PageInfo<PartnerInterviewInfoDTO> getPartnerInterviewInfoList(@Param("userId") String userId, List<PartnerInterviewInfoDTO> getPartnerInterviewInfoList(@Param("userId") String userId,
@Param("workflowStage") String workflowStage , @Param("workflowStage") String workflowStage ,
@Param("workflowStatus") String workflowStatus); @Param("workflowStatus") String workflowStatus);

View File

@@ -5,6 +5,7 @@ import com.cool.store.dto.partner.PartnerBlackListDTO;
import com.cool.store.dto.partner.PartnerLineInfoAndBaseInfoDTO; import com.cool.store.dto.partner.PartnerLineInfoAndBaseInfoDTO;
import com.cool.store.dto.partner.StageCountDTO; import com.cool.store.dto.partner.StageCountDTO;
import com.cool.store.entity.HyPartnerLineInfoDO; import com.cool.store.entity.HyPartnerLineInfoDO;
import com.cool.store.vo.LineFollowHistoryVO;
import com.github.pagehelper.PageInfo; import com.github.pagehelper.PageInfo;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
@@ -178,4 +179,11 @@ public interface HyPartnerLineInfoMapper {
* @return * @return
*/ */
List<HyPartnerLineInfoDO> getHyPartnerLineInfoListByIds(@Param("lineIds") List<Long> lineIds); List<HyPartnerLineInfoDO> getHyPartnerLineInfoListByIds(@Param("lineIds") List<Long> lineIds);
/**
* 跟进历史 及删除状态为1的线索
* @param partnerId
* @return
*/
List<HyPartnerLineInfoDO> getLineFollowHistoryList(String partnerId);
} }

View File

@@ -189,6 +189,9 @@
<if test="keyword!=null and keyword!=''"> <if test="keyword!=null and keyword!=''">
and area_path like concat('%',#{keyword},'%') and area_path like concat('%',#{keyword},'%')
</if> </if>
<if test="areaStatus!=null and areaStatus!=''">
and area_status = #{areaStatus}
</if>
<if test="filterData!=null and filterData==true"> <if test="filterData!=null and filterData==true">
and province_city_flag = 1 and province_city_flag = 1
</if> </if>

View File

@@ -25,12 +25,16 @@
<result column="weakness" jdbcType="VARCHAR" property="weakness" /> <result column="weakness" jdbcType="VARCHAR" property="weakness" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" /> <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" /> <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
<result column="pass_cause" jdbcType="VARCHAR" property="passCause" />
<result column="pass_time" jdbcType="TIMESTAMP" property="passTime" />
<result column="pass_user" jdbcType="VARCHAR" property="passUser" />
<result column="pass_certify-file" jdbcType="VARCHAR" property="passCertifyFile" />
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
id, partner_id, partner_line_id, live_area, want_shop_area, accept_adjust_type, is_have_want_shop, id, partner_id, partner_line_id, live_area, want_shop_area, accept_adjust_type, is_have_want_shop,
want_shop_info, max_budget, money_source, money_prove, education, work_year, is_have_work_exp, want_shop_info, max_budget, money_source, money_prove, education, work_year, is_have_work_exp,
work_exp, is_consumer, other_band, brand_strength, need_improve, strength, weakness, work_exp, is_consumer, other_band, brand_strength, need_improve, strength, weakness,
create_time, update_time create_time, update_time,pass_cause,pass_time,pass_user,pass_certify-file
</sql> </sql>
<select id="selectByPrimaryKeySelective" resultMap="BaseResultMap"> <select id="selectByPrimaryKeySelective" resultMap="BaseResultMap">
select select

View File

@@ -188,10 +188,11 @@
<select id="getInterviewCount" resultType="com.cool.store.dto.partner.SpecialDateRangeInterviewCountDTO"> <select id="getInterviewCount" resultType="com.cool.store.dto.partner.SpecialDateRangeInterviewCountDTO">
select select
sum(if(interview_date=#{currentDate},1,0)) as currentDayInterviewCount, ifnull(sum(if(interview_date=#{currentDate},1,0)),0) as currentDayInterviewCount,
sum(if(start_time>#{startTime} and #{endTime},1,0)) as lastSevenDayInterviewCount ifnull(sum(if(start_time>#{startTime} and #{endTime},1,0)),0) as lastSevenDayInterviewCount
FROM hy_partner_interview_plan FROM hy_partner_interview_plan
where interviewer = #{userId} where interviewer = #{userId}
and application_approved = 0
</select> </select>
<select id="getInterviewPlanList" resultMap="BaseResultMap"> <select id="getInterviewPlanList" resultMap="BaseResultMap">
@@ -204,6 +205,7 @@
and interview_date = #{currentDate} and interview_date = #{currentDate}
</if> </if>
and (start_time>now() or (start_time<![CDATA[<]]>now() and room_status!=2)) and (start_time>now() or (start_time<![CDATA[<]]>now() and room_status!=2))
and application_approved = 0
order by start_time order by start_time
</where> </where>
</select> </select>
@@ -229,11 +231,8 @@
<if test="userId!=null and userId!=''"> <if test="userId!=null and userId!=''">
and a.interviewer = #{userId} and a.interviewer = #{userId}
</if> </if>
<if test="workflowStage!=null and workflowStage!=''">
and a.workflow_stage= #{workflowStage}
</if>
<if test="workflowStatus!=null and workflowStatus!=''"> <if test="workflowStatus!=null and workflowStatus!=''">
and a.workflow_status = #{workflowStatus} and a.status = #{workflowStatus}
</if> </if>
</where> </where>
</select> </select>

View File

@@ -264,6 +264,7 @@
<select id="selectStagePendingCount" resultType="com.cool.store.dto.partner.StageCountDTO"> <select id="selectStagePendingCount" resultType="com.cool.store.dto.partner.StageCountDTO">
select select
IFNULL(sum(if(workflow_stage=1 and workflow_status = 1,1,0)),0) as intentApplyApproveCount, IFNULL(sum(if(workflow_stage=1 and workflow_status = 1,1,0)),0) as intentApplyApproveCount,
IFNULL(sum(if(workflow_stage=2 and workflow_status = 1,1,0)),0) as reservationInterviewCount,
IFNULL(sum(if(workflow_stage=3 and workflow_status = 3,1,0)),0) as qualifiedInterviewCount IFNULL(sum(if(workflow_stage=3 and workflow_status = 3,1,0)),0) as qualifiedInterviewCount
from hy_partner_line_info from hy_partner_line_info
<where> <where>
@@ -462,4 +463,12 @@
</where> </where>
</select> </select>
<select id="getLineFollowHistoryList" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List"></include>
FROM hy_partner_line_info
where deleted = 1
and partner_id = #{partner_id}
</select>
</mapper> </mapper>

View File

@@ -0,0 +1,21 @@
package com.cool.store.dto.partner;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @Author suzhuhong
* @Date 2023/6/16 17:38
* @Version 1.0
*/
@Data
public class InviteCodeDetailDTO {
@ApiModelProperty("推荐加盟商名称")
private String partnerName;
@ApiModelProperty("推荐加盟商手机号码")
private String partnerPhone;
@ApiModelProperty("邀请码")
private String inviteCode;
@ApiModelProperty("门店名称")
private String storeName;
}

View File

@@ -86,4 +86,16 @@ public class HyPartnerIntentInfoDO implements Serializable {
@ApiModelProperty("更新时间") @ApiModelProperty("更新时间")
private Date updateTime; private Date updateTime;
@ApiModelProperty("通过原因")
private String passCause;
@ApiModelProperty("通过时间")
private Date passTime;
@ApiModelProperty("通过人ID")
private String passUser;
@ApiModelProperty("通过证明")
private String passCertifyFile;
} }

View File

@@ -88,4 +88,19 @@ public class PartnerIntentInfoVO {
@ApiModelProperty("创建时间") @ApiModelProperty("创建时间")
private Date createTime; private Date createTime;
@ApiModelProperty("通过原因")
private String passCause;
@ApiModelProperty("通过时间")
private Date passTime;
@ApiModelProperty("通过人名称")
private String passUserName;
@ApiModelProperty("通过人ID")
private String passUserId;
@ApiModelProperty("通过证明")
private String passCertifyFile;
} }

View File

@@ -17,7 +17,8 @@ import java.util.Date;
public class PartnerLineInfoVO { public class PartnerLineInfoVO {
@ApiModelProperty("") @ApiModelProperty("")
private Long id; private Long lineId;
@ApiModelProperty("hy_partner_user_info.partner_id") @ApiModelProperty("hy_partner_user_info.partner_id")
private String partnerId; private String partnerId;

View File

@@ -106,5 +106,12 @@ public interface HyPartnerLineInfoService {
PartnerLineBaseInfoVO getPartnerLinBaseInfo(String partnerId); PartnerLineBaseInfoVO getPartnerLinBaseInfo(String partnerId);
/**
* 跟进历史
* @param partnerId
* @return
*/
List<LineFollowHistoryVO> getLineFollowHistory(String partnerId);
} }

View File

@@ -21,7 +21,7 @@ public interface OpenAreaService {
* @param keyword * @param keyword
* @return * @return
*/ */
List<OpenAreaTreeVO> queryByKeyword(String keyword,Boolean flag); List<OpenAreaTreeVO> queryByKeyword(String keyword,String areaStatus,Boolean flag);
/** /**

View File

@@ -1,6 +1,7 @@
package com.cool.store.service; package com.cool.store.service;
import com.cool.store.entity.HyPartnerUserInfoDO; import com.cool.store.entity.HyPartnerUserInfoDO;
import com.cool.store.vo.InviteCodeDetailVO;
public interface PartnerUserInfoService { public interface PartnerUserInfoService {
@@ -9,4 +10,6 @@ public interface PartnerUserInfoService {
Boolean queryJoinNotice(String partnerId); Boolean queryJoinNotice(String partnerId);
Boolean completeJoinNotice(String partnerId); Boolean completeJoinNotice(String partnerId);
InviteCodeDetailVO selectInviteCodeDetail(String partnerId);
} }

View File

@@ -53,7 +53,7 @@ public class EnterpriseUserServiceImpl implements EnterpriseUserService {
List<String> regionIds = userRegionMappingDAO.getRegionIdsByUserId(userId); List<String> regionIds = userRegionMappingDAO.getRegionIdsByUserId(userId);
//所有绑定了战区的组织机构 //所有绑定了战区的组织机构
List<String> list = zoneService.queryAllBingZoneRegionList("intend"); List<String> list = zoneService.queryAllBingZoneRegionList("intent");
HashSet<String> regionList = new HashSet<>(); HashSet<String> regionList = new HashSet<>();
regionIds.forEach(x->{ regionIds.forEach(x->{
if (list.contains(x)){ if (list.contains(x)){

View File

@@ -3,11 +3,9 @@ package com.cool.store.service.impl;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.bean.BeanUtil;
import com.cool.store.constants.CommonConstants; import com.cool.store.constants.CommonConstants;
import com.cool.store.dao.HyPartnerBaseInfoDAO; import com.cool.store.dao.*;
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.dto.partner.PartnerIntentApplyInfoDTO;
import com.cool.store.entity.EnterpriseUserDO;
import com.cool.store.entity.HyPartnerIntentInfoDO; import com.cool.store.entity.HyPartnerIntentInfoDO;
import com.cool.store.entity.HyPartnerUserInfoDO; import com.cool.store.entity.HyPartnerUserInfoDO;
import com.cool.store.enums.ErrorCodeEnum; import com.cool.store.enums.ErrorCodeEnum;
@@ -61,7 +59,7 @@ public class HyPartnerIntentInfoServiceImpl implements HyPartnerIntentInfoServic
workflowStatus = WorkflowStatusEnum.INTERVIEW_5.getCode(); workflowStatus = WorkflowStatusEnum.INTERVIEW_5.getCode();
} }
PageHelper.startPage(pageNumber,pageSize); PageHelper.startPage(pageNumber,pageSize);
PageInfo partnerIntentApplyInfo = hyPartnerIntentInfoDAO.selectPartnerIntentApplyInfoList(userId, WorkflowStageEnum.INTENT.getCode(), workflowStatus); PageInfo partnerIntentApplyInfo = new PageInfo(hyPartnerIntentInfoDAO.selectPartnerIntentApplyInfoList(userId, WorkflowStageEnum.INTENT.getCode(), workflowStatus));
if (partnerIntentApplyInfo==null){ if (partnerIntentApplyInfo==null){
return new PageInfo<>(); return new PageInfo<>();
} }
@@ -101,6 +99,8 @@ public class HyPartnerIntentInfoServiceImpl implements HyPartnerIntentInfoServic
return Boolean.TRUE; return Boolean.TRUE;
} }
@Resource
EnterpriseUserDAO enterpriseUserDAO;
@Override @Override
public PartnerIntentInfoVO getPartnerIntentApplyDetail(Long lineId) { public PartnerIntentInfoVO getPartnerIntentApplyDetail(Long lineId) {
HyPartnerIntentInfoDO hyPartnerIntentInfoDO= hyPartnerIntentInfoDAO.selectByLineId(lineId); HyPartnerIntentInfoDO hyPartnerIntentInfoDO= hyPartnerIntentInfoDAO.selectByLineId(lineId);
@@ -108,6 +108,10 @@ public class HyPartnerIntentInfoServiceImpl implements HyPartnerIntentInfoServic
HyPartnerUserInfoDO hyPartnerUserInfoDO = hyPartnerUserInfoDAO.selectByPartnerId(hyPartnerIntentInfoDO.getPartnerId()); HyPartnerUserInfoDO hyPartnerUserInfoDO = hyPartnerUserInfoDAO.selectByPartnerId(hyPartnerIntentInfoDO.getPartnerId());
partnerIntentInfoVO.setPartnerUserName(hyPartnerUserInfoDO.getUsername()); partnerIntentInfoVO.setPartnerUserName(hyPartnerUserInfoDO.getUsername());
partnerIntentInfoVO.setPartnerUserPhone(hyPartnerUserInfoDO.getMobile()); partnerIntentInfoVO.setPartnerUserPhone(hyPartnerUserInfoDO.getMobile());
EnterpriseUserDO userInfo = enterpriseUserDAO.getUserInfoById(hyPartnerIntentInfoDO.getPassUser());
if (userInfo!=null){
partnerIntentInfoVO.setPassUserName(userInfo.getName());
}
//todo su 手机号归属地 意向申请区域名称 //todo su 手机号归属地 意向申请区域名称
return partnerIntentInfoVO; return partnerIntentInfoVO;
} }
@@ -210,6 +214,10 @@ public class HyPartnerIntentInfoServiceImpl implements HyPartnerIntentInfoServic
partnerIntentInfoVO.setOtherBand(hyPartnerIntentInfoDO.getOtherBand()); partnerIntentInfoVO.setOtherBand(hyPartnerIntentInfoDO.getOtherBand());
partnerIntentInfoVO.setStrength(hyPartnerIntentInfoDO.getStrength()); partnerIntentInfoVO.setStrength(hyPartnerIntentInfoDO.getStrength());
partnerIntentInfoVO.setNeedImprove(hyPartnerIntentInfoDO.getNeedImprove()); partnerIntentInfoVO.setNeedImprove(hyPartnerIntentInfoDO.getNeedImprove());
partnerIntentInfoVO.setPassCause(hyPartnerIntentInfoDO.getPassCause());
partnerIntentInfoVO.setPassCertifyFile(hyPartnerIntentInfoDO.getPassCertifyFile());
partnerIntentInfoVO.setPassUserId(hyPartnerIntentInfoDO.getPassUser());
partnerIntentInfoVO.setPassTime(hyPartnerIntentInfoDO.getPassTime());
return partnerIntentInfoVO; return partnerIntentInfoVO;
} }

View File

@@ -77,7 +77,7 @@ public class HyPartnerInterviewPlanServiceImpl implements HyPartnerInterviewPlan
} }
PageHelper.startPage(pageNumber,pageSize); PageHelper.startPage(pageNumber,pageSize);
//查询预约面试列表 //查询预约面试列表
PageInfo partnerInterviewInfoList = hyPartnerInterviewPlanDAO.getPartnerInterviewInfoList(userId, WorkflowStageEnum.RESERVATION.getCode(), workflowStatus); PageInfo partnerInterviewInfoList = new PageInfo(hyPartnerInterviewPlanDAO.getPartnerInterviewInfoList(userId, WorkflowStageEnum.RESERVATION.getCode(), workflowStatus));
List<PartnerInterviewInfoDTO> list = partnerInterviewInfoList.getList(); List<PartnerInterviewInfoDTO> list = partnerInterviewInfoList.getList();
if (CollectionUtils.isEmpty(list)){ if (CollectionUtils.isEmpty(list)){
return partnerInterviewInfoList; return partnerInterviewInfoList;
@@ -113,7 +113,7 @@ public class HyPartnerInterviewPlanServiceImpl implements HyPartnerInterviewPlan
PageHelper.startPage(pageNumber,pageSize); PageHelper.startPage(pageNumber,pageSize);
//查询预约面试列表 //查询预约面试列表
PageInfo partnerInterviewInfoList = hyPartnerInterviewPlanDAO.getPartnerInterviewInfoList(userId, WorkflowStageEnum.INTERVIEW.getCode(),workflowStatus); PageInfo partnerInterviewInfoList = new PageInfo(hyPartnerInterviewPlanDAO.getPartnerInterviewInfoList(userId, WorkflowStageEnum.INTERVIEW.getCode(),workflowStatus));
List<PartnerInterviewInfoDTO> list = partnerInterviewInfoList.getList(); List<PartnerInterviewInfoDTO> list = partnerInterviewInfoList.getList();
if (CollectionUtils.isEmpty(list)){ if (CollectionUtils.isEmpty(list)){
return partnerInterviewInfoList; return partnerInterviewInfoList;

View File

@@ -95,6 +95,7 @@ public class HyPartnerLineInfoServiceImpl implements HyPartnerLineInfoService {
list.stream().forEach(x->{ list.stream().forEach(x->{
PartnerLineInfoVO partnerLineInfoVO = new PartnerLineInfoVO(); PartnerLineInfoVO partnerLineInfoVO = new PartnerLineInfoVO();
BeanUtils.copyProperties(x,partnerLineInfoVO); BeanUtils.copyProperties(x,partnerLineInfoVO);
partnerLineInfoVO.setLineId(x.getId());
result.add(partnerLineInfoVO); result.add(partnerLineInfoVO);
}); });
hyPartnerLineInfoDOPageInfo.setList(result); hyPartnerLineInfoDOPageInfo.setList(result);
@@ -309,6 +310,23 @@ public class HyPartnerLineInfoServiceImpl implements HyPartnerLineInfoService {
return lineBaseInfoVO; return lineBaseInfoVO;
} }
@Override
public List<LineFollowHistoryVO> getLineFollowHistory(String partnerId) {
List<HyPartnerLineInfoDO> lineFollowHistoryList = hyPartnerLineInfoDAO.getLineFollowHistoryList(partnerId);
if (CollectionUtils.isEmpty(lineFollowHistoryList)){
return new ArrayList<>();
}
List<LineFollowHistoryVO> result = new ArrayList<>();
lineFollowHistoryList.forEach(x->{
LineFollowHistoryVO lineFollowHistoryVO = new LineFollowHistoryVO();
lineFollowHistoryVO.setCloseCause(x.getRejectPublicReason());
lineFollowHistoryVO.setCloseTime(x.getCloseTime());
lineFollowHistoryVO.setStartTime(x.getCreateTime());
result.add(lineFollowHistoryVO);
});
return result;
}
/** /**
* convertPartnerBlackListDTOToVo * convertPartnerBlackListDTOToVo
* @param partnerBlackListDTO * @param partnerBlackListDTO

View File

@@ -32,13 +32,13 @@ public class OpenAreaServiceImpl implements OpenAreaService {
@Override @Override
public List<OpenAreaTreeVO> queryByKeyword(String keyword,Boolean flag) { public List<OpenAreaTreeVO> queryByKeyword(String keyword,String areaStatus,Boolean flag) {
//先查出所有的一级菜单 //先查出所有的一级菜单
List<HyOpenAreaInfoDO> openArea = hyOpenAreaInfoDAO.queryFirstLevel(); List<HyOpenAreaInfoDO> openArea = hyOpenAreaInfoDAO.queryFirstLevel();
Map<Long, HyOpenAreaInfoDO> longHyOpenAreaInfoDOMap = openArea.stream().collect(Collectors.toMap(HyOpenAreaInfoDO::getId, x -> x)); Map<Long, HyOpenAreaInfoDO> longHyOpenAreaInfoDOMap = openArea.stream().collect(Collectors.toMap(HyOpenAreaInfoDO::getId, x -> x));
//查询关键字下所有的数据 原始的数据 //查询关键字下所有的数据 原始的数据
List<HyOpenAreaInfoDO> hyOpenAreaInfoDOS = hyOpenAreaInfoDAO.queryByKeyword(keyword,flag); List<HyOpenAreaInfoDO> hyOpenAreaInfoDOS = hyOpenAreaInfoDAO.queryByKeyword(keyword,areaStatus,flag);
Set<Long> longSet = hyOpenAreaInfoDOS.stream().map(HyOpenAreaInfoDO::getId).collect(Collectors.toSet()); Set<Long> longSet = hyOpenAreaInfoDOS.stream().map(HyOpenAreaInfoDO::getId).collect(Collectors.toSet());
List<HyOpenAreaInfoDO> result = new ArrayList<>(); List<HyOpenAreaInfoDO> result = new ArrayList<>();
@@ -66,7 +66,7 @@ public class OpenAreaServiceImpl implements OpenAreaService {
Map<Long, HyOpenAreaInfoDO> longHyOpenAreaInfoDOMap = openArea.stream().collect(Collectors.toMap(HyOpenAreaInfoDO::getId, x -> x)); Map<Long, HyOpenAreaInfoDO> longHyOpenAreaInfoDOMap = openArea.stream().collect(Collectors.toMap(HyOpenAreaInfoDO::getId, x -> x));
//查询关键字下所有的数据 原始的数据 //查询关键字下所有的数据 原始的数据
List<HyOpenAreaInfoDO> hyOpenAreaInfoDOS = hyOpenAreaInfoDAO.queryByKeyword(keyword,flag); List<HyOpenAreaInfoDO> hyOpenAreaInfoDOS = hyOpenAreaInfoDAO.queryByKeyword(keyword,null,flag);
Map<Long, HyOpenAreaInfoDO> hyMap = hyOpenAreaInfoDOS.stream().collect(Collectors.toMap(HyOpenAreaInfoDO::getId, x -> x)); Map<Long, HyOpenAreaInfoDO> hyMap = hyOpenAreaInfoDOS.stream().collect(Collectors.toMap(HyOpenAreaInfoDO::getId, x -> x));

View File

@@ -6,6 +6,7 @@ import com.cool.store.entity.HyPartnerUserInfoDO;
import com.cool.store.enums.ErrorCodeEnum; import com.cool.store.enums.ErrorCodeEnum;
import com.cool.store.exception.ServiceException; import com.cool.store.exception.ServiceException;
import com.cool.store.service.PartnerUserInfoService; import com.cool.store.service.PartnerUserInfoService;
import com.cool.store.vo.InviteCodeDetailVO;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
@@ -38,4 +39,18 @@ public class PartnerUserInfoServiceImpl implements PartnerUserInfoService {
hyPartnerUserInfoDAO.updateJoinKnowById(CommonConstants.ONE, hyPartnerUserInfoDO.getId()); hyPartnerUserInfoDAO.updateJoinKnowById(CommonConstants.ONE, hyPartnerUserInfoDO.getId());
return true; return true;
} }
@Override
public InviteCodeDetailVO selectInviteCodeDetail(String partnerId) {
HyPartnerUserInfoDO hyPartnerUserInfoDO = hyPartnerUserInfoDAO.selectByPartnerId(partnerId);
if (hyPartnerUserInfoDO==null){
throw new ServiceException(ErrorCodeEnum.PARTNER_USER_NOT_EXIST);
}
InviteCodeDetailVO inviteCodeDetailVO = new InviteCodeDetailVO();
inviteCodeDetailVO.setInviteCode(hyPartnerUserInfoDO.getInviteCode());
inviteCodeDetailVO.setStoreName(hyPartnerUserInfoDO.getRecommendPartnerName());
inviteCodeDetailVO.setPartnerPhone(hyPartnerUserInfoDO.getRecommendPartnerMobile());
inviteCodeDetailVO.setStoreName(hyPartnerUserInfoDO.getShopName());
return inviteCodeDetailVO;
}
} }

View File

@@ -78,7 +78,7 @@ public class TokenValidateFilter implements Filter {
String userStr = ""; String userStr = "";
LoginUserInfo currentUser = null; LoginUserInfo currentUser = null;
boolean isInWhiteList = excludePath(uri); boolean isInWhiteList = excludePath(uri);
String accessToken = reqs.getHeader("accessToken"); String accessToken = "1cd17699b7dc1f64161485c2d365e0e0";
String key = "access_token:" + accessToken; String key = "access_token:" + accessToken;
if(StringUtils.isNotBlank(accessToken)){ if(StringUtils.isNotBlank(accessToken)){
userStr = redisUtilPool.getString(key); userStr = redisUtilPool.getString(key);

View File

@@ -1,6 +1,7 @@
package com.cool.store.controller; package com.cool.store.controller;
import com.cool.store.context.CurrentUserHolder; import com.cool.store.context.CurrentUserHolder;
import com.cool.store.context.PartnerUserHolder;
import com.cool.store.dto.calendar.UserCalendarsEventDTO; import com.cool.store.dto.calendar.UserCalendarsEventDTO;
import com.cool.store.enums.LineStatusEnum; import com.cool.store.enums.LineStatusEnum;
import com.cool.store.exception.ApiException; import com.cool.store.exception.ApiException;
@@ -43,6 +44,8 @@ public class DeskController {
private ISVHttpRequest isvHttpRequest; private ISVHttpRequest isvHttpRequest;
@Resource @Resource
EnterpriseUserService enterpriseUserService; EnterpriseUserService enterpriseUserService;
@Resource
PartnerUserInfoService partnerUserInfoService;
@GetMapping(path = "/interviewSchedule") @GetMapping(path = "/interviewSchedule")
@@ -79,7 +82,7 @@ public class DeskController {
@GetMapping(path = "/queryStageCount") @GetMapping(path = "/queryStageCount")
@ApiOperation("招商经理视角====各阶段待处理待跟进数量") @ApiOperation("招商经理视角====各阶段待处理待跟进数量")
@ApiImplicitParams({ @ApiImplicitParams({
@ApiImplicitParam(name = "type", value = "类型 待处理-Pending 待跟进-follow", required = false), @ApiImplicitParam(name = "type", value = "类型 待处理-pending 待跟进-follow", required = false),
}) })
public ResponseResult<StageCountVO> queryStageCount(@RequestParam(value = "type",required = false)String type){ public ResponseResult<StageCountVO> queryStageCount(@RequestParam(value = "type",required = false)String type){
return ResponseResult.success(deskService.getStageCountByType(CurrentUserHolder.getUserId(),type)); return ResponseResult.success(deskService.getStageCountByType(CurrentUserHolder.getUserId(),type));
@@ -93,10 +96,10 @@ public class DeskController {
} }
@PostMapping(path = "/queryIntentApplyList") @GetMapping(path = "/queryIntentApplyList")
@ApiOperation("招商经理视角===意向申请审核列表") @ApiOperation("招商经理视角===意向申请审核列表")
@ApiImplicitParams({ @ApiImplicitParams({
@ApiImplicitParam(name = "type", value = "类型 待处理-Pending 待跟进-follow", required = false), @ApiImplicitParam(name = "type", value = "类型 待处理-pending 待跟进-follow", required = false),
@ApiImplicitParam(name = "pageNumber", value = "1", required = false), @ApiImplicitParam(name = "pageNumber", value = "1", required = false),
@ApiImplicitParam(name = "pageSize", value = "10", required = false), @ApiImplicitParam(name = "pageSize", value = "10", required = false),
}) })
@@ -108,7 +111,7 @@ public class DeskController {
} }
@PostMapping(path = "/querySubscribeInterviewTimeList") @GetMapping(path = "/querySubscribeInterviewTimeList")
@ApiOperation("招商经理视角===预约面试时间 列表") @ApiOperation("招商经理视角===预约面试时间 列表")
public ResponseResult<PageInfo<PartnerInterviewInfoVO>> querySubscribeInterviewTimeList(@RequestParam(value = "type",required = false)String type, public ResponseResult<PageInfo<PartnerInterviewInfoVO>> querySubscribeInterviewTimeList(@RequestParam(value = "type",required = false)String type,
@RequestParam(value = "pageNumber",required = false,defaultValue = "1")Integer pageNumber, @RequestParam(value = "pageNumber",required = false,defaultValue = "1")Integer pageNumber,
@@ -118,10 +121,10 @@ public class DeskController {
return ResponseResult.success(hyPartnerInterviewPlanService.getPartnerInterviewInfoList(userId,type,pageSize,pageNumber)); return ResponseResult.success(hyPartnerInterviewPlanService.getPartnerInterviewInfoList(userId,type,pageSize,pageNumber));
} }
@PostMapping(path = "/queryQualifiedInterviewList") @GetMapping(path = "/queryQualifiedInterviewList")
@ApiOperation("招商经理视角===合格资格面试 列表") @ApiOperation("招商经理视角===合格资格面试 列表")
@ApiImplicitParams({ @ApiImplicitParams({
@ApiImplicitParam(name = "type", value = "类型 待处理-Pending 待跟进-follow", required = false), @ApiImplicitParam(name = "type", value = "类型 待处理-pending 待跟进-follow", required = false),
}) })
public ResponseResult<PageInfo<PartnerInterviewInfoVO>> queryQualifiedInterviewList(@RequestParam(value = "type",required = false)String type, public ResponseResult<PageInfo<PartnerInterviewInfoVO>> queryQualifiedInterviewList(@RequestParam(value = "type",required = false)String type,
@RequestParam(value = "pageNumber",required = false,defaultValue = "1")Integer pageNumber, @RequestParam(value = "pageNumber",required = false,defaultValue = "1")Integer pageNumber,
@@ -156,10 +159,8 @@ public class DeskController {
@ApiImplicitParams({ @ApiImplicitParams({
@ApiImplicitParam(name = "partnerId", value = "partnerId", required = false), @ApiImplicitParam(name = "partnerId", value = "partnerId", required = false),
}) })
public ResponseResult<InviteCodeDetailVO> getInviteCodeDetail(@RequestParam(value = "partnerId",required = false)Long partnerId){ public ResponseResult<InviteCodeDetailVO> getInviteCodeDetail(@RequestParam(value = "partnerId",required = false)String partnerId){
return ResponseResult.success(partnerUserInfoService.selectInviteCodeDetail(partnerId));
return ResponseResult.success();
} }
@@ -168,10 +169,8 @@ public class DeskController {
@ApiImplicitParams({ @ApiImplicitParams({
@ApiImplicitParam(name = "partnerId", value = "partnerId", required = false), @ApiImplicitParam(name = "partnerId", value = "partnerId", required = false),
}) })
public ResponseResult<List<LineFollowHistoryVO>> getFollowHistory(@RequestParam(value = "partnerId",required = false)Long partnerId){ public ResponseResult<List<LineFollowHistoryVO>> getFollowHistory(@RequestParam(value = "partnerId",required = false)String partnerId){
return ResponseResult.success(hyPartnerLineInfoService.getLineFollowHistory(partnerId));
return ResponseResult.success();
} }
@@ -207,8 +206,7 @@ public class DeskController {
@PostMapping(path = "/queryPublicSeqLineList") @PostMapping(path = "/queryPublicSeqLineList")
@ApiOperation("公海列表") @ApiOperation("公海列表")
public ResponseResult<PageInfo<PublicSeaLineListVo>> queryPublicSeaLineList(@RequestBody LineRequest LineRequest){ public ResponseResult<PageInfo<PublicSeaLineListVo>> queryPublicSeaLineList(@RequestBody LineRequest LineRequest){
return ResponseResult.success(hyPartnerLineInfoService.publicSeaLineList(CurrentUserHolder.getUserId(),LineRequest));
return ResponseResult.success();
} }
@@ -248,6 +246,23 @@ public class DeskController {
return ResponseResult.success(hyPartnerLineInfoService.closeOrPassFollow(CurrentUserHolder.getUserId(),closeFollowRequest)); return ResponseResult.success(hyPartnerLineInfoService.closeOrPassFollow(CurrentUserHolder.getUserId(),closeFollowRequest));
} }
@GetMapping(path = "/queryPartnerBaseInfo")
@ApiOperation("查看意向申请书——用户基本信息")
@ApiImplicitParams({
@ApiImplicitParam(name = "lineId", value = "线索ID", required = false),
})
public ResponseResult<PartnerBaseInfoVO> queryPartnerBaseInfo(@RequestParam(value = "lineId",required = false)Long lineId){
PartnerUserInfoVO userInfoVO = PartnerUserHolder.getUser();
return ResponseResult.success(hyPartnerBaseInfoService.queryPartnerBaseInfo(userInfoVO.getPartnerId(), lineId));
}
@PostMapping(path = "/updatePartnerIntentInfo")
@ApiOperation("修改加盟商意向信息/行业认知")
public ResponseResult<Boolean> updatePartnerIntentInfo(@RequestBody PartnerIntentInfoRequest partnerIntentInfoRequest){
return ResponseResult.success(hyPartnerIntentInfoService.submitPartnerIntentInfo(partnerIntentInfoRequest));
}
@PostMapping(path = "/changeIntentInfo") @PostMapping(path = "/changeIntentInfo")
@ApiOperation("员工端变更C端用户意向信息") @ApiOperation("员工端变更C端用户意向信息")
public ResponseResult<Boolean> changeIntentInfo( @RequestBody BaseUserInfoRequest baseUserInfoRequest){ public ResponseResult<Boolean> changeIntentInfo( @RequestBody BaseUserInfoRequest baseUserInfoRequest){

View File

@@ -28,10 +28,12 @@ public class OpenAreaController {
@GetMapping(path = "/getOpenAreaTree") @GetMapping(path = "/getOpenAreaTree")
@ApiOperation("开放城市树-搜索城市 到第二节点") @ApiOperation("开放城市树-搜索城市 到第二节点")
@ApiImplicitParams({ @ApiImplicitParams({
@ApiImplicitParam(name = "keyword", value = "搜索关键字", required = false) @ApiImplicitParam(name = "keyword", value = "搜索关键字", required = false),
@ApiImplicitParam(name = "areaStatus", value = "状态 open-开放 keyOpen-重点开放 notOpen-未开放 saturated-已饱和", required = false)
}) })
public ResponseResult<List<OpenAreaTreeVO>> getOpenAreaTree(@RequestParam(value = "keyword",required = false)String keyword){ public ResponseResult<List<OpenAreaTreeVO>> getOpenAreaTree(@RequestParam(value = "keyword",required = false)String keyword,
return ResponseResult.success(openAreaService.queryByKeyword(keyword,Boolean.TRUE)); @RequestParam(value = "areaStatus",required = false)String areaStatus){
return ResponseResult.success(openAreaService.queryByKeyword(keyword,areaStatus,Boolean.TRUE));
} }