Commit 0d3ac973 authored by 王亮's avatar 王亮

update job handler after merging master.

parent 661d4ece
......@@ -5,11 +5,9 @@ import cn.quantgroup.xyqb.entity.UserTag;
import cn.quantgroup.xyqb.repository.IUserRepository;
import cn.quantgroup.xyqb.repository.IUserTagRepository;
import com.xxl.job.core.biz.model.ReturnT;
import com.xxl.job.core.handler.IJobHandler;
import com.xxl.job.core.handler.annotation.JobHandler;
import com.xxl.job.core.handler.annotation.XxlJob;
import org.apache.commons.collections.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationEventPublisher;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.domain.Pageable;
......@@ -22,15 +20,14 @@ import java.util.stream.Collectors;
* 第一次上线对历史数据清理程序
*/
@Component
@JobHandler(value = "UserTagCleanJobHandler")
public class UserTagCleanJobHandler extends IJobHandler {
public class UserTagCleanJobHandler {
@Autowired
private IUserRepository userRepository;
@Autowired
private IUserTagRepository userTagRepository;
@Override
@XxlJob(value = "WechatFollowStatusJobHandler")
public ReturnT<String> execute(String param) throws Exception {
Pageable pageable = new PageRequest(0, 500);
Page<User> userPage = userRepository.findAll(pageable);
......@@ -50,6 +47,6 @@ public class UserTagCleanJobHandler extends IJobHandler {
userPage = userRepository.findAll(pageable);
}
return null;
return ReturnT.SUCCESS;
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment