bug--修复菜单权限问题以及定时任务

This commit is contained in:
taozi
2020-07-10 17:22:34 +08:00
parent 3c8b165786
commit 75304db04c
23 changed files with 301 additions and 63 deletions

View File

@ -113,7 +113,7 @@ public class QuartzJobController {
@PutMapping
@PreAuthorize("@el.check('admin','timing:edit')")
public ResponseEntity<Object> update(@Validated @RequestBody QuartzJob resources){
quartzJobService.saveOrUpdate(resources);
quartzJobService.updateById(resources);
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
}

View File

@ -121,6 +121,24 @@ public class QuartzJobServiceImpl extends BaseServiceImpl<QuartzJobMapper, Quart
this.saveOrUpdate(quartzJob);
}
@Override
public boolean save(QuartzJob quartzJob) {
if (quartzJob.getIsPause()) {
quartzManage.pauseJob(quartzJob);
}
return retBool(baseMapper.insert(quartzJob));
}
@Override
public boolean updateById(QuartzJob quartzJob) {
if (quartzJob.getIsPause()) {
quartzManage.pauseJob(quartzJob);
} else {
quartzManage.resumeJob(quartzJob);
}
return retBool(baseMapper.updateById(quartzJob));
}
/**
* 立即执行定时任务
*

View File

@ -30,7 +30,7 @@ public class JobQueryCriteria {
@Query
private Long deptId;
@Query(propName = "deptIds", type = Query.Type.IN)
@Query(propName = "deptId", type = Query.Type.IN)
private Set<Long> deptIds;
@Query(type = Query.Type.BETWEEN)