|
|
@@ -1,7 +1,21 @@
|
|
|
-package com.zhongzheng.controller.grade;
|
|
|
+package com.zhongzheng.modules.schedule.service.impl;
|
|
|
|
|
|
+import cn.hutool.core.bean.BeanUtil;
|
|
|
+import cn.hutool.core.convert.Convert;
|
|
|
+import cn.hutool.core.util.StrUtil;
|
|
|
+import cn.hutool.http.HttpStatus;
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
+import com.alibaba.fastjson.JSONArray;
|
|
|
+import com.alibaba.fastjson.JSONObject;
|
|
|
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
|
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
+import com.fasterxml.jackson.databind.ObjectMapper;
|
|
|
+import com.github.pagehelper.Page;
|
|
|
+import com.zhongzheng.common.core.redis.RedisCache;
|
|
|
import com.zhongzheng.common.utils.DateUtils;
|
|
|
+import com.zhongzheng.common.utils.http.HttpUtils;
|
|
|
+import com.zhongzheng.common.utils.polyv.PolyvUtils;
|
|
|
import com.zhongzheng.modules.base.service.IProfileTpService;
|
|
|
import com.zhongzheng.modules.base.vo.ProfileTpVo;
|
|
|
import com.zhongzheng.modules.goods.service.IGoodsService;
|
|
|
@@ -10,33 +24,52 @@ import com.zhongzheng.modules.grade.service.IClassGradeGoodsService;
|
|
|
import com.zhongzheng.modules.grade.service.IClassGradeService;
|
|
|
import com.zhongzheng.modules.grade.service.IClassGradeUserService;
|
|
|
import com.zhongzheng.modules.inform.bo.InformUserAddBo;
|
|
|
-import com.zhongzheng.modules.inform.domain.Inform;
|
|
|
import com.zhongzheng.modules.inform.service.IInformRemindService;
|
|
|
import com.zhongzheng.modules.inform.service.IInformService;
|
|
|
import com.zhongzheng.modules.inform.service.IInformUserService;
|
|
|
import com.zhongzheng.modules.inform.vo.InformRemindVo;
|
|
|
-import com.zhongzheng.modules.order.bo.OrderGoodsAddBo;
|
|
|
import com.zhongzheng.modules.order.mapper.OrderMapper;
|
|
|
import com.zhongzheng.modules.order.service.IOrderBusinessService;
|
|
|
import com.zhongzheng.modules.order.service.IOrderGoodsService;
|
|
|
import com.zhongzheng.modules.order.vo.OrderGoodsVo;
|
|
|
+import com.zhongzheng.modules.polyv.bo.PolyvVideoAddBo;
|
|
|
+import com.zhongzheng.modules.polyv.bo.PolyvVideoEditBo;
|
|
|
+import com.zhongzheng.modules.polyv.bo.PolyvVideoQueryBo;
|
|
|
+import com.zhongzheng.modules.polyv.domain.PolyvVideDo;
|
|
|
+import com.zhongzheng.modules.polyv.domain.PolyvVideo;
|
|
|
+import com.zhongzheng.modules.polyv.domain.TokenResponse;
|
|
|
+import com.zhongzheng.modules.polyv.mapper.PolyvVideoMapper;
|
|
|
+import com.zhongzheng.modules.polyv.vo.PolyvVideoQuerVo;
|
|
|
+import com.zhongzheng.modules.polyv.vo.PolyvVideoVo;
|
|
|
+import com.zhongzheng.modules.polyv.vo.PolyvVo;
|
|
|
+import com.zhongzheng.modules.schedule.service.IScheduleService;
|
|
|
+import com.zhongzheng.modules.user.bo.UserQueryBo;
|
|
|
import com.zhongzheng.modules.user.service.IUserService;
|
|
|
import com.zhongzheng.modules.user.vo.UserVo;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
-import org.springframework.context.annotation.Configuration;
|
|
|
-import org.springframework.scheduling.annotation.EnableScheduling;
|
|
|
-import org.springframework.scheduling.annotation.Scheduled;
|
|
|
+import org.springframework.stereotype.Service;
|
|
|
+import org.springframework.transaction.annotation.Transactional;
|
|
|
import org.springframework.util.CollectionUtils;
|
|
|
|
|
|
-import java.time.LocalDateTime;
|
|
|
+import java.io.IOException;
|
|
|
+import java.util.Collection;
|
|
|
import java.util.HashMap;
|
|
|
import java.util.List;
|
|
|
import java.util.Map;
|
|
|
+import java.util.concurrent.TimeUnit;
|
|
|
+import java.util.stream.Collectors;
|
|
|
|
|
|
-@Configuration //1.主要用于标记配置类,兼备Component的效果。
|
|
|
-@EnableScheduling // 2.开启定时任务
|
|
|
-public class SaticScheduleTask {
|
|
|
+import static com.squareup.okhttp.internal.Util.md5Hex;
|
|
|
+
|
|
|
+/**
|
|
|
+ * 定时任务
|
|
|
+ *
|
|
|
+ * @author change
|
|
|
+ * @date 2021-06-11
|
|
|
+ */
|
|
|
+@Service
|
|
|
+public class ScheduleServiceImpl extends ServiceImpl<PolyvVideoMapper, PolyvVideo> implements IScheduleService {
|
|
|
|
|
|
@Autowired
|
|
|
private IInformService informService;
|
|
|
@@ -80,11 +113,8 @@ public class SaticScheduleTask {
|
|
|
@Value("${aliyun.sms.informationNotificationCode}")
|
|
|
private String informationNotificationCode;
|
|
|
|
|
|
- //3.添加定时任务
|
|
|
- //@Scheduled(cron = "0/2 * * * * ?")
|
|
|
- //或直接指定时间间隔,例如:5秒
|
|
|
- @Scheduled(fixedRate = 5000)
|
|
|
- private void configureTasks() {
|
|
|
+ @Override
|
|
|
+ public String updateGoodsSend(UserQueryBo bo) {
|
|
|
InformRemindVo informRemindVo = informRemindService.queryById(1L);
|
|
|
List<OrderGoodsVo> orderGoodsVo = iOrderGoodsService.selectOrderGoods();
|
|
|
|
|
|
@@ -167,8 +197,6 @@ public class SaticScheduleTask {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
+ return "请求成功";
|
|
|
}
|
|
|
-
|
|
|
-}
|
|
|
+}
|