6 changed files with 98 additions and 1 deletions
			
			
		@ -0,0 +1,32 @@ | 
				
			|||||
 | 
					package com.epmet.task; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					import com.epmet.commons.tools.utils.Result; | 
				
			||||
 | 
					import com.epmet.service.DimInitService; | 
				
			||||
 | 
					import com.epmet.service.StatsGroupService; | 
				
			||||
 | 
					import lombok.extern.slf4j.Slf4j; | 
				
			||||
 | 
					import org.springframework.beans.factory.annotation.Autowired; | 
				
			||||
 | 
					import org.springframework.stereotype.Component; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					/** | 
				
			||||
 | 
					 * @dscription 小组总数日统计和热议话题日统计任务【因任务中用到了其他日统计表数据,需要在那些日统计任务之后单独执行】 | 
				
			||||
 | 
					 *  每天凌晨三点执行【0 0 3 * * ?】 | 
				
			||||
 | 
					 * @author sun | 
				
			||||
 | 
					 */ | 
				
			||||
 | 
					@Slf4j | 
				
			||||
 | 
					@Component("groupAndHotTopicTask") | 
				
			||||
 | 
					public class GroupAndHotTopicTask implements ITask { | 
				
			||||
 | 
					
 | 
				
			||||
 | 
						@Autowired | 
				
			||||
 | 
						private StatsGroupService statsGroupService; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
						@Override | 
				
			||||
 | 
						public void run(String params) { | 
				
			||||
 | 
							log.debug("groupAndHotTopicTask定时任务正在执行,参数为:{}", params); | 
				
			||||
 | 
							Result result = statsGroupService.groupAndHotTopicTask(); | 
				
			||||
 | 
							if (result.success()){ | 
				
			||||
 | 
								log.debug("groupAndHotTopicTask定时任务正在执行定时任务执行成功"); | 
				
			||||
 | 
							}else { | 
				
			||||
 | 
								log.debug("groupAndHotTopicTask定时任务正在执行定时任务执行失败:" + result.getMsg()); | 
				
			||||
 | 
							} | 
				
			||||
 | 
						} | 
				
			||||
 | 
					} | 
				
			||||
					Loading…
					
					
				
		Reference in new issue