CartInfo -> CartSkuModel
parent
62a35f5f45
commit
3591b3624c
|
@ -1,5 +1,7 @@
|
|||
package com.muyu.shop.cart.service.impl;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
|
@ -12,6 +14,8 @@ import com.muyu.product.cache.ProjectSkuStockCache;
|
|||
import com.muyu.product.cache.key.SkuStockKey;
|
||||
import com.muyu.shop.cart.cache.CartCache;
|
||||
import com.muyu.shop.cart.cache.key.CartHashKey;
|
||||
import com.muyu.shop.cart.domain.model.CartSkuModel;
|
||||
import com.muyu.shop.cart.domain.model.StatisticsCartModel;
|
||||
import com.muyu.shop.cart.domain.resp.CartDetailResp;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
@ -125,7 +129,22 @@ public class CartInfoServiceImpl extends ServiceImpl<CartInfoMapper, CartInfo>
|
|||
*/
|
||||
@Override
|
||||
public CartDetailResp detail () {
|
||||
return null;
|
||||
Long userId = SecurityUtils.getUserId();
|
||||
List<CartInfo> cartInfoList = cartCache.getToList(userId);
|
||||
// CartInfo -> CartSkuModel
|
||||
|
||||
|
||||
List<CartSkuModel> cartSkuList = new ArrayList<>();
|
||||
StatisticsCartModel statisticsCartModel = StatisticsCartModel.builder()
|
||||
.total(0L)
|
||||
.selectTotal(0L)
|
||||
.priceTotal(BigDecimal.ZERO)
|
||||
.actualTotal(BigDecimal.ZERO)
|
||||
.build();
|
||||
return CartDetailResp.builder()
|
||||
.cartSkuList(cartSkuList)
|
||||
.statisticsCart(statisticsCartModel)
|
||||
.build();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue