feat: Add functionality for companies to query their registered jobs without accessing admin details
This commit is contained in:
@@ -226,6 +226,16 @@ public class CmsPublicJobFairController extends BaseController {
|
||||
return publicJobFairService.removeCurrentCompanyJob(jobFairId, jobId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 企业查询自己已报名的岗位,不进入管理员招聘会详情页。
|
||||
*/
|
||||
@ApiOperation("查询企业报名岗位")
|
||||
@PreAuthorize("@ss.hasPermi('cms:publicJobFair:job:edit')")
|
||||
@GetMapping("/{jobFairId}/company/jobs")
|
||||
public AjaxResult getCurrentCompanyJobs(@ApiParam("招聘会ID") @PathVariable String jobFairId) {
|
||||
return success(publicJobFairService.getCurrentCompanyJobs(jobFairId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询招聘会报名列表
|
||||
*/
|
||||
|
||||
@@ -221,6 +221,10 @@ public class Job extends BaseEntity
|
||||
@ApiModelProperty("户外招聘会岗位审核时间")
|
||||
private String fairReviewTime;
|
||||
|
||||
@TableField(exist = false)
|
||||
@ApiModelProperty("公共招聘会岗位关联ID")
|
||||
private String fairRelationId;
|
||||
|
||||
//简历是否被查看
|
||||
@TableField(exist = false)
|
||||
private String isView;
|
||||
|
||||
@@ -123,6 +123,11 @@ public interface IPublicJobFairService {
|
||||
*/
|
||||
AjaxResult removeCurrentCompanyJob(String jobFairId, Long jobId);
|
||||
|
||||
/**
|
||||
* 查询当前企业已报名的岗位,不返回招聘会管理员详情。
|
||||
*/
|
||||
List<Job> getCurrentCompanyJobs(String jobFairId);
|
||||
|
||||
/**
|
||||
* 查询招聘会报名列表
|
||||
*/
|
||||
|
||||
@@ -474,6 +474,17 @@ public class PublicJobFairServiceImpl implements IPublicJobFairService {
|
||||
: AjaxResult.error("岗位移除失败");
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Job> getCurrentCompanyJobs(String jobFairId) {
|
||||
ensureCompanyOperation();
|
||||
if (StringUtils.isBlank(jobFairId)) {
|
||||
throw new ServiceException("招聘会ID不能为空");
|
||||
}
|
||||
Company company = getCurrentCompanyOrThrow();
|
||||
ensureApproved(jobFairId, company.getCompanyId());
|
||||
return publicJobFairMapper.selectJobListByJobFairIdAndCompanyId(jobFairId, company.getCompanyId());
|
||||
}
|
||||
|
||||
/**
|
||||
* 为企业端列表补充报名状态和按钮状态。
|
||||
*/
|
||||
|
||||
@@ -165,9 +165,9 @@
|
||||
</update>
|
||||
|
||||
<select id="selectJobListByJobFairIdAndCompanyId" resultType="com.ruoyi.cms.domain.Job">
|
||||
select j.job_id, j.job_title, j.min_salary, j.max_salary, j.education, j.experience,
|
||||
select pfj.id as fair_relation_id, j.job_id, j.job_title, j.min_salary, j.max_salary, j.education, j.experience,
|
||||
j.company_name, j.job_location, j.job_location_area_code, j.posting_date, j.vacancies,
|
||||
j.company_id, j.description, j.job_category
|
||||
j.company_id, j.description, j.job_category, j.job_address
|
||||
from public_job_fair_job pfj
|
||||
inner join job j on pfj.job_id = j.job_id
|
||||
where pfj.job_fair_id = #{jobFairId} and pfj.company_id = #{companyId} and pfj.del_flag = '0' and j.del_flag = '0'
|
||||
|
||||
21
sql/migration_public_job_fair_enterprise_no_detail.sql
Normal file
21
sql/migration_public_job_fair_enterprise_no_detail.sql
Normal file
@@ -0,0 +1,21 @@
|
||||
-- 公共招聘会:企业角色不能查看管理员详情页
|
||||
-- 企业保留列表、报名、岗位维护权限;管理员查询权限不受影响。
|
||||
|
||||
BEGIN;
|
||||
|
||||
DELETE FROM "shz"."sys_role_menu"
|
||||
WHERE "role_id" = 1102
|
||||
AND "menu_id" IN (
|
||||
SELECT "menu_id"
|
||||
FROM "shz"."sys_menu"
|
||||
WHERE "perms" = 'cms:publicJobFair:query'
|
||||
);
|
||||
|
||||
COMMIT;
|
||||
|
||||
-- 验证:企业角色不应返回 cms:publicJobFair:query
|
||||
-- SELECT r.role_id, r.role_name, m.perms
|
||||
-- FROM shz.sys_role_menu rm
|
||||
-- JOIN shz.sys_role r ON r.role_id = rm.role_id
|
||||
-- JOIN shz.sys_menu m ON m.menu_id = rm.menu_id
|
||||
-- WHERE r.role_id = 1102 AND m.perms LIKE 'cms:publicJobFair:%';
|
||||
Reference in New Issue
Block a user