Merge remote-tracking branch 'origin/cc_20230520_partner' into cc_20230520_partner

# Conflicts:
#	coolstore-partner-webc/src/main/java/com/cool/store/controller/PartnerController.java
This commit is contained in:
zhangchenbiao
2023-06-16 11:20:08 +08:00
68 changed files with 1245 additions and 211 deletions

View File

@@ -3,25 +3,14 @@ package com.cool.store.controller;
import com.cool.store.dto.partner.EnterInterviewDto;
import com.cool.store.response.ResponseResult;
import com.cool.store.service.PartnerInterviewService;
import com.cool.store.utils.PDFUtils;
import com.cool.store.vo.PartnerEnterInterviewVO;
import com.cool.store.vo.EnterInterviewVO;
import com.cool.store.vo.PartnerInterviewInfoVO;
import com.cool.store.vo.PartnerPassLetterDetailVO;
import com.lowagie.text.Document;
import com.lowagie.text.Image;
import com.lowagie.text.pdf.PdfWriter;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.tomcat.util.http.fileupload.IOUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletResponse;
import java.io.*;
import java.nio.file.Files;
import java.nio.file.Paths;
@Api(tags = "加盟商资格面试")
@RestController
@RequestMapping("interview")
@@ -38,7 +27,7 @@ public class InterviewController {
@PostMapping("/enter")
@ApiOperation("进入面试间")
public ResponseResult<PartnerEnterInterviewVO> enterInterviewRoom(@RequestBody EnterInterviewDto dto) {
public ResponseResult<EnterInterviewVO> enterInterviewRoom(@RequestBody EnterInterviewDto dto) {
return ResponseResult.success(interviewService.enterInterviewRoom(dto));
}

View File

@@ -1,5 +1,6 @@
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;
@@ -8,11 +9,12 @@ 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.cool.store.vo.cuser.IdentityCardInfoVO;
import com.github.pagehelper.PageInfo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
@@ -43,6 +45,14 @@ public class PartnerController {
@Resource
private AliyunService aliyunService;
@Resource
private HyPartnerBaseInfoService hyPartnerBaseInfoService;
@Resource
private HyPartnerClerkService hyPartnerClerkService;
@PostMapping(path = "/applyBaseInfo")
@ApiOperation("提交基本信息")
public ResponseResult<Boolean> applyBaseInfo(@RequestBody BaseUserInfoRequest baseUserInfoRequest){
@@ -86,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));
}
@@ -114,7 +122,7 @@ public class PartnerController {
@ApiOperation("修改加盟商店员信息")
public ResponseResult<Boolean> changePartnerClerkInfo(@RequestBody PartnerClerkInfoRequest partnerClerkInfoRequest){
return ResponseResult.success();
return ResponseResult.success(hyPartnerClerkService.submitPartnerClerkInfo(partnerClerkInfoRequest));
}
@@ -122,7 +130,7 @@ public class PartnerController {
@ApiOperation("修改加盟商意向信息/行业认知")
public ResponseResult<Boolean> changePartnerIntentInfo(@RequestBody PartnerIntentInfoRequest partnerIntentInfoRequest){
return ResponseResult.success();
return ResponseResult.success(hyPartnerIntentInfoService.submitPartnerIntentInfo(partnerIntentInfoRequest));
}
@@ -147,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));
}
@@ -160,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));
}
@@ -172,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));
}
@@ -184,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));
}
@@ -196,10 +201,8 @@ public class PartnerController {
@ApiImplicitParams({
@ApiImplicitParam(name = "partnerId", value = "加盟商ID", required = false),
})
public ResponseResult<Boolean> queryJoinNotice(@RequestParam(value = "partnerId",required = false)Long partnerId){
return ResponseResult.success();
public ResponseResult<Boolean> queryJoinNotice(@RequestParam(value = "partnerId",required = false)String partnerId){
return ResponseResult.success(partnerUserInfoService.queryJoinNotice(partnerId));
}