|
@ -5,6 +5,7 @@ import com.yihu.wlyy.statistics.dao.DoctorPatientGroupInfoDao;
|
|
import com.yihu.wlyy.statistics.dao.QuartzJobConfigDao;
|
|
import com.yihu.wlyy.statistics.dao.QuartzJobConfigDao;
|
|
import com.yihu.wlyy.statistics.dao.SignFamilyDao;
|
|
import com.yihu.wlyy.statistics.dao.SignFamilyDao;
|
|
import com.yihu.wlyy.statistics.etl.cache.Cache;
|
|
import com.yihu.wlyy.statistics.etl.cache.Cache;
|
|
|
|
import com.yihu.wlyy.statistics.job.business.CacheCleanJob;
|
|
import com.yihu.wlyy.statistics.util.QuartzHelper;
|
|
import com.yihu.wlyy.statistics.util.QuartzHelper;
|
|
import com.yihu.wlyy.statistics.vo.WlyyJobConfigVO;
|
|
import com.yihu.wlyy.statistics.vo.WlyyJobConfigVO;
|
|
import org.springframework.beans.BeanUtils;
|
|
import org.springframework.beans.BeanUtils;
|
|
@ -412,4 +413,21 @@ public class JobService {
|
|
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public void startCleanCacheJob() throws Exception {
|
|
|
|
if (!quartzHelper.isExistJob(CacheCleanJob.jobKey)) {
|
|
|
|
quartzHelper.addJob(CacheCleanJob.class, CacheCleanJob.cron, CacheCleanJob.jobKey, new HashMap<>());
|
|
|
|
} else {
|
|
|
|
throw new Exception("已经启动");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
public void stopCleanCacheJob() throws Exception {
|
|
|
|
if (quartzHelper.isExistJob(CacheCleanJob.jobKey)) {
|
|
|
|
quartzHelper.removeJob(CacheCleanJob.jobKey);
|
|
|
|
} else {
|
|
|
|
throw new Exception("已经停止");
|
|
|
|
}
|
|
|
|
}
|
|
}
|
|
}
|