Merge branch 'dev/feat/partner1.6_20231226' into pre
This commit is contained in:
@@ -156,4 +156,11 @@ public class HyPartnerExhibitionDAO {
|
|||||||
}
|
}
|
||||||
return hyPartnerExhibitionMapper.getLineByExhibitionIds(exhibitionIds);
|
return hyPartnerExhibitionMapper.getLineByExhibitionIds(exhibitionIds);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void updateStatusAfterSubmitIndustry(Long partnerLineId) {
|
||||||
|
if (partnerLineId == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
hyPartnerExhibitionMapper.updateStatusAfterSubmitIndustry(partnerLineId);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,11 +3,10 @@ package com.cool.store.dao;
|
|||||||
import com.cool.store.dto.partner.PartnerIntentApplyInfoDTO;
|
import com.cool.store.dto.partner.PartnerIntentApplyInfoDTO;
|
||||||
import com.cool.store.entity.HyPartnerIntentInfoDO;
|
import com.cool.store.entity.HyPartnerIntentInfoDO;
|
||||||
import com.cool.store.mapper.HyPartnerIntentInfoMapper;
|
import com.cool.store.mapper.HyPartnerIntentInfoMapper;
|
||||||
import com.github.pagehelper.PageInfo;
|
|
||||||
import org.apache.commons.collections4.CollectionUtils;
|
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Repository;
|
import org.springframework.stereotype.Repository;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
@@ -26,7 +25,13 @@ public class HyPartnerIntentInfoDAO {
|
|||||||
@Resource
|
@Resource
|
||||||
HyPartnerIntentInfoMapper hyPartnerIntentInfoMapper;
|
HyPartnerIntentInfoMapper hyPartnerIntentInfoMapper;
|
||||||
|
|
||||||
public int insertSelective( HyPartnerIntentInfoDO record){
|
@Autowired
|
||||||
|
HyPartnerExhibitionDAO hyPartnerExhibitionDAO;
|
||||||
|
|
||||||
|
@Transactional
|
||||||
|
public int insertSelective( HyPartnerIntentInfoDO record){
|
||||||
|
//增加修改线索会销状态
|
||||||
|
hyPartnerExhibitionDAO.updateStatusAfterSubmitIndustry(record.getPartnerLineId());
|
||||||
return hyPartnerIntentInfoMapper.insertSelective(record);
|
return hyPartnerIntentInfoMapper.insertSelective(record);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -116,4 +116,10 @@ public interface HyPartnerExhibitionMapper {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<ExhibitionLineDTO> getLineByExhibitionIds(List<Integer> exhibitionIds);
|
List<ExhibitionLineDTO> getLineByExhibitionIds(List<Integer> exhibitionIds);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 在线索提交意向申请后刷线线索报名会销的状态
|
||||||
|
* @param partnerLineId
|
||||||
|
*/
|
||||||
|
int updateStatusAfterSubmitIndustry(@Param("partnerLineId") Long partnerLineId);
|
||||||
}
|
}
|
||||||
@@ -499,4 +499,17 @@
|
|||||||
</foreach>
|
</foreach>
|
||||||
)
|
)
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<update id="updateStatusAfterSubmitIndustry">
|
||||||
|
UPDATE hy_partner_exhibition t1
|
||||||
|
INNER JOIN hy_exhibition t2 ON t1.exhibition_id = t2.id
|
||||||
|
SET t1.participation_status = 3
|
||||||
|
WHERE t1.deleted = 0
|
||||||
|
AND t2.deleted = 0
|
||||||
|
AND t2.closed_type = 0
|
||||||
|
AND partner_line_id = #{partnerLineId}
|
||||||
|
AND participation_status = 1
|
||||||
|
</update>
|
||||||
|
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
@@ -1,7 +1,6 @@
|
|||||||
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.entity.HyPartnerInterviewPlanDO;
|
|
||||||
import com.cool.store.exception.ApiException;
|
import com.cool.store.exception.ApiException;
|
||||||
import com.cool.store.request.*;
|
import com.cool.store.request.*;
|
||||||
import com.cool.store.vo.EnterInterviewVO;
|
import com.cool.store.vo.EnterInterviewVO;
|
||||||
@@ -88,5 +87,5 @@ public interface InterviewService {
|
|||||||
* @return interview: {@link com.cool.store.entity.HyPartnerInterviewDO}; interviewPlan: {@link com.cool.store.entity.HyPartnerInterviewPlanDO}
|
* @return interview: {@link com.cool.store.entity.HyPartnerInterviewDO}; interviewPlan: {@link com.cool.store.entity.HyPartnerInterviewPlanDO}
|
||||||
* @throws ApiException
|
* @throws ApiException
|
||||||
*/
|
*/
|
||||||
Map<String, Object> agreeInterviewWithoutBook(CreateAppointmentReq request, Boolean whetherBeginInterview, String interviewerId) throws ApiException;
|
Map<String, Object> agreeInterviewWithoutBook(CreateAppointmentReq request, Boolean whetherBeginInterview, String interviewerId, Boolean needSendSms) throws ApiException;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -761,12 +761,12 @@ public class InterviewServiceImpl implements InterviewService {
|
|||||||
if (interviewStartTime.isBeforeOrEquals(new Date())) {
|
if (interviewStartTime.isBeforeOrEquals(new Date())) {
|
||||||
whetherBeginInterview = true;
|
whetherBeginInterview = true;
|
||||||
}
|
}
|
||||||
HyPartnerInterviewPlanDO interviewPlanDO = (HyPartnerInterviewPlanDO) agreeInterviewWithoutBook(request, whetherBeginInterview, interviewerId).get("interviewPlan");
|
HyPartnerInterviewPlanDO interviewPlanDO = (HyPartnerInterviewPlanDO) agreeInterviewWithoutBook(request, whetherBeginInterview, interviewerId, Boolean.TRUE).get("interviewPlan");
|
||||||
return new CreateAppointmentVO(interviewPlanDO.getId().toString());
|
return new CreateAppointmentVO(interviewPlanDO.getId().toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Transactional
|
@Transactional
|
||||||
public Map<String, Object> agreeInterviewWithoutBook(CreateAppointmentReq request, Boolean whetherBeginInterview, String interviewerId) throws ApiException {
|
public Map<String, Object> agreeInterviewWithoutBook(CreateAppointmentReq request, Boolean whetherBeginInterview, String interviewerId, Boolean needSendSms) throws ApiException {
|
||||||
//1.创建面试计划
|
//1.创建面试计划
|
||||||
HyPartnerInterviewPlanDO interviewPlanDO = new HyPartnerInterviewPlanDO();
|
HyPartnerInterviewPlanDO interviewPlanDO = new HyPartnerInterviewPlanDO();
|
||||||
Date now = new Date();
|
Date now = new Date();
|
||||||
@@ -824,11 +824,13 @@ public class InterviewServiceImpl implements InterviewService {
|
|||||||
hyPartnerLineInfoMapper.updateByPrimaryKeySelective(hyPartnerLineDO);
|
hyPartnerLineInfoMapper.updateByPrimaryKeySelective(hyPartnerLineDO);
|
||||||
|
|
||||||
//4. 异步发送短信给加盟商
|
//4. 异步发送短信给加盟商
|
||||||
HyPartnerBaseInfoDO partnerBaseInfo = hyPartnerBaseInfoMapper.getByPartnerLineId(request.getPartnerLineId());
|
if (Boolean.TRUE.equals(needSendSms)) {
|
||||||
if(partnerBaseInfo == null){
|
HyPartnerBaseInfoDO partnerBaseInfo = hyPartnerBaseInfoMapper.getByPartnerLineId(request.getPartnerLineId());
|
||||||
throw new ServiceException(ErrorCodeEnum.INTERVIEW_PARTNER_NOT_EXIST);
|
if(partnerBaseInfo == null){
|
||||||
|
throw new ServiceException(ErrorCodeEnum.INTERVIEW_PARTNER_NOT_EXIST);
|
||||||
|
}
|
||||||
|
eventCenterHttpRequest.sendSmsVariable(partnerBaseInfo.getMobile(), SMSMsgEnum.INTERVIEW_APPOINTMENT_PASS, DateUtil.format(DateUtil.parseDateTime(request.getStartBookingTime()), DatePattern.NORM_DATETIME_MINUTE_PATTERN), wechatMiniAppService.getMiniAppUrl());
|
||||||
}
|
}
|
||||||
eventCenterHttpRequest.sendSmsVariable(partnerBaseInfo.getMobile(), SMSMsgEnum.INTERVIEW_APPOINTMENT_PASS, DateUtil.format(DateUtil.parseDateTime(request.getStartBookingTime()), DatePattern.NORM_DATETIME_MINUTE_PATTERN), wechatMiniAppService.getMiniAppUrl());
|
|
||||||
|
|
||||||
//5. 记录日志
|
//5. 记录日志
|
||||||
LoginUserInfo operator = CurrentUserHolder.getUser();
|
LoginUserInfo operator = CurrentUserHolder.getUser();
|
||||||
|
|||||||
@@ -112,7 +112,7 @@ public class ExhibitionServiceImpl implements ExhibitionService {
|
|||||||
//1.2 核验会销签到状态
|
//1.2 核验会销签到状态
|
||||||
if (hyPartnerExhibitionDO == null
|
if (hyPartnerExhibitionDO == null
|
||||||
//线索未会销签到并且提交意向申请或未处在预约面试阶段
|
//线索未会销签到并且提交意向申请或未处在预约面试阶段
|
||||||
|| !(hyPartnerExhibitionDO.getParticipationStatus().equals(ExhibitionPartnerStatus.SIGNED.getCode())))
|
|| !(hyPartnerExhibitionDO.getParticipationStatus().equals(ExhibitionPartnerStatus.APPLIED.getCode())))
|
||||||
{
|
{
|
||||||
throw new ApiException(ErrorCodeEnum.EXHIBITION_NOT_SIGNED);
|
throw new ApiException(ErrorCodeEnum.EXHIBITION_NOT_SIGNED);
|
||||||
}
|
}
|
||||||
@@ -134,7 +134,7 @@ public class ExhibitionServiceImpl implements ExhibitionService {
|
|||||||
String bookEndTime = DateUtil.offsetMinute(DateUtil.parseDateTime(bookStartTime), 30).toString("yyyy-MM-dd HH:mm:ss");
|
String bookEndTime = DateUtil.offsetMinute(DateUtil.parseDateTime(bookStartTime), 30).toString("yyyy-MM-dd HH:mm:ss");
|
||||||
createAppointmentReq.setStartBookingTime(bookStartTime);
|
createAppointmentReq.setStartBookingTime(bookStartTime);
|
||||||
createAppointmentReq.setEndBookingTime(bookEndTime);
|
createAppointmentReq.setEndBookingTime(bookEndTime);
|
||||||
Map<String, Object> interviewInfoMap = interviewService.agreeInterviewWithoutBook(createAppointmentReq, Boolean.TRUE, CurrentUserHolder.getUserId());
|
Map<String, Object> interviewInfoMap = interviewService.agreeInterviewWithoutBook(createAppointmentReq, Boolean.TRUE, CurrentUserHolder.getUserId(), Boolean.FALSE);
|
||||||
HyPartnerInterviewPlanDO interviewPlan = (HyPartnerInterviewPlanDO) interviewInfoMap.get("interviewPlan");
|
HyPartnerInterviewPlanDO interviewPlan = (HyPartnerInterviewPlanDO) interviewInfoMap.get("interviewPlan");
|
||||||
HyPartnerInterviewDO interviewInfo = (HyPartnerInterviewDO) interviewInfoMap.get("interview");
|
HyPartnerInterviewDO interviewInfo = (HyPartnerInterviewDO) interviewInfoMap.get("interview");
|
||||||
|
|
||||||
@@ -763,7 +763,7 @@ public class ExhibitionServiceImpl implements ExhibitionService {
|
|||||||
public void sendSMSToExhibitionApplicants() {
|
public void sendSMSToExhibitionApplicants() {
|
||||||
//1. 查询昨晚被自动结束的会销
|
//1. 查询昨晚被自动结束的会销
|
||||||
HyExhibitionDO hyExhibitionDO = new HyExhibitionDO();
|
HyExhibitionDO hyExhibitionDO = new HyExhibitionDO();
|
||||||
hyExhibitionDO.setClosedType(2);
|
hyExhibitionDO.setClosedType(1);
|
||||||
String startDayStr = DateUtil.format(DateUtil.offsetDay(new Date(), -1), CoolDateUtils.DATE_FORMAT_DAY);
|
String startDayStr = DateUtil.format(DateUtil.offsetDay(new Date(), -1), CoolDateUtils.DATE_FORMAT_DAY);
|
||||||
hyExhibitionDO.setStartDateStr(startDayStr);
|
hyExhibitionDO.setStartDateStr(startDayStr);
|
||||||
hyExhibitionDO.setDeleted(Boolean.FALSE);
|
hyExhibitionDO.setDeleted(Boolean.FALSE);
|
||||||
|
|||||||
@@ -41,22 +41,22 @@ class EventRequestTest extends AbstractJUnit4SpringContextTests {
|
|||||||
@Test
|
@Test
|
||||||
void testFeishuNotice() throws ApiException {
|
void testFeishuNotice() throws ApiException {
|
||||||
String userId = "34f4a9ga";
|
String userId = "34f4a9ga";
|
||||||
// //1. 工作台通知
|
//1. 工作台通知
|
||||||
// eventCenterHttpRequest.sendFeiShuNotice(FeiShuNoticeMsgEnum.common_notice, Arrays.asList(userId), "测试");
|
eventCenterHttpRequest.sendFeiShuNotice(FeiShuNoticeMsgEnum.common_notice, Arrays.asList(userId), "测试");
|
||||||
// //2. 分配招商经理
|
//2. 分配招商经理
|
||||||
// eventCenterHttpRequest.sendFeiShuNotice(FeiShuNoticeMsgEnum.ALLOCATION_INVESTMENT_MANAGER, Arrays.asList(userId), "2011-12-11 11:11:11", "测试", "1008631");
|
eventCenterHttpRequest.sendFeiShuNotice(FeiShuNoticeMsgEnum.ALLOCATION_INVESTMENT_MANAGER, Arrays.asList(userId), "2011-12-11 11:11:11", "测试", "1008631");
|
||||||
// //3. 转让招商经理
|
//3. 转让招商经理
|
||||||
// eventCenterHttpRequest.sendFeiShuNotice(FeiShuNoticeMsgEnum.TRANS_INVESTMENT_MANAGER, Arrays.asList(userId), "2012-11-11 11:11:11", "测试", "1108611");
|
eventCenterHttpRequest.sendFeiShuNotice(FeiShuNoticeMsgEnum.TRANS_INVESTMENT_MANAGER, Arrays.asList(userId), "2012-11-11 11:11:11", "测试", "1108611");
|
||||||
// //4. 收到新线索
|
//4. 收到新线索
|
||||||
// eventCenterHttpRequest.sendFeiShuNotice(FeiShuNoticeMsgEnum.BATCH_TRANS_INVESTMENT_MANAGER, Arrays.asList(userId), "1", "2023-01-24 16:41:07");
|
eventCenterHttpRequest.sendFeiShuNotice(FeiShuNoticeMsgEnum.BATCH_TRANS_INVESTMENT_MANAGER, Arrays.asList(userId), "1", "2023-01-24 16:41:07");
|
||||||
// //5. 加盟意向申请
|
//5. 加盟意向申请
|
||||||
// eventCenterHttpRequest.sendFeiShuNotice(FeiShuNoticeMsgEnum.INTENTION_APPLY, Arrays.asList(userId), "测试", "1007611", "2023-09-24 16:42:07");
|
eventCenterHttpRequest.sendFeiShuNotice(FeiShuNoticeMsgEnum.INTENTION_APPLY, Arrays.asList(userId), "测试", "1007611", "2023-09-24 16:42:07");
|
||||||
// //6. 线索跟进任务
|
//6. 线索跟进任务
|
||||||
// eventCenterHttpRequest.sendFeiShuNotice(FeiShuNoticeMsgEnum.FOLLOW_TASK, Arrays.asList(userId), "测试线索跟进任务");
|
eventCenterHttpRequest.sendFeiShuNotice(FeiShuNoticeMsgEnum.FOLLOW_TASK, Arrays.asList(userId), "测试线索跟进任务");
|
||||||
// //7. 面试预约申请
|
//7. 面试预约申请
|
||||||
// eventCenterHttpRequest.sendFeiShuNotice(FeiShuNoticeMsgEnum.INTERVIEW_APPOINTMENT, Arrays.asList(userId), "测试", "1108611", "2023-10-24 16:43:07");
|
eventCenterHttpRequest.sendFeiShuNotice(FeiShuNoticeMsgEnum.INTERVIEW_APPOINTMENT, Arrays.asList(userId), "测试", "1108611", "2023-10-24 16:43:07");
|
||||||
// //8. 会销协作通知
|
//8. 会销协作通知
|
||||||
// eventCenterHttpRequest.sendFeiShuNotice(FeiShuNoticeMsgEnum.EXHIBITION_COLLABORATOR, Arrays.asList(userId), "68", "老大", "会销", "2023-12-31", "系东方大酒店");
|
eventCenterHttpRequest.sendFeiShuNotice(FeiShuNoticeMsgEnum.EXHIBITION_COLLABORATOR, Arrays.asList(userId), "68", "老大", "会销", "2023-12-31", "系东方大酒店");
|
||||||
//9. 线索报名会销
|
//9. 线索报名会销
|
||||||
eventCenterHttpRequest.sendFeiShuNotice(FeiShuNoticeMsgEnum.PARTNER_SIGNUP_EXHIBITION, Arrays.asList(userId), "237298", "e2771d330ec54648841a38607f06b598", "线索客户", "1008611", "2023-10-24", "会销", "蜀山");
|
eventCenterHttpRequest.sendFeiShuNotice(FeiShuNoticeMsgEnum.PARTNER_SIGNUP_EXHIBITION, Arrays.asList(userId), "237298", "e2771d330ec54648841a38607f06b598", "线索客户", "1008611", "2023-10-24", "会销", "蜀山");
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user