|
|
@@ -49,17 +49,17 @@ public class AiKuaishouAccountAutoVideoServiceImpl extends ServiceImpl<AiKuaisho
|
|
|
|
|
|
@Override
|
|
|
public List<AiKuaishouAccountAutoVideo> getHistoryTopVideos(Long accountId, Integer channelType, String keyword, Integer videoCnt, String statDate, String createType) {
|
|
|
- return autoVideoMapper.getHistoryTopVideos(accountId, channelType, keyword, videoCnt, createType);
|
|
|
+ return autoVideoMapper.getHistoryTopVideos(accountId, channelType, keyword, videoCnt, createType, statDate);
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
public List<AiKuaishouAccountAutoVideo> getMissVideoByParams(Long accountId, Integer channelType, String keyword, Integer videoCnt, String statDate) {
|
|
|
- return autoVideoMapper.getZeroVideoByParams(accountId, channelType, keyword, videoCnt);
|
|
|
+ return autoVideoMapper.getZeroVideoByParams(accountId, channelType, keyword, videoCnt, statDate);
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
public List<AiKuaishouAccountAutoVideo> getHistoryCatchVideos(Long accountId, Integer channelType, String keyword, Integer videoCnt, String statDate) {
|
|
|
- return autoVideoMapper.getHistoryCatchVideos(accountId, channelType, keyword, videoCnt);
|
|
|
+ return autoVideoMapper.getHistoryCatchVideos(accountId, channelType, keyword, videoCnt, statDate);
|
|
|
}
|
|
|
|
|
|
|
|
|
@@ -94,8 +94,8 @@ public class AiKuaishouAccountAutoVideoServiceImpl extends ServiceImpl<AiKuaisho
|
|
|
param.put("advertiser_id", token.getAccountId());
|
|
|
param.put("page_size", pageSize);
|
|
|
param.put("page", page);
|
|
|
- param.put("start_date", date);
|
|
|
- param.put("end_date", date);
|
|
|
+// param.put("start_date", date);
|
|
|
+// param.put("end_date", date);
|
|
|
String result = HttpUtils.httpPostRequest(url, param, headers);
|
|
|
JSONObject resultJson = JSONObject.parseObject(result);
|
|
|
if (Check.isNull(resultJson)) {
|
|
|
@@ -118,25 +118,23 @@ public class AiKuaishouAccountAutoVideoServiceImpl extends ServiceImpl<AiKuaisho
|
|
|
}
|
|
|
|
|
|
List<AiKuaishouAccountAutoVideo> videoGetList = new ArrayList<>();
|
|
|
+
|
|
|
+ Long accountId = token.getAccountId();
|
|
|
+ List<String> photoIds = autoVideoMapper.selectBatchByPhotoIds(details, date, accountId);
|
|
|
for (int i = 0; i < details.size(); i++) {
|
|
|
JSONObject detailJson = details.getJSONObject(i);
|
|
|
if (Check.isNull(detailJson)) {
|
|
|
continue;
|
|
|
}
|
|
|
String photoId = detailJson.getString("photo_id");
|
|
|
- Long accountId = token.getAccountId();
|
|
|
- QueryWrapper<AiKuaishouAccountAutoVideo> queryWrapper = new QueryWrapper<>();
|
|
|
- queryWrapper.eq("photo_id", photoId);
|
|
|
- queryWrapper.eq("account_id", accountId).last("limit 1");
|
|
|
- AiKuaishouAccountAutoVideo one = this.getOne(queryWrapper);
|
|
|
- if (!Check.isNull(one)) {
|
|
|
+ if (!Check.isNull(photoIds) && photoIds.contains(photoId)) {
|
|
|
continue;
|
|
|
}
|
|
|
AiKuaishouAccountAutoVideo videoGet = new AiKuaishouAccountAutoVideo();
|
|
|
videoGet.setAccountId(accountId);
|
|
|
videoGet.setPhotoId(photoId);
|
|
|
videoGet.setPhotoName(detailJson.getString("photo_name"));
|
|
|
- videoGet.setStatDate(date);
|
|
|
+ videoGet.setStatDate(DateUtils.formatDate(detailJson.getDate("create_time"), DateUtils.WEB_FORMAT));
|
|
|
String signature = detailJson.getString("signature");
|
|
|
videoGet.setSignature(signature);
|
|
|
Integer source = detailJson.getInteger("source");
|