9 changed files with 210 additions and 0 deletions
			
			
		@ -0,0 +1,32 @@ | 
				
			|||
package com.epmet.service; | 
				
			|||
 | 
				
			|||
import com.epmet.commons.tools.utils.Result; | 
				
			|||
 | 
				
			|||
/** | 
				
			|||
 * @Author zxc | 
				
			|||
 * @CreateTime 2020/6/22 14:12 | 
				
			|||
 */ | 
				
			|||
public interface StatsGroupService { | 
				
			|||
 | 
				
			|||
    /** | 
				
			|||
     * @Description  统计 “网格小组”, dim:【网格-日】 | 
				
			|||
     * @param | 
				
			|||
     * @author zxc | 
				
			|||
     */ | 
				
			|||
    Result groupGridDaily(); | 
				
			|||
 | 
				
			|||
    /** | 
				
			|||
     * @Description  统计 “网格小组”, dim:【机关-日】 | 
				
			|||
     * @param | 
				
			|||
     * @author zxc | 
				
			|||
     */ | 
				
			|||
    Result groupAgencyDaily(); | 
				
			|||
 | 
				
			|||
    /** | 
				
			|||
     * @Description  统计 “网格小组”, dim:【机关-月】 | 
				
			|||
     * @param | 
				
			|||
     * @author zxc | 
				
			|||
     */ | 
				
			|||
    Result groupAgencyMonthly(); | 
				
			|||
 | 
				
			|||
} | 
				
			|||
@ -0,0 +1,30 @@ | 
				
			|||
package com.epmet.service.impl; | 
				
			|||
 | 
				
			|||
import com.epmet.service.StatsGroupService; | 
				
			|||
import feign.StatsPublicityFeignClient; | 
				
			|||
import org.springframework.beans.factory.annotation.Autowired; | 
				
			|||
 | 
				
			|||
/** | 
				
			|||
 * @Author zxc | 
				
			|||
 * @CreateTime 2020/6/22 14:13 | 
				
			|||
 */ | 
				
			|||
public class StatsGroupServiceImpl implements StatsGroupService { | 
				
			|||
 | 
				
			|||
    @Autowired | 
				
			|||
    private StatsPublicityFeignClient statsPublicityFeignClient; | 
				
			|||
 | 
				
			|||
    @Override | 
				
			|||
    public void groupGridDaily() { | 
				
			|||
        statsPublicityFeignClient.groupGridDaily(); | 
				
			|||
    } | 
				
			|||
 | 
				
			|||
    @Override | 
				
			|||
    public void groupAgencyDaily() { | 
				
			|||
        statsPublicityFeignClient.groupAgencyDaily(); | 
				
			|||
    } | 
				
			|||
 | 
				
			|||
    @Override | 
				
			|||
    public void groupAgencyMonthly() { | 
				
			|||
        statsPublicityFeignClient.groupAgencyMonthly(); | 
				
			|||
    } | 
				
			|||
} | 
				
			|||
@ -0,0 +1,32 @@ | 
				
			|||
package com.epmet.task; | 
				
			|||
 | 
				
			|||
import com.epmet.commons.tools.utils.Result; | 
				
			|||
import com.epmet.service.StatsGroupService; | 
				
			|||
import org.slf4j.Logger; | 
				
			|||
import org.slf4j.LoggerFactory; | 
				
			|||
import org.springframework.beans.factory.annotation.Autowired; | 
				
			|||
 | 
				
			|||
/** | 
				
			|||
 * @Author zxc | 
				
			|||
 * @CreateTime 2020/6/22 14:09 | 
				
			|||
 * | 
				
			|||
 * 统计 “网格小组”, dim:【机关-日】 | 
				
			|||
 */ | 
				
			|||
public class StatsGroupAgencyDailyTask implements ITask { | 
				
			|||
 | 
				
			|||
    @Autowired | 
				
			|||
    private StatsGroupService statsGroupService; | 
				
			|||
 | 
				
			|||
    private Logger logger = LoggerFactory.getLogger(getClass()); | 
				
			|||
 | 
				
			|||
    @Override | 
				
