|
@@ -2349,11 +2349,32 @@ public class FsStoreOrderScrmServiceImpl implements IFsStoreOrderScrmService
|
|
cartMapper.insertFsStoreCart(storeCart);
|
|
cartMapper.insertFsStoreCart(storeCart);
|
|
ids.add(storeCart.getId());
|
|
ids.add(storeCart.getId());
|
|
}
|
|
}
|
|
|
|
+ List<FsStoreCartQueryVO> giftCarts = redisCache.getCacheObject("orderGiftCarts:" + createOrderKey);
|
|
|
|
+ List<Long> giftIds=new ArrayList<>();
|
|
|
|
+ if(giftCarts != null){
|
|
|
|
+ for(FsStoreCartQueryVO vo : giftCarts){
|
|
|
|
+ FsStoreCartScrm storeCart = FsStoreCartScrm.builder()
|
|
|
|
+ .cartNum(vo.getCartNum())
|
|
|
|
+ .productAttrValueId(vo.getProductAttrValueId())
|
|
|
|
+ .productId(vo.getProductId())
|
|
|
|
+ .userId(userId)
|
|
|
|
+ .isPay(0)
|
|
|
|
+ .isDel(0)
|
|
|
|
+ .isBuy(1)
|
|
|
|
+ .changePrice(vo.getPrice())
|
|
|
|
+ .isGift(1)
|
|
|
|
+ .build();
|
|
|
|
+ storeCart.setCreateTime(new Date());
|
|
|
|
+ cartMapper.insertFsStoreCart(storeCart);
|
|
|
|
+ giftIds.add(storeCart.getId());
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
//删除REDIS
|
|
//删除REDIS
|
|
// redisCache.deleteObject("createOrderKey:"+createOrderKey);
|
|
// redisCache.deleteObject("createOrderKey:"+createOrderKey);
|
|
// redisCache.deleteObject("orderCarts:" + createOrderKey);
|
|
// redisCache.deleteObject("orderCarts:" + createOrderKey);
|
|
String[] idArr=key.split("-");
|
|
String[] idArr=key.split("-");
|
|
- return R.ok().put("cartIds",ids).put("companyId",idArr[0]).put("companyUserId",idArr[1]);
|
|
|
|
|
|
+ return R.ok().put("cartIds",ids).put("companyId",idArr[0]).put("companyUserId",idArr[1]).put("giftCartIds",giftIds);
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|