Commit 5cde1c03752916d91a83410a85d31d313a969365
1 parent
34b3d553
update:购物车更新时,数组为空就不进行更新,直接返回成功。
Showing
1 changed file
with
2 additions
and
0 deletions
etrade-order/src/main/java/com/diligrp/etrade/order/api/ShopCartApi.java
... | ... | @@ -89,6 +89,8 @@ public class ShopCartApi { |
89 | 89 | public Message<?> updatelistShopCart(@RequestBody List<ShopCartCacheDto> shopCartCacheDtoList){ |
90 | 90 | if (!CollectionUtils.isEmpty(shopCartCacheDtoList)){ |
91 | 91 | AssertUtils.isTrue(shopCartCacheDtoList.size()<=50,"离线购物车本地缓存超过50条!"); |
92 | + }else{ | |
93 | + return Message.success(); | |
92 | 94 | } |
93 | 95 | Long customerId = shopCartCacheDtoList.get(0).getCustomerId(); |
94 | 96 | int size = shopCartCacheDtoList.size(); | ... | ... |