...
|
...
|
@@ -43,14 +43,15 @@ public class PinYouServiceImpl implements IPinYouService { |
|
|
|
|
|
@Override
|
|
|
public UnionResponse sendPinYou() {
|
|
|
log.info("begin sendPinyou");
|
|
|
//从redis里面获取大数据的数据
|
|
|
Long viewSize = redisListCache.size(UNION_VIEW_KEY);
|
|
|
Long transSize = redisListCache.size(UNION_TRANS_KEY);
|
|
|
List<ViewPinYouRequestBO> viewPinYouRequestBOList = new ArrayList<>();
|
|
|
int viewSizeInt = viewSize == null ? 0 : viewSize.intValue();
|
|
|
int transSizeInt = transSize == null ? 0 : transSize.intValue();
|
|
|
log.info("viewSize is {},transSize is {}",viewSizeInt,viewSizeInt);
|
|
|
List<TransPinYouRequestBO> transPinYouRequestBOList = new ArrayList<>();
|
|
|
|
|
|
if (viewSizeInt > 0) {
|
|
|
for (int i = 0; i < viewSizeInt; i++) {
|
|
|
ViewPinYouRequestBO viewPinYouRequestBO = redisListCache.rightPop(UNION_VIEW_KEY, ViewPinYouRequestBO.class);
|
...
|
...
|
@@ -65,12 +66,14 @@ public class PinYouServiceImpl implements IPinYouService { |
|
|
}
|
|
|
|
|
|
if (CollectionUtils.isNotEmpty(viewPinYouRequestBOList)) {
|
|
|
log.info("viewPinYouRequestBOList size is {}",viewPinYouRequestBOList.size());
|
|
|
for (ViewPinYouRequestBO requestBO : viewPinYouRequestBOList) {
|
|
|
sendView(requestBO);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
if (CollectionUtils.isNotEmpty(transPinYouRequestBOList)) {
|
|
|
log.info("transPinYouRequestBOList size is {}",transPinYouRequestBOList.size());
|
|
|
for (TransPinYouRequestBO transPinYouRequestBO : transPinYouRequestBOList) {
|
|
|
sendTrans(transPinYouRequestBO);
|
|
|
}
|
...
|
...
|
|