| | |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.core.web.controller.BaseController; |
| | | import com.ruoyi.common.security.utils.SecurityUtils; |
| | | import com.ruoyi.order.domain.dto.AppBaseBathDto; |
| | | import com.ruoyi.system.api.domain.dto.AppBaseBathDto; |
| | | import com.ruoyi.order.domain.dto.AppGoodsInfoGetDto; |
| | | import com.ruoyi.order.domain.dto.AppShoppingCartAddDto; |
| | | import com.ruoyi.order.domain.dto.AppShoppingCartChangeDto; |
| | | import com.ruoyi.order.domain.vo.AppGoodsInfoVo; |
| | | import com.ruoyi.order.service.goods.GoodsService; |
| | | import com.ruoyi.order.service.goods.ShopGoodsService; |
| | | import com.ruoyi.order.service.order.ShoppingCartService; |
| | | import com.ruoyi.system.api.RemoteMemberService; |
| | | import com.ruoyi.system.api.domain.poji.member.Member; |
| | |
| | | Long userId = SecurityUtils.getUserId(); |
| | | if(userId!=null){ |
| | | Member member = memberService.getMember(userId).getData(); |
| | | if(member!=null&&member.getRealtionShopId()!=null){ |
| | | appGoodsInfoGetDto.setShopId(member.getRealtionShopId()); |
| | | if(member!=null&&member.getRelationShopId()!=null){ |
| | | appGoodsInfoGetDto.setShopId(member.getRelationShopId()); |
| | | } |
| | | } |
| | | AppGoodsInfoVo appGoodsInfoVo = goodsService.getGoodsInfo(appGoodsInfoGetDto); |
| | |
| | | if(userId!=null){ |
| | | Member member = memberService.getMember(userId).getData(); |
| | | appShoppingCartAddDto.setUserId(userId); |
| | | if(member!=null&&member.getRealtionShopId()!=null){ |
| | | appShoppingCartAddDto.setShopId(member.getRealtionShopId()); |
| | | if(member!=null&&member.getRelationShopId()!=null){ |
| | | appShoppingCartAddDto.setShopId(member.getRelationShopId()); |
| | | } |
| | | } |
| | | shoppingCartService.addShoppingCart(appShoppingCartAddDto); |
| | |
| | | if(userId!=null){ |
| | | Member member = memberService.getMember(userId).getData(); |
| | | appShoppingCartChangeDto.setUserId(userId); |
| | | if(member!=null&&member.getRealtionShopId()!=null){ |
| | | appShoppingCartChangeDto.setShopId(member.getRealtionShopId()); |
| | | if(member!=null&&member.getRelationShopId()!=null){ |
| | | appShoppingCartChangeDto.setShopId(member.getRelationShopId()); |
| | | } |
| | | } |
| | | shoppingCartService.changeShoppingCart(appShoppingCartChangeDto); |