From 1a960a907b85dd6c78c78f0cc179d9afb52d9102 Mon Sep 17 00:00:00 2001 From: zhangchenbiao Date: Sun, 7 Apr 2024 19:33:14 +0800 Subject: [PATCH] update --- .../request/InterviewUploadVideoRequest.java | 28 +++++++++++++++++++ .../impl/LineInterviewServiceImpl.java | 2 +- .../webb/PCLineInterviewController.java | 11 ++++---- 3 files changed, 35 insertions(+), 6 deletions(-) create mode 100644 coolstore-partner-model/src/main/java/com/cool/store/request/InterviewUploadVideoRequest.java diff --git a/coolstore-partner-model/src/main/java/com/cool/store/request/InterviewUploadVideoRequest.java b/coolstore-partner-model/src/main/java/com/cool/store/request/InterviewUploadVideoRequest.java new file mode 100644 index 000000000..d4dbb967e --- /dev/null +++ b/coolstore-partner-model/src/main/java/com/cool/store/request/InterviewUploadVideoRequest.java @@ -0,0 +1,28 @@ +package com.cool.store.request; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotNull; +import java.util.List; + +/** + * @author zhangchenbiao + * @FileName: InterviewUploadVideoRequest + * @Description: + * @date 2024-04-07 19:31 + */ +@Data +public class InterviewUploadVideoRequest { + + @NotNull + @ApiModelProperty("面试id") + private Long interviewId; + + @NotNull + @NotBlank + @ApiModelProperty("视频链接") + private List videoUrlList; + +} diff --git a/coolstore-partner-service/src/main/java/com/cool/store/service/impl/LineInterviewServiceImpl.java b/coolstore-partner-service/src/main/java/com/cool/store/service/impl/LineInterviewServiceImpl.java index 34c8a4d1e..9c3c284e1 100644 --- a/coolstore-partner-service/src/main/java/com/cool/store/service/impl/LineInterviewServiceImpl.java +++ b/coolstore-partner-service/src/main/java/com/cool/store/service/impl/LineInterviewServiceImpl.java @@ -99,7 +99,7 @@ public class LineInterviewServiceImpl extends LineFlowService implements LineInt throw new ServiceException(ErrorCodeEnum.PARAMS_VALIDATE_ERROR); } List resultList = new ArrayList<>(); - while (appointmentEndDate.isAfter(appointmentStartDate)){ + while (appointmentEndDate.isAfter(appointmentStartDate) || appointmentStartDate.equals(appointmentEndDate)){ List appointmentTime = getAppointmentTime(lineId, interviewType, appointmentStartDate); AppointmentTimeListVO appointmentTimeList = new AppointmentTimeListVO(appointmentStartDate.toString(), appointmentStartDate.getDayOfWeek().getValue(), appointmentTime); resultList.add(appointmentTimeList); diff --git a/coolstore-partner-web/src/main/java/com/cool/store/controller/webb/PCLineInterviewController.java b/coolstore-partner-web/src/main/java/com/cool/store/controller/webb/PCLineInterviewController.java index 36324525b..630f16eda 100644 --- a/coolstore-partner-web/src/main/java/com/cool/store/controller/webb/PCLineInterviewController.java +++ b/coolstore-partner-web/src/main/java/com/cool/store/controller/webb/PCLineInterviewController.java @@ -4,6 +4,7 @@ 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.InterviewUploadVideoRequest; import com.cool.store.request.LineInterviewPageRequest; import com.cool.store.request.ModifyInterviewerRequest; import com.cool.store.response.ResponseResult; @@ -92,21 +93,21 @@ public class PCLineInterviewController { @ApiOperation("结束面试") @GetMapping("/finish") - public ResponseResult finishInterview(@RequestParam("interviewId")Long interviewId) throws ApiException { + public ResponseResult finishInterview(@RequestParam("interviewId")Long interviewId) { String userId = CurrentUserHolder.getUserId(); lineInterviewService.finishInterview(interviewId, userId); return ResponseResult.success(); } @ApiOperation("上传文件") - @GetMapping("/upload/video") - public ResponseResult uploadVideo(@RequestParam("interviewId")Long interviewId, @RequestParam("videoUrlList") List videoUrlList) throws ApiException { - return ResponseResult.success(lineInterviewService.uploadVideo(interviewId, videoUrlList)); + @PostMapping("/upload/video") + public ResponseResult uploadVideo(@RequestBody @Validated InterviewUploadVideoRequest request) { + return ResponseResult.success(lineInterviewService.uploadVideo(request.getInterviewId(), request.getVideoUrlList())); } @ApiOperation("重新面审") @GetMapping("/reappointment") - public ResponseResult reappointment(@RequestParam("lineId")Long lineId) throws ApiException { + public ResponseResult reappointment(@RequestParam("lineId")Long lineId) { return ResponseResult.success(lineInterviewService.reappointment(lineId)); } }