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

This commit is contained in:
zhangchenbiao
2023-06-26 14:23:28 +08:00
21 changed files with 185 additions and 40 deletions

View File

@@ -66,7 +66,7 @@ public class CoolDateUtils {
LocalDate today = LocalDate.now();
LocalDate thirdDay = today.plusDays(day);
LocalDateTime thirdDayMidnight = LocalDateTime.of(thirdDay, LocalTime.MIDNIGHT);
LocalDateTime thirdDay235959 = thirdDayMidnight.with(LocalTime.MIN);
LocalDateTime thirdDay235959 = thirdDayMidnight.with(LocalTime.MAX);
ZonedDateTime zonedDateTime = ZonedDateTime.of(thirdDay235959, ZoneId.systemDefault());
return Date.from(zonedDateTime.toInstant());
}

View File

@@ -87,4 +87,18 @@ public interface HyPartnerInterviewMapper {
*/
String getLineId(@Param("interviewPlanId") String interviewPlanId);
/**
* 获取面试流程状态
* @param interviewPlanId
* @return
*/
String getStatus(String interviewPlanId);
/**
* 在面试信息表中添加面试录制视频链接
* @param roomId
* @param videoUrl
*/
void addVideoUrl(@Param("roomId") String roomId, @Param("videoUrl") String videoUrl);
}

View File

@@ -141,5 +141,16 @@ public interface HyPartnerInterviewPlanMapper {
*/
Integer getRoomStatus(@Param("interviewPlanId") String interviewPlanId);
/**
* 获取面试开始时间
*/
String getInterviewStartTime(String interviewPlanId);
/**
* 根据面试计划id获取面试计划信息
* @param interviewPlanId
* @return
*/
HyPartnerInterviewPlanDO getInterviewPlanById(String interviewPlanId);
}

View File

@@ -217,6 +217,12 @@
<if test="record.updateTime != null">
update_time = #{record.updateTime},
</if>
<if test="record.passTime != null">
pass_time = #{record.passTime},
</if>
<if test="record.passUserId != null">
pass_user_id = #{record.passUserId},
</if>
</set>
where id = #{record.id}
</update>

View File

