|
|
@@ -940,11 +940,24 @@ public class GoodsDonController {
|
|
|
redisService.setNx(yhShopCacheKey, list, RedisService.key.YH_HOME_PAGHE_CACHE.getTimeout());
|
|
|
}
|
|
|
DateTime now = DateTime.now();
|
|
|
- list.forEach(data->{
|
|
|
- data.setSold(getGoodsSold(data.getId(), data.getSold()));
|
|
|
- data.setNotifyMsg(getPayMsgTime(data.getId(), now, 1, yhsId));
|
|
|
- });
|
|
|
- return GatewayResponse.SUCCESS.newBuilder().toResult(list);
|
|
|
+ list.forEach(data -> {
|
|
|
+ data.setSold(getGoodsSold(data.getId(), data.getSold()));
|
|
|
+ data.setNotifyMsg(getPayMsgTime(data.getId(), now, 1, yhsId));
|
|
|
+ Optional.ofNullable(yhShopGoodsSkuMapper.selectOne(Wrappers.lambdaQuery(YhShopGoodsSku.class)
|
|
|
+ .eq(YhShopGoodsSku::getYhsId, yhsId)
|
|
|
+ .eq(YhShopGoodsSku::getGoodsId, data.getId())
|
|
|
+ .eq(YhShopGoodsSku::getPrice, data.getPrice())
|
|
|
+ .eq(YhShopGoodsSku::getStatus, 1)
|
|
|
+ .eq(YhShopGoodsSku::getDeleted, 1)
|
|
|
+ .last("limit 1"))).ifPresent(yhSku -> {
|
|
|
+ GoodsDonSku sku = goodsDonSkuMapper.selectById(yhSku.getSkuId());
|
|
|
+ if (sku != null) {
|
|
|
+ data.setMonths(sku.getMonths());
|
|
|
+ data.setDays(sku.getDays());
|
|
|
+ }
|
|
|
+ });
|
|
|
+ });
|
|
|
+ return GatewayResponse.SUCCESS.newBuilder().toResult(list);
|
|
|
}
|
|
|
|
|
|
/**
|