| | |
| | | package com.ruoyi.web.controller.task; |
| | | |
| | | import com.alibaba.fastjson2.JSONObject; |
| | | import com.ruoyi.common.constant.Constants; |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.core.redis.RedisCache; |
| | | import com.ruoyi.common.utils.http.HttpUtils; |
| | | import com.ruoyi.system.utils.util.AIUtil; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.scheduling.annotation.Scheduled; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import java.time.LocalDate; |
| | | import java.util.Set; |
| | | |
| | | /** |
| | | * @author xiaochen |
| | |
| | | @Component |
| | | public class TaskUtil { |
| | | |
| | | @Scheduled(cron = "0 0 0 * * ?") |
| | | @Autowired |
| | | private RedisCache redisCache; |
| | | @Autowired |
| | | private AIUtil aiUtil; |
| | | |
| | | @Scheduled(fixedRate = 86460000) |
| | | // @Scheduled(cron = "10 0 0 * * ?") |
| | | public void dayOfProportionBill() { |
| | | try { |
| | | |
| | | |
| | | |
| | | // 查询跳转检测的用户 |
| | | Set<String> cacheSet = redisCache.getCacheSet(Constants.AI_USER_INSPECTION); |
| | | // 获取前一天时间 |
| | | LocalDate lastDay = LocalDate.now().minusDays(1); |
| | | for (String phone : cacheSet) { |
| | | R<JSONObject> result = aiUtil.reportQuery(phone, lastDay.toString(), lastDay.toString()); |
| | | JSONObject data = result.getData(); |
| | | System.err.println(data); |
| | | } |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |