Commit 53338875 by 吕明尚

修改优惠券查询因美团查询超时的异常

parent c8b8b80e
......@@ -111,7 +111,17 @@ public class RedisTask {
TuangouReceiptGetConsumedReponseEntity getconsumed = qpService.getconsumed(coupon.getCouponCode(),
stores.stream().filter(store -> store.getId().equals(coupon.getStoreId())).findFirst().get().getOpenShopUuid());
if (getconsumed == null) {
expiredCoupons.add(coupon.getId());
//延时3秒
try {
Thread.sleep(1000);
} catch (InterruptedException e) {
e.printStackTrace();
}
getconsumed = qpService.getconsumed(coupon.getCouponCode(),
stores.stream().filter(store -> store.getId().equals(coupon.getStoreId())).findFirst().get().getOpenShopUuid());
if (getconsumed == null) {
expiredCoupons.add(coupon.getId());
}
}
logger.info("券码:{}->查询结束:{}", coupon.getCouponCode(), getconsumed);
} else if (StringUtils.isNoneEmpty(coupon.getTiktokSkuId()) && coupon.getPlatformType().equals(PlatformTypeEnum.TIKTOK.getCode())) {
......
......@@ -446,6 +446,7 @@ public class QPServiceImpl implements QPService {
}
}
@Override
public List<SStore> getsStores(List<SStore> sStoreList, SCoupon sCoupon) {
List<SStore> collect = sStoreList.stream().filter(o -> {
String storeIds = sCoupon.getStoreIds();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment