Merge remote-tracking branch 'origin/cc_20230520_partner' into cc_20230520_partner
This commit is contained in:
@@ -189,6 +189,11 @@ public class RedisConstant {
|
|||||||
|
|
||||||
public static final String STOREWORK_NOTICE_KEY = "storeWorkNoticeCache:{0}:{1}:{2}:{3}";
|
public static final String STOREWORK_NOTICE_KEY = "storeWorkNoticeCache:{0}:{1}:{2}:{3}";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 冷静期内是否首次登录 冷静期首次登录 是-true 否-false
|
||||||
|
*/
|
||||||
|
public static final String COOLINGPERIOD_FIRSTLOGIN_KEY = "coolingPeriodFirstLoginCache:{0}";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 七天
|
* 七天
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -45,4 +45,10 @@ public class HyPartnerBaseInfoDAO {
|
|||||||
return hyPartnerBaseInfoMapper.getByPartnerIdAndLineId(partnerId, partnerLineId);
|
return hyPartnerBaseInfoMapper.getByPartnerIdAndLineId(partnerId, partnerLineId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Long getLineIdByIdCard(String idCard){
|
||||||
|
if (StringUtils.isEmpty(idCard)){
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
return hyPartnerBaseInfoMapper.getLineIdByIdCard(idCard);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -36,4 +36,6 @@ public interface HyPartnerBaseInfoMapper {
|
|||||||
|
|
||||||
HyPartnerBaseInfoDO getByPartnerIdAndLineId(@Param("partnerId") String partnerId, @Param("partnerLineId") Long partnerLineId);
|
HyPartnerBaseInfoDO getByPartnerIdAndLineId(@Param("partnerId") String partnerId, @Param("partnerLineId") Long partnerLineId);
|
||||||
|
|
||||||
|
Long getLineIdByIdCard(@Param("idCard") String idCard);
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -224,4 +224,11 @@
|
|||||||
where partner_id = #{partnerId} and partner_line_id = #{partnerLineId}
|
where partner_id = #{partnerId} and partner_line_id = #{partnerLineId}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="getLineIdByIdCard" resultType="java.lang.Long">
|
||||||
|
select
|
||||||
|
partner_line_id
|
||||||
|
from hy_partner_base_info
|
||||||
|
where id_card = #{idCard}
|
||||||
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
@@ -13,10 +13,16 @@
|
|||||||
<result column="is_write_partner_know" jdbcType="TINYINT" property="isWritePartnerKnow" />
|
<result column="is_write_partner_know" jdbcType="TINYINT" property="isWritePartnerKnow" />
|
||||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
||||||
|
<result column="shop_code" jdbcType="VARCHAR" property="shopCode" />
|
||||||
|
<result column="shop_name" jdbcType="VARCHAR" property="shopName" />
|
||||||
|
<result column="shop_id" jdbcType="VARCHAR" property="shopId" />
|
||||||
|
<result column="recommend_partner_id" jdbcType="VARCHAR" property="recommendPartnerId" />
|
||||||
|
<result column="recommend_partner_name" jdbcType="VARCHAR" property="recommendPartnerName" />
|
||||||
|
<result column="recommend_partner_mobile" jdbcType="VARCHAR" property="recommendPartnerMobile" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
<sql id="Base_Column_List">
|
<sql id="Base_Column_List">
|
||||||
id, partner_id, mobile, username, live_area, want_shop_area, accept_adjust_type,
|
id, partner_id, mobile, username, live_area, want_shop_area, accept_adjust_type,
|
||||||
invite_code, is_write_partner_know, create_time, update_time
|
invite_code, is_write_partner_know, create_time, update_time, shop_code, shop_name, shop_id, recommend_partner_id, recommend_partner_name, recommend_partner_mobile
|
||||||
</sql>
|
</sql>
|
||||||
<select id="selectByPartnerId" resultMap="BaseResultMap" >
|
<select id="selectByPartnerId" resultMap="BaseResultMap" >
|
||||||
select
|
select
|
||||||
|
|||||||
@@ -50,4 +50,22 @@ public class HyPartnerUserInfoDO implements Serializable {
|
|||||||
|
|
||||||
@ApiModelProperty("更新时间")
|
@ApiModelProperty("更新时间")
|
||||||
private Date updateTime;
|
private Date updateTime;
|
||||||
|
|
||||||
|
@ApiModelProperty("店铺编码")
|
||||||
|
private String shopCode;
|
||||||
|
|
||||||
|
@ApiModelProperty("店铺名称")
|
||||||
|
private String shopName;
|
||||||
|
|
||||||
|
@ApiModelProperty("店铺ID")
|
||||||
|
private String shopId;
|
||||||
|
|
||||||
|
@ApiModelProperty("推荐加盟商id")
|
||||||
|
private String recommendPartnerId;
|
||||||
|
|
||||||
|
@ApiModelProperty("推荐加盟商姓名")
|
||||||
|
private String recommendPartnerName;
|
||||||
|
|
||||||
|
@ApiModelProperty("推荐加盟商手机号")
|
||||||
|
private String recommendPartnerMobile;
|
||||||
}
|
}
|
||||||
@@ -22,4 +22,8 @@ public interface HyPartnerBaseInfoService {
|
|||||||
Boolean submitPartnerBaseInfo(PartnerBaseInfoRequest request);
|
Boolean submitPartnerBaseInfo(PartnerBaseInfoRequest request);
|
||||||
|
|
||||||
PartnerBaseInfoVO queryPartnerBaseInfo(String partnerId, Long lineId);
|
PartnerBaseInfoVO queryPartnerBaseInfo(String partnerId, Long lineId);
|
||||||
|
|
||||||
|
Long getLineIdByIdCard(String idCard);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -104,5 +104,7 @@ public interface HyPartnerLineInfoService {
|
|||||||
*/
|
*/
|
||||||
PageInfo<PublicSeaLineListVo> publicSeaLineList(String userId,LineRequest lineRequest);
|
PageInfo<PublicSeaLineListVo> publicSeaLineList(String userId,LineRequest lineRequest);
|
||||||
|
|
||||||
|
PartnerLineBaseInfoVO getPartnerLinBaseInfo(String partnerId);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -67,6 +67,11 @@ public class HyPartnerBaseInfoServiceImpl implements HyPartnerBaseInfoService {
|
|||||||
return baseInfoVO;
|
return baseInfoVO;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Long getLineIdByIdCard(String idCard) {
|
||||||
|
return hyPartnerBaseInfoDAO.getLineIdByIdCard(idCard);
|
||||||
|
}
|
||||||
|
|
||||||
private void fillBaseInfo(HyPartnerBaseInfoDO baseInfoDO, PartnerBaseInfoRequest request) {
|
private void fillBaseInfo(HyPartnerBaseInfoDO baseInfoDO, PartnerBaseInfoRequest request) {
|
||||||
baseInfoDO.setPartnerId(request.getPartnerId());
|
baseInfoDO.setPartnerId(request.getPartnerId());
|
||||||
baseInfoDO.setPartnerLineId(request.getPartnerLineId());
|
baseInfoDO.setPartnerLineId(request.getPartnerLineId());
|
||||||
|
|||||||
@@ -1,7 +1,9 @@
|
|||||||
package com.cool.store.service.impl;
|
package com.cool.store.service.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
import cn.hutool.core.date.DateUtil;
|
import cn.hutool.core.date.DateUtil;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.cool.store.constants.RedisConstant;
|
||||||
import com.cool.store.dao.EnterpriseUserDAO;
|
import com.cool.store.dao.EnterpriseUserDAO;
|
||||||
import com.cool.store.dao.HyPartnerLineInfoDAO;
|
import com.cool.store.dao.HyPartnerLineInfoDAO;
|
||||||
import com.cool.store.dao.HyPartnerUserInfoDAO;
|
import com.cool.store.dao.HyPartnerUserInfoDAO;
|
||||||
@@ -17,19 +19,21 @@ import com.cool.store.enums.WorkflowStatusEnum;
|
|||||||
import com.cool.store.exception.ServiceException;
|
import com.cool.store.exception.ServiceException;
|
||||||
import com.cool.store.request.CloseFollowRequest;
|
import com.cool.store.request.CloseFollowRequest;
|
||||||
import com.cool.store.request.LineRequest;
|
import com.cool.store.request.LineRequest;
|
||||||
import com.cool.store.service.EnterpriseUserService;
|
|
||||||
import com.cool.store.service.HyPartnerLineInfoService;
|
import com.cool.store.service.HyPartnerLineInfoService;
|
||||||
import com.cool.store.utils.CoolDateUtils;
|
import com.cool.store.utils.CoolDateUtils;
|
||||||
|
import com.cool.store.utils.RedisUtilPool;
|
||||||
import com.cool.store.utils.StringUtil;
|
import com.cool.store.utils.StringUtil;
|
||||||
import com.cool.store.vo.*;
|
import com.cool.store.vo.*;
|
||||||
import com.github.pagehelper.PageHelper;
|
import com.github.pagehelper.PageHelper;
|
||||||
import com.github.pagehelper.PageInfo;
|
import com.github.pagehelper.PageInfo;
|
||||||
import com.google.common.collect.Lists;
|
import com.google.common.collect.Lists;
|
||||||
import org.apache.commons.collections4.CollectionUtils;
|
import org.apache.commons.collections4.CollectionUtils;
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.springframework.beans.BeanUtils;
|
import org.springframework.beans.BeanUtils;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
import java.text.MessageFormat;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
@@ -49,6 +53,8 @@ public class HyPartnerLineInfoServiceImpl implements HyPartnerLineInfoService {
|
|||||||
EnterpriseUserDAO enterpriseUserDAO;
|
EnterpriseUserDAO enterpriseUserDAO;
|
||||||
@Resource
|
@Resource
|
||||||
UserRegionMappingDAO userRegionMappingDAO;
|
UserRegionMappingDAO userRegionMappingDAO;
|
||||||
|
@Resource
|
||||||
|
private RedisUtilPool redisUtilPool;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public StageCountVO selectStagePendingCount(String userId) {
|
public StageCountVO selectStagePendingCount(String userId) {
|
||||||
@@ -291,6 +297,18 @@ public class HyPartnerLineInfoServiceImpl implements HyPartnerLineInfoService {
|
|||||||
return publicSeaLineList;
|
return publicSeaLineList;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PartnerLineBaseInfoVO getPartnerLinBaseInfo(String partnerId) {
|
||||||
|
PartnerLineBaseInfoVO lineBaseInfoVO = new PartnerLineBaseInfoVO();
|
||||||
|
// todo wxp 需要加条件
|
||||||
|
HyPartnerLineInfoDO lineInfoDO = hyPartnerLineInfoDAO.getByPartnerId(partnerId);
|
||||||
|
BeanUtil.copyProperties(lineInfoDO, lineBaseInfoVO);
|
||||||
|
String coolingPeriodFirstLoginCacheKey = MessageFormat.format(RedisConstant.COOLINGPERIOD_FIRSTLOGIN_KEY, partnerId);
|
||||||
|
String value = redisUtilPool.getString(coolingPeriodFirstLoginCacheKey);
|
||||||
|
lineBaseInfoVO.setCoolDownFirstLoginFlag(StringUtils.isNotBlank(value));
|
||||||
|
return lineBaseInfoVO;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* convertPartnerBlackListDTOToVo
|
* convertPartnerBlackListDTOToVo
|
||||||
* @param partnerBlackListDTO
|
* @param partnerBlackListDTO
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package com.cool.store.controller;
|
package com.cool.store.controller;
|
||||||
|
|
||||||
|
import com.cool.store.constants.RedisConstant;
|
||||||
import com.cool.store.context.PartnerUserHolder;
|
import com.cool.store.context.PartnerUserHolder;
|
||||||
import com.cool.store.enums.ErrorCodeEnum;
|
import com.cool.store.enums.ErrorCodeEnum;
|
||||||
import com.cool.store.enums.IDCardSideEnum;
|
import com.cool.store.enums.IDCardSideEnum;
|
||||||
@@ -9,11 +10,8 @@ import com.cool.store.request.PartnerBaseInfoRequest;
|
|||||||
import com.cool.store.request.PartnerClerkInfoRequest;
|
import com.cool.store.request.PartnerClerkInfoRequest;
|
||||||
import com.cool.store.request.PartnerIntentInfoRequest;
|
import com.cool.store.request.PartnerIntentInfoRequest;
|
||||||
import com.cool.store.response.ResponseResult;
|
import com.cool.store.response.ResponseResult;
|
||||||
import com.cool.store.service.AliyunService;
|
import com.cool.store.service.*;
|
||||||
import com.cool.store.service.HyPartnerBaseInfoService;
|
import com.cool.store.utils.RedisUtilPool;
|
||||||
import com.cool.store.service.HyPartnerClerkService;
|
|
||||||
import com.cool.store.service.HyPartnerIntentInfoService;
|
|
||||||
import com.cool.store.service.PartnerUserInfoService;
|
|
||||||
import com.cool.store.vo.*;
|
import com.cool.store.vo.*;
|
||||||
import com.cool.store.vo.cuser.IdentityCardInfoVO;
|
import com.cool.store.vo.cuser.IdentityCardInfoVO;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
@@ -24,6 +22,7 @@ import lombok.extern.slf4j.Slf4j;
|
|||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
import java.text.MessageFormat;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -39,18 +38,18 @@ public class PartnerController {
|
|||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private PartnerUserInfoService partnerUserInfoService;
|
private PartnerUserInfoService partnerUserInfoService;
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private HyPartnerIntentInfoService hyPartnerIntentInfoService;
|
private HyPartnerIntentInfoService hyPartnerIntentInfoService;
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private AliyunService aliyunService;
|
private AliyunService aliyunService;
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private HyPartnerBaseInfoService hyPartnerBaseInfoService;
|
private HyPartnerBaseInfoService hyPartnerBaseInfoService;
|
||||||
@Resource
|
@Resource
|
||||||
private HyPartnerClerkService hyPartnerClerkService;
|
private HyPartnerClerkService hyPartnerClerkService;
|
||||||
|
@Resource
|
||||||
|
private HyPartnerLineInfoService hyPartnerLineInfoService;
|
||||||
|
@Resource
|
||||||
|
private RedisUtilPool redisUtilPool;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -77,8 +76,8 @@ public class PartnerController {
|
|||||||
})
|
})
|
||||||
public ResponseResult<Boolean> getLineByIdCard(@RequestParam(value = "idCard",required = false)String idCard){
|
public ResponseResult<Boolean> getLineByIdCard(@RequestParam(value = "idCard",required = false)String idCard){
|
||||||
|
|
||||||
|
Long lineId = hyPartnerBaseInfoService.getLineIdByIdCard(idCard);
|
||||||
return ResponseResult.success();
|
return ResponseResult.success(lineId != null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -134,18 +133,21 @@ public class PartnerController {
|
|||||||
return ResponseResult.success(hyPartnerIntentInfoService.submitPartnerIntentInfo(partnerIntentInfoRequest));
|
return ResponseResult.success(hyPartnerIntentInfoService.submitPartnerIntentInfo(partnerIntentInfoRequest));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@GetMapping(path = "/getPartnerLineBaseInfo")
|
@GetMapping(path = "/getPartnerLineBaseInfo")
|
||||||
@ApiOperation("查询加盟商线索详情(适用全部流程) 包括冷静期是否首次登录")
|
@ApiOperation("查询加盟商线索详情(适用全部流程) 包括冷静期是否首次登录")
|
||||||
@ApiImplicitParams({
|
@ApiImplicitParams({
|
||||||
@ApiImplicitParam(name = "partnerId", value = "C端用户基本信息ID", required = false),
|
@ApiImplicitParam(name = "partnerId", value = "C端用户基本信息ID", required = false),
|
||||||
})
|
})
|
||||||
public ResponseResult<PartnerLineBaseInfoVO> getPartnerLinBaseInfo(@RequestParam(value = "partnerId",required = false)Long partnerId){
|
public ResponseResult<PartnerLineBaseInfoVO> getPartnerLinBaseInfo(@RequestParam(value = "partnerId",required = false)String partnerId){
|
||||||
|
return ResponseResult.success(hyPartnerLineInfoService.getPartnerLinBaseInfo(partnerId));
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping(path = "/delCoolDownFirstLoginFlag")
|
||||||
return ResponseResult.success();
|
@ApiOperation("删除冷静期是否首次登录缓存")
|
||||||
|
public ResponseResult<Boolean> delCoolDownFirstLoginFlag(@RequestParam(value = "partnerId",required = true)String partnerId){
|
||||||
|
String coolingPeriodFirstLoginCacheKey = MessageFormat.format(RedisConstant.COOLINGPERIOD_FIRSTLOGIN_KEY, partnerId);
|
||||||
|
redisUtilPool.delKey(coolingPeriodFirstLoginCacheKey);
|
||||||
|
return ResponseResult.success(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user