From 25500b42588e6140de0f6e24823adc727a7b5b05 Mon Sep 17 00:00:00 2001
From: phpcjl <phpcjl@gmail.com>
Date: 星期三, 04 十二月 2024 17:48:50 +0800
Subject: [PATCH] 1.修复绑定门店bug

---
 ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/ShopController.java |   26 +++++++++++++++++++-------
 1 files changed, 19 insertions(+), 7 deletions(-)

diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/ShopController.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/ShopController.java
index 2751b13..577d5d6 100644
--- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/ShopController.java
+++ b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/ShopController.java
@@ -6,19 +6,19 @@
 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.domain.AjaxResult;
 import com.ruoyi.common.security.utils.SecurityUtils;
 import com.ruoyi.other.api.domain.Shop;
+import com.ruoyi.other.api.domain.Technician;
 import com.ruoyi.other.enums.ShopStatus;
 import com.ruoyi.other.service.ShopService;
 import com.ruoyi.other.service.TechnicianService;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.ApiParam;
-import org.springframework.web.bind.annotation.*;
 import com.ruoyi.other.vo.NearbyShopVO;
 import com.ruoyi.other.vo.ShopDetailVO;
 import com.ruoyi.other.vo.VerifiableShopVo;
-import io.swagger.annotations.*;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
 import org.springframework.web.bind.annotation.*;
 
 import javax.annotation.Resource;
@@ -101,8 +101,7 @@
     public R<Void> bindShop(@ApiParam("门店id") @RequestParam Long shopId) {
         AppUser appUser = appUserClient.getAppUserById(SecurityUtils.getUserId());
         appUser.setShopId(shopId);
-        appUserClient.editAppUserById(appUser);
-        return R.ok();
+        return appUserClient.editAppUserById(appUser);
     }
 
 
@@ -127,5 +126,18 @@
         Shop shop = shopService.getById(id);
         return R.ok(shop);
     }
+    
+    
+    /**
+     * 根据店铺管理员电话获取门店数据
+     * @param phone
+     * @return
+     */
+    @ResponseBody
+    @PostMapping("/getShopByPhone")
+    public R<Shop> getShopByPhone(@RequestParam("phone") String phone){
+        Shop one = shopService.getOne(new LambdaQueryWrapper<Shop>().eq(Shop::getPhone, phone).eq(Shop::getDelFlag, 0).eq(Shop::getStatus, 1));
+        return R.ok(one);
+    }
 }
 

--
Gitblit v1.7.1