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

This commit is contained in:
zhangchenbiao
2023-06-29 09:41:54 +08:00
106 changed files with 2634 additions and 299 deletions

View File

@@ -103,6 +103,12 @@
<groupId>org.icepdf.os</groupId> <groupId>org.icepdf.os</groupId>
<artifactId>icepdf-core</artifactId> <artifactId>icepdf-core</artifactId>
<version>6.1.2</version> <version>6.1.2</version>
<exclusions>
<exclusion>
<groupId>javax.media</groupId>
<artifactId>jai-core</artifactId>
</exclusion>
</exclusions>
</dependency> </dependency>
</dependencies> </dependencies>

View File

@@ -229,4 +229,18 @@ public class RedisConstant {
public static final String PHONE_NUMBER= "phone_number_"; public static final String PHONE_NUMBER= "phone_number_";
/**
* MDM 省市区数据缓存
*/
/**
* 省级数据缓存
*/
public static final String MDM_AREA_PROVINCE = "mdm:area:province";
/**
* 其他区域数据缓存
*/
public static final String MDM_AREA_OTHERS = "mdm:area:others:{0}";
} }

View File

@@ -12,7 +12,7 @@ public enum OperateLogFieldValueEnum {
ALLOCATION_USERNAME("allocationUsername","分配人姓名"), ALLOCATION_USERNAME("allocationUsername","分配人姓名"),
MOBILE("mobile","手机号"), MOBILE("mobile","手机号"),
OPERATE_TIME("operateTime","操作时间"), OPERATE_TIME("operateTime","操作时间"),
OPERATE_USER_ID("operateUserId","操作人姓名"), OPERATE_USER_ID("operateUserId","操作人id"),
OPERATE_USER_NAME("operateUsername","操作人姓名"), OPERATE_USER_NAME("operateUsername","操作人姓名"),
REASON("reason","原因"), REASON("reason","原因"),
PASS_REASON("passReason","通过原因"), PASS_REASON("passReason","通过原因"),
@@ -23,6 +23,17 @@ public enum OperateLogFieldValueEnum {
BEFORE_INVESTMENT_MANAGER_MOBILE("beforeInvestmentManagerMobile", "转让前的招商经理手机号"), BEFORE_INVESTMENT_MANAGER_MOBILE("beforeInvestmentManagerMobile", "转让前的招商经理手机号"),
AFTER_INVESTMENT_MANAGER_USERNAME("afterInvestmentManagerUsername", "转让后的招商经理姓名"), AFTER_INVESTMENT_MANAGER_USERNAME("afterInvestmentManagerUsername", "转让后的招商经理姓名"),
AFTER_INVESTMENT_MANAGER_MOBILE("afterInvestmentManagerMobile", "转让后的招商经理手机好"), AFTER_INVESTMENT_MANAGER_MOBILE("afterInvestmentManagerMobile", "转让后的招商经理手机好"),
BEFORE_INTERVIEW_TIME("beforeInterviewTime", "修改前的面试时间"),
AFTER_INTERVIEW_TIME("afterInterviewTime", "修改后的面试时间"),
BEFORE_INTERVIEWR_NAME("beforeInterviewrName", "委托前的面试官姓名"),
AFTER_INTERVIEWR_NAME("afterInterviewrName", "委托后的面试官姓名"),
BEFORE_INTERVIEWR_MOBILE("beforeInterviewrMobile", "委托前的面试官手机号"),
AFTER_INTERVIEWR_MOBILE("afterInterviewrMobile", "委托后的面试官手机号"),
SUMMARY("summary", "面试总结"),
QUALI_VERIFY_CONTENT("qualiVerifyContent", "资质审核内容"),
; ;

View File

@@ -17,8 +17,17 @@ public enum OperateTypeEnum {
ADD_BLACKLIST("add_blacklist", "加入黑名单", Arrays.asList(OPERATE_USER_ID,OPERATE_USER_NAME, MOBILE, OPERATE_TIME, REASON)), ADD_BLACKLIST("add_blacklist", "加入黑名单", Arrays.asList(OPERATE_USER_ID,OPERATE_USER_NAME, MOBILE, OPERATE_TIME, REASON)),
REMOVE_BLACKLIST("add_blacklist", "移除黑名单", Arrays.asList(OPERATE_USER_ID,OPERATE_USER_NAME, MOBILE, OPERATE_TIME, REASON)), REMOVE_BLACKLIST("add_blacklist", "移除黑名单", Arrays.asList(OPERATE_USER_ID,OPERATE_USER_NAME, MOBILE, OPERATE_TIME, REASON)),
CLOSE_FOLLOW("close_follow", "结束跟进", Arrays.asList(OPERATE_USER_ID,OPERATE_USER_NAME, MOBILE, OPERATE_TIME, REJECT_PUBLIC_REASON, REJECT_REAL_REASON, CERTIFY_FILE)), CLOSE_FOLLOW("close_follow", "结束跟进", Arrays.asList(OPERATE_USER_ID,OPERATE_USER_NAME, MOBILE, OPERATE_TIME, REJECT_PUBLIC_REASON, REJECT_REAL_REASON, CERTIFY_FILE)),
TRANSFER_INVESTMENT_MANAGER("transfer_investment_manager", "转让招商经理", Arrays.asList(OPERATE_USER_ID,OPERATE_USER_NAME, MOBILE, OPERATE_TIME, BEFORE_INVESTMENT_MANAGER_USERNAME, BEFORE_INVESTMENT_MANAGER_MOBILE, AFTER_INVESTMENT_MANAGER_USERNAME, AFTER_INVESTMENT_MANAGER_MOBILE)); TRANSFER_INVESTMENT_MANAGER("transfer_investment_manager", "转让招商经理", Arrays.asList(OPERATE_USER_ID,OPERATE_USER_NAME, MOBILE, OPERATE_TIME, BEFORE_INVESTMENT_MANAGER_USERNAME, BEFORE_INVESTMENT_MANAGER_MOBILE, AFTER_INVESTMENT_MANAGER_USERNAME, AFTER_INVESTMENT_MANAGER_MOBILE)),
INTERVIEW_APPOINTMENT("interview_appointment", "预约面试时间", Arrays.asList(OPERATE_USER_ID,OPERATE_USER_NAME, MOBILE, OPERATE_TIME)),
MODIFY_INTERVIEW_TIME("modify_interview_time", "修改面试时间", Arrays.asList(OPERATE_USER_ID,OPERATE_USER_NAME, MOBILE, OPERATE_TIME, BEFORE_INTERVIEW_TIME, AFTER_INTERVIEW_TIME)),
ENTRUST_OTHERS("entrust_others", "委托他人", Arrays.asList(OPERATE_USER_ID,OPERATE_USER_NAME, MOBILE, BEFORE_INTERVIEWR_NAME, AFTER_INTERVIEWR_NAME, BEFORE_INTERVIEWR_MOBILE, AFTER_INTERVIEWR_MOBILE)),
FINISH_INTERVIEW("finish_interview", "合作资格面试-结束面试", Arrays.asList(OPERATE_USER_ID,OPERATE_USER_NAME, MOBILE, OPERATE_TIME)),
REINTERVIEW("reinterview", "合作资格面试-重新预约面试", Arrays.asList(OPERATE_USER_ID,OPERATE_USER_NAME, MOBILE, OPERATE_TIME,REJECT_REAL_REASON, CERTIFY_FILE)),
REJECT_INTERVIEW("reject_interview", "合作资格面试-拒绝并结束跟进", Arrays.asList(OPERATE_USER_ID,OPERATE_USER_NAME, MOBILE, OPERATE_TIME, REJECT_PUBLIC_REASON,REJECT_REAL_REASON, CERTIFY_FILE)),
CREATE_QUALIFYVERIFY("create_qualifyverify", "合作资格面试-创建资格审核", Arrays.asList(OPERATE_USER_ID,OPERATE_USER_NAME, MOBILE, OPERATE_TIME,SUMMARY,QUALI_VERIFY_CONTENT)),
; ;
private String code; private String code;

View File

@@ -36,7 +36,7 @@ public enum WorkflowStageEnum {
public static final HashMap<String,String> getWorkflowStageMap(){ public static final HashMap<String,String> getWorkflowStageMap(){
HashMap<String, String> result = new HashMap<>(); HashMap<String, String> result = new HashMap<>();
result.put(INTENT.getCode(),WorkflowStatusEnum.INTENT_3.getCode()); result.put(INTENT.getCode(),WorkflowStatusEnum.INTENT_3.getCode());
result.put(RESERVATION.getCode(),WorkflowStatusEnum.RESERVATION_7.getCode()); result.put(RESERVATION.getCode(),WorkflowStatusEnum.RESERVATION_8.getCode());
result.put(INTERVIEW.getCode(),WorkflowStatusEnum.INTERVIEW_7.getCode()); result.put(INTERVIEW.getCode(),WorkflowStatusEnum.INTERVIEW_7.getCode());
return result; return result;
} }

View File

@@ -20,12 +20,18 @@ import java.util.regex.Pattern;
*/ */
public class StringUtil extends org.apache.commons.lang3.StringUtils { public class StringUtil extends org.apache.commons.lang3.StringUtils {
private static final char UPPER_A = 'A'; private static final char UPPER_A = 'A';
private static final char LOWER_A = 'a'; private static final char LOWER_A = 'a';
private static final char UPPER_Z = 'Z'; private static final char UPPER_Z = 'Z';
private static final char LOWER_Z = 'z'; private static final char LOWER_Z = 'z';
public static final String REPLACE_0 = "{0}";
public static final String REPLACE_1 = "{1}";
public static final String REPLACE_2 = "{2}";
public static final String REPLACE_3 = "{3}";
public static final String REPLACE_4 = "{4}";
public static final String REPLACE_5 = "{5}";
private static final byte[] DIGITS = { private static final byte[] DIGITS = {
'0', '1', '2', '3', '4', '5', '0', '1', '2', '3', '4', '5',
'6', '7', '8', '9', 'a', 'b', '6', '7', '8', '9', 'a', 'b',

View File

@@ -108,4 +108,8 @@ public class EnterpriseUserDAO {
List<EnterpriseUserDO> userList = getUserInfoByUserIds(userIds); List<EnterpriseUserDO> userList = getUserInfoByUserIds(userIds);
return userList.stream().filter(o->!StringUtils.isAnyBlank(o.getMobile(), o.getName())).collect(Collectors.toMap(k -> k.getUserId(), v -> v.getName() + " " + v.getMobile())); return userList.stream().filter(o->!StringUtils.isAnyBlank(o.getMobile(), o.getName())).collect(Collectors.toMap(k -> k.getUserId(), v -> v.getName() + " " + v.getMobile()));
} }
public String selectByMobile(String mobile) {
return enterpriseUserMapper.selectByMobile(mobile);
}
} }

View File

@@ -75,11 +75,11 @@ public class HyPartnerInterviewPlanDAO {
* @param workflowStatus * @param workflowStatus
* @return * @return
*/ */
public List<PartnerInterviewInfoDTO> getPartnerInterviewInfoList(String userId, String workflowStage,String workflowStatus){ public List<PartnerInterviewInfoDTO> getPartnerInterviewInfoList(String userId, String workflowStage,String workflowStatus,Boolean filter){
if (StringUtils.isEmpty(userId)){ if (StringUtils.isEmpty(userId)){
return Lists.newArrayList(); return Lists.newArrayList();
} }
return hyPartnerInterviewPlanMapper.getPartnerInterviewInfoList(userId,workflowStage,workflowStatus); return hyPartnerInterviewPlanMapper.getPartnerInterviewInfoList(userId,workflowStage,workflowStatus,filter);
} }
public Long selectInterviewIdByLineId(Long lineId){ public Long selectInterviewIdByLineId(Long lineId){

View File

@@ -90,4 +90,7 @@ public interface EnterpriseUserMapper {
* @return * @return
*/ */
List<EnterpriseUserDO> getUserListByRegionIds(@Param("regionIds") List<String> regionIds); List<EnterpriseUserDO> getUserListByRegionIds(@Param("regionIds") List<String> regionIds);
String selectByMobile(@Param("mobile") String mobile);
} }

View File

@@ -37,4 +37,6 @@ public interface HyPartnerCertificationInfoMapper {
*/ */
String getInterviewPlanIdByQualifyVerifyId(String qualifyVerifyId); String getInterviewPlanIdByQualifyVerifyId(String qualifyVerifyId);
HyPartnerCertificationInfoDO selectByPartnerLineId(@Param("partnerLineId") Long partnerLineId);
} }

View File

@@ -35,6 +35,7 @@ public interface HyPartnerInterviewMapper {
* @return * @return
*/ */
PartnerInterviewInfoVO queryByPartnerId(@Param("partnerId") String partnerId); PartnerInterviewInfoVO queryByPartnerId(@Param("partnerId") String partnerId);
PartnerInterviewInfoVO queryByPartnerLineId(@Param("partnerLineId") String partnerLineId);
/** /**
* 根据会议 id 查询面试官 id * 根据会议 id 查询面试官 id

View File

@@ -72,7 +72,8 @@ public interface HyPartnerInterviewPlanMapper {
*/ */
List<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,
@Param("filter") Boolean filter);
/** /**
* 查询面试列表 * 查询面试列表

View File

@@ -3,6 +3,8 @@ package com.cool.store.mapper;
import com.cool.store.entity.HyPartnerTaskInfoLogDO; import com.cool.store.entity.HyPartnerTaskInfoLogDO;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import java.util.List;
/** /**
* @author zhangchenbiao * @author zhangchenbiao
* @date 2023-05-29 03:53 * @date 2023-05-29 03:53
@@ -22,4 +24,6 @@ public interface HyPartnerTaskInfoLogMapper {
* dateTime:2023-05-29 03:53 * dateTime:2023-05-29 03:53
*/ */
int updateByPrimaryKeySelective(@Param("record") HyPartnerTaskInfoLogDO record); int updateByPrimaryKeySelective(@Param("record") HyPartnerTaskInfoLogDO record);
List<HyPartnerTaskInfoLogDO> selectByPartnerLineIdAndOperateType(@Param("partnerLineId") Long partnerLineId, @Param("operateType") String operateType);
} }

View File

@@ -0,0 +1,25 @@
package com.cool.store.mapper;
import com.cool.store.entity.HyPartnerUserChannelDO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@Mapper
public interface HyPartnerUserChannelMapper {
int deleteByPrimaryKey(Long id);
int insert(HyPartnerUserChannelDO record);
int insertSelective(HyPartnerUserChannelDO record);
HyPartnerUserChannelDO selectByPrimaryKey(Long id);
int updateByPrimaryKeySelective(HyPartnerUserChannelDO record);
int updateByPrimaryKey(HyPartnerUserChannelDO record);
HyPartnerUserChannelDO selectByChannelId(@Param("channelId") Long id);
HyPartnerUserChannelDO selectByChannelName(@Param("channelName") String channelName);
}

View File

@@ -1,6 +1,7 @@
package com.cool.store.mapper; package com.cool.store.mapper;
import com.cool.store.entity.HyPartnerUserInfoDO; import com.cool.store.entity.HyPartnerUserInfoDO;
import com.cool.store.entity.SyncEcCustomerDO;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import java.util.List; import java.util.List;
@@ -43,4 +44,7 @@ public interface HyPartnerUserInfoMapper {
int updateJoinKnowById(@Param("isWritePartnerKnow")Integer isWritePartnerKnow, @Param("id")Long id); int updateJoinKnowById(@Param("isWritePartnerKnow")Integer isWritePartnerKnow, @Param("id")Long id);
List<SyncEcCustomerDO> selectByHourDate(@Param("selectTime") String hourDayDate, @Param("now") String now,@Param("limit1")Integer limit1,@Param("limit2")Integer limit2);
int selectByHourDateCount(@Param("selectTime") String hourDayDate, @Param("now") String now);
} }

View File

@@ -0,0 +1,20 @@
package com.cool.store.mapper;
import com.cool.store.entity.MDMAreaDO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
@Mapper
public interface MdmAreaMapper {
/**
* 获取 MDM 省级地区数据
* @return
*/
List<MDMAreaDO> getProvince();
List<MDMAreaDO> getSonArea(@Param("code") String code);
}

View File

@@ -308,4 +308,7 @@
SUBSTR(jobnumber,1,1), SUBSTR(jobnumber,1,1),
CAST(SUBSTR(jobnumber,2) AS UNSIGNED) ASC CAST(SUBSTR(jobnumber,2) AS UNSIGNED) ASC
</select> </select>
<select id="selectByMobile" resultType="java.lang.String">
SELECT user_id FROM enterprise_user WHERE mobile =#{mobile} LIMIT 1
</select>
</mapper> </mapper>

View File

@@ -6,20 +6,6 @@
<result column="partner_id" jdbcType="VARCHAR" property="partnerId" /> <result column="partner_id" jdbcType="VARCHAR" property="partnerId" />
<result column="partner_line_id" jdbcType="BIGINT" property="partnerLineId" /> <result column="partner_line_id" jdbcType="BIGINT" property="partnerLineId" />
<result column="partner_interview_id" jdbcType="BIGINT" property="partnerInterviewId" /> <result column="partner_interview_id" jdbcType="BIGINT" property="partnerInterviewId" />
<result column="partnership" jdbcType="VARCHAR" property="partnership" />
<result column="want_sign_time" jdbcType="TIMESTAMP" property="wantSignTime" />
<result column="partner_fee" jdbcType="VARCHAR" property="partnerFee" />
<result column="security_fund" jdbcType="VARCHAR" property="securityFund" />
<result column="technical_service_fee" jdbcType="VARCHAR" property="technicalServiceFee" />
<result column="intention_money" jdbcType="VARCHAR" property="intentionMoney" />
<result column="intention_signer_username" jdbcType="VARCHAR" property="intentionSignerUsername" />
<result column="intention_signer_mobile" jdbcType="VARCHAR" property="intentionSignerMobile" />
<result column="intention_edu" jdbcType="VARCHAR" property="intentionEdu" />
<result column="real_control_username" jdbcType="VARCHAR" property="realControlUsername" />
<result column="real_control_idcard" jdbcType="VARCHAR" property="realControlIdcard" />
<result column="signer_real_control_relation" jdbcType="VARCHAR" property="signerRealControlRelation" />
<result column="signer_other_real_control_relation" jdbcType="VARCHAR" property="signerOtherRealControlRelation" />
<result column="signer_real_control_relation_cert" jdbcType="VARCHAR" property="signerRealControlRelationCert" />
<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" />
</resultMap> </resultMap>
@@ -42,53 +28,17 @@
<if test="record.partnerInterviewId != null"> <if test="record.partnerInterviewId != null">
partner_interview_id, partner_interview_id,
</if> </if>
<if test="record.partnership != null">
partnership,
</if>
<if test="record.qualifyVerifyId != null"> <if test="record.qualifyVerifyId != null">
qualify_verify_id, qualify_verify_id,
</if> </if>
<if test="record.intentionContractNo != null"> <if test="record.intentionContractNo != null">
intention_contract_no, intention_contract_no,
</if> </if>
<if test="record.wantSignTime != null"> <if test="record.dataSource != null">
want_sign_time, data_source,
</if> </if>
<if test="record.partnerFee != null"> <if test="record.certificationInfoRecordJson != null">
partner_fee, certification_info_record_json,
</if>
<if test="record.securityFund != null">
security_fund,
</if>
<if test="record.technicalServiceFee != null">
technical_service_fee,
</if>
<if test="record.intentionMoney != null">
intention_money,
</if>
<if test="record.intentionSignerUsername != null">
intention_signer_username,
</if>
<if test="record.intentionSignerMobile != null">
intention_signer_mobile,
</if>
<if test="record.intentionEdu != null">
intention_edu,
</if>
<if test="record.realControlUsername != null">
real_control_username,
</if>
<if test="record.realControlIdcard != null">
real_control_idcard,
</if>
<if test="record.signerRealControlRelation != null">
signer_real_control_relation,
</if>
<if test="record.signerOtherRealControlRelation != null">
signer_other_real_control_relation,
</if>
<if test="record.signerRealControlRelationCert != null">
signer_real_control_relation_cert,
</if> </if>
<if test="record.createTime != null"> <if test="record.createTime != null">
create_time, create_time,
@@ -107,56 +57,17 @@
<if test="record.partnerInterviewId != null"> <if test="record.partnerInterviewId != null">
#{record.partnerInterviewId}, #{record.partnerInterviewId},
</if> </if>
<if test="record.partnership != null">
#{record.partnership},
</if>
<if test="record.qualifyVerifyId != null"> <if test="record.qualifyVerifyId != null">
#{record.qualifyVerifyId}, #{record.qualifyVerifyId},
</if> </if>
<if test="record.intentionContractNo != null"> <if test="record.intentionContractNo != null">
#{record.intentionContractNo}, #{record.intentionContractNo},
</if> </if>
<if test="record.wantSignTime != null">
#{record.wantSignTime},
</if>
<if test="record.dataSource != null"> <if test="record.dataSource != null">
#{record.dataSource}, #{record.dataSource},
</if> </if>
<if test="record.partnerFee != null"> <if test="record.certificationInfoRecordJson != null">
#{record.partnerFee}, #{record.certificationInfoRecordJson},
</if>
<if test="record.securityFund != null">
#{record.securityFund},
</if>
<if test="record.technicalServiceFee != null">
#{record.technicalServiceFee},
</if>
<if test="record.intentionMoney != null">
#{record.intentionMoney},
</if>
<if test="record.intentionSignerUsername != null">
#{record.intentionSignerUsername},
</if>
<if test="record.intentionSignerMobile != null">
#{record.intentionSignerMobile},
</if>
<if test="record.intentionEdu != null">
#{record.intentionEdu},
</if>
<if test="record.realControlUsername != null">
#{record.realControlUsername},
</if>
<if test="record.realControlIdcard != null">
#{record.realControlIdcard},
</if>
<if test="record.signerRealControlRelation != null">
#{record.signerRealControlRelation},
</if>
<if test="record.signerOtherRealControlRelation != null">
#{record.signerOtherRealControlRelation},
</if>
<if test="record.signerRealControlRelationCert != null">
#{record.signerRealControlRelationCert},
</if> </if>
<if test="record.createTime != null"> <if test="record.createTime != null">
#{record.createTime}, #{record.createTime},
@@ -178,53 +89,17 @@
<if test="record.partnerInterviewId != null"> <if test="record.partnerInterviewId != null">
partner_interview_id = #{record.partnerInterviewId}, partner_interview_id = #{record.partnerInterviewId},
</if> </if>
<if test="record.partnership != null">
partnership = #{record.partnership},
</if>
<if test="record.qualifyVerifyId != null"> <if test="record.qualifyVerifyId != null">
qualify_verify_id = #{record.qualifyVerifyId}, qualify_verify_id = #{record.qualifyVerifyId},
</if> </if>
<if test="record.intentionContractNo != null"> <if test="record.intentionContractNo != null">
intention_contract_no = #{record.intentionContractNo}, intention_contract_no = #{record.intentionContractNo},
</if> </if>
<if test="record.wantSignTime != null"> <if test="record.dataSource != null">
want_sign_time = #{record.wantSignTime}, data_source = #{record.dataSource},
</if> </if>
<if test="record.partnerFee != null"> <if test="record.certificationInfoRecordJson != null">
partner_fee = #{record.partnerFee}, certification_info_record_json = #{record.certificationInfoRecordJson},
</if>
<if test="record.securityFund != null">
security_fund = #{record.securityFund},
</if>
<if test="record.technicalServiceFee != null">
technical_service_fee = #{record.technicalServiceFee},
</if>
<if test="record.intentionMoney != null">
intention_money = #{record.intentionMoney},
</if>
<if test="record.intentionSignerUsername != null">
intention_signer_username = #{record.intentionSignerUsername},
</if>
<if test="record.intentionSignerMobile != null">
intention_signer_mobile = #{record.intentionSignerMobile},
</if>
<if test="record.intentionEdu != null">
intention_edu = #{record.intentionEdu},
</if>
<if test="record.realControlUsername != null">
real_control_username = #{record.realControlUsername},
</if>
<if test="record.realControlIdcard != null">
real_control_idcard = #{record.realControlIdcard},
</if>
<if test="record.signerRealControlRelation != null">
signer_real_control_relation = #{record.signerRealControlRelation},
</if>
<if test="record.signerOtherRealControlRelation != null">
signer_other_real_control_relation = #{record.signerOtherRealControlRelation},
</if>
<if test="record.signerRealControlRelationCert != null">
signer_real_control_relation_cert = #{record.signerRealControlRelationCert},
</if> </if>
<if test="record.createTime != null"> <if test="record.createTime != null">
create_time = #{record.createTime}, create_time = #{record.createTime},
@@ -262,4 +137,10 @@
) )
and deleted = 0 and deleted = 0
</select> </select>
<select id="selectByPartnerLineId" resultType="com.cool.store.entity.HyPartnerCertificationInfoDO">
select
<include refid="Base_Column_List" />
from hy_partner_certification_info
where partner_line_id = #{partnerLineId}
</select>
</mapper> </mapper>

View File

@@ -477,6 +477,14 @@
FROM hy_partner_interview FROM hy_partner_interview
WHERE interview_plan_id = #{interviewPlanId} WHERE interview_plan_id = #{interviewPlanId}
</select> </select>
<select id="queryByPartnerLineId" resultType="com.cool.store.vo.PartnerInterviewInfoVO">
SELECT t1.id interviewId, t1.id interview_id, t2.id as interviewPlanId, `status`, start_time, end_time, room_id, t1.partner_id partnerId, t1.interviewer interviewerId
FROM hy_partner_interview_plan t2
LEFT JOIN hy_partner_interview t1 ON t1.interview_plan_id = t2.id
WHERE t2.partner_line_id = #{partnerLineId}
AND t1.deleted = 0
AND t2.deleted = 0
</select>
<!-- 根据 room_id 添加 process_info --> <!-- 根据 room_id 添加 process_info -->
<update id="addVideoUrl"> <update id="addVideoUrl">

View File

@@ -312,7 +312,10 @@
left join hy_partner_interview a on hpli.id = a.partner_line_id left join hy_partner_interview a on hpli.id = a.partner_line_id
left join hy_partner_interview_plan b on a.interview_plan_id = b.id left join hy_partner_interview_plan b on a.interview_plan_id = b.id
<where> <where>
and hpli.deleted = 0 and hpli.line_status!=3 and b.deleted = 0 and hpli.deleted = 0 and hpli.line_status!=3
<if test="filter">
and b.deleted = 0
</if>
<if test="workflowStage!=null and workflowStage!=''"> <if test="workflowStage!=null and workflowStage!=''">
and hpli.workflow_stage = #{workflowStage} and hpli.workflow_stage = #{workflowStage}
</if> </if>

View File

@@ -20,12 +20,13 @@
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" /> <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
<result column="close_time" jdbcType="TIMESTAMP" property="closeTime" /> <result column="close_time" jdbcType="TIMESTAMP" property="closeTime" />
<result column="close_user_id" jdbcType="VARCHAR" property="closeUserId" /> <result column="close_user_id" jdbcType="VARCHAR" property="closeUserId" />
<result column="user_channel_id" jdbcType="BIGINT" property="userChannelId" />
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
id, partner_id, workflow_stage, workflow_status, line_status, investment_manager, id, partner_id, workflow_stage, workflow_status, line_status, investment_manager,
development_director, development_manager, deadline, pass_reason, reject_public_reason, development_director, development_manager, deadline, pass_reason, reject_public_reason,
reject_real_reason, certify_file, deleted, create_time, update_time, close_time, reject_real_reason, certify_file, deleted, create_time, update_time, close_time,
close_user_id close_user_id,user_channel_id
</sql> </sql>
<select id="selectByPrimaryKeySelective" resultMap="BaseResultMap"> <select id="selectByPrimaryKeySelective" resultMap="BaseResultMap">
@@ -124,6 +125,9 @@
<if test="record.closeUserId != null"> <if test="record.closeUserId != null">
close_user_id, close_user_id,
</if> </if>
<if test="record.userChannelId != null">
user_channel_id,
</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="record.partnerId != null"> <if test="record.partnerId != null">
@@ -177,6 +181,9 @@
<if test="record.closeUserId != null"> <if test="record.closeUserId != null">
#{record.closeUserId}, #{record.closeUserId},
</if> </if>
<if test="record.userChannelId != null">
#{record.userChannelId},
</if>
</trim> </trim>
</insert> </insert>
<update id="updateByPrimaryKeySelective"> <update id="updateByPrimaryKeySelective">
@@ -239,6 +246,9 @@
<if test="record.removeBlackReason != null"> <if test="record.removeBlackReason != null">
remove_black_reason = #{record.removeBlackReason}, remove_black_reason = #{record.removeBlackReason},
</if> </if>
<if test="record.userChannelId != null">
user_channel_id = #{record.userChannelId},
</if>
</set> </set>
where id = #{record.id} where id = #{record.id}
</update> </update>
@@ -569,7 +579,7 @@
<select id="getLineFollowHistoryList" resultMap="BaseResultMap"> <select id="getLineFollowHistoryList" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List"></include> SELECT <include refid="Base_Column_List"></include>
FROM hy_partner_line_info FROM hy_partner_line_info
where (deleted = 1 or (deleted=0 and line_status=0 and close_time is not null)) where (deleted = 1 or (deleted=0 and line_status in (0,3) and close_time is not null))
and partner_id = #{partner_id} and partner_id = #{partner_id}
</select> </select>

View File

@@ -133,4 +133,13 @@
</set> </set>
where id = #{record.id} where id = #{record.id}
</update> </update>
<select id="selectByPartnerLineIdAndOperateType" resultMap="ResultMapWithBLOBs">
select
<include refid="Base_Column_List"/>,
<include refid="Blob_Column_List"/>
from hy_partner_task_info_log
where partner_line_id = #{partnerLineId}
and operate_type = #{operateType}
order by create_time desc
</select>
</mapper> </mapper>

View File

@@ -0,0 +1,93 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.cool.store.mapper.HyPartnerUserChannelMapper">
<resultMap id="BaseResultMap" type="com.cool.store.entity.HyPartnerUserChannelDO">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="channel_id" jdbcType="BIGINT" property="channelId" />
<result column="channel_name" jdbcType="VARCHAR" property="channelName" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
</resultMap>
<sql id="Base_Column_List">
id, channel_id, channel_name, create_time, update_time
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from hy_partner_user_channel
where id = #{id,jdbcType=BIGINT}
</select>
<select id="selectByChannelId" parameterType="java.lang.Long" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from hy_partner_user_channel
where channel_id = #{channelId} limit 1
</select>
<select id="selectByChannelName" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from hy_partner_user_channel
where channel_name = #{channelName} limit 1
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from hy_partner_user_channel
where id = #{id,jdbcType=BIGINT}
</delete>
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.cool.store.entity.HyPartnerUserChannelDO" useGeneratedKeys="true">
insert into hy_partner_user_channel (channel_id, channel_name, create_time,
update_time)
values (#{channelId,jdbcType=BIGINT}, #{channelName,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP},
#{updateTime,jdbcType=TIMESTAMP})
</insert>
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.cool.store.entity.HyPartnerUserChannelDO" useGeneratedKeys="true">
insert into hy_partner_user_channel
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="channelId != null">
channel_id,
</if>
<if test="channelName != null">
channel_name,
</if>
<if test="createTime != null">
create_time,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="channelId != null">
#{channelId,jdbcType=BIGINT},
</if>
<if test="channelName != null">
#{channelName,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.cool.store.entity.HyPartnerUserChannelDO">
update hy_partner_user_channel
<set>
<if test="channelId != null">
channel_id = #{channelId,jdbcType=BIGINT},
</if>
<if test="channelName != null">
channel_name = #{channelName,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.cool.store.entity.HyPartnerUserChannelDO">
update hy_partner_user_channel
set channel_id = #{channelId,jdbcType=BIGINT},
channel_name = #{channelName,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>

View File

@@ -51,6 +51,18 @@
</if> </if>
</where> </where>
</select> </select>
<select id="selectByHourDate" resultType="com.cool.store.entity.SyncEcCustomerDO" >
SELECT a.id as id, a.username as customername,a.mobile as customermobile,c.`name` as followname,c.mobile as followmobile FROM hy_partner_user_info a LEFT join hy_partner_line_info b on
a.partner_id=b.partner_id left join enterprise_user c on b.investment_manager=c.user_id
WHERE a.create_time BETWEEN #{selectTime} and #{now} or
a.update_time BETWEEN #{selectTime} and #{now} order by a.id Limit #{limit1},#{limit2}
</select>
<select id="selectByHourDateCount" resultType="java.lang.Integer">
SELECT count(*) FROM hy_partner_user_info a LEFT join hy_partner_line_info b on
a.partner_id=b.partner_id left join enterprise_user c on b.investment_manager=c.user_id
WHERE a.create_time BETWEEN #{selectTime} and #{now} or
a.update_time BETWEEN #{selectTime} and #{now}
</select>
<insert id="insertSelective" keyColumn="id" keyProperty="record.id" useGeneratedKeys="true"> <insert id="insertSelective" keyColumn="id" keyProperty="record.id" useGeneratedKeys="true">
insert into hy_partner_user_info insert into hy_partner_user_info

View File

@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.cool.store.mapper.MdmAreaMapper">
<!-- 获取 MDM 省级地区数据 -->
<select id="getProvince" resultType="com.cool.store.entity.MDMAreaDO">
SELECT id, instance_id, code, area_name, parent_code
FROM mdm_area
WHERE parent_code = '0'
</select>
<!-- 获取子级区域 -->
<select id="getSonArea" resultType="com.cool.store.entity.MDMAreaDO">
SELECT id, instance_id, code, area_name, parent_code
FROM mdm_area
WHERE parent_code = #{code}
</select>
</mapper>

View File

@@ -0,0 +1,16 @@
package com.cool.store.dto.log;
import lombok.Data;
import lombok.experimental.SuperBuilder;
/**
* @Author: young.yu
* @Date: 2023-06-28 00:54
* @Description:
*/
@Data
@SuperBuilder
public class CreateQualifyVerifyDTO extends LogBasicDTO{
private String summary;
private String qualiVerifyContent;
}

View File

@@ -0,0 +1,18 @@
package com.cool.store.dto.log;
import lombok.Data;
import lombok.experimental.SuperBuilder;
/**
* @Author: young.yu
* @Date: 2023-06-28 00:31
* @Description:
*/
@Data
@SuperBuilder
public class EntrustOthersDTO extends LogBasicDTO{
private String beforeInterviwerName;
private String beforeInterviwerMobile;
private String afterInterviwerName;
private String afterInterviwerMobile;
}

View File

@@ -0,0 +1,22 @@
package com.cool.store.dto.log;
import lombok.Builder;
import lombok.Data;
import lombok.experimental.SuperBuilder;
/**
* @Author: young.yu
* @Date: 2023-06-27 23:00
* @Description:
*/
@Data
@SuperBuilder
public class LogBasicDTO {
private String operateUsername;
private String operateUserId;
private String mobile;
private String operateTime;
}

View File

@@ -0,0 +1,15 @@
package com.cool.store.dto.log;
import lombok.Data;
/**
* @Author: young.yu
* @Date: 2023-06-28 15:32
* @Description:
*/
@Data
public class LogFieldDTO {
private String code;
private String name;
private String value;
}

View File

@@ -0,0 +1,17 @@
package com.cool.store.dto.log;
import lombok.Builder;
import lombok.Data;
import lombok.experimental.SuperBuilder;
/**
* @Author: young.yu
* @Date: 2023-06-28 00:23
* @Description:
*/
@Data
@SuperBuilder
public class ModifyInterviewTimeDTO extends LogBasicDTO{
private String beforeInterviewTime;
private String afterInterviewTime;
}

View File

@@ -0,0 +1,16 @@
package com.cool.store.dto.log;
import lombok.Data;
import lombok.experimental.SuperBuilder;
/**
* @Author: young.yu
* @Date: 2023-06-28 00:43
* @Description:
*/
@Data
@SuperBuilder
public class ReInterviewDTO extends LogBasicDTO{
private String rejectRealReason;
private String certifyFile;
}

View File

@@ -0,0 +1,21 @@
package com.cool.store.dto.log;
import lombok.Data;
import lombok.experimental.SuperBuilder;
import java.util.List;
/**
* @Author: young.yu
* @Date: 2023-06-28 00:43
* @Description:
*/
@Data
@SuperBuilder
public class RejectInterviewDTO extends LogBasicDTO{
private List<String> certifyFile;
private String rejectPublicReason;
private String rejectRealReason;
}

View File

@@ -0,0 +1,12 @@
package com.cool.store.dto.mdm;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
public class AreaSonDTO {
@ApiModelProperty("父级code")
private String code;
}

View File

@@ -0,0 +1,12 @@
package com.cool.store.dto.partner;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
public class LineQueryInterviewDto {
@ApiModelProperty("加盟商线索id")
private String partnerLineId;
}

View File

@@ -0,0 +1,62 @@
package com.cool.store.dto.trtc.callback;
import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonProperty;
/**
* @Author: young.yu
* @Date: 2023-06-29 01:17
* @Description:
*/
public class EventInfo {
@JsonProperty("RoomId")
private String roomId;
@JsonProperty("EventTs")
private long eventTs;
@JsonProperty("UserId")
private String userId;
@JsonProperty("TaskId")
private String taskId;
@JsonProperty("Payload")
private Payload payload;
public String getRoomId() {
return roomId;
}
public void setRoomId(String roomId) {
this.roomId = roomId;
}
public long getEventTs() {
return eventTs;
}
public void setEventTs(long eventTs) {
this.eventTs = eventTs;
}
public String getUserId() {
return userId;
}
public void setUserId(String userId) {
this.userId = userId;
}
public String getTaskId() {
return taskId;
}
public void setTaskId(String taskId) {
this.taskId = taskId;
}
public Payload getPayload() {
return payload;
}
public void setPayload(Payload payload) {
this.payload = payload;
}
}

View File

@@ -0,0 +1,32 @@
package com.cool.store.dto.trtc.callback;
import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonProperty;
/**
* @Author: young.yu
* @Date: 2023-06-29 01:17
* @Description:
*/
public class Payload {
@JsonProperty("Status")
private int status;
@JsonProperty("TencentVod")
private TencentVod tencentVod;
public int getStatus() {
return status;
}
public void setStatus(int status) {
this.status = status;
}
public TencentVod getTencentVod() {
return tencentVod;
}
public void setTencentVod(TencentVod tencentVod) {
this.tencentVod = tencentVod;
}
}

View File

@@ -0,0 +1,92 @@
package com.cool.store.dto.trtc.callback;
import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonProperty;
/**
* @Author: young.yu
* @Date: 2023-06-29 01:18
* @Description:
*/
public class TencentVod {
@JsonProperty("UserId")
private String userId;
@JsonProperty("TrackType")
private String trackType;
@JsonProperty("MediaId")
private String mediaId;
@JsonProperty("FileId")
private String fileId;
@JsonProperty("VideoUrl")
private String videoUrl;
@JsonProperty("CacheFile")
private String cacheFile;
@JsonProperty("StartTimeStamp")
private long startTimeStamp;
@JsonProperty("EndTimeStamp")
private int endTimeStamp;
public String getUserId() {
return userId;
}
public void setUserId(String userId) {
this.userId = userId;
}
public String getTrackType() {
return trackType;
}
public void setTrackType(String trackType) {
this.trackType = trackType;
}
public String getMediaId() {
return mediaId;
}
public void setMediaId(String mediaId) {
this.mediaId = mediaId;
}
public String getFileId() {
return fileId;
}
public void setFileId(String fileId) {
this.fileId = fileId;
}
public String getVideoUrl() {
return videoUrl;
}
public void setVideoUrl(String videoUrl) {
this.videoUrl = videoUrl;
}
public String getCacheFile() {
return cacheFile;
}
public void setCacheFile(String cacheFile) {
this.cacheFile = cacheFile;
}
public long getStartTimeStamp() {
return startTimeStamp;
}
public void setStartTimeStamp(long startTimeStamp) {
this.startTimeStamp = startTimeStamp;
}
public int getEndTimeStamp() {
return endTimeStamp;
}
public void setEndTimeStamp(int endTimeStamp) {
this.endTimeStamp = endTimeStamp;
}
}

View File

@@ -0,0 +1,52 @@
package com.cool.store.dto.trtc.callback;
import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonProperty;
/**
* @Author: young.yu
* @Date: 2023-06-29 01:16
* @Description:
*/
public class VideoCallBackDTO {
@JsonProperty("EventGroupId")
private int eventGroupId;
@JsonProperty("EventType")
private int eventType;
@JsonProperty("CallbackTs")
private long callbackTs;
@JsonProperty("EventInfo")
private EventInfo eventInfo;
public int getEventGroupId() {
return eventGroupId;
}
public void setEventGroupId(int eventGroupId) {
this.eventGroupId = eventGroupId;
}
public int getEventType() {
return eventType;
}
public void setEventType(int eventType) {
this.eventType = eventType;
}
public long getCallbackTs() {
return callbackTs;
}
public void setCallbackTs(long callbackTs) {
this.callbackTs = callbackTs;
}
public EventInfo getEventInfo() {
return eventInfo;
}
public void setEventInfo(EventInfo eventInfo) {
this.eventInfo = eventInfo;
}
}

View File

@@ -7,6 +7,7 @@ import lombok.AllArgsConstructor;
import lombok.Builder; import lombok.Builder;
import lombok.Data; import lombok.Data;
import lombok.NoArgsConstructor; import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
/** /**
* *
@@ -17,6 +18,7 @@ import lombok.NoArgsConstructor;
@Builder @Builder
@NoArgsConstructor @NoArgsConstructor
@AllArgsConstructor @AllArgsConstructor
@Accessors(chain = true)
public class HyPartnerBaseInfoDO implements Serializable { public class HyPartnerBaseInfoDO implements Serializable {
@ApiModelProperty("") @ApiModelProperty("")
private Long id; private Long id;

View File

@@ -30,56 +30,17 @@ public class HyPartnerCertificationInfoDO implements Serializable {
@ApiModelProperty("hy_partner_interview.id") @ApiModelProperty("hy_partner_interview.id")
private Long partnerInterviewId; private Long partnerInterviewId;
@ApiModelProperty("合作关系:1总部下属;2小区代直营;3县代直营;4县代下属;5区代直营;6区代下属")
private String partnership;
@ApiModelProperty("资质审核流程id") @ApiModelProperty("资质审核流程id")
private String qualifyVerifyId; private String qualifyVerifyId;
@ApiModelProperty("意向合同编号") @ApiModelProperty("意向合同编号")
private String intentionContractNo; private String intentionContractNo;
@ApiModelProperty("意向签约时间")
private Date wantSignTime;
@ApiModelProperty("数据来源") @ApiModelProperty("数据来源")
private String dataSource; private String dataSource;
@ApiModelProperty("加盟费") @ApiModelProperty("发起资质审核信息记录json字段")
private String partnerFee; private String certificationInfoRecordJson;
@ApiModelProperty("保证金")
private String securityFund;
@ApiModelProperty("技术服务费")
private String technicalServiceFee;
@ApiModelProperty("意向金金额")
private String intentionMoney;
@ApiModelProperty("意向签约人姓名")
private String intentionSignerUsername;
@ApiModelProperty("意向签约人手机号")
private String intentionSignerMobile;
@ApiModelProperty("意向签约人学历")
private String intentionEdu;
@ApiModelProperty("实控人姓名")
private String realControlUsername;
@ApiModelProperty("实控人身份证")
private String realControlIdcard;
@ApiModelProperty("签约人与实控人关系")
private String signerRealControlRelation;
@ApiModelProperty("其他实控人与签约人关系")
private String signerOtherRealControlRelation;
@ApiModelProperty("实控人与签约人关系证明")
private String signerRealControlRelationCert;
@ApiModelProperty("创建时间") @ApiModelProperty("创建时间")
private Date createTime; private Date createTime;

View File

@@ -7,6 +7,7 @@ import lombok.AllArgsConstructor;
import lombok.Builder; import lombok.Builder;
import lombok.Data; import lombok.Data;
import lombok.NoArgsConstructor; import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
/** /**
* *
@@ -17,6 +18,7 @@ import lombok.NoArgsConstructor;
@Builder @Builder
@NoArgsConstructor @NoArgsConstructor
@AllArgsConstructor @AllArgsConstructor
@Accessors(chain = true)
public class HyPartnerLineInfoDO implements Serializable { public class HyPartnerLineInfoDO implements Serializable {
@ApiModelProperty("") @ApiModelProperty("")
private Long id; private Long id;
@@ -77,4 +79,7 @@ public class HyPartnerLineInfoDO implements Serializable {
@ApiModelProperty("移除黑名单原因") @ApiModelProperty("移除黑名单原因")
private String removeBlackReason; private String removeBlackReason;
@ApiModelProperty("hy_partner_user_channel.id")
private Integer userChannelId;
} }

View File

@@ -0,0 +1,43 @@
package com.cool.store.entity;
import java.io.Serializable;
import java.util.Date;
import com.alibaba.fastjson.annotation.JSONField;
import lombok.Data;
import lombok.experimental.Accessors;
import javax.naming.Name;
/**
* hy_partner_user_channel
* @author
*/
@Data
@Accessors(chain = true)
public class HyPartnerUserChannelDO implements Serializable {
private Long id;
/**
* 来源id
*/
private Long channelId;
/**
* 来源名称
*/
private String channelName;
/**
* 创建时间
*/
private Date createTime;
/**
* 更新时间
*/
private Date updateTime;
private static final long serialVersionUID = 1L;
}

View File

@@ -7,6 +7,7 @@ import lombok.AllArgsConstructor;
import lombok.Builder; import lombok.Builder;
import lombok.Data; import lombok.Data;
import lombok.NoArgsConstructor; import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
/** /**
* *
@@ -17,6 +18,7 @@ import lombok.NoArgsConstructor;
@Builder @Builder
@NoArgsConstructor @NoArgsConstructor
@AllArgsConstructor @AllArgsConstructor
@Accessors(chain = true)
public class HyPartnerUserInfoDO implements Serializable { public class HyPartnerUserInfoDO implements Serializable {
@ApiModelProperty("") @ApiModelProperty("")
private Long id; private Long id;

View File

@@ -4,7 +4,7 @@ import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
@Data @Data
public class ApprovalRegionDO { public class MDMAreaDO {
@ApiModelProperty("id") @ApiModelProperty("id")
private Integer id; private Integer id;
@@ -16,7 +16,7 @@ public class ApprovalRegionDO {
private String code; private String code;
@ApiModelProperty("地区名") @ApiModelProperty("地区名")
private String regionName; private String areaName;
@ApiModelProperty("地区父级编号") @ApiModelProperty("地区父级编号")
private String parentCode; private String parentCode;

View File

@@ -0,0 +1,19 @@
package com.cool.store.entity;
import lombok.Data;
import lombok.experimental.Accessors;
@Data
@Accessors(chain = true)
public class SyncEcCustomerDO {
private Long id;
private String customername;
private String customermobile;
private String followname;
private String followmobile;
}

View File

@@ -0,0 +1,26 @@
package com.cool.store.request;
import lombok.Data;
/**
* @author hxd
* @since 2023/2/28
*/
@Data
public class CustomerInfoRequest {
private Long crmId;
private String mobile;
private String name;
private String channel;
private String followUserMobile;
private Long lastFollowUserId;
private String followUserName;
}

View File

@@ -0,0 +1,15 @@
package com.cool.store.request;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @Author: young.yu
* @Date: 2023-06-28 15:05
* @Description:
*/
@Data
@ApiModel
public class GetTipsInfoReq {
@ApiModelProperty("线索id")
private String partnerLineId;
}

View File

@@ -12,7 +12,7 @@ public class QualificationCallbackReq {
private String instanceId; private String instanceId;
@ApiModelProperty(value = "流程状态 已完成FINISHED, 已作废CANCELED", required = true) @ApiModelProperty(value = "流程状态 已完成FINISHED, 已作废CANCELED", required = true)
private String sequenceStatus; private String instanceStatus;
@ApiModelProperty(value = "意向签约人", required = true) @ApiModelProperty(value = "意向签约人", required = true)
private String intendedSigner; private String intendedSigner;

View File

@@ -22,4 +22,6 @@ public class ApplyBaseInfoVO {
@ApiModelProperty("线索状态:0公海线索;1跟进中;2合作中;3黑名单") @ApiModelProperty("线索状态:0公海线索;1跟进中;2合作中;3黑名单")
private Integer lineStatus; private Integer lineStatus;
@ApiModelProperty("线索id")
private Long partnerLineId;
} }

View File

@@ -0,0 +1,29 @@
package com.cool.store.http;
import lombok.Data;
import lombok.experimental.Accessors;
import java.util.List;
@Data
@Accessors(chain = true)
public class UserSourceResponse {
private Integer code;
private String msg;
private List<ChannelSource> data;
@Data
@Accessors(chain = true)
public static class ChannelSource{
private String createTime;
private Long id;
private String name;
private Integer userId;
}
}

View File

@@ -0,0 +1,93 @@
package com.cool.store.job;
import cn.hutool.core.date.DateUtil;
import com.cool.store.entity.SyncEcCustomerDO;
import com.cool.store.mapper.HyPartnerLineInfoMapper;
import com.cool.store.mapper.HyPartnerUserInfoMapper;
import com.cool.store.sdk.ec.EcClient;
import com.cool.store.sdk.ec.request.SyncEcCustomerRequest;
import com.cool.store.service.EcSyncService;
import com.xxl.job.core.context.XxlJobHelper;
import com.xxl.job.core.handler.annotation.XxlJob;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
import javax.annotation.Resource;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import java.util.List;
@Slf4j
@Component
public class EcSyncDataJob {
@XxlJob("SyncUserSourceJob")
public void syncUserSourceJob() {
XxlJobHelper.log("-------------------------------定时同步客户来源开始-------------------------------");
syncUserSourceExecute();
XxlJobHelper.log("-------------------------------定时同步客户来源结束-------------------------------");
XxlJobHelper.handleSuccess();
}
@Value("${ec.baseUrl:null}")
private String baseUrl;
@XxlJob("SyncAppletToEcJob")
public void syncAppletToEcJob() {
XxlJobHelper.log("-------------------------------定时同步小程序数据到ec开始-------------------------------");
syncAppletToEcExecute();
XxlJobHelper.log("-------------------------------定时同步小程序数据到ec结束-------------------------------");
XxlJobHelper.handleSuccess();
}
@Resource
private EcSyncService ecSyncService;
@Resource
private HyPartnerUserInfoMapper hyPartnerUserInfoMapper;
//定时同步用户来源开始
private void syncUserSourceExecute() {
ecSyncService.getChannelSource();
}
private final Integer count=50;
//定时同步小程序数据到ec
private void syncAppletToEcExecute() {
//获取总数
int size = hyPartnerUserInfoMapper.selectByHourDateCount(getHourDayDate(-5, 0), DateUtil.now());
//执行数
int counts = size / count;
//取余如果大于1就再加一
int yu = size % count;
if (yu > 0) {
counts += 1;
}
for (int i = 1; i <= counts; i++) {
List<SyncEcCustomerDO> list = hyPartnerUserInfoMapper.selectByHourDate(getHourDayDate(-5, 0), DateUtil.now(),count * (i - 1),count);
SyncEcCustomerRequest syncEcCustomerRequest = new SyncEcCustomerRequest();
syncEcCustomerRequest.setParameter(list);
EcClient ecClient = new EcClient();
ecClient.exec(baseUrl,syncEcCustomerRequest);
}
}
private static String getHourDayDate(int hour, int day) {
Date today = new Date();
Calendar calendar = Calendar.getInstance();
calendar.setTime(today);
calendar.add(Calendar.HOUR, hour);
calendar.add(Calendar.DAY_OF_MONTH, day);
Date twoDay = calendar.getTime();
return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(twoDay);
}
}

View File

@@ -0,0 +1,37 @@
package com.cool.store.sdk.ec;
import com.alibaba.fastjson.JSON;
import com.cool.store.sdk.ec.core.EcRequest;
import com.cool.store.sdk.ec.core.EcResponse;
import com.cool.store.utils.Get;
import com.cool.store.utils.MapUtil;
import com.cool.store.utils.Post;
import lombok.SneakyThrows;
import org.springframework.beans.factory.annotation.Value;
import java.util.HashMap;
public class EcClient {
@SneakyThrows
public <T extends EcResponse> T exec(String baseUrl,EcRequest<T> request) {
String apiUrl = request.getApiUrl();
// if (accessToken != null) {
// apiUrl += "?token=" + accessToken;
// }
String method = request.getMethod();
String result = "";
if (method.equals("GET")) {
result = Get.send(baseUrl+apiUrl, MapUtil.entityToUrlParam(request.getParameter()));
} else {
HashMap<String,String> headers = new HashMap<>(1);
headers.put("Content-Type", "application/json");
result = Post.send(baseUrl+apiUrl, JSON.toJSONString(request.getParameter()), headers);
}
return JSON.parseObject(result, request.getResponseClass());
}
}

View File

@@ -0,0 +1,24 @@
package com.cool.store.sdk.ec.bo;
import lombok.Data;
import lombok.experimental.Accessors;
/**
* @author hxd
*/
@Data
@Accessors(chain = true)
public class ChangeFollowUserBo {
//跟进人
private Long crmId;
private String username;
private String mobile;
private Long followUserId;
//1:更新跟进人 2创建跟进人并更改跟进人
private Integer type;
}

View File

@@ -0,0 +1,9 @@
package com.cool.store.sdk.ec.bo;
import lombok.Data;
import lombok.experimental.Accessors;
@Data
@Accessors(chain = true)
public class SyncEcCustomerBo {
}

View File

@@ -0,0 +1,16 @@
package com.cool.store.sdk.ec.bo;
import lombok.Data;
import lombok.experimental.Accessors;
@Data
@Accessors(chain = true)
public class UpdateCustomerBo {
private String username;
private String mobile;
private Long crmId;
}

View File

@@ -0,0 +1,28 @@
package com.cool.store.sdk.ec.core;
/**
* @author hxd
*/
abstract public class EcRequest <T extends EcResponse> implements EcRequestI<T> {
private Object parameter;
@Override
public String getMethod() {
return "POST";
}
@Override
public Object getParameter() {
return parameter;
}
public void setParameter(Object parameter) {
this.parameter = parameter;
}
@Override
public Class<T> getResponseClass() {
return null;
}
}

View File

@@ -0,0 +1,28 @@
package com.cool.store.sdk.ec.core;
public interface EcRequestI<T extends EcResponse> {
/**
* 地址
* @return -
*/
String getApiUrl();
/**
* 方法
* @return -
*/
String getMethod();
/**
* 设置参数
* @return -
*/
Object getParameter();
/**
* 响应类类型
* @return -
*/
Class<T> getResponseClass();
}

View File

@@ -0,0 +1,14 @@
package com.cool.store.sdk.ec.core;
import lombok.Data;
@Data
public class EcResponse {
private Integer code;
private String msg;
}

View File

@@ -0,0 +1,19 @@
package com.cool.store.sdk.ec.request;
import com.cool.store.sdk.ec.core.EcRequest;
import com.cool.store.sdk.ec.response.ChangeFollowUserResponse;
public class ChangeFollowUserRequest extends EcRequest<ChangeFollowUserResponse> {
@Override
public String getApiUrl() {
return "/ec/selectChangeUser";
}
@Override
public Class<ChangeFollowUserResponse> getResponseClass() {
return ChangeFollowUserResponse.class;
}
}

View File

@@ -0,0 +1,26 @@
package com.cool.store.sdk.ec.request;
import com.cool.store.sdk.ec.core.EcRequest;
import com.cool.store.sdk.ec.response.SyncEcCustomerResponse;
import lombok.Data;
import lombok.experimental.Accessors;
/**
* @author hxd
*/
@Data
@Accessors(chain = true)
public class SyncEcCustomerRequest extends EcRequest<SyncEcCustomerResponse> {
@Override
public String getApiUrl() {
return "/ec/appletToEc";
}
@Override
public Class<SyncEcCustomerResponse> getResponseClass() {
return SyncEcCustomerResponse.class;
}
}

View File

@@ -0,0 +1,21 @@
package com.cool.store.sdk.ec.request;
import com.cool.store.sdk.ec.core.EcRequest;
import com.cool.store.sdk.ec.response.UpdateCustomerResponse;
import lombok.Data;
import lombok.experimental.Accessors;
@Data
@Accessors(chain = true)
public class UpdateCustomerRequest extends EcRequest<UpdateCustomerResponse> {
@Override
public String getApiUrl() {
return "/ec/updateCustomer";
}
@Override
public Class<UpdateCustomerResponse> getResponseClass() {
return UpdateCustomerResponse.class;
}
}

View File

@@ -0,0 +1,15 @@
package com.cool.store.sdk.ec.response;
import com.cool.store.sdk.ec.core.EcResponse;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* @author hxd
*/
@EqualsAndHashCode(callSuper = true)
@Data
public class ChangeFollowUserResponse extends EcResponse {
}

View File

@@ -0,0 +1,16 @@
package com.cool.store.sdk.ec.response;
import com.cool.store.sdk.ec.core.EcResponse;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
/**
* @author hxd
*/
@EqualsAndHashCode(callSuper = true)
@Data
@Accessors(chain = true)
public class SyncEcCustomerResponse extends EcResponse {
}

View File

@@ -0,0 +1,16 @@
package com.cool.store.sdk.ec.response;
import com.cool.store.sdk.ec.core.EcResponse;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
/**
* @author hxd
*/
@EqualsAndHashCode(callSuper = true)
@Data
@Accessors(chain = true)
public class UpdateCustomerResponse extends EcResponse {
}

View File

@@ -0,0 +1,13 @@
package com.cool.store.service;
import com.cool.store.exception.ApiException;
import com.cool.store.request.GetTipsInfoReq;
/**
* @Author: young.yu
* @Date: 2023-06-28 21:34
* @Description:
*/
public interface CommonService {
String getTipsInfo(GetTipsInfoReq request) throws ApiException;
}

View File

@@ -0,0 +1,11 @@
package com.cool.store.service;
import com.cool.store.request.CustomerInfoRequest;
import java.util.List;
public interface EcSyncService {
boolean ecToApplet(List<CustomerInfoRequest> queryListData);
void getChannelSource();
}

View File

@@ -1,5 +1,6 @@
package com.cool.store.service; package com.cool.store.service;
import com.cool.store.exception.ApiException;
import com.cool.store.vo.InterviewDetailInfoVO; import com.cool.store.vo.InterviewDetailInfoVO;
import com.cool.store.vo.PartnerInterviewInfoVO; import com.cool.store.vo.PartnerInterviewInfoVO;
import com.github.pagehelper.PageInfo; import com.github.pagehelper.PageInfo;
@@ -46,7 +47,7 @@ public interface HyPartnerInterviewPlanService {
* updateInterviewOverTime * updateInterviewOverTime
* @return * @return
*/ */
void updateInterviewOverTime(); void updateInterviewOverTime() throws ApiException;
/** /**
* 批量打开十分钟之内开始的面试房间 * 批量打开十分钟之内开始的面试房间
@@ -60,5 +61,5 @@ public interface HyPartnerInterviewPlanService {
* updateInterviewOverTime * updateInterviewOverTime
* @return * @return
*/ */
void updateAbsentInterview(); void updateAbsentInterview() throws ApiException;
} }

View File

@@ -6,6 +6,7 @@ import com.cool.store.exception.ApiException;
import com.cool.store.request.CloseFollowRequest; import com.cool.store.request.CloseFollowRequest;
import com.cool.store.request.LineRequest; import com.cool.store.request.LineRequest;
import com.cool.store.request.PrivateSeaLineListRequest; import com.cool.store.request.PrivateSeaLineListRequest;
import com.cool.store.request.TransferInvestmentManagerRequest;
import com.cool.store.vo.*; import com.cool.store.vo.*;
import com.cool.store.vo.interview.InterviewVO; import com.cool.store.vo.interview.InterviewVO;
import com.github.pagehelper.PageInfo; import com.github.pagehelper.PageInfo;
@@ -57,7 +58,7 @@ public interface HyPartnerLineInfoService {
* @param lineId * @param lineId
* @return * @return
*/ */
Boolean transferInvestmentManager(LoginUserInfo user,String userId,String userName,Long lineId); Boolean transferInvestmentManager(LoginUserInfo user, TransferInvestmentManagerRequest request) throws ApiException;
/** /**
* 分配招商经理 * 分配招商经理
@@ -82,7 +83,7 @@ public interface HyPartnerLineInfoService {
* @param joinReason * @param joinReason
* @return * @return
*/ */
Boolean joinBlackList(LoginUserInfo user, Long lineId, Integer status, String joinReason); Boolean joinBlackList(LoginUserInfo user, Long lineId, Integer status, String joinReason) throws ApiException;
/** /**
* 移除黑名单 * 移除黑名单
@@ -99,7 +100,7 @@ public interface HyPartnerLineInfoService {
* @param closeFollowRequest * @param closeFollowRequest
* @return * @return
*/ */
Boolean closeOrPassFollow(LoginUserInfo user,CloseFollowRequest closeFollowRequest); Boolean closeOrPassFollow(LoginUserInfo user,CloseFollowRequest closeFollowRequest) throws ApiException;
/** /**
* 公海线索 * 公海线索

View File

@@ -68,4 +68,5 @@ public interface InterviewService {
public String getInterviewerByPartner(String partnerId,String lineId)throws ApiException; public String getInterviewerByPartner(String partnerId,String lineId)throws ApiException;
public void rejectInterviewAndSuspendLine(Long iterviewId,Long interviewPlanId,String certifyFile); public void rejectInterviewAndSuspendLine(Long iterviewId,Long interviewPlanId,String certifyFile);
} }

View File

@@ -0,0 +1,16 @@
package com.cool.store.service;
import com.cool.store.context.LoginUserInfo;
import com.cool.store.enums.OperateTypeEnum;
import com.cool.store.vo.PartnerUserInfoVO;
/**
* @Author: young.yu
* @Date: 2023-06-28 00:10
* @Description:
*/
public interface LogService {
public void recordBizLog(LoginUserInfo operator, Long lineId, OperateTypeEnum operateTypeEnum, Object logData);
public void recordPartnerBizLog(PartnerUserInfoVO operator , Long lineId, OperateTypeEnum operateTypeEnum, Object logData);
}

View File

@@ -0,0 +1,20 @@
package com.cool.store.service;
import com.cool.store.entity.MDMAreaDO;
import java.util.List;
public interface MDMAreaService {
/**
* 获取省级数据
*/
List<MDMAreaDO> getProvince();
/**
* 获取子级地区
* @param code 父级 code
*/
List<MDMAreaDO> getSonArea(String code);
}

View File

@@ -1,6 +1,7 @@
package com.cool.store.service; package com.cool.store.service;
import com.cool.store.dto.partner.EnterInterviewDto; import com.cool.store.dto.partner.EnterInterviewDto;
import com.cool.store.dto.partner.LineQueryInterviewDto;
import com.cool.store.exception.ApiException; import com.cool.store.exception.ApiException;
import com.cool.store.request.ModifyInterviewTimeReq; import com.cool.store.request.ModifyInterviewTimeReq;
import com.cool.store.vo.EnterInterviewVO; import com.cool.store.vo.EnterInterviewVO;
@@ -16,6 +17,8 @@ public interface PartnerInterviewService {
*/ */
PartnerInterviewInfoVO queryByPartnerId(String partnerId); PartnerInterviewInfoVO queryByPartnerId(String partnerId);
PartnerInterviewInfoVO queryByPartnerLineId(LineQueryInterviewDto request) throws ApiException;
/** /**
* 进入面试间的方法 * 进入面试间的方法
* 修改一些面试状态 * 修改一些面试状态
@@ -35,4 +38,6 @@ public interface PartnerInterviewService {
*/ */
void modifyInterviewTime(ModifyInterviewTimeReq request) throws ApiException; void modifyInterviewTime(ModifyInterviewTimeReq request) throws ApiException;
} }

View File

@@ -1,5 +1,6 @@
package com.cool.store.service; package com.cool.store.service;
import com.cool.store.dto.trtc.callback.VideoCallBackDTO;
import com.cool.store.request.TRTCVideoCallBackReq; import com.cool.store.request.TRTCVideoCallBackReq;
public interface TRTCVideoService { public interface TRTCVideoService {
@@ -7,6 +8,8 @@ public interface TRTCVideoService {
/** /**
* 音视频上传成功后的回调处理 * 音视频上传成功后的回调处理
*/ */
void handleVideoCallBack(TRTCVideoCallBackReq req); // void handleVideoCallBack(TRTCVideoCallBackReq req);
void handleVideoCallBack(VideoCallBackDTO videoCallBackDTO);
} }

View File

@@ -18,7 +18,7 @@ public interface WorkFlowService {
* @param workflowStage * @param workflowStage
* @param request * @param request
*/ */
void endProcess(WorkflowStageEnum workflowStage, CloseFollowRequest request); void endProcess(WorkflowStageEnum workflowStage, CloseFollowRequest request) throws ApiException;
/** /**
* 转让招商经理 * 转让招商经理

View File

@@ -0,0 +1,129 @@
package com.cool.store.service.impl;
import cn.hutool.core.date.DateUtil;
import com.alibaba.fastjson.JSONObject;
import com.cool.store.dto.log.LogFieldDTO;
import com.cool.store.entity.HyPartnerCertificationInfoDO;
import com.cool.store.entity.HyPartnerLineInfoDO;
import com.cool.store.entity.HyPartnerTaskInfoLogDO;
import com.cool.store.enums.OperateLogFieldValueEnum;
import com.cool.store.enums.OperateTypeEnum;
import com.cool.store.enums.WorkflowStageEnum;
import com.cool.store.enums.WorkflowStatusEnum;
import com.cool.store.exception.ApiException;
import com.cool.store.mapper.HyPartnerCertificationInfoMapper;
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;
import java.text.MessageFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Optional;
/**
* @Author: young.yu
* @Date: 2023-06-28 21:35
* @Description:
*/
@Service
public class CommonServiceImpl implements CommonService {
@Autowired
private HyPartnerTaskInfoLogMapper hyPartnerTaskInfoLogMapper;
@Autowired
private HyPartnerLineInfoMapper hyPartnerLineInfoMapper;
@Autowired
private HyPartnerCertificationInfoMapper hyPartnerCertificationInfoMapper;
@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;
}
HyPartnerLineInfoDO hyPartnerLineInfoDO = lineInfoList.get(0);
String workflowStage = hyPartnerLineInfoDO.getWorkflowStage();
String workflowStatus = hyPartnerLineInfoDO.getWorkflowStatus();
Long partnerLineId = hyPartnerLineInfoDO.getId();
if (workflowStage.equals(WorkflowStageEnum.INTERVIEW.getCode()) && workflowStatus.equals(WorkflowStatusEnum.INTERVIEW_2.getCode())) {
return getInterviewTips(partnerLineId, OperateTypeEnum.INTERVIEW_APPOINTMENT, "提交面试预约时间");
} else if (workflowStage.equals(WorkflowStageEnum.INTERVIEW.getCode()) && workflowStatus.equals(WorkflowStatusEnum.INTERVIEW_3.getCode())) {
String tips = getInterviewTips(partnerLineId, OperateTypeEnum.MODIFY_INTERVIEW_TIME, "");
if (StringUtils.isNotEmpty(tips)) {
return tips + ("修改面试预约时间");
} else {
return getInterviewTips(partnerLineId, OperateTypeEnum.INTERVIEW_APPOINTMENT, "提交面试预约时间");
}
} else if (workflowStage.equals(WorkflowStageEnum.INTERVIEW.getCode()) && workflowStatus.equals(WorkflowStatusEnum.INTERVIEW_4.getCode())) {
return getInterviewTips(partnerLineId, OperateTypeEnum.FINISH_INTERVIEW, "结束面试");
}else if (workflowStage.equals(WorkflowStageEnum.INTERVIEW.getCode()) && workflowStatus.equals(WorkflowStatusEnum.INTERVIEW_5.getCode())) {
HyPartnerCertificationInfoDO partnerCertificationInfoDO = hyPartnerCertificationInfoMapper.selectByPartnerLineId(partnerLineId);
String intentionContractNo = null;
if(partnerCertificationInfoDO != null){
intentionContractNo = partnerCertificationInfoDO.getIntentionContractNo();
}
return getInterviewTips(partnerLineId, OperateTypeEnum.FINISH_INTERVIEW, "发起加盟商资质审核|"+intentionContractNo);
}else if (workflowStage.equals(WorkflowStageEnum.INTERVIEW.getCode()) && workflowStatus.equals(WorkflowStatusEnum.INTERVIEW_6.getCode())) {
HyPartnerCertificationInfoDO partnerCertificationInfoDO = hyPartnerCertificationInfoMapper.selectByPartnerLineId(partnerLineId);
String intentionContractNo = null;
if(partnerCertificationInfoDO != null){
intentionContractNo = partnerCertificationInfoDO.getIntentionContractNo();
}
return getInterviewTips(partnerLineId, OperateTypeEnum.FINISH_INTERVIEW, "审核通过|"+intentionContractNo);
}
return null;
}
public String getInterviewTips(Long partnerLineId, OperateTypeEnum operateTypeEnum, String action) {
StringBuffer sb = new StringBuffer();
sb.append(StringUtil.REPLACE_0)
.append(" ")
.append(StringUtil.REPLACE_1)
.append("").append(StringUtil.REPLACE_2).append(" ").append(action);
String content = sb.toString();
return getSuitableTipsInfo(content, partnerLineId,
operateTypeEnum,
OperateLogFieldValueEnum.OPERATE_USER_NAME.getCode(),
OperateLogFieldValueEnum.MOBILE.getCode(),
OperateLogFieldValueEnum.OPERATE_TIME.getCode());
}
public String getSuitableTipsInfo(String content, Long partnerLineId, OperateTypeEnum operateTypeEnum, String... replaceKeys) {
List<HyPartnerTaskInfoLogDO> hyPartnerTaskInfoLogDOS = hyPartnerTaskInfoLogMapper.selectByPartnerLineIdAndOperateType(partnerLineId, operateTypeEnum.getCode());
if (CollectionUtils.isEmpty(hyPartnerTaskInfoLogDOS)) {
return null;
}
HyPartnerTaskInfoLogDO hyPartnerTaskInfoLogDO = hyPartnerTaskInfoLogDOS.get(0);
String fieldCopy = hyPartnerTaskInfoLogDO.getFieldCopy();
List<LogFieldDTO> logFieldDTOS = JSONObject.parseArray(fieldCopy, LogFieldDTO.class);
List<String> params = new ArrayList<>();
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());
}
}

