Merge branch 'version_performance_2.0' of http://gitlab.ldxinyong.com/enterpriseManagement/lz_management into version_performance_2.0
This commit is contained in:
commit
367bd1f366
@ -12,6 +12,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.lz.modules.job.entity.ScheduleJobEntity;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
@ -26,4 +27,6 @@ public interface ScheduleJobDao extends BaseMapper<ScheduleJobEntity> {
|
||||
* 批量更新状态
|
||||
*/
|
||||
int updateBatch(Map<String, Object> map);
|
||||
|
||||
List<ScheduleJobEntity> selectAll();
|
||||
}
|
||||
|
||||
@ -33,12 +33,18 @@ public class ScheduleJobServiceImpl extends ServiceImpl<ScheduleJobDao, Schedule
|
||||
@Autowired
|
||||
private Scheduler scheduler;
|
||||
|
||||
|
||||
|
||||
@Autowired
|
||||
private ScheduleJobDao scheduleJobMapper;
|
||||
|
||||
|
||||
/**
|
||||
* 项目启动时,初始化定时器
|
||||
*/
|
||||
@PostConstruct
|
||||
public void init(){
|
||||
List<ScheduleJobEntity> scheduleJobList = this.list();
|
||||
List<ScheduleJobEntity> scheduleJobList = scheduleJobMapper.selectAll();
|
||||
for(ScheduleJobEntity scheduleJob : scheduleJobList){
|
||||
CronTrigger cronTrigger = ScheduleUtils.getCronTrigger(scheduler, scheduleJob.getJobId());
|
||||
//如果不存在,则创建
|
||||
|
||||
@ -1463,7 +1463,7 @@ public class ResultRecordServiceImpl extends ServiceImpl<ResultRecordMapper, Res
|
||||
if(CollectionUtils.isEmpty(flowRecordRunning) ){
|
||||
flowRecords = flowRecordService.selectFlowRecordByResultRecordId(recordDetailDto.getResultRecordId());
|
||||
}else{
|
||||
flowRecords = flowRecordService.selectFlowRecordByRecordIdLeFlowIndex(recordDetailDto.getResultRecordId(),flowRecordRunning.get(0).getFlowIndex());
|
||||
flowRecords = flowRecordService.selectFlowRecordByRecordIdLeFlowIndex(recordDetailDto.getResultRecordId(),flowRecordRunning.get(0).getFlowIndex() -1 );
|
||||
}
|
||||
int flowIndex = 0;
|
||||
List<ResetDataResp> resetDataResps = new ArrayList<>();
|
||||
|
||||
@ -11,4 +11,10 @@
|
||||
</foreach>
|
||||
</update>
|
||||
|
||||
|
||||
<select id="selectAll" resultType="com.lz.modules.job.entity.ScheduleJobEntity">
|
||||
select * from schedule_job where status = 0
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user