|
@@ -215,8 +215,16 @@ public class KuaishouInterfaceServiceImpl implements IKuaishouInterfaceService {
|
|
}
|
|
}
|
|
for (int i = 0; i < details.size(); i++) {
|
|
for (int i = 0; i < details.size(); i++) {
|
|
var detailJson = details.getJSONObject(i);
|
|
var detailJson = details.getJSONObject(i);
|
|
|
|
+ KuaiShouVideoGet byId = kuaiShouVideoGetService.getById(token.getAccountId() + detailJson.getString("photo_id"));
|
|
|
|
+ if (!Check.isNull(byId)) {
|
|
|
|
+ continue;
|
|
|
|
+ }
|
|
var kuaiShouVideoGet = JSONObject.toJavaObject(detailJson, KuaiShouVideoGet.class);
|
|
var kuaiShouVideoGet = JSONObject.toJavaObject(detailJson, KuaiShouVideoGet.class);
|
|
kuaiShouVideoGet.setId(token.getAccountId() + kuaiShouVideoGet.getPhotoId());
|
|
kuaiShouVideoGet.setId(token.getAccountId() + kuaiShouVideoGet.getPhotoId());
|
|
|
|
+
|
|
|
|
+ Date videoTime = videoTimeService.getVideoTime(kuaiShouVideoGet.getPhotoId(), token.getAccountId());
|
|
|
|
+ kuaiShouVideoGet.setUploadDate(videoTime);
|
|
|
|
+
|
|
kuaiShouVideoGet.setAccountId(token.getAccountId());
|
|
kuaiShouVideoGet.setAccountId(token.getAccountId());
|
|
kuaiShouVideoGet.setStatDate(DateUtils.parseDate(statDate, "yyyy-MM-dd"));
|
|
kuaiShouVideoGet.setStatDate(DateUtils.parseDate(statDate, "yyyy-MM-dd"));
|
|
kuaiShouVideoGet.setUpdateTime(new Date());
|
|
kuaiShouVideoGet.setUpdateTime(new Date());
|
|
@@ -2842,6 +2850,9 @@ public class KuaishouInterfaceServiceImpl implements IKuaishouInterfaceService {
|
|
* @param accountId
|
|
* @param accountId
|
|
* @param page
|
|
* @param page
|
|
*/
|
|
*/
|
|
|
|
+ @Autowired
|
|
|
|
+ private IKuaiShouVideoTimeService videoTimeService;
|
|
|
|
+
|
|
@Override
|
|
@Override
|
|
public void getSuZaoList(String token, Long accountId, int page) {
|
|
public void getSuZaoList(String token, Long accountId, int page) {
|
|
String url = "https://ad.e.kuaishou.com/rest/openapi/v1/file/ad/video/su_zao/list";
|
|
String url = "https://ad.e.kuaishou.com/rest/openapi/v1/file/ad/video/su_zao/list";
|
|
@@ -2872,7 +2883,14 @@ public class KuaishouInterfaceServiceImpl implements IKuaishouInterfaceService {
|
|
}
|
|
}
|
|
for (int i = 0; i < details.size(); i++) {
|
|
for (int i = 0; i < details.size(); i++) {
|
|
var detailJson = details.getJSONObject(i);
|
|
var detailJson = details.getJSONObject(i);
|
|
|
|
+
|
|
|
|
+ KuaiShouVideoGet byId = kuaiShouVideoGetService.getById(accountId + detailJson.getString("photo_id"));
|
|
|
|
+ if (!Check.isNull(byId)) {
|
|
|
|
+ continue;
|
|
|
|
+ }
|
|
var kuaiShouVideoGet = JSONObject.toJavaObject(detailJson, KuaiShouVideoGet.class);
|
|
var kuaiShouVideoGet = JSONObject.toJavaObject(detailJson, KuaiShouVideoGet.class);
|
|
|
|
+ Date videoTime = videoTimeService.getVideoTime(kuaiShouVideoGet.getPhotoId(), accountId);
|
|
|
|
+ kuaiShouVideoGet.setUploadDate(videoTime);
|
|
kuaiShouVideoGet.setAccountId(accountId);
|
|
kuaiShouVideoGet.setAccountId(accountId);
|
|
kuaiShouVideoGet.setId(accountId + kuaiShouVideoGet.getPhotoId());
|
|
kuaiShouVideoGet.setId(accountId + kuaiShouVideoGet.getPhotoId());
|
|
kuaiShouVideoGet.setCreateTime(new Date());
|
|
kuaiShouVideoGet.setCreateTime(new Date());
|