View File

@@ -0,0 +1,278 @@
package com.cool.store.service.impl;
import cn.hutool.core.convert.Convert;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.http.HttpUtil;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.cool.store.dao.EnterpriseUserDAO;
import com.cool.store.dao.HyPartnerBaseInfoDAO;
import com.cool.store.dao.HyPartnerLineInfoDAO;
import com.cool.store.dao.HyPartnerUserInfoDAO;
import com.cool.store.entity.*;
import com.cool.store.enums.LineStatusEnum;
import com.cool.store.enums.WorkflowStageEnum;
import com.cool.store.enums.WorkflowStatusEnum;
import com.cool.store.exception.ApiException;
import com.cool.store.http.UserSourceResponse;
import com.cool.store.mapper.HyPartnerUserChannelMapper;
import com.cool.store.request.CustomerInfoRequest;
import com.cool.store.sdk.ec.EcClient;
import com.cool.store.sdk.ec.bo.ChangeFollowUserBo;
import com.cool.store.sdk.ec.bo.UpdateCustomerBo;
import com.cool.store.sdk.ec.request.ChangeFollowUserRequest;
import com.cool.store.sdk.ec.request.UpdateCustomerRequest;
import com.cool.store.sdk.ec.response.ChangeFollowUserResponse;
import com.cool.store.sdk.ec.response.UpdateCustomerResponse;
import com.cool.store.service.EcSyncService;
import com.cool.store.utils.Post;
import com.cool.store.utils.StringUtil;
import com.cool.store.utils.UUIDUtils;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.io.IOException;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
@Slf4j
@Service
public class EcSyncServiceImpl implements EcSyncService {
@Value("${ec.baseUrl:null}")
private String baseUrl;
@Resource
private HyPartnerLineInfoDAO hyPartnerLineInfoDAO;
@Resource
private HyPartnerBaseInfoDAO hyPartnerBaseInfoDAO;
@Resource
private HyPartnerUserInfoDAO hyPartnerUserInfoDAO;
@Resource
private EnterpriseUserDAO enterpriseUserDAO;
@Resource
private HyPartnerUserChannelMapper hyPartnerUserChannelMapper;
@Override
public boolean ecToApplet(List<CustomerInfoRequest> queryListData) {
for (CustomerInfoRequest customerInfoItem : queryListData) {
try {
Thread.sleep(500L);
insertSelectiveSync(customerInfoItem);
} catch (Exception e) {
e.printStackTrace();
sendFeiShuRobotMessage("推送:"+JSONObject.toJSONString(e),"27243d49-97ca-4981-8aec-7c3bf84eb660");
}
}
return false;
}
@Override
public void getChannelSource() {
String s = HttpUtil.get(baseUrl+"/ec/getChannelSource");
UserSourceResponse userSourceResponse = JSONObject.parseObject(s, UserSourceResponse.class);
for (UserSourceResponse.ChannelSource channelSource : userSourceResponse.getData()) {
Long id = channelSource.getId();
HyPartnerUserChannelDO selectByChannel = hyPartnerUserChannelMapper.selectByChannelId(id);
HyPartnerUserChannelDO hyPartnerUserChannel = new HyPartnerUserChannelDO();
hyPartnerUserChannel.setChannelId(channelSource.getId()).setChannelName(channelSource.getName());
//有就更新 没有插入
if (ObjectUtil.isNotNull(selectByChannel)) {
hyPartnerUserChannel.setUpdateTime(new Date()).setId(selectByChannel.getId());
hyPartnerUserChannelMapper.updateByPrimaryKeySelective(hyPartnerUserChannel);
}else {
hyPartnerUserChannel.setCreateTime(new Date());
hyPartnerUserChannelMapper.insertSelective(hyPartnerUserChannel);
}
}
}
/**
* 同步ec数据到表中 同时将部分数据同步到ec
*
* @param customerInfoItem
*/
@Transactional(rollbackFor = Exception.class)
public void insertSelectiveSync(CustomerInfoRequest customerInfoItem) throws ApiException {
if (StringUtil.isNotEmpty(customerInfoItem.getMobile())) {
customerInfoItem.setMobile(customerInfoItem.getMobile().split(" ")[1]);
}
//获取客户来源id
String channel = customerInfoItem.getChannel();
HyPartnerUserChannelDO hyPartnerUserChannelDO = hyPartnerUserChannelMapper.selectByChannelName(channel);
Long channelId =null;
if (StringUtil.isNotEmpty(channel)) {
if (ObjectUtil.isNull(hyPartnerUserChannelDO)||ObjectUtil.isNull(hyPartnerUserChannelDO.getId())) {
getChannelSource();
HyPartnerUserChannelDO channelDO = hyPartnerUserChannelMapper.selectByChannelName(channel);
channelId=channelDO.getId();
}else {
HyPartnerUserChannelDO channelDO = hyPartnerUserChannelMapper.selectByChannelName(channel);
channelId=channelDO.getId();
}
}
String newPartnerId = UUIDUtils.get32UUID();
HyPartnerUserInfoDO resultUser = new HyPartnerUserInfoDO();
resultUser.setUsername(customerInfoItem.getName()).setMobile(customerInfoItem.getMobile());
HyPartnerLineInfoDO resultLine = new HyPartnerLineInfoDO();
String followUserName = customerInfoItem.getFollowUserName();
String followUserMobile = customerInfoItem.getFollowUserMobile();
//传递过来有跟进人的情况下查询跟进人是否存在
if (StringUtil.isNotEmpty(followUserMobile)&&StringUtil.isNotEmpty(followUserMobile)) {
String userId = enterpriseUserDAO.selectByMobile("+86"+followUserMobile);
if (StringUtil.isEmpty(userId)) {
// 给飞书群发送消息 跟进人找不到
sendFeiShuRobotMessage("推送:飞书架构中找不到该用户:【" + followUserName + "】,该用户电话号码为:" + followUserMobile,"27243d49-97ca-4981-8aec-7c3bf84eb660");
throw new ApiException("飞书架构中找不到该用户:【" + followUserName + "】,该用户电话号码为:" + followUserMobile);
}
resultLine.setInvestmentManager(userId);
}
resultLine.setWorkflowStage(WorkflowStageEnum.INTENT.getCode()).setUserChannelId(Convert.toInt(channelId))
.setLineStatus(StringUtil.isEmpty(customerInfoItem.getFollowUserName()) ? LineStatusEnum.PUBLIC_SEAS.getCode() : LineStatusEnum.PRIVATE_SEAS.getCode());
HyPartnerBaseInfoDO resultBase = new HyPartnerBaseInfoDO();
resultBase.setUsername(customerInfoItem.getName()).setMobile(customerInfoItem.getMobile());
HyPartnerUserInfoDO newUserInfo = hyPartnerUserInfoDAO.selectByMobile(resultUser.getMobile());
EcClient ecClient=new EcClient();
//有就更新ec没有就插入
if (newUserInfo != null) {
// EC与沪姨合伙人同时存在的线索用户但用户姓名不同将沪姨合伙人线索姓名同步至EC覆盖原EC线索姓名
if (!newUserInfo.getUsername().equals(resultUser.getUsername())) {
UpdateCustomerRequest updateUserRequest=new UpdateCustomerRequest();
UpdateCustomerBo updateCustomerBo = new UpdateCustomerBo();
updateCustomerBo.setUsername(newUserInfo.getUsername()).setMobile(newUserInfo.getMobile()).setCrmId(customerInfoItem.getCrmId());
updateUserRequest.setParameter(updateCustomerBo);
UpdateCustomerResponse updateUserExec = ecClient.exec(baseUrl,updateUserRequest);
}
String oldPartnerId = newUserInfo.getPartnerId();
//线索表
HyPartnerLineInfoDO partnerLine = hyPartnerLineInfoDAO.getByPartnerId(oldPartnerId);
if (partnerLine != null) {
// EC与沪姨合伙人同时存在的线索用户但存在不同的跟进人将沪姨合伙人跟进人信息同步至EC覆盖原EC跟进人信息
if (StringUtil.isEmpty(partnerLine.getInvestmentManager())) {
if (StringUtil.isNotEmpty(resultLine.getInvestmentManager())) {
resultLine.setId(partnerLine.getId()).setUpdateTime(new Date());
hyPartnerLineInfoDAO.updateByPrimaryKeySelective(resultLine);
}
}else {
EnterpriseUserDO enterpriseUser = enterpriseUserDAO.getUserInfoById(partnerLine.getInvestmentManager());
enterpriseUser.setMobile(getNoWith86Number(enterpriseUser.getMobile()));
//电话相同但是名字不同
if (enterpriseUser.getMobile().equals(followUserMobile) && !enterpriseUser.getName().equals(followUserName)) {
ChangeFollowUserRequest changeFollowUserRequest = new ChangeFollowUserRequest();
ChangeFollowUserBo changeFollowUserBo = new ChangeFollowUserBo();
changeFollowUserBo.setFollowUserId(customerInfoItem.getLastFollowUserId()).setCrmId(customerInfoItem.getCrmId())
.setType(1).setUsername(enterpriseUser.getName()).setMobile(enterpriseUser.getMobile());
changeFollowUserRequest.setParameter(changeFollowUserBo);
ChangeFollowUserResponse changeFollowUserExec = ecClient.exec(baseUrl,changeFollowUserRequest);
}
//电话不同
if (!enterpriseUser.getMobile().equals(followUserMobile)) {
ChangeFollowUserRequest changeFollowUserRequest = new ChangeFollowUserRequest();
ChangeFollowUserBo changeFollowUserBo = new ChangeFollowUserBo();
changeFollowUserBo.setFollowUserId(customerInfoItem.getLastFollowUserId()).setCrmId(customerInfoItem.getCrmId())
.setType(2).setUsername(enterpriseUser.getName()).setMobile(enterpriseUser.getMobile());
changeFollowUserRequest.setParameter(changeFollowUserBo);
ChangeFollowUserResponse changeFollowUserExec = ecClient.exec(baseUrl,changeFollowUserRequest);
}
}
//base表
HyPartnerBaseInfoDO partnerIdAndLine = hyPartnerBaseInfoDAO.getByPartnerIdAndLineId(partnerLine.getPartnerId(), partnerLine.getId());
if (partnerIdAndLine == null) {
resultBase.setPartnerId(newPartnerId).setPartnerLineId(partnerLine.getId()).setStatus(Integer.valueOf(WorkflowStatusEnum.INTENT_0.getCode())).
setCreateTime(new Date());
hyPartnerBaseInfoDAO.insertSelective(resultBase);
}
} else {
resultLine.setPartnerId(newPartnerId).setCreateTime(new Date());
hyPartnerLineInfoDAO.insertSelective(resultLine);
resultBase.setPartnerId(newPartnerId).setPartnerLineId(resultLine.getId()).setStatus(Integer.valueOf(WorkflowStatusEnum.INTENT_0.getCode())).
setCreateTime(new Date());
hyPartnerBaseInfoDAO.insertSelective(resultBase);
}
} else {
resultUser.setPartnerId(newPartnerId).setCreateTime(new Date());
hyPartnerUserInfoDAO.insertSelective(resultUser);
resultLine.setPartnerId(newPartnerId).setCreateTime(new Date());
hyPartnerLineInfoDAO.insertSelective(resultLine);
resultBase.setPartnerId(newPartnerId).setPartnerLineId(resultLine.getId()).setStatus(Integer.valueOf(WorkflowStatusEnum.INTENT_0.getCode())).
setCreateTime(new Date());
hyPartnerBaseInfoDAO.insertSelective(resultBase);
}
}
/**
* 得到不带86开头的号码
*
* @param number
* @return
*/
public static String getNoWith86Number(String number) {
String regular = number;
if (StringUtils.isNotBlank(regular)) {
// 去掉+号
while (regular.startsWith("+")) {
regular = regular.substring(1);
}
// 号码以0开始,去掉前缀
while (regular.startsWith("0")) {
regular = regular.substring(1);
}
// 号码以86开始,去掉前缀
while (regular.startsWith("86")) {
regular = regular.substring(2);
}
// 号码以0开始去掉前缀
while (regular.startsWith("0")) {
regular = regular.substring(1);
}
}
return regular;
}
/**
* 发送飞书机器人
*
* @param text
* @param token
* @return
*/
public String sendFeiShuRobotMessage(String text, String token) {
HashMap<String, Object> map = new HashMap<>(4);
HashMap<String, String> textMap = new HashMap<String, String>(4);
textMap.put("text", text);
map.put("content", textMap);
map.put("msg_type", "text");
String body = JSON.toJSONString(map);
String send = "";
try {
send = Post.send("https://open.feishu.cn/open-apis/bot/v2/hook/" + token, body, new HashMap<String, String>(4) {{
put("Content-Type", "application/json");
}});
} catch (IOException e) {
e.printStackTrace();
}
return send;
}
}

