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

This commit is contained in:
zhangchenbiao
2023-06-26 16:15:30 +08:00
7 changed files with 43 additions and 32 deletions

View File

@@ -410,6 +410,7 @@
select select
a.id as lineId, a.id as lineId,
a.create_time as createTime, a.create_time as createTime,
a.update_time as updateTime,
b.partner_id as partner_id, b.partner_id as partner_id,
b.mobile as mobile, b.mobile as mobile,
b.username as userName, b.username as userName,
@@ -437,6 +438,7 @@
#{userId} #{userId}
</foreach> </foreach>
</if> </if>
order by a.create_time desc
</select> </select>
@@ -517,7 +519,7 @@
#{developmentManager} #{developmentManager}
</foreach> </foreach>
</if> </if>
order by hpli.update_time desc
</select> </select>

View File

@@ -25,4 +25,6 @@ public class PublicSeaLineDTO {
private String wantShopArea; private String wantShopArea;
private String acceptAdjustType; private String acceptAdjustType;
private Date updateTime;
} }

View File

@@ -69,4 +69,6 @@ public class PublicSeaLineListVo {
private String acceptAdjustType; private String acceptAdjustType;
private String updateTime;
} }

View File

@@ -154,7 +154,7 @@ public class HyPartnerInterviewPlanServiceImpl implements HyPartnerInterviewPlan
List<PartnerInterviewInfoVO> result = new ArrayList<>(); List<PartnerInterviewInfoVO> result = new ArrayList<>();
list.stream().forEach(x->{ list.stream().forEach(x->{
PartnerInterviewInfoVO partnerInterviewInfoVO = convertPartnerInterviewInfoDTOToVo(x); PartnerInterviewInfoVO partnerInterviewInfoVO = convertPartnerInterviewInfoDTOToVo(x);
partnerInterviewInfoVO.setPartnerPhone(userNameMap.getOrDefault(x.getPartnerId(),new HyPartnerUserInfoDO()).getUsername()); partnerInterviewInfoVO.setPartnerName(userNameMap.getOrDefault(x.getPartnerId(),new HyPartnerUserInfoDO()).getUsername());
partnerInterviewInfoVO.setPartnerPhone(userNameMap.getOrDefault(x.getPartnerId(),new HyPartnerUserInfoDO()).getMobile()); partnerInterviewInfoVO.setPartnerPhone(userNameMap.getOrDefault(x.getPartnerId(),new HyPartnerUserInfoDO()).getMobile());
partnerInterviewInfoVO.setLineStatus(hyPartnerLineInfoDOMap.getOrDefault(x.getPartnerLineId(),new HyPartnerLineInfoDO()).getLineStatus()); partnerInterviewInfoVO.setLineStatus(hyPartnerLineInfoDOMap.getOrDefault(x.getPartnerLineId(),new HyPartnerLineInfoDO()).getLineStatus());
partnerInterviewInfoVO.setLineId(hyPartnerLineInfoDOMap.getOrDefault(x.getPartnerLineId(),new HyPartnerLineInfoDO()).getId()); partnerInterviewInfoVO.setLineId(hyPartnerLineInfoDOMap.getOrDefault(x.getPartnerLineId(),new HyPartnerLineInfoDO()).getId());

View File

@@ -353,6 +353,7 @@ public class HyPartnerLineInfoServiceImpl implements HyPartnerLineInfoService {
DescribePhoneNumberDTO phoneNumberAttribute = aliyunService.getPhoneNumberAttribute(x.getMobile()); DescribePhoneNumberDTO phoneNumberAttribute = aliyunService.getPhoneNumberAttribute(x.getMobile());
publicSeaLineListVo.setPhoneAddress(phoneNumberAttribute.getCity()); publicSeaLineListVo.setPhoneAddress(phoneNumberAttribute.getCity());
publicSeaLineListVo.setWantShopArea(x.getWantShopArea()); publicSeaLineListVo.setWantShopArea(x.getWantShopArea());
publicSeaLineListVo.setUpdateTime(DateUtil.format(x.getUpdateTime(),CoolDateUtils.DATE_FORMAT_SEC));
publicSeaLineListVo.setId(x.getLineId()); publicSeaLineListVo.setId(x.getLineId());
publicSeaLineListVo.setAcceptAdjustType(x.getAcceptAdjustType()); publicSeaLineListVo.setAcceptAdjustType(x.getAcceptAdjustType());
publicSeaLineListVo.setFollowCount(countMap.getOrDefault(x.getPartnerId(),0)); publicSeaLineListVo.setFollowCount(countMap.getOrDefault(x.getPartnerId(),0));

View File

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

View File

@@ -48,7 +48,7 @@ public class TokenValidateFilter implements Filter {
//腾讯音视频回调,单独做验签 //腾讯音视频回调,单独做验签
"/partner/pc/video/**", "/partner/pc/video/**",
//TODO 800回调地址暂时不做验证 //TODO 800回调地址暂时不做验证
"/qualificationReview/callback"); "/partner/pc/flow/qualificationReview/callback");
/** /**