|
@@ -6,6 +6,7 @@ import cn.com.ctop.common.module.utils.Check;
|
|
|
import cn.com.ctop.common.module.utils.HttpUtils;
|
|
|
import cn.com.ctop.common.module.utils.KuaishouInterfaceConstant;
|
|
|
import cn.com.ctop.common.module.utils.PropertiesUtils;
|
|
|
+import cn.com.ctop.kuaishou.modules.batch.entity.KuaiShouVideoGet;
|
|
|
import cn.com.ctop.kuaishou.modules.batch.entity.KuaishouVideoRelateCreatives;
|
|
|
import cn.com.ctop.kuaishou.modules.batch.mapper.KuaishouVideoRelateCreativesMapper;
|
|
|
import cn.com.ctop.kuaishou.modules.batch.service.IKuaishouVideoRelateCreativesService;
|
|
@@ -102,7 +103,7 @@ public class KuaishouVideoRelateCreativesServiceImpl extends ServiceImpl<Kuaisho
|
|
|
* @author ZHAOXA
|
|
|
*/
|
|
|
@Override
|
|
|
- public void videoRelateCreatives(Long accountId, JSONArray photoIds, Map<String, Object> statdateMap) {
|
|
|
+ public void videoRelateCreatives(Long accountId, JSONArray photoIds, Map<String, KuaiShouVideoGet> statdateMap) {
|
|
|
try {
|
|
|
CtopOauthToken token = tokenService.getTokenByAccountId(accountId);
|
|
|
for (int i = 0; i < photoIds.size(); i++) {
|
|
@@ -128,7 +129,9 @@ public class KuaishouVideoRelateCreativesServiceImpl extends ServiceImpl<Kuaisho
|
|
|
k.setAccountId(accountId);
|
|
|
k.setPhotoId(object.getLong("photo_id"));
|
|
|
k.setCreativeCount(object.getInteger("creative_count"));
|
|
|
- k.setStatDate((Date) statdateMap.get(object.getString("photo_id")));
|
|
|
+ KuaiShouVideoGet shouVideoGet = statdateMap.get(object.getString("photo_id"));
|
|
|
+ k.setStatDate(shouVideoGet.getStatDate());
|
|
|
+ k.setChannelType(shouVideoGet.getChannelType());
|
|
|
videolist.add(k);
|
|
|
}
|
|
|
kuaishouVideoRelateCreativesMapper.insertBatch(videolist);
|