View File

@@ -83,6 +83,9 @@ public class EnterpriseUserServiceImpl implements EnterpriseUserService {
if (CommonConstants.TRANSFER.equals(type)){ if (CommonConstants.TRANSFER.equals(type)){
enterpriseUserDOS = enterpriseUserDAO.searchUserByRegionIdsAndKeyword(new ArrayList<>(list), keyword, null); enterpriseUserDOS = enterpriseUserDAO.searchUserByRegionIdsAndKeyword(new ArrayList<>(list), keyword, null);
} }
if (CollectionUtils.isEmpty(enterpriseUserDOS)){
enterpriseUserDOS.add(userInfo);
}
return EnterpriseUserSingleInfoVO.convertVO(enterpriseUserDOS); return EnterpriseUserSingleInfoVO.convertVO(enterpriseUserDOS);
} }

View File

@@ -6,12 +6,18 @@ import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.TypeReference; import com.alibaba.fastjson.TypeReference;
import com.alibaba.fastjson.serializer.SerializerFeature; import com.alibaba.fastjson.serializer.SerializerFeature;
import com.cool.store.context.CurrentUserHolder;
import com.cool.store.context.LoginUserInfo;
import com.cool.store.dao.EnterpriseUserDAO; import com.cool.store.dao.EnterpriseUserDAO;
import com.cool.store.dao.HyInterviewDAO; import com.cool.store.dao.HyInterviewDAO;
import com.cool.store.dto.log.CreateQualifyVerifyDTO;
import com.cool.store.dto.log.ReInterviewDTO;
import com.cool.store.dto.mdm.AccessTokenDTO; import com.cool.store.dto.mdm.AccessTokenDTO;
import com.cool.store.dto.response.MDMResultDTO; import com.cool.store.dto.response.MDMResultDTO;
import com.cool.store.entity.*; import com.cool.store.entity.*;
import com.cool.store.enums.ErrorCodeEnum; import com.cool.store.enums.ErrorCodeEnum;
import com.cool.store.enums.OperateTypeEnum;
import com.cool.store.enums.WorkflowStageEnum;
import com.cool.store.enums.WorkflowStatusEnum; import com.cool.store.enums.WorkflowStatusEnum;
import com.cool.store.exception.ApiException; import com.cool.store.exception.ApiException;
import com.cool.store.exception.ServiceException; import com.cool.store.exception.ServiceException;
@@ -27,10 +33,8 @@ import com.cool.store.request.RpcGetMdmTokenReq;
import com.cool.store.request.data.flow.KeyText; import com.cool.store.request.data.flow.KeyText;
import com.cool.store.request.data.flow.SkrRelshipProve; import com.cool.store.request.data.flow.SkrRelshipProve;
import com.cool.store.service.FlowService; import com.cool.store.service.FlowService;
import com.cool.store.utils.PDFUtils; import com.cool.store.service.LogService;
import com.cool.store.utils.PassLetterUtils; import com.cool.store.utils.*;
import com.cool.store.utils.RedisUtilPool;
import com.cool.store.utils.RestTemplateUtil;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@@ -90,6 +94,8 @@ public class FlowServiceImpl implements FlowService {
@Autowired @Autowired
private HyInterviewDAO interviewDAO; private HyInterviewDAO interviewDAO;
@Autowired
private LogService logService;
@Override @Override
@Transactional @Transactional
public void createQualifyVerify(CreateQualifyVerifyReq request) throws ApiException, IOException { public void createQualifyVerify(CreateQualifyVerifyReq request) throws ApiException, IOException {
@@ -181,20 +187,7 @@ public class FlowServiceImpl implements FlowService {
partnerCertificationInfoDO.setPartnerId(request.getPartnerId()); partnerCertificationInfoDO.setPartnerId(request.getPartnerId());
partnerCertificationInfoDO.setPartnerLineId(Long.valueOf(request.getLineId())); partnerCertificationInfoDO.setPartnerLineId(Long.valueOf(request.getLineId()));
partnerCertificationInfoDO.setPartnerInterviewId(Long.valueOf(request.getInterviewId())); partnerCertificationInfoDO.setPartnerInterviewId(Long.valueOf(request.getInterviewId()));
partnerCertificationInfoDO.setPartnership(String.valueOf(request.getPartnership())); partnerCertificationInfoDO.setCertificationInfoRecordJson(JSONObject.toJSONString(request));
partnerCertificationInfoDO.setWantSignTime(DateUtil.parse(request.getWantSignTime()));
partnerCertificationInfoDO.setPartnerFee(request.getPartnerFee().toString());
partnerCertificationInfoDO.setSecurityFund(request.getSecurityFund().toString());
partnerCertificationInfoDO.setTechnicalServiceFee(request.getTechnicalServiceFee().toString());
partnerCertificationInfoDO.setIntentionMoney(request.getIntentionMoney().toString());
partnerCertificationInfoDO.setIntentionSignerUsername(request.getIntentionSignerUsername());
partnerCertificationInfoDO.setIntentionSignerMobile(request.getIntentionSignerMobile());
partnerCertificationInfoDO.setIntentionEdu(request.getIntentionEdu().toString());
partnerCertificationInfoDO.setRealControlUsername(request.getRealControlUsername());
partnerCertificationInfoDO.setRealControlIdcard(request.getRealControlIdcard());
partnerCertificationInfoDO.setSignerRealControlRelation(request.getSignerRealControlRelation().toString());
partnerCertificationInfoDO.setSignerOtherRealControlRelation(request.getSignerOtherRealControlRelation());
partnerCertificationInfoDO.setSignerRealControlRelationCert(request.getSignerRealControlRelationCert().toString());
partnerCertificationInfoDO.setCreateTime(new Date()); partnerCertificationInfoDO.setCreateTime(new Date());
partnerCertificationInfoDO.setUpdateTime(new Date()); partnerCertificationInfoDO.setUpdateTime(new Date());
//set 资质审核流程id //set 资质审核流程id
@@ -207,8 +200,12 @@ public class FlowServiceImpl implements FlowService {
hyPartnerInterviewDO.setUpdateTime(new Date()); hyPartnerInterviewDO.setUpdateTime(new Date());
//更新面试信息 //更新面试信息
//更新面试状态 //更新面试状态
hyPartnerInterviewDO.setStatus(null);
interviewDAO.updateInterviewWorkflowStatus(request.getInterviewPlanId(), WorkflowStatusEnum.INTERVIEW_5); interviewDAO.updateInterviewWorkflowStatus(request.getInterviewPlanId(), WorkflowStatusEnum.INTERVIEW_5);
//获取当前操作人
LoginUserInfo operator = CurrentUserHolder.getUser();
hyPartnerInterviewDO.setRecorder(operator.getUserId());
hyPartnerInterviewDO.setRecordTime(new Date());
hyPartnerInterviewDO.setAuthCode(authCode); hyPartnerInterviewDO.setAuthCode(authCode);
hyPartnerInterviewMapper.updateByPrimaryKeySelective(hyPartnerInterviewDO); hyPartnerInterviewMapper.updateByPrimaryKeySelective(hyPartnerInterviewDO);
@@ -219,6 +216,10 @@ public class FlowServiceImpl implements FlowService {
hyPartnerLineInfoDO.setDevelopmentDirector(request.getDevtDirectorId()); hyPartnerLineInfoDO.setDevelopmentDirector(request.getDevtDirectorId());
hyPartnerLineInfoMapper.updateByPrimaryKeySelective(hyPartnerLineInfoDO); hyPartnerLineInfoMapper.updateByPrimaryKeySelective(hyPartnerLineInfoDO);
} }
//记录日志
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);
} }
@Override @Override
@@ -226,7 +227,7 @@ public class FlowServiceImpl implements FlowService {
public void qualificationCallback(QualificationCallbackReq request) { public void qualificationCallback(QualificationCallbackReq request) {
log.info("MDM800审批成功回调request{}", JSONObject.toJSONString(request)); log.info("MDM800审批成功回调request{}", JSONObject.toJSONString(request));
//1. 信息是否完整 //1. 信息是否完整
if (null == request.getSequenceStatus() || "".equals(request.getSequenceStatus())) { if (null == request.getInstanceStatus() || "".equals(request.getInstanceStatus())) {
log.error("MDM回调入参缺失request{}", JSON.toJSONString(request)); log.error("MDM回调入参缺失request{}", JSON.toJSONString(request));
throw new ServiceException("MDM回调错误"); throw new ServiceException("MDM回调错误");
} }
@@ -237,7 +238,7 @@ public class FlowServiceImpl implements FlowService {
throw new ServiceException(ErrorCodeEnum.INTERVIEW_NOT_EXIST); throw new ServiceException(ErrorCodeEnum.INTERVIEW_NOT_EXIST);
} }
//审核通过 //审核通过
if ("FINISHED".equals(request.getSequenceStatus())) { if ("FINISHED".equals(request.getInstanceStatus())) {
//更新面试状态 //更新面试状态
interviewDAO.updateInterviewWorkflowStatus(interviewPlanId, WorkflowStatusEnum.INTERVIEW_6); interviewDAO.updateInterviewWorkflowStatus(interviewPlanId, WorkflowStatusEnum.INTERVIEW_6);
//2. 准备需要的信息 //2. 准备需要的信息
@@ -258,8 +259,9 @@ public class FlowServiceImpl implements FlowService {
Date passDate = new Date(request.getModifiedTime()); Date passDate = new Date(request.getModifiedTime());
//3. 生成通过函并修改数据库相关信息 //3. 生成通过函并修改数据库相关信息
genPassLetterAndUpdateDB(partnerName, verifyCity, passDate, interviewId); genPassLetterAndUpdateDB(partnerName, verifyCity, passDate, interviewId);
// TODO 4. 修改流程状态到下一阶段 4 分配选址开发经理
//审核未通过 //审核未通过
} else if ("CANCELED".equals(request.getSequenceStatus())) { } else if ("CANCELED".equals(request.getInstanceStatus())) {
interviewDAO.updateInterviewWorkflowStatus(interviewPlanId, WorkflowStatusEnum.INTERVIEW_7); interviewDAO.updateInterviewWorkflowStatus(interviewPlanId, WorkflowStatusEnum.INTERVIEW_7);
} }
} }

View File

@@ -108,6 +108,21 @@ public class HyPartnerIntentInfoServiceImpl implements HyPartnerIntentInfoServic
//修改意向申请信息中的加盟商名称与手机号 //修改意向申请信息中的加盟商名称与手机号
hyPartnerBaseInfoDAO.updateByPartnerId(baseUserInfoRequest.getUsername(),baseUserInfoRequest.getMobile(),baseUserInfoRequest.getPartnerId()); hyPartnerBaseInfoDAO.updateByPartnerId(baseUserInfoRequest.getUsername(),baseUserInfoRequest.getMobile(),baseUserInfoRequest.getPartnerId());
// 更新线索状态
HyPartnerLineInfoDO hyPartnerLineInfoDO = hyPartnerLineInfoService.generateDefaultLineInfo(hyPartnerUserInfoDO.getPartnerId(), baseUserInfoRequest.getWantShopArea(), baseUserInfoRequest.getAcceptAdjustType());
String cacheKey = MessageFormat.format(RedisConstant.PARTNER_INTENTINFO_CACHE_KEY, baseUserInfoRequest.getPartnerId(), hyPartnerLineInfoDO.getId());
if (StringUtils.isNotBlank(redisUtilPool.getString(cacheKey))) {
PartnerIntentInfoRequest request = JSONObject.parseObject(redisUtilPool.getString(cacheKey), PartnerIntentInfoRequest.class);
if(!baseUserInfoRequest.getWantShopArea().equals(request.getWantShopArea())
|| !baseUserInfoRequest.getAcceptAdjustType().equals(request.getAcceptAdjustType())){
request.setWantShopArea(baseUserInfoRequest.getWantShopArea());
request.setAcceptAdjustType(baseUserInfoRequest.getAcceptAdjustType());
redisUtilPool.setString(cacheKey, JSONObject.toJSONString(request), RedisConstant.ONE_DAY_SECONDS);
}
}
return Boolean.TRUE; return Boolean.TRUE;
} }
@@ -166,6 +181,8 @@ public class HyPartnerIntentInfoServiceImpl implements HyPartnerIntentInfoServic
hyPartnerLineInfoDO.setInvestmentManager(investmentManager); hyPartnerLineInfoDO.setInvestmentManager(investmentManager);
} }
hyPartnerLineInfoDAO.updateByPrimaryKeySelective(hyPartnerLineInfoDO); hyPartnerLineInfoDAO.updateByPrimaryKeySelective(hyPartnerLineInfoDO);
}
if (StringUtil.isNotBlank(request.getWantShopArea())){
HyOpenAreaInfoDO hyOpenAreaInfoDO = hyOpenAreaInfoDAO.selectById(Long.valueOf(request.getWantShopArea())); HyOpenAreaInfoDO hyOpenAreaInfoDO = hyOpenAreaInfoDAO.selectById(Long.valueOf(request.getWantShopArea()));
return hyOpenAreaInfoDO != null ? hyOpenAreaInfoDO.getAreaStatus() : null; return hyOpenAreaInfoDO != null ? hyOpenAreaInfoDO.getAreaStatus() : null;
} }

