|
@@ -1,6 +1,7 @@
|
|
|
package cn.com.ctop.kuaishou.modules.batch.service.impl;
|
|
|
|
|
|
import cn.com.ctop.common.module.entity.CtopOauthToken;
|
|
|
+import cn.com.ctop.common.module.service.IMaterialCutFrameService;
|
|
|
import cn.com.ctop.common.module.utils.Check;
|
|
|
import cn.com.ctop.common.module.utils.HttpUtils;
|
|
|
import cn.com.ctop.common.module.utils.KuaishouInterfaceConstant;
|
|
@@ -41,6 +42,9 @@ public class KuaishouProgramCreativeServiceImpl extends ServiceImpl<KuaishouProg
|
|
|
@Autowired
|
|
|
private IKuaiShouMaterialUploadService uploadService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private IMaterialCutFrameService materialCutFrameService;
|
|
|
+
|
|
|
|
|
|
@Override
|
|
|
public void getProgramCreative(Long accountId, Long unitId, String accessToken, String startDate, String endDate, Integer page) {
|
|
@@ -220,4 +224,30 @@ public class KuaishouProgramCreativeServiceImpl extends ServiceImpl<KuaishouProg
|
|
|
|
|
|
return returnJson;
|
|
|
}
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public JSONArray getProgramCreativeCover(JSONArray md5Arr) {
|
|
|
+
|
|
|
+ JSONArray returnArr = new JSONArray();
|
|
|
+ for (int i = 0; i < md5Arr.size(); i++) {
|
|
|
+ String signature = md5Arr.getString(i);
|
|
|
+ if (Check.isNull(signature)) {
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ List<JSONObject> coverArr = materialCutFrameService.getProgramCreativeCover(signature);
|
|
|
+ if (!Check.isNull(coverArr)) {
|
|
|
+ for (int j = 0; j < coverArr.size(); j++) {
|
|
|
+ JSONObject jsonObject = JSONObject.parseObject(coverArr.get(j).toJSONString());
|
|
|
+ if (!Check.isNull(jsonObject)) {
|
|
|
+ returnArr.add(jsonObject);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ return returnArr;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
}
|