| | |
| | | |
| | | import cn.hutool.core.collection.CollectionUtil; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.ruoyi.account.api.feignClient.AppUserClient; |
| | | import com.ruoyi.account.api.model.AppUser; |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.core.web.controller.BaseController; |
| | | import com.ruoyi.common.core.web.page.TableDataInfo; |
| | |
| | | private GoodsShopClient goodsShopClient; |
| | | @Resource |
| | | private ShopClient shopClient; |
| | | @Resource |
| | | private AppUserClient appUserClient; |
| | | |
| | | |
| | | |
| | |
| | | @GetMapping("/getVerifiableShop") |
| | | @ApiOperation(value = "获取可核销门店列表", tags = {"购物车-小程序"}) |
| | | public R<List<VerifiableShopVo>> getVerifiableShop(){ |
| | | LoginUser loginUser = tokenService.getLoginUser(); |
| | | LoginUser loginUser = tokenService.getLoginUserApplet(); |
| | | List<ShoppingCart> shoppingCarts = shoppingCartService.list(new LambdaQueryWrapper<ShoppingCart>() |
| | | .eq(ShoppingCart::getAppUserId, loginUser.getUserid())); |
| | | |
| | |
| | | } |
| | | return R.ok(verifiableShopVoList); |
| | | } |
| | | |
| | | |
| | | @GetMapping("/getGoodsPrice") |
| | | public R<Price> getGoodsPrice(Long appUserId, Integer goodsId, Integer shopId){ |
| | | AppUser appUser = appUserClient.getAppUserById(appUserId); |
| | | Price price = shoppingCartService.getPrice(appUser, goodsId, shopId); |
| | | return R.ok(price); |
| | | } |
| | | |
| | | |
| | | } |