|
@@ -130,6 +130,7 @@ public class KuaishouInterfaceServiceImpl implements IKuaishouInterfaceService {
|
|
private IKuaishouAppPackageService appPackageService;
|
|
private IKuaishouAppPackageService appPackageService;
|
|
@Autowired
|
|
@Autowired
|
|
private UserAllocationMapper allocationMapper;
|
|
private UserAllocationMapper allocationMapper;
|
|
|
|
+ private static ExecutorService cutExecutorService = Executors.newFixedThreadPool(10);
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public void getAdvertiserReportHourly(CtopOauthToken token, Date startDate, Date endDate) {
|
|
public void getAdvertiserReportHourly(CtopOauthToken token, Date startDate, Date endDate) {
|
|
@@ -264,13 +265,7 @@ public class KuaishouInterfaceServiceImpl implements IKuaishouInterfaceService {
|
|
videoGet.setMaterialType(type);
|
|
videoGet.setMaterialType(type);
|
|
}
|
|
}
|
|
videoGetList.add(videoGet);
|
|
videoGetList.add(videoGet);
|
|
- Thread thread = new Thread() {
|
|
|
|
- @Override
|
|
|
|
- public void run() {
|
|
|
|
- videoGetService.getKeyFrame(token.getAccessToken(), token.getAccountId(), signature, photo_id);
|
|
|
|
- }
|
|
|
|
- };
|
|
|
|
- thread.start();
|
|
|
|
|
|
+ getCut(token.getAccessToken(), token.getAccountId(), signature, photo_id);
|
|
}
|
|
}
|
|
if (!Check.isNull(videoGetList)) {
|
|
if (!Check.isNull(videoGetList)) {
|
|
videoGetService.replaceBatch(videoGetList);
|
|
videoGetService.replaceBatch(videoGetList);
|
|
@@ -285,6 +280,16 @@ public class KuaishouInterfaceServiceImpl implements IKuaishouInterfaceService {
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ private void getCut(String token, Long accountId, String signature, String photo_id) {
|
|
|
|
+ cutExecutorService.submit(new Runnable() {
|
|
|
|
+ @Override
|
|
|
|
+ public void run() {
|
|
|
|
+ videoGetService.getKeyFrame(token, accountId, signature, photo_id);
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+
|
|
@Override
|
|
@Override
|
|
public void getAdvertiserReportDaily(CtopOauthToken token, Date startDate, Date endDate, String reportDims) {
|
|
public void getAdvertiserReportDaily(CtopOauthToken token, Date startDate, Date endDate, String reportDims) {
|
|
try {
|
|
try {
|