|
@@ -13,7 +13,6 @@ import cn.com.ctop.common.module.utils.Check;
|
|
import cn.com.ctop.common.module.utils.KuaishouInterfaceConstant;
|
|
import cn.com.ctop.common.module.utils.KuaishouInterfaceConstant;
|
|
import cn.com.ctop.common.module.utils.LoadFileUtil;
|
|
import cn.com.ctop.common.module.utils.LoadFileUtil;
|
|
import cn.com.ctop.common.module.utils.PropertiesUtils;
|
|
import cn.com.ctop.common.module.utils.PropertiesUtils;
|
|
-import cn.com.ctop.kuaishou.modules.batch.entity.KuaiShouVideoGet;
|
|
|
|
import cn.com.ctop.kuaishou.modules.batch.service.IKuaiShouVideoGetService;
|
|
import cn.com.ctop.kuaishou.modules.batch.service.IKuaiShouVideoGetService;
|
|
import cn.com.ctop.manage.modules.material.service.IMaterialUploadImageService;
|
|
import cn.com.ctop.manage.modules.material.service.IMaterialUploadImageService;
|
|
import cn.com.ctop.manage.modules.material.service.IMaterialUploadService;
|
|
import cn.com.ctop.manage.modules.material.service.IMaterialUploadService;
|
|
@@ -21,7 +20,6 @@ import com.alibaba.fastjson.JSONArray;
|
|
import com.alibaba.fastjson.JSONObject;
|
|
import com.alibaba.fastjson.JSONObject;
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
-import org.jeecg.common.util.DateUtils;
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
import org.springframework.core.io.FileSystemResource;
|
|
import org.springframework.core.io.FileSystemResource;
|
|
@@ -35,7 +33,6 @@ import org.springframework.util.MultiValueMap;
|
|
import org.springframework.web.client.RestTemplate;
|
|
import org.springframework.web.client.RestTemplate;
|
|
|
|
|
|
import java.io.File;
|
|
import java.io.File;
|
|
-import java.util.Date;
|
|
|
|
import java.util.HashMap;
|
|
import java.util.HashMap;
|
|
import java.util.Map;
|
|
import java.util.Map;
|
|
import java.util.concurrent.ExecutorService;
|
|
import java.util.concurrent.ExecutorService;
|
|
@@ -199,8 +196,10 @@ public class MaterialUploadServiceImpl implements IMaterialUploadService {
|
|
if (resultJson.getInteger("code") == 0) {
|
|
if (resultJson.getInteger("code") == 0) {
|
|
JSONObject dataJson = resultJson.getJSONObject("data");
|
|
JSONObject dataJson = resultJson.getJSONObject("data");
|
|
if (!Check.isNull(dataJson)) {
|
|
if (!Check.isNull(dataJson)) {
|
|
- String photoId = dataJson.getString("photo_id");
|
|
|
|
|
|
+
|
|
String signature = dataJson.getString("signature");
|
|
String signature = dataJson.getString("signature");
|
|
|
|
+ /*
|
|
|
|
+ String photoId = dataJson.getString("photo_id");
|
|
KuaiShouVideoGet videoGet = new KuaiShouVideoGet();
|
|
KuaiShouVideoGet videoGet = new KuaiShouVideoGet();
|
|
videoGet.setAccountId(accountId);
|
|
videoGet.setAccountId(accountId);
|
|
videoGet.setId(accountId + photoId);
|
|
videoGet.setId(accountId + photoId);
|
|
@@ -226,8 +225,8 @@ public class MaterialUploadServiceImpl implements IMaterialUploadService {
|
|
videoGet.setStatDate(DateUtils.parseDate(nowDate, "yyyy-MM-dd"));
|
|
videoGet.setStatDate(DateUtils.parseDate(nowDate, "yyyy-MM-dd"));
|
|
videoGet.setCoverUrl(materialInfo.getUrl() + "?x-oss-process=video/snapshot,t_0,m_fast");
|
|
videoGet.setCoverUrl(materialInfo.getUrl() + "?x-oss-process=video/snapshot,t_0,m_fast");
|
|
videoGet.setUploadDate(new Date());
|
|
videoGet.setUploadDate(new Date());
|
|
- kuaiShouVideoGetService.saveOrUpdate(videoGet);
|
|
|
|
- materialUploadImageService.uploadImage(videoGet.getSignature(), accountId, ctopOauthToken.getAccessToken());
|
|
|
|
|
|
+ kuaiShouVideoGetService.saveOrUpdate(videoGet);*/
|
|
|
|
+ materialUploadImageService.uploadImage(signature, accountId, ctopOauthToken.getAccessToken());
|
|
|
|
|
|
}
|
|
}
|
|
log.info("快手素材同步完成,accountId:{},code:{},返回信息:{}", accountId, materialInfo.getCode(), resultJson);
|
|
log.info("快手素材同步完成,accountId:{},code:{},返回信息:{}", accountId, materialInfo.getCode(), resultJson);
|