公共处理
This commit is contained in:
@@ -0,0 +1,73 @@
|
||||
package com.cool.store.controller.webb;
|
||||
|
||||
import com.cool.store.dao.LineInfoDAO;
|
||||
import com.cool.store.entity.LineInfoDO;
|
||||
import com.cool.store.request.AuditPassRequest;
|
||||
import com.cool.store.request.AuditRejectRequest;
|
||||
import com.cool.store.response.ResponseResult;
|
||||
import com.cool.store.service.LineFlowService;
|
||||
import com.cool.store.service.impl.LineInterviewServiceImpl;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.ApplicationContext;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* @author zhangchenbiao
|
||||
* @FileName: LineOperationController
|
||||
* @Description:
|
||||
* @date 2024-03-20 14:20
|
||||
*/
|
||||
@Api(tags = "线索审核")
|
||||
@RestController
|
||||
@RequestMapping({"/audit"})
|
||||
public class LineAuditController {
|
||||
|
||||
private LineFlowService lineFlowService;
|
||||
@Resource
|
||||
private LineInfoDAO lineInfoDAO;
|
||||
@Autowired
|
||||
private ApplicationContext applicationContext;
|
||||
|
||||
@ApiOperation("审核通过")
|
||||
@PostMapping("/pass")
|
||||
public ResponseResult<Boolean> auditPass(@RequestBody AuditPassRequest request){
|
||||
LineInfoDO lineInfo = lineInfoDAO.getLineInfo(request.getLineId());
|
||||
initLineFlowService(lineInfo);
|
||||
return ResponseResult.success(lineFlowService.auditPass(lineInfo, request));
|
||||
}
|
||||
|
||||
@ApiOperation("审核拒绝")
|
||||
@PostMapping("/reject")
|
||||
public ResponseResult<Boolean> auditReject(@RequestBody AuditRejectRequest request){
|
||||
LineInfoDO lineInfo = lineInfoDAO.getLineInfo(request.getLineId());
|
||||
initLineFlowService(lineInfo);
|
||||
return ResponseResult.success(lineFlowService.auditReject(lineInfo, request));
|
||||
}
|
||||
|
||||
@ApiOperation("结束跟进")
|
||||
@PostMapping("/close")
|
||||
public ResponseResult<Boolean> auditClose(@RequestBody AuditRejectRequest request){
|
||||
LineInfoDO lineInfo = lineInfoDAO.getLineInfo(request.getLineId());
|
||||
initLineFlowService(lineInfo);
|
||||
return ResponseResult.success(lineFlowService.auditClose(lineInfo, request));
|
||||
}
|
||||
|
||||
|
||||
private void initLineFlowService(LineInfoDO lineInfo){
|
||||
Integer workflowSubStage = lineInfo.getWorkflowSubStage();
|
||||
if(workflowSubStage == 1){
|
||||
this.lineFlowService = (LineFlowService)applicationContext.getBean(LineInterviewServiceImpl.class);
|
||||
}else{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -2,27 +2,22 @@ package com.cool.store.controller.webb;
|
||||
|
||||
import com.cool.store.context.CurrentUserHolder;
|
||||
import com.cool.store.enums.InterviewUserTypeEnum;
|
||||
import com.cool.store.exception.ApiException;
|
||||
import com.cool.store.request.AppointmentTimeRequest;
|
||||
import com.cool.store.request.LineInterviewPageRequest;
|
||||
import com.cool.store.request.ModifyInterviewerRequest;
|
||||
import com.cool.store.response.ResponseResult;
|
||||
import com.cool.store.service.LineInterviewService;
|
||||
import com.cool.store.vo.interview.AppointmentTimeVO;
|
||||
import com.cool.store.vo.interview.EnterInterviewVO;
|
||||
import com.cool.store.vo.interview.LineInterviewPageVO;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.time.LocalDate;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author zhangchenbiao
|
||||
@@ -32,7 +27,7 @@ import java.util.List;
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/pc/interview/")
|
||||
@Api(tags = "PC端面试&面谈")
|
||||
@Api(tags = "PC端-面试&面谈")
|
||||
@Slf4j
|
||||
public class PCLineInterviewController {
|
||||
|
||||
@@ -46,21 +41,29 @@ public class PCLineInterviewController {
|
||||
}
|
||||
|
||||
@ApiOperation("修改面试官")
|
||||
@PostMapping("/interviewer/modify")
|
||||
@PostMapping("/modify")
|
||||
public ResponseResult<Boolean> modifyInterviewer(@RequestBody @Validated ModifyInterviewerRequest request) {
|
||||
return ResponseResult.success(lineInterviewService.modifyInterviewer(request));
|
||||
}
|
||||
|
||||
@ApiOperation("面试列表")
|
||||
@PostMapping("/interviewer/page")
|
||||
@PostMapping("/page")
|
||||
public ResponseResult<PageInfo<LineInterviewPageVO>> getInterviewerPage(@RequestBody LineInterviewPageRequest request) {
|
||||
return ResponseResult.success(lineInterviewService.getInterviewerPage(request));
|
||||
}
|
||||
|
||||
@ApiOperation("进入房间")
|
||||
@GetMapping("/interviewer/room/enter")
|
||||
@GetMapping("/room/enter")
|
||||
public ResponseResult<EnterInterviewVO> enterInterviewRoom(@RequestParam("interviewId")Long interviewId) {
|
||||
String userId = CurrentUserHolder.getUserId();
|
||||
return ResponseResult.success(lineInterviewService.enterInterviewRoom(interviewId, userId, InterviewUserTypeEnum.INTERVIEWER));
|
||||
}
|
||||
|
||||
@GetMapping("/finish")
|
||||
@ApiOperation("结束面试")
|
||||
public ResponseResult finishInterview(@RequestParam("interviewId")Long interviewId) throws ApiException {
|
||||
String userId = CurrentUserHolder.getUserId();
|
||||
lineInterviewService.finishInterview(interviewId, userId);
|
||||
return ResponseResult.success();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,15 +3,11 @@ package com.cool.store.controller.webc;
|
||||
import com.cool.store.context.PartnerUserHolder;
|
||||
import com.cool.store.enums.InterviewUserTypeEnum;
|
||||
import com.cool.store.request.AppointmentTimeRequest;
|
||||
import com.cool.store.request.LineInterviewPageRequest;
|
||||
import com.cool.store.request.ModifyInterviewerRequest;
|
||||
import com.cool.store.response.ResponseResult;
|
||||
import com.cool.store.service.LineInterviewService;
|
||||
import com.cool.store.vo.PartnerUserInfoVO;
|
||||
import com.cool.store.vo.interview.AppointmentTimeVO;
|
||||
import com.cool.store.vo.interview.EnterInterviewVO;
|
||||
import com.cool.store.vo.interview.LineInterviewPageVO;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
@@ -33,7 +29,7 @@ import java.util.List;
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/interview")
|
||||
@Api(tags = "加盟商端面试&面谈")
|
||||
@Api(tags = "加盟商端-面试&面谈")
|
||||
@Slf4j
|
||||
public class LineInterviewController {
|
||||
|
||||
@@ -60,7 +56,7 @@ public class LineInterviewController {
|
||||
}
|
||||
|
||||
@ApiOperation("进入房间")
|
||||
@GetMapping("/interviewer/room/enter")
|
||||
@GetMapping("/room/enter")
|
||||
public ResponseResult<EnterInterviewVO> enterInterviewRoom(@RequestParam("interviewId")Long interviewId) {
|
||||
PartnerUserInfoVO partnerUser = PartnerUserHolder.getUser();
|
||||
return ResponseResult.success(lineInterviewService.enterInterviewRoom(interviewId, partnerUser.getPartnerId(), InterviewUserTypeEnum.LINE));
|
||||
|
||||
Reference in New Issue
Block a user