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

This commit is contained in:
zhangchenbiao
2023-06-21 17:04:37 +08:00
30 changed files with 320 additions and 65 deletions

View File

@@ -73,6 +73,7 @@ public enum ErrorCodeEnum {
INTERVIEW_PLAN_ALREADY_EXIST(1021112, "面试计划已存在,请勿重复申请!", null), INTERVIEW_PLAN_ALREADY_EXIST(1021112, "面试计划已存在,请勿重复申请!", null),
INTERVIEW_LINE_ID_IS_NULL(1021113, "线索id为空", null), INTERVIEW_LINE_ID_IS_NULL(1021113, "线索id为空", null),
INTERVIEW_INTERVIEW_TIME_IS_UNUSABLE(1021114, "当前预约时间不可用,请和线索用户协商其他时间后确定预约时间\n面试人{0} 手机号:{1}", null), INTERVIEW_INTERVIEW_TIME_IS_UNUSABLE(1021114, "当前预约时间不可用,请和线索用户协商其他时间后确定预约时间\n面试人{0} 手机号:{1}", null),
INTERVIEW_PARTNER_NOT_EXIST(1021115, "线索下的加盟商不存在!", null),
SIGN_FAIL(600000, "验签失败", null), SIGN_FAIL(600000, "验签失败", null),
GET_ACCESSTOKEN_ERROR(600001, "获取小程序TOKEN错误", null), GET_ACCESSTOKEN_ERROR(600001, "获取小程序TOKEN错误", null),
NEW_MOBILE_HAS_EXIST(600002,"加盟商用户信息已存在",null), NEW_MOBILE_HAS_EXIST(600002,"加盟商用户信息已存在",null),

View File

@@ -94,7 +94,7 @@ public class HyOpenAreaInfoDAO {
return Maps.newHashMap(); return Maps.newHashMap();
} }
List<HyOpenAreaInfoDO> hyOpenAreaInfoDOS = hyOpenAreaInfoMapper.selectByIds(ids); List<HyOpenAreaInfoDO> hyOpenAreaInfoDOS = hyOpenAreaInfoMapper.selectByIds(ids);
return ListUtils.emptyIfNull(hyOpenAreaInfoDOS).stream().collect(Collectors.toMap(k->String.valueOf(k.getId()), v->v.getAreaName())); return ListUtils.emptyIfNull(hyOpenAreaInfoDOS).stream().collect(Collectors.toMap(k->String.valueOf(k.getId()), v->v.getAreaPath().replace("/"," ")));
} }

View File

@@ -2,10 +2,13 @@ package com.cool.store.dao;
import com.cool.store.entity.HyPartnerBaseInfoDO; import com.cool.store.entity.HyPartnerBaseInfoDO;
import com.cool.store.mapper.HyPartnerBaseInfoMapper; import com.cool.store.mapper.HyPartnerBaseInfoMapper;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Repository; import org.springframework.stereotype.Repository;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List;
/** /**
* @Author suzhuhong * @Author suzhuhong
@@ -25,6 +28,13 @@ public class HyPartnerBaseInfoDAO {
return hyPartnerBaseInfoMapper.insertSelective(record); return hyPartnerBaseInfoMapper.insertSelective(record);
} }
public int batchInsert( List<HyPartnerBaseInfoDO> records){
if (CollectionUtils.isEmpty(records)){
return 0;
}
return hyPartnerBaseInfoMapper.batchInsert(records);
}
/** /**
* *
* 默认更新方法根据主键更新不会把null值更新到数据库避免覆盖之前有值的 * 默认更新方法根据主键更新不会把null值更新到数据库避免覆盖之前有值的
@@ -34,6 +44,11 @@ public class HyPartnerBaseInfoDAO {
return hyPartnerBaseInfoMapper.updateByPrimaryKeySelective(record); return hyPartnerBaseInfoMapper.updateByPrimaryKeySelective(record);
} }
public int updateByPrimaryKey(HyPartnerBaseInfoDO record){
return hyPartnerBaseInfoMapper.updateByPrimaryKey(record);
}
public int updateByPartnerId(String userName,String mobile,String partnerId){ public int updateByPartnerId(String userName,String mobile,String partnerId){
return hyPartnerBaseInfoMapper.updateByPartnerId(userName,mobile,partnerId); return hyPartnerBaseInfoMapper.updateByPartnerId(userName,mobile,partnerId);
} }
@@ -57,10 +72,17 @@ public class HyPartnerBaseInfoDAO {
return hyPartnerBaseInfoMapper.getByPartnerLineId(partnerLineId); return hyPartnerBaseInfoMapper.getByPartnerLineId(partnerLineId);
} }
public Long getLineIdByIdCard(String idCard){ public List<HyPartnerBaseInfoDO> getByPartnerLineIds(List<Long> partnerLineId){
if (CollectionUtils.isEmpty(partnerLineId)){
return new ArrayList<>();
}
return hyPartnerBaseInfoMapper.getByPartnerLineIds(partnerLineId);
}
public HyPartnerBaseInfoDO getByIdCard(String idCard){
if (StringUtils.isEmpty(idCard)){ if (StringUtils.isEmpty(idCard)){
return null; return null;
} }
return hyPartnerBaseInfoMapper.getLineIdByIdCard(idCard); return hyPartnerBaseInfoMapper.getByIdCard(idCard);
} }
} }

View File

@@ -3,6 +3,8 @@ package com.cool.store.mapper;
import com.cool.store.entity.HyPartnerBaseInfoDO; import com.cool.store.entity.HyPartnerBaseInfoDO;
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:51 * @date 2023-05-29 03:51
@@ -16,6 +18,8 @@ public interface HyPartnerBaseInfoMapper {
*/ */
int insertSelective(@Param("record") HyPartnerBaseInfoDO record); int insertSelective(@Param("record") HyPartnerBaseInfoDO record);
int batchInsert(@Param("records") List<HyPartnerBaseInfoDO> records);
/** /**
* *
* 默认更新方法根据主键更新不会把null值更新到数据库避免覆盖之前有值的 * 默认更新方法根据主键更新不会把null值更新到数据库避免覆盖之前有值的
@@ -23,6 +27,9 @@ public interface HyPartnerBaseInfoMapper {
*/ */
int updateByPrimaryKeySelective(@Param("record") HyPartnerBaseInfoDO record); int updateByPrimaryKeySelective(@Param("record") HyPartnerBaseInfoDO record);
int updateByPrimaryKey(@Param("record") HyPartnerBaseInfoDO record);
/** /**
* 根据加盟商ID修改用户名称与手机号 * 根据加盟商ID修改用户名称与手机号
* @param userName * @param userName
@@ -38,7 +45,11 @@ public interface HyPartnerBaseInfoMapper {
HyPartnerBaseInfoDO getByPartnerLineId(@Param("partnerLineId") Long partnerLineId); HyPartnerBaseInfoDO getByPartnerLineId(@Param("partnerLineId") Long partnerLineId);
List<HyPartnerBaseInfoDO> getByPartnerLineIds(@Param("partnerLineId") List<Long> partnerLineIds);
Long getLineIdByIdCard(@Param("idCard") String idCard); Long getLineIdByIdCard(@Param("idCard") String idCard);
HyPartnerBaseInfoDO getByIdCard(@Param("idCard") String idCard);
int cleanIdCardInfoByPartnerLineId(@Param("idCard") String idCard, int cleanIdCardInfoByPartnerLineId(@Param("idCard") String idCard,
@Param("idCardPhotoFront") String idCardPhotoFront, @Param("idCardPhotoFront") String idCardPhotoFront,

View File

@@ -27,6 +27,21 @@
id_card_photo_front, id_card_photo_black, live_address, user_portrait, status, latest_log_message, id_card_photo_front, id_card_photo_black, live_address, user_portrait, status, latest_log_message,
pass_reason, certify_file, create_time, update_time pass_reason, certify_file, create_time, update_time
</sql> </sql>
<insert id="batchInsert">
insert into
hy_partner_base_info
(
partner_id,
partner_line_id
)
values
<foreach collection="records" item="record" separator=",">
(#{record.partnerId},
#{record.partnerLineId}
</foreach>
</insert>
<insert id="insertSelective" keyColumn="id" keyProperty="record.id" useGeneratedKeys="true"> <insert id="insertSelective" keyColumn="id" keyProperty="record.id" useGeneratedKeys="true">
insert into hy_partner_base_info insert into hy_partner_base_info
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
@@ -142,6 +157,9 @@
</if> </if>
</trim> </trim>
</insert> </insert>
<update id="updateByPrimaryKeySelective"> <update id="updateByPrimaryKeySelective">
update hy_partner_base_info update hy_partner_base_info
<set> <set>
@@ -203,6 +221,19 @@
where id = #{record.id} where id = #{record.id}
</update> </update>
<update id="updateByPrimaryKey">
update hy_partner_base_info
set
nation = #{record.nation},
birthdate = #{record.birthdate},
id_card = #{record.idCard},
id_card_photo_front = #{record.idCardPhotoFront},
id_card_photo_black = #{record.idCardPhotoBlack},
live_address = #{record.liveAddress},
status = #{record.status}
where id = #{record.id}
</update>
<update id="updateByPartnerId"> <update id="updateByPartnerId">
update hy_partner_base_info update hy_partner_base_info
@@ -231,9 +262,22 @@
where partner_line_id = #{partnerLineId} where partner_line_id = #{partnerLineId}
</select> </select>
<select id="getLineIdByIdCard" resultType="java.lang.Long"> <select id="getByPartnerLineIds" resultMap="BaseResultMap" >
select select
partner_line_id <include refid="Base_Column_List"></include>
from hy_partner_base_info
<where>
<if test="partnerLineIds !=null and partnerLineIds.size>0">
<foreach collection="partnerLineIds" item="lineId" open="and partner_line_id in (" close=")" separator=",">
#{lineId}
</foreach>
</if>
</where>
</select>
<select id="getByIdCard" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"></include>
from hy_partner_base_info from hy_partner_base_info
where id_card = #{idCard} where id_card = #{idCard}
</select> </select>

View File

@@ -302,6 +302,7 @@
<select id="getInterviewInfo" resultType="com.cool.store.vo.interview.InterviewVO"> <select id="getInterviewInfo" resultType="com.cool.store.vo.interview.InterviewVO">
select hpip.id as interviewPlanId, select hpip.id as interviewPlanId,
hpi.id as interviewId, hpi.id as interviewId,
hpll.id as partnerLineId,
hpci.qualify_verify_id as qualifyVerifyId, hpci.qualify_verify_id as qualifyVerifyId,
hpci.intention_contract_no as intentionContractNo, hpci.intention_contract_no as intentionContractNo,
hpi.pass_time as passTime, hpi.pass_time as passTime,

View File

@@ -36,7 +36,7 @@
</select> </select>
<insert id="batchInsert"> <insert id="batchInsert" keyColumn="id" keyProperty="recordList.id" useGeneratedKeys="true">
insert into insert into
hy_partner_line_info hy_partner_line_info
( (

View File

@@ -0,0 +1,22 @@
package com.cool.store.request;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotBlank;
/**
* @Author wxp
* @Date 2023/6/21 14:27
* @Version 1.0
*/
@Data
@ApiModel
public class CoolDownFirstLoginFlagDelRequest {
@NotBlank(message = "线索id不能为空")
@ApiModelProperty("线索id")
private Long lineId;
}

