|
@@ -61,9 +61,9 @@ public class KuaiShouMaterialControer {
|
|
|
if (Check.isNull(token)) {
|
|
|
throw new Exception("未获取账号授权信息");
|
|
|
}
|
|
|
+ String appVersion = requestJson.getString("appVersion");
|
|
|
String nowDate = DateUtils.getNowDate("yyyy-MM-dd");
|
|
|
iKuaishouInterfaceService.getVideoList(token, nowDate, nowDate);
|
|
|
- // iKuaishouInterfaceService.getSuZaoList(token.getAccessToken(), accountId, 1, nowDate, nowDate);
|
|
|
KuaiShouVideoLastTime videoLastTime = lastTimeService.getById(accountId);
|
|
|
Date startTime;
|
|
|
Date endDate = new Date();
|
|
@@ -76,6 +76,9 @@ public class KuaiShouMaterialControer {
|
|
|
requestMap.put("startTime", DateUtils.formatDate(startTime, "yyyy-MM-dd HH:mm:ss"));
|
|
|
requestMap.put("endTime", DateUtils.formatDate(endDate, "yyyy-MM-dd HH:mm:ss"));
|
|
|
requestMap.put("accountId", accountId);
|
|
|
+ if (!Check.isNull(appVersion)) {
|
|
|
+ requestMap.put("appVersion", appVersion);
|
|
|
+ }
|
|
|
List<JSONObject> materialList = videoGetService.getVideoListByMap(requestMap);
|
|
|
if (!Check.isNull(materialList)) {
|
|
|
for (int i = 0; i < materialList.size(); i++) {
|
|
@@ -138,12 +141,16 @@ public class KuaiShouMaterialControer {
|
|
|
if (Check.isNull(num) || num == 0) {
|
|
|
throw new Exception("请输入查询条数");
|
|
|
}
|
|
|
+ String appVersion = requestJson.getString("appVersion");
|
|
|
Map<String, Object> requestMap = new HashMap<>();
|
|
|
requestMap.put("startTime", startDate);
|
|
|
requestMap.put("endTime", endDate);
|
|
|
requestMap.put("accountId", accountId);
|
|
|
requestMap.put("num", num);
|
|
|
requestMap.put("createCount", createCount);
|
|
|
+ if (!Check.isNull(appVersion)) {
|
|
|
+ requestMap.put("appVersion", appVersion);
|
|
|
+ }
|
|
|
List<JSONObject> materialList = relateCreativesService.getVideoListByMap(requestMap);
|
|
|
if (!Check.isNull(materialList)) {
|
|
|
for (int i = 0; i < materialList.size(); i++) {
|
|
@@ -155,6 +162,7 @@ public class KuaiShouMaterialControer {
|
|
|
materialJson.put("video_url", videoGet.getUrl());
|
|
|
materialJson.put("material_type", videoGet.getMaterialType());
|
|
|
materialJson.put("channel_type", videoGet.getChannelType());
|
|
|
+ materialJson.put("photo_name", videoGet.getPhotoName());
|
|
|
List<String> imageList = lastTimeService.getImageListByMd5(signature);
|
|
|
materialJson.put("imageList", imageList);
|
|
|
}
|
|
@@ -204,19 +212,29 @@ public class KuaiShouMaterialControer {
|
|
|
if (Check.isNull(num) || num == 0) {
|
|
|
throw new Exception("请输入查询条数");
|
|
|
}
|
|
|
+ String appVersion = requestJson.getString("appVersion");
|
|
|
Map<String, Object> requestMap = new HashMap<>();
|
|
|
requestMap.put("startDate", startDate);
|
|
|
requestMap.put("endDate", endDate);
|
|
|
requestMap.put("accountId", accountId);
|
|
|
requestMap.put("num", num);
|
|
|
+ if (!Check.isNull(appVersion)) {
|
|
|
+ requestMap.put("appVersion", appVersion);
|
|
|
+ }
|
|
|
List<JSONObject> materialList = relateCreativesService.getHistoryTopVideoList(requestMap);
|
|
|
if (!Check.isNull(materialList)) {
|
|
|
for (int i = 0; i < materialList.size(); i++) {
|
|
|
JSONObject materialJson = materialList.get(i);
|
|
|
- String signature = materialJson.getString("signature");
|
|
|
- List<String> imageList = lastTimeService.getImageListByMd5(signature);
|
|
|
- materialJson.put("imageList", imageList);
|
|
|
-
|
|
|
+ KuaiShouVideoGet videoGet = videoGetService.getVideoByPhotoId(materialJson.getLong("photo_id"));
|
|
|
+ if (!Check.isNull(videoGet)) {
|
|
|
+ String signature = videoGet.getSignature();
|
|
|
+ materialJson.put("video_url", videoGet.getUrl());
|
|
|
+ materialJson.put("material_type", videoGet.getMaterialType());
|
|
|
+ materialJson.put("channel_type", videoGet.getChannelType());
|
|
|
+ materialJson.put("photo_name", videoGet.getPhotoName());
|
|
|
+ List<String> imageList = lastTimeService.getImageListByMd5(signature);
|
|
|
+ materialJson.put("imageList", imageList);
|
|
|
+ }
|
|
|
}
|
|
|
returnJson.put("code", 0);
|
|
|
returnJson.put("message", "SUCCESS");
|
|
@@ -264,12 +282,16 @@ public class KuaiShouMaterialControer {
|
|
|
if (Check.isNull(endTime)) {
|
|
|
throw new Exception("请输入查询结束时间");
|
|
|
}
|
|
|
+ String appVersion = requestJson.getString("appVersion");
|
|
|
Map<String, Object> requestMap = new HashMap<>();
|
|
|
requestMap.put("startTime", startTime);
|
|
|
requestMap.put("endTime", endTime);
|
|
|
requestMap.put("accountId", accountId);
|
|
|
requestMap.put("creativeCount", 0);
|
|
|
requestMap.put("videoCnt", videoCnt);
|
|
|
+ if (!Check.isNull(appVersion)) {
|
|
|
+ requestMap.put("appVersion", appVersion);
|
|
|
+ }
|
|
|
List<JSONObject> materialList = relateCreativesService.getVideoZeroListByMap(requestMap);
|
|
|
if (!Check.isNull(materialList)) {
|
|
|
for (int i = 0; i < materialList.size(); i++) {
|
|
@@ -281,6 +303,7 @@ public class KuaiShouMaterialControer {
|
|
|
materialJson.put("video_url", videoGet.getUrl());
|
|
|
materialJson.put("channel_type", videoGet.getChannelType());
|
|
|
materialJson.put("material_type", videoGet.getMaterialType());
|
|
|
+ materialJson.put("photo_name", videoGet.getPhotoName());
|
|
|
List<String> imageList = lastTimeService.getImageListByMd5(signature);
|
|
|
materialJson.put("imageList", imageList);
|
|
|
}
|