9 changed files with 131 additions and 5 deletions
@ -0,0 +1,43 @@ |
|||||
|
package com.elink.esua.epdc.task.user; |
||||
|
|
||||
|
import com.alibaba.fastjson.JSONObject; |
||||
|
import com.elink.esua.epdc.dto.ScreenIndexBasicDataParamDTO; |
||||
|
import com.elink.esua.epdc.dto.screen.form.ScreenJobFormDTO; |
||||
|
import com.elink.esua.epdc.feign.AnalysisFeignClient; |
||||
|
import com.elink.esua.epdc.feign.UserFeignClient; |
||||
|
import com.elink.esua.epdc.task.screen.ScreenIndexDataPushTask; |
||||
|
import org.apache.commons.lang3.StringUtils; |
||||
|
import org.slf4j.Logger; |
||||
|
import org.slf4j.LoggerFactory; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.stereotype.Component; |
||||
|
|
||||
|
/** |
||||
|
* 用户模块 |
||||
|
* |
||||
|
* @Author:liuchuang |
||||
|
* @Date:2020/9/9 15:19 |
||||
|
*/ |
||||
|
@Component("screenUserPointsResetTask") |
||||
|
public class ScreenUserPointsResetImpl implements ScreenUserPointsResetTask { |
||||
|
|
||||
|
private final Logger logger = LoggerFactory.getLogger(getClass()); |
||||
|
|
||||
|
@Autowired |
||||
|
private UserFeignClient userFeignClient; |
||||
|
|
||||
|
@Override |
||||
|
public void run() { |
||||
|
// 用户季度积分重置
|
||||
|
resetUserPoints(); |
||||
|
} |
||||
|
|
||||
|
public void resetUserPoints() { |
||||
|
// 方法名
|
||||
|
String methodName = Thread.currentThread().getStackTrace()[2].getMethodName(); |
||||
|
logger.info("<" + methodName + "|用户积分季度重置>定时任务开始"); |
||||
|
userFeignClient.resetPoints(); |
||||
|
logger.info("<" + methodName + "|用户积分季度重置>定时任务结束"); |
||||
|
} |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,19 @@ |
|||||
|
package com.elink.esua.epdc.task.user; |
||||
|
|
||||
|
/** |
||||
|
* 用户积分重置模块 |
||||
|
* |
||||
|
* @Author:liuchuang |
||||
|
* @Date:2020/9/9 15:20 |
||||
|
*/ |
||||
|
public interface ScreenUserPointsResetTask { |
||||
|
|
||||
|
/** |
||||
|
* 用户积分重置模块 |
||||
|
* @param param 入参 |
||||
|
* @return void |
||||
|
* @author syp |
||||
|
* @since 2020/9/9 15:21 |
||||
|
*/ |
||||
|
void run(); |
||||
|
} |
||||
Loading…
Reference in new issue