View File

@@ -8,6 +8,7 @@ import com.cool.store.entity.*;
import com.cool.store.enums.RoomStatus; import com.cool.store.enums.RoomStatus;
import com.cool.store.enums.WorkflowStageEnum; import com.cool.store.enums.WorkflowStageEnum;
import com.cool.store.enums.WorkflowStatusEnum; import com.cool.store.enums.WorkflowStatusEnum;
import com.cool.store.exception.ApiException;
import com.cool.store.mapper.HyPartnerInterviewMapper; import com.cool.store.mapper.HyPartnerInterviewMapper;
import com.cool.store.mapper.HyPartnerInterviewPlanMapper; import com.cool.store.mapper.HyPartnerInterviewPlanMapper;
import com.cool.store.mapper.HyPartnerLineInfoMapper; import com.cool.store.mapper.HyPartnerLineInfoMapper;
@@ -64,6 +65,9 @@ public class HyPartnerInterviewPlanServiceImpl implements HyPartnerInterviewPlan
@Autowired @Autowired
private HyInterviewDAO interviewDAO; private HyInterviewDAO interviewDAO;
@Resource
EnterpriseUserDAO enterpriseUserDAO;
@Override @Override
@@ -89,21 +93,20 @@ public class HyPartnerInterviewPlanServiceImpl implements HyPartnerInterviewPlan
return result; return result;
} }
@Resource
EnterpriseUserDAO enterpriseUserDAO;
@Override @Override
public PageInfo<PartnerInterviewInfoVO> getPartnerInterviewInfoList(String userId ,String type,Integer pageSize,Integer pageNumber) { public PageInfo<PartnerInterviewInfoVO> getPartnerInterviewInfoList(String userId ,String type,Integer pageSize,Integer pageNumber) {
String workflowStatus = ""; String workflowStatus = "";
Boolean filter = Boolean.FALSE;
if (CommonConstants.PENDING.equals(type)) { if (CommonConstants.PENDING.equals(type)) {
workflowStatus = WorkflowStatusEnum.RESERVATION_1.getCode(); workflowStatus = WorkflowStatusEnum.RESERVATION_1.getCode();
filter = Boolean.TRUE;
} }
if (CommonConstants.FOLLOW.equals(type)) { if (CommonConstants.FOLLOW.equals(type)) {
workflowStatus = WorkflowStatusEnum.RESERVATION_0.getCode(); workflowStatus = WorkflowStatusEnum.RESERVATION_0.getCode();
} }
PageHelper.startPage(pageNumber,pageSize); PageHelper.startPage(pageNumber,pageSize);
//查询预约面试列表 //查询预约面试列表
PageInfo partnerInterviewInfoList = new PageInfo(hyPartnerInterviewPlanDAO.getPartnerInterviewInfoList(userId, WorkflowStageEnum.RESERVATION.getCode(), workflowStatus)); PageInfo partnerInterviewInfoList = new PageInfo(hyPartnerInterviewPlanDAO.getPartnerInterviewInfoList(userId, WorkflowStageEnum.RESERVATION.getCode(), workflowStatus,filter));
List<PartnerInterviewInfoDTO> list = partnerInterviewInfoList.getList(); List<PartnerInterviewInfoDTO> list = partnerInterviewInfoList.getList();
if (CollectionUtils.isEmpty(list)){ if (CollectionUtils.isEmpty(list)){
return partnerInterviewInfoList; return partnerInterviewInfoList;
@@ -144,7 +147,7 @@ public class HyPartnerInterviewPlanServiceImpl implements HyPartnerInterviewPlan
PageHelper.startPage(pageNumber,pageSize); PageHelper.startPage(pageNumber,pageSize);
//查询预约面试列表 //查询预约面试列表
PageInfo partnerInterviewInfoList = new PageInfo(hyPartnerInterviewPlanDAO.getPartnerInterviewInfoList(userId, WorkflowStageEnum.INTERVIEW.getCode(),workflowStatus)); PageInfo partnerInterviewInfoList = new PageInfo(hyPartnerInterviewPlanDAO.getPartnerInterviewInfoList(userId, WorkflowStageEnum.INTERVIEW.getCode(),workflowStatus,Boolean.TRUE));
List<PartnerInterviewInfoDTO> list = partnerInterviewInfoList.getList(); List<PartnerInterviewInfoDTO> list = partnerInterviewInfoList.getList();
if (CollectionUtils.isEmpty(list)){ if (CollectionUtils.isEmpty(list)){
return partnerInterviewInfoList; return partnerInterviewInfoList;
@@ -170,7 +173,7 @@ public class HyPartnerInterviewPlanServiceImpl implements HyPartnerInterviewPlan
@Override @Override
@Transactional @Transactional
public void updateInterviewOverTime() { public void updateInterviewOverTime() throws ApiException {
List<HyPartnerLineInfoDO> overTimeReserveLineList = hyPartnerLineInfoMapper.getOverTimeReserveLineList(new Date(), WorkflowStageEnum.RESERVATION.getCode(), WorkflowStatusEnum.RESERVATION_0.getCode()); List<HyPartnerLineInfoDO> overTimeReserveLineList = hyPartnerLineInfoMapper.getOverTimeReserveLineList(new Date(), WorkflowStageEnum.RESERVATION.getCode(), WorkflowStatusEnum.RESERVATION_0.getCode());
if(CollectionUtils.isEmpty(overTimeReserveLineList)){ if(CollectionUtils.isEmpty(overTimeReserveLineList)){
return; return;
@@ -201,7 +204,7 @@ public class HyPartnerInterviewPlanServiceImpl implements HyPartnerInterviewPlan
@Override @Override
@Transactional @Transactional
public void updateAbsentInterview() { public void updateAbsentInterview() throws ApiException {
Date now = new Date(); Date now = new Date();
//查询当天未参加的面试 //查询当天未参加的面试
String startTime = DateUtil.formatDateTime(DateUtil.offsetHour(now,-6)); String startTime = DateUtil.formatDateTime(DateUtil.offsetHour(now,-6));
@@ -223,7 +226,7 @@ public class HyPartnerInterviewPlanServiceImpl implements HyPartnerInterviewPlan
* @param interviewBaseInfoList * @param interviewBaseInfoList
* @param rejectPublicReason * @param rejectPublicReason
*/ */
public void handleOverTimeInterview(List<HyPartnerInterviewDO> interviewBaseInfoList,String rejectPublicReason){ public void handleOverTimeInterview(List<HyPartnerInterviewDO> interviewBaseInfoList,String rejectPublicReason) throws ApiException {
//1.更新面试信息表中超时的面试信息 //1.更新面试信息表中超时的面试信息
List<Long> interviewIds = interviewBaseInfoList.stream().map(HyPartnerInterviewDO::getId).distinct().collect(Collectors.toList()); List<Long> interviewIds = interviewBaseInfoList.stream().map(HyPartnerInterviewDO::getId).distinct().collect(Collectors.toList());
hyPartnerInterviewMapper.batchUpdateInterviewStatus(interviewIds,Integer.valueOf(WorkflowStatusEnum.RESERVATION_8.getCode()),1); hyPartnerInterviewMapper.batchUpdateInterviewStatus(interviewIds,Integer.valueOf(WorkflowStatusEnum.RESERVATION_8.getCode()),1);

View File

@@ -14,10 +14,7 @@ import com.cool.store.entity.*;
import com.cool.store.enums.*; import com.cool.store.enums.*;
import com.cool.store.exception.ApiException; import com.cool.store.exception.ApiException;
import com.cool.store.exception.ServiceException; import com.cool.store.exception.ServiceException;
import com.cool.store.request.CloseFollowRequest; import com.cool.store.request.*;
import com.cool.store.request.LineRequest;
import com.cool.store.request.PrivateSeaLineListRequest;
import com.cool.store.request.QueryByInterviewPlanIdReq;
import com.cool.store.service.*; import com.cool.store.service.*;
import com.cool.store.utils.CoolDateUtils; import com.cool.store.utils.CoolDateUtils;
import com.cool.store.utils.RedisUtilPool; import com.cool.store.utils.RedisUtilPool;
@@ -137,21 +134,26 @@ public class HyPartnerLineInfoServiceImpl implements HyPartnerLineInfoService {
} }
@Override @Override
public Boolean transferInvestmentManager(LoginUserInfo user,String userId,String userName, Long lineId) { public Boolean transferInvestmentManager(LoginUserInfo user, TransferInvestmentManagerRequest request) throws ApiException {
if (StringUtil.isBlank(userId)||lineId==null){ if (StringUtil.isBlank(request.getUserId())||request.getLineId()==null){
throw new ServiceException(ErrorCodeEnum.PARAMS_REQUIRED); throw new ServiceException(ErrorCodeEnum.PARAMS_REQUIRED);
} }
HyPartnerLineInfoDO hyPartnerLineInfoDO = hyPartnerLineInfoDAO.selectByPrimaryKeySelective(lineId); HyPartnerLineInfoDO hyPartnerLineInfoDO = hyPartnerLineInfoDAO.selectByPrimaryKeySelective(request.getLineId());
hyPartnerLineInfoDAO.updateInvestmentManager(userId, Arrays.asList(lineId)); hyPartnerLineInfoDAO.updateInvestmentManager(request.getUserId(), Arrays.asList(request.getLineId()));
List<String> userIdList = new ArrayList<>(); List<String> userIdList = new ArrayList<>();
userIdList.add(userId); userIdList.add(request.getUserId());
if (StringUtils.isNotEmpty(hyPartnerLineInfoDO.getInvestmentManager())){ if (StringUtils.isNotEmpty(hyPartnerLineInfoDO.getInvestmentManager())){
userIdList.add(hyPartnerLineInfoDO.getInvestmentManager()); userIdList.add(hyPartnerLineInfoDO.getInvestmentManager());
} }
List<EnterpriseUserDO> userList = enterpriseUserDAO.getUserInfoByUserIds(userIdList); List<EnterpriseUserDO> userList = enterpriseUserDAO.getUserInfoByUserIds(userIdList);
Map<String, EnterpriseUserDO> userDOMap = userList.stream().collect(Collectors.toMap(EnterpriseUserDO::getUserId, data -> data)); Map<String, EnterpriseUserDO> userDOMap = userList.stream().collect(Collectors.toMap(EnterpriseUserDO::getUserId, data -> data));
//更新面试官
if (WorkflowStageEnum.INTERVIEW.getCode().equals(hyPartnerLineInfoDO.getWorkflowStage())){
workFlowService.transferInvestmentManager(WorkflowStageEnum.getWorkflowStageByCode(hyPartnerLineInfoDO.getWorkflowStage()),request);
}
//添加日志 //添加日志
LineLogInfo lineLogInfo = new LineLogInfo(hyPartnerLineInfoDO.getPartnerId(), hyPartnerLineInfoDO.getId(), user.getUserId(), LineLogInfo lineLogInfo = new LineLogInfo(hyPartnerLineInfoDO.getPartnerId(), hyPartnerLineInfoDO.getId(), user.getUserId(),
user.getName(), OperateTypeEnum.TRANSFER_INVESTMENT_MANAGER, user.getName(), OperateTypeEnum.TRANSFER_INVESTMENT_MANAGER,
@@ -160,8 +162,8 @@ public class HyPartnerLineInfoServiceImpl implements HyPartnerLineInfoService {
TransferInvestmentManagerLogDTO logDTO = TransferInvestmentManagerLogDTO.builder().operateUserId(user.getUserId()).operateUsername(user.getName()) TransferInvestmentManagerLogDTO logDTO = TransferInvestmentManagerLogDTO.builder().operateUserId(user.getUserId()).operateUsername(user.getName())
.beforeInvestmentManagerUsername(userDOMap.getOrDefault(hyPartnerLineInfoDO.getInvestmentManager(),new EnterpriseUserDO()).getName()) .beforeInvestmentManagerUsername(userDOMap.getOrDefault(hyPartnerLineInfoDO.getInvestmentManager(),new EnterpriseUserDO()).getName())
.beforeInvestmentManagerMobile(userDOMap.getOrDefault(hyPartnerLineInfoDO.getInvestmentManager(),new EnterpriseUserDO()).getMobile()) .beforeInvestmentManagerMobile(userDOMap.getOrDefault(hyPartnerLineInfoDO.getInvestmentManager(),new EnterpriseUserDO()).getMobile())
.afterInvestmentManagerMobile(userDOMap.getOrDefault(userId,new EnterpriseUserDO()).getMobile()) .afterInvestmentManagerMobile(userDOMap.getOrDefault(request.getUserId(),new EnterpriseUserDO()).getMobile())
.afterInvestmentManagerUsername(userDOMap.getOrDefault(userId,new EnterpriseUserDO()).getName()) .afterInvestmentManagerUsername(userDOMap.getOrDefault(request.getUserId(),new EnterpriseUserDO()).getName())
.mobile(user.getMobile()).operateTime(DateUtil.format(new Date(), CoolDateUtils.DATE_FORMAT_SEC_2)).build(); .mobile(user.getMobile()).operateTime(DateUtil.format(new Date(), CoolDateUtils.DATE_FORMAT_SEC_2)).build();
lineLogInfo.setData(logDTO); lineLogInfo.setData(logDTO);
hyPartnerTaskInfoLogDAO.addOperateLog(lineLogInfo); hyPartnerTaskInfoLogDAO.addOperateLog(lineLogInfo);
@@ -242,7 +244,7 @@ public class HyPartnerLineInfoServiceImpl implements HyPartnerLineInfoService {
} }
@Override @Override
public Boolean joinBlackList(LoginUserInfo user, Long lineId, Integer status, String joinReason) { public Boolean joinBlackList(LoginUserInfo user, Long lineId, Integer status, String joinReason) throws ApiException {
if (lineId==null){ if (lineId==null){
throw new ServiceException(ErrorCodeEnum.PARAMS_REQUIRED); throw new ServiceException(ErrorCodeEnum.PARAMS_REQUIRED);
} }
@@ -255,10 +257,13 @@ public class HyPartnerLineInfoServiceImpl implements HyPartnerLineInfoService {
hyPartnerLineInfoDO.setRejectRealReason(joinReason); hyPartnerLineInfoDO.setRejectRealReason(joinReason);
hyPartnerLineInfoDO.setCloseTime(new Date()); hyPartnerLineInfoDO.setCloseTime(new Date());
hyPartnerLineInfoDO.setCloseUserId(user.getUserId()); hyPartnerLineInfoDO.setCloseUserId(user.getUserId());
hyPartnerLineInfoDO.setWorkflowStage(WorkflowStageEnum.INTENT.getCode());
hyPartnerLineInfoDO.setWorkflowStatus(WorkflowStatusEnum.INTENT_0.getCode());
hyPartnerLineInfoDAO.updateByPrimaryKeySelective(hyPartnerLineInfoDO); hyPartnerLineInfoDAO.updateByPrimaryKeySelective(hyPartnerLineInfoDO);
CloseFollowRequest closeFollowRequest = new CloseFollowRequest();
closeFollowRequest.setLineId(lineId);
closeFollowRequest.setRejectRealReason(joinReason);
workFlowService.endProcess(WorkflowStageEnum.getWorkflowStageByCode(line.getWorkflowStage()),closeFollowRequest);
//添加日志 //添加日志
LineLogInfo lineLogInfo = new LineLogInfo(line.getPartnerId(), line.getId(), user.getUserId(), LineLogInfo lineLogInfo = new LineLogInfo(line.getPartnerId(), line.getId(), user.getUserId(),
user.getName(), OperateTypeEnum.ADD_BLACKLIST, user.getName(), OperateTypeEnum.ADD_BLACKLIST,
@@ -281,7 +286,6 @@ public class HyPartnerLineInfoServiceImpl implements HyPartnerLineInfoService {
HyPartnerLineInfoDO hyPartnerLineInfo = hyPartnerLineInfoDAO.selectByPrimaryKeySelective(lineId); HyPartnerLineInfoDO hyPartnerLineInfo = hyPartnerLineInfoDAO.selectByPrimaryKeySelective(lineId);
HyPartnerLineInfoDO hyPartnerLineInfoDO = new HyPartnerLineInfoDO(); HyPartnerLineInfoDO hyPartnerLineInfoDO = new HyPartnerLineInfoDO();
hyPartnerLineInfoDO.setId(lineId); hyPartnerLineInfoDO.setId(lineId);
hyPartnerLineInfoDO.setLineStatus(status);
hyPartnerLineInfoDO.setRemoveBlackReason(removeReason); hyPartnerLineInfoDO.setRemoveBlackReason(removeReason);
hyPartnerLineInfoDO.setDeleted(Boolean.TRUE); hyPartnerLineInfoDO.setDeleted(Boolean.TRUE);
hyPartnerLineInfoDAO.updateByPrimaryKeySelective(hyPartnerLineInfoDO); hyPartnerLineInfoDAO.updateByPrimaryKeySelective(hyPartnerLineInfoDO);
@@ -316,7 +320,7 @@ public class HyPartnerLineInfoServiceImpl implements HyPartnerLineInfoService {
@Override @Override
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public Boolean closeOrPassFollow(LoginUserInfo user,CloseFollowRequest closeFollowRequest) { public Boolean closeOrPassFollow(LoginUserInfo user,CloseFollowRequest closeFollowRequest) throws ApiException {
HyPartnerLineInfoDO hyPartnerLineInfoDO = hyPartnerLineInfoDAO.selectByPrimaryKeySelective(closeFollowRequest.getLineId()); HyPartnerLineInfoDO hyPartnerLineInfoDO = hyPartnerLineInfoDAO.selectByPrimaryKeySelective(closeFollowRequest.getLineId());
if (hyPartnerLineInfoDO==null){ if (hyPartnerLineInfoDO==null){
throw new ServiceException(ErrorCodeEnum.LINE_ID_IS_NOT_EXIST); throw new ServiceException(ErrorCodeEnum.LINE_ID_IS_NOT_EXIST);
@@ -567,8 +571,14 @@ public class HyPartnerLineInfoServiceImpl implements HyPartnerLineInfoService {
} }
//省内调剂 有重点或者开放的 分配 //省内调剂 有重点或者开放的 分配
if (AcceptAdjustTypeEnum.PROVINCIAL_ADJUSTMENT.getCode().equals(acceptAdjustType)){ if (AcceptAdjustTypeEnum.PROVINCIAL_ADJUSTMENT.getCode().equals(acceptAdjustType)){
Integer apply = hyOpenAreaInfoDAO.getChildrenCount("apply", hyOpenAreaInfoDO.getId());
if (apply>CommonConstants.ZERO){ List<HyOpenAreaInfoDO> hyOpenAreaInfoDOList= new ArrayList<>();
if(hyOpenAreaInfoDO != null){
String areaPath = hyOpenAreaInfoDO.getAreaPath();
String province = areaPath.substring(0, areaPath.indexOf("/", areaPath.indexOf("/") + 1));
hyOpenAreaInfoDOList = hyOpenAreaInfoDAO.queryByKeyword(province, true, null, true);
}
if (hyOpenAreaInfoDOList.size()>CommonConstants.ZERO){
return Boolean.TRUE; return Boolean.TRUE;
} }
return Boolean.FALSE; return Boolean.FALSE;
@@ -631,18 +641,23 @@ public class HyPartnerLineInfoServiceImpl implements HyPartnerLineInfoService {
public HyPartnerLineInfoDO generateDefaultLineInfo(String partnerId, String wantShopArea, Integer acceptAdjustType) { public HyPartnerLineInfoDO generateDefaultLineInfo(String partnerId, String wantShopArea, Integer acceptAdjustType) {
// 生成一条线索 // 生成一条线索
HyPartnerLineInfoDO hyPartnerLineInfoDO = hyPartnerLineInfoDAO.getByPartnerId(partnerId); HyPartnerLineInfoDO hyPartnerLineInfoDO = hyPartnerLineInfoDAO.getByPartnerId(partnerId);
Boolean flag = this.assignFollowUser(partnerId, wantShopArea, acceptAdjustType);
String investmentManager = null;
if (flag){
investmentManager = getAssignFollowUser(partnerId, "intent");
}
if(hyPartnerLineInfoDO == null){ if(hyPartnerLineInfoDO == null){
hyPartnerLineInfoDO = new HyPartnerLineInfoDO(); hyPartnerLineInfoDO = new HyPartnerLineInfoDO();
hyPartnerLineInfoDO.setPartnerId(partnerId); hyPartnerLineInfoDO.setPartnerId(partnerId);
hyPartnerLineInfoDO.setWorkflowStage(WorkflowStageEnum.INTENT.getCode()); hyPartnerLineInfoDO.setWorkflowStage(WorkflowStageEnum.INTENT.getCode());
hyPartnerLineInfoDO.setWorkflowStatus(WorkflowStatusEnum.INTENT_0.getCode()); hyPartnerLineInfoDO.setWorkflowStatus(WorkflowStatusEnum.INTENT_0.getCode());
Boolean flag = this.assignFollowUser(hyPartnerLineInfoDO.getPartnerId(), wantShopArea, acceptAdjustType);
hyPartnerLineInfoDO.setLineStatus(flag ? LineStatusEnum.PRIVATE_SEAS.getCode() : LineStatusEnum.PUBLIC_SEAS.getCode()); hyPartnerLineInfoDO.setLineStatus(flag ? LineStatusEnum.PRIVATE_SEAS.getCode() : LineStatusEnum.PUBLIC_SEAS.getCode());
if (flag){ hyPartnerLineInfoDO.setInvestmentManager(investmentManager);
String investmentManager = getAssignFollowUser(partnerId, "intent");
hyPartnerLineInfoDO.setInvestmentManager(investmentManager);
}
hyPartnerLineInfoDAO.insertSelective(hyPartnerLineInfoDO); hyPartnerLineInfoDAO.insertSelective(hyPartnerLineInfoDO);
}else {
hyPartnerLineInfoDO.setLineStatus(flag ? LineStatusEnum.PRIVATE_SEAS.getCode() : LineStatusEnum.PUBLIC_SEAS.getCode());
hyPartnerLineInfoDO.setInvestmentManager(investmentManager);
hyPartnerLineInfoDAO.updateByPrimaryKeySelective(hyPartnerLineInfoDO);
} }
return hyPartnerLineInfoDO; return hyPartnerLineInfoDO;
} }

View File

@@ -6,8 +6,17 @@ import cn.hutool.core.date.DateTime;
import cn.hutool.core.date.DateUtil; import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.ObjectUtil;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.cool.store.context.CurrentUserHolder;
import com.cool.store.context.LoginUserInfo;
import com.cool.store.context.PartnerUserHolder;
import com.cool.store.dao.EnterpriseUserDAO;
import com.cool.store.dao.HyInterviewDAO; import com.cool.store.dao.HyInterviewDAO;
import com.cool.store.dto.calendar.*; import com.cool.store.dto.calendar.CreateCalendarEventDTO;
import com.cool.store.dto.calendar.DeleteCalendarEventDTO;
import com.cool.store.dto.calendar.UserCalendarsEventDTO;
import com.cool.store.dto.calendar.UserFreeBusyInfoDTO;
import com.cool.store.dto.log.*;
import com.cool.store.dto.message.SendCardMessageDTO; import com.cool.store.dto.message.SendCardMessageDTO;
import com.cool.store.dto.partner.EnterInterviewDto; import com.cool.store.dto.partner.EnterInterviewDto;
import com.cool.store.entity.*; import com.cool.store.entity.*;
@@ -15,19 +24,18 @@ import com.cool.store.enums.*;
import com.cool.store.exception.ApiException; import com.cool.store.exception.ApiException;
import com.cool.store.exception.ServiceException; import com.cool.store.exception.ServiceException;
import com.cool.store.http.ISVHttpRequest; import com.cool.store.http.ISVHttpRequest;
import com.cool.store.mapper.HyPartnerBaseInfoMapper; import com.cool.store.mapper.*;
import com.cool.store.mapper.HyPartnerInterviewMapper;
import com.cool.store.mapper.HyPartnerInterviewPlanMapper;
import com.cool.store.mapper.HyPartnerLineInfoMapper;
import com.cool.store.request.*; import com.cool.store.request.*;
import com.cool.store.service.EnterpriseUserService; import com.cool.store.service.EnterpriseUserService;
import com.cool.store.service.HyPartnerLineInfoService;
import com.cool.store.service.InterviewService; import com.cool.store.service.InterviewService;
import com.cool.store.service.LogService;
import com.cool.store.service.SmsService; import com.cool.store.service.SmsService;
import com.cool.store.utils.CoolDateUtils;
import com.cool.store.utils.StringUtil; import com.cool.store.utils.StringUtil;
import com.cool.store.utils.TRTCUtils; import com.cool.store.utils.TRTCUtils;
import com.cool.store.vo.EnterInterviewVO; import com.cool.store.vo.EnterInterviewVO;
import com.cool.store.vo.EnterpriseUserBaseInfoVO; import com.cool.store.vo.EnterpriseUserBaseInfoVO;
import com.cool.store.vo.PartnerUserInfoVO;
import com.cool.store.vo.interview.CreateAppointmentVO; import com.cool.store.vo.interview.CreateAppointmentVO;
import com.cool.store.vo.interview.InterviewVO; import com.cool.store.vo.interview.InterviewVO;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
@@ -85,12 +93,14 @@ public class InterviewServiceImpl implements InterviewService {
@Autowired @Autowired
private SmsService smsService; private SmsService smsService;
@Autowired
private HyPartnerLineInfoService hyPartnerLineInfoService;
@Autowired @Autowired
private HyInterviewDAO interviewDAO; private HyInterviewDAO interviewDAO;
@Autowired
private LogService logService;
@Autowired
private EnterpriseUserDAO enterpriseUserDAO;
@Override @Override
public List<InterviewVO> getInterviewList(GetInterviewListReq request) { public List<InterviewVO> getInterviewList(GetInterviewListReq request) {
List<InterviewVO> interviewList = hyPartnerInterviewPlanMapper.getInterviewList(request); List<InterviewVO> interviewList = hyPartnerInterviewPlanMapper.getInterviewList(request);
@@ -188,6 +198,16 @@ public class InterviewServiceImpl implements InterviewService {
hyPartnerInterviewDO.setUpdateTime(new Date()); hyPartnerInterviewDO.setUpdateTime(new Date());
hyPartnerInterviewMapper.updateByPrimaryKeySelective(hyPartnerInterviewDO); hyPartnerInterviewMapper.updateByPrimaryKeySelective(hyPartnerInterviewDO);
//记录日志
LoginUserInfo operator = CurrentUserHolder.getUser();
EnterpriseUserDO enterpriseUserDO = enterpriseUserDAO.getUserInfoById(request.getNewInterviewerId());
EntrustOthersDTO log = EntrustOthersDTO.builder().operateUserId(operator.getUserId()).operateUsername(operator.getName())
.operateTime(DateUtil.format(new Date(), CoolDateUtils.DATE_FORMAT_SEC))
.beforeInterviwerMobile(interviewInfo.getInterviewerMobile())
.beforeInterviwerName(interviewInfo.getInterviewerName())
.afterInterviwerMobile(enterpriseUserDO.getMobile())
.afterInterviwerName(enterpriseUserDO.getName()).build();
logService.recordBizLog(operator,interviewInfo.getPartnerLineId(),OperateTypeEnum.ENTRUST_OTHERS,log);
} }
/** /**
@@ -248,6 +268,13 @@ public class InterviewServiceImpl implements InterviewService {
hyPartnerInterviewDO.setInterviewer(interviewInfo.getInterviewerId()); hyPartnerInterviewDO.setInterviewer(interviewInfo.getInterviewerId());
hyPartnerInterviewDO.setUpdateTime(new Date()); hyPartnerInterviewDO.setUpdateTime(new Date());
hyPartnerInterviewMapper.updateByPrimaryKeySelective(hyPartnerInterviewDO); hyPartnerInterviewMapper.updateByPrimaryKeySelective(hyPartnerInterviewDO);
//记录日志
LoginUserInfo operator = CurrentUserHolder.getUser();
ModifyInterviewTimeDTO log = ModifyInterviewTimeDTO.builder().mobile(operator.getMobile()).operateUserId(operator.getUserId()).operateUsername(operator.getName())
.operateTime(DateUtil.format(new Date(), CoolDateUtils.DATE_FORMAT_SEC))
.beforeInterviewTime(interviewInfo.getStartTime()).afterInterviewTime(request.getNewStartBookingTime()).build();
logService.recordBizLog(operator,interviewInfo.getPartnerLineId(),OperateTypeEnum.MODIFY_INTERVIEW_TIME,log);
} }
@Override @Override
@@ -273,6 +300,11 @@ public class InterviewServiceImpl implements InterviewService {
// hyPartnerInterviewDO.setStatus(Integer.parseInt(WorkflowStatusEnum.INTERVIEW_4.getCode())); // hyPartnerInterviewDO.setStatus(Integer.parseInt(WorkflowStatusEnum.INTERVIEW_4.getCode()));
hyPartnerInterviewDO.setUpdateTime(now); hyPartnerInterviewDO.setUpdateTime(now);
hyPartnerInterviewMapper.updateByPrimaryKeySelective(hyPartnerInterviewDO); hyPartnerInterviewMapper.updateByPrimaryKeySelective(hyPartnerInterviewDO);
//记录日志
LoginUserInfo operator = CurrentUserHolder.getUser();
LogBasicDTO log = LogBasicDTO.builder().mobile(operator.getMobile()).operateUserId(operator.getUserId()).operateUsername(operator.getName()).operateTime(DateUtil.format(new Date(), CoolDateUtils.DATE_FORMAT_SEC)).build();
logService.recordBizLog(operator,interviewInfo.getPartnerLineId(),OperateTypeEnum.FINISH_INTERVIEW,log);
} }
/** /**
@@ -419,6 +451,12 @@ public class InterviewServiceImpl implements InterviewService {
sendCardMessageDTO.setTitle("面试预约申请"); sendCardMessageDTO.setTitle("面试预约申请");
sendCardMessageDTO.setContent(generateFeiShuInterviewMsg(interviewVO.getPartnerName(), interviewVO.getPartnerMobile(), interviewVO.getStartTime())); sendCardMessageDTO.setContent(generateFeiShuInterviewMsg(interviewVO.getPartnerName(), interviewVO.getPartnerMobile(), interviewVO.getStartTime()));
isvHttpRequest.sendFeiShuCardMessage(sendCardMessageDTO); isvHttpRequest.sendFeiShuCardMessage(sendCardMessageDTO);
//记录日志
PartnerUserInfoVO operator = PartnerUserHolder.getUser();
LogBasicDTO log = LogBasicDTO.builder().mobile(operator.getMobile()).operateUserId(operator.getPartnerId()).operateUsername(operator.getUsername()).operateTime(DateUtil.format(new Date(), CoolDateUtils.DATE_FORMAT_SEC)).mobile(operator.getMobile()).build();
logService.recordPartnerBizLog(operator,interviewVO.getPartnerLineId(),OperateTypeEnum.INTERVIEW_APPOINTMENT,log);
return vo; return vo;
} }
@@ -501,6 +539,11 @@ public class InterviewServiceImpl implements InterviewService {
hyPartnerLineDO.setWorkflowStatus(WorkflowStatusEnum.RESERVATION_0.getCode()); hyPartnerLineDO.setWorkflowStatus(WorkflowStatusEnum.RESERVATION_0.getCode());
hyPartnerLineDO.setUpdateTime(new Date()); hyPartnerLineDO.setUpdateTime(new Date());
hyPartnerLineInfoMapper.updateByPrimaryKeySelective(hyPartnerLineDO); hyPartnerLineInfoMapper.updateByPrimaryKeySelective(hyPartnerLineDO);
//记录日志
LoginUserInfo operator = CurrentUserHolder.getUser();
ReInterviewDTO log = ReInterviewDTO.builder().mobile(operator.getMobile()).operateUserId(operator.getUserId()).operateUsername(operator.getName()).operateTime(DateUtil.format(new Date(), CoolDateUtils.DATE_FORMAT_SEC))
.rejectRealReason(request.getReason()).certifyFile(request.getCertifyFile()).build();
logService.recordBizLog(operator,interviewVO.getPartnerLineId(),OperateTypeEnum.REINTERVIEW,log);
} }
// @Override // @Override

View File

@@ -0,0 +1,83 @@
package com.cool.store.service.impl;
import cn.hutool.core.date.DateUtil;
import com.cool.store.context.LoginUserInfo;
import com.cool.store.dao.HyPartnerTaskInfoLogDAO;
import com.cool.store.dto.log.LineLogInfo;
import com.cool.store.dto.log.LogBasicDTO;
import com.cool.store.entity.HyPartnerLineInfoDO;
import com.cool.store.enums.OperateTypeEnum;
import com.cool.store.enums.WorkflowStageEnum;
import com.cool.store.enums.WorkflowStatusEnum;
import com.cool.store.mapper.HyPartnerLineInfoMapper;
import com.cool.store.service.LogService;
import com.cool.store.utils.CoolDateUtils;
import com.cool.store.utils.Md5Utils;
import com.cool.store.vo.PartnerUserInfoVO;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;
import java.util.Arrays;
import java.util.Date;
import java.util.List;
/**
* @Author: young.yu
* @Date: 2023-06-28 00:10
* @Description:
*/
@Service
public class LogServiceImpl implements LogService {
private static final Logger LOG = LoggerFactory.getLogger(Md5Utils.class);
@Autowired
private HyPartnerLineInfoMapper partnerLineInfoMapper;
@Autowired
private HyPartnerTaskInfoLogDAO hyPartnerTaskInfoLogDAO;
@Override
@Async
public void recordBizLog(LoginUserInfo operator,Long lineId,OperateTypeEnum operateTypeEnum,Object logData){
try {
List<HyPartnerLineInfoDO> lineInfos = partnerLineInfoMapper.getHyPartnerLineInfoListByIds(Arrays.asList(lineId));
if (lineInfos == null || lineInfos.size() == 0) {
return;
}
HyPartnerLineInfoDO hyPartnerLineInfoDO = lineInfos.get(0);
LineLogInfo lineLogInfo = new LineLogInfo(hyPartnerLineInfoDO.getPartnerId(), lineId, operator.getUserId(),
operator.getName(), operateTypeEnum,
WorkflowStageEnum.getWorkflowStageByCode(hyPartnerLineInfoDO.getWorkflowStage()),
hyPartnerLineInfoDO.getWorkflowStatus(), "");
lineLogInfo.setData(logData);
hyPartnerTaskInfoLogDAO.addOperateLog(lineLogInfo);
int i =1;
}catch (Exception e){
LOG.error("recordBizLog error",e);
e.printStackTrace();
}
}
@Override
@Async
public void recordPartnerBizLog(PartnerUserInfoVO operator, Long lineId, OperateTypeEnum operateTypeEnum, Object logData){
try {
List<HyPartnerLineInfoDO> lineInfos = partnerLineInfoMapper.getHyPartnerLineInfoListByIds(Arrays.asList(lineId));
if (lineInfos == null || lineInfos.size() == 0) {
return;
}
HyPartnerLineInfoDO hyPartnerLineInfoDO = lineInfos.get(0);
LineLogInfo lineLogInfo = new LineLogInfo(hyPartnerLineInfoDO.getPartnerId(), lineId, operator.getPartnerId(),
operator.getUsername(), operateTypeEnum,
WorkflowStageEnum.getWorkflowStageByCode(hyPartnerLineInfoDO.getWorkflowStage()),
hyPartnerLineInfoDO.getWorkflowStatus(), "");
lineLogInfo.setData(logData);
hyPartnerTaskInfoLogDAO.addOperateLog(lineLogInfo);
}catch (Exception e){
LOG.error("recordBizLog error",e);
e.printStackTrace();
}
}
}

View File

@@ -0,0 +1,60 @@
package com.cool.store.service.impl;
import com.alibaba.fastjson.JSONObject;
import com.cool.store.constants.RedisConstant;
import com.cool.store.entity.MDMAreaDO;
import com.cool.store.mapper.MdmAreaMapper;
import com.cool.store.service.MDMAreaService;
import com.cool.store.utils.RedisUtilPool;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.text.MessageFormat;
import java.util.List;
@Service
public class MDMAreaServiceImpl implements MDMAreaService {
@Autowired
private RedisUtilPool redisUtilPool;
@Autowired
private MdmAreaMapper mdmAreaMapper;
/**
* 获取省级数据
*/
@Override
public List<MDMAreaDO> getProvince() {
String provincesJson = redisUtilPool.getString(RedisConstant.MDM_AREA_PROVINCE);
if (StringUtils.isNotEmpty(provincesJson)) {
return (List<MDMAreaDO>) JSONObject.parseObject(provincesJson, List.class);
}
List<MDMAreaDO> areaDOList = mdmAreaMapper.getProvince();
//过期时间三小时
redisUtilPool.setString(RedisConstant.MDM_AREA_PROVINCE, JSONObject.toJSONString(areaDOList), 3 * 60 * 60);
return areaDOList;
}
/**
* 获取子级地区
* @param code 父级 code
*/
@Override
public List<MDMAreaDO> getSonArea(String code) {
String provincesJson = redisUtilPool.getString(MessageFormat.format(RedisConstant.MDM_AREA_OTHERS, code));
if (StringUtils.isNotEmpty(provincesJson)) {
return (List<MDMAreaDO>) JSONObject.parseObject(provincesJson, List.class);
}
List<MDMAreaDO> areaDOList = mdmAreaMapper.getSonArea(code);
//数据库也没有该数据就缓存空值,但是只缓存一分钟
if (areaDOList == null || areaDOList.size() == 0) {
redisUtilPool.setString(MessageFormat.format(RedisConstant.MDM_AREA_OTHERS, code), "", 60);
}
//过期时间三小时
redisUtilPool.setString(MessageFormat.format(RedisConstant.MDM_AREA_OTHERS, code), JSONObject.toJSONString(areaDOList), 3 * 60 * 60);
return areaDOList;
}
}

View File

@@ -3,11 +3,15 @@ package com.cool.store.service.impl;
import cn.hutool.core.convert.Convert; import cn.hutool.core.convert.Convert;
import cn.hutool.core.date.DateTime; import cn.hutool.core.date.DateTime;
import cn.hutool.core.date.DateUtil; import cn.hutool.core.date.DateUtil;
import com.cool.store.context.PartnerUserHolder;
import com.cool.store.dao.HyInterviewDAO; import com.cool.store.dao.HyInterviewDAO;
import com.cool.store.dto.log.ModifyInterviewTimeDTO;
import com.cool.store.dto.partner.EnterInterviewDto; import com.cool.store.dto.partner.EnterInterviewDto;
import com.cool.store.dto.partner.LineQueryInterviewDto;
import com.cool.store.entity.HyPartnerInterviewDO; import com.cool.store.entity.HyPartnerInterviewDO;
import com.cool.store.entity.HyPartnerInterviewPlanDO; import com.cool.store.entity.HyPartnerInterviewPlanDO;
import com.cool.store.enums.ErrorCodeEnum; import com.cool.store.enums.ErrorCodeEnum;
import com.cool.store.enums.OperateTypeEnum;
import com.cool.store.enums.RoomStatus; import com.cool.store.enums.RoomStatus;
import com.cool.store.enums.WorkflowStatusEnum; import com.cool.store.enums.WorkflowStatusEnum;
import com.cool.store.exception.ApiException; import com.cool.store.exception.ApiException;
@@ -15,11 +19,14 @@ import com.cool.store.exception.ServiceException;
import com.cool.store.mapper.HyPartnerInterviewMapper; import com.cool.store.mapper.HyPartnerInterviewMapper;
import com.cool.store.mapper.HyPartnerInterviewPlanMapper; import com.cool.store.mapper.HyPartnerInterviewPlanMapper;
import com.cool.store.request.ModifyInterviewTimeReq; import com.cool.store.request.ModifyInterviewTimeReq;
import com.cool.store.service.LogService;
import com.cool.store.service.PartnerInterviewService; import com.cool.store.service.PartnerInterviewService;
import com.cool.store.utils.CoolDateUtils;
import com.cool.store.utils.TRTCUtils; import com.cool.store.utils.TRTCUtils;
import com.cool.store.vo.EnterInterviewVO; import com.cool.store.vo.EnterInterviewVO;
import com.cool.store.vo.PartnerInterviewInfoVO; import com.cool.store.vo.PartnerInterviewInfoVO;
import com.cool.store.vo.PartnerPassLetterDetailVO; import com.cool.store.vo.PartnerPassLetterDetailVO;
import com.cool.store.vo.PartnerUserInfoVO;
import com.cool.store.vo.interview.InterviewVO; import com.cool.store.vo.interview.InterviewVO;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@@ -48,6 +55,9 @@ public class PartnerInterviewServiceImpl implements PartnerInterviewService {
@Value("${trtc.secretKey}") @Value("${trtc.secretKey}")
private String key; private String key;
@Autowired
private LogService logService;
/** /**
* 加盟商查询面试信息 * 加盟商查询面试信息
* *
@@ -59,6 +69,11 @@ public class PartnerInterviewServiceImpl implements PartnerInterviewService {
return interviewMapper.queryByPartnerId(partnerId); return interviewMapper.queryByPartnerId(partnerId);
} }
@Override
public PartnerInterviewInfoVO queryByPartnerLineId(LineQueryInterviewDto request) throws ApiException {
return interviewMapper.queryByPartnerLineId(request.getPartnerLineId());
}
/** /**
* 进入面试间的方法 * 进入面试间的方法
* 修改一些面试状态 * 修改一些面试状态
@@ -175,6 +190,13 @@ public class PartnerInterviewServiceImpl implements PartnerInterviewService {
record.setEndTime(Convert.toDate(request.getNewEndBookingTime())); record.setEndTime(Convert.toDate(request.getNewEndBookingTime()));
record.setUpdateTime(new Date()); record.setUpdateTime(new Date());
interviewPlanMapper.updateByPrimaryKeySelective(record); interviewPlanMapper.updateByPrimaryKeySelective(record);
//记录日志
PartnerUserInfoVO operator = PartnerUserHolder.getUser();
ModifyInterviewTimeDTO log = ModifyInterviewTimeDTO.builder().mobile(operator.getMobile()).operateUserId(operator.getPartnerId()).operateUsername(operator.getUsername())
.operateTime(DateUtil.format(new Date(), CoolDateUtils.DATE_FORMAT_SEC))
.beforeInterviewTime(interviewInfo.getStartTime()).afterInterviewTime(request.getNewStartBookingTime()).build();
logService.recordPartnerBizLog(operator,interviewInfo.getPartnerLineId(), OperateTypeEnum.MODIFY_INTERVIEW_TIME,log);
} }
} }

View File

@@ -82,7 +82,7 @@ public class PartnerUserInfoServiceImpl implements PartnerUserInfoService {
inviteCodeDetailVO.setInviteCode(hyPartnerUserInfoDO.getInviteCode()); inviteCodeDetailVO.setInviteCode(hyPartnerUserInfoDO.getInviteCode());
inviteCodeDetailVO.setStoreName(hyPartnerUserInfoDO.getRecommendPartnerName()); inviteCodeDetailVO.setStoreName(hyPartnerUserInfoDO.getRecommendPartnerName());
inviteCodeDetailVO.setPartnerPhone(hyPartnerUserInfoDO.getRecommendPartnerMobile()); inviteCodeDetailVO.setPartnerPhone(hyPartnerUserInfoDO.getRecommendPartnerMobile());
inviteCodeDetailVO.setStoreName(hyPartnerUserInfoDO.getShopName()); inviteCodeDetailVO.setPartnerName(hyPartnerUserInfoDO.getShopName());
return inviteCodeDetailVO; return inviteCodeDetailVO;
} }
@@ -112,14 +112,17 @@ public class PartnerUserInfoServiceImpl implements PartnerUserInfoService {
if (CollectionUtils.isNotEmpty(hyOpenAreaInfoDOS)) { if (CollectionUtils.isNotEmpty(hyOpenAreaInfoDOS)) {
applyBaseInfoVO.setProvinceHasOpenArea(true); applyBaseInfoVO.setProvinceHasOpenArea(true);
} }
applyBaseInfoVO.setPartnerLineId(hyPartnerLineInfoDO.getId());
applyBaseInfoVO.setLineStatus(hyPartnerLineInfoDO.getLineStatus()); applyBaseInfoVO.setLineStatus(hyPartnerLineInfoDO.getLineStatus());
String cacheKey = MessageFormat.format(RedisConstant.PARTNER_INTENTINFO_CACHE_KEY, partnerUserInfoRequest.getPartnerId(), hyPartnerLineInfoDO.getId()); String cacheKey = MessageFormat.format(RedisConstant.PARTNER_INTENTINFO_CACHE_KEY, partnerUserInfoRequest.getPartnerId(), hyPartnerLineInfoDO.getId());
if (StringUtils.isNotBlank(redisUtilPool.getString(cacheKey))) { if (StringUtils.isNotBlank(redisUtilPool.getString(cacheKey))) {
PartnerIntentInfoRequest request = JSONObject.parseObject(redisUtilPool.getString(cacheKey), PartnerIntentInfoRequest.class); PartnerIntentInfoRequest request = JSONObject.parseObject(redisUtilPool.getString(cacheKey), PartnerIntentInfoRequest.class);
if(!partnerUserInfoRequest.getWantShopArea().equals(request.getWantShopArea())){ if(!partnerUserInfoRequest.getWantShopArea().equals(request.getWantShopArea())
|| !partnerUserInfoRequest.getAcceptAdjustType().equals(request.getAcceptAdjustType())){
request.setWantShopArea(partnerUserInfoRequest.getWantShopArea()); request.setWantShopArea(partnerUserInfoRequest.getWantShopArea());
request.setAcceptAdjustType(partnerUserInfoRequest.getAcceptAdjustType());
redisUtilPool.setString(cacheKey, JSONObject.toJSONString(request), RedisConstant.ONE_DAY_SECONDS);
} }
redisUtilPool.setString(cacheKey, JSONObject.toJSONString(request), RedisConstant.ONE_DAY_SECONDS);
} }
return applyBaseInfoVO; return applyBaseInfoVO;
} }

View File

@@ -1,5 +1,6 @@
package com.cool.store.service.impl; package com.cool.store.service.impl;
import com.cool.store.dto.trtc.callback.VideoCallBackDTO;
import com.cool.store.mapper.HyPartnerInterviewMapper; import com.cool.store.mapper.HyPartnerInterviewMapper;
import com.cool.store.request.TRTCVideoCallBackReq; import com.cool.store.request.TRTCVideoCallBackReq;
import com.cool.store.service.TRTCVideoService; import com.cool.store.service.TRTCVideoService;
@@ -15,12 +16,19 @@ public class TRTCVideoServiceImpl implements TRTCVideoService {
/** /**
* 音视频上传成功后的回调处理 * 音视频上传成功后的回调处理
*/ */
// @Override
// public void handleVideoCallBack(TRTCVideoCallBackReq req) {
// //将视频播放地址拼接到对应的面试信息字段中
// String videoUrl = req.getEventInfo().getPayLoad().getTencentVod().getVideoUrl();
// String roomId = req.getEventInfo().getRoomId();
// interviewMapper.addVideoUrl(roomId, videoUrl);
// }
@Override @Override
public void handleVideoCallBack(TRTCVideoCallBackReq req) { public void handleVideoCallBack(VideoCallBackDTO videoCallBackDTO) {
//将视频播放地址拼接到对应的面试信息字段中 //将视频播放地址拼接到对应的面试信息字段中
String videoUrl = req.getEventInfo().getPayLoad().getTencentVod().getVideoUrl(); String videoUrl = videoCallBackDTO.getEventInfo().getPayload().getTencentVod().getVideoUrl();
String roomId = req.getEventInfo().getRoomId(); String roomId = videoCallBackDTO.getEventInfo().getRoomId();
interviewMapper.addVideoUrl(roomId, videoUrl); interviewMapper.addVideoUrl(roomId, videoUrl);
} }
} }

View File

@@ -35,7 +35,7 @@ public class WorkFlowServiceImpl implements WorkFlowService{
@Override @Override
public void endProcess(WorkflowStageEnum workflowStage, CloseFollowRequest request) { public void endProcess(WorkflowStageEnum workflowStage, CloseFollowRequest request) throws ApiException {
getWorkflowService(workflowStage).endProcess(request); getWorkflowService(workflowStage).endProcess(request);
} }

View File

@@ -1,14 +1,15 @@
package com.cool.store.service.impl.workflow; package com.cool.store.service.impl.workflow;
import cn.hutool.core.date.DateUtil; import cn.hutool.core.date.DateUtil;
import com.cool.store.context.CurrentUserHolder;
import com.cool.store.context.LoginUserInfo;
import com.cool.store.dto.calendar.CreateCalendarEventDTO; import com.cool.store.dto.calendar.CreateCalendarEventDTO;
import com.cool.store.dto.calendar.DeleteCalendarEventDTO; import com.cool.store.dto.calendar.DeleteCalendarEventDTO;
import com.cool.store.dto.calendar.UserCalendarsEventDTO; import com.cool.store.dto.calendar.UserCalendarsEventDTO;
import com.cool.store.dto.log.ReInterviewDTO;
import com.cool.store.dto.log.RejectInterviewDTO;
import com.cool.store.entity.HyPartnerInterviewDO; import com.cool.store.entity.HyPartnerInterviewDO;
import com.cool.store.enums.ErrorCodeEnum; import com.cool.store.enums.*;
import com.cool.store.enums.RoomStatus;
import com.cool.store.enums.WorkflowStageEnum;
import com.cool.store.enums.WorkflowStatusEnum;
import com.cool.store.exception.ApiException; import com.cool.store.exception.ApiException;
import com.cool.store.exception.ServiceException; import com.cool.store.exception.ServiceException;
import com.cool.store.http.ISVHttpRequest; import com.cool.store.http.ISVHttpRequest;
@@ -18,9 +19,12 @@ import com.cool.store.request.CloseFollowRequest;
import com.cool.store.request.EntrustOthersReq; import com.cool.store.request.EntrustOthersReq;
import com.cool.store.request.TransferInvestmentManagerRequest; import com.cool.store.request.TransferInvestmentManagerRequest;
import com.cool.store.service.InterviewService; import com.cool.store.service.InterviewService;
import com.cool.store.service.LogService;
import com.cool.store.utils.CoolDateUtils;
import com.cool.store.vo.interview.InterviewVO; import com.cool.store.vo.interview.InterviewVO;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
@@ -49,13 +53,16 @@ public class InterviewWorkFlowService extends WorkFlowBaseService {
@Autowired @Autowired
private ISVHttpRequest isvHttpRequest; private ISVHttpRequest isvHttpRequest;
@Autowired
private LogService logService;
@Override @Override
public WorkflowStageEnum getWorkFlowStage() { public WorkflowStageEnum getWorkFlowStage() {
return WorkflowStageEnum.RESERVATION; return WorkflowStageEnum.RESERVATION;
} }
@Override @Override
public void endProcess(CloseFollowRequest request) throws ServiceException{ public void endProcess(CloseFollowRequest request) throws ApiException {
Long lineId = request.getLineId(); Long lineId = request.getLineId();
//根据线索id查询面试信息 //根据线索id查询面试信息
List<HyPartnerInterviewDO> interviewBaseInfos = hyPartnerInterviewMapper.getInterviewBaseInfoListByLineIds(Arrays.asList(lineId)); List<HyPartnerInterviewDO> interviewBaseInfos = hyPartnerInterviewMapper.getInterviewBaseInfoListByLineIds(Arrays.asList(lineId));
@@ -63,7 +70,28 @@ public class InterviewWorkFlowService extends WorkFlowBaseService {
throw new ServiceException(ErrorCodeEnum.INTERVIEW_NOT_EXIST); throw new ServiceException(ErrorCodeEnum.INTERVIEW_NOT_EXIST);
} }
HyPartnerInterviewDO interviewBaseInfo = interviewBaseInfos.get(0); HyPartnerInterviewDO interviewBaseInfo = interviewBaseInfos.get(0);
InterviewVO interviewInfo = hyPartnerInterviewPlanMapper.getInterviewInfo(String.valueOf(interviewBaseInfo.getInterviewPlanId()));
if(Integer.parseInt(WorkflowStatusEnum.INTERVIEW_2.getCode()) == interviewBaseInfo.getStatus()
&& StringUtils.isNotEmpty(interviewInfo.getRoomStatus())
&& String.valueOf(RoomStatus.WAIT_FOR_OPEN.getCode()).equals(interviewInfo.getRoomStatus())
&& StringUtils.isNotEmpty(interviewInfo.getFeishuCalendarId())
&& StringUtils.isNotEmpty(interviewInfo.getFeishuScheduleId())){
// 原面试官日程删除
DeleteCalendarEventDTO deleteCalendarEventDTO = new DeleteCalendarEventDTO();
deleteCalendarEventDTO.setCalendarId(interviewInfo.getFeishuCalendarId());
deleteCalendarEventDTO.setEventId(interviewInfo.getFeishuScheduleId());
deleteCalendarEventDTO.setUserId(interviewInfo.getInterviewerId());
UserCalendarsEventDTO userCalendarsEventDTO = isvHttpRequest.deleteUserCalendarEvent(deleteCalendarEventDTO);
if(userCalendarsEventDTO == null ){
throw new ApiException(ErrorCodeEnum.FEISHU_DELETE_SCHEDULE_ERROR);
}
}
interviewService.rejectInterviewAndSuspendLine(interviewBaseInfo.getId(),interviewBaseInfo.getInterviewPlanId(),null); interviewService.rejectInterviewAndSuspendLine(interviewBaseInfo.getId(),interviewBaseInfo.getInterviewPlanId(),null);
//记录日志
LoginUserInfo operator = CurrentUserHolder.getUser();
RejectInterviewDTO log = RejectInterviewDTO.builder().mobile(operator.getMobile()).operateUserId(operator.getUserId()).operateUsername(operator.getName()).operateTime(DateUtil.format(new Date(), CoolDateUtils.DATE_FORMAT_SEC))
.rejectRealReason(request.getRejectRealReason()).rejectPublicReason(request.getRejectPublicReason()).certifyFile(request.getCertifyFile()).build();
logService.recordBizLog(operator,request.getLineId(), OperateTypeEnum.REJECT_INTERVIEW,log);
} }
@Override @Override

View File

@@ -23,7 +23,7 @@ public abstract class WorkFlowBaseService {
* 结束流程 * 结束流程
* @param request * @param request
*/ */
public abstract void endProcess(CloseFollowRequest request); public abstract void endProcess(CloseFollowRequest request) throws ApiException;
/** /**
* 转让招商经理 * 转让招商经理

View File

@@ -0,0 +1,164 @@
package com.cool.store.utils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.io.*;
import java.net.HttpURLConnection;
import java.net.URL;
import java.nio.charset.StandardCharsets;
import java.time.LocalDateTime;
import java.util.HashMap;
import java.util.Map;
/**
* @author leoxie
*/
public class Client {
private String url;
private String method = "POST";
private HashMap<String,String> header;
private String data;
private Integer timeout = 8000;
private Integer maxLength = 10000;
private static final Logger log = LoggerFactory.getLogger(Client.class);
public String exec() throws IOException {
HttpURLConnection connection = null;
OutputStreamWriter out = null;
BufferedReader reader = null;
StringBuilder res = null;
String result = null;
Long optTime = 0L;
InputStream is = null;
LocalDateTime beginTime = LocalDateTime.now();
URL url = new URL(getUrl());
connection = (HttpURLConnection) url.openConnection();
try {
connection.setDoOutput(true);
connection.setDoInput(true);
connection.setUseCaches(false);
connection.setInstanceFollowRedirects(true);
//设置超时时间
connection.setConnectTimeout(getTimeout());
connection.setReadTimeout(getTimeout());
// 设置请求方式
connection.setRequestMethod(getMethod());
// 设置发送数据的格式
if (!getHeader().isEmpty()) {
for (Map.Entry<String, String> entry : getHeader().entrySet()) {
connection.setRequestProperty(entry.getKey(), entry.getValue());
}
}
//发起连接
connection.connect();
// utf-8编码[推送提交的参数]
if (!getData().isEmpty()) {
out = new OutputStreamWriter(connection.getOutputStream(), StandardCharsets.UTF_8);
out.append(getData());
out.flush();
out.close();
}
if(connection.getResponseCode() > 2000){
is = connection.getErrorStream();
}else{
is = connection.getInputStream();
}
// 读取响应
reader = new BufferedReader(new InputStreamReader(is, StandardCharsets.UTF_8));
String line;
res = new StringBuilder();
while ((line = reader.readLine()) != null) {
res.append(line);
}
reader.close();
result = res.toString();
return result;
}catch (Exception e){
throw e;
}finally {
if (connection != null){
connection.disconnect();
}
if(out != null){
out.close();
}
if(reader != null){
reader.close();
}
// log.info("request url is : " + getUrl());
// log.info("request params is : " + getData());
// if(result != null && result.length() < maxLength) {
// log.info("response : " + result);
// }
// optTime = Duration.between(beginTime,LocalDateTime.now()).toMillis();
// log.info("response time: " + optTime.toString());
}
}
public String getUrl() {
assert !url.isEmpty();
return url;
}
public void setUrl(String url) {
this.url = url;
}
public String getMethod() {
assert !method.isEmpty();
return method;
}
public void setMethod(String method) {
this.method = method;
}
public HashMap<String, String> getHeader() {
return header;
}
public void setHeader(HashMap<String, String> header) {
this.header = header;
}
public String getData() {
return data;
}
/**
* 提交参数
*
* 如果是json形式那么就是json字符串
* 如果是表单形式就是name1=value1&name2=value2 的形式
* @param data
*/
public void setData(String data) {
this.data = data;
}
public Integer getTimeout() {
return timeout;
}
public void setTimeout(Integer timeout) {
this.timeout = timeout;
}
}

View File

@@ -0,0 +1,104 @@
package com.cool.store.utils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* @author leoxie
*/
public class Get {
private static final Logger log = LoggerFactory.getLogger(Get.class);
private static final Integer connectTimeout = 1000;
private static final Integer timeout = 5000;
public static String send(String url, String param) throws IOException {
return send(url,param,true);
}
/**
* 向指定URL发送GET方法的请求
*
* @param url 发送请求的URL
* @param param 请求参数,请求参数应该是 name1=value1&name2=value2 的形式。
* @return URL 所代表远程资源的响应结果
*/
public static String send(String url, String param,boolean hasLog) throws IOException {
return send(url, param, hasLog, null);
}
public static String send(String url, String param, boolean hasLog, HashMap<String,String> headers) throws IOException {
StringBuilder result = new StringBuilder();
BufferedReader reader = null;
HttpURLConnection connection = null;
try {
String urlNameString = url + (param.isEmpty()?"":"?" + param);
log.info("url:"+url);
log.info("param:"+param);
URL realUrl = new URL(urlNameString);
// 打开和URL之间的连接
connection = (HttpURLConnection)realUrl.openConnection();
// 设置通用的请求属性
connection.setRequestProperty("accept", "*/*");
connection.setRequestProperty("connection", "Keep-Alive");
connection.setRequestProperty("user-agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1;SV1)");
//添加头部信息
if(headers != null && !headers.isEmpty()){
for (Map.Entry<String,String> entry:headers.entrySet()) {
connection.setRequestProperty(entry.getKey(),entry.getValue());
}
}
connection.setConnectTimeout(connectTimeout);
connection.setReadTimeout(timeout);
// 建立实际的连接
connection.connect();
// 获取所有响应头字段
Map<String, List<String>> responseHeader = connection.getHeaderFields();
// 遍历所有的响应头字段
if(hasLog) {
log.info("响应头");
for (String key : responseHeader.keySet()) {
log.info(key + "--->" + responseHeader.get(key));
}
}
// 定义 BufferedReader输入流来读取URL的响应
reader = new BufferedReader(new InputStreamReader(connection.getInputStream()));
String line;
while ((line = reader.readLine()) != null) {
result.append(line);
}
if(hasLog) {
log.info("响应结果:" + result.toString());
}
return result.toString();
} finally {
if (connection != null){
connection.disconnect();
}
if (reader != null) {
reader.close();
}
}
}
}

View File

@@ -0,0 +1,123 @@
package com.cool.store.utils;
import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.util.Objects;
public class MapUtil {
public static <T> void setMapValue(Map<String, Object> hashMap, String name, T value) {
if (value == null) {
return;
}
hashMap.put(name, value);
}
public static <T> void setMapObjectValue(Map<String, Object> hashMap, T obj) throws NoSuchMethodException, InvocationTargetException, IllegalAccessException {
if (obj == null) {
return;
}
Field[] fields = obj.getClass().getDeclaredFields();
for (Field field : fields) {
String name = field.getName();
String uName = name.substring(0, 1).toUpperCase() + name.substring(1);
Method m = obj.getClass().getMethod("get" + uName);
Object value = m.invoke(obj);
if (value == null) {
continue;
}
// 基础类型
if (isBaseType(value)) {
setMapValue(hashMap, name, value);
} else if (value instanceof List) {
if (((List) value).size() > 0) {
setMapObjectValue(hashMap, ((List) value).get(0));
}
} else {
setMapObjectValue(hashMap, value);
}
}
}
public static boolean isBaseType(Object object) {
Class className = object.getClass();
return className.equals(Integer.class) ||
className.equals(Byte.class) ||
className.equals(Long.class) ||
className.equals(Double.class) ||
className.equals(Float.class) ||
className.equals(Character.class) ||
className.equals(Short.class) ||
className.equals(Boolean.class) ||
className.equals(String.class);
}
/**
* 实体类对象转URL参
* @param t 实体类对象
* @param callSuper 是否转换父类成员
* @param <T> 实体类泛型
* @return a=1&b=2
*/
public static <T> String entityToUrlParam(T t, boolean callSuper){
// URL 参数存储器
StringBuffer urlParam = new StringBuffer();
//扩展转换父类成员功能
entitySuperclassToUrlParam(t, t.getClass(),callSuper,urlParam);
if(urlParam.length()>0){
//去除最后一个&字符
urlParam.deleteCharAt(urlParam.length() - 1);
}
return urlParam.toString();
}
public static <T> String entityToUrlParam(T t) {
if (t == null) {
return null;
}
return entityToUrlParam(t, true);
}
/**
* 实体类对象转URL参
* @param t 实体类对象
* @param clazz 实体类类型
* @param callSuper 是否转换父类成员
* @param urlParam URL 参数存储器
* @param <T> 实体类泛型
* @return a=1&b=2
*/
@Deprecated
public static <T> void entitySuperclassToUrlParam(T t,Class clazz,boolean callSuper,StringBuffer urlParam){
//如果实体类对象为Object类型则不处理
if(!clazz.equals(Object.class)) {
//获取实体类对象下的所有成员,并保存到 URL 参数存储器中
Arrays.stream(clazz.getDeclaredFields()).forEach(field -> {
//设置可以操作私有成员
field.setAccessible(true);
try {
//获取成员值
Object value = field.get(t);
//成员值为 Null 时,则不处理
if (Objects.nonNull(value)) {
urlParam.append(field.getName()).append("=").append(value).append("&");
}
} catch (IllegalAccessException e) {
e.printStackTrace();
}
});
//是否转换父类成员
if(callSuper){
//获取父类类型
clazz = clazz.getSuperclass();
//递归调用,获取父类的处理结果
entitySuperclassToUrlParam(t,clazz,callSuper,urlParam);
}
}
}
}

View File

@@ -0,0 +1,37 @@
package com.cool.store.utils;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
/**
* @author leoxie
*/
public class Post {
/**
* 向指定 URL 发送POST方法的请求
* @param url 发送请求的 URL
* @param data 请求参数,请求参数应该是 name1=value1&name2=value2 的形式。
* @return 所代表远程资源的响应结果
*/
public static String send(String url, String data,HashMap<String,String> headers) throws IOException {
Client client = new Client();
client.setData(data);
client.setUrl(url);
HashMap<String, String> headerMap = new HashMap<>(16);
headerMap.put("Content-Type","application/x-www-form-urlencoded");
//添加头部信息
if(!headers.isEmpty()){
for (Map.Entry<String,String> entry:headers.entrySet()) {
headerMap.put(entry.getKey(),entry.getValue());
}
}
client.setHeader(headerMap);
return client.exec();
}
}

View File

@@ -48,7 +48,7 @@ public class TokenValidateFilter implements Filter {
//腾讯音视频回调,单独做验签 //腾讯音视频回调,单独做验签
"/partner/pc/video/**", "/partner/pc/video/**",
//TODO 800回调地址暂时不做验证 //TODO 800回调地址暂时不做验证
"/partner/pc/flow/qualificationReview/callback"); "/partner/pc/flow/qualificationReview/callback","/**/ecSync/ecToApplet/**");
/** /**
@@ -84,13 +84,13 @@ public class TokenValidateFilter implements Filter {
boolean isInWhiteList = excludePath(uri); boolean isInWhiteList = excludePath(uri);
String accessToken = reqs.getHeader("accessToken"); String accessToken = reqs.getHeader("accessToken");
String key = "access_token:" + accessToken; String key = "access_token:" + accessToken;
log.info("url:{}", uri);
if(StringUtils.isNotBlank(accessToken)){ if(StringUtils.isNotBlank(accessToken)){
userStr = redisUtilPool.getString(key); userStr = redisUtilPool.getString(key);
if(StringUtils.isNotBlank(userStr)){ if(StringUtils.isNotBlank(userStr)){
currentUser = JSON.parseObject(userStr, LoginUserInfo.class); currentUser = JSON.parseObject(userStr, LoginUserInfo.class);
} }
} }
log.info("url:{}", uri);
if ( !isInWhiteList && !method.equals("OPTIONS")) { if ( !isInWhiteList && !method.equals("OPTIONS")) {
if (StringUtils.isEmpty(accessToken)) { if (StringUtils.isEmpty(accessToken)) {
response.setStatus(HttpStatus.OK.value()); response.setStatus(HttpStatus.OK.value());

View File

@@ -0,0 +1,34 @@
package com.cool.store.controller;
import com.cool.store.exception.ApiException;
import com.cool.store.request.GetTipsInfoReq;
import com.cool.store.response.ResponseResult;
import com.cool.store.service.CommonService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
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;
/**
* @Author: young.yu
* @Date: 2023-06-28 21:33
* @Description:
*/
@RestController
@RequestMapping("/common")
@Api(tags = "通用信息")
public class CommonController {
@Autowired
private CommonService commonService;
@PostMapping("/getTipsInfo")
@ApiOperation("获取面试最新更新信息")
public ResponseResult getTipsInfo(@RequestBody GetTipsInfoReq request) throws ApiException {
String res = commonService.getTipsInfo(request);
return ResponseResult.success(res);
}
}

View File

@@ -200,8 +200,8 @@ public class DeskController {
@PostMapping(path = "/transferInvestmentManager") @PostMapping(path = "/transferInvestmentManager")
@ApiOperation("转让招商经理") @ApiOperation("转让招商经理")
public ResponseResult<Boolean> transferInvestmentManager(@RequestBody TransferInvestmentManagerRequest request){ public ResponseResult<Boolean> transferInvestmentManager(@RequestBody TransferInvestmentManagerRequest request) throws ApiException {
return ResponseResult.success(hyPartnerLineInfoService.transferInvestmentManager(CurrentUserHolder.getUser(),request.getUserId(),request.getUserName(),request.getLineId())); return ResponseResult.success(hyPartnerLineInfoService.transferInvestmentManager(CurrentUserHolder.getUser(),request ));
} }
@@ -235,7 +235,7 @@ public class DeskController {
@PostMapping(path = "/joinBlackList") @PostMapping(path = "/joinBlackList")
@ApiOperation("加入黑名单") @ApiOperation("加入黑名单")
public ResponseResult<Boolean> joinBlackList(@RequestBody LineBlackListRequest lineBlackListRequest){ public ResponseResult<Boolean> joinBlackList(@RequestBody LineBlackListRequest lineBlackListRequest) throws ApiException {
return ResponseResult.success(hyPartnerLineInfoService.joinBlackList(CurrentUserHolder.getUser(),lineBlackListRequest.getLineId(),LineStatusEnum.BLACKLIST.getCode(),lineBlackListRequest.getCause())); return ResponseResult.success(hyPartnerLineInfoService.joinBlackList(CurrentUserHolder.getUser(),lineBlackListRequest.getLineId(),LineStatusEnum.BLACKLIST.getCode(),lineBlackListRequest.getCause()));
} }
@@ -243,7 +243,7 @@ public class DeskController {
@PostMapping(path = "/closeOrPassFollow") @PostMapping(path = "/closeOrPassFollow")
@ApiOperation("意向申请审核 结束跟进/通过流程") @ApiOperation("意向申请审核 结束跟进/通过流程")
public ResponseResult<Boolean> closeOrPassFollow(@RequestBody CloseFollowRequest closeFollowRequest){ public ResponseResult<Boolean> closeOrPassFollow(@RequestBody CloseFollowRequest closeFollowRequest) throws ApiException {
return ResponseResult.success(hyPartnerLineInfoService.closeOrPassFollow(CurrentUserHolder.getUser(),closeFollowRequest)); return ResponseResult.success(hyPartnerLineInfoService.closeOrPassFollow(CurrentUserHolder.getUser(),closeFollowRequest));
} }

View File

@@ -0,0 +1,31 @@
package com.cool.store.controller;
import com.cool.store.request.CustomerInfoRequest;
import com.cool.store.response.ResponseResult;
import com.cool.store.service.EcSyncService;
import com.cool.store.vo.InterviewScheduleInfoVO;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.List;
@RestController
@RequestMapping("/ecSync")
@Slf4j
public class EcSyncController {
@Resource
private EcSyncService ecSyncService;
@PostMapping(path = "/ecToApplet")
@ApiOperation("ec同步数据到小程序")
public ResponseResult<Boolean> ecToApplet(@RequestBody List<CustomerInfoRequest> queryListData){
return ResponseResult.success(ecSyncService.ecToApplet(queryListData));
}
}

View File

@@ -36,7 +36,7 @@ public class FlowController {
} }
@PostMapping("/qualificationReview/callback") @PostMapping("/qualificationReview/callback")
@ApiOperation("流程信息回调接口") @ApiOperation("加盟商资质审核流程信息回调接口")
public ResponseResult qualificationCallback(@RequestBody QualificationCallbackReq request) { public ResponseResult qualificationCallback(@RequestBody QualificationCallbackReq request) {
flowService.qualificationCallback(request); flowService.qualificationCallback(request);
return ResponseResult.success(); return ResponseResult.success();

View File

@@ -0,0 +1,38 @@
package com.cool.store.controller;
import com.cool.store.dto.mdm.AreaSonDTO;
import com.cool.store.entity.MDMAreaDO;
import com.cool.store.response.ResponseResult;
import com.cool.store.service.MDMAreaService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
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 java.util.List;
@RestController
@RequestMapping("/mdm/area")
@Api(tags = "MDM省市信息")
public class MDMAreaController {
@Autowired
private MDMAreaService mdmAreaService;
@PostMapping("/province")
@ApiOperation("获取MDM省级信息")
public ResponseResult<List<MDMAreaDO>> getProvince() {
return ResponseResult.success(mdmAreaService.getProvince());
}
@PostMapping("/son")
@ApiOperation("获取子级区域数据")
private ResponseResult<List<MDMAreaDO>> getSonArea(@RequestBody AreaSonDTO areaSon) {
return ResponseResult.success(mdmAreaService.getSonArea(areaSon.getCode()));
}
}

Some files were not shown because too many files have changed in this diff Show More