|
@@ -62,7 +62,9 @@ import static com.citu.module.menduner.system.enums.ErrorCodeConstants.*;
|
|
|
@Validated
|
|
@Validated
|
|
|
public class JobAdvertisedServiceImpl implements JobAdvertisedService {
|
|
public class JobAdvertisedServiceImpl implements JobAdvertisedService {
|
|
|
|
|
|
|
|
- /** 默认管理员的企业id和用户id **/
|
|
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 默认管理员的企业id和用户id
|
|
|
|
|
+ **/
|
|
|
private static final Long DEFAULT_ENTERPRISE_ID = 1L;
|
|
private static final Long DEFAULT_ENTERPRISE_ID = 1L;
|
|
|
private static final Long DEFAULT_USER_ID = 1L;
|
|
private static final Long DEFAULT_USER_ID = 1L;
|
|
|
@Resource
|
|
@Resource
|
|
@@ -87,7 +89,7 @@ public class JobAdvertisedServiceImpl implements JobAdvertisedService {
|
|
|
jobAdvertised.setHire(true);
|
|
jobAdvertised.setHire(true);
|
|
|
jobAdvertised.setEnterpriseId(DEFAULT_ENTERPRISE_ID);
|
|
jobAdvertised.setEnterpriseId(DEFAULT_ENTERPRISE_ID);
|
|
|
jobAdvertised.setUserId(DEFAULT_USER_ID);
|
|
jobAdvertised.setUserId(DEFAULT_USER_ID);
|
|
|
- return save(jobAdvertised, DEFAULT_ENTERPRISE_ID, DEFAULT_USER_ID);
|
|
|
|
|
|
|
+ return save(jobAdvertised, DEFAULT_ENTERPRISE_ID, DEFAULT_USER_ID);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
@@ -114,7 +116,7 @@ public class JobAdvertisedServiceImpl implements JobAdvertisedService {
|
|
|
|
|
|
|
|
private JobAdvertisedDO validateJobAdvertisedExists(Long id) {
|
|
private JobAdvertisedDO validateJobAdvertisedExists(Long id) {
|
|
|
JobAdvertisedDO jobAdvertised = mapper.selectById(id);
|
|
JobAdvertisedDO jobAdvertised = mapper.selectById(id);
|
|
|
- if (null==jobAdvertised) {
|
|
|
|
|
|
|
+ if (null == jobAdvertised) {
|
|
|
throw exception(MDE_JOB_ADVERTISED_NOT_EXISTS);
|
|
throw exception(MDE_JOB_ADVERTISED_NOT_EXISTS);
|
|
|
}
|
|
}
|
|
|
return jobAdvertised;
|
|
return jobAdvertised;
|
|
@@ -318,9 +320,15 @@ public class JobAdvertisedServiceImpl implements JobAdvertisedService {
|
|
|
}
|
|
}
|
|
|
for (JobAdvertisedRespVO resp : respList) {
|
|
for (JobAdvertisedRespVO resp : respList) {
|
|
|
// 设置字典真实值
|
|
// 设置字典真实值
|
|
|
- resp.setType(DictFrameworkUtils.getDictDataLabel(MENDUNER_JOB_TYPE, resp.getType()));
|
|
|
|
|
- resp.setEduType(DictFrameworkUtils.getDictDataLabel(MENDUNER_EDUCATION_TYPE, resp.getEduType()));
|
|
|
|
|
- resp.setExpType(DictFrameworkUtils.getDictDataLabel(MENDUNER_EXP_TYPE, resp.getExpType()));
|
|
|
|
|
|
|
+ if (null != resp.getType()) {
|
|
|
|
|
+ resp.setType(DictFrameworkUtils.getDictDataLabel(MENDUNER_JOB_TYPE, resp.getType()));
|
|
|
|
|
+ }
|
|
|
|
|
+ if (null != resp.getEduType()) {
|
|
|
|
|
+ resp.setEduType(DictFrameworkUtils.getDictDataLabel(MENDUNER_EDUCATION_TYPE, resp.getEduType()));
|
|
|
|
|
+ }
|
|
|
|
|
+ if (null != resp.getExpType()) {
|
|
|
|
|
+ resp.setExpType(DictFrameworkUtils.getDictDataLabel(MENDUNER_EXP_TYPE, resp.getExpType()));
|
|
|
|
|
+ }
|
|
|
if (null != resp.getPayUnit()) {
|
|
if (null != resp.getPayUnit()) {
|
|
|
resp.setPayUnit(DictFrameworkUtils.getDictDataLabel(MENDUNER_PAY_UNIT, resp.getPayUnit()));
|
|
resp.setPayUnit(DictFrameworkUtils.getDictDataLabel(MENDUNER_PAY_UNIT, resp.getPayUnit()));
|
|
|
}
|
|
}
|
|
@@ -395,7 +403,7 @@ public class JobAdvertisedServiceImpl implements JobAdvertisedService {
|
|
|
*/
|
|
*/
|
|
|
private void processNewJob(JobAdvertisedDO job, Long enterpriseId, Long userId) {
|
|
private void processNewJob(JobAdvertisedDO job, Long enterpriseId, Long userId) {
|
|
|
// 验证权益
|
|
// 验证权益
|
|
|
- vipEntitlementCheckAspect.validate(VipEntitlementCheck.OPERATE_PUBLISH_JOB,!job.getHire());
|
|
|
|
|
|
|
+ vipEntitlementCheckAspect.validate(VipEntitlementCheck.OPERATE_PUBLISH_JOB, !job.getHire());
|
|
|
|
|
|
|
|
|
|
|
|
|
// 设置默认值
|
|
// 设置默认值
|
|
@@ -406,7 +414,7 @@ public class JobAdvertisedServiceImpl implements JobAdvertisedService {
|
|
|
if (StringUtils.hasText(job.getStatus())) {
|
|
if (StringUtils.hasText(job.getStatus())) {
|
|
|
// 有保存状态则写入保存的状态
|
|
// 有保存状态则写入保存的状态
|
|
|
job.setStatus(job.getStatus());
|
|
job.setStatus(job.getStatus());
|
|
|
- }else {
|
|
|
|
|
|
|
+ } else {
|
|
|
if (!job.getHire()) {
|
|
if (!job.getHire()) {
|
|
|
// 不是众聘职位
|
|
// 不是众聘职位
|
|
|
job.setHirePrice(0L);
|
|
job.setHirePrice(0L);
|
|
@@ -422,7 +430,7 @@ public class JobAdvertisedServiceImpl implements JobAdvertisedService {
|
|
|
|
|
|
|
|
// 处理权益
|
|
// 处理权益
|
|
|
vipEntitlementCheckAspect
|
|
vipEntitlementCheckAspect
|
|
|
- .process(VipEntitlementCheck.OPERATE_PUBLISH_JOB, VipEntitlementCheck.OperationType.DEDUCT,!job.getHire());
|
|
|
|
|
|
|
+ .process(VipEntitlementCheck.OPERATE_PUBLISH_JOB, VipEntitlementCheck.OperationType.DEDUCT, !job.getHire());
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|