From 30bc5274884e0f6d11580f9d3af9e71d7a320888 Mon Sep 17 00:00:00 2001 From: jiangqs <jiangqs> Date: 星期四, 24 八月 2023 19:03:10 +0800 Subject: [PATCH] bug --- ruoyi-modules/ruoyi-shop/src/main/java/com/ruoyi/shop/controller/console/ShopController.java | 13 ++++++++++--- 1 files changed, 10 insertions(+), 3 deletions(-) diff --git a/ruoyi-modules/ruoyi-shop/src/main/java/com/ruoyi/shop/controller/console/ShopController.java b/ruoyi-modules/ruoyi-shop/src/main/java/com/ruoyi/shop/controller/console/ShopController.java index fdc0a46..8b1052e 100644 --- a/ruoyi-modules/ruoyi-shop/src/main/java/com/ruoyi/shop/controller/console/ShopController.java +++ b/ruoyi-modules/ruoyi-shop/src/main/java/com/ruoyi/shop/controller/console/ShopController.java @@ -1,5 +1,6 @@ package com.ruoyi.shop.controller.console; +import com.github.binarywang.wxpay.bean.profitsharingV3.ProfitSharingReceiver; import com.ruoyi.common.core.constant.CacheConstants; import com.ruoyi.common.core.domain.R; import com.ruoyi.common.core.exception.ServiceException; @@ -150,10 +151,10 @@ @PostMapping("/getShopByBelongUserId") public R<ShopRelUserVo> getShopByBelongUserId(@RequestBody Long userId) { - Shop shop = shopService.getShopByBelongUserId(userId); - Optional.ofNullable(shop).orElseThrow(() -> new ServiceException("未查询到商户信息")); + List<Shop> shopList = shopService.getShopByBelongUserId(userId); + Optional.ofNullable(shopList.get(0)).orElseThrow(() -> new ServiceException("未查询到商户信息")); ShopRelUserVo shopRelUserVo = new ShopRelUserVo(); - shopRelUserVo.setShopId(shop.getShopId()); + shopRelUserVo.setShopId(shopList.get(0).getShopId()); return R.ok(shopRelUserVo); } @@ -359,4 +360,10 @@ shopService.authShop(); return R.ok(); } + + @PostMapping("/addProfitSharingReceiver") + R authShop(@RequestBody ProfitSharingReceiver profitSharingReceiver){ + shopService.addProfitSharingReceiver(profitSharingReceiver); + return R.ok(); + } } -- Gitblit v1.7.1