@@ -471,4 +471,22 @@
and deleted = 0
</select>
<!-- 获取面试流程状态 -->
<select id="getStatus" resultType="java.lang.String">
SELECT status
FROM hy_partner_interview
WHERE interview_plan_id = #{interviewPlanId}
</select>
<!-- 根据 room_id 添加 process_info -->
<update id="addVideoUrl">
UPDATE hy_partner_interview
SET process_info = IF(process_info IS NULL, #{videoUrl}, CONCAT(process_info, ',' ,#{videoUrl}))
WHERE interview_plan_id = (
SELECT id
FROM hy_partner_interview_plan
WHERE room_id = #{roomId}
)
</update>
</mapper>

View File

@@ -294,25 +294,35 @@
<select id="getPartnerInterviewInfoList" resultType="com.cool.store.dto.partner.PartnerInterviewInfoDTO">
select
hpli.id as partnerLineId,
hpli.partner_id as partnerId,
hpli.deadline as deadline,
hpli.workflow_status as status,
a.id as id,
a.deadline as deadline,
a.status as status,
a.auth_code as authCode,
a.approve_time as approveTime,
a.process_info as processInfo,
b.id as interviewId,
b.partner_line_id as partnerLineId,
b.partner_id as partnerId,
b.start_time as startTime,
b.end_time as endTime,
b.interviewer as interviewer,
b.create_time as createTime,
b.room_id as roomId
from hy_partner_interview a left join hy_partner_interview_plan b on a.interview_plan_id = b.id
where a.status = #{workflowStatus}
<if test="userId!=null and userId!=''">
and a.interviewer = #{userId}
</if>
from hy_partner_line_info hpli
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
<where>
<if test="workflowStage!=null and workflowStage!=''">
and hpli.workflow_stage = #{workflowStage}
</if>
<if test="workflowStatus!=null and workflowStatus!=''">
and hpli.workflow_status = #{workflowStatus}
</if>
<if test="userId!=null and userId!=''">
and hpli.investment_manager = #{userId}
</if>
</where>
</select>
<select id="getInterviewList" resultType="com.cool.store.vo.interview.InterviewVO">
@@ -458,4 +468,18 @@
from hy_partner_interview_plan
where id = #{interviewPlanId}
</select>
<!-- 获取面试开始时间 -->
<select id="getInterviewStartTime" resultType="java.lang.String">
select start_time
from hy_partner_interview_plan
where id = #{interviewPlanId}
</select>
<!-- 根据id获取面试计划信息 -->
<select id="getInterviewPlanById" resultType="com.cool.store.entity.HyPartnerInterviewPlanDO">
select <include refid="Base_Column_List"></include>
from hy_partner_interview_plan
where id = #{interviewPlanId}
</select>
</mapper>

View File

@@ -61,7 +61,7 @@ public class PartnerLineInfoAndBaseInfoDTO {
private String passUserId;
@ApiModelProperty("通过证明")
private String passCertifyFile;
private String certifyFile;
private Integer lineStatus;

View File

@@ -66,6 +66,9 @@ public class PartnerLineInfoAndBaseInfoVO {
@ApiModelProperty("通过人ID")
private String passUserId;
@ApiModelProperty("通过人手机号")
private String passUserMobile;
@ApiModelProperty("通过证明")
private List<String> passCertifyFile;

View File

@@ -47,7 +47,7 @@ public interface InterviewService {
* 最后返回 userSign 用于进入腾讯云音视频房间
* @return userSign 进入视频所需签名
*/
EnterInterviewVO enterInterviewRoom(EnterInterviewDto dto);
EnterInterviewVO enterInterviewRoom(EnterInterviewDto dto) throws ApiException;
/**
* 创建面试预约信息

View File

@@ -22,7 +22,7 @@ public interface PartnerInterviewService {
* 最后返回 userSign 用于进入腾讯云音视频房间
* @return userSign 进入视频所需签名
*/
EnterInterviewVO enterInterviewRoom(EnterInterviewDto dto);
EnterInterviewVO enterInterviewRoom(EnterInterviewDto dto) throws ApiException;
/**
* 获取通知函详情

View File

@@ -23,6 +23,7 @@ import com.cool.store.service.HyPartnerLineInfoService;
import com.cool.store.utils.RedisUtilPool;
import com.cool.store.vo.PartnerBaseInfoVO;
import com.cool.store.vo.PartnerUserInfoVO;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
@@ -38,6 +39,7 @@ import java.util.Date;
* @Version 1.0
*/
@Service
@Slf4j
public class HyPartnerBaseInfoServiceImpl implements HyPartnerBaseInfoService {
@Resource
@@ -76,6 +78,8 @@ public class HyPartnerBaseInfoServiceImpl implements HyPartnerBaseInfoService {
*/
@Override
public Boolean submitPartnerBaseInfo(PartnerBaseInfoRequest request, PartnerUserInfoVO currentUser) {
log.info("HyPartnerBaseInfoServiceImpl#submitPartnerBaseInfo request:{}", JSONObject.toJSONString(request));
String cacheKey = MessageFormat.format(RedisConstant.PARTNER_BASEINFO_CACHE_KEY, request.getPartnerId(), request.getPartnerLineId());
if(!request.getSubmitFlag()){
// 自动保存时
@@ -101,6 +105,12 @@ public class HyPartnerBaseInfoServiceImpl implements HyPartnerBaseInfoService {
hyPartnerBaseInfoDO.setStatus(Integer.valueOf(WorkflowStatusEnum.INTENT_1.getCode()));
hyPartnerBaseInfoDAO.updateByPrimaryKeySelective(hyPartnerBaseInfoDO);
HyPartnerUserInfoDO hyPartnerUserInfoDO = hyPartnerUserInfoDAO.selectByPartnerId(request.getPartnerId());
if(!hyPartnerUserInfoDO.getUsername().equals(request.getUsername())){
hyPartnerUserInfoDO.setUsername(request.getUsername());
hyPartnerUserInfoDAO.updateByPrimaryKeySelective(hyPartnerUserInfoDO);
}
HyPartnerTaskInfoLogDO logDO = new HyPartnerTaskInfoLogDO(request.getPartnerId(), request.getPartnerLineId(), WorkflowStageEnum.INTENT.getCode(), WorkflowStatusEnum.INTENT_1.getCode(), currentUser.getPartnerId(), currentUser.getUsername(), null);
hyPartnerTaskInfoLogDAO.insertSelective(logDO);

View File

@@ -146,6 +146,11 @@ public class HyPartnerIntentInfoServiceImpl implements HyPartnerIntentInfoServic
}
redisUtilPool.delKey(cacheKey);
if(StringUtils.isNotBlank(request.getWantShopArea())){
HyPartnerUserInfoDO hyPartnerUserInfoDO = hyPartnerUserInfoDAO.selectByPartnerId(request.getPartnerId());
hyPartnerUserInfoDO.setWantShopArea(request.getWantShopArea());
hyPartnerUserInfoDO.setLiveArea(request.getLiveArea());
hyPartnerUserInfoDO.setAcceptAdjustType(request.getAcceptAdjustType());
hyPartnerUserInfoDAO.updateByPrimaryKeySelective(hyPartnerUserInfoDO);
HyOpenAreaInfoDO hyOpenAreaInfoDO = hyOpenAreaInfoDAO.selectById(Long.valueOf(request.getWantShopArea()));
return hyOpenAreaInfoDO != null ? hyOpenAreaInfoDO.getAreaStatus() : null;
}

View File

@@ -97,6 +97,7 @@ public class HyPartnerLineInfoServiceImpl implements HyPartnerLineInfoService {
EnterpriseUserDO userInfo = enterpriseUserDAO.getUserInfoById(partnerLineInfoAndBaseInfoDTO.getPassUserId());
if (userInfo!=null){
partnerLineInfoAndBaseInfoVO.setPassUserName(userInfo.getName());
partnerLineInfoAndBaseInfoVO.setPassUserMobile(userInfo.getMobile());
}
if (StringUtils.isNotEmpty(partnerLineInfoAndBaseInfoVO.getPartnerUserPhone())){
DescribePhoneNumberDTO phoneNumberAttribute = aliyunService.getPhoneNumberAttribute(partnerLineInfoAndBaseInfoVO.getPartnerUserPhone());
@@ -263,6 +264,9 @@ public class HyPartnerLineInfoServiceImpl implements HyPartnerLineInfoService {
hy.setPassReason(closeFollowRequest.getPassReason());
hy.setPassTime(new Date());
hy.setPassUserId(userId);
if (CollectionUtils.isNotEmpty(closeFollowRequest.getCertifyFile())){
hy.setCertifyFile(JSONObject.toJSONString(closeFollowRequest.getCertifyFile()));
}
hyPartnerBaseInfoDAO.updateByPrimaryKeySelective(hy);
}
@@ -617,8 +621,8 @@ public class HyPartnerLineInfoServiceImpl implements HyPartnerLineInfoService {
partnerLineInfoAndBaseInfoVO.setAcceptAdjustType(partnerLineInfoAndBaseInfoDTO.getAcceptAdjustType());
partnerLineInfoAndBaseInfoVO.setWantShopArea(partnerLineInfoAndBaseInfoDTO.getWantShopArea());
partnerLineInfoAndBaseInfoVO.setLiveArea(partnerLineInfoAndBaseInfoDTO.getLiveArea());
if (StringUtil.isNotEmpty(partnerLineInfoAndBaseInfoDTO.getPassCertifyFile())){
partnerLineInfoAndBaseInfoVO.setPassCertifyFile(JSONObject.parseArray(partnerLineInfoAndBaseInfoDTO.getPassCertifyFile(), String.class));
if (StringUtil.isNotEmpty(partnerLineInfoAndBaseInfoDTO.getCertifyFile())){
partnerLineInfoAndBaseInfoVO.setPassCertifyFile(JSONObject.parseArray(partnerLineInfoAndBaseInfoDTO.getCertifyFile(), String.class));
}
partnerLineInfoAndBaseInfoVO.setPassUserId(partnerLineInfoAndBaseInfoDTO.getPassUserId());
partnerLineInfoAndBaseInfoVO.setPassTime(DateUtil.format(partnerLineInfoAndBaseInfoDTO.getPassTime(),CoolDateUtils.DATE_FORMAT_SEC));

View File

@@ -2,6 +2,7 @@ package com.cool.store.service.impl;
import cn.hutool.core.convert.Convert;
import cn.hutool.core.date.DatePattern;
import cn.hutool.core.date.DateTime;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.ObjectUtil;
import com.alibaba.fastjson.JSON;
@@ -251,18 +252,33 @@ public class InterviewServiceImpl implements InterviewService {
*/
@Override
@Transactional
public EnterInterviewVO enterInterviewRoom(EnterInterviewDto dto) {
public EnterInterviewVO enterInterviewRoom(EnterInterviewDto dto) throws ApiException {
try {
//如果面试间状态不是已开放,就不让进
//房间状态
Integer roomStatus = hyPartnerInterviewPlanMapper.getRoomStatus(dto.getInterviewPlanId());
if (!roomStatus.equals(RoomStatus.OPEN.getCode())) {
throw new RuntimeException();
//面试流程状态
String status = hyPartnerInterviewMapper.getStatus(dto.getInterviewPlanId());
//如果面试间状态是 0 待开放或者面试流程状态是 2 待面试,就不让进
//再判断时间是否是正确的时间
if (roomStatus.equals(RoomStatus.WAIT_FOR_OPEN.getCode()) || WorkflowStatusEnum.INTERVIEW_2.getCode().equals(status)) {
HyPartnerInterviewPlanDO interviewPlan = hyPartnerInterviewPlanMapper.getInterviewPlanById(dto.getInterviewPlanId());
//面试预期开始时间
DateTime exceptTime = DateUtil.offsetMinute(interviewPlan.getStartTime(), -5);
//面试结束时间
DateTime endTime = DateUtil.parseDateTime(DateUtil.formatDateTime(interviewPlan.getEndTime()));
DateTime now = DateUtil.date();
//如果当前时间在预期开始时间和结束时间之间
//修改面试状态和房间状态(修改房间状态在后面 hyPartnerInterviewPlanDO 中一并修改)
if (exceptTime.isBefore(now) && now.isBefore(endTime)) {
//1. 将面试状态改为 --> 2 已开始
interviewDAO.updateInterviewWorkflowStatus(dto.getInterviewPlanId(), WorkflowStatusEnum.INTERVIEW_3);
//hyPartnerInterviewDO.setStatus(Integer.parseInt(WorkflowStatusEnum.INTERVIEW_3.getCode()));
} else {
throw new ApiException(ErrorCodeEnum.ROOM_STATUS_ERROR);
}
}
HyPartnerInterviewDO hyPartnerInterviewDO = new HyPartnerInterviewDO();
hyPartnerInterviewDO.setInterviewPlanId(Long.parseLong(dto.getInterviewPlanId()));
//1. 将面试状态改为 --> 2已开始
interviewDAO.updateInterviewWorkflowStatus(dto.getInterviewPlanId(), WorkflowStatusEnum.INTERVIEW_3);
// hyPartnerInterviewDO.setStatus(Integer.parseInt(WorkflowStatusEnum.INTERVIEW_3.getCode()));
//2. 修改加盟商或面试官进入面试时间
//加盟商
if (dto.getUserType().equals(2)) {
@@ -274,21 +290,25 @@ public class InterviewServiceImpl implements InterviewService {
hyPartnerInterviewMapper.updateByPrimaryKeySelective(hyPartnerInterviewDO);
HyPartnerInterviewPlanDO hyPartnerInterviewPlanDO = new HyPartnerInterviewPlanDO();
hyPartnerInterviewPlanDO.setId(Long.parseLong(dto.getInterviewPlanId()));
//修改面试房间状态
hyPartnerInterviewPlanDO.setRoomStatus(RoomStatus.OPEN.getCode());
//3. TODO待确认 修改面试实际开始时间,以第一个人进来的时间为准,后续不再修改
hyPartnerInterviewPlanMapper.updateActualStartTime(hyPartnerInterviewPlanDO.getId(), DateUtil.now());
//4. 加盟商如果进入了,就修改面试计划表 is_partner_interview 字段
if (dto.getUserType().equals(2)) {
hyPartnerInterviewPlanDO.setIsPartnerInterview(1);
hyPartnerInterviewPlanMapper.updateByPrimaryKeySelective(hyPartnerInterviewPlanDO);
}
hyPartnerInterviewPlanMapper.updateByPrimaryKeySelective(hyPartnerInterviewPlanDO);
//5. 查询对应的面试官id、姓名及加盟商姓名
EnterInterviewVO vo = hyPartnerInterviewMapper.getInterviewerByInterviewPlanId(dto.getInterviewPlanId());
//6. 生成 userSign
String userSig = TRTCUtils.genUserSig(sdkAppId, key, dto.getUserId());
vo.setUserSign(userSig);
return vo;
} catch (ApiException apiException) {
throw apiException;
} catch (Exception e) {
throw new ServiceException(ErrorCodeEnum.INTERVIEW_ENTER_FAIL);
throw new ApiException(ErrorCodeEnum.INTERVIEW_ENTER_FAIL);
}
}

View File

@@ -18,7 +18,6 @@ import com.cool.store.request.ModifyInterviewTimeReq;
import com.cool.store.service.PartnerInterviewService;
import com.cool.store.utils.TRTCUtils;
import com.cool.store.vo.EnterInterviewVO;
import com.cool.store.vo.EnterpriseUserBaseInfoVO;
import com.cool.store.vo.PartnerInterviewInfoVO;
import com.cool.store.vo.PartnerPassLetterDetailVO;
import com.cool.store.vo.interview.InterviewVO;
@@ -69,18 +68,33 @@ public class PartnerInterviewServiceImpl implements PartnerInterviewService {
*/
@Override
@Transactional
public EnterInterviewVO enterInterviewRoom(EnterInterviewDto dto) {
public EnterInterviewVO enterInterviewRoom(EnterInterviewDto dto) throws ApiException {
try {
//如果面试间状态不是已开放,就不让进
//房间状态
Integer roomStatus = interviewPlanMapper.getRoomStatus(dto.getInterviewPlanId());
if (!roomStatus.equals(RoomStatus.OPEN.getCode())) {
throw new RuntimeException();
//面试流程状态
String status = interviewMapper.getStatus(dto.getInterviewPlanId());
//如果面试间状态是 0 待开放或者面试流程状态是 2 待面试,就不让进
//再判断时间是否是正确的时间
if (roomStatus.equals(RoomStatus.WAIT_FOR_OPEN.getCode()) || WorkflowStatusEnum.INTERVIEW_2.getCode().equals(status)) {
HyPartnerInterviewPlanDO interviewPlan = interviewPlanMapper.getInterviewPlanById(dto.getInterviewPlanId());
//面试预期开始时间
DateTime exceptTime = DateUtil.offsetMinute(interviewPlan.getStartTime(), -5);
//面试结束时间
DateTime endTime = DateUtil.parseDateTime(DateUtil.formatDateTime(interviewPlan.getEndTime()));
DateTime now = DateUtil.date();
//如果当前时间在预期开始时间和结束时间之间
//修改面试状态和房间状态(修改房间状态在后面 hyPartnerInterviewPlanDO 中一并修改)
if (exceptTime.isBefore(now) && now.isBefore(endTime)) {
//1. 将面试状态改为 --> 2 已开始
interviewDAO.updateInterviewWorkflowStatus(dto.getInterviewPlanId(), WorkflowStatusEnum.INTERVIEW_3);
//hyPartnerInterviewDO.setStatus(Integer.parseInt(WorkflowStatusEnum.INTERVIEW_3.getCode()));
} else {
throw new ApiException(ErrorCodeEnum.ROOM_STATUS_ERROR);
}
}
HyPartnerInterviewDO hyPartnerInterviewDO = new HyPartnerInterviewDO();
hyPartnerInterviewDO.setInterviewPlanId(Long.parseLong(dto.getInterviewPlanId()));
//1. 将面试状态改为 --> 2已开始
interviewDAO.updateInterviewWorkflowStatus(dto.getInterviewPlanId(), WorkflowStatusEnum.INTERVIEW_3);
// hyPartnerInterviewDO.setStatus(Integer.parseInt(WorkflowStatusEnum.INTERVIEW_3.getCode()));
//2. 修改加盟商或面试官进入面试时间
//加盟商
if (dto.getUserType().equals(2)) {
@@ -92,21 +106,25 @@ public class PartnerInterviewServiceImpl implements PartnerInterviewService {
interviewMapper.updateByPrimaryKeySelective(hyPartnerInterviewDO);
HyPartnerInterviewPlanDO hyPartnerInterviewPlanDO = new HyPartnerInterviewPlanDO();
hyPartnerInterviewPlanDO.setId(Long.parseLong(dto.getInterviewPlanId()));
//修改面试房间状态
hyPartnerInterviewPlanDO.setRoomStatus(RoomStatus.OPEN.getCode());
//3. TODO待确认 修改面试实际开始时间,以第一个人进来的时间为准,后续不再修改
interviewPlanMapper.updateActualStartTime(hyPartnerInterviewPlanDO.getId(), DateUtil.now());
//4. 加盟商如果进入了,就修改面试计划表 is_partner_interview 字段
if (dto.getUserType().equals(2)) {
hyPartnerInterviewPlanDO.setIsPartnerInterview(1);
interviewPlanMapper.updateByPrimaryKeySelective(hyPartnerInterviewPlanDO);
}
interviewPlanMapper.updateByPrimaryKeySelective(hyPartnerInterviewPlanDO);
//5. 查询对应的面试官id、姓名及加盟商姓名
EnterInterviewVO vo = interviewMapper.getInterviewerByInterviewPlanId(dto.getInterviewPlanId());
//6. 生成 userSign
String userSig = TRTCUtils.genUserSig(sdkAppId, key, dto.getUserId());
vo.setUserSign(userSig);
return vo;
} catch (ApiException apiException) {
throw apiException;
} catch (Exception e) {
throw new ServiceException(ErrorCodeEnum.INTERVIEW_ENTER_FAIL);
throw new ApiException(ErrorCodeEnum.INTERVIEW_ENTER_FAIL);
}
}

View File

@@ -1,4 +1,5 @@
package com.cool.store.service.impl;
import com.alibaba.fastjson.JSONObject;
import com.cool.store.constants.CommonConstants;
import com.cool.store.dao.HyOpenAreaInfoDAO;
import com.cool.store.dao.HyPartnerUserInfoDAO;
@@ -13,6 +14,7 @@ import com.cool.store.service.HyPartnerLineInfoService;
import com.cool.store.service.PartnerUserInfoService;
import com.cool.store.vo.ApplyBaseInfoVO;
import com.cool.store.vo.InviteCodeDetailVO;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@@ -21,6 +23,7 @@ import javax.annotation.Resource;
import java.util.List;
@Service
@Slf4j
public class PartnerUserInfoServiceImpl implements PartnerUserInfoService {
@Autowired
@@ -76,6 +79,7 @@ public class PartnerUserInfoServiceImpl implements PartnerUserInfoService {
@Override
public ApplyBaseInfoVO updatePartnerUserInfo(PartnerUserInfoRequest partnerUserInfoRequest) {
log.info("PartnerUserInfoServiceImpl#updatePartnerUserInfo partnerUserInfoRequest:{}", JSONObject.toJSONString(partnerUserInfoRequest));
HyPartnerUserInfoDO hyPartnerUserInfoDO = hyPartnerUserInfoDAO.selectByPartnerId(String.valueOf(partnerUserInfoRequest.getPartnerId()));
if (hyPartnerUserInfoDO == null){
throw new ServiceException(ErrorCodeEnum.PARTNER_USER_NOT_EXIST);

View File

@@ -1,6 +1,6 @@
package com.cool.store.service.impl;
import com.cool.store.mapper.TRTCVideoCallBackMapper;
import com.cool.store.mapper.HyPartnerInterviewMapper;
import com.cool.store.request.TRTCVideoCallBackReq;
import com.cool.store.service.TRTCVideoService;
import org.springframework.beans.factory.annotation.Autowired;
@@ -10,7 +10,7 @@ import org.springframework.stereotype.Service;
public class TRTCVideoServiceImpl implements TRTCVideoService {
@Autowired
private TRTCVideoCallBackMapper videoCallBackMapper;
private HyPartnerInterviewMapper interviewMapper;
/**
* 音视频上传成功后的回调处理
@@ -20,7 +20,7 @@ public class TRTCVideoServiceImpl implements TRTCVideoService {
//将视频播放地址拼接到对应的面试信息字段中
String videoUrl = req.getEventInfo().getPayLoad().getTencentVod().getVideoUrl();
String roomId = req.getEventInfo().getRoomId();
videoCallBackMapper.addVideoUrl(roomId, videoUrl);
interviewMapper.addVideoUrl(roomId, videoUrl);
}
}

View File

@@ -109,6 +109,9 @@ public class WechatMiniAppServiceImpl implements WechatMiniAppService {
hyPartnerUserPlatformBindDO.setBindTime(new Date());
hyPartnerUserPlatformBindDO.setPartnerId(hyPartnerUserInfoDO.getPartnerId());
hyPartnerUserPlatformBindDAO.insertSelective(hyPartnerUserPlatformBindDO);
}else if(!hyPartnerUserPlatformBindDO.getPartnerId().equals(hyPartnerUserInfoDO.getPartnerId())){
hyPartnerUserPlatformBindDO.setPartnerId(hyPartnerUserInfoDO.getPartnerId());
hyPartnerUserPlatformBindDAO.updateByPrimaryKeySelective(hyPartnerUserPlatformBindDO);
}
BeanUtil.copyProperties(hyPartnerUserInfoDO, userInfoVO);
HyPartnerLineInfoDO lineInfoDO = hyPartnerLineInfoDAO.getByPartnerId(hyPartnerUserInfoDO.getPartnerId());
@@ -146,6 +149,9 @@ public class WechatMiniAppServiceImpl implements WechatMiniAppService {
PhoneInfoDTO phoneInfoDTO = wechatRest.getUserPhoneNumber(request.getMobileCode(), accessToken);
if(phoneInfoDTO != null && phoneInfoDTO.getPhoneInfo() != null && StringUtils.isNotBlank(phoneInfoDTO.getPhoneInfo().getPhoneNumber())){
newMobile = phoneInfoDTO.getPhoneInfo().getPhoneNumber();
if(newMobile.equals(oldUserInfo.getMobile())){
return newMobile;
}
HyPartnerUserInfoDO newUserInfo = hyPartnerUserInfoDAO.selectByMobile(newMobile);
if (newUserInfo != null) {
throw new ServiceException(ErrorCodeEnum.NEW_MOBILE_HAS_EXIST);
@@ -168,7 +174,8 @@ public class WechatMiniAppServiceImpl implements WechatMiniAppService {
HyPartnerUserInfoDO hyPartnerUserInfoDO = hyPartnerUserInfoDAO.selectByMobile(mobile);
BeanUtil.copyProperties(hyPartnerUserInfoDO, userInfoVO);
HyPartnerUserPlatformBindDO hyPartnerUserPlatformBindDO = hyPartnerUserPlatformBindDAO.getByPartnerId(hyPartnerUserInfoDO.getPartnerId());
userInfoVO.setOpenid(hyPartnerUserPlatformBindDO.getPlatformUserId());
userInfoVO.setOpenid(hyPartnerUserPlatformBindDO != null ? hyPartnerUserPlatformBindDO.getPlatformUserId() : "");
if(StringUtils.isNotBlank(hyPartnerUserInfoDO.getWantShopArea())){
HyOpenAreaInfoDO hyOpenAreaInfoDO = hyOpenAreaInfoDAO.selectById(Long.valueOf(hyPartnerUserInfoDO.getWantShopArea()));
userInfoVO.setWantShopAreaName(hyOpenAreaInfoDO.getAreaPath().replace("/", " ").trim());

View File

@@ -70,7 +70,7 @@ public class InterviewController {
@PostMapping("/enter")
@ApiOperation("进入面试房间")
public ResponseResult<EnterInterviewVO> enterInterviewRoom(@RequestBody EnterInterviewDto dto) {
public ResponseResult<EnterInterviewVO> enterInterviewRoom(@RequestBody EnterInterviewDto dto) throws ApiException {
return ResponseResult.success(interviewService.enterInterviewRoom(dto));
}

View File

@@ -25,6 +25,7 @@ public class VideoController {
@PostMapping("/callback")
@ApiOperation("音视频回调(腾讯云回调)")
public ResponseResult videoCallback(@RequestBody String requestBody) {
log.info("腾讯音视频上传完成回调request{}", JSONObject.toJSONString(requestBody));
//由于腾讯云恶事做尽,它的回调参数不是驼峰法,首字母是大写,导致 SpringMVC 映射不上,只能手动映射了
TRTCVideoCallBackReq req = JSONObject.parseObject(requestBody, TRTCVideoCallBackReq.class);
//不是音视频上传的回调

View File

@@ -38,7 +38,7 @@ public class InterviewController {
@PostMapping("/enter")
@ApiOperation("进入面试间")
public ResponseResult<EnterInterviewVO> enterInterviewRoom(@RequestBody EnterInterviewDto dto) {
public ResponseResult<EnterInterviewVO> enterInterviewRoom(@RequestBody EnterInterviewDto dto) throws ApiException {
return ResponseResult.success(interviewService.enterInterviewRoom(dto));
}