给移动端/app/user/resume、pc端/getInfo 接口添加返回企业未处理申请请条数pendCount
This commit is contained in:
@@ -4,6 +4,7 @@ import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import com.ruoyi.cms.service.IJobApplyService;
|
||||
import com.ruoyi.cms.util.StringUtil;
|
||||
import com.ruoyi.common.core.domain.entity.AppUser;
|
||||
import com.ruoyi.common.core.domain.entity.tymh.wwToken.WwTokenResult;
|
||||
@@ -57,6 +58,8 @@ public class SysLoginController
|
||||
private OauthLoginHlwService oauthLoginHlwService;
|
||||
@Autowired
|
||||
private RedisCache redisCache;
|
||||
@Autowired
|
||||
private IJobApplyService jobApplyService;
|
||||
|
||||
/**
|
||||
* 登录方法
|
||||
@@ -226,6 +229,11 @@ public class SysLoginController
|
||||
// 权限集合
|
||||
Set<String> permissions = permissionService.getMenuPermission(user);
|
||||
AjaxResult ajax = AjaxResult.success();
|
||||
//获取企业未处理求职者条数
|
||||
if(roles.contains(String.valueOf(StringUtil.COMPANY_ADMIN_ROLE_KEY))){
|
||||
Integer pendCount = jobApplyService.selectPendCount(user.getIdCard());
|
||||
ajax.put("pendCount", pendCount == null ? 0 : pendCount);
|
||||
}
|
||||
ajax.put("user", user);
|
||||
ajax.put("roles", roles);
|
||||
ajax.put("permissions", permissions);
|
||||
|
||||
@@ -47,4 +47,12 @@ public class JobApply extends BaseEntity
|
||||
@TableField(exist = false)
|
||||
@ApiModelProperty("身份证,招聘传递")
|
||||
private String idCard;
|
||||
|
||||
@TableField(exist = false)
|
||||
@ApiModelProperty("公司id")
|
||||
private Long companyId;
|
||||
|
||||
@TableField(exist = false)
|
||||
@ApiModelProperty("社会信用代码")
|
||||
private String code;
|
||||
}
|
||||
|
||||
@@ -46,4 +46,6 @@ public interface JobApplyMapper extends BaseMapper<JobApply>
|
||||
public int applyJobCencal(JobApply jobApply);
|
||||
|
||||
int applyCencalCount(@Param("userId") Long userId);
|
||||
|
||||
Integer selectPendCount(JobApply jobApply);
|
||||
}
|
||||
|
||||
@@ -76,4 +76,6 @@ public interface IJobApplyService
|
||||
public int applyJobCencal(JobApply jobApply);
|
||||
|
||||
public List<Job> selectCencalList(JobApply jobApply);
|
||||
|
||||
public Integer selectPendCount(String code);
|
||||
}
|
||||
|
||||
@@ -10,6 +10,7 @@ import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.ruoyi.cms.domain.JobApply;
|
||||
import com.ruoyi.cms.domain.UserInfoDetail;
|
||||
import com.ruoyi.cms.util.AppUserFieldCustomCopy;
|
||||
import com.ruoyi.cms.util.encrypt.QuickValidUtils;
|
||||
@@ -66,6 +67,8 @@ public class AppUserServiceImpl extends ServiceImpl<AppUserMapper,AppUser> imple
|
||||
private CompanyMapper companyMapper;
|
||||
@Autowired
|
||||
private FileMapper fileMapper;
|
||||
@Autowired
|
||||
private JobApplyMapper jobApplyMapper;
|
||||
|
||||
@Value("${ocr.ocr_mutipart}")
|
||||
private String ocrMutipartUrl;
|
||||
@@ -114,6 +117,11 @@ public class AppUserServiceImpl extends ServiceImpl<AppUserMapper,AppUser> imple
|
||||
QuickValidUtils.companyContactPhoneValid(it);
|
||||
});
|
||||
company.setCompanyContactList(companyContactList);
|
||||
//添加企业条数
|
||||
JobApply apply=new JobApply();
|
||||
apply.setCompanyId(company.getCompanyId());
|
||||
Integer pendCount=jobApplyMapper.selectPendCount(apply);
|
||||
appUser.setPendCount(pendCount == null ? 0 : pendCount);
|
||||
}
|
||||
}else if("1".equals(appUser.getIsCompanyUser())){
|
||||
//验证身份证完整性
|
||||
|
||||
@@ -171,4 +171,11 @@ public class JobApplyServiceImpl extends ServiceImpl<JobApplyMapper,JobApply> im
|
||||
public int applyJobCencal(JobApply jobApply) {
|
||||
return jobApplyMapper.applyJobCencal(jobApply);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer selectPendCount(String code){
|
||||
JobApply jobApply=new JobApply();
|
||||
jobApply.setCode(code);
|
||||
return jobApplyMapper.selectPendCount(jobApply);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -146,4 +146,17 @@
|
||||
select count(user_id) from job_apply where del_flag = '2' and user_id=#{userId}
|
||||
</select>
|
||||
|
||||
<select id="selectPendCount" resultType="java.lang.Integer" parameterType="com.ruoyi.cms.domain.JobApply">
|
||||
select count(a.user_id) from job_apply a
|
||||
inner join job b on a.job_id=b.job_id
|
||||
inner join company c on b.company_id=c.company_id
|
||||
<where> a.del_flag='0' and b.del_flag='0' and (a.hire is NULL or a.hire ='')
|
||||
<if test="companyId!=null">
|
||||
and c.company_id=#{companyId}
|
||||
</if>
|
||||
<if test="code!=null and code!='' ">
|
||||
and c.code=#{code}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -182,4 +182,8 @@ public class AppUser extends BaseEntity
|
||||
|
||||
@ApiModelProperty("身份证机密性")
|
||||
private String idCardEncrypt;
|
||||
|
||||
@TableField(exist = false)
|
||||
@ApiModelProperty("用户企业账号,显示未处理申请者条数字段")
|
||||
private Integer pendCount;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user