feat: Refactor company and job management to include company nature

- Added companyNature field to Company entity and updated related services and mappers.
- Removed jobNature field from Job and ESJobDocument entities as it is no longer needed.
- Updated CompanyController to handle current company information and synchronization of account codes.
- Enhanced CompanyServiceImpl to manage company nature changes and synchronize related job postings.
- Updated SQL migrations to add company nature field and associated business dictionary entries.
- Refactored job-related services to ensure they reflect the latest company nature information.
This commit is contained in:
2026-07-16 15:05:53 +08:00
parent 3f1624da3a
commit acb0762dcc
17 changed files with 378 additions and 135 deletions

View File

@@ -3,9 +3,12 @@ package com.ruoyi.cms.controller.cms;
import com.ruoyi.cms.domain.query.CompanySearch;
import com.ruoyi.cms.domain.query.JobSearch;
import com.ruoyi.cms.mapper.AppUserMapper;
import com.ruoyi.cms.util.RoleUtils;
import com.ruoyi.cms.util.sensitiveWord.SensitiveWordChecker;
import com.ruoyi.common.core.domain.entity.AppUser;
import com.ruoyi.common.core.domain.entity.Company;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.cms.service.ICompanyService;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
@@ -13,7 +16,10 @@ 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.StringUtils;
import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.ruoyi.system.service.ISysUserService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
@@ -38,6 +44,12 @@ public class CompanyController extends BaseController
@Autowired
private ICompanyService companyService;
@Autowired
private AppUserMapper appUserMapper;
@Autowired
private ISysUserService sysUserService;
@Autowired
SensitiveWordChecker sensitiveWordChecker;
@@ -50,10 +62,10 @@ public class CompanyController extends BaseController
public TableDataInfo list(CompanySearch company)
{
if (RoleUtils.isCompanyAdmin()) {
System.out.println("企业社会信用代码============================="+RoleUtils.getCurrentUseridCard());
if(StringUtils.isNotEmpty(RoleUtils.getCurrentUseridCard())){
company.setCode(RoleUtils.getCurrentUseridCard());
}else{
Company currentCompany = getCurrentCompany();
if (currentCompany != null) {
company.setCompanyId(currentCompany.getCompanyId());
} else {
return getDataTable(new ArrayList<>());
}
}
@@ -87,6 +99,21 @@ public class CompanyController extends BaseController
return success(companyService.selectCompanyByCompanyId(companyId));
}
/**
* 获取当前企业账号关联的企业信息。
*/
@ApiOperation("获取当前企业信息")
@PreAuthorize("@ss.hasPermi('cms:company:query')")
@GetMapping("/current")
public AjaxResult getCurrentInfo()
{
Company company = getCurrentCompany();
if (company == null) {
return AjaxResult.error("未查询到当前企业信息");
}
return success(companyService.selectCompanyByCompanyId(company.getCompanyId()));
}
/**
* 新增公司
*/
@@ -115,6 +142,8 @@ public class CompanyController extends BaseController
@PutMapping
public AjaxResult edit(@RequestBody Company company)
{
Company existingCompany = company.getCompanyId() == null
? null : companyService.selectCompanyByCompanyId(company.getCompanyId());
// 校验描述中的敏感词
List<String> sensitiveWords = sensitiveWordChecker.checkSensitiveWords(company.getDescription());
if (!sensitiveWords.isEmpty()) {
@@ -122,7 +151,104 @@ public class CompanyController extends BaseController
return AjaxResult.error(errorMsg, sensitiveWords);
}
// 无敏感词,执行插入
return toAjax(companyService.updateCompany(company));
AjaxResult result = toAjax(companyService.updateCompany(company));
if (result.get("code") instanceof Number && ((Number) result.get("code")).intValue() == 200
&& existingCompany != null && company.getCode() != null
&& !java.util.Objects.equals(existingCompany.getCode(), company.getCode())) {
syncAccountCode(existingCompany.getCode(), company.getCode(), null);
}
return result;
}
/**
* 修改当前企业账号关联的企业信息企业ID由登录账号确定不能由前端指定其他企业。
*/
@ApiOperation("修改当前企业信息")
@PreAuthorize("@ss.hasPermi('cms:company:edit')")
@PutMapping("/current")
public AjaxResult editCurrent(@RequestBody Company company)
{
Company currentCompany = getCurrentCompany();
if (currentCompany == null) {
return AjaxResult.error("未查询到当前企业信息");
}
String oldCode = currentCompany.getCode();
company.setCompanyId(currentCompany.getCompanyId());
// 将企业和当前企业账号建立稳定的 user_id 关联,信用代码修改后仍能找到企业。
Long appUserId = RoleUtils.getSysAppuserId();
if (appUserId != null) {
company.setUserId(appUserId);
}
AjaxResult result = edit(company);
if (result.get("code") instanceof Number && ((Number) result.get("code")).intValue() == 200
&& StringUtils.isEmpty(oldCode) && company.getCode() != null) {
syncAccountCode(oldCode, company.getCode(), SecurityUtils.getLoginUser().getUser());
}
return result;
}
private Company getCurrentCompany()
{
if (!RoleUtils.isCompanyAdmin()) {
return null;
}
String currentCode = RoleUtils.getCurrentUseridCard();
if (StringUtils.isNotEmpty(currentCode)) {
Company company = companyService.queryCodeCompany(currentCode);
if (company != null) {
return company;
}
}
// 兼容历史数据:部分企业记录没有 company.user_id先通过 app_user_id 查到企业账号。
Long appUserId = RoleUtils.getSysAppuserId();
if (appUserId != null) {
CompanySearch search = new CompanySearch();
search.setUserId(appUserId);
List<Company> companies = companyService.selectCompanyList(search);
if (companies != null && !companies.isEmpty()) {
return companyService.selectCompanyByCompanyId(companies.get(0).getCompanyId());
}
// 兼容信用代码已被修改但账号缓存仍是旧值的场景。
AppUser appUser = appUserMapper.selectById(appUserId);
if (appUser != null && StringUtils.isNotEmpty(appUser.getIdCard())) {
return companyService.queryCodeCompany(appUser.getIdCard());
}
}
return null;
}
/**
* 企业修改信用代码后同步 PC/APP 账号关联,避免后续岗位等企业端接口仍使用旧代码。
*/
private void syncAccountCode(String oldCode, String newCode, SysUser fallbackUser)
{
SysUser currentUser = SecurityUtils.getLoginUser().getUser();
SysUser sysUser = StringUtils.isNotEmpty(oldCode)
? sysUserService.selectUserByIdCard(oldCode) : fallbackUser;
if (sysUser != null) {
SysUser updateUser = new SysUser();
updateUser.setUserId(sysUser.getUserId());
updateUser.setIdCard(newCode);
sysUserService.updateUserProfile(updateUser);
// 当前请求中的登录对象可能仍是缓存实例,立即更新它以便本次请求链路保持一致。
if (currentUser != null && java.util.Objects.equals(currentUser.getUserId(), sysUser.getUserId())) {
currentUser.setIdCard(newCode);
}
}
AppUser appUser = sysUser == null || sysUser.getAppUserId() == null
? appUserMapper.selectOne(Wrappers.<AppUser>lambdaQuery().eq(AppUser::getIdCard, oldCode)
.eq(AppUser::getDelFlag, "0").last("LIMIT 1"))
: appUserMapper.selectById(sysUser.getAppUserId());
if (appUser == null && fallbackUser != null && currentUser != null && currentUser.getAppUserId() != null) {
appUser = appUserMapper.selectById(currentUser.getAppUserId());
}
if (appUser != null) {
appUser.setIdCard(newCode);
appUserMapper.updateById(appUser);
}
}
/**

View File

@@ -120,9 +120,6 @@ public class ESJobDocument
@IndexField(fieldType = FieldType.TEXT, analyzer = Analyzer.IK_SMART, searchAnalyzer = Analyzer.IK_SMART)
private String jobCategory;
@ApiModelProperty("岗位性质,对应业务字典 job_nature")
private String jobNature;
@JsonIgnore
@ApiModelProperty("学历要求 对应字典education int类型 es方便查询")
private Integer education_int;

View File

@@ -148,10 +148,6 @@ public class Job extends BaseEntity
@ApiModelProperty("岗位分类")
private String jobCategory;
@Excel(name = "岗位性质")
@ApiModelProperty("岗位性质,对应业务字典 job_nature")
private String jobNature;
@TableField(exist = false)
@ApiModelProperty("公司性质")
private String companyNature;

View File

@@ -242,7 +242,6 @@ public class BussinessDictTypeServiceImpl implements IBussinessDictTypeService
filed.put("data_source","数据来源");
filed.put("job_url","岗位url连接");
filed.put("job_category",jobTitleMapper.selectList(null).stream().map(JobTitle::getJobName).collect(Collectors.toList()));
filed.put("job_nature",this.selectDictDataByType("job_nature").stream().map(BussinessDictData::getDictLabel).collect(Collectors.toList()));
return filed;
}
}

View File

@@ -155,6 +155,11 @@ public class CompanyServiceImpl extends ServiceImpl<CompanyMapper, Company> impl
@Override
public int updateCompany(Company company)
{
Company existingCompany = company.getCompanyId() == null
? null : companyMapper.selectById(company.getCompanyId());
boolean companyNatureChanged = existingCompany != null
&& company.getCompanyNature() != null
&& !Objects.equals(existingCompany.getCompanyNature(), company.getCompanyNature());
Long count = companyMapper.selectCount(Wrappers.<Company>lambdaQuery().eq(Company::getName, company.getName()));
if(count>1){
throw new ServiceException(company.getName()+",该公司已存在");
@@ -164,12 +169,23 @@ public class CompanyServiceImpl extends ServiceImpl<CompanyMapper, Company> impl
companyContactMapper.update(null,Wrappers.<CompanyContact>lambdaUpdate()
.eq(CompanyContact::getCompanyId, company.getCompanyId())
.set(CompanyContact::getDelFlag, Constants.Del_FLAG_DELETE));
if(Objects.isNull(company.getCompanyContactList())){return i;}
company.getCompanyContactList().forEach(x -> {
CompanyContact companyContact = new CompanyContact();
companyContact.setCompanyId(company.getCompanyId());
companyContactMapper.insert(companyContact);
});
if(!Objects.isNull(company.getCompanyContactList())){
company.getCompanyContactList().forEach(x -> {
CompanyContact companyContact = new CompanyContact();
companyContact.setCompanyId(company.getCompanyId());
BeanUtils.copyProperties(x, companyContact);
companyContactMapper.insert(companyContact);
});
}
if (companyNatureChanged) {
List<Long> jobIds = jobMapper.selectList(Wrappers.<Job>lambdaQuery()
.eq(Job::getCompanyId, company.getCompanyId()))
.stream()
.map(Job::getJobId)
.filter(Objects::nonNull)
.collect(Collectors.toList());
iesJobSearchService.batchUpdateJob(jobIds);
}
}
return i;
}

View File

@@ -220,9 +220,6 @@ public class ESJobSearchImpl implements IESJobSearchService
if (esJobDocument.getLatitude() != null) {
esJobDocument.setLatAndLon(esJobDocument.getLatitude().toString() + "," + esJobDocument.getLongitude().toString());
}
if(StringUtil.isEmptyOrNull(job.getCompanyNature())){
esJobDocument.setCompanyNature("4");
}
if (StringUtils.isNotEmpty(job.getPostingDate())) {
Date date = DateUtils.dateTime(DateUtils.YYYY_MM_DD_HH_MM_SS,job.getPostingDate());
esJobDocument.setPostingDate(date);
@@ -927,7 +924,10 @@ public class ESJobSearchImpl implements IESJobSearchService
if(job!=null){
if(job.getCompanyId()!=null){
Company company=iCompanyService.selectCompanyByCompanyId(job.getCompanyId());
job.setCode(company.getCode());
if (company != null) {
job.setCode(company.getCode());
job.setCompanyNature(company.getCompanyNature());
}
}
}
@@ -954,9 +954,6 @@ public class ESJobSearchImpl implements IESJobSearchService
if (esJobDocument.getLatitude() != null) {
esJobDocument.setLatAndLon(esJobDocument.getLatitude().toString() + "," + esJobDocument.getLongitude().toString());
}
if(StringUtil.isEmptyOrNull(job.getCompanyNature())){
esJobDocument.setCompanyNature("4");
}
ensureJobDocumentIndexExists();
LambdaEsQueryWrapper<ESJobDocument> lambdaEsQueryWrapper = new LambdaEsQueryWrapper();
@@ -1202,6 +1199,7 @@ public class ESJobSearchImpl implements IESJobSearchService
Company company = companyMap.get(job.getCompanyId());
if (company != null) {
esDoc.setCode(company.getCode());
esDoc.setCompanyNature(company.getCompanyNature());
}
}
@@ -1231,11 +1229,6 @@ public class ESJobSearchImpl implements IESJobSearchService
esDoc.setLatAndLon(esDoc.getLatitude() + "," + esDoc.getLongitude());
}
// 企业行业默认值
if (StringUtil.isEmptyOrNull(job.getCompanyNature())) {
esDoc.setCompanyNature("4");
}
return esDoc;
}

View File

@@ -456,7 +456,7 @@ public class JobServiceImpl extends ServiceImpl<JobMapper,Job> implements IJobSe
//添加附件
handleJobFile(job);
// 数据库更新成功后再同步 ES确保岗位性质等最新字段能立即反映到 PC 岗位卡片。
// 数据库更新成功后再同步 ES确保关联企业性质等最新字段能立即反映到 PC 岗位卡片。
if (Integer.valueOf(1).equals(job.getIsPublish())
|| (job.getIsPublish() == null && existingJob != null
&& Integer.valueOf(1).equals(existingJob.getIsPublish()))) {

View File

@@ -19,6 +19,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="remark" column="remark" />
<result property="description" column="description" />
<result property="nature" column="nature" />
<result property="companyNature" column="company_nature" />
<result property="totalRecruitment" column="total_recruitment" />
<result property="userId" column="user_id" />
<result property="businessLicenseUrl" column="business_license_url" />
@@ -44,7 +45,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<sql id="selectCompanyVo">
select company_id, name, location, industry, scale, del_flag, create_by, create_time, update_by, update_time, remark,code,description,nature,total_recruitment,registered_address,contact_person,contact_person_phone,is_abnormal,not_pass_reason,status,case when status='2' then update_time else null end reject_time,is_imp_company,imp_company_type,enterprise_type,legal_person,legal_id_card,legal_phone,is_hrs from company
select company_id, name, location, industry, scale, del_flag, create_by, create_time, update_by, update_time, remark,code,description,nature,company_nature,total_recruitment,registered_address,contact_person,contact_person_phone,is_abnormal,not_pass_reason,status,case when status='2' then update_time else null end reject_time,is_imp_company,imp_company_type,enterprise_type,legal_person,legal_id_card,legal_phone,is_hrs from company
</sql>
<sql id="companyIndustryFilter">
@@ -99,13 +100,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</sql>
<insert id="batchInsert" parameterType="java.util.List">
INSERT INTO company (
name, location, industry, scale, code, description, nature,
name, location, industry, scale, code, description, nature, company_nature,
create_by, create_time, del_flag
) VALUES
<foreach collection="list" item="company" separator=",">
(
#{company.name}, #{company.location}, #{company.industry}, #{company.scale},
#{company.code}, #{company.description}, #{company.nature},
#{company.code}, #{company.description}, #{company.nature}, #{company.companyNature},
#{company.createBy}, #{company.createTime}, #{company.delFlag}
)
</foreach>
@@ -127,9 +128,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<include refid="companyIndustryFilter"/>
<if test="scale != null and scale != ''"> and scale = #{scale}</if>
<if test="nature != null and nature != ''"> and nature = #{nature}</if>
<if test="companyNature != null and companyNature != ''"> and company_nature = #{companyNature}</if>
<if test="code != null and code != ''"> and code = #{code}</if>
<if test="status != null and status != ''"> and status = #{status}</if>
<if test="companyId != null and companyId != ''"> and company_id = #{companyId}</if>
<if test="userId != null"> and user_id = #{userId}</if>
<if test="isHrs != null and isHrs != ''"> and is_hrs = #{isHrs}</if>
<if test="startDate != null and startDate != ''">
and create_time >= #{startDate}
@@ -143,7 +146,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
SELECT * FROM COMPANY WHERE COMPANY_ID IN (select -1
<if test="companyNature!=null and companyNature!=''">
UNION
SELECT COMPANY_ID FROM COMPANY WHERE nature = #{companyNature}
SELECT COMPANY_ID FROM COMPANY WHERE company_nature = #{companyNature}
</if>
<if test="targ!=null and targ!=''">
UNION
@@ -160,6 +163,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<include refid="companyIndustryFilter"/>
<if test="scale != null and scale != ''"> and scale = #{scale}</if>
<if test="nature != null and nature != ''"> and nature = #{nature}</if>
<if test="companyNature != null and companyNature != ''"> and company_nature = #{companyNature}</if>
<if test="code != null and code != ''"> and code = #{code}</if>
<if test="status != null and status != ''"> and status = #{status}</if>
</where>
@@ -176,7 +180,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectAdminCompanyList" parameterType="CompanySearch" resultMap="CompanyResult">
select t.company_id, t.name, t.location, t.industry, t.scale, t.del_flag, t.create_by, t.create_time, t.update_by, t.update_time, t.remark,t.code,t.description,
t.nature,t.total_recruitment,t.registered_address,t.contact_person,t.contact_person_phone,t.is_abnormal,t.not_pass_reason,t.status,case when t.status='2'
t.nature,t.company_nature,t.total_recruitment,t.registered_address,t.contact_person,t.contact_person_phone,t.is_abnormal,t.not_pass_reason,t.status,case when t.status='2'
then t.update_time else null end reject_time,t.is_imp_company,t.imp_company_type,t.enterprise_type,t.legal_person,t.legal_id_card,t.legal_phone,t.is_hrs,
su.lc_userid from company t
left join sys_user su on t.code=su.id_card
@@ -184,6 +188,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="name != null and name != ''"> and t.name like concat('%', cast(#{name, jdbcType=VARCHAR} as varchar), '%')</if>
<if test="scale != null and scale != ''"> and t.scale = #{scale}</if>
<if test="nature != null and nature != ''"> and t.nature = #{nature}</if>
<if test="companyNature != null and companyNature != ''"> and t.company_nature = #{companyNature}</if>
<if test="code != null and code != ''"> and t.code = #{code}</if>
<if test="status != null and status != ''"> and t.status = #{status}</if>
<if test="companyId != null and companyId != ''"> and t.company_id = #{companyId}</if>

View File

@@ -31,7 +31,7 @@
<result property="jobUrl" column="job_url" />
<result property="rowId" column="row_id" />
<result property="jobCategory" column="job_category" />
<result property="jobNature" column="job_nature" />
<result property="companyNature" column="company_nature" />
<result property="isExplain" column="is_explain" />
<result property="explainUrl" column="explain_url" />
<result property="cover" column="cover" />
@@ -75,7 +75,6 @@
<result property="jobUrl" column="job_url" />
<result property="rowId" column="row_id" />
<result property="jobCategory" column="job_category" />
<result property="jobNature" column="job_nature" />
<result property="isExplain" column="is_explain" />
<result property="explainUrl" column="explain_url" />
<result property="cover" column="cover" />
@@ -114,7 +113,7 @@
</resultMap>
<sql id="selectJobVo">
select job_id, job_title, min_salary, max_salary, education, experience, company_name, job_location, posting_date, vacancies, del_flag, create_by, create_time, update_by, update_time, remark, latitude, longitude, "view", company_id , is_hot ,is_urgent,apply_num,is_publish, description,job_location_area_code,data_source,job_url,job_category,job_nature,is_explain,explain_url,cover,job_type,job_address, review_status,is_key_populations,key_populations from job
select job_id, job_title, min_salary, max_salary, education, experience, company_name, job_location, posting_date, vacancies, del_flag, create_by, create_time, update_by, update_time, remark, latitude, longitude, "view", company_id , is_hot ,is_urgent,apply_num,is_publish, description,job_location_area_code,data_source,job_url,job_category,is_explain,explain_url,cover,job_type,job_address, review_status,is_key_populations,key_populations from job
</sql>
<insert id="insertBatchRowWork">
INSERT INTO row_work (
@@ -144,7 +143,7 @@
job_title, min_salary, max_salary, education, experience, company_name, job_location,
job_location_area_code, posting_date, vacancies, latitude, longitude, "view", company_id,
is_hot, is_urgent, apply_num, description, is_publish, data_source, job_url, remark, del_flag,
create_by, create_time, row_id, job_category,job_nature,job_type,job_address,job_status,is_key_populations,
create_by, create_time, row_id, job_category,job_type,job_address,job_status,is_key_populations,
key_populations
) VALUES
<foreach collection="list" item="job" separator=",">
@@ -154,7 +153,7 @@
#{job.vacancies}, #{job.latitude}, #{job.longitude}, #{job.view}, #{job.companyId},
#{job.isHot}, #{job.isUrgent}, #{job.applyNum}, #{job.description}, #{job.isPublish}, #{job.dataSource},
#{job.jobUrl}, #{job.remark}, #{job.delFlag}, #{job.createBy}, #{job.createTime},
#{job.rowId}, #{job.jobCategory},#{job.jobNature},#{job.jobType},#{job.jobAddress},#{job.jobStatus},#{job.isKeyPopulations},#{job.keyPopulations}
#{job.rowId}, #{job.jobCategory},#{job.jobType},#{job.jobAddress},#{job.jobStatus},#{job.isKeyPopulations},#{job.keyPopulations}
)
</foreach>
</insert>
@@ -301,7 +300,7 @@
)
</select>
<select id="selectAllJob" resultMap="JobEsResult">
SELECT j.*,c.industry,c.scale,c.nature as company_nature,c.code,c.description as company_description,c.name,c.company_id,t.contact_person,t.contact_person_phone,jc.contact_person as job_contact_person,jc.contact_person_phone as job_contact_person_phone FROM job as j
SELECT j.*,c.industry,c.scale,c.company_nature,c.code,c.description as company_description,c.name,c.company_id,t.contact_person,t.contact_person_phone,jc.contact_person as job_contact_person,jc.contact_person_phone as job_contact_person_phone FROM job as j
left join company as c on c.company_id = j.company_id and j.del_flag='0' and c.del_flag='0' and c.company_status='0'
LEFT JOIN (SELECT t1.*, ROW_NUMBER() OVER (PARTITION BY t1.company_id ORDER BY t1.id) AS rn FROM company_contact AS t1 WHERE t1.del_flag = '0' ) AS t ON t.company_id = j.company_id AND t.rn = 1
LEFT JOIN (SELECT jc1.*, ROW_NUMBER() OVER(PARTITION BY jc1.job_id ORDER BY jc1.id) rn FROM job_contact jc1 WHERE jc1.del_flag='0') jc ON jc.job_id = j.job_id AND jc.rn=1
@@ -348,7 +347,7 @@
inner join bussiness_dict_data as ed on ed.dict_type = 'education' and ed.dict_value = j.education
inner join bussiness_dict_data as ex on ex.dict_type = 'experience' and ex.dict_value = j.experience
left join bussiness_dict_data as ar on ar.dict_type = 'area' and ar.dict_value = j.job_location_area_code
left join bussiness_dict_data as ab on ab.dict_type = 'company_nature' and ab.dict_value = c.nature
left join bussiness_dict_data as ab on ab.dict_type = 'company_nature' and ab.dict_value = c.company_nature
left join bussiness_dict_data as ac on ac.dict_type = 'scale' and ac.dict_value = c.scale
where job_id =#{jobId}
</select>
@@ -363,7 +362,7 @@
</select>
<select id="getJobInfo" resultType="com.ruoyi.cms.domain.Job">
SELECT j.*,c.code,c.name as companyName,c.company_id FROM job as j
SELECT j.*,c.code,c.company_nature,c.name as companyName,c.company_id FROM job as j
left join company as c on c.company_id = j.company_id and c.del_flag='0'
WHERE j.del_flag='0' AND j.job_id=#{jobId}
limit 1

View File

@@ -167,7 +167,7 @@
<select id="selectJobListByJobFairIdAndCompanyId" resultType="com.ruoyi.cms.domain.Job">
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.job_nature, j.job_address
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'