意向基本信息
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
package com.cool.store.config;
|
||||
|
||||
import org.springframework.core.annotation.Order;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import javax.servlet.*;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.io.IOException;
|
||||
@@ -10,6 +13,8 @@ import java.io.IOException;
|
||||
* @Date: 2022-6-12 10:35
|
||||
* @Description:
|
||||
*/
|
||||
@Component
|
||||
@Order(2)
|
||||
public class BodyWrapperFilter implements Filter {
|
||||
@Override
|
||||
public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException {
|
||||
|
||||
@@ -1,29 +0,0 @@
|
||||
package com.cool.store.config;
|
||||
|
||||
import org.springframework.boot.web.servlet.FilterRegistrationBean;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
/**
|
||||
* @Author: JCccc
|
||||
* @Date: 2022-6-23 10:52
|
||||
* @Description:
|
||||
*/
|
||||
@Configuration
|
||||
public class WebApplicationConfig {
|
||||
|
||||
@Bean
|
||||
BodyWrapperFilter getBodyWrapperFilter(){
|
||||
return new BodyWrapperFilter();
|
||||
}
|
||||
@Bean("bodyWrapperFilter")
|
||||
public FilterRegistrationBean<BodyWrapperFilter> checkUserFilter(BodyWrapperFilter bodyWrapperFilter) {
|
||||
FilterRegistrationBean<BodyWrapperFilter> registrationBean = new FilterRegistrationBean();
|
||||
registrationBean.setFilter(bodyWrapperFilter);
|
||||
registrationBean.addUrlPatterns("/*");
|
||||
registrationBean.setOrder(1);
|
||||
registrationBean.setAsyncSupported(true);
|
||||
return registrationBean;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -4,11 +4,9 @@ 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.enums.WorkflowStatusEnum;
|
||||
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.request.*;
|
||||
import com.cool.store.response.ResponseResult;
|
||||
import com.cool.store.service.*;
|
||||
import com.cool.store.utils.RedisUtilPool;
|
||||
@@ -54,9 +52,9 @@ public class PartnerController {
|
||||
|
||||
|
||||
@PostMapping(path = "/applyBaseInfo")
|
||||
@ApiOperation("提交基本信息")
|
||||
public ResponseResult<Boolean> applyBaseInfo(@RequestBody BaseUserInfoRequest baseUserInfoRequest){
|
||||
return ResponseResult.success(hyPartnerIntentInfoService.updatePartnerIntentInfo(baseUserInfoRequest));
|
||||
@ApiOperation("提交加盟商基本信息")
|
||||
public ResponseResult<Boolean> applyBaseInfo(@RequestBody PartnerUserInfoRequest partnerUserInfoRequest){
|
||||
return ResponseResult.success(partnerUserInfoService.updatePartnerUserInfo(partnerUserInfoRequest));
|
||||
}
|
||||
|
||||
|
||||
@@ -64,8 +62,9 @@ public class PartnerController {
|
||||
@ApiOperation("获取提交意向申请标识 true 已提交 false 未提交")
|
||||
public ResponseResult<Boolean> getSubmitIntentionApplyFlag(){
|
||||
PartnerUserInfoVO userInfoVO = PartnerUserHolder.getUser();
|
||||
|
||||
return ResponseResult.success();
|
||||
PartnerBaseInfoVO partnerBaseInfoVO = hyPartnerBaseInfoService.queryPartnerBaseInfo(userInfoVO.getPartnerId(), userInfoVO.getPartnerLineId());
|
||||
Boolean submitFlag = partnerBaseInfoVO.getStatus() > Integer.valueOf(WorkflowStatusEnum.INTENT_0.getCode());
|
||||
return ResponseResult.success(submitFlag);
|
||||
}
|
||||
|
||||
|
||||
@@ -77,7 +76,7 @@ public class PartnerController {
|
||||
public ResponseResult<Boolean> getLineByIdCard(@RequestParam(value = "idCard",required = false)String idCard){
|
||||
|
||||
Long lineId = hyPartnerBaseInfoService.getLineIdByIdCard(idCard);
|
||||
return ResponseResult.success(lineId != null);
|
||||
return ResponseResult.success(lineId != null && lineId > 0L);
|
||||
}
|
||||
|
||||
|
||||
@@ -90,12 +89,12 @@ public class PartnerController {
|
||||
public ResponseResult<Boolean> changeBinding(@RequestParam(value = "idCard",required = false)String idCard,
|
||||
@RequestParam(value = "lineId",required = false)Long lineId){
|
||||
|
||||
return ResponseResult.success();
|
||||
return ResponseResult.success(hyPartnerBaseInfoService.changeBinding(idCard, lineId));
|
||||
}
|
||||
|
||||
|
||||
@PostMapping(path = "/submitPartnerBaseInfo")
|
||||
@ApiOperation("提交加盟商基本信息")
|
||||
@ApiOperation("提交意向书基本信息")
|
||||
public ResponseResult<Boolean> submitPartnerBaseInfo(@RequestBody PartnerBaseInfoRequest baseInfoRequest){
|
||||
//前提 未提交加盟申请
|
||||
//成功 意向区域变更成功 失败 您已进入意向申请流程,当前不可变更意向区域
|
||||
@@ -103,7 +102,7 @@ public class PartnerController {
|
||||
}
|
||||
|
||||
@PostMapping(path = "/submitPartnerClerkInfo")
|
||||
@ApiOperation("提交加盟商店员信息")
|
||||
@ApiOperation("提交意向书店员信息")
|
||||
public ResponseResult<Boolean> submitPartnerClerkInfo(@RequestBody PartnerClerkInfoRequest partnerClerkInfoRequest){
|
||||
|
||||
return ResponseResult.success(hyPartnerClerkService.submitPartnerClerkInfo(partnerClerkInfoRequest));
|
||||
@@ -111,7 +110,7 @@ public class PartnerController {
|
||||
|
||||
|
||||
@PostMapping(path = "/submitPartnerIntentInfo")
|
||||
@ApiOperation("提交加盟商意向信息/行业认知")
|
||||
@ApiOperation("提意向书意向信息/行业认知")
|
||||
public ResponseResult<Boolean> submitPartnerIntentInfo(@RequestBody PartnerIntentInfoRequest partnerIntentInfoRequest){
|
||||
return ResponseResult.success(hyPartnerIntentInfoService.submitPartnerIntentInfo(partnerIntentInfoRequest));
|
||||
}
|
||||
@@ -119,7 +118,7 @@ public class PartnerController {
|
||||
|
||||
|
||||
@PostMapping(path = "/changePartnerClerkInfo")
|
||||
@ApiOperation("修改加盟商店员信息")
|
||||
@ApiOperation("修改意向书店员信息")
|
||||
public ResponseResult<Boolean> changePartnerClerkInfo(@RequestBody PartnerClerkInfoRequest partnerClerkInfoRequest){
|
||||
|
||||
return ResponseResult.success(hyPartnerClerkService.submitPartnerClerkInfo(partnerClerkInfoRequest));
|
||||
@@ -127,7 +126,7 @@ public class PartnerController {
|
||||
|
||||
|
||||
@PostMapping(path = "/changePartnerIntentInfo")
|
||||
@ApiOperation("修改加盟商意向信息/行业认知")
|
||||
@ApiOperation("修改意向书意向信息/行业认知")
|
||||
public ResponseResult<Boolean> changePartnerIntentInfo(@RequestBody PartnerIntentInfoRequest partnerIntentInfoRequest){
|
||||
|
||||
return ResponseResult.success(hyPartnerIntentInfoService.submitPartnerIntentInfo(partnerIntentInfoRequest));
|
||||
@@ -158,8 +157,7 @@ public class PartnerController {
|
||||
@ApiImplicitParam(name = "lineId", value = "线索ID", required = false),
|
||||
})
|
||||
public ResponseResult<PartnerBaseInfoVO> queryPartnerBaseInfo(@RequestParam(value = "lineId",required = false)Long lineId){
|
||||
PartnerUserInfoVO userInfoVO = PartnerUserHolder.getUser();
|
||||
return ResponseResult.success(hyPartnerBaseInfoService.queryPartnerBaseInfo(userInfoVO.getPartnerId(), lineId));
|
||||
return ResponseResult.success(hyPartnerBaseInfoService.getByPartnerLineId(lineId));
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user