From 11ed7b45739349eb07d27bdf6c8e9294b4f238db Mon Sep 17 00:00:00 2001 From: zhangchenbiao Date: Wed, 10 Apr 2024 11:23:13 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=A7=94=E6=89=98=E8=AE=B0?= =?UTF-8?q?=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/LineInterviewServiceImpl.java | 22 +++++++++++-------- 1 file changed, 13 insertions(+), 9 deletions(-) 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 59015a7d7..63c5dd657 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 @@ -9,10 +9,7 @@ import com.cool.store.entity.*; import com.cool.store.enums.*; import com.cool.store.exception.ServiceException; import com.cool.store.request.*; -import com.cool.store.service.LabelService; -import com.cool.store.service.LineInterviewService; -import com.cool.store.service.SysRoleService; -import com.cool.store.service.UserAuthMappingService; +import com.cool.store.service.*; import com.cool.store.utils.TRTCUtils; import com.cool.store.utils.UUIDUtils; import com.cool.store.utils.poi.DateUtils; @@ -70,6 +67,8 @@ public class LineInterviewServiceImpl extends LineFlowService implements LineInt private UserAuthMappingService userAuthMappingService; @Resource private SysRoleService sysRoleService; + @Resource + private TransferLogService transferLogService; @Override public List getAppointmentTime(Long lineId, Integer interviewType, LocalDate appointmentDate) { @@ -202,6 +201,10 @@ public class LineInterviewServiceImpl extends LineFlowService implements LineInt @Override public Boolean modifyInterviewer(ModifyInterviewerRequest request) { + LineInfoDO lineInfo = lineInfoDAO.getLineInfo(request.getLineId()); + if(Objects.isNull(lineInfo)){ + throw new ServiceException(ErrorCodeEnum.LINE_ID_IS_NOT_EXIST); + } InterviewTypeEnum interviewType = InterviewTypeEnum.match(request.getInterviewType()); LineInterviewDO interviewInfo = lineInterviewDAO.getInterviewInfo(request.getLineId(), interviewType); if(Objects.isNull(interviewInfo)){ @@ -213,15 +216,16 @@ public class LineInterviewServiceImpl extends LineFlowService implements LineInt update.setId(interviewInfo.getCalendarsEventId()); update.setInterviewerUserId(request.getInterviewerUserId()); lineCalendarsEventDAO.updateCalendarsEvent(update); - LineInfoDO lineInfo = new LineInfoDO(); - lineInfo.setId(request.getLineId()); + LineInfoDO updateLineInfo = new LineInfoDO(); + updateLineInfo.setId(request.getLineId()); if(InterviewTypeEnum.INTERVIEW.equals(interviewType)){ - lineInfo.setFirstInterviewer(request.getInterviewerUserId()); + updateLineInfo.setFirstInterviewer(request.getInterviewerUserId()); } if(InterviewTypeEnum.SECOND_INTERVIEW.equals(interviewType)){ - lineInfo.setSecondInterviewer(request.getInterviewerUserId()); + updateLineInfo.setSecondInterviewer(request.getInterviewerUserId()); } - lineInfoDAO.updateLineInfo(lineInfo); + lineInfoDAO.updateLineInfo(updateLineInfo); + transferLogService.addLog(lineInfo, interviewInfo.getInterviewerUserId(), request.getInterviewerUserId(), OperationLogTypeEnum.ENTRUST_INTERVIEW); return true; }