意向信息

This commit is contained in:
wxp01309236
2023-06-26 19:25:47 +08:00
parent ed03ed189d
commit 21c5478970
3 changed files with 60 additions and 4 deletions

View File

@@ -49,4 +49,9 @@ public interface HyPartnerIntentInfoService {
PartnerIntentInfoVO queryPartnerIntentInfo(PartnerUserInfoVO userInfoVO, Long lineId);
PartnerIntentInfoVO queryWantShopInfo(PartnerUserInfoVO userInfoVO, Long lineId);
PartnerIntentInfoVO queryIndustryCognitionInfo(PartnerUserInfoVO userInfoVO, Long lineId);
}

View File

@@ -245,6 +245,47 @@ public class HyPartnerIntentInfoServiceImpl implements HyPartnerIntentInfoServic
return intentInfoVO;
}
@Override
public PartnerIntentInfoVO queryWantShopInfo(PartnerUserInfoVO userInfoVO, Long lineId) {
String cacheKey = MessageFormat.format(RedisConstant.PARTNER_WANTSHOPINFO_CACHE_KEY, userInfoVO.getPartnerId(), lineId);
if (StringUtils.isNotBlank(redisUtilPool.getString(cacheKey))) {
PartnerIntentInfoVO intentInfoVO = JSONObject.parseObject(redisUtilPool.getString(cacheKey), PartnerIntentInfoVO.class);
return intentInfoVO;
}
HyPartnerIntentInfoDO intentInfoDO = hyPartnerIntentInfoDAO.getByPartnerIdAndLineId(userInfoVO.getPartnerId(), lineId);
PartnerIntentInfoVO intentInfoVO = null;
if (intentInfoDO != null){
intentInfoVO = convertPartnerIntentApplyInfoDOToVO(intentInfoDO);
}else {
intentInfoVO = new PartnerIntentInfoVO();
}
if(StringUtils.isBlank(intentInfoVO.getLiveArea())){
intentInfoVO.setLiveArea(userInfoVO.getLiveArea());
}
if(StringUtils.isBlank(intentInfoVO.getWantShopArea())){
intentInfoVO.setWantShopArea(userInfoVO.getWantShopArea());
}
if(Objects.isNull(intentInfoVO.getAcceptAdjustType())){
intentInfoVO.setAcceptAdjustType(userInfoVO.getAcceptAdjustType());
}
return intentInfoVO;
}
@Override
public PartnerIntentInfoVO queryIndustryCognitionInfo(PartnerUserInfoVO userInfoVO, Long lineId) {
String cacheKey = MessageFormat.format(RedisConstant.PARTNER_INDUSTRYCOGNITIONINFO_CACHE_KEY, userInfoVO.getPartnerId(), lineId);
if (StringUtils.isNotBlank(redisUtilPool.getString(cacheKey))) {
PartnerIntentInfoVO intentInfoVO = JSONObject.parseObject(redisUtilPool.getString(cacheKey), PartnerIntentInfoVO.class);
return intentInfoVO;
}
HyPartnerIntentInfoDO intentInfoDO = hyPartnerIntentInfoDAO.getByPartnerIdAndLineId(userInfoVO.getPartnerId(), lineId);
PartnerIntentInfoVO intentInfoVO = null;
if (intentInfoDO != null){
intentInfoVO = convertPartnerIntentApplyInfoDOToVO(intentInfoDO);
}
return intentInfoVO;
}
private void fillWantShopInfo(HyPartnerIntentInfoDO intentInfoDO, PartnerWantShopInfoRequest request) {
intentInfoDO.setPartnerId(request.getPartnerId());
intentInfoDO.setPartnerLineId(request.getPartnerLineId());