Merge remote-tracking branch 'origin/cc_20230520_partner' into cc_20230520_partner
This commit is contained in:
@@ -1,18 +1,17 @@
|
||||
package com.cool.store.controller;
|
||||
|
||||
import com.cool.store.constants.RedisConstant;
|
||||
import com.cool.store.context.PartnerUserHolder;
|
||||
import com.cool.store.enums.ErrorCodeEnum;
|
||||
import com.cool.store.enums.IDCardSideEnum;
|
||||
import com.cool.store.exception.ServiceException;
|
||||
import com.cool.store.request.BaseUserInfoRequest;
|
||||
import com.cool.store.request.PartnerBaseInfoRequest;
|
||||
import com.cool.store.request.PartnerClerkInfoRequest;
|
||||
import com.cool.store.request.PartnerIntentInfoRequest;
|
||||
import com.cool.store.response.ResponseResult;
|
||||
import com.cool.store.service.AliyunService;
|
||||
import com.cool.store.service.HyPartnerBaseInfoService;
|
||||
import com.cool.store.service.HyPartnerClerkService;
|
||||
import com.cool.store.service.HyPartnerIntentInfoService;
|
||||
import com.cool.store.service.PartnerUserInfoService;
|
||||
import com.cool.store.service.*;
|
||||
import com.cool.store.utils.RedisUtilPool;
|
||||
import com.cool.store.vo.*;
|
||||
import com.cool.store.vo.cuser.IdentityCardInfoVO;
|
||||
import io.swagger.annotations.Api;
|
||||
@@ -23,6 +22,7 @@ import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.text.MessageFormat;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -38,18 +38,18 @@ public class PartnerController {
|
||||
|
||||
@Resource
|
||||
private PartnerUserInfoService partnerUserInfoService;
|
||||
|
||||
@Resource
|
||||
private HyPartnerIntentInfoService hyPartnerIntentInfoService;
|
||||
|
||||
@Resource
|
||||
private AliyunService aliyunService;
|
||||
|
||||
@Resource
|
||||
private HyPartnerBaseInfoService hyPartnerBaseInfoService;
|
||||
@Resource
|
||||
private HyPartnerClerkService hyPartnerClerkService;
|
||||
|
||||
@Resource
|
||||
private HyPartnerLineInfoService hyPartnerLineInfoService;
|
||||
@Resource
|
||||
private RedisUtilPool redisUtilPool;
|
||||
|
||||
|
||||
|
||||
@@ -76,8 +76,8 @@ public class PartnerController {
|
||||
})
|
||||
public ResponseResult<Boolean> getLineByIdCard(@RequestParam(value = "idCard",required = false)String idCard){
|
||||
|
||||
|
||||
return ResponseResult.success();
|
||||
Long lineId = hyPartnerBaseInfoService.getLineIdByIdCard(idCard);
|
||||
return ResponseResult.success(lineId != null);
|
||||
}
|
||||
|
||||
|
||||
@@ -133,18 +133,21 @@ public class PartnerController {
|
||||
return ResponseResult.success(hyPartnerIntentInfoService.submitPartnerIntentInfo(partnerIntentInfoRequest));
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@GetMapping(path = "/getPartnerLineBaseInfo")
|
||||
@ApiOperation("查询加盟商线索详情(适用全部流程) 包括冷静期是否首次登录")
|
||||
@ApiImplicitParams({
|
||||
@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));
|
||||
}
|
||||
|
||||
|
||||
return ResponseResult.success();
|
||||
@PostMapping(path = "/delCoolDownFirstLoginFlag")
|
||||
@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);
|
||||
}
|
||||
|
||||
|
||||
@@ -208,9 +211,9 @@ public class PartnerController {
|
||||
|
||||
@GetMapping(path = "/getIdentityCardInfo")
|
||||
@ApiOperation("根据身份证正面解析获取数据")
|
||||
public ResponseResult<IdentityCardInfoVO> getIdentityCardInfo(@RequestParam(value = "faceImageUrl")String faceImageUrl){
|
||||
public ResponseResult<IdentityCardInfoVO> getIdentityCardInfo(@RequestParam(value = "faceImageUrl")String faceImageUrl, @RequestParam("side")IDCardSideEnum sideEnum){
|
||||
try {
|
||||
IdentityCardInfoVO identityCardInfo = aliyunService.getIdentityCardInfo(faceImageUrl);
|
||||
IdentityCardInfoVO identityCardInfo = aliyunService.getIdentityCardInfo(faceImageUrl, sideEnum);
|
||||
return ResponseResult.success(identityCardInfo);
|
||||
} catch (Exception e) {
|
||||
throw new ServiceException(ErrorCodeEnum.IDENTITY_CARD_PARSE_FAIL);
|
||||
|
||||
Reference in New Issue
Block a user