View File

@@ -0,0 +1,13 @@
package com.cool.store.request;
import lombok.Data;
/**
* @Author: young.yu
* @Date: 2023-06-21 11:17
* @Description:
*/
@Data
public class InterviewSmsReq {
private String interviewStartTime;
}

View File

@@ -34,11 +34,11 @@ public class PartnerLineBaseInfoVO {
private String workflowStatus; private String workflowStatus;
@ApiModelProperty("当前阶段截止时间") @ApiModelProperty("当前阶段截止时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") @JsonFormat(pattern = "yyyy.MM.dd HH:mm", timezone = "GMT+8")
private Date deadline; private Date deadline;
@ApiModelProperty("结束跟进时间 冷静期使用 计算15天还剩多少天") @ApiModelProperty("结束跟进时间 冷静期使用 计算15天还剩多少天")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") @JsonFormat(pattern = "yyyy.MM.dd HH:mm", timezone = "GMT+8")
private Date closeTime; private Date closeTime;
@ApiModelProperty("冷静期首次登录标识 true-是首次") @ApiModelProperty("冷静期首次登录标识 true-是首次")
@@ -47,5 +47,8 @@ public class PartnerLineBaseInfoVO {
@ApiModelProperty("拒绝原因 冷静期提示文案中用到 全部流程中用到(拒绝的时候暂时拒绝原因)") @ApiModelProperty("拒绝原因 冷静期提示文案中用到 全部流程中用到(拒绝的时候暂时拒绝原因)")
private String cause; private String cause;
@ApiModelProperty("线索状态:0公海线索;1跟进中;2合作中;3黑名单")
private Integer lineStatus;
} }

View File

@@ -60,9 +60,13 @@ public class PublicSeaLineListVo {
@ApiModelProperty("跟进次数") @ApiModelProperty("跟进次数")
private Integer followCount; private Integer followCount;
@ApiModelProperty("意向开店区域ID") @ApiModelProperty("意向开店区域ID")
private String wantShopArea; private String wantShopArea;
@ApiModelProperty("意向开店区域ID")
private String wantShopAreaName;
private String acceptAdjustType; private String acceptAdjustType;
} }

View File

@@ -80,6 +80,11 @@
<groupId>org.aspectj</groupId> <groupId>org.aspectj</groupId>
<artifactId>aspectjweaver</artifactId> <artifactId>aspectjweaver</artifactId>
</dependency> </dependency>
<dependency>
<groupId>com.aliyun</groupId>
<artifactId>dysmsapi20170525</artifactId>
<version>2.0.1</version>
</dependency>
</dependencies> </dependencies>
</project> </project>

