✨ feat: 添加面试邀约删除接口及相关服务实现
This commit is contained in:
@@ -119,4 +119,17 @@ public class AppInterviewController extends BaseController {
|
||||
}
|
||||
return success(interviewInvitationService.updateReadAll(SiteSecurityUtils.getUserId()));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除我的面试邀约,路径中的逗号分隔 ID 可用于批量删除。
|
||||
*/
|
||||
@ApiOperation("删除我的面试邀约(支持批量)")
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids) {
|
||||
if (!SiteSecurityUtils.isLogin()) {
|
||||
return error("未登录");
|
||||
}
|
||||
return toAjax(interviewInvitationService.deleteInterviewInvitationIdsByUserId(
|
||||
ids, SiteSecurityUtils.getUserId()));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,6 +25,15 @@ public interface InterviewInvitationService {
|
||||
|
||||
int deleteInterviewInvitationIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除指定求职者自己的面试邀约(支持批量)。
|
||||
*
|
||||
* @param ids 面试邀约 ID 集合
|
||||
* @param userId 当前登录求职者 ID
|
||||
* @return 删除记录数
|
||||
*/
|
||||
int deleteInterviewInvitationIdsByUserId(Long[] ids, Long userId);
|
||||
|
||||
InterviewInvitation getInterviewInvitationById(Long id);
|
||||
|
||||
InterviewInvitationVO getInterviewInvitationVOById(Long id);
|
||||
|
||||
@@ -203,6 +203,16 @@ public class InterviewInvitationServiceImpl implements InterviewInvitationServic
|
||||
return interviewInvitationMapper.deleteBatchIds(Arrays.asList(ids));
|
||||
}
|
||||
|
||||
@Override
|
||||
public int deleteInterviewInvitationIdsByUserId(Long[] ids, Long userId) {
|
||||
if (ids == null || ids.length == 0 || userId == null) {
|
||||
return 0;
|
||||
}
|
||||
return interviewInvitationMapper.delete(Wrappers.<InterviewInvitation>lambdaQuery()
|
||||
.in(InterviewInvitation::getId, Arrays.asList(ids))
|
||||
.eq(InterviewInvitation::getUserId, userId));
|
||||
}
|
||||
|
||||
@Override
|
||||
public InterviewInvitation getInterviewInvitationById(Long id) {
|
||||
return interviewInvitationMapper.selectById(id);
|
||||
|
||||
Reference in New Issue
Block a user