Merge remote-tracking branch 'origin/cc_20230520_partner' into cc_20230520_partner
This commit is contained in:
@@ -105,6 +105,20 @@
|
||||
<orderEntry type="library" name="Maven: com.google.code.gson:gson:2.8.6" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.codehaus.groovy:groovy:2.5.10" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.aliyun:dytnsapi20200217:1.0.28" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.aliyun:ocr20191230:1.0.26" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.aliyun:openplatform20191219:5.0.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.aliyun:oss-client:3.0.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.aliyun:tea-xml:0.1.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.aliyun:tea-rpc-util:0.1.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: dom4j:dom4j:1.6.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.aliyun:tea-rpc:0.1.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.aliyun:oss-util:1.0.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.dom4j:dom4j:2.1.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.aliyun:tea-fileform:0.0.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.aliyun:darabonba-array:0.1.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.aliyun:darabonba-number:0.0.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.aspectj:aspectjrt:1.9.5" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.aspectj:aspectjweaver:1.9.5" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-web:2.2.6.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-json:2.2.6.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-databind:2.10.3" level="project" />
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.cool.store.config;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.cool.store.constants.CommonConstants;
|
||||
import com.cool.store.context.PartnerUserHolder;
|
||||
import com.cool.store.enums.ErrorCodeEnum;
|
||||
import com.cool.store.response.ResponseResult;
|
||||
@@ -9,9 +10,11 @@ import com.cool.store.service.WechatMiniAppService;
|
||||
import com.cool.store.utils.AesUtil;
|
||||
import com.cool.store.utils.Md5Utils;
|
||||
import com.cool.store.utils.Sha1Utils;
|
||||
import com.cool.store.utils.UUIDUtils;
|
||||
import com.cool.store.vo.PartnerUserInfoVO;
|
||||
import com.google.common.collect.Lists;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.slf4j.MDC;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.core.annotation.Order;
|
||||
import org.springframework.http.HttpStatus;
|
||||
@@ -46,7 +49,9 @@ public class SignValidateFilter implements Filter {
|
||||
|
||||
private static List<String> patternList =
|
||||
Lists.newArrayList("/web/check/ok","/check/ok",
|
||||
"/partner/mini/program/doc.html","/partner/mini/program/v2/api-docs","/**/test/**","/partner/pc/feiShuLogin","/partner/pc/oss/getUploadFileConfig",
|
||||
"/partner/mini/program/doc.html","/partner/mini/program/v2/api-docs","/**/test/**",
|
||||
"/partner/mini/program/oss/getUploadFileConfig",
|
||||
"/partner/mini/program/v1/partnerManage/partner/getIdentityCardInfo",
|
||||
"/**/swagger*/**", "/**/webjars/**");
|
||||
|
||||
|
||||
@@ -73,6 +78,7 @@ public class SignValidateFilter implements Filter {
|
||||
|
||||
@Override
|
||||
public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException {
|
||||
MDC.put(CommonConstants.REQUEST_ID, UUIDUtils.get32UUID());
|
||||
HttpServletResponse response = (HttpServletResponse) servletResponse;
|
||||
HttpServletRequest request = (HttpServletRequest) servletRequest;
|
||||
String uri = request.getRequestURI();
|
||||
@@ -101,8 +107,7 @@ public class SignValidateFilter implements Filter {
|
||||
// 前后端验签不等
|
||||
if (!newSign.equals(sign)) {
|
||||
response.setStatus(HttpStatus.OK.value());
|
||||
response.getWriter().write(JSON.toJSONString(
|
||||
ResponseResult.fail(ErrorCodeEnum.SIGN_FAIL)));
|
||||
response.getWriter().write(JSON.toJSONString(ResponseResult.fail(ErrorCodeEnum.SIGN_FAIL)));
|
||||
return;
|
||||
}
|
||||
PartnerUserInfoVO partnerUserInfoVO = wechatMiniAppService.getUserInfo(phone, openid);
|
||||
@@ -116,6 +121,7 @@ public class SignValidateFilter implements Filter {
|
||||
filterChain.doFilter(servletRequest, servletResponse);
|
||||
} finally {
|
||||
PartnerUserHolder.removeUser();
|
||||
MDC.clear();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,14 +1,20 @@
|
||||
package com.cool.store.controller;
|
||||
|
||||
import com.cool.store.context.PartnerUserHolder;
|
||||
import com.cool.store.enums.ErrorCodeEnum;
|
||||
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.vo.*;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import com.cool.store.vo.cuser.IdentityCardInfoVO;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
@@ -34,7 +40,18 @@ public class PartnerController {
|
||||
private PartnerUserInfoService partnerUserInfoService;
|
||||
|
||||
@Resource
|
||||
HyPartnerIntentInfoService hyPartnerIntentInfoService;
|
||||
private HyPartnerIntentInfoService hyPartnerIntentInfoService;
|
||||
|
||||
@Resource
|
||||
private AliyunService aliyunService;
|
||||
|
||||
@Resource
|
||||
private HyPartnerBaseInfoService hyPartnerBaseInfoService;
|
||||
@Resource
|
||||
private HyPartnerClerkService hyPartnerClerkService;
|
||||
|
||||
|
||||
|
||||
|
||||
@PostMapping(path = "/applyBaseInfo")
|
||||
@ApiOperation("提交基本信息")
|
||||
@@ -79,26 +96,24 @@ public class PartnerController {
|
||||
|
||||
@PostMapping(path = "/submitPartnerBaseInfo")
|
||||
@ApiOperation("提交加盟商基本信息")
|
||||
public ResponseResult<Boolean> submitPartnerBaseInfo(@RequestBody PartnerBaseInfoRequest PartnerBaseInfoRequest){
|
||||
|
||||
public ResponseResult<Boolean> submitPartnerBaseInfo(@RequestBody PartnerBaseInfoRequest baseInfoRequest){
|
||||
//前提 未提交加盟申请
|
||||
//成功 意向区域变更成功 失败 您已进入意向申请流程,当前不可变更意向区域
|
||||
return ResponseResult.success();
|
||||
return ResponseResult.success(hyPartnerBaseInfoService.submitPartnerBaseInfo(baseInfoRequest));
|
||||
}
|
||||
|
||||
@PostMapping(path = "/submitPartnerClerkInfo")
|
||||
@ApiOperation("提交加盟商店员信息")
|
||||
public ResponseResult<Boolean> submitPartnerClerkInfo(@RequestBody PartnerClerkInfoRequest partnerClerkInfoRequest){
|
||||
|
||||
return ResponseResult.success();
|
||||
return ResponseResult.success(hyPartnerClerkService.submitPartnerClerkInfo(partnerClerkInfoRequest));
|
||||
}
|
||||
|
||||
|
||||
@PostMapping(path = "/submitPartnerIntentInfo")
|
||||
@ApiOperation("提交加盟商意向信息/行业认知")
|
||||
public ResponseResult<Boolean> submitPartnerIntentInfo(@RequestBody PartnerIntentInfoRequest partnerIntentInfoRequest){
|
||||
|
||||
return ResponseResult.success();
|
||||
return ResponseResult.success(hyPartnerIntentInfoService.submitPartnerIntentInfo(partnerIntentInfoRequest));
|
||||
}
|
||||
|
||||
|
||||
@@ -107,7 +122,7 @@ public class PartnerController {
|
||||
@ApiOperation("修改加盟商店员信息")
|
||||
public ResponseResult<Boolean> changePartnerClerkInfo(@RequestBody PartnerClerkInfoRequest partnerClerkInfoRequest){
|
||||
|
||||
return ResponseResult.success();
|
||||
return ResponseResult.success(hyPartnerClerkService.submitPartnerClerkInfo(partnerClerkInfoRequest));
|
||||
}
|
||||
|
||||
|
||||
@@ -115,7 +130,7 @@ public class PartnerController {
|
||||
@ApiOperation("修改加盟商意向信息/行业认知")
|
||||
public ResponseResult<Boolean> changePartnerIntentInfo(@RequestBody PartnerIntentInfoRequest partnerIntentInfoRequest){
|
||||
|
||||
return ResponseResult.success();
|
||||
return ResponseResult.success(hyPartnerIntentInfoService.submitPartnerIntentInfo(partnerIntentInfoRequest));
|
||||
}
|
||||
|
||||
|
||||
@@ -140,9 +155,8 @@ public class PartnerController {
|
||||
@ApiImplicitParam(name = "lineId", value = "线索ID", required = false),
|
||||
})
|
||||
public ResponseResult<PartnerBaseInfoVO> queryPartnerBaseInfo(@RequestParam(value = "lineId",required = false)Long lineId){
|
||||
|
||||
|
||||
return ResponseResult.success();
|
||||
PartnerUserInfoVO userInfoVO = PartnerUserHolder.getUser();
|
||||
return ResponseResult.success(hyPartnerBaseInfoService.queryPartnerBaseInfo(userInfoVO.getPartnerId(), lineId));
|
||||
}
|
||||
|
||||
|
||||
@@ -153,8 +167,8 @@ public class PartnerController {
|
||||
})
|
||||
public ResponseResult<List<PartnerClerkVO>> queryPartnerClerkInfo(@RequestParam(value = "lineId",required = false)Long lineId){
|
||||
|
||||
|
||||
return ResponseResult.success();
|
||||
PartnerUserInfoVO userInfoVO = PartnerUserHolder.getUser();
|
||||
return ResponseResult.success(hyPartnerClerkService.queryPartnerClerkInfo(userInfoVO.getPartnerId(), lineId));
|
||||
}
|
||||
|
||||
|
||||
@@ -165,8 +179,8 @@ public class PartnerController {
|
||||
})
|
||||
public ResponseResult<PartnerIntentInfoVO> queryPartnerIntentInfo(@RequestParam(value = "lineId",required = false)Long lineId){
|
||||
|
||||
|
||||
return ResponseResult.success();
|
||||
PartnerUserInfoVO userInfoVO = PartnerUserHolder.getUser();
|
||||
return ResponseResult.success(hyPartnerIntentInfoService.queryPartnerIntentInfo(userInfoVO.getPartnerId(), lineId));
|
||||
}
|
||||
|
||||
|
||||
@@ -177,10 +191,8 @@ public class PartnerController {
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "partnerId", value = "加盟商ID", required = false),
|
||||
})
|
||||
public ResponseResult<Boolean> completeJoinNotice(@RequestParam(value = "partnerId",required = false)Long partnerId){
|
||||
|
||||
|
||||
return ResponseResult.success();
|
||||
public ResponseResult<Boolean> completeJoinNotice(@RequestParam(value = "partnerId",required = false)String partnerId){
|
||||
return ResponseResult.success(partnerUserInfoService.completeJoinNotice(partnerId));
|
||||
}
|
||||
|
||||
|
||||
@@ -189,10 +201,20 @@ public class PartnerController {
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "partnerId", value = "加盟商ID", required = false),
|
||||
})
|
||||
public ResponseResult<Boolean> queryJoinNotice(@RequestParam(value = "partnerId",required = false)Long partnerId){
|
||||
public ResponseResult<Boolean> queryJoinNotice(@RequestParam(value = "partnerId",required = false)String partnerId){
|
||||
return ResponseResult.success(partnerUserInfoService.queryJoinNotice(partnerId));
|
||||
}
|
||||
|
||||
|
||||
return ResponseResult.success();
|
||||
@GetMapping(path = "/getIdentityCardInfo")
|
||||
@ApiOperation("根据身份证正面解析获取数据")
|
||||
public ResponseResult<IdentityCardInfoVO> getIdentityCardInfo(@RequestParam(value = "faceImageUrl")String faceImageUrl){
|
||||
try {
|
||||
IdentityCardInfoVO identityCardInfo = aliyunService.getIdentityCardInfo(faceImageUrl);
|
||||
return ResponseResult.success(identityCardInfo);
|
||||
} catch (Exception e) {
|
||||
throw new ServiceException(ErrorCodeEnum.IDENTITY_CARD_PARSE_FAIL);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user