View File

@@ -1,5 +1,6 @@
package com.cool.store.service; package com.cool.store.service;
import com.cool.store.entity.HyPartnerBaseInfoDO;
import com.cool.store.request.AddTagsRequest; import com.cool.store.request.AddTagsRequest;
import com.cool.store.request.PartnerBaseInfoRequest; import com.cool.store.request.PartnerBaseInfoRequest;
import com.cool.store.vo.PartnerBaseInfoVO; import com.cool.store.vo.PartnerBaseInfoVO;
@@ -26,7 +27,7 @@ public interface HyPartnerBaseInfoService {
PartnerBaseInfoVO getByPartnerLineId(Long lineId); PartnerBaseInfoVO getByPartnerLineId(Long lineId);
Long getLineIdByIdCard(String idCard); HyPartnerBaseInfoDO getByIdCard(String idCard);
Boolean changeBinding(String idCard, Long lineId, PartnerUserInfoVO currentUser); Boolean changeBinding(String idCard, Long lineId, PartnerUserInfoVO currentUser);

View File

@@ -78,7 +78,7 @@ public interface HyPartnerLineInfoService {
* @param joinReason * @param joinReason
* @return * @return
*/ */
Boolean joinBlackList( Long lineId, Integer status, String joinReason); Boolean joinBlackList(String userId, Long lineId, Integer status, String joinReason);
/** /**
* 移除黑名单 * 移除黑名单
@@ -128,7 +128,7 @@ public interface HyPartnerLineInfoService {
* @param lineId * @param lineId
* @return * @return
*/ */
Boolean assignFollowUser(String partnerId); Boolean assignFollowUser(String partnerId, String wantShopArea, Integer acceptAdjustType);
/** /**
* 线索状态 * 线索状态

View File

@@ -0,0 +1,13 @@
package com.cool.store.service;
import com.aliyun.dysmsapi20170525.models.SendSmsResponse;
import com.cool.store.exception.ApiException;
/**
* @Author: young.yu
* @Date: 2023-06-21 10:55
* @Description:
*/
public interface SmsService {
public SendSmsResponse sendSms(String params, String templateCode, String mobile) throws ApiException;
}

View File

@@ -51,13 +51,13 @@ import java.util.Objects;
@Service @Service
public class FlowServiceImpl implements FlowService { public class FlowServiceImpl implements FlowService {
@Value("${hs.mdm.baseUrl}") @Value("${hs.mdm.baseUrl:null}")
private String mdmBaseUrl; private String mdmBaseUrl;
@Value("${hs.mdm.appkey}") @Value("${hs.mdm.appkey:null}")
private String mdmAppKey; private String mdmAppKey;
@Value("${hs.mdm.appsec}") @Value("${hs.mdm.appsec:null}")
private String mdmAppSec; private String mdmAppSec;
@Autowired @Autowired

View File

@@ -25,6 +25,7 @@ import org.springframework.stereotype.Service;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.text.MessageFormat; import java.text.MessageFormat;
import java.util.Date;
/** /**
* @Author suzhuhong * @Author suzhuhong
@@ -120,15 +121,15 @@ public class HyPartnerBaseInfoServiceImpl implements HyPartnerBaseInfoService {
} }
@Override @Override
public Long getLineIdByIdCard(String idCard) { public HyPartnerBaseInfoDO getByIdCard(String idCard) {
return hyPartnerBaseInfoDAO.getLineIdByIdCard(idCard); return hyPartnerBaseInfoDAO.getByIdCard(idCard);
} }
@Override @Override
public Boolean changeBinding(String idCard, Long lineId, PartnerUserInfoVO currentUser) { public Boolean changeBinding(String idCard, Long lineId, PartnerUserInfoVO currentUser) {
// 把旧线索的身份证号置空,状态改为待提交 // 把旧线索的身份证号置空,状态改为待提交
Long oldLineId = hyPartnerBaseInfoDAO.getLineIdByIdCard(idCard); HyPartnerBaseInfoDO oldBaseInfo = hyPartnerBaseInfoDAO.getByIdCard(idCard);
HyPartnerLineInfoDO oldLineInfo = hyPartnerLineInfoDAO.selectByPrimaryKeySelective(oldLineId); HyPartnerLineInfoDO oldLineInfo = hyPartnerLineInfoDAO.selectByPrimaryKeySelective(oldBaseInfo.getPartnerLineId());
// 该身份证当前申请状态同步至该账号下,原账号变为【加盟意向申请 待提交状态】 // 该身份证当前申请状态同步至该账号下,原账号变为【加盟意向申请 待提交状态】
HyPartnerLineInfoDO newLineInfo = hyPartnerLineInfoDAO.selectByPrimaryKeySelective(lineId); HyPartnerLineInfoDO newLineInfo = hyPartnerLineInfoDAO.selectByPrimaryKeySelective(lineId);
newLineInfo.setWorkflowStage(oldLineInfo.getWorkflowStage()); newLineInfo.setWorkflowStage(oldLineInfo.getWorkflowStage());
@@ -139,11 +140,32 @@ public class HyPartnerBaseInfoServiceImpl implements HyPartnerBaseInfoService {
oldLineInfo.setWorkflowStatus(WorkflowStatusEnum.INTENT_0.getCode()); oldLineInfo.setWorkflowStatus(WorkflowStatusEnum.INTENT_0.getCode());
oldLineInfo.setLineStatus(LineStatusEnum.PUBLIC_SEAS.getCode()); oldLineInfo.setLineStatus(LineStatusEnum.PUBLIC_SEAS.getCode());
hyPartnerLineInfoDAO.updateByPrimaryKeySelective(oldLineInfo); hyPartnerLineInfoDAO.updateByPrimaryKeySelective(oldLineInfo);
hyPartnerBaseInfoDAO.cleanIdCardInfoByPartnerLineId(null, null, null, oldLineId);
// 新线索绑定身份证号 // 新线索绑定身份证号
HyPartnerBaseInfoDO newBaseInfo = hyPartnerBaseInfoDAO.getByPartnerIdAndLineId(currentUser.getPartnerId(), lineId);
fillBaseInfoIdCard(newBaseInfo, oldBaseInfo.getIdCard(), oldBaseInfo.getIdCardPhotoFront(), oldBaseInfo.getIdCardPhotoBlack(), oldBaseInfo.getUsername(),
oldBaseInfo.getSex(), oldBaseInfo.getBirthdate(), oldBaseInfo.getNation(), oldBaseInfo.getLiveAddress(), oldBaseInfo.getStatus());
newBaseInfo.setStatus(oldBaseInfo.getStatus());
hyPartnerBaseInfoDAO.updateByPrimaryKeySelective(newBaseInfo);
// 老的身份证信息置空
fillBaseInfoIdCard(oldBaseInfo, null, null, null, null, null, null, null, null, null);
oldBaseInfo.setStatus(Integer.valueOf(WorkflowStatusEnum.INTENT_0.getCode()));
hyPartnerBaseInfoDAO.updateByPrimaryKey(oldBaseInfo);
return true; return true;
} }
private void fillBaseInfoIdCard(HyPartnerBaseInfoDO newBaseInfo, String idCard, String idCardPhotoFront, String idCardPhotoBlack,
String username, Integer sex, Date birthdate, String nation, String liveAddress, Integer status) {
newBaseInfo.setIdCard(idCard);
newBaseInfo.setIdCardPhotoBlack(idCardPhotoFront);
newBaseInfo.setIdCardPhotoFront(idCardPhotoBlack);
newBaseInfo.setUsername(username);
newBaseInfo.setSex(sex);
newBaseInfo.setBirthdate(birthdate);
newBaseInfo.setNation(nation);
newBaseInfo.setLiveAddress(liveAddress);
newBaseInfo.setStatus(status);
}
private void fillBaseInfo(HyPartnerBaseInfoDO baseInfoDO, PartnerBaseInfoRequest request) { private void fillBaseInfo(HyPartnerBaseInfoDO baseInfoDO, PartnerBaseInfoRequest request) {
baseInfoDO.setPartnerId(request.getPartnerId()); baseInfoDO.setPartnerId(request.getPartnerId());
baseInfoDO.setPartnerLineId(request.getPartnerLineId()); baseInfoDO.setPartnerLineId(request.getPartnerLineId());

View File

@@ -173,7 +173,7 @@ public class HyPartnerIntentInfoServiceImpl implements HyPartnerIntentInfoServic
intentInfoDO.setMaxBudget(request.getMaxBudget()); intentInfoDO.setMaxBudget(request.getMaxBudget());
intentInfoDO.setMoneySource(request.getMoneySource()); intentInfoDO.setMoneySource(request.getMoneySource());
if(CollectionUtils.isNotEmpty(request.getMoneyProve())){ if(CollectionUtils.isNotEmpty(request.getMoneyProve())){
intentInfoDO.setMoneyProve(String.join(",", request.getMoneyProve())); intentInfoDO.setMoneyProve(JSONObject.toJSONString(request.getMoneyProve()));
} }
intentInfoDO.setEducation(request.getEducation()); intentInfoDO.setEducation(request.getEducation());
intentInfoDO.setWorkYear(request.getWorkYear()); intentInfoDO.setWorkYear(request.getWorkYear());

View File

@@ -29,6 +29,7 @@ import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.sql.Array;
import java.text.MessageFormat; import java.text.MessageFormat;
import java.util.*; import java.util.*;
import java.util.stream.Collectors; import java.util.stream.Collectors;
@@ -57,6 +58,8 @@ public class HyPartnerLineInfoServiceImpl implements HyPartnerLineInfoService {
EnterpriseUserService enterpriseUserService; EnterpriseUserService enterpriseUserService;
@Resource @Resource
AliyunService aliyunService; AliyunService aliyunService;
@Resource
HyPartnerBaseInfoDAO hyPartnerBaseInfoDAO;
@Override @Override
public StageCountVO selectStagePendingCount(String userId) { public StageCountVO selectStagePendingCount(String userId) {
@@ -130,6 +133,7 @@ public class HyPartnerLineInfoServiceImpl implements HyPartnerLineInfoService {
//过滤出已结束的线索 这块线索需要重新生成新的线索 //过滤出已结束的线索 这块线索需要重新生成新的线索
List<HyPartnerLineInfoDO> closeLineList = partnerLineInfoList.stream().filter(x -> x.getCloseTime() != null).collect(Collectors.toList()); List<HyPartnerLineInfoDO> closeLineList = partnerLineInfoList.stream().filter(x -> x.getCloseTime() != null).collect(Collectors.toList());
List<Long> closeLineIdList = closeLineList.stream().map(HyPartnerLineInfoDO::getId).collect(Collectors.toList()); List<Long> closeLineIdList = closeLineList.stream().map(HyPartnerLineInfoDO::getId).collect(Collectors.toList());
//已结束的线索 需要重新生成一条新的线索 //已结束的线索 需要重新生成一条新的线索
List<HyPartnerLineInfoDO> list = new ArrayList<>(); List<HyPartnerLineInfoDO> list = new ArrayList<>();
closeLineList.stream().forEach(x->{ closeLineList.stream().forEach(x->{
@@ -142,6 +146,14 @@ public class HyPartnerLineInfoServiceImpl implements HyPartnerLineInfoService {
list.add(hyPartnerLineInfoDO); list.add(hyPartnerLineInfoDO);
}); });
hyPartnerLineInfoDAO.batchInsert(list); hyPartnerLineInfoDAO.batchInsert(list);
List<HyPartnerBaseInfoDO> hyPartnerBaseInfoDOS = new ArrayList<>();
list.forEach(x->{
HyPartnerBaseInfoDO newHyPartnerBaseInfoDO = new HyPartnerBaseInfoDO();
newHyPartnerBaseInfoDO.setPartnerId(x.getPartnerId());
newHyPartnerBaseInfoDO.setPartnerLineId(x.getId());
hyPartnerBaseInfoDOS.add(newHyPartnerBaseInfoDO);
});
hyPartnerBaseInfoDAO.batchInsert(hyPartnerBaseInfoDOS);
//将老的线索置为删除状态 //将老的线索置为删除状态
hyPartnerLineInfoDAO.batchDeleted(closeLineIdList); hyPartnerLineInfoDAO.batchDeleted(closeLineIdList);
//没有结束的线索直接分配招商经理 //没有结束的线索直接分配招商经理
@@ -149,7 +161,7 @@ public class HyPartnerLineInfoServiceImpl implements HyPartnerLineInfoService {
List<Long> otherLineIdList = otherLineList.stream().map(HyPartnerLineInfoDO::getId).collect(Collectors.toList()); List<Long> otherLineIdList = otherLineList.stream().map(HyPartnerLineInfoDO::getId).collect(Collectors.toList());
hyPartnerLineInfoDAO.updateInvestmentManager(userId, otherLineIdList); hyPartnerLineInfoDAO.updateInvestmentManager(userId, otherLineIdList);
return null; return Boolean.TRUE;
} }
@Override @Override
@@ -163,6 +175,7 @@ public class HyPartnerLineInfoServiceImpl implements HyPartnerLineInfoService {
list.stream().forEach(x->{ list.stream().forEach(x->{
BlackListVO blackListVO = convertPartnerBlackListDTOToVo(x); BlackListVO blackListVO = convertPartnerBlackListDTOToVo(x);
blackListVO.setCloseUserPhone(userPhoneMap.get(x.getCloseUserId())); blackListVO.setCloseUserPhone(userPhoneMap.get(x.getCloseUserId()));
blackListVO.setCloseUserName(userPhoneMap.get(x.getCloseUserId()));
if (StringUtils.isNotEmpty(x.getMobile())){ if (StringUtils.isNotEmpty(x.getMobile())){
blackListVO.setPhoneAddress(aliyunService.getPhoneNumberAttribute(x.getMobile()).getCity()); blackListVO.setPhoneAddress(aliyunService.getPhoneNumberAttribute(x.getMobile()).getCity());
} }
@@ -173,7 +186,7 @@ public class HyPartnerLineInfoServiceImpl implements HyPartnerLineInfoService {
} }
@Override @Override
public Boolean joinBlackList(Long lineId, Integer status, String joinReason) { public Boolean joinBlackList(String userId,Long lineId, Integer status, String joinReason) {
if (lineId==null){ if (lineId==null){
throw new ServiceException(ErrorCodeEnum.PARAMS_REQUIRED); throw new ServiceException(ErrorCodeEnum.PARAMS_REQUIRED);
} }
@@ -182,6 +195,8 @@ public class HyPartnerLineInfoServiceImpl implements HyPartnerLineInfoService {
hyPartnerLineInfoDO.setId(lineId); hyPartnerLineInfoDO.setId(lineId);
hyPartnerLineInfoDO.setLineStatus(status); hyPartnerLineInfoDO.setLineStatus(status);
hyPartnerLineInfoDO.setJoinBlackReason(joinReason); hyPartnerLineInfoDO.setJoinBlackReason(joinReason);
hyPartnerLineInfoDO.setCloseTime(new Date());
hyPartnerLineInfoDO.setCloseUserId(userId);
hyPartnerLineInfoDO.setWorkflowStage(WorkflowStageEnum.INTENT.getCode()); hyPartnerLineInfoDO.setWorkflowStage(WorkflowStageEnum.INTENT.getCode());
hyPartnerLineInfoDO.setWorkflowStatus(WorkflowStatusEnum.INTENT_0.getCode()); hyPartnerLineInfoDO.setWorkflowStatus(WorkflowStatusEnum.INTENT_0.getCode());
@@ -287,6 +302,8 @@ public class HyPartnerLineInfoServiceImpl implements HyPartnerLineInfoService {
List<LineCountDTO> followCountList = hyPartnerLineInfoDAO.getFollowCountList(partnerIdList); List<LineCountDTO> followCountList = hyPartnerLineInfoDAO.getFollowCountList(partnerIdList);
Map<String, Integer> countMap = followCountList.stream().collect(Collectors.toMap(LineCountDTO::getPartnerId, LineCountDTO::getFollowCount)); Map<String, Integer> countMap = followCountList.stream().collect(Collectors.toMap(LineCountDTO::getPartnerId, LineCountDTO::getFollowCount));
List<Long> wantShopAreaList = list.stream().map(PublicSeaLineDTO::getWantShopArea).map(Long::parseLong).distinct().collect(Collectors.toList());
Map<String, String> wantShopAreaNameMap = hyOpenAreaInfoDAO.selectNameMapByIds(wantShopAreaList);
List<PublicSeaLineListVo> result = new ArrayList<>(); List<PublicSeaLineListVo> result = new ArrayList<>();
list.forEach(x->{ list.forEach(x->{
PublicSeaLineListVo publicSeaLineListVo = new PublicSeaLineListVo(); PublicSeaLineListVo publicSeaLineListVo = new PublicSeaLineListVo();
@@ -303,6 +320,7 @@ public class HyPartnerLineInfoServiceImpl implements HyPartnerLineInfoService {
HyPartnerLineInfoDO hy = hyPartnerLineInfoDOMap.getOrDefault(x.getPartnerId(), new HyPartnerLineInfoDO()); HyPartnerLineInfoDO hy = hyPartnerLineInfoDOMap.getOrDefault(x.getPartnerId(), new HyPartnerLineInfoDO());
publicSeaLineListVo.setRejectPublicReason(hy.getRejectPublicReason()); publicSeaLineListVo.setRejectPublicReason(hy.getRejectPublicReason());
publicSeaLineListVo.setRejectRealReason(hy.getRejectRealReason()); publicSeaLineListVo.setRejectRealReason(hy.getRejectRealReason());
publicSeaLineListVo.setWantShopAreaName(wantShopAreaNameMap.get(x.getWantShopArea()));
String closeTime = DateUtil.format(hy.getCloseTime(), CoolDateUtils.DATE_FORMAT_SEC); String closeTime = DateUtil.format(hy.getCloseTime(), CoolDateUtils.DATE_FORMAT_SEC);
publicSeaLineListVo.setLastCloseDate(closeTime); publicSeaLineListVo.setLastCloseDate(closeTime);
publicSeaLineListVo.setLastInvestmentManager(nameMobileMap.get(hy.getInvestmentManager())); publicSeaLineListVo.setLastInvestmentManager(nameMobileMap.get(hy.getInvestmentManager()));
@@ -372,10 +390,14 @@ public class HyPartnerLineInfoServiceImpl implements HyPartnerLineInfoService {
} }
@Override @Override
public Boolean assignFollowUser(String partnerId) { public Boolean assignFollowUser(String partnerId, String wantShopArea, Integer acceptAdjustType) {
List<HyPartnerLineInfoDO> lineFollowHistoryList = hyPartnerLineInfoDAO.getLineFollowHistoryList(partnerId); List<HyPartnerLineInfoDO> lineFollowHistoryList = hyPartnerLineInfoDAO.getLineFollowHistoryList(partnerId);
//当前加盟商线索 //当前加盟商线索
HyPartnerLineInfoDO HyPartnerLineInfo = hyPartnerLineInfoDAO.getByPartnerId(partnerId); HyPartnerLineInfoDO HyPartnerLineInfo = hyPartnerLineInfoDAO.getByPartnerId(partnerId);
if(HyPartnerLineInfo == null){
Boolean lineStatus = getLineStatus(Long.valueOf(wantShopArea), acceptAdjustType);
return lineStatus;
}
//如果是私海线索 不需要重新分配招商经理 或者跟进次数大于1 //如果是私海线索 不需要重新分配招商经理 或者跟进次数大于1
if (HyPartnerLineInfo.getLineStatus()==1||CollectionUtils.isEmpty(lineFollowHistoryList)){ if (HyPartnerLineInfo.getLineStatus()==1||CollectionUtils.isEmpty(lineFollowHistoryList)){
return Boolean.FALSE; return Boolean.FALSE;

View File

@@ -1,15 +1,13 @@
package com.cool.store.service.impl; package com.cool.store.service.impl;
import cn.hutool.core.convert.Convert; import cn.hutool.core.convert.Convert;
import cn.hutool.core.date.DatePattern;
import cn.hutool.core.date.DateUtil; import cn.hutool.core.date.DateUtil;
import com.alibaba.fastjson.JSON;
import com.cool.store.dto.calendar.*; import com.cool.store.dto.calendar.*;
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.HyPartnerBaseInfoDO; import com.cool.store.entity.*;
import com.cool.store.entity.EnterpriseUserDO;
import com.cool.store.entity.HyPartnerInterviewDO;
import com.cool.store.entity.HyPartnerInterviewPlanDO;
import com.cool.store.entity.HyPartnerLineInfoDO;
import com.cool.store.enums.ErrorCodeEnum; import com.cool.store.enums.ErrorCodeEnum;
import com.cool.store.enums.MessageTypeEnum; import com.cool.store.enums.MessageTypeEnum;
import com.cool.store.enums.RoomStatus; import com.cool.store.enums.RoomStatus;
@@ -18,14 +16,13 @@ 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.HyPartnerBaseInfoMapper;
import com.cool.store.mapper.EnterpriseUserMapper;
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;
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.HyPartnerInterviewPlanService;
import com.cool.store.service.InterviewService; import com.cool.store.service.InterviewService;
import com.cool.store.service.SmsService;
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;
@@ -40,6 +37,7 @@ import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
@@ -53,18 +51,21 @@ import java.util.List;
@Service @Service
public class InterviewServiceImpl implements InterviewService { public class InterviewServiceImpl implements InterviewService {
@Value("${trtc.sdkAppId}") @Value("${trtc.sdkAppId:null}")
private Long sdkAppId; private Long sdkAppId;
@Value("${trtc.secretKey}") @Value("${trtc.secretKey:null}")
private String key; private String key;
@Value("${hs.sms.templateCode:null}")
private String templateCode;
@Value("${feishu.notice.link.url:null}")
private String linkUrl;
@Autowired @Autowired
private HyPartnerInterviewPlanMapper hyPartnerInterviewPlanMapper; private HyPartnerInterviewPlanMapper hyPartnerInterviewPlanMapper;
@Autowired
private HyPartnerInterviewMapper interviewMapper;
@Autowired @Autowired
private HyPartnerInterviewMapper hyPartnerInterviewMapper; private HyPartnerInterviewMapper hyPartnerInterviewMapper;
@@ -80,6 +81,9 @@ public class InterviewServiceImpl implements InterviewService {
@Autowired @Autowired
private EnterpriseUserService enterpriseUserService; private EnterpriseUserService enterpriseUserService;
@Autowired
private SmsService smsService;
@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);
@@ -303,6 +307,17 @@ public class InterviewServiceImpl implements InterviewService {
hyPartnerInterviewDO.setStatus(Integer.valueOf(WorkflowStatusEnum.RESERVATION_1.getCode())); hyPartnerInterviewDO.setStatus(Integer.valueOf(WorkflowStatusEnum.RESERVATION_1.getCode()));
hyPartnerInterviewMapper.insertSelective(hyPartnerInterviewDO); hyPartnerInterviewMapper.insertSelective(hyPartnerInterviewDO);
//异步发送飞书信息给面试官
InterviewVO interviewVO = hyPartnerInterviewPlanMapper.getInterviewInfo(String.valueOf(interviewPlanId));
List<String> userIds = new ArrayList<>();
userIds.add(interviewrId);
SendCardMessageDTO sendCardMessageDTO = new SendCardMessageDTO();
sendCardMessageDTO.setUserIds(userIds);
sendCardMessageDTO.setMessageType(MessageTypeEnum.SCHEDULE_REMINDER);
sendCardMessageDTO.setMessageUrl(linkUrl);
sendCardMessageDTO.setTitle("面试预约申请");
sendCardMessageDTO.setContent(generateFeiShuInterviewMsg(interviewVO.getPartnerName(), interviewVO.getPartnerMobile(), interviewVO.getStartTime()));
isvHttpRequest.sendFeiShuCardMessage(sendCardMessageDTO);
return vo; return vo;
} }
@@ -316,11 +331,13 @@ public class InterviewServiceImpl implements InterviewService {
throw new ServiceException(ErrorCodeEnum.INTERVIEW_PLAN_NOT_EXIST); throw new ServiceException(ErrorCodeEnum.INTERVIEW_PLAN_NOT_EXIST);
} }
HyPartnerBaseInfoDO partnerBaseInfo = hyPartnerBaseInfoMapper.getByPartnerLineId(interviewVO.getPartnerLineId()); HyPartnerBaseInfoDO partnerBaseInfo = hyPartnerBaseInfoMapper.getByPartnerLineId(interviewVO.getPartnerLineId());
if(partnerBaseInfo == null){
throw new ServiceException(ErrorCodeEnum.INTERVIEW_PARTNER_NOT_EXIST);
}
List<UserFreeBusyInfoDTO> userFreeBusyInfoList = isvHttpRequest.getFreeBusyList(request.getInterviewerId(), DateUtil.parse(interviewVO.getStartTime()).getTime(), DateUtil.parse(interviewVO.getEndTime()).getTime());
List<UserFreeBusyInfoDTO> UserFreeBusyInfoList = isvHttpRequest.getFreeBusyList(request.getInterviewerId(), DateUtil.parse(interviewVO.getStartTime()).getTime(), DateUtil.parse(interviewVO.getEndTime()).getTime()); if (CollectionUtils.isNotEmpty(userFreeBusyInfoList)) {
if (CollectionUtils.isNotEmpty(UserFreeBusyInfoList)) { throw new ServiceException(ErrorCodeEnum.INTERVIEW_INTERVIEW_TIME_IS_UNUSABLE,partnerBaseInfo.getUsername(),partnerBaseInfo.getMobile());
throw new ServiceException(ErrorCodeEnum.INTERVIEW_INTERVIEW_TIME_IS_UNUSABLE);
} }
//创建日程信息 //创建日程信息
CreateCalendarEventDTO createCalendarEventDTO = new CreateCalendarEventDTO(); CreateCalendarEventDTO createCalendarEventDTO = new CreateCalendarEventDTO();
@@ -348,15 +365,10 @@ public class InterviewServiceImpl implements InterviewService {
hyPartnerInterviewDO.setStatus(Integer.valueOf(WorkflowStatusEnum.INTERVIEW_2.getCode())); hyPartnerInterviewDO.setStatus(Integer.valueOf(WorkflowStatusEnum.INTERVIEW_2.getCode()));
hyPartnerInterviewDO.setUpdateTime(new Date()); hyPartnerInterviewDO.setUpdateTime(new Date());
hyPartnerInterviewMapper.updateByPrimaryKeySelective(hyPartnerInterviewDO); hyPartnerInterviewMapper.updateByPrimaryKeySelective(hyPartnerInterviewDO);
//TODO 异步发送短信给加盟商 //异步发送短信给加盟商
InterviewSmsReq interviewSmsReq = new InterviewSmsReq();
//异步发飞书消息给面试官 interviewSmsReq.setInterviewStartTime(DateUtil.format(DateUtil.parse(interviewVO.getStartTime()), DatePattern.NORM_DATETIME_MINUTE_PATTERN));
SendCardMessageDTO sendCardMessageDTO = new SendCardMessageDTO(); smsService.sendSms(JSON.toJSONString(interviewSmsReq),templateCode, partnerBaseInfo.getMobile());
sendCardMessageDTO.setUserIds(Arrays.asList(request.getInterviewerId()));
sendCardMessageDTO.setMessageType(MessageTypeEnum.SCHEDULE_REMINDER);
sendCardMessageDTO.setTitle("面试预约申请");
sendCardMessageDTO.setContent(generateFeiShuInterviewMsg(interviewVO.getPartnerName(), interviewVO.getPartnerMobile(), interviewVO.getStartTime()));
isvHttpRequest.sendFeiShuCardMessage(sendCardMessageDTO);
} }
@@ -390,7 +402,7 @@ public class InterviewServiceImpl implements InterviewService {
hyPartnerInterviewPlanDO.setPartnerId(partnerId); hyPartnerInterviewPlanDO.setPartnerId(partnerId);
List<HyPartnerInterviewPlanDO> hyPartnerInterviewPlanDOS = hyPartnerInterviewPlanMapper.selectBySelective(hyPartnerInterviewPlanDO); List<HyPartnerInterviewPlanDO> hyPartnerInterviewPlanDOS = hyPartnerInterviewPlanMapper.selectBySelective(hyPartnerInterviewPlanDO);
//如果查询结果为空,则去线索中获取招商经理,面试官只有两个阶段,一个是在第一次申请时不存在面试安排直接取招商经理,第二个时面试信息中可修改面试官信息,这个时候以面试信息中为准 //如果查询结果为空,则去线索中获取招商经理,面试官只有两个阶段,一个是在第一次申请时不存在面试安排直接取招商经理,第二个时面试信息中可修改面试官信息,这个时候以面试信息中为准
if (org.springframework.util.CollectionUtils.isEmpty(hyPartnerInterviewPlanDOS)) { if (CollectionUtils.isEmpty(hyPartnerInterviewPlanDOS)) {
HyPartnerLineInfoDO hyPartnerLineInfoDO = hyPartnerLineInfoMapper.selectByPrimaryKeySelective(Long.valueOf(lineId)); HyPartnerLineInfoDO hyPartnerLineInfoDO = hyPartnerLineInfoMapper.selectByPrimaryKeySelective(Long.valueOf(lineId));
interviewerId = hyPartnerLineInfoDO.getInvestmentManager(); interviewerId = hyPartnerLineInfoDO.getInvestmentManager();
}else { }else {

View File

@@ -107,7 +107,7 @@ public class PartnerUserInfoServiceImpl implements PartnerUserInfoService {
hyPartnerLineInfoDO.setPartnerId(hyPartnerUserInfoDO.getPartnerId()); hyPartnerLineInfoDO.setPartnerId(hyPartnerUserInfoDO.getPartnerId());
hyPartnerLineInfoDO.setWorkflowStage(WorkflowStageEnum.INTENT.getCode()); hyPartnerLineInfoDO.setWorkflowStage(WorkflowStageEnum.INTENT.getCode());
hyPartnerLineInfoDO.setWorkflowStatus(WorkflowStatusEnum.INTENT_0.getCode()); hyPartnerLineInfoDO.setWorkflowStatus(WorkflowStatusEnum.INTENT_0.getCode());
Boolean flag = hyPartnerLineInfoService.assignFollowUser(hyPartnerLineInfoDO.getPartnerId()); Boolean flag = hyPartnerLineInfoService.assignFollowUser(hyPartnerLineInfoDO.getPartnerId(), partnerUserInfoRequest.getWantShopArea(), partnerUserInfoRequest.getAcceptAdjustType());
hyPartnerLineInfoDO.setLineStatus(flag ? LineStatusEnum.PRIVATE_SEAS.getCode() : LineStatusEnum.PUBLIC_SEAS.getCode()); hyPartnerLineInfoDO.setLineStatus(flag ? LineStatusEnum.PRIVATE_SEAS.getCode() : LineStatusEnum.PUBLIC_SEAS.getCode());
if (flag){ if (flag){
hyPartnerLineInfoDO.setInvestmentManager("ou_7a6a19ae800afde783b0ec2dabaabf95"); hyPartnerLineInfoDO.setInvestmentManager("ou_7a6a19ae800afde783b0ec2dabaabf95");

View File

@@ -0,0 +1,55 @@
package com.cool.store.service.impl;
import com.aliyun.dysmsapi20170525.Client;
import com.aliyun.dysmsapi20170525.models.SendSmsRequest;
import com.aliyun.dysmsapi20170525.models.SendSmsResponse;
import com.aliyun.teaopenapi.models.Config;
import com.cool.store.exception.ApiException;
import com.cool.store.service.SmsService;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;
/**
* @Author: young.yu
* @Date: 2023-06-21 10:55
* @Description:
*/
@Service
public class SmsServiceImpl implements SmsService {
@Value("${hs.sms.accessKeyId:null}")
private String accessKeyId ;
@Value("${hs.sms.accessKeySecret:null}")
private String accessKeySecret;
/**
* 发送短信
* @param params Json格式的参数
* @param mobile
* @return
*/
@Override
@Async
public SendSmsResponse sendSms(String params,String templateCode, String mobile) throws ApiException {
try {
Config config = new Config()
// 您的AccessKey ID
.setAccessKeyId(accessKeyId)
// 您的AccessKey Secret
.setAccessKeySecret(accessKeySecret);
SendSmsRequest sendSmsRequest = new SendSmsRequest()
.setPhoneNumbers(mobile)
.setSignName("沪上阿姨")
.setTemplateCode(templateCode)
.setTemplateParam(params);
Client client = new Client(config);
return client.sendSms(sendSmsRequest);
}catch (ApiException e){
throw new ApiException(e.getMessage());
} catch (Exception exception) {
throw new ApiException(exception.getMessage());
}
}
}

View File

@@ -57,7 +57,7 @@ public class ContentController {
@PostMapping("/detail") @PostMapping("/detail")
@ApiOperation("动态详情") @ApiOperation("动态详情")
public ResponseResult<HyContentInfoDO> queryContentInfo(@RequestParam String contentId) { public ResponseResult<HyContentInfoDO> queryContentInfo(@RequestBody String contentId) {
return ResponseResult.success(contentService.queryContentInfo(contentId)); return ResponseResult.success(contentService.queryContentInfo(contentId));
} }

View File

@@ -15,6 +15,7 @@ import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams; import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.propertyeditors.CurrencyEditor;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource; import javax.annotation.Resource;
@@ -234,7 +235,7 @@ public class DeskController {
@ApiOperation("加入黑名单") @ApiOperation("加入黑名单")
public ResponseResult<Boolean> joinBlackList(@RequestBody LineBlackListRequest lineBlackListRequest){ public ResponseResult<Boolean> joinBlackList(@RequestBody LineBlackListRequest lineBlackListRequest){
return ResponseResult.success(hyPartnerLineInfoService.joinBlackList(lineBlackListRequest.getLineId(),LineStatusEnum.BLACKLIST.getCode(),lineBlackListRequest.getCause())); return ResponseResult.success(hyPartnerLineInfoService.joinBlackList(CurrentUserHolder.getUserId(),lineBlackListRequest.getLineId(),LineStatusEnum.BLACKLIST.getCode(),lineBlackListRequest.getCause()));
} }

View File

@@ -2,13 +2,11 @@ package com.cool.store.controller;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.cool.store.dao.EnterpriseUserDAO; import com.cool.store.dao.EnterpriseUserDAO;
import com.cool.store.dto.buser.UserPositionAndUserScopeDTO;
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.UpdateCalendarEventDTO; import com.cool.store.dto.calendar.UpdateCalendarEventDTO;
import com.cool.store.dto.calendar.UserCalendarsEventDTO; import com.cool.store.dto.calendar.UserCalendarsEventDTO;
import com.cool.store.dto.message.SendCardMessageDTO; import com.cool.store.dto.message.SendCardMessageDTO;
import com.cool.store.dto.partner.DescribePhoneNumberDTO;
import com.cool.store.dto.response.ResultDTO; import com.cool.store.dto.response.ResultDTO;
import com.cool.store.entity.HyOpenAreaInfoDO; import com.cool.store.entity.HyOpenAreaInfoDO;

View File

@@ -69,6 +69,11 @@ hs.mdm.baseUrl=http://10.56.21.30/
hs.mdm.appkey = HSAYPartner hs.mdm.appkey = HSAYPartner
hs.mdm.appsec = ab39fedb886fa3587c7f517551976de8b2606f5511fd8f8675266825d74c5cd3 hs.mdm.appsec = ab39fedb886fa3587c7f517551976de8b2606f5511fd8f8675266825d74c5cd3
#sms
hs.sms.accessKeyId = LTAI4GEZKz9PBqqKa3hjup3W
hs.sms.accessKeySecret = iVOiK74k7C1wVbuUbipgJbfpAh1Zdb
hs.sms.templateCode = SMS_461530041
xxl.job.admin.addresses = xxl.job.admin.addresses =
xxl.job.executor.appname = ${spring.application.name} xxl.job.executor.appname = ${spring.application.name}
xxl.job.executor.ip = xxl.job.executor.ip =

View File

@@ -35,7 +35,7 @@ public class ContentController {
@PostMapping("/detail") @PostMapping("/detail")
@ApiOperation("动态详情") @ApiOperation("动态详情")
public ResponseResult<HyContentInfoDO> queryContentInfo(@RequestParam String contentId) { public ResponseResult<HyContentInfoDO> queryContentInfo(@RequestBody String contentId) {
return ResponseResult.success(contentService.queryContentInfo(contentId)); return ResponseResult.success(contentService.queryContentInfo(contentId));
} }

View File

@@ -19,6 +19,7 @@ import org.springframework.web.bind.annotation.*;
@Api(tags = "加盟商资格面试") @Api(tags = "加盟商资格面试")
@RestController @RestController
@RequestMapping("/interview") @RequestMapping("/interview")
@CrossOrigin
public class InterviewController { public class InterviewController {
@Autowired @Autowired
@@ -29,7 +30,7 @@ public class InterviewController {
@PostMapping("/queryByPartnerId") @PostMapping("/queryByPartnerId")
@ApiOperation("根据用户id查询面试信息") @ApiOperation("根据用户id查询面试信息")
public ResponseResult<PartnerInterviewInfoVO> queryByPartnerId(@RequestParam String partnerId) { public ResponseResult<PartnerInterviewInfoVO> queryByPartnerId(@RequestBody String partnerId) {
return ResponseResult.success(interviewService.queryByPartnerId(partnerId)); return ResponseResult.success(interviewService.queryByPartnerId(partnerId));
} }

View File

@@ -2,6 +2,7 @@ package com.cool.store.controller;
import com.cool.store.constants.RedisConstant; import com.cool.store.constants.RedisConstant;
import com.cool.store.context.PartnerUserHolder; import com.cool.store.context.PartnerUserHolder;
import com.cool.store.entity.HyPartnerBaseInfoDO;
import com.cool.store.enums.ErrorCodeEnum; import com.cool.store.enums.ErrorCodeEnum;
import com.cool.store.enums.IDCardSideEnum; import com.cool.store.enums.IDCardSideEnum;
import com.cool.store.enums.WorkflowStatusEnum; import com.cool.store.enums.WorkflowStatusEnum;
@@ -70,10 +71,10 @@ public class PartnerController {
@ApiImplicitParams({ @ApiImplicitParams({
@ApiImplicitParam(name = "idCard", value = "身份证号码", required = false), @ApiImplicitParam(name = "idCard", value = "身份证号码", required = false),
}) })
public ResponseResult<Boolean> getLineByIdCard(@RequestParam(value = "idCard",required = false)String idCard){ public ResponseResult<Boolean> getByIdCard(@RequestParam(value = "idCard",required = false)String idCard){
Long lineId = hyPartnerBaseInfoService.getLineIdByIdCard(idCard); HyPartnerBaseInfoDO baseInfoDO = hyPartnerBaseInfoService.getByIdCard(idCard);
return ResponseResult.success(lineId != null && lineId > 0L); return ResponseResult.success(baseInfoDO != null && baseInfoDO.getPartnerLineId() > 0L);
} }
@@ -136,8 +137,8 @@ public class PartnerController {
@PostMapping(path = "/delCoolDownFirstLoginFlag") @PostMapping(path = "/delCoolDownFirstLoginFlag")
@ApiOperation("删除冷静期是否首次登录缓存") @ApiOperation("删除冷静期是否首次登录缓存")
public ResponseResult<Boolean> delCoolDownFirstLoginFlag(@RequestParam(value = "lineId",required = true)String lineId){ public ResponseResult<Boolean> delCoolDownFirstLoginFlag(@RequestBody CoolDownFirstLoginFlagDelRequest coolDownFirstLoginFlagDelRequest){
String coolingPeriodFirstLoginCacheKey = MessageFormat.format(RedisConstant.COOLINGPERIOD_FIRSTLOGIN_KEY, lineId); String coolingPeriodFirstLoginCacheKey = MessageFormat.format(RedisConstant.COOLINGPERIOD_FIRSTLOGIN_KEY, coolDownFirstLoginFlagDelRequest.getLineId());
redisUtilPool.delKey(coolingPeriodFirstLoginCacheKey); redisUtilPool.delKey(coolingPeriodFirstLoginCacheKey);
return ResponseResult.success(true); return ResponseResult.success(true);
} }

View File

@@ -65,7 +65,5 @@ weixin.appSecret=77abdcae754add92889566b543e5ad79
signKey=77fea013c3a6459685b83c21a2fc3411 signKey=77fea013c3a6459685b83c21a2fc3411
#MDM #飞书通知
hs.mdm.baseUrl=http://10.56.21.30/ feishu.notice.link.url = https://applink.feishu.cn/client/web_app/open?appId=cli_a4f3e24dc73a100c&lk_target_url=https%3A%2F%2Ftest-hsay-web.coolstore.cn%2F%23%2Fwork%2Fbench
hs.mdm.appkey = HSAYPartner
hs.mdm.appsec = ab39fedb886fa3587c7f517551976de8b2606f5511fd8f8675266825d74c5cd3