Merge branch 'main' of ssh://124.243.245.42:2222/zkr/shz-backend
This commit is contained in:
@@ -85,6 +85,8 @@ public class AppUserController extends BaseController
|
||||
return AjaxResult.error("用户id为空!");
|
||||
}
|
||||
AppUser appUser = appUserService.selectAppUserByUserId(userId);
|
||||
//企业查看简历,更新查看标识
|
||||
|
||||
return AjaxResult.success(appUser);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package com.ruoyi.cms.controller.app;
|
||||
|
||||
import com.ruoyi.cms.domain.JobApply;
|
||||
import com.ruoyi.cms.service.impl.JobApplyServiceImpl;
|
||||
import com.ruoyi.common.core.domain.entity.UserWorkExperiences;
|
||||
import com.ruoyi.cms.service.UserWorkExperiencesService;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
@@ -30,6 +32,9 @@ public class AppUserWorkExperiencesController extends BaseController {
|
||||
@Autowired
|
||||
private UserWorkExperiencesService userWorkExperiencesService;
|
||||
|
||||
@Autowired
|
||||
JobApplyServiceImpl jobApplyService;
|
||||
|
||||
/**
|
||||
* 列表
|
||||
*/
|
||||
@@ -39,6 +44,14 @@ public class AppUserWorkExperiencesController extends BaseController {
|
||||
if(userWorkExperiences.getUserId()==null){
|
||||
userWorkExperiences.setUserId(SiteSecurityUtils.getUserId());
|
||||
}
|
||||
//已读简历
|
||||
if (userWorkExperiences.getJobId() != null) {
|
||||
JobApply jobApply = jobApplyService.selectByJobIdAndUserId(userWorkExperiences.getJobId(), userWorkExperiences.getUserId());
|
||||
if (jobApply != null) {
|
||||
jobApply.setIsView("1");
|
||||
jobApplyService.updateJobApply(jobApply);
|
||||
}
|
||||
}
|
||||
startPage();
|
||||
List<UserWorkExperiences> list=userWorkExperiencesService.getWorkExperiencesList(userWorkExperiences);
|
||||
return getDataTable(list);
|
||||
|
||||
@@ -202,4 +202,7 @@ public class Job extends BaseEntity
|
||||
|
||||
@ApiModelProperty("审核状态")
|
||||
private String reviewStatus;
|
||||
//简历是否被查看
|
||||
@TableField(exist = false)
|
||||
private String isView;
|
||||
}
|
||||
|
||||
@@ -47,4 +47,7 @@ public class JobApply extends BaseEntity
|
||||
@TableField(exist = false)
|
||||
@ApiModelProperty("身份证,招聘传递")
|
||||
private String idCard;
|
||||
|
||||
@ApiModelProperty("是否已被查看 0未查看 1已查看")
|
||||
private String isView;
|
||||
}
|
||||
|
||||
@@ -9,6 +9,7 @@ import com.ruoyi.cms.domain.Job;
|
||||
import com.ruoyi.cms.domain.JobApply;
|
||||
import com.ruoyi.cms.domain.vo.CandidateVO;
|
||||
import com.ruoyi.common.core.domain.entity.AppUser;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* 岗位申请Mapper接口
|
||||
@@ -38,5 +39,7 @@ public interface JobApplyMapper extends BaseMapper<JobApply>
|
||||
|
||||
List<Job> selectJobApplyListJob(JobApply jobApply);
|
||||
|
||||
public int updateJobZphApply(JobApply jobApply);
|
||||
int updateJobZphApply(JobApply jobApply);
|
||||
|
||||
JobApply selectByJobIdAndUserId(@Param("jobId") Long jobId, @Param("userId") Long userId);
|
||||
}
|
||||
|
||||
@@ -72,4 +72,6 @@ public interface IJobApplyService
|
||||
public List<Job> selectJobApplyListJob(JobApply jobApply);
|
||||
|
||||
public int updateJobZphApply(JobApply jobApply);
|
||||
|
||||
JobApply selectByJobIdAndUserId(Long jobId, Long userId);
|
||||
}
|
||||
|
||||
@@ -160,4 +160,9 @@ public class JobApplyServiceImpl extends ServiceImpl<JobApplyMapper,JobApply> im
|
||||
public int updateJobZphApply(JobApply jobApply) {
|
||||
return jobApplyMapper.updateJobZphApply(jobApply);
|
||||
}
|
||||
|
||||
@Override
|
||||
public JobApply selectByJobIdAndUserId(Long jobId, Long userId) {
|
||||
return jobApplyMapper.selectByJobIdAndUserId(jobId, userId);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,10 +21,7 @@ import com.ruoyi.cms.util.notice.NoticeUtils;
|
||||
import com.ruoyi.common.constant.CacheConstants;
|
||||
import com.ruoyi.common.constant.Constants;
|
||||
import com.ruoyi.common.core.domain.TreeSelect;
|
||||
import com.ruoyi.common.core.domain.entity.AppUser;
|
||||
import com.ruoyi.common.core.domain.entity.Company;
|
||||
import com.ruoyi.common.core.domain.entity.File;
|
||||
import com.ruoyi.common.core.domain.entity.JobTitle;
|
||||
import com.ruoyi.common.core.domain.entity.*;
|
||||
import com.ruoyi.common.core.redis.RedisCache;
|
||||
import com.ruoyi.common.exception.ServiceException;
|
||||
import com.ruoyi.common.utils.SecurityUtils;
|
||||
@@ -1098,14 +1095,19 @@ public class JobServiceImpl extends ServiceImpl<JobMapper,Job> implements IJobSe
|
||||
private List<ESJobDocument> sysUserCollection(List<ESJobDocument> jobs){
|
||||
if(jobs.isEmpty()){return new ArrayList<>();}
|
||||
if(SecurityUtils.isLogin()){
|
||||
log.error("--------SecurityUtils.getUserId():" + SecurityUtils.getUserId());
|
||||
SysUser sysUser = SecurityUtils.getLoginUser().getUser();
|
||||
Long appUserId = sysUser.getAppUserId();
|
||||
if (appUserId == null) {
|
||||
return jobs;
|
||||
}
|
||||
log.error("--------sysUserCollection.SysUser.appUserId:" + appUserId);
|
||||
//收藏
|
||||
Set<Long> collectionIds = jobCollectionMapper.selectList(Wrappers.<JobCollection>lambdaQuery()
|
||||
.eq(JobCollection::getUserId, SecurityUtils.getUserId())
|
||||
.eq(JobCollection::getUserId, appUserId)
|
||||
.in(JobCollection::getJobId, jobs.stream().map(ESJobDocument::getJobId).collect(Collectors.toList())))
|
||||
.stream().map(JobCollection::getJobId).collect(Collectors.toSet());
|
||||
Set<Long> applyJobIds = new HashSet<>();
|
||||
List<Job> jobList = jobApplyMapper.applyJob(SecurityUtils.getUserId());
|
||||
List<Job> jobList = jobApplyMapper.applyJob(appUserId);
|
||||
if (CollectionUtils.isNotEmpty(jobList)) {
|
||||
applyJobIds = jobList.stream().map(Job::getJobId).collect(Collectors.toSet());
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
</where>
|
||||
</select>
|
||||
<select id="applyJob" resultType="com.ruoyi.cms.domain.Job">
|
||||
SELECT ja.create_time AS applyTime, j.*
|
||||
SELECT ja.create_time AS applyTime, ja.is_view, j.*
|
||||
FROM job j
|
||||
INNER JOIN job_apply ja ON j.job_id = ja.job_id
|
||||
WHERE j.del_flag = '0'
|
||||
@@ -151,7 +151,7 @@
|
||||
</select>
|
||||
|
||||
<select id="selectJobApplyListJob" parameterType="JobApply" resultType="com.ruoyi.cms.domain.Job">
|
||||
select b.*,a.create_time as shareTime from job_apply a inner join job b on a.job_id=b.job_id and b.del_flag='0'
|
||||
select b.*,a.create_time as shareTime, a.is_view from job_apply a inner join job b on a.job_id=b.job_id and b.del_flag='0'
|
||||
<where> a.del_flag = '0'
|
||||
<if test="jobId != null "> and a.job_id = #{jobId}</if>
|
||||
<if test="userId != null "> and a.user_id = #{userId}</if>
|
||||
@@ -162,4 +162,7 @@
|
||||
update job_apply set update_time=sysdate(),update_by=#{updateBy},hire=#{hire},hire_source=#{hireSource} where user_id=#{userId} AND job_id=#{jobId}
|
||||
</update>
|
||||
|
||||
<select id="selectByJobIdAndUserId" resultMap="JobApplyResult">
|
||||
select * from job_apply where del_flag='0' and job_id=#{jobId} and user_id=#{userId}
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -60,4 +60,8 @@ public class UserWorkExperiences extends BaseEntity {
|
||||
@ApiModelProperty("描述")
|
||||
private String description;
|
||||
|
||||
@TableField(exist = false)
|
||||
@ApiModelProperty("岗位ID")
|
||||
private Long jobId;
|
||||
|
||||
}
|
||||
|
||||
@@ -316,12 +316,16 @@ public class SsoService {
|
||||
//取角色判断是网格员2,还是内部工作者3
|
||||
String isCompanyUser = null;
|
||||
if(userJson.containsKey("roles")) {
|
||||
JSONObject role = userJson.getJSONArray("roles").getJSONObject(0);
|
||||
if (role != null && role.containsKey("roleId")) {
|
||||
/*1101(求职者)、1102(招聘者)、1103(网格员)、1104(内部工作者)*/
|
||||
Long roleId = role.getLong("roleId");
|
||||
if (roleId != null && roleId.equals(1103L)) {
|
||||
isCompanyUser = "2";//2网格员
|
||||
JSONArray role = userJson.getJSONArray("roles");
|
||||
if (role != null && role.size() != 0) {
|
||||
for (int i=0;i<role.size();i++) {
|
||||
JSONObject js = role.getJSONObject(i);
|
||||
/*1101(求职者)、1102(招聘者)、1103(网格员)、1104(内部工作者)*/
|
||||
Long roleId = js.getLong("roleId");
|
||||
if (roleId != null && roleId.equals(1103L)) {
|
||||
isCompanyUser = "2";//2网格员
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -509,7 +513,7 @@ public class SsoService {
|
||||
|
||||
//获取身份证
|
||||
String personCardNo="";
|
||||
//0.企业 1.求职者 2.风格员
|
||||
//0.企业 1.求职者 2.网格员
|
||||
if("0".equals(isCompanyUser)){
|
||||
personCardNo = info.getString("entCreditCode");
|
||||
String phone = info.getString("entAdminPhone");
|
||||
|
||||
Reference in New Issue
Block a user