| | |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | @ApiOperation(value = "获取购物车列表") |
| | | public R<List<AppShoppingCartVo>> listShoppingCart() { |
| | | Long userId = SecurityUtils.getUserId(); |
| | | if(null == userId){ |
| | | return R.ok(new ArrayList<>()); |
| | | } |
| | | Member member = memberService.getMember(userId).getData(); |
| | | Long shopId = member.getRelationShopId(); |
| | | List<AppShoppingCartVo> appShoppingCartVoList = shoppingCartService.listShoppingCartVo(userId, shopId); |