Merge branch 'dev/feat/partner1.6_20231226' into pre

This commit is contained in:
feng.li
2023-12-18 17:52:59 +08:00
34 changed files with 695 additions and 159 deletions

View File

@@ -1,7 +1,9 @@
package com.cool.store.enums;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import static com.cool.store.enums.OperateLogFieldValueEnum.*;
@@ -54,6 +56,15 @@ public enum OperateTypeEnum {
private List<OperateLogFieldValueEnum> filedList;
private static Map<String, OperateTypeEnum> operateTypeEnumMap;
static {
operateTypeEnumMap = new HashMap<>();
for (OperateTypeEnum operateTypeEnum : OperateTypeEnum.values()) {
operateTypeEnumMap.put(operateTypeEnum.getCode(), operateTypeEnum);
}
}
OperateTypeEnum(String code, String name, List<OperateLogFieldValueEnum> filedList) {
this.code = code;
this.name = name;
@@ -71,4 +82,8 @@ public enum OperateTypeEnum {
public List<OperateLogFieldValueEnum> getFiledList() {
return filedList;
}
public static OperateTypeEnum getOperateTypeEnum(String code) {
return operateTypeEnumMap.get(code);
}
}

View File

@@ -18,7 +18,9 @@ public enum SMSMsgEnum {
SMS_INVATE("短信邀约", "【沪上阿姨】感谢您对沪上阿姨品牌的关注与支持,您可通过链接登记加盟申请信息,我们的客户经理将在第一时间与您联系。{$var}", "d7772108bb7d9767494818bcd39d2ec1"),
EXHIBITION_INFO_UPDATE("展会信息变更","【沪上阿姨】亲爱的伙伴,您好!您近期报名的加盟推介会信息有更新。名称为{$var},日期为{$var},地址为{$var}。感谢您的关注,期待早日与您合作!{$var}","d7772108bb7d9767494818bcd39d2ec1")
EXHIBITION_INFO_UPDATE("展会信息变更","【沪上阿姨】亲爱的伙伴,您好!您近期报名的加盟推介会信息有更新。名称为{$var},日期为{$var},地址为{$var}。感谢您的关注,期待早日与您合作!{$var}","d7772108bb7d9767494818bcd39d2ec1"),
EXHIBITION_CLOSE("展会结束","【沪上阿姨】亲爱的伙伴,您好!非常感谢您报名和参加我们的加盟推介会,若您想继续咨询合作事项,仍可微信联系您的客户经理为您解答。沪上阿姨祝您返程顺利,早日开店!","d7772108bb7d9767494818bcd39d2ec1")
;
private String title;

View File

@@ -5,9 +5,9 @@ import com.cool.store.dto.exhibition.ExhibitionStatisticsDTO;
import com.cool.store.entity.HyExhibitionDO;
import com.cool.store.mapper.HyExhibitionMapper;
import com.cool.store.utils.StringUtil;
import io.swagger.models.auth.In;
import com.cool.store.vo.exhibition.PartnerExhibitionInfoVO;
import com.cool.store.vo.exhibition.PartnerExhibitionListVO;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import javax.annotation.Resource;
@@ -101,15 +101,35 @@ public class HyExhibitionDAO {
return result.stream().collect(Collectors.toMap(ExhibitionStatisticsDTO::getExhibitionCode, date -> date));
}
public List<ExhibitionDTO> listByExhibitionGroupIds(List<Integer> exhibitionGroupIdList){
public List<ExhibitionDTO> listByExhibitionGroupIds(List<Integer> exhibitionGroupIdList,Boolean filterCloseExhibition){
if (CollectionUtils.isEmpty(exhibitionGroupIdList)){
return new ArrayList<>();
}
return hyExhibitionMapper.listByExhibitionGroupIds(exhibitionGroupIdList);
return hyExhibitionMapper.listByExhibitionGroupIds(exhibitionGroupIdList,filterCloseExhibition);
}
public Integer lineSignUpCount(Integer exhibitionGroupId, Long lineId){
return hyExhibitionMapper.lineSignUpCount(exhibitionGroupId,lineId);
}
public List<HyExhibitionDO> listByExhibitionGroupId(Integer exhibitionGroupId,Boolean includeClose){
if (exhibitionGroupId==null){
return new ArrayList<>();
}
return hyExhibitionMapper.listByExhibitionGroupId(exhibitionGroupId,includeClose);
}
public List<PartnerExhibitionListVO> getPartnerExhibitionList(Long partnerLineId) {
if (partnerLineId == null) {
return new ArrayList<>();
}
return hyExhibitionMapper.getPartnerExhibitionList(partnerLineId);
}
public PartnerExhibitionInfoVO getPartnerExhibitionInfo(Integer exhibitionId, Long partnerLineId) {
if (exhibitionId == null || partnerLineId == null) {
return new PartnerExhibitionInfoVO();
}
return hyExhibitionMapper.getPartnerExhibitionInfo(exhibitionId, partnerLineId);
}
}

View File

@@ -2,10 +2,12 @@ package com.cool.store.dao;
import com.cool.store.dto.exhibition.ExhibitionLineBaseDTO;
import com.cool.store.dto.exhibition.ExhibitionLineDTO;
import com.cool.store.dto.exhibition.PartnerSignUpDTO;
import com.cool.store.entity.HyExhibitionDO;
import com.cool.store.entity.HyPartnerExhibitionDO;
import com.cool.store.entity.HyPartnerExhibitionInterviewDO;
import com.cool.store.mapper.HyPartnerExhibitionMapper;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.ObjectUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Repository;
@@ -135,7 +137,10 @@ public class HyPartnerExhibitionDAO {
return hyPartnerExhibitionMapper.getPartnerExhibition(exhibitionId,lindId);
}
public Integer partnerSignUpCount(Long lineId){
return hyPartnerExhibitionMapper.partnerSignUpCount(lineId);
public List<PartnerSignUpDTO> partnerSignUpCount(List<Long> lineIds){
if (CollectionUtils.isEmpty(lineIds)){
return new ArrayList<>();
}
return hyPartnerExhibitionMapper.partnerSignUpCount(lineIds);
}
}

View File

@@ -4,6 +4,7 @@ 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 org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
@@ -85,5 +86,4 @@ public class HyPartnerIntentInfoDAO {
return hyPartnerIntentInfoMapper.updateAcquaintanceFlag(id,acquaintanceFlag,acquaintanceName,acquaintanceRelationshipType,otherRelationshipType);
}
}

View File

@@ -5,6 +5,7 @@ import com.cool.store.constants.CommonConstants;
import com.cool.store.dto.partner.*;
import com.cool.store.entity.HyPartnerLineInfoDO;
import com.cool.store.mapper.HyPartnerLineInfoMapper;
import com.cool.store.request.PrivateSeaLineListRequest;
import com.cool.store.vo.LinePageInfoVo;
import com.google.common.collect.Lists;
import org.apache.commons.collections4.CollectionUtils;
@@ -135,14 +136,8 @@ public class HyPartnerLineInfoDAO {
return hyPartnerLineInfoMapper.getPublicSeaLineList(userNameKeyword,phoneKeyword,intentAreaName,acceptAdjustType,updateStartTime,updateEndTime,userIdList, createStartTime, createEndTime);
}
public List<PrivateSeaLineDTO> getPrivateSeaLineList(String keyword, String keywordType, String workflowStage, String workflowStatus, String deadlineStart, String deadlineEnd,
String intentAreaName, Integer acceptAdjustType, String storeKeyword, String storeKeywordType, List<String> userIdList,
List<String> developmentManagerList,List<Long> userPortraitIdList,List<Long> userChannelIdList, String updateStartTime, String updateEndTime
,String partnerName,String partnerMobile,String investmentManagerId,String userPortraitQueryType
,String intentAreaQueryType,String lineStartTime,String lineEndTime,String userChannelQueryType,String sortField,String sortOrder){
return hyPartnerLineInfoMapper.getPrivateSeaLineList( keyword, keywordType, workflowStage, workflowStatus, deadlineStart, deadlineEnd,
intentAreaName, acceptAdjustType, storeKeyword, storeKeywordType, userIdList,developmentManagerList,userPortraitIdList,userChannelIdList, updateStartTime, updateEndTime
,partnerName,partnerMobile,investmentManagerId,userPortraitQueryType,intentAreaQueryType,lineStartTime,lineEndTime,userChannelQueryType,sortField,sortOrder);
public List<PrivateSeaLineDTO> getPrivateSeaLineList(PrivateSeaLineListRequest request){
return hyPartnerLineInfoMapper.getPrivateSeaLineList(request);
}
@@ -217,29 +212,30 @@ public class HyPartnerLineInfoDAO {
return hyPartnerLineInfoMapper.getPublicSeaPageInfoNext(lineId,userNameKeyword,phoneKeyword,intentAreaName,acceptAdjustType,updateStartTime,updateEndTime,userIdList, createStartTime, createEndTime,pageTurn,limit1,limit2);
}
public List<LinePageInfoVo> getPrivateSeaPageInfoNext(Long lineId,String keyword, String keywordType, String workflowStage, String workflowStatus, String deadlineStart, String deadlineEnd,
String intentAreaName, Integer acceptAdjustType, String storeKeyword, String storeKeywordType, List<String> userIdList,
List<String> developmentManagerList,List<Long> userPortraitIdList,List<Long> userChannelIdList, String updateStartTime, String updateEndTime
,String partnerName,String partnerMobile,String investmentManagerId,String userPortraitQueryType
,String intentAreaQueryType,String lineStartTime,String lineEndTime,String userChannelQueryType,String sortField,String sortOrder,Integer limit1,Integer limit2){
return hyPartnerLineInfoMapper.getPrivateSeaPageInfoNext(lineId,keyword, keywordType, workflowStage, workflowStatus, deadlineStart, deadlineEnd,
intentAreaName, acceptAdjustType, storeKeyword, storeKeywordType, userIdList,developmentManagerList,userPortraitIdList,userChannelIdList, updateStartTime, updateEndTime
,partnerName,partnerMobile,investmentManagerId,userPortraitQueryType,intentAreaQueryType,lineStartTime,lineEndTime,userChannelQueryType,sortField,sortOrder,limit1,limit2);
public List<LinePageInfoVo> getPrivateSeaPageInfoNext(PrivateSeaLineListRequest request){
return hyPartnerLineInfoMapper.getPrivateSeaPageInfoNext(request);
}
public List<LineInterviewDTO> lineInterviewList(List<Integer> lineIds){
public List<LineInterviewDTO> lineInterviewList(List<Long> lineIds){
if (CollectionUtils.isEmpty(lineIds)){
return new ArrayList<>();
}
return hyPartnerLineInfoMapper.lineInterviewList(lineIds);
}
public List<LineInterviewDTO> lineInvestmentList(List<Integer> lineIds){
public List<LineInterviewDTO> lineInvestmentList(List<Long> lineIds){
if (CollectionUtils.isEmpty(lineIds)){
return new ArrayList<>();
}
return hyPartnerLineInfoMapper.lineInvestmentList(lineIds);
}
public int batchUpdate(List<HyPartnerLineInfoDO> records){
if (CollectionUtils.isEmpty(records)){
return -1;
}
return hyPartnerLineInfoMapper.batchUpdate(records);
}
}

View File

@@ -1,11 +1,13 @@
package com.cool.store.mapper;
import com.cool.store.entity.DingdingUserDO;
import org.apache.ibatis.annotations.Mapper;
/**
* @author zhangchenbiao
* @date 2023-06-15 10:03
*/
@Mapper
public interface DingdingUserMapper {
/**
*

View File

@@ -3,9 +3,9 @@ package com.cool.store.mapper;
import com.cool.store.dto.exhibition.ExhibitionDTO;
import com.cool.store.dto.exhibition.ExhibitionStatisticsDTO;
import com.cool.store.entity.HyExhibitionDO;
import io.swagger.models.auth.In;
import com.cool.store.vo.exhibition.PartnerExhibitionInfoVO;
import com.cool.store.vo.exhibition.PartnerExhibitionListVO;
import org.apache.ibatis.annotations.Param;
import tk.mybatis.mapper.common.Mapper;
import java.util.List;
@@ -54,8 +54,31 @@ public interface HyExhibitionMapper {
List<ExhibitionStatisticsDTO> exhibitionStatistic(@Param("list") List<String> exhibitionCodeList);
List<ExhibitionDTO> listByExhibitionGroupIds(@Param("list") List<Integer> exhibitionGroupIdList);
List<ExhibitionDTO> listByExhibitionGroupIds(@Param("list") List<Integer> exhibitionGroupIdList, @Param("filterCloseExhibition") Boolean filterCloseExhibition);
Integer lineSignUpCount(@Param("exhibitionGroupId") Integer exhibitionGroupId, @Param("lineId") Long lineId);
/**
* 查询展会组下展会 (参数控制是否包含关闭的展会)
* @param exhibitionGroupId
* @param includeClose true-包含 false-不包含
* @return
*/
List<HyExhibitionDO> listByExhibitionGroupId(@Param("exhibitionGroupId") Integer exhibitionGroupId, @Param("includeClose") Boolean includeClose);
/**
* 获取线索报名参加的会销列表
* @param partnerLineId
* @return
*/
List<PartnerExhibitionListVO> getPartnerExhibitionList(@Param("partnerLineId") Long partnerLineId);
/**
* 获取线索报名的会销详情
*
* @param exhibitionId
* @param partnerLineId
* @return
*/
PartnerExhibitionInfoVO getPartnerExhibitionInfo(@Param("exhibitionId") Integer exhibitionId, @Param("partnerLineId") Long partnerLineId);
}

View File

@@ -2,6 +2,7 @@ package com.cool.store.mapper;
import com.cool.store.dto.exhibition.ExhibitionLineBaseDTO;
import com.cool.store.dto.exhibition.ExhibitionLineDTO;
import com.cool.store.dto.exhibition.PartnerSignUpDTO;
import com.cool.store.entity.HyExhibitionDO;
import com.cool.store.entity.HyPartnerExhibitionDO;
import io.swagger.models.auth.In;
@@ -102,5 +103,5 @@ public interface HyPartnerExhibitionMapper {
* @param lineId
* @return
*/
Integer partnerSignUpCount(@Param("lineId") Long lineId );
List<PartnerSignUpDTO> partnerSignUpCount(@Param("lineIds") List<Long> lineIds );
}

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.StageCountDTO;
import com.cool.store.entity.HyPartnerLineInfoDO;
import com.cool.store.request.PrivateSeaLineListRequest;
import com.cool.store.vo.LinePageInfoVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@@ -169,32 +170,7 @@ public interface HyPartnerLineInfoMapper {
*
* @return
*/
List<PrivateSeaLineDTO> getPrivateSeaLineList(@Param("keyword") String keyword,
@Param("keywordType") String keywordType,
@Param("workflowStage") String workflowStage,
@Param("workflowStatus") String workflowStatus,
@Param("deadlineStart") String deadlineStart,
@Param("deadlineEnd") String deadlineEnd,
@Param("intentAreaName") String intentAreaName,
@Param("acceptAdjustType") Integer acceptAdjustType,
@Param("storeKeyword") String storeKeyword,
@Param("storeKeywordType") String storeKeywordType,
@Param("userIdList") List<String> userIdList,
@Param("developmentManagerList") List<String> developmentManagerList,
@Param("userPortraitIdList") List<Long> userPortraitIdList,
@Param("userChannelIdList") List<Long> userChannelIdList,
@Param("updateStartTime") String updateStartTime,
@Param("updateEndTime") String updateEndTime,
@Param("partnerName") String partnerName,
@Param("partnerMobile") String partnerMobile,
@Param("investmentManagerId") String investmentManagerId,
@Param("userPortraitQueryType") String userPortraitQueryType,
@Param("intentAreaQueryType") String intentAreaQueryType,
@Param("lineStartTime") String lineStartTime,
@Param("lineEndTime") String lineEndTime,
@Param("userChannelQueryType") String userChannelQueryType,
@Param("sortField") String sortField,
@Param("sortOrder") String sortOrder);
List<PrivateSeaLineDTO> getPrivateSeaLineList(PrivateSeaLineListRequest request);
/**
@@ -273,35 +249,7 @@ public interface HyPartnerLineInfoMapper {
*
* @return
*/
List<LinePageInfoVo> getPrivateSeaPageInfoNext(@Param("lineId") Long lineId,@Param("keyword") String keyword,
@Param("keywordType") String keywordType,
@Param("workflowStage") String workflowStage,
@Param("workflowStatus") String workflowStatus,
@Param("deadlineStart") String deadlineStart,
@Param("deadlineEnd") String deadlineEnd,
@Param("intentAreaName") String intentAreaName,
@Param("acceptAdjustType") Integer acceptAdjustType,
@Param("storeKeyword") String storeKeyword,
@Param("storeKeywordType") String storeKeywordType,
@Param("userIdList") List<String> userIdList,
@Param("developmentManagerList") List<String> developmentManagerList,
@Param("userPortraitIdList") List<Long> userPortraitIdList,
@Param("userChannelIdList") List<Long> userChannelIdList,
@Param("updateStartTime") String updateStartTime,
@Param("updateEndTime") String updateEndTime,
@Param("partnerName") String partnerName,
@Param("partnerMobile") String partnerMobile,
@Param("investmentManagerId") String investmentManagerId,
@Param("userPortraitQueryType") String userPortraitQueryType,
@Param("intentAreaQueryType") String intentAreaQueryType,
@Param("lineStartTime") String lineStartTime,
@Param("lineEndTime") String lineEndTime,
@Param("userChannelQueryType") String userChannelQueryType,
@Param("sortField") String sortField,
@Param("sortOrder") String sortOrder,
@Param("limit1") Integer limit1,
@Param("limit2") Integer limit2
);
List<LinePageInfoVo> getPrivateSeaPageInfoNext(PrivateSeaLineListRequest request);
List<LinePageInfoVo> getPublicSeaPageInfoNext(@Param("lineId") Long lineId,@Param("userNameKeyword") String userNameKeyword,
@Param("phoneKeyword") String phoneKeyword,
@@ -323,12 +271,14 @@ public interface HyPartnerLineInfoMapper {
* @param list
* @return
*/
List<LineInterviewDTO> lineInterviewList(@Param("list") List<Integer> list);
List<LineInterviewDTO> lineInterviewList(@Param("list") List<Long> list);
/**
* 查询线索招商经理信息
* @param list
* @return
*/
List<LineInterviewDTO> lineInvestmentList(@Param("list") List<Integer> list);
List<LineInterviewDTO> lineInvestmentList(@Param("list") List<Long> list);
int batchUpdate(@Param("records") List<HyPartnerLineInfoDO> records);
}

View File

@@ -49,4 +49,11 @@ public interface HyPartnerTaskInfoLogMapper {
* @return
*/
int deleteByLineId(@Param("partnerLineId") Long partnerLineId, @Param("message") String message);
/**
* 获取通用信息需要的最新一条线索操作日志
* @param partnerLineId
* @return
*/
HyPartnerTaskInfoLogDO getLastTipsLog(@Param("lineId") Long partnerLineId);
}

View File

@@ -276,6 +276,9 @@
<foreach collection="list" item="groupId" open="and exhibition_group_id in (" separator="," close=")">
#{groupId}
</foreach>
<if test="filterCloseExhibition">
and closed_type = 0
</if>
</where>
order by id asc
</select>
@@ -284,7 +287,7 @@
<select id="lineSignUpCount" resultType="java.lang.Integer">
select count(1) from hy_exhibition a left join hy_partner_exhibition b on a.id = b.exhibition_id
<where>
and b.participation_status!=7
and b.participation_status!=7 and a.closed_type = 0
<if test="exhibitionGroupId!=null">
and a.exhibition_group_id = #{exhibitionGroupId}
</if>
@@ -294,6 +297,16 @@
</where>
</select>
<select id="listByExhibitionGroupId" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from hy_exhibition
where exhibition_group_id = #{exhibitionGroupId}
<if test="includeClose==false">
and closed_type = 0
</if>
</select>
<select id="exhibitionStatistic" resultType="com.cool.store.dto.exhibition.ExhibitionStatisticsDTO">
select
@@ -359,4 +372,37 @@
</if>
</trim>
</sql>
<select id="getPartnerExhibitionList" resultType="com.cool.store.vo.exhibition.PartnerExhibitionListVO">
SELECT
t2.id AS exhibitionId,
t2.exhibition_code AS exhibitionCode,
t2.exhibition_name AS exhibitionName,
t2.start_date AS exhibitionDate
FROM `hy_partner_exhibition` t1
INNER JOIN `hy_exhibition` t2 ON t1.exhibition_id = t2.id
WHERE t1.deleted = 0
AND t2.deleted = 0
AND t1.participation_status != 7
AND t2.closed_type = 0
AND t1.partner_line_id = #{partnerLineId}
</select>
<select id="getPartnerExhibitionInfo" resultType="com.cool.store.vo.exhibition.PartnerExhibitionInfoVO">
SELECT
t1.id AS exhibitionId,
t1.exhibition_code AS exhibitionCode,
t1.exhibition_name AS exhibitionName,
t1.start_date AS exhibitionDate,
t1.location AS exhibitionPosition
FROM `hy_exhibition` t1
INNER JOIN `hy_partner_exhibition` t2 ON t1.id = t2.exhibition_id
WHERE t1.deleted = 0
AND t1.closed_type = 0
AND t2.deleted = 0
AND t2.participation_status != 7
AND t2.partner_line_id = #{partnerLineId}
AND t1.id = #{exhibitionId}
</select>
</mapper>

View File

@@ -144,6 +144,7 @@
<select id="getExhibitionLine" resultType="com.cool.store.dto.exhibition.ExhibitionLineDTO">
select
hpe.partner_id as partnerId,
hpe.partner_line_id as lineId,
hpe.exhibition_id as exhibitionId,
pu.username as partnerName,
pu.mobile as mobile
@@ -447,11 +448,16 @@
</where>
</select>
<select id="partnerSignUpCount" resultType="java.lang.Integer">
select count(1) from hy_partner_exhibition a left join hy_exhibition b on a.exhibition_id = b.id
where a.participation_status != 7 and b.closed_type!=0
<if test="lineId!=null">
and a.partner_line_id = #{lineId}
</if>
<select id="partnerSignUpCount" resultType="com.cool.store.dto.exhibition.PartnerSignUpDTO">
select
a.partner_line_id as lineId ,
count(1) as count
from hy_partner_exhibition a
left join hy_exhibition b on a.exhibition_id = b.id
where a.participation_status != 7 and b.closed_type=0
<foreach collection="lineIds" item="lineId" open="and a.partner_line_id in (" separator="," close=")">
#{lineId}
</foreach>
group by a.partner_line_id
</select>
</mapper>

View File

@@ -1060,4 +1060,18 @@
</where>
</select>
<update id="batchUpdate">
update hy_partner_line_info
set whether_in_exhibition = CASE id
<foreach collection="records" item="record">
WHEN #{record.id} THEN #{record.whetherInExhibition}
</foreach>
END
<foreach collection="records" item="record" open="where id in (" separator="," close=")">
#{record.id}
</foreach>
</update>
</mapper>

View File

@@ -164,4 +164,22 @@
update hy_partner_task_info_log set deleted = '1', message = #{message} where partner_line_id= #{partnerLineId}
</update>
<select id="getLastTipsLog" resultType="com.cool.store.entity.HyPartnerTaskInfoLogDO">
SELECT <include refid="Base_Column_List"></include>, <include refid="Blob_Column_List"></include>
FROM `hy_partner_task_info_log`
WHERE deleted = 0
AND partner_line_id = #{lineId}
AND operate_type IN (
'interview_appointment',
'interview_appointment_agreement',
'auto_open_interview',
'interviewer_book_interview',
'modify_interview_time',
'finish_interview',
'create_qualifyverify',
'exhibition_create_qualifyverify'
)
ORDER BY create_time DESC LIMIT 1
</select>
</mapper>

View File

@@ -18,7 +18,7 @@ public class ExhibitionLineDTO {
private String exhibitionId;
private Integer lineId;
private Long lineId;
private Integer wantShopArea;

View File

@@ -0,0 +1,17 @@
package com.cool.store.dto.exhibition;
import lombok.Data;
/**
* @Author suzhuhong
* @Date 2023/12/13 13:25
* @Version 1.0
*/
@Data
public class PartnerSignUpDTO {
private Long lineId;
private Integer count;
}

View File

@@ -10,7 +10,7 @@ import lombok.Data;
@Data
public class LineInterviewDTO {
private Integer lineId;
private Long lineId;
private String investmentManager;

View File

@@ -119,4 +119,7 @@ public class CreateQualifyVerifyReq {
@ApiModelProperty(value = "实控人手机号", required = true)
private String skrPhone;
@ApiModelProperty(value = "是否由会销发起审批", required = false)
private Boolean whetherExhibition;
}

View File

@@ -106,5 +106,17 @@ public class PrivateSeaLineListRequest extends PageInfoRequest {
@ApiModelProperty("排序顺序")
private String pageTurn;
@ApiModelProperty("招商经理用户ids")
private List<String> userIdList;
@ApiModelProperty("开发经理用户ids")
private List<String> developmentManagerList;
private String intentAreaName;
private Integer limit1;
private Integer limit2;
}

View File

@@ -0,0 +1,29 @@
package com.cool.store.vo.exhibition;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @author Fun Li 2023/12/18 17:15
* @version 1.0
* 线索报名的会销详情
*/
@Data
public class PartnerExhibitionInfoVO {
@ApiModelProperty(value = "参会人名称", example = "John Doe")
private String participantName;
@ApiModelProperty(value = "报名的展会编号", example = "34632023")
private String exhibitionCode;
@ApiModelProperty(value = "参加的相应展会名称", example = "某某某次展会")
private String exhibitionName;
@ApiModelProperty(value = "展会时间", example = "2023-07-25")
private String exhibitionDate;
@ApiModelProperty(value = "展会地点", example = "维也纳大酒店")
private String exhibitionPosition;
}

View File

@@ -0,0 +1,26 @@
package com.cool.store.vo.exhibition;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @author Fun Li 2023/12/18 16:42
* @version 1.0
* 线索报名的会销列表
*/
@Data
public class PartnerExhibitionListVO {
@ApiModelProperty(value = "展会id", example = "123")
private String exhibitionId;
@ApiModelProperty(value = "展会编号", example = "12202312")
private String exhibitionCode;
@ApiModelProperty(value = "展会名称", example = "某某某次展会")
private String exhibitionName;
@ApiModelProperty(value = "展会时间", example = "2023-07-25")
private String exhibitionDate;
}

View File

@@ -0,0 +1,30 @@
package com.cool.store.vo.partner;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @Author suzhuhong
* @Date 2023/12/13 16:38
* @Version 1.0
*/
@Data
public class PartnerUserBaseVO {
@ApiModelProperty("手机号")
private String mobile;
@ApiModelProperty("申请人姓名")
private String partnerName;
@ApiModelProperty("意向开店区域")
private String wantShopArea;
public PartnerUserBaseVO() {}
public PartnerUserBaseVO(String mobile, String partnerName, String wantShopArea) {
this.mobile = mobile;
this.partnerName = partnerName;
this.wantShopArea = wantShopArea;
}
}

View File

@@ -70,9 +70,11 @@ public interface ExhibitionService {
/**
* 会销组详情
* @param exhibitionGroupId
* @param includeCollaborators true-包含协作人信息 false_不包含
* @param filterCloseExhibition true-过滤关闭的会销 false-不过滤关闭的会销
* @return
*/
ExhibitionGroupDetailVO getExhibitionGroupDetail(Integer exhibitionGroupId);
ExhibitionGroupDetailVO getExhibitionGroupDetail(Integer exhibitionGroupId,Boolean includeCollaborators,Boolean filterCloseExhibition);
/**
* 会销详情
@@ -110,6 +112,45 @@ public interface ExhibitionService {
*/
SignUpExhibitionVO signUpExhibition(SignUpExhibitionDTO signUpExhibitionDTO,LoginUserInfo userInfo) throws ApiException;
/**
* 取消报名
* @param exhibitionId
* @param lineId
* @param userInfo
* @return
*/
Boolean cancelSignUpExhibition(Integer exhibitionId,Long lineId,LoginUserInfo userInfo);
/**
* 签到
* @param exhibitionId
* @param lineId
* @param userInfo
* @return
*/
Boolean manualCheckIn(Integer exhibitionId,Long lineId,LoginUserInfo userInfo);
/**
* 结束展会
* @param exhibitionId
* @param userInfo
* @return
*/
Boolean closeExhibition(Integer exhibitionId,LoginUserInfo userInfo);
/**
* 获取线索参加的会销列表
* @param partnerLineId
* @return
*/
List<PartnerExhibitionListVO> getPartnerExhibitionList(Long partnerLineId);
/**
* 获取线索参加的会销详情
*
* @param exhibitionId
* @param partnerLineId
* @return
*/
PartnerExhibitionInfoVO getExhibitionInfo(Integer exhibitionId, Long partnerLineId);
}

View File

@@ -5,6 +5,7 @@ import com.cool.store.exception.ApiException;
import com.cool.store.request.PartnerUserInfoRequest;
import com.cool.store.vo.ApplyBaseInfoVO;
import com.cool.store.vo.InviteCodeDetailVO;
import com.cool.store.vo.partner.PartnerUserBaseVO;
public interface PartnerUserInfoService {
@@ -18,4 +19,5 @@ public interface PartnerUserInfoService {
ApplyBaseInfoVO updatePartnerUserInfo(PartnerUserInfoRequest partnerUserInfoRequest) throws ApiException;
PartnerUserBaseVO getPartnerInfo(String mobile);
}

View File

@@ -1,23 +1,21 @@
package com.cool.store.service.impl;
import cn.hutool.core.date.DateUtil;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.cool.store.dao.HyPartnerExhibitionDAO;
import com.cool.store.dto.log.LogFieldDTO;
import com.cool.store.entity.HyPartnerCertificationInfoDO;
import com.cool.store.entity.HyPartnerExhibitionDO;
import com.cool.store.entity.HyPartnerLineInfoDO;
import com.cool.store.entity.HyPartnerTaskInfoLogDO;
import com.cool.store.entity.*;
import com.cool.store.enums.*;
import com.cool.store.exception.ApiException;
import com.cool.store.mapper.HyPartnerCertificationInfoMapper;
import com.cool.store.mapper.HyPartnerInterviewPlanMapper;
import com.cool.store.mapper.HyPartnerLineInfoMapper;
import com.cool.store.mapper.HyPartnerTaskInfoLogMapper;
import com.cool.store.request.GetTipsInfoReq;
import com.cool.store.service.CommonService;
import com.cool.store.utils.StringUtil;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@@ -47,12 +45,17 @@ public class CommonServiceImpl implements CommonService {
@Autowired
private HyPartnerExhibitionDAO partnerExhibitionDAO;
@Autowired
private HyPartnerInterviewPlanMapper partnerInterviewPlanMapper;
@Override
public String getTipsInfo(GetTipsInfoReq request) throws ApiException {
List<HyPartnerLineInfoDO> lineInfoList = hyPartnerLineInfoMapper.getHyPartnerLineInfoListByIds(Arrays.asList(Long.parseLong(request.getPartnerLineId())));
if (CollectionUtils.isEmpty(lineInfoList)) {
return null;
}
//获取面试计划 id 信息
HyPartnerInterviewPlanDO interviewPlanByLineId = partnerInterviewPlanMapper.getInterviewPlanByLineId(Long.parseLong(request.getPartnerLineId()));
HyPartnerLineInfoDO hyPartnerLineInfoDO = lineInfoList.get(0);
String workflowStage = hyPartnerLineInfoDO.getWorkflowStage();
String workflowStatus = hyPartnerLineInfoDO.getWorkflowStatus();
@@ -60,40 +63,162 @@ public class CommonServiceImpl implements CommonService {
//会销面试信息
HyPartnerExhibitionDO partnerExhibitionDO = new HyPartnerExhibitionDO();
partnerExhibitionDO.setPartnerLineId(hyPartnerLineInfoDO.getId());
partnerExhibitionDO.setInterviewPlanId(interviewPlanByLineId.getId());
partnerExhibitionDO.setDeleted(Boolean.FALSE);
partnerExhibitionDO.setParticipationStatus(ExhibitionPartnerStatus.INTERVIEWING.getCode());
partnerExhibitionDO = partnerExhibitionDAO.querySelective(partnerExhibitionDO);
//是否是会销面试
if (partnerExhibitionDO == null || partnerExhibitionDO.getParticipationStatus().compareTo(ExhibitionPartnerStatus.INTERVIEWING.getCode()) < 0) {
return getCommonTipsInfo(workflowStage, workflowStatus, partnerLineId);
return getCommonTipsFix(Long.parseLong(request.getPartnerLineId()));
} else {
return getExhibitionTipsInfo(workflowStage, workflowStatus, partnerLineId);
return getExhibitionTipsInfoFix(Long.parseLong(request.getPartnerLineId()));
}
}
private String getCommonTipsFix(Long partnerLineId) {
String interviewTips = "";
//1. 查询需要展示的操作类型最新一条
HyPartnerTaskInfoLogDO lastLog = hyPartnerTaskInfoLogMapper.getLastTipsLog(partnerLineId);
//2. 判断类型并返回对应的tips
OperateTypeEnum operateType = OperateTypeEnum.getOperateTypeEnum(lastLog.getOperateType());
switch (operateType) {
case INTERVIEWER_BOOK_INTERVIEW:
interviewTips = getInterviewTipsFix(lastLog, "通过操作后台于", "主动为客户预约面试时间");
break;
case INTERVIEW_APPOINTMENT:
interviewTips = getInterviewTipsFix(lastLog, "通过合伙人小程序于", "发起预约面试申请");
break;
case MODIFY_INTERVIEW_TIME:
interviewTips = getInterviewTipsFix(lastLog, "", "修改面试预约时间");
break;
case INTERVIEW_APPOINTMENT_AGREEMENT:
interviewTips = getInterviewTipsFix(lastLog, "", "同意了客户的预约面试申请");
break;
case AUTO_OPEN_INTERVIEW:
interviewTips = getInterviewTipsFix(lastLog, "面试房间于", "正式开放").trim();
break;
case FINISH_INTERVIEW:
interviewTips = getInterviewTipsFix(lastLog, "", "结束面试");
break;
case CREATE_QUALIFYVERIFY:
interviewTips = getInterviewTipsFix(lastLog, "", "发起加盟商资质审核");
break;
case QUALIFYVERIFY_PASS:
HyPartnerCertificationInfoDO partnerCertificationInfoDO = hyPartnerCertificationInfoMapper.selectByPartnerLineId(partnerLineId);
String intentionContractNo = null;
if(partnerCertificationInfoDO != null){
intentionContractNo = partnerCertificationInfoDO.getIntentionContractNo();
}
interviewTips = getVerifyResultTips(partnerLineId, OperateTypeEnum.QUALIFYVERIFY_PASS, "审核通过 | " + intentionContractNo);
break;
default:
break;
}
return interviewTips;
}
private String getExhibitionTipsInfoFix(Long partnerLineId) {
String interviewTips = "";
//1. 查询需要展示的操作类型最新一条
HyPartnerTaskInfoLogDO lastLog = hyPartnerTaskInfoLogMapper.getLastTipsLog(partnerLineId);
//2. 判断类型并返回对应的tips
OperateTypeEnum operateType = OperateTypeEnum.getOperateTypeEnum(lastLog.getOperateType());
switch (operateType) {
case INTERVIEWER_BOOK_INTERVIEW:
interviewTips = getInterviewTipsFix(lastLog, "通过展会于", "发起面试");
break;
case FINISH_INTERVIEW:
interviewTips = getInterviewTipsFix(lastLog, "通过展会于", "结束面试");
break;
case EXHIBITION_CREATE_QUALIFYVERIFY:
interviewTips = getInterviewTipsFix(lastLog, "通过展会于", "发起加盟商资质审核");
break;
case QUALIFYVERIFY_PASS:
HyPartnerCertificationInfoDO partnerCertificationInfoDO = hyPartnerCertificationInfoMapper.selectByPartnerLineId(partnerLineId);
String intentionContractNo = null;
if(partnerCertificationInfoDO != null){
intentionContractNo = partnerCertificationInfoDO.getIntentionContractNo();
}
interviewTips = getVerifyResultTips(partnerLineId, OperateTypeEnum.QUALIFYVERIFY_PASS, "审核通过 | " + intentionContractNo);
break;
default:
break;
}
return interviewTips;
}
public String getInterviewTipsFix(HyPartnerTaskInfoLogDO lastLog, String middleInfo, String action) {
StringBuilder sb = new StringBuilder();
sb.append(StringUtil.REPLACE_0)
.append(" ")
.append(StringUtil.REPLACE_1)
.append(" ")
.append(middleInfo)
.append(" ")
.append(StringUtil.REPLACE_2)
.append(" ").append(action);
String content = sb.toString();
String fieldCopy = lastLog.getFieldCopy();
List<LogFieldDTO> logFieldDTOS = JSON.parseArray(fieldCopy, LogFieldDTO.class);
List<String> params = new ArrayList<>();
String[] replaceKeys = new String[]{
OperateLogFieldValueEnum.OPERATE_USER_NAME.getCode(),
OperateLogFieldValueEnum.MOBILE.getCode(),
OperateLogFieldValueEnum.OPERATE_TIME.getCode()
};
for (String replaceKey : replaceKeys) {
String value = "";
Optional<LogFieldDTO> logFieldDTOOptional = logFieldDTOS.stream().filter(l -> l.getCode().equals(replaceKey)).findFirst();
if (logFieldDTOOptional.isPresent()) {
value = logFieldDTOOptional.get().getValue();
try {
value = DateUtil.format(DateUtil.parseDateTime(value), "yyyy/MM/dd HH:mm:ss");
} catch (Exception e) {
//异常代表不是时间格式,不做处理
}
}
params.add(value);
}
return MessageFormat.format(content, params.toArray());
}
//普通线索
@Deprecated
private String getCommonTipsInfo(String workflowStage, String workflowStatus, Long partnerLineId) {
String interviewTips = "";
//1. 预约面试待审核
if ((workflowStage.equals(WorkflowStageEnum.RESERVATION.getCode()) && workflowStatus.equals(WorkflowStatusEnum.RESERVATION_1.getCode()))) {
interviewTips = getInterviewTips(partnerLineId, OperateTypeEnum.MODIFY_INTERVIEW_TIME, "", "修改面试预约时间");
if (StringUtils.isEmpty(interviewTips)) {
interviewTips = getInterviewTips(partnerLineId, OperateTypeEnum.INTERVIEW_APPOINTMENT, "通过合伙人小程序于", "发起预约面试申请");
}
//该阶段既可能是预约面试提醒的 tip也可能是修改面试时间的 tip按照操作时间先后顺序判断
String interviewTipsOne = getInterviewTips(partnerLineId, OperateTypeEnum.MODIFY_INTERVIEW_TIME, "", "修改面试预约时间");
String interviewTipsTwo = getInterviewTips(partnerLineId, OperateTypeEnum.INTERVIEW_APPOINTMENT, "通过合伙人小程序于", "发起预约面试申请");
String[] tipsOneSplit = interviewTipsOne.split(" ");
String[] tipsTwoSplit = interviewTipsTwo.split(" ");
interviewTips = (tipsOneSplit[3] + tipsOneSplit[4]).compareTo(tipsTwoSplit[3] + tipsTwoSplit[4]) > 0 ? interviewTipsOne : interviewTipsTwo;
//2. 待面试
} else if (workflowStage.equals(WorkflowStageEnum.INTERVIEW.getCode()) && workflowStatus.equals(WorkflowStatusEnum.INTERVIEW_2.getCode())) {
interviewTips = getInterviewTips(partnerLineId, OperateTypeEnum.INTERVIEW_APPOINTMENT_AGREEMENT, "", "同意了客户的预约面试申请");
String interviewTipsLocal = getInterviewTips(partnerLineId, OperateTypeEnum.INTERVIEW_APPOINTMENT_AGREEMENT, "", "同意了客户的预约面试申请");
if (interviewTipsLocal!= null &&!interviewTipsLocal.isEmpty()) {
interviewTips = interviewTipsLocal;
}
//3. 面试已开始
} else if (workflowStage.equals(WorkflowStageEnum.INTERVIEW.getCode()) && workflowStatus.equals(WorkflowStatusEnum.INTERVIEW_3.getCode())) {
interviewTips = getInterviewTips(partnerLineId, OperateTypeEnum.AUTO_OPEN_INTERVIEW, "面试房间于", "正式开放");
interviewTips = interviewTips.trim();
String interviewTipsLocal = getInterviewTips(partnerLineId, OperateTypeEnum.AUTO_OPEN_INTERVIEW, "面试房间于", "正式开放");
if (interviewTipsLocal != null && !interviewTipsLocal.isEmpty()) {
interviewTips = interviewTips.trim();
}
//4. 面试已结束
} else if (workflowStage.equals(WorkflowStageEnum.INTERVIEW.getCode()) && workflowStatus.equals(WorkflowStatusEnum.INTERVIEW_4.getCode())) {
interviewTips = getInterviewTips(partnerLineId, OperateTypeEnum.FINISH_INTERVIEW, "", "结束面试");
String interviewTipsLocal = getInterviewTips(partnerLineId, OperateTypeEnum.FINISH_INTERVIEW, "", "结束面试");
if (interviewTipsLocal!= null &&!interviewTipsLocal.isEmpty()) {
interviewTips = interviewTipsLocal;
}
//5. 发起资质审批
} else if (workflowStage.equals(WorkflowStageEnum.INTERVIEW.getCode()) && workflowStatus.equals(WorkflowStatusEnum.INTERVIEW_5.getCode())) {
interviewTips = getInterviewTips(partnerLineId, OperateTypeEnum.CREATE_QUALIFYVERIFY, "","发起加盟商资质审核");
String interviewTipsLocal = getInterviewTips(partnerLineId, OperateTypeEnum.CREATE_QUALIFYVERIFY, "","发起加盟商资质审核");
if (interviewTipsLocal!= null &&!interviewTipsLocal.isEmpty()) {
interviewTips = interviewTipsLocal;
}
//6. 资质审批通过
} else if (workflowStage.equals(WorkflowStageEnum.INTERVIEW.getCode()) && workflowStatus.equals(WorkflowStatusEnum.INTERVIEW_6.getCode())) {
HyPartnerCertificationInfoDO partnerCertificationInfoDO = hyPartnerCertificationInfoMapper.selectByPartnerLineId(partnerLineId);
@@ -101,12 +226,16 @@ public class CommonServiceImpl implements CommonService {
if(partnerCertificationInfoDO != null){
intentionContractNo = partnerCertificationInfoDO.getIntentionContractNo();
}
interviewTips = getVerifyResultTips(partnerLineId, OperateTypeEnum.QUALIFYVERIFY_PASS, "审核通过 | " + intentionContractNo);
String interviewTipsLocal = getVerifyResultTips(partnerLineId, OperateTypeEnum.QUALIFYVERIFY_PASS, "审核通过 | " + intentionContractNo);
if (interviewTipsLocal!= null &&!interviewTipsLocal.isEmpty()) {
interviewTips = interviewTipsLocal;
}
}
return interviewTips;
}
//会销面试线索,通过会销进行面试的线索已开始就是面试已开始状态
@Deprecated
private String getExhibitionTipsInfo(String workflowStage, String workflowStatus, Long partnerLineId) {
String interviewTips = "";
//1. 面试已开始
@@ -117,7 +246,6 @@ public class CommonServiceImpl implements CommonService {
interviewTips = getInterviewTips(partnerLineId, OperateTypeEnum.FINISH_INTERVIEW, "通过展会于", "结束面试");
//3. 发起资质审批
} else if (workflowStage.equals(WorkflowStageEnum.INTERVIEW.getCode()) && workflowStatus.equals(WorkflowStatusEnum.INTERVIEW_5.getCode())) {
// TODO 判断是否是通过会销发起的
interviewTips = getInterviewTips(partnerLineId, OperateTypeEnum.EXHIBITION_CREATE_QUALIFYVERIFY, "通过展会于", "发起加盟商资质审核");
if (interviewTips == null) {
getInterviewTips(partnerLineId, OperateTypeEnum.CREATE_QUALIFYVERIFY, "", "发起加盟商资质审核");

View File

@@ -253,7 +253,12 @@ public class FlowServiceImpl implements FlowService {
//记录日志
CreateQualifyVerifyDTO log = CreateQualifyVerifyDTO.builder().mobile(operator.getMobile()).operateUserId(operator.getUserId()).operateUsername(operator.getName()).operateTime(DateUtil.format(new Date(), CoolDateUtils.DATE_FORMAT_SEC))
.summary(request.getSummary()).qualiVerifyContent(JSON.toJSONString(partnerCertificationInfoDO)).build();
logService.recordBizLog(operator,hyPartnerInterviewDO.getPartnerLineId(), OperateTypeEnum.CREATE_QUALIFYVERIFY,log);
//是否由会销发起面试
if (request.getWhetherExhibition() == null || Boolean.FALSE.equals(request.getWhetherExhibition())) {
logService.recordBizLog(operator,hyPartnerInterviewDO.getPartnerLineId(), OperateTypeEnum.CREATE_QUALIFYVERIFY, log);
} else {
logService.recordBizLog(operator,hyPartnerInterviewDO.getPartnerLineId(), OperateTypeEnum.EXHIBITION_CREATE_QUALIFYVERIFY, log);
}
}
@Override

View File

@@ -658,11 +658,8 @@ public class HyPartnerLineInfoServiceImpl implements HyPartnerLineInfoService {
}
String intentAreaName = getIntentAreaName(request.getIntentAreaId());
PageHelper.startPage(request.getPageNum(),request.getPageSize());
PageInfo privateLineList = new PageInfo(hyPartnerLineInfoDAO.getPrivateSeaLineList(request.getKeyword(), request.getKeywordType(), request.getWorkflowStage(),
request.getWorkflowStatus(), request.getDeadlineStart(), request.getDeadlineEnd(), intentAreaName, request.getAcceptAdjustType(), request.getStoreKeyword(),
request.getStoreKeywordType(), userIdsByScope.getInvestmentUserIds(),userIdsByScope.getDevelopmentUserIds(),request.getUserPortraitIdList(),request.getUserChannelIdList()
, request.getUpdateStartTime(), request.getUpdateEndTime(), request.getPartnerName(),request.getPartnerMobile(),request.getInvestmentManagerId(),request.getUserPortraitQueryType()
,request.getIntentAreaQueryType(),request.getLineStartTime(),request.getLineEndTime(),request.getUserChannelQueryType(),request.getSortField(),request.getSortOrder()));
handleReq(request, intentAreaName,userIdsByScope);
PageInfo privateLineList = new PageInfo(hyPartnerLineInfoDAO.getPrivateSeaLineList(request));
List<PrivateSeaLineDTO> list = privateLineList.getList();
if (CollectionUtils.isEmpty(list)){
return privateLineList;
@@ -1016,11 +1013,11 @@ public class HyPartnerLineInfoServiceImpl implements HyPartnerLineInfoService {
String intentAreaName = getIntentAreaName(request.getIntentAreaId());
Integer pageNum = request.getPageNum();
Integer pageSize = request.getPageSize();
List<LinePageInfoVo> linePageInfoVo = hyPartnerLineInfoDAO.getPrivateSeaPageInfoNext(request.getLineId(), request.getKeyword(), request.getKeywordType(), request.getWorkflowStage(),
request.getWorkflowStatus(), request.getDeadlineStart(), request.getDeadlineEnd(), intentAreaName, request.getAcceptAdjustType(), request.getStoreKeyword(),
request.getStoreKeywordType(), userIdsByScope.getInvestmentUserIds(), userIdsByScope.getDevelopmentUserIds(), request.getUserPortraitIdList(), request.getUserChannelIdList()
, request.getUpdateStartTime(), request.getUpdateEndTime(), request.getPartnerName(), request.getPartnerMobile(), request.getInvestmentManagerId(), request.getUserPortraitQueryType()
, request.getIntentAreaQueryType(), request.getLineStartTime(), request.getLineEndTime(), request.getUserChannelQueryType(), request.getSortField(), request.getSortOrder(), (pageNum - 1) * pageSize == 0 ? 0 : (pageNum - 1) * pageSize - 1, pageSize + 2);
handleReq(request, intentAreaName,userIdsByScope);
int limit1 = (pageNum - 1) * pageSize == 0 ? 0 : (pageNum - 1) * pageSize - 1;
request.setLimit1(limit1);
request.setLimit2(pageSize + 2);
List<LinePageInfoVo> linePageInfoVo = hyPartnerLineInfoDAO.getPrivateSeaPageInfoNext(request);
Optional<Integer> first = Stream.iterate(0, i -> i + 1).limit(linePageInfoVo.size()).filter(item -> request.getLineId().equals(linePageInfoVo.get(item).getLineId())).findFirst();
if (!first.isPresent()) {
return null;
@@ -1036,6 +1033,17 @@ public class HyPartnerLineInfoServiceImpl implements HyPartnerLineInfoService {
return null;
}
/**
* 处理请求参数
* @param request
* @param intentAreaName
* @param userIdsByScope
*/
private void handleReq(PrivateSeaLineListRequest request,String intentAreaName,UserPositionAndUserScopeDTO userIdsByScope){
request.setIntentAreaName(intentAreaName);
request.setDevelopmentManagerList(userIdsByScope.getDevelopmentUserIds());
request.setUserIdList(userIdsByScope.getInvestmentUserIds());
}
@Override
public LinePageInfoVo publicSeaPageDetailNext(String userId, LineRequest lineRequest) {

View File

@@ -7,6 +7,7 @@ import com.cool.store.context.PartnerUserHolder;
import com.cool.store.dao.HyOpenAreaInfoDAO;
import com.cool.store.dao.HyPartnerUserInfoDAO;
import com.cool.store.dto.log.UserInfoUpdateDTO;
import com.cool.store.dto.partner.MobileCheckDTO;
import com.cool.store.entity.HyOpenAreaInfoDO;
import com.cool.store.entity.HyPartnerLineInfoDO;
import com.cool.store.entity.HyPartnerUserInfoDO;
@@ -22,6 +23,7 @@ import com.cool.store.utils.RedisUtilPool;
import com.cool.store.vo.ApplyBaseInfoVO;
import com.cool.store.vo.InviteCodeDetailVO;
import com.cool.store.vo.PartnerUserInfoVO;
import com.cool.store.vo.partner.PartnerUserBaseVO;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
@@ -152,6 +154,15 @@ public class PartnerUserInfoServiceImpl implements PartnerUserInfoService {
return applyBaseInfoVO;
}
@Override
public PartnerUserBaseVO getPartnerInfo(String mobile) {
HyPartnerUserInfoDO hyPartnerUserInfoDO = hyPartnerUserInfoDAO.selectByMobile(mobile);
if (hyPartnerUserInfoDO == null){
return null;
}
return new PartnerUserBaseVO(hyPartnerUserInfoDO.getMobile(),hyPartnerUserInfoDO.getUsername(),hyPartnerUserInfoDO.getWantShopArea());
}
private void fillUserInfoDOByRequest(HyPartnerUserInfoDO hyPartnerUserInfoDO, PartnerUserInfoRequest partnerUserInfoRequest) {
hyPartnerUserInfoDO.setUsername(partnerUserInfoRequest.getUsername());
hyPartnerUserInfoDO.setMobile(partnerUserInfoRequest.getMobile());

View File

@@ -35,7 +35,6 @@ import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.ObjectUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@@ -43,7 +42,6 @@ import javax.annotation.Resource;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.*;
import java.util.function.Function;
import java.util.stream.Collectors;
/**
@@ -82,6 +80,9 @@ public class ExhibitionServiceImpl implements ExhibitionService {
@Autowired
private TRTCUtils trtcUtils;
@Resource
HyPartnerIntentInfoDAO hyPartnerIntentInfoDAO;
@Resource
HyPartnerUserInfoDAO hyPartnerUserInfoDAO;
// @Value("${offline.exhibition.channel.id}")
@@ -308,7 +309,7 @@ public class ExhibitionServiceImpl implements ExhibitionService {
return myExhibitionGroupDTOPage;
}
List<Integer> groupIds = myExhibitionGroupDTOS.stream().map(MyExhibitionGroupDTO::getId).collect(Collectors.toList());
List<ExhibitionDTO> exhibitionDTOS = hyExhibitionDAO.listByExhibitionGroupIds(groupIds);
List<ExhibitionDTO> exhibitionDTOS = hyExhibitionDAO.listByExhibitionGroupIds(groupIds,Boolean.FALSE);
Map<Integer, List<ExhibitionDTO>> groupMap = exhibitionDTOS.stream().collect(Collectors.groupingBy(ExhibitionDTO::getExhibitionGroupId));
List<MyExhibitionGroupVO> result = new ArrayList<>();
@@ -350,7 +351,7 @@ public class ExhibitionServiceImpl implements ExhibitionService {
}
@Override
public ExhibitionGroupDetailVO getExhibitionGroupDetail(Integer exhibitionGroupId) {
public ExhibitionGroupDetailVO getExhibitionGroupDetail(Integer exhibitionGroupId,Boolean includeCollaborators,Boolean filterCloseExhibition) {
//查询标签组
HyExhibitionGroupDO hyExhibitionGroupDO = hyExhibitionGroupDAO.selectByPrimaryKey(exhibitionGroupId);
if (ObjectUtils.isEmpty(hyExhibitionGroupDO)){
@@ -359,7 +360,7 @@ public class ExhibitionServiceImpl implements ExhibitionService {
ExhibitionGroupDetailVO exhibitionGroupDetailVO = new ExhibitionGroupDetailVO();
exhibitionGroupDetailVO.setExhibitionGroupName(hyExhibitionGroupDO.getExhibitionGroupName());
exhibitionGroupDetailVO.setId(hyExhibitionGroupDO.getId());
List<ExhibitionDTO> exhibitionDTOS = hyExhibitionDAO.listByExhibitionGroupIds(Arrays.asList(exhibitionGroupId));
List<ExhibitionDTO> exhibitionDTOS = hyExhibitionDAO.listByExhibitionGroupIds(Arrays.asList(exhibitionGroupId),filterCloseExhibition);
List<ExhibitionVO> exhibitionVOS = new ArrayList<>();
//会销对应的会销协作人map
Map<String, CollaboratorVO> resultMap = getExhibitionCollaboratorMap(exhibitionDTOS);
@@ -370,8 +371,9 @@ public class ExhibitionServiceImpl implements ExhibitionService {
exhibitionVO.setStartDate(exhibitionDTO.getStartDate());
exhibitionVO.setLocation(exhibitionDTO.getLocation());
exhibitionVO.setId(exhibitionDTO.getId());
if (StringUtils.isNotEmpty(exhibitionDTO.getCollaboratorStr())){
List<String> userIdList = Arrays.asList(exhibitionDTO.getCollaboratorStr().substring(1).split(Constants.COMMA));
//需要加载协作人才加载 不需要的时候 不加载
if (includeCollaborators&&StringUtils.isNotEmpty(exhibitionDTO.getCollaboratorStr())){
List<String> userIdList = Arrays.asList(exhibitionDTO.getCollaboratorStr().substring(CommonConstants.ONE).split(Constants.COMMA));
List<CollaboratorVO> coll = new ArrayList<>();
userIdList.forEach(userIds->{
coll.add(resultMap.get(userIds));
@@ -459,13 +461,13 @@ public class ExhibitionServiceImpl implements ExhibitionService {
if (CollectionUtils.isEmpty(exhibitionLineDTOS)){
return pageInfo;
}
List<Integer> lineIds = exhibitionLineDTOS.stream().map(ExhibitionLineDTO::getLineId).collect(Collectors.toList());
List<Long> lineIds = exhibitionLineDTOS.stream().map(ExhibitionLineDTO::getLineId).collect(Collectors.toList());
//面试官info
List<LineInterviewDTO> lineInterviewList = hyPartnerLineInfoDAO.lineInterviewList(lineIds);
Map<Integer, LineInterviewDTO> lineInterviewMap = lineInterviewList.stream().collect(Collectors.toMap(LineInterviewDTO::getLineId, date -> date));
Map<Long, LineInterviewDTO> lineInterviewMap = lineInterviewList.stream().collect(Collectors.toMap(LineInterviewDTO::getLineId, date -> date));
//招商经理info
List<LineInterviewDTO> lineInvestmentList = hyPartnerLineInfoDAO.lineInvestmentList(lineIds);
Map<Integer, LineInterviewDTO> lineInvestmentMap = lineInvestmentList.stream().collect(Collectors.toMap(LineInterviewDTO::getLineId, date -> date));
Map<Long, LineInterviewDTO> lineInvestmentMap = lineInvestmentList.stream().collect(Collectors.toMap(LineInterviewDTO::getLineId, date -> date));
List<ExhibitionLineVO> result = new ArrayList<>();
exhibitionLineDTOS.forEach(x->{
ExhibitionLineVO exhibitionLineVO = new ExhibitionLineVO();
@@ -569,7 +571,7 @@ public class ExhibitionServiceImpl implements ExhibitionService {
if (signUpExhibitionVO!=null){
return signUpExhibitionVO;
}
//是否重复报名
//是否重复报名(已结束的展会不算)
Integer exhibitionGroupId = hyExhibitionDO.getExhibitionGroupId();
Integer count = hyExhibitionDAO.lineSignUpCount(exhibitionGroupId, lineId);
if (count > 0){
@@ -577,7 +579,7 @@ public class ExhibitionServiceImpl implements ExhibitionService {
return new SignUpExhibitionVO(Boolean.FALSE,CommonConstants.THREE,SignUpStatusEnum.getSignUpFailMsg(SignUpStatusEnum.Sign_UP_FAIL_3,hyExhibitionGroupDO.getExhibitionGroupName()));
}
//开始报名
//判断是否之前报名过会销
//判断是否之前报名过会销
HyPartnerExhibitionDO partnerExhibition = hyPartnerExhibitionDAO.getPartnerExhibition(hyExhibitionDO.getId(), lineId);
if (partnerExhibition != null){
partnerExhibition.setParticipationStatus(ExhibitionPartnerStatus.REGISTERED.getCode());
@@ -600,7 +602,7 @@ public class ExhibitionServiceImpl implements ExhibitionService {
hyPartnerExhibitionDAO.insertSelective(hyPartnerExhibitionDO);
}
//计算是否会销中
whetherInExhibition(lineId,Boolean.TRUE);
whetherInExhibition(Arrays.asList(lineId),Boolean.TRUE);
if (sendNotice){
//发送通知
eventCenterHttpRequest.sendFeiShuNotice(FeiShuNoticeMsgEnum.PARTNER_SIGNUP_EXHIBITION,Arrays.asList(investManager),mobileCheckDTO.getPartnerName(),mobileCheckDTO.getMobile(),
@@ -620,24 +622,91 @@ public class ExhibitionServiceImpl implements ExhibitionService {
partnerExhibition.setUpdater(userInfo.getUserId());
hyPartnerExhibitionDAO.updateByPrimaryKeySelective(partnerExhibition);
//计算是否会销中
whetherInExhibition(lineId,Boolean.FALSE);
whetherInExhibition(Arrays.asList(lineId),Boolean.FALSE);
return Boolean.TRUE;
}
@Override
public Boolean manualCheckIn(Integer exhibitionId, Long lineId,LoginUserInfo userInfo) {
//签到
HyPartnerIntentInfoDO hyPartnerIntentInfoDO = hyPartnerIntentInfoDAO.selectByLineId(lineId);
Integer status = ExhibitionPartnerStatus.SIGNED.getCode();
if (hyPartnerIntentInfoDO != null){
status = ExhibitionPartnerStatus.APPLIED.getCode();
}
HyPartnerExhibitionDO partnerExhibition = hyPartnerExhibitionDAO.getPartnerExhibition(exhibitionId, lineId);
partnerExhibition.setParticipationStatus(status);
partnerExhibition.setUpdater(userInfo.getUserId());
hyPartnerExhibitionDAO.updateByPrimaryKeySelective(partnerExhibition);
return Boolean.TRUE;
}
@Override
public Boolean closeExhibition(Integer exhibitionId, LoginUserInfo userInfo) {
//查询展会
HyExhibitionDO hyExhibitionDO = hyExhibitionDAO.selectByPrimaryKey(exhibitionId);
if (hyExhibitionDO == null){
throw new ServiceException(ErrorCodeEnum.EXHIBITION_NOT_EXIST);
}
hyExhibitionDO.setClosedType(CommonConstants.TWO);
hyExhibitionDO.setUpdater(userInfo.getUserId());
//更新展会结束状态
hyExhibitionDAO.updateByPrimaryKeySelective(hyExhibitionDO);
//批量处理报名线索是否会销中状态
List<ExhibitionLineDTO> exhibitionLine = hyPartnerExhibitionDAO.getExhibitionLine(hyExhibitionDO.getId());
List<Long> lineIds = exhibitionLine.stream().map(ExhibitionLineDTO::getLineId).collect(Collectors.toList());
//结束是否会销中
whetherInExhibition(lineIds,Boolean.FALSE);
Integer exhibitionGroupId = hyExhibitionDO.getExhibitionGroupId();
List<HyExhibitionDO> hyExhibitionDOS = hyExhibitionDAO.listByExhibitionGroupId(exhibitionGroupId, Boolean.FALSE);
if (CollectionUtils.isEmpty(hyExhibitionDOS)){
//如果没有会销是打开状态了,则关闭会销组
HyExhibitionGroupDO hyExhibitionGroupDO = new HyExhibitionGroupDO();
hyExhibitionGroupDO.setClosed(Boolean.TRUE);
hyExhibitionGroupDO.setId(exhibitionGroupId);
hyExhibitionGroupDAO.updateByPrimaryKeySelective(hyExhibitionGroupDO);
}
//短信通知
exhibitionLine.stream().forEach(x->{
try {
eventCenterHttpRequest.sendSmsVariable(x.getMobile(),SMSMsgEnum.EXHIBITION_CLOSE);
} catch (ApiException e) {
log.info("closeExhibition 发送短信通知失败,mobile:{},exhibitionId:{}",x.getMobile(),hyExhibitionDO.getId());
}
});
return Boolean.TRUE;
}
@Override
public List<PartnerExhibitionListVO> getPartnerExhibitionList(Long partnerLineId) {
return hyExhibitionDAO.getPartnerExhibitionList(partnerLineId);
}
@Override
public PartnerExhibitionInfoVO getExhibitionInfo(Integer exhibitionId, Long partnerLineId) {
return hyExhibitionDAO.getPartnerExhibitionInfo(exhibitionId, partnerLineId);
}
/**
* 计算是否会销中
* @param lineId
*/
private void whetherInExhibition(Long lineId,Boolean insertFlag){
private void whetherInExhibition(List<Long> lineId,Boolean insertFlag){
//计算是否会销中(报名了会销(不能是取消报名状态) 且会销属于开发中 )
Integer count = hyPartnerExhibitionDAO.partnerSignUpCount(lineId);
log.info("partnerSignUpCount:{}",count);
List<PartnerSignUpDTO> partnerSignUpDTOS = hyPartnerExhibitionDAO.partnerSignUpCount(lineId);
log.info("whetherInExhibition:{}", JSONObject.toJSONString(partnerSignUpDTOS));
//会销状态
Boolean exhibitionStatus = (count>CommonConstants.ZERO||insertFlag)?Boolean.TRUE:Boolean.FALSE;
HyPartnerLineInfoDO hyPartnerLineInfoDO = new HyPartnerLineInfoDO();
hyPartnerLineInfoDO.setId(lineId);
hyPartnerLineInfoDO.setWhetherInExhibition(exhibitionStatus);
hyPartnerLineInfoDAO.updateByPrimaryKeySelective(hyPartnerLineInfoDO);
Map<Long, Integer> map = partnerSignUpDTOS.stream().collect(Collectors.toMap(PartnerSignUpDTO::getLineId, PartnerSignUpDTO::getCount));
List<HyPartnerLineInfoDO> lineInfoDOS = new ArrayList<>();
lineId.forEach(x->{
Boolean exhibitionStatus = (map.get(x)!=null||insertFlag)?Boolean.TRUE:Boolean.FALSE;
HyPartnerLineInfoDO hyPartnerLineInfoDO = new HyPartnerLineInfoDO();
hyPartnerLineInfoDO.setId(x);
hyPartnerLineInfoDO.setWhetherInExhibition(exhibitionStatus);
lineInfoDOS.add(hyPartnerLineInfoDO);
});
hyPartnerLineInfoDAO.batchUpdate(lineInfoDOS);
}
/**

View File

@@ -12,6 +12,7 @@ import com.cool.store.service.*;
import com.cool.store.vo.*;
import com.cool.store.vo.interview.InterviewVO;
import com.cool.store.vo.partner.PartnerSimpleBaseInfoVO;
import com.cool.store.vo.partner.PartnerUserBaseVO;
import com.github.pagehelper.PageInfo;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
@@ -346,4 +347,10 @@ public class DeskController {
public ResponseResult<PartnerSimpleBaseInfoVO> queryBaseInfo(@RequestParam(value = "partnerLineId")Long partnerLineId){
return ResponseResult.success(hyPartnerLineInfoService.queryBaseInfo(partnerLineId));
}
@GetMapping(path = "/getPartnerInfo")
@ApiOperation("线索基本信息")
public ResponseResult<PartnerUserBaseVO> getPartnerInfo(@RequestParam(value = "mobile")String mobile){
return ResponseResult.success(partnerUserInfoService.getPartnerInfo(mobile));
}
}

View File

@@ -65,7 +65,7 @@ public class ExhibitionController {
@GetMapping(value = "/getExhibitionGroupDetail")
@ApiOperation("会销组详情")
public ResponseResult getExhibitionGroupDetail(@RequestParam(required = false,value = "exhibitionGroupId") Integer exhibitionGroupId) {
return ResponseResult.success(exhibitionService.getExhibitionGroupDetail(exhibitionGroupId));
return ResponseResult.success(exhibitionService.getExhibitionGroupDetail(exhibitionGroupId,Boolean.TRUE,Boolean.FALSE));
}
@@ -89,7 +89,7 @@ public class ExhibitionController {
}
@GetMapping(value = "/getExhibitionLineList")
@GetMapping(value = "/lineListByExhibitionId")
@ApiOperation("会销报名列表")
public ResponseResult getExhibitionLineList(@RequestParam(required = true,value = "exhibitionId") Integer exhibitionId,
@RequestParam(required = false,value = "participationStatus") Integer participationStatus,
@@ -118,9 +118,26 @@ public class ExhibitionController {
@ApiOperation("取消报名会销")
@GetMapping("/cancelSignUp")
public ResponseResult<Boolean> cancelSignUp(@RequestParam(required = true,value = "exhibitionId") Integer exhibitionId,
@RequestParam(required = true,value = "lineId") Long lineId) throws ApiException {
@RequestParam(required = true,value = "lineId") Long lineId) {
LoginUserInfo user = CurrentUserHolder.getUser();
return ResponseResult.success(exhibitionService.cancelSignUpExhibition(exhibitionId,lineId,user));
}
@ApiOperation("签到")
@GetMapping("/manualCheckIn")
public ResponseResult<Boolean> manualCheckIn(@RequestParam(required = true,value = "exhibitionId") Integer exhibitionId,
@RequestParam(required = true,value = "lineId") Long lineId) {
LoginUserInfo user = CurrentUserHolder.getUser();
return ResponseResult.success(exhibitionService.manualCheckIn(exhibitionId,lineId,user));
}
@ApiOperation("结束会销")
@GetMapping("/closeExhibition")
public ResponseResult<Boolean> closeExhibition(@RequestParam(required = true,value = "exhibitionId") Integer exhibitionId) {
LoginUserInfo user = CurrentUserHolder.getUser();
return ResponseResult.success(exhibitionService.closeExhibition(exhibitionId,user));
}
}

View File

@@ -1,21 +1,22 @@
package com.cool.store.controller;
import com.cool.store.context.CurrentUserHolder;
import com.cool.store.context.LoginUserInfo;
import com.cool.store.context.PartnerUserHolder;
import com.cool.store.dto.exhibition.SignUpExhibitionDTO;
import com.cool.store.exception.ApiException;
import com.cool.store.response.ResponseResult;
import com.cool.store.service.ExhibitionService;
import com.cool.store.vo.PartnerUserInfoVO;
import com.cool.store.vo.exhibition.PartnerExhibitionInfoVO;
import com.cool.store.vo.exhibition.PartnerExhibitionListVO;
import com.cool.store.vo.exhibition.SignUpExhibitionVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.List;
/**
* @Author suzhuhong
@@ -31,12 +32,30 @@ public class ExhibitionController {
@Resource
ExhibitionService exhibitionService;
@ApiOperation("报名会销")
@PostMapping("/signUpExhibition")
public ResponseResult<SignUpExhibitionVO> signUpExhibition(@RequestBody SignUpExhibitionDTO dto) throws ApiException {
LoginUserInfo user = CurrentUserHolder.getUser();
return ResponseResult.success(exhibitionService.signUpExhibition(dto,user));
return ResponseResult.success(exhibitionService.signUpExhibition(dto,new LoginUserInfo()));
}
@GetMapping(value = "/getExhibitionList")
@ApiOperation("会销组详情")
public ResponseResult getExhibitionGroupDetail(@RequestParam(required = false,value = "exhibitionGroupId") Integer exhibitionGroupId) {
return ResponseResult.success(exhibitionService.getExhibitionGroupDetail(exhibitionGroupId,Boolean.FALSE,Boolean.TRUE));
}
@GetMapping(value = "/getPartnerExhibitionList")
@ApiOperation("线索参加的会销列表")
public ResponseResult<List<PartnerExhibitionListVO>> getPartnerExhibitionList() {
PartnerUserInfoVO user = PartnerUserHolder.getUser();
return ResponseResult.success(exhibitionService.getPartnerExhibitionList(user.getPartnerLineId()));
}
@GetMapping("/getExhibitionInfo")
@ApiOperation("线索参加的会销详情")
public ResponseResult<PartnerExhibitionInfoVO> getExhibitionInfo(@RequestParam(required = true, value = "exhibitionId") Integer exhibitionId) {
PartnerUserInfoVO user = PartnerUserHolder.getUser();
return ResponseResult.success(exhibitionService.getExhibitionInfo(exhibitionId, user.getPartnerLineId()));
}
}

View File

@@ -14,6 +14,7 @@ import com.cool.store.service.*;
import com.cool.store.utils.RedisUtilPool;
import com.cool.store.vo.*;
import com.cool.store.vo.cuser.IdentityCardInfoVO;
import com.cool.store.vo.partner.PartnerUserBaseVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
@@ -254,4 +255,10 @@ public class PartnerController {
}
}
@GetMapping(path = "/getPartnerInfo")
@ApiOperation("线索基本信息")
public ResponseResult<PartnerUserBaseVO> getPartnerInfo(@RequestParam(value = "mobile")String mobile){
return ResponseResult.success(partnerUserInfoService.getPartnerInfo(mobile));
}
}