This commit is contained in:
577732344@qq.com
2025-09-24 12:19:33 +08:00
parent bb3bc5b701
commit be1004c9ab
3 changed files with 7 additions and 5 deletions

View File

@@ -73,7 +73,7 @@ public class Job extends BaseEntity
@JsonFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "发布时间", width = 30, dateFormat = "yyyy-MM-dd") @Excel(name = "发布时间", width = 30, dateFormat = "yyyy-MM-dd")
@ApiModelProperty("发布时间") @ApiModelProperty("发布时间")
private Date postingDate; private String postingDate;
/** 招聘人数 */ /** 招聘人数 */
@Excel(name = "招聘人数") @Excel(name = "招聘人数")

View File

@@ -255,10 +255,12 @@ public class JobServiceImpl extends ServiceImpl<JobMapper,Job> implements IJobSe
@Override @Override
public int updateJob(Job job) public int updateJob(Job job)
{ {
LocalDateTime now = LocalDateTime.now();
String formattedDate = now.format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"));
//修改岗位状态 //修改岗位状态
if(job.getIsPublish()!=null) { if(job.getIsPublish()!=null) {
if(job.getIsPublish()==1){ if(job.getIsPublish()==1){
job.setPostingDate(new Date()); job.setPostingDate(formattedDate);
}else { }else {
job.setPostingDate(null); job.setPostingDate(null);
} }
@@ -596,7 +598,7 @@ public class JobServiceImpl extends ServiceImpl<JobMapper,Job> implements IJobSe
} }
job.setCompanyName(rowWork.getAAB004()); job.setCompanyName(rowWork.getAAB004());
job.setJobLocation(rowWork.getAAE006()); job.setJobLocation(rowWork.getAAE006());
job.setPostingDate(new Date()); job.setPostingDate(formattedDate);
job.setJobCategory(rowWork.getJobCategory()); job.setJobCategory(rowWork.getJobCategory());
if (rowWork.getAcb240() == null) { if (rowWork.getAcb240() == null) {
job.setVacancies(-1L); job.setVacancies(-1L);

View File

@@ -126,7 +126,7 @@
<if test="experience != null and experience != ''"> and experience = #{experience}</if> <if test="experience != null and experience != ''"> and experience = #{experience}</if>
<if test="companyName != null and companyName != ''"> and company_name like concat('%', #{companyName}, '%')</if> <if test="companyName != null and companyName != ''"> and company_name like concat('%', #{companyName}, '%')</if>
<if test="jobLocation != null and jobLocation != ''"> and job_location = #{jobLocation}</if> <if test="jobLocation != null and jobLocation != ''"> and job_location = #{jobLocation}</if>
<if test="postingDate != null "> and posting_date = #{postingDate}</if> <if test="postingDate != null and postingDate!=''"> and posting_date = #{postingDate}</if>
<if test="vacancies != null "> and vacancies = #{vacancies}</if> <if test="vacancies != null "> and vacancies = #{vacancies}</if>
<if test="latitude != null "> and latitude = #{latitude}</if> <if test="latitude != null "> and latitude = #{latitude}</if>
<if test="longitude != null "> and longitude = #{longitude}</if> <if test="longitude != null "> and longitude = #{longitude}</if>
@@ -147,7 +147,7 @@
<if test="experience != null and experience != ''"> and experience = #{experience}</if> <if test="experience != null and experience != ''"> and experience = #{experience}</if>
<if test="companyName != null and companyName != ''"> and company_name like concat('%', #{companyName}, '%')</if> <if test="companyName != null and companyName != ''"> and company_name like concat('%', #{companyName}, '%')</if>
<if test="jobLocation != null and jobLocation != ''"> and job_location = #{jobLocation}</if> <if test="jobLocation != null and jobLocation != ''"> and job_location = #{jobLocation}</if>
<if test="postingDate != null "> and posting_date = #{postingDate}</if> <if test="postingDate != null and postingDate!='' "> and posting_date = #{postingDate}</if>
<if test="vacancies != null "> and vacancies = #{vacancies}</if> <if test="vacancies != null "> and vacancies = #{vacancies}</if>
<if test="latitude != null "> and latitude = #{latitude}</if> <if test="latitude != null "> and latitude = #{latitude}</if>
<if test="longitude != null "> and longitude = #{longitude}</if> <if test="longitude != null "> and longitude = #{longitude}</if>