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

This commit is contained in:
苏竹红
2023-06-26 15:09:40 +08:00
9 changed files with 58 additions and 37 deletions

View File

@@ -3,7 +3,6 @@ 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.DateUnit;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.ObjectUtil;
import com.alibaba.fastjson.JSON;

View File

@@ -2,7 +2,6 @@ package com.cool.store.service.impl;
import cn.hutool.core.convert.Convert;
import cn.hutool.core.date.DateTime;
import cn.hutool.core.date.DateUnit;
import cn.hutool.core.date.DateUtil;
import com.cool.store.dao.HyInterviewDAO;
import com.cool.store.dto.partner.EnterInterviewDto;
@@ -19,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;

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

@@ -4,10 +4,7 @@ import cn.hutool.core.bean.BeanUtil;
import com.alibaba.fastjson.JSONObject;
import com.aliyun.openservices.shade.org.apache.commons.lang3.StringUtils;
import com.cool.store.constants.CommonConstants;
import com.cool.store.dao.HyOpenAreaInfoDAO;
import com.cool.store.dao.HyPartnerLineInfoDAO;
import com.cool.store.dao.HyPartnerUserInfoDAO;
import com.cool.store.dao.HyPartnerUserPlatformBindDAO;
import com.cool.store.dao.*;
import com.cool.store.dto.wx.CodeSessionDTO;
import com.cool.store.dto.wx.MiniProgramLoginDTO;
import com.cool.store.dto.wx.PhoneInfoDTO;
@@ -56,6 +53,8 @@ public class WechatMiniAppServiceImpl implements WechatMiniAppService {
private HyPartnerLineInfoDAO hyPartnerLineInfoDAO;
@Resource
HyOpenAreaInfoDAO hyOpenAreaInfoDAO;
@Resource
HyPartnerBaseInfoDAO hyPartnerBaseInfoDAO;
@Value("${weixin.appId}")
private String wxAppId;
@@ -91,27 +90,29 @@ public class WechatMiniAppServiceImpl implements WechatMiniAppService {
// 获取手机号码
PhoneInfoDTO phoneInfoDTO = wechatRest.getUserPhoneNumber(param.getMobileCode(), accessToken);
if(phoneInfoDTO != null && phoneInfoDTO.getPhoneInfo() != null && StringUtils.isNotBlank(phoneInfoDTO.getPhoneInfo().getPhoneNumber())){
HyPartnerUserInfoDO hyPartnerUserInfoDO = hyPartnerUserInfoDAO.selectByMobile(phoneInfoDTO.getPhoneInfo().getPhoneNumber());
if(hyPartnerUserInfoDO == null){
hyPartnerUserInfoDO = new HyPartnerUserInfoDO();
hyPartnerUserInfoDO.setMobile(phoneInfoDTO.getPhoneInfo().getPhoneNumber());
// hyPartnerUserInfoDO.setUsername(phoneInfoDTO.getPhoneInfo().getPhoneNumber());
hyPartnerUserInfoDO.setPartnerId(UUIDUtils.get32UUID());
hyPartnerUserInfoDO.setAcceptAdjustType(0);
hyPartnerUserInfoDO.setIsWritePartnerKnow(0);
hyPartnerUserInfoDAO.insertSelective(hyPartnerUserInfoDO);
}
HyPartnerUserPlatformBindDO hyPartnerUserPlatformBindDO = hyPartnerUserPlatformBindDAO.getByPlatformTypeAndUserId(UserPlatformTypeEnum.WECHAT.getCode(), openid);
HyPartnerUserInfoDO hyPartnerUserInfoDO = null;
// 微信未授权过
if(hyPartnerUserPlatformBindDO == null){
hyPartnerUserInfoDO = hyPartnerUserInfoDAO.selectByMobile(phoneInfoDTO.getPhoneInfo().getPhoneNumber());
if(hyPartnerUserInfoDO == null){
hyPartnerUserInfoDO = new HyPartnerUserInfoDO();
hyPartnerUserInfoDO.setMobile(phoneInfoDTO.getPhoneInfo().getPhoneNumber());
// hyPartnerUserInfoDO.setUsername(phoneInfoDTO.getPhoneInfo().getPhoneNumber());
hyPartnerUserInfoDO.setPartnerId(UUIDUtils.get32UUID());
hyPartnerUserInfoDO.setAcceptAdjustType(0);
hyPartnerUserInfoDO.setIsWritePartnerKnow(0);
hyPartnerUserInfoDAO.insertSelective(hyPartnerUserInfoDO);
}
hyPartnerUserPlatformBindDO = new HyPartnerUserPlatformBindDO();
hyPartnerUserPlatformBindDO.setPlatformType(UserPlatformTypeEnum.WECHAT.getCode());
hyPartnerUserPlatformBindDO.setPlatformUserId(openid);
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);
}else {
hyPartnerUserInfoDO = hyPartnerUserInfoDAO.selectByPartnerId(hyPartnerUserPlatformBindDO.getPartnerId());
}
BeanUtil.copyProperties(hyPartnerUserInfoDO, userInfoVO);
HyPartnerLineInfoDO lineInfoDO = hyPartnerLineInfoDAO.getByPartnerId(hyPartnerUserInfoDO.getPartnerId());
@@ -158,6 +159,8 @@ public class WechatMiniAppServiceImpl implements WechatMiniAppService {
}
oldUserInfo.setMobile(newMobile);
hyPartnerUserInfoDAO.updateByPrimaryKeySelective(oldUserInfo);
//修改意向申请信息中的手机号
hyPartnerBaseInfoDAO.updateByPartnerId(null, newMobile, oldUserInfo.getPartnerId());
}
return newMobile;
}
@@ -171,18 +174,19 @@ public class WechatMiniAppServiceImpl implements WechatMiniAppService {
userInfoVO.setPartnerId("");
return userInfoVO;
}
HyPartnerUserInfoDO hyPartnerUserInfoDO = hyPartnerUserInfoDAO.selectByMobile(mobile);
BeanUtil.copyProperties(hyPartnerUserInfoDO, userInfoVO);
HyPartnerUserPlatformBindDO hyPartnerUserPlatformBindDO = hyPartnerUserPlatformBindDAO.getByPartnerId(hyPartnerUserInfoDO.getPartnerId());
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());
}
HyPartnerLineInfoDO lineInfoDO = hyPartnerLineInfoDAO.getByPartnerId(hyPartnerUserInfoDO.getPartnerId());
if (lineInfoDO != null){
userInfoVO.setPartnerLineId(lineInfoDO.getId());
HyPartnerUserPlatformBindDO hyPartnerUserPlatformBindDO = hyPartnerUserPlatformBindDAO.getByPlatformTypeAndUserId(UserPlatformTypeEnum.WECHAT.getCode(), openId);
if(hyPartnerUserPlatformBindDO != null){
HyPartnerUserInfoDO hyPartnerUserInfoDO = hyPartnerUserInfoDAO.selectByPartnerId(hyPartnerUserPlatformBindDO.getPartnerId());
BeanUtil.copyProperties(hyPartnerUserInfoDO, userInfoVO);
userInfoVO.setOpenid(hyPartnerUserPlatformBindDO.getPlatformUserId());
if(StringUtils.isNotBlank(hyPartnerUserInfoDO.getWantShopArea())){
HyOpenAreaInfoDO hyOpenAreaInfoDO = hyOpenAreaInfoDAO.selectById(Long.valueOf(hyPartnerUserInfoDO.getWantShopArea()));
userInfoVO.setWantShopAreaName(hyOpenAreaInfoDO.getAreaPath().replace("/", " ").trim());
}
HyPartnerLineInfoDO lineInfoDO = hyPartnerLineInfoDAO.getByPartnerId(hyPartnerUserInfoDO.getPartnerId());
if (lineInfoDO != null){
userInfoVO.setPartnerLineId(lineInfoDO.getId());
}
}
return userInfoVO;
}