修改查询下架岗位sql
This commit is contained in:
@@ -65,7 +65,7 @@ public interface JobMapper extends BaseMapper<Job>
|
|||||||
|
|
||||||
public int updateStatus(Job job);
|
public int updateStatus(Job job);
|
||||||
|
|
||||||
List<Job> getJobDownList();
|
List<Long> getJobDownList();
|
||||||
|
|
||||||
void updateJobDown(List<Long> list);
|
void updateJobDown(List<Long> list);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1405,8 +1405,7 @@ public class JobServiceImpl extends ServiceImpl<JobMapper,Job> implements IJobSe
|
|||||||
@Override
|
@Override
|
||||||
public void updateJobDown() {
|
public void updateJobDown() {
|
||||||
//查询下架岗位
|
//查询下架岗位
|
||||||
List<Job> list=jobMapper.getJobDownList();
|
List<Long> ids=jobMapper.getJobDownList();
|
||||||
List<Long> ids=list.stream().map(Job::getJobId).collect(Collectors.toList());
|
|
||||||
//更新岗位状态
|
//更新岗位状态
|
||||||
jobMapper.updateJobDown(ids);
|
jobMapper.updateJobDown(ids);
|
||||||
//刷新es
|
//刷新es
|
||||||
|
|||||||
@@ -391,7 +391,7 @@
|
|||||||
update job set job_status=#{jobStatus},down_time=#{downTime},update_time=#{updateTime},update_by=#{updateBy} where job_id=#{jobId}
|
update job set job_status=#{jobStatus},down_time=#{downTime},update_time=#{updateTime},update_by=#{updateBy} where job_id=#{jobId}
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
<select id="getJobDownList" resultType="java.util.List">
|
<select id="getJobDownList" resultType="java.lang.Long">
|
||||||
select job_id from job where down_time <=now() and job_status='0'
|
select job_id from job where down_time <=now() and job_status='0'
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user