|
|
|
@ -22,9 +22,7 @@ import org.springframework.stereotype.Service;
|
|
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
|
|
import java.text.SimpleDateFormat;
|
|
|
|
|
import java.util.ArrayList;
|
|
|
|
|
import java.util.Date;
|
|
|
|
|
import java.util.List;
|
|
|
|
|
import java.util.Optional;
|
|
|
|
|
import java.util.concurrent.atomic.AtomicInteger;
|
|
|
|
@ -63,6 +61,7 @@ public class ObtainInfoServiceImpl implements ObtainInfoService {
|
|
|
|
|
client = new DefaultTaobaoClient(miProperties.getServerUrl(), miProperties.getAppKey(), miProperties.getAppSecret());
|
|
|
|
|
AtomicInteger count = new AtomicInteger();
|
|
|
|
|
List<TopTrade> allByGmtSync = topTradeRepository.findAllByGmtSync();
|
|
|
|
|
log.info("===============ObtainInfoJob同步前一天数据应插入条数:{}===============",allByGmtSync.size());
|
|
|
|
|
if (allByGmtSync.size() > 0) {
|
|
|
|
|
allByGmtSync.stream().forEach(ac ->{
|
|
|
|
|
UserOaidInfo userOaidInfo = new UserOaidInfo();
|
|
|
|
@ -89,6 +88,7 @@ public class ObtainInfoServiceImpl implements ObtainInfoService {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
log.info("===============ObtainInfoJob同步前一天实际插入数据条数:{}===============",count.get());
|
|
|
|
|
//插入存入记录
|
|
|
|
|
saveObtainInfoRecord(0,allByGmtSync.size(),count.get());
|
|
|
|
|
}
|
|
|
|
@ -149,7 +149,7 @@ public class ObtainInfoServiceImpl implements ObtainInfoService {
|
|
|
|
|
List<TopOaidDecryptResponse.Receiver> receiverList = rsp.getReceiverList();
|
|
|
|
|
return receiverList.get(0);
|
|
|
|
|
}catch (Exception e){
|
|
|
|
|
log.info("===========解密oaid失败========");
|
|
|
|
|
log.info("=========== 解密oaid失败,oaid:{}, sessionKey:{}========",oaid,sessionKey);
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|