| | |
| | | Member member = memberService.getMember(userId).getData(); |
| | | if(member!=null&&member.getRelationShopId()!=null){ |
| | | appGoodsInfoGetDto.setShopId(member.getRelationShopId()); |
| | | }else{ |
| | | appGoodsInfoGetDto.setShopId(1L); |
| | | } |
| | | } |
| | | AppGoodsInfoVo appGoodsInfoVo = goodsService.getGoodsInfo(appGoodsInfoGetDto); |
| | |
| | | @ApiOperation(value = "添加购物车") |
| | | public R addShoppingCart(@RequestBody AppShoppingCartAddDto appShoppingCartAddDto) { |
| | | Long userId = SecurityUtils.getUserId(); |
| | | if(userId!=null){ |
| | | if(userId != null){ |
| | | Member member = memberService.getMember(userId).getData(); |
| | | appShoppingCartAddDto.setUserId(userId); |
| | | if(member!=null&&member.getRelationShopId()!=null){ |
| | | if(appShoppingCartAddDto.getShopId()==null&&member!=null&&member.getRelationShopId()!=null){ |
| | | appShoppingCartAddDto.setShopId(member.getRelationShopId()); |
| | | } |
| | | } |