面试相关接口
This commit is contained in:
@@ -3,6 +3,8 @@ package com.cool.store.mapper;
|
||||
import com.cool.store.dto.partner.PartnerInterviewInfoDTO;
|
||||
import com.cool.store.dto.partner.SpecialDateRangeInterviewCountDTO;
|
||||
import com.cool.store.entity.HyPartnerInterviewPlanDO;
|
||||
import com.cool.store.request.GetInterviewListReq;
|
||||
import com.cool.store.vo.interview.InterviewVO;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
@@ -50,7 +52,6 @@ public interface HyPartnerInterviewPlanMapper {
|
||||
@Param("currentDate") String currentDate,
|
||||
@Param("startTime") String startTime,
|
||||
@Param("endTime") String endTime);
|
||||
|
||||
/**
|
||||
* 查询面试列表
|
||||
* @param userId
|
||||
@@ -70,4 +71,20 @@ public interface HyPartnerInterviewPlanMapper {
|
||||
PageInfo<PartnerInterviewInfoDTO> getPartnerInterviewInfoList(@Param("userId") String userId,
|
||||
@Param("workflowStage") String workflowStage ,
|
||||
@Param("workflowStatus") String workflowStatus);
|
||||
|
||||
/**
|
||||
* 查询面试列表
|
||||
*
|
||||
* @param request
|
||||
* @return
|
||||
*/
|
||||
List<InterviewVO> getInterviewList(@Param("record") GetInterviewListReq request);
|
||||
|
||||
/**
|
||||
* 查询面试详情
|
||||
*
|
||||
* @param interviewId
|
||||
* @return
|
||||
*/
|
||||
InterviewVO getInterviewInfo(String interviewId);
|
||||
}
|
||||
@@ -237,4 +237,65 @@
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="getInterviewList" resultType="com.cool.store.vo.interview.InterviewVO">
|
||||
select hpip.id as interviewId,
|
||||
hpui.username as partnerName,
|
||||
hpui.mobile as partnerMobile,
|
||||
hpip.room_id as roomId,
|
||||
hpip.start_time as startTime,
|
||||
hpui.username as interviewerName,
|
||||
hpui.mobile as interviewerMobile,
|
||||
hpip.room_status as roomStatus,
|
||||
hpip.end_time as endTime
|
||||
from hy_partner_interview_plan hpip
|
||||
left join hy_partner_line_info hpll on hpip.partner_line_id = hpll.id
|
||||
left join hy_partner_user_info hpui on hpui.partner_id = hpip.partner_id
|
||||
<where>
|
||||
<if test="record.partnerName !=null and partnerName!=''">
|
||||
hpui.username like concat('%',#{record.partnerName},'%')
|
||||
</if>
|
||||
<if test="record.partnerMobile !=null and partnerMobile!=''">
|
||||
hpui.mobile like concat('%',#{record.partnerMobile},'%')
|
||||
</if>
|
||||
<if test="record.roomId !=null and roomId!=''">
|
||||
hpip.room_id = #{record.roomId}
|
||||
</if>
|
||||
<if test="record.interviewerName !=null and interviewerName!=''">
|
||||
hpui.username like concat('%',#{record.interviewerName},'%')
|
||||
</if>
|
||||
<if test="record.interviewerMobile !=null and interviewerMobile!=''">
|
||||
hpui.mobile like concat('%',#{record.interviewerMobile},'%')
|
||||
</if>
|
||||
<if test="record.roomStatus !=null and roomStatus!=''">
|
||||
hpip.room_status = #{record.roomStatus}
|
||||
</if>
|
||||
<if test="record.startTime !=null and startTime!=''">
|
||||
hpip.start_time <= #{record.startTime}
|
||||
</if>
|
||||
<if test="record.endTime !=null and endTime!=''">
|
||||
hpip.end_time >= #{record.endTime}
|
||||
</if>
|
||||
</where>
|
||||
|
||||
</select>
|
||||
<select id="getInterviewInfo" resultType="com.cool.store.vo.interview.InterviewVO">
|
||||
select hpip.id as interviewId,
|
||||
hpui.username as partnerName,
|
||||
hpui.mobile as partnerMobile,
|
||||
hpip.room_id as roomId,
|
||||
hpip.start_time as startTime,
|
||||
hpui.username as interviewerName,
|
||||
hpui.mobile as interviewerMobile,
|
||||
hpip.room_status as roomStatus,
|
||||
hpip.end_time as endTime,
|
||||
hpip.partner_id as partnerId,
|
||||
hpip.interviewer as interviewerId,
|
||||
hpi.status as status
|
||||
from hy_partner_interview_plan hpip
|
||||
left join hy_partner_line_info hpll on hpip.partner_line_id = hpll.id
|
||||
left join hy_partner_user_info hpui on hpui.partner_id = hpip.partner_id
|
||||
left join hy_partner_interview hpi on hpip.id = hpi.interview_plan_id
|
||||
where hpip.id = #{interviewId}
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -0,0 +1,20 @@
|
||||
package com.cool.store.request;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @Author: young.yu
|
||||
* @Date: 2023-06-09 15:41
|
||||
* @Description:
|
||||
*/
|
||||
@Data
|
||||
@ApiModel
|
||||
public class EntrustOthersReq {
|
||||
@ApiModelProperty("会议编号")
|
||||
private String interviewId;
|
||||
|
||||
@ApiModelProperty("新面试官编号")
|
||||
private String newInterviewerId;
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.cool.store.request;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @Author: young.yu
|
||||
* @Date: 2023-06-12 17:43
|
||||
* @Description:
|
||||
*/
|
||||
@Data
|
||||
@ApiModel
|
||||
public class FinishInterviewReq {
|
||||
@ApiModelProperty("会议编号")
|
||||
private String interviewId;
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
package com.cool.store.request;
|
||||
|
||||
import com.cool.store.common.PageBasicInfo;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @Author: young.yu
|
||||
* @Date: 2023-06-06 15:50
|
||||
* @Description:
|
||||
*/
|
||||
@Data
|
||||
@ApiModel
|
||||
public class GetInterviewListReq extends PageBasicInfo {
|
||||
@ApiModelProperty("加盟商姓名")
|
||||
private String partnerName;
|
||||
@ApiModelProperty("加盟商手机号")
|
||||
private String partnerMobile;
|
||||
@ApiModelProperty("房间号")
|
||||
private String roomId;
|
||||
@ApiModelProperty("面试官姓名")
|
||||
private String interviewerName;
|
||||
@ApiModelProperty("面试官手机号")
|
||||
private String interviewerMobile;
|
||||
@ApiModelProperty("房间状态:0待开放;1已开放; 2已关闭")
|
||||
private Integer roomStatus;
|
||||
@ApiModelProperty("开始时间")
|
||||
private String startTime;
|
||||
@ApiModelProperty("结束时间")
|
||||
private String endTime;
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
package com.cool.store.request;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @Author: young.yu
|
||||
* @Date: 2023-06-12 17:43
|
||||
* @Description:
|
||||
*/
|
||||
@Data
|
||||
@ApiModel
|
||||
public class ModifyInterviewTimeReq {
|
||||
@ApiModelProperty("会议编号")
|
||||
private String interviewId;
|
||||
@ApiModelProperty("新预约开始时间")
|
||||
private String newStartBookingTime;
|
||||
@ApiModelProperty("新预约结束时间")
|
||||
private String newEndBookingTime;
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.cool.store.request;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @Author: young.yu
|
||||
* @Date: 2023-06-09 15:41
|
||||
* @Description:
|
||||
*/
|
||||
@Data
|
||||
@ApiModel
|
||||
public class QueryByInterviewIdReq {
|
||||
@ApiModelProperty("会议编号")
|
||||
private String interviewId;
|
||||
}
|
||||
@@ -0,0 +1,145 @@
|
||||
package com.cool.store.vo.interview;
|
||||
|
||||
import com.alibaba.fastjson.annotation.JSONField;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
||||
/**
|
||||
* @Author: young.yu
|
||||
* @Date: 2023-06-08 16:26
|
||||
* @Description:
|
||||
*/
|
||||
@ApiModel(description = "面试信息")
|
||||
public class InterviewVO {
|
||||
@ApiModelProperty(value = "会议id", required = true)
|
||||
private String interviewId;
|
||||
|
||||
@ApiModelProperty(value = "加盟商用户编号")
|
||||
private String partnerId;
|
||||
|
||||
@ApiModelProperty(value = "被面试人姓名", required = true)
|
||||
private String partnerName;
|
||||
|
||||
@ApiModelProperty(value = "被面试人手机号", required = true)
|
||||
private String partnerMobile;
|
||||
|
||||
@ApiModelProperty(value = "房间号", required = true)
|
||||
private String roomId;
|
||||
|
||||
@ApiModelProperty(value = "会议计划开始时间", required = true, example = "2023-06-03 10:00")
|
||||
private String startTime;
|
||||
|
||||
@ApiModelProperty(value = "面试官人员编号")
|
||||
private String interviewerId;
|
||||
|
||||
@ApiModelProperty(value = "面试官姓名", required = true)
|
||||
private String interviewerName;
|
||||
|
||||
@ApiModelProperty(value = "面试官手机号", required = true)
|
||||
private String interviewerMobile;
|
||||
@ApiModelProperty(value = "房间状态(0待开放;1已开放;2已关闭)", required = true)
|
||||
private String roomStatus;
|
||||
|
||||
@ApiModelProperty(value = "会议结束时间", required = true, example = "2023-06-03 12:00")
|
||||
private String endTime;
|
||||
|
||||
@ApiModelProperty(value = "预约状态 0 待预约;1待面试;2已开始;3待审核;4审批中;5审批通过;6拒绝", required = true)
|
||||
private Integer status;
|
||||
|
||||
|
||||
public String getPartnerId() {
|
||||
return partnerId;
|
||||
}
|
||||
|
||||
public void setPartnerId(String partnerId) {
|
||||
this.partnerId = partnerId;
|
||||
}
|
||||
|
||||
public String getInterviewerId() {
|
||||
return interviewerId;
|
||||
}
|
||||
|
||||
public void setInterviewerId(String interviewerId) {
|
||||
this.interviewerId = interviewerId;
|
||||
}
|
||||
|
||||
public Integer getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(Integer status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getInterviewId() {
|
||||
return interviewId;
|
||||
}
|
||||
|
||||
public void setInterviewId(String interviewId) {
|
||||
this.interviewId = interviewId;
|
||||
}
|
||||
|
||||
public String getPartnerName() {
|
||||
return partnerName;
|
||||
}
|
||||
|
||||
public void setPartnerName(String partnerName) {
|
||||
this.partnerName = partnerName;
|
||||
}
|
||||
|
||||
public String getPartnerMobile() {
|
||||
return partnerMobile;
|
||||
}
|
||||
|
||||
public void setPartnerMobile(String partnerMobile) {
|
||||
this.partnerMobile = partnerMobile;
|
||||
}
|
||||
|
||||
public String getRoomId() {
|
||||
return roomId;
|
||||
}
|
||||
|
||||
public void setRoomId(String roomId) {
|
||||
this.roomId = roomId;
|
||||
}
|
||||
|
||||
public String getStartTime() {
|
||||
return startTime;
|
||||
}
|
||||
|
||||
public void setStartTime(String startTime) {
|
||||
this.startTime = startTime;
|
||||
}
|
||||
|
||||
public String getInterviewerName() {
|
||||
return interviewerName;
|
||||
}
|
||||
|
||||
public void setInterviewerName(String interviewerName) {
|
||||
this.interviewerName = interviewerName;
|
||||
}
|
||||
|
||||
public String getInterviewerMobile() {
|
||||
return interviewerMobile;
|
||||
}
|
||||
|
||||
public void setInterviewerMobile(String interviewerMobile) {
|
||||
this.interviewerMobile = interviewerMobile;
|
||||
}
|
||||
|
||||
public String getRoomStatus() {
|
||||
return roomStatus;
|
||||
}
|
||||
|
||||
public void setRoomStatus(String roomStatus) {
|
||||
this.roomStatus = roomStatus;
|
||||
}
|
||||
|
||||
public String getEndTime() {
|
||||
return endTime;
|
||||
}
|
||||
|
||||
public void setEndTime(String endTime) {
|
||||
this.endTime = endTime;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
package com.cool.store.service;
|
||||
|
||||
import com.cool.store.request.EntrustOthersReq;
|
||||
import com.cool.store.request.FinishInterviewReq;
|
||||
import com.cool.store.request.GetInterviewListReq;
|
||||
import com.cool.store.request.ModifyInterviewTimeReq;
|
||||
import com.cool.store.vo.interview.InterviewVO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author: young.yu
|
||||
* @Date: 2023-06-06 15:01
|
||||
* @Description :面试service
|
||||
*/
|
||||
public interface InterviewService {
|
||||
List<InterviewVO> getInterviewList(GetInterviewListReq request);
|
||||
|
||||
/**
|
||||
* 根据面试会议id查询面试信息
|
||||
* @param interviewId
|
||||
* @return
|
||||
*/
|
||||
InterviewVO getInterviewInfo(String interviewId);
|
||||
|
||||
/**
|
||||
* 委托他人
|
||||
* @param request
|
||||
*/
|
||||
void entrustOthers(EntrustOthersReq request);
|
||||
/**
|
||||
* 修改面试时间
|
||||
* @param request
|
||||
*/
|
||||
void modifyInterviewTime(ModifyInterviewTimeReq request);
|
||||
|
||||
/**
|
||||
* 结束面试
|
||||
* @param request
|
||||
*/
|
||||
void finishInterview(FinishInterviewReq request);
|
||||
}
|
||||
@@ -0,0 +1,102 @@
|
||||
package com.cool.store.service.impl;
|
||||
|
||||
import cn.hutool.core.convert.Convert;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import com.cool.store.entity.HyPartnerInterviewDO;
|
||||
import com.cool.store.entity.HyPartnerInterviewPlanDO;
|
||||
import com.cool.store.mapper.HyPartnerInterviewMapper;
|
||||
import com.cool.store.mapper.HyPartnerInterviewPlanMapper;
|
||||
import com.cool.store.request.EntrustOthersReq;
|
||||
import com.cool.store.request.FinishInterviewReq;
|
||||
import com.cool.store.request.GetInterviewListReq;
|
||||
import com.cool.store.request.ModifyInterviewTimeReq;
|
||||
import com.cool.store.service.InterviewService;
|
||||
import com.cool.store.vo.interview.InterviewVO;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author: young.yu
|
||||
* @Date: 2023-06-06 15:19
|
||||
* @Description:
|
||||
*/
|
||||
@Slf4j
|
||||
@Service
|
||||
public class InterviewServiceImpl implements InterviewService {
|
||||
|
||||
@Autowired
|
||||
private HyPartnerInterviewPlanMapper hyPartnerInterviewPlanMapper;
|
||||
|
||||
@Autowired
|
||||
private HyPartnerInterviewMapper hyPartnerInterviewMapper;
|
||||
@Override
|
||||
public List<InterviewVO> getInterviewList(GetInterviewListReq request) {
|
||||
List<InterviewVO> interviewList = hyPartnerInterviewPlanMapper.getInterviewList(request);
|
||||
return interviewList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public InterviewVO getInterviewInfo(String interviewId) {
|
||||
return hyPartnerInterviewPlanMapper.getInterviewInfo(interviewId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void entrustOthers(EntrustOthersReq request) {
|
||||
//TODO 1.原面试官日程删除
|
||||
|
||||
//TODO 2.新面试官日程新增
|
||||
|
||||
//TODO 3.面试信息变更
|
||||
|
||||
HyPartnerInterviewPlanDO record = new HyPartnerInterviewPlanDO();
|
||||
record.setId(Long.valueOf(request.getInterviewId()));
|
||||
record.setInterviewer(request.getInterviewId());
|
||||
record.setUpdateTime(new Date());
|
||||
hyPartnerInterviewPlanMapper.updateByPrimaryKeySelective(record);
|
||||
|
||||
|
||||
HyPartnerInterviewDO hyPartnerInterviewDO = new HyPartnerInterviewDO();
|
||||
hyPartnerInterviewDO.setInterviewPlanId(Long.valueOf(request.getInterviewId()));
|
||||
hyPartnerInterviewDO.setInterviewer(request.getNewInterviewerId());
|
||||
hyPartnerInterviewDO.setUpdateTime(new Date());
|
||||
hyPartnerInterviewMapper.updateByPrimaryKeySelective(hyPartnerInterviewDO);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void modifyInterviewTime(ModifyInterviewTimeReq request) {
|
||||
//TODO 修改面试时间
|
||||
|
||||
HyPartnerInterviewPlanDO record = new HyPartnerInterviewPlanDO();
|
||||
record.setId(Long.valueOf(request.getInterviewId()));
|
||||
record.setStartTime(Convert.toDate(request.getNewStartBookingTime()));
|
||||
record.setUpdateTime(new Date());
|
||||
hyPartnerInterviewPlanMapper.updateByPrimaryKeySelective(record);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void finishInterview(FinishInterviewReq request) {
|
||||
//更新面试计划信息
|
||||
HyPartnerInterviewPlanDO record = new HyPartnerInterviewPlanDO();
|
||||
record.setId(Long.valueOf(request.getInterviewId()));
|
||||
record.setRoomStatus(0);
|
||||
record.setUpdateTime(new Date());
|
||||
hyPartnerInterviewPlanMapper.updateByPrimaryKeySelective(record);
|
||||
|
||||
//更新面试信息
|
||||
HyPartnerInterviewDO hyPartnerInterviewDO = new HyPartnerInterviewDO();
|
||||
hyPartnerInterviewDO.setInterviewPlanId(Long.valueOf(request.getInterviewId()));
|
||||
hyPartnerInterviewDO.setStatus(3);
|
||||
hyPartnerInterviewDO.setUpdateTime(new Date());
|
||||
hyPartnerInterviewMapper.updateByPrimaryKeySelective(hyPartnerInterviewDO);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
package com.cool.store.controller;
|
||||
|
||||
import com.cool.store.request.*;
|
||||
import com.cool.store.response.ResponseResult;
|
||||
import com.cool.store.service.InterviewService;
|
||||
import com.cool.store.vo.interview.InterviewVO;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
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 java.util.List;
|
||||
|
||||
/**
|
||||
* @Author: young.yu
|
||||
* @Date: 2023-06-06 15:22
|
||||
* @Description:
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/interview")
|
||||
@Api(tags = "面试信息")
|
||||
public class InterviewController {
|
||||
|
||||
@Autowired
|
||||
private InterviewService interviewService;
|
||||
|
||||
@PostMapping("/list")
|
||||
@ApiOperation("获取面试信息列表")
|
||||
public ResponseResult<PageInfo<InterviewVO>> getInterviewList(@RequestBody GetInterviewListReq request) {
|
||||
PageHelper.startPage(request.getPageNum(), request.getPageSize());
|
||||
List<InterviewVO> interviewList = interviewService.getInterviewList(request);
|
||||
return ResponseResult.success(new PageInfo<>(interviewList));
|
||||
}
|
||||
|
||||
@PostMapping("/queryByInterviewId")
|
||||
@ApiOperation("根据面试会议id查询面试信息")
|
||||
public ResponseResult<InterviewVO> queryByInterviewId(@RequestBody QueryByInterviewIdReq request) {
|
||||
InterviewVO interviewVO = interviewService.getInterviewInfo(request.getInterviewId());
|
||||
return ResponseResult.success(interviewVO);
|
||||
}
|
||||
|
||||
@PostMapping("/entrustOthers")
|
||||
@ApiOperation("委托他人")
|
||||
public ResponseResult entrustOthers(@RequestBody EntrustOthersReq request) {
|
||||
interviewService.entrustOthers(request);
|
||||
return ResponseResult.success();
|
||||
}
|
||||
|
||||
@PostMapping("/modifyInterviewTime")
|
||||
@ApiOperation("修改面试时间")
|
||||
public ResponseResult modifyInterviewTime(@RequestBody ModifyInterviewTimeReq request) {
|
||||
interviewService.modifyInterviewTime(request);
|
||||
return ResponseResult.success();
|
||||
}
|
||||
|
||||
@PostMapping("/finish")
|
||||
@ApiOperation("修改面试时间")
|
||||
public ResponseResult finishInterview(@RequestBody FinishInterviewReq request) {
|
||||
interviewService.finishInterview(request);
|
||||
return ResponseResult.success();
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user