			|||
    public void run(String params) { | 
				
			|||
        logger.debug("StatsGroupAgencyDailyTask定时任务正在执行,参数为:{}", params); | 
				
			|||
        Result result = statsGroupService.groupGridDaily(); | 
				
			|||
        if (result.success()){ | 
				
			|||
            logger.debug("StatsGroupAgencyDailyTask定时任务正在执行定时任务执行成功"); | 
				
			|||
        }else { | 
				
			|||
            logger.debug("StatsGroupAgencyDailyTask定时任务正在执行定时任务执行失败:" + result.getMsg()); | 
				
			|||
        } | 
				
			|||
    } | 
				
			|||
} | 
				
			|||
@ -0,0 +1,32 @@ | 
				
			|||
package com.epmet.task; | 
				
			|||
 | 
				
			|||
import com.epmet.commons.tools.utils.Result; | 
				
			|||
import com.epmet.service.StatsGroupService; | 
				
			|||
import org.slf4j.Logger; | 
				
			|||
import org.slf4j.LoggerFactory; | 
				
			|||
import org.springframework.beans.factory.annotation.Autowired; | 
				
			|||
 | 
				
			|||
/** | 
				
			|||
 * @Author zxc | 
				
			|||
 * @CreateTime 2020/6/22 14:09 | 
				
			|||
 * | 
				
			|||
 * 统计 “网格小组”, dim:【机关-日】 | 
				
			|||
 */ | 
				
			|||
public class StatsGroupAgencyMonthlyTask implements ITask { | 
				
			|||
 | 
				
			|||
    @Autowired | 
				
			|||
    private StatsGroupService statsGroupService; | 
				
			|||
 | 
				
			|||
    private Logger logger = LoggerFactory.getLogger(getClass()); | 
				
			|||
 | 
				
			|||
    @Override | 
				
			|||
    public void run(String params) { | 
				
			|||
        logger.debug("StatsGroupAgencyMonthlyTask定时任务正在执行,参数为:{}", params); | 
				
			|||
        Result result = statsGroupService.groupAgencyMonthly(); | 
				
			|||
        if (result.success()){ | 
				
			|||
            logger.debug("StatsGroupAgencyMonthlyTask定时任务正在执行定时任务执行成功"); | 
				
			|||
        }else { | 
				
			|||
            logger.debug("StatsGroupAgencyMonthlyTask定时任务正在执行定时任务执行失败:" + result.getMsg()); | 
				
			|||
        } | 
				
			|||
    } | 
				
			|||
} | 
				
			|||
@ -0,0 +1,33 @@ | 
				
			|||
package com.epmet.task; | 
				
			|||
 | 
				
			|||
import com.epmet.commons.tools.utils.Result; | 
				
			|||
import com.epmet.service.StatsGroupService; | 
				
			|||
import org.slf4j.Logger; | 
				
			|||
import org.slf4j.LoggerFactory; | 
				
			|||
import org.springframework.beans.factory.annotation.Autowired; | 
				
			|||
 | 
				
			|||
/** | 
				
			|||
 * @Author zxc | 
				
			|||
 * @CreateTime 2020/6/22 14:09 | 
				
			|||
 * | 
				
			|||
 * 统计 “网格小组”, dim:【网格-日】 | 
				
			|||
 * | 
				
			|||
 */ | 
				
			|||
public class StatsGroupGridDailyTask implements ITask { | 
				
			|||
 | 
				
			|||
    @Autowired | 
				
			|||
    private StatsGroupService statsGroupService; | 
				
			|||
 | 
				
			|||
    private Logger logger = LoggerFactory.getLogger(getClass()); | 
				
			|||
 | 
				
			|||
    @Override | 
				
			|||
    public void run(String params) { | 
				
			|||
        logger.debug("StatsGroupGridDailyTask定时任务正在执行,参数为:{}", params); | 
				
			|||
        Result result = statsGroupService.groupAgencyDaily(); | 
				
			|||
        if (result.success()){ | 
				
			|||
            logger.debug("StatsGroupGridDailyTask定时任务正在执行定时任务执行成功"); | 
				
			|||
        }else { | 
				
			|||
            logger.debug("StatsGroupGridDailyTask定时任务正在执行定时任务执行失败:" + result.getMsg()); | 
				
			|||
        } | 
				
			|||
    } | 
				
			|||
} | 
				
			|||
					Loading…
					
					
				
		Reference in new issue