|
@@ -1,20 +1,12 @@
|
|
package com.yonge.cooleshow.admin.task;
|
|
package com.yonge.cooleshow.admin.task;
|
|
|
|
|
|
-import com.yonge.cooleshow.biz.dal.service.ActivityPlanEvaluationService;
|
|
|
|
-import com.yonge.cooleshow.biz.dal.service.ActivityPlanService;
|
|
|
|
-import com.yonge.cooleshow.biz.dal.service.CourseScheduleService;
|
|
|
|
-import com.yonge.cooleshow.biz.dal.service.CustomerServiceBatchSendingService;
|
|
|
|
-import com.yonge.cooleshow.biz.dal.service.MusicAlbumService;
|
|
|
|
-import com.yonge.cooleshow.biz.dal.service.MusicSheetService;
|
|
|
|
-import com.yonge.cooleshow.biz.dal.service.PlatformCashAccountRecordService;
|
|
|
|
-import com.yonge.cooleshow.biz.dal.service.TeacherStyleVideoService;
|
|
|
|
-import com.yonge.cooleshow.biz.dal.service.UserAccountRecordService;
|
|
|
|
-import com.yonge.cooleshow.biz.dal.service.UserBindingTeacherService;
|
|
|
|
-import com.yonge.cooleshow.biz.dal.service.UserOrderService;
|
|
|
|
-import com.yonge.cooleshow.biz.dal.service.VideoLessonGroupService;
|
|
|
|
|
|
+import com.alibaba.fastjson.JSONObject;
|
|
|
|
+import com.yonge.cooleshow.biz.dal.service.*;
|
|
import com.yonge.cooleshow.common.constant.SysConfigConstant;
|
|
import com.yonge.cooleshow.common.constant.SysConfigConstant;
|
|
import com.yonge.cooleshow.common.controller.BaseController;
|
|
import com.yonge.cooleshow.common.controller.BaseController;
|
|
import com.yonge.cooleshow.common.entity.HttpResponseResult;
|
|
import com.yonge.cooleshow.common.entity.HttpResponseResult;
|
|
|
|
+import com.yonge.toolset.utils.date.DateUtil;
|
|
|
|
+import org.apache.commons.io.FileUtils;
|
|
import org.apache.commons.lang3.StringUtils;
|
|
import org.apache.commons.lang3.StringUtils;
|
|
import org.redisson.api.RBucket;
|
|
import org.redisson.api.RBucket;
|
|
import org.redisson.api.RedissonClient;
|
|
import org.redisson.api.RedissonClient;
|
|
@@ -28,6 +20,8 @@ import org.springframework.web.bind.annotation.RestController;
|
|
import springfox.documentation.annotations.ApiIgnore;
|
|
import springfox.documentation.annotations.ApiIgnore;
|
|
|
|
|
|
import java.io.File;
|
|
import java.io.File;
|
|
|
|
+import java.net.URL;
|
|
|
|
+import java.util.Date;
|
|
|
|
|
|
/**
|
|
/**
|
|
* @Author: liweifan
|
|
* @Author: liweifan
|
|
@@ -71,6 +65,9 @@ public class TaskController extends BaseController {
|
|
@Autowired
|
|
@Autowired
|
|
private CustomerServiceBatchSendingService customerServiceBatchSendingService;
|
|
private CustomerServiceBatchSendingService customerServiceBatchSendingService;
|
|
|
|
|
|
|
|
+ @Autowired
|
|
|
|
+ private ImGroupService imGroupService;
|
|
|
|
+
|
|
/***
|
|
/***
|
|
* 轮询用户订单
|
|
* 轮询用户订单
|
|
* @author liweifan
|
|
* @author liweifan
|
|
@@ -183,4 +180,22 @@ public class TaskController extends BaseController {
|
|
return HttpResponseResult.succeed();
|
|
return HttpResponseResult.succeed();
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ @GetMapping("/rongyunImport")
|
|
|
|
+ public void rongyunImport() throws Exception {
|
|
|
|
+ String currentDate = DateUtil.format(DateUtil.addHours(new Date(),-2), DateUtil.YEAR_MONTH_DAY_HOUR);
|
|
|
|
+ Object o = imGroupService.historyGet(currentDate);
|
|
|
|
+ JSONObject jsonObject = JSONObject.parseObject(JSONObject.toJSONString(o));
|
|
|
|
+ if (jsonObject.get("code").equals(200)) {
|
|
|
|
+ String url = jsonObject.getString("url");
|
|
|
|
+ if (!StringUtils.isEmpty(url)) {
|
|
|
|
+ File file = new File(FileUtils.getTempDirectoryPath() + url.substring(url.lastIndexOf("/")));
|
|
|
|
+ URL url1 = new URL(url);
|
|
|
|
+ FileUtils.copyURLToFile(url1, file);
|
|
|
|
+ imGroupService.saveImHistoryMessage(new File(file.getAbsolutePath()));
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ }
|
|
}
|
|
}
|