1.我的面试添加邀约未读数,增加邀约已读接口,批量已读接口
2.管理端面试列表菜单添加已接受,已拒绝的红标数
This commit is contained in:
@@ -104,4 +104,19 @@ public class AppInterviewController extends BaseController {
|
||||
}
|
||||
return toAjax(rows);
|
||||
}
|
||||
|
||||
@ApiOperation("更新已读状态")
|
||||
@PutMapping("/isRead/{id}")
|
||||
public AjaxResult updateRead(@PathVariable Long id) {
|
||||
return success(interviewInvitationService.updateRead(id));
|
||||
}
|
||||
|
||||
@ApiOperation("更新已读状态")
|
||||
@PutMapping("/isReadAll")
|
||||
public AjaxResult updateRead() {
|
||||
if(!SiteSecurityUtils.isLogin()){
|
||||
return error("未登录");
|
||||
}
|
||||
return success(interviewInvitationService.updateReadAll(SiteSecurityUtils.getUserId()));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,6 +8,8 @@ import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.common.utils.SecurityUtils;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -78,4 +80,18 @@ public class CmsInterviewController extends BaseController {
|
||||
{
|
||||
return AjaxResult.success(interviewInvitationService.getInterviewInvitationById(id));
|
||||
}
|
||||
|
||||
@ApiOperation("面试邀约红标消息数")
|
||||
@PreAuthorize("@ss.hasPermi('cms:interview:msyyhbs')")
|
||||
@GetMapping("/msyyhbs")
|
||||
public AjaxResult msyyhbs()
|
||||
{
|
||||
if(!SecurityUtils.isLogin()){
|
||||
return error("未登录!");
|
||||
}
|
||||
if(StringUtils.isBlank(SecurityUtils.getIdcard())){
|
||||
return error("未查询到社会信用代码!");
|
||||
}
|
||||
return AjaxResult.success(interviewInvitationService.selectMsyyhbs(SecurityUtils.getIdcard()));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
package com.ruoyi.cms.domain.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 面试邀约拒绝数和接受数统计
|
||||
*/
|
||||
@Data
|
||||
public class InviteCountDTO {
|
||||
private Long total;
|
||||
private Long jss;
|
||||
private Long jjs;
|
||||
}
|
||||
@@ -3,10 +3,15 @@ package com.ruoyi.cms.mapper;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.ruoyi.cms.domain.InterviewInvitation;
|
||||
import com.ruoyi.cms.domain.vo.InterviewInvitationVO;
|
||||
import com.ruoyi.cms.domain.vo.InviteCountDTO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface InterviewInvitationMapper extends BaseMapper<InterviewInvitation> {
|
||||
List<InterviewInvitation> getInterviewInvitationList(InterviewInvitation interviewInvitation);
|
||||
|
||||
List<InterviewInvitationVO> getInterviewInvitationVOList(InterviewInvitation interviewInvitation);
|
||||
|
||||
InviteCountDTO selectMsyyhbs(@Param("idCard") String idCard);
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.ruoyi.cms.service;
|
||||
|
||||
import com.ruoyi.cms.domain.InterviewInvitation;
|
||||
import com.ruoyi.cms.domain.vo.InterviewInvitationVO;
|
||||
import com.ruoyi.cms.domain.vo.InviteCountDTO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -29,4 +30,10 @@ public interface InterviewInvitationService {
|
||||
InterviewInvitationVO getInterviewInvitationVOById(Long id);
|
||||
|
||||
int updateInterviewStatus(Long id, String status);
|
||||
|
||||
int updateRead(Long id);
|
||||
|
||||
int updateReadAll(Long userId);
|
||||
|
||||
InviteCountDTO selectMsyyhbs(String idCard);
|
||||
}
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
package com.ruoyi.cms.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.ruoyi.cms.domain.InterviewInvitation;
|
||||
import com.ruoyi.cms.domain.Job;
|
||||
import com.ruoyi.cms.domain.JobApply;
|
||||
import com.ruoyi.cms.domain.Notice;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.ruoyi.cms.domain.*;
|
||||
import com.ruoyi.cms.domain.vo.InterviewInvitationVO;
|
||||
import com.ruoyi.cms.domain.vo.InviteCountDTO;
|
||||
import com.ruoyi.cms.mapper.CompanyMapper;
|
||||
import com.ruoyi.cms.mapper.InterviewInvitationMapper;
|
||||
import com.ruoyi.cms.mapper.JobApplyMapper;
|
||||
@@ -312,4 +312,35 @@ public class InterviewInvitationServiceImpl implements InterviewInvitationServic
|
||||
notice.setNoticeContent(content.toString());
|
||||
return notice;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateRead(Long id) {
|
||||
if (id == null) {
|
||||
return 0;
|
||||
}
|
||||
LambdaUpdateWrapper<InterviewInvitation> updateWrapper = Wrappers.lambdaUpdate();
|
||||
updateWrapper.eq(InterviewInvitation::getDelFlag,"0")
|
||||
.eq(InterviewInvitation::getId, id)
|
||||
.eq(InterviewInvitation::getIsRead, "0")
|
||||
.set(InterviewInvitation::getIsRead, "1");
|
||||
return interviewInvitationMapper.update(null, updateWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateReadAll(Long userId) {
|
||||
if (userId == null) {
|
||||
return 0;
|
||||
}
|
||||
LambdaUpdateWrapper<InterviewInvitation> updateWrapper = Wrappers.lambdaUpdate();
|
||||
updateWrapper.eq(InterviewInvitation::getDelFlag,"0")
|
||||
.eq(InterviewInvitation::getUserId, userId)
|
||||
.eq(InterviewInvitation::getIsRead, "0")
|
||||
.set(InterviewInvitation::getIsRead, "1");
|
||||
return interviewInvitationMapper.update(null, updateWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public InviteCountDTO selectMsyyhbs(String idCard){
|
||||
return interviewInvitationMapper.selectMsyyhbs(idCard);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -41,6 +41,8 @@ public class JobApplyServiceImpl extends ServiceImpl<JobApplyMapper,JobApply> im
|
||||
private AppUserJobComplaintMapper appUserJobComplaintMapper;
|
||||
@Autowired
|
||||
private AppUserBlockCompanyMapper appUserBlockCompanyMapper;
|
||||
@Autowired
|
||||
private InterviewInvitationMapper interviewInvitationMapper;
|
||||
|
||||
/**
|
||||
* 查询岗位申请
|
||||
@@ -123,6 +125,11 @@ public class JobApplyServiceImpl extends ServiceImpl<JobApplyMapper,JobApply> im
|
||||
Integer blockCompanyCount=Math.toIntExact(appUserBlockCompanyMapper.selectCount(
|
||||
new LambdaQueryWrapper<AppUserBlockCompany>().eq(AppUserBlockCompany::getUserId, SiteSecurityUtils.getUserId()).eq(AppUserBlockCompany::getDelFlag, "0")
|
||||
));
|
||||
//面试邀约次数
|
||||
Integer interviewCount=Math.toIntExact(interviewInvitationMapper.selectCount(
|
||||
new LambdaQueryWrapper<InterviewInvitation>().eq(InterviewInvitation::getUserId, SiteSecurityUtils.getUserId()).eq(InterviewInvitation::getDelFlag, "0")
|
||||
.eq(InterviewInvitation::getIsRead,"0")
|
||||
));
|
||||
HashMap<String, Integer> map = new HashMap<>();
|
||||
map.put("applyCount", applyCount);
|
||||
map.put("collectionCount", collectionJobCount+collectionCompanyCount);
|
||||
@@ -130,6 +137,7 @@ public class JobApplyServiceImpl extends ServiceImpl<JobApplyMapper,JobApply> im
|
||||
map.put("fairCollecitonCount", fairCollecitonCount);
|
||||
map.put("plaintCount", plaintCount);
|
||||
map.put("blockCompanyCount", blockCompanyCount);
|
||||
map.put("interviewCount", interviewCount);
|
||||
return map;
|
||||
}
|
||||
|
||||
|
||||
@@ -122,12 +122,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</insert>
|
||||
|
||||
<select id="getMyTj" resultType="com.ruoyi.common.core.domain.entity.MyChart">
|
||||
SELECT t1.yzj,t2.ysc,t3.ytd,t4.yts,t5.ypbqys,0 AS yyy FROM
|
||||
SELECT t1.yzj,t2.ysc,t3.ytd,t4.yts,t5.ypbqys,t6.msyywd,0 AS yyy FROM
|
||||
(SELECT COUNT(user_id) AS yzj FROM app_review_job WHERE user_id = #{userId} AND del_flag = '0') t1
|
||||
CROSS JOIN (SELECT COUNT(user_id) AS ysc FROM job_collection WHERE user_id = #{userId} AND del_flag = '0') t2
|
||||
CROSS JOIN (SELECT COUNT(user_id) AS ytd FROM job_apply WHERE user_id = #{userId} AND del_flag = '0') t3
|
||||
CROSS JOIN (SELECT COUNT(user_id) AS yts FROM app_user_job_complaint WHERE user_id = #{userId} AND del_flag = '0') t4
|
||||
CROSS JOIN (SELECT COUNT(user_id) AS ypbqys FROM app_user_block_company WHERE user_id = #{userId} AND del_flag = '0') t5
|
||||
CROSS JOIN (SELECT COUNT(user_id) AS msyywd FROM interview_invitation WHERE user_id = #{userId} AND del_flag = '0' and is_read='0') t6
|
||||
</select>
|
||||
|
||||
<select id="selectSysUserIdcard" resultType="com.ruoyi.common.core.domain.entity.SysUser">
|
||||
|
||||
@@ -53,6 +53,7 @@
|
||||
<if test="userId != null and userId != ''"> and user_id = #{userId}</if>
|
||||
<if test="applyId != null and applyId != ''"> and apply_id = #{applyId}</if>
|
||||
<if test="status != null and status != ''"> and status = #{status}</if>
|
||||
<if test="isRead != null and isRead != ''"> and is_read = #{isRead}</if>
|
||||
</where>
|
||||
order by create_time desc
|
||||
</select>
|
||||
@@ -81,8 +82,16 @@
|
||||
<if test="userId != null and userId != ''"> and t.user_id = #{userId}</if>
|
||||
<if test="applyId != null and applyId != ''"> and t.apply_id = #{applyId}</if>
|
||||
<if test="status != null and status != ''"> and t.status = #{status}</if>
|
||||
<if test="isRead != null and isRead != ''"> and t.is_read = #{isRead}</if>
|
||||
</where>
|
||||
order by t.create_time desc
|
||||
</select>
|
||||
|
||||
<select id="selectMsyyhbs" resultMap="com.ruoyi.cms.domain.vo.InviteCountDTO">
|
||||
select count(1) total,sum(case when t.status='accepted' then 1 else 0 END) jss,
|
||||
sum(case when t.status='rejected' then 1 else 0 END) jjs from interview_invitation t
|
||||
INNER join company cp on t.company_id=cp.company_id
|
||||
where cp.code=#{idCard}
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
||||
Reference in New Issue
Block a user