| | |
| | | import cn.lili.modules.member.entity.dos.MemberAddress; |
| | | import cn.lili.modules.member.service.MemberAddressService; |
| | | import cn.lili.modules.member.service.MemberService; |
| | | import cn.lili.modules.order.cart.entity.dto.BuyBackDTO; |
| | | import cn.lili.modules.order.cart.entity.dto.MemberCouponDTO; |
| | | import cn.lili.modules.order.cart.entity.dto.TradeDTO; |
| | | import cn.lili.modules.order.cart.entity.enums.CartTypeEnum; |
| | |
| | | import cn.lili.modules.store.entity.dos.StoreAddress; |
| | | import cn.lili.modules.store.service.StoreAddressService; |
| | | import cn.lili.modules.store.service.StoreService; |
| | | import com.beust.ah.A; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | |
| | | @Autowired |
| | | private StoreAddressService storeAddressService; |
| | | |
| | | @Autowired |
| | | private CartService cartService; |
| | | |
| | | @Override |
| | | public void add(String skuId, Integer num, String cartType, Boolean cover) { |
| | |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void buyBack(List<BuyBackDTO> backDTO) { |
| | | //将原有的商品取消选中 |
| | | cartService.checkedAll(false); |
| | | //添加商品 |
| | | backDTO.forEach(buyBackDTO -> { |
| | | cartService.add(buyBackDTO.getSkuId(), buyBackDTO.getNum(), CartTypeEnum.CART.name(), true); |
| | | }); |
| | | } |
| | | |
| | | @Override |
| | | public void clean() { |
| | | cache.remove(this.getOriginKey(CartTypeEnum.CART)); |
| | | } |