修改查询下架岗位sql
This commit is contained in:
@@ -65,7 +65,7 @@ public interface JobMapper extends BaseMapper<Job>
|
||||
|
||||
public int updateStatus(Job job);
|
||||
|
||||
List<Job> getJobDownList();
|
||||
List<Long> getJobDownList();
|
||||
|
||||
void updateJobDown(List<Long> list);
|
||||
}
|
||||
|
||||
@@ -1405,8 +1405,7 @@ public class JobServiceImpl extends ServiceImpl<JobMapper,Job> implements IJobSe
|
||||
@Override
|
||||
public void updateJobDown() {
|
||||
//查询下架岗位
|
||||
List<Job> list=jobMapper.getJobDownList();
|
||||
List<Long> ids=list.stream().map(Job::getJobId).collect(Collectors.toList());
|
||||
List<Long> ids=jobMapper.getJobDownList();
|
||||
//更新岗位状态
|
||||
jobMapper.updateJobDown(ids);
|
||||
//刷新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>
|
||||
|
||||
<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>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user