|
@@ -1612,6 +1612,9 @@ public class KuaishouInterfaceServiceImpl implements IKuaishouInterfaceService {
|
|
|
group.setUrl(detail.getString("url"));
|
|
|
group.setAppId(detail.getLong("app_id"));
|
|
|
group.setAppIconUrl(detail.getString("app_icon_url"));
|
|
|
+ group.setGroupCreateTime(detail.getString("create_time"));
|
|
|
+ group.setGroupUpdateTime(detail.getString("update_time"));
|
|
|
+ group.setConvertId(detail.getLong("convert_id"));
|
|
|
group.setCreateTime(new Date());
|
|
|
group.setUpdateTime(new Date());
|
|
|
groups.add(group);
|
|
@@ -2012,30 +2015,25 @@ public class KuaishouInterfaceServiceImpl implements IKuaishouInterfaceService {
|
|
|
}
|
|
|
creative.setCreateTime(new Date());
|
|
|
creative.setUpdateTime(new Date());
|
|
|
-
|
|
|
+ creative.setPhotoId(detailJson.getString("photo_id"));
|
|
|
if (detailJson.getLong("photo_id") == 0) {
|
|
|
+ JSONArray photoIds = new JSONArray();
|
|
|
JSONObject programmed_creative_material = detailJson.getJSONObject("programmed_creative_material");
|
|
|
if (!Check.isNull(programmed_creative_material)) {
|
|
|
+ creative.setProgrammedCreativeMaterial(programmed_creative_material.toJSONString());
|
|
|
JSONArray materials = programmed_creative_material.getJSONArray("materials");
|
|
|
if (!Check.isNull(materials)) {
|
|
|
for (int j = 0; j < materials.size(); j++) {
|
|
|
JSONObject materialJson = materials.getJSONObject(j);
|
|
|
if (!Check.isNull(materialJson)) {
|
|
|
Long photo_id = materialJson.getLong("photo_id");
|
|
|
- creative.setPhotoId(String.valueOf(photo_id));
|
|
|
- creatives.add(creative);
|
|
|
+ photoIds.add(String.valueOf(photo_id));
|
|
|
}
|
|
|
}
|
|
|
+ creative.setPhotoIds(photoIds.toJSONString());
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
- } else {
|
|
|
- creative.setPhotoId(detailJson.getString("photo_id"));
|
|
|
- creatives.add(creative);
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
}
|
|
|
}
|
|
|
creativeService.replaceBatch(creatives);
|
|
@@ -2123,6 +2121,7 @@ public class KuaishouInterfaceServiceImpl implements IKuaishouInterfaceService {
|
|
|
try {
|
|
|
String result = HttpUtils.kuaiShouhttpPostRequest(url, param.toJSONString(), headers);
|
|
|
JSONObject resultJson = JSONObject.parseObject(result);
|
|
|
+ System.err.println(resultJson);
|
|
|
if (!Check.isNull(resultJson)) {
|
|
|
Integer code = resultJson.getInteger("code");
|
|
|
if (code == 0) {
|