Selaa lähdekoodia

查询门店基本信息

cup 2 vuotta sitten
vanhempi
commit
5263bd0c8f

+ 20 - 0
mp-admin/src/main/java/com/qs/mp/web/controller/api/channel/ChannelController.java

@@ -61,6 +61,7 @@ import org.springframework.security.core.parameters.P;
 import org.springframework.stereotype.Component;
 import org.springframework.util.CollectionUtils;
 import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.PathVariable;
 import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestMapping;
@@ -102,6 +103,25 @@ public class ChannelController extends BaseApiController {
     private IUserAddrService userAddrService;
 
 
+    @PostMapping("/saleSite/info/{channelId}")
+    @ApiOperation("查询门店基本信息")
+    @ApiResponses(
+        @ApiResponse(code = 200, message = "查询成功", response = ChannelVO.class)
+    )
+    public AjaxResult saleSiteInfo(@PathVariable("channelId") Long channelId) {
+        if (channelId == null || channelId <= 0) {
+            return AjaxResult.error("门店id不正确");
+        }
+
+        Channel channel = channelService.getById(channelId);
+        if (channel == null) {
+            return AjaxResult.error("门店信息不存在");
+        }
+
+        return AjaxResult.success("操作成功", channel.getSiteName());
+    }
+
+
     /**
      * 获取我的下级渠道列表信息,支持翻页
      *

+ 2 - 1
mp-framework/src/main/java/com/qs/mp/framework/config/SecurityConfig.java

@@ -153,7 +153,8 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter
                     "/api/v1/mp/user/ticket/prize/list/*",
                     "/api/v1/mp/user/isJump",
                     "/api/v1/mp/user/mall/ticket/goods/list",
-                    "/api/v1/mp/channel/promoter/register"
+                    "/api/v1/mp/channel/promoter/register",
+                    "/api/v1/mp/channel//saleSite/info/*"
                 ).permitAll()
                 // 除上面外的所有请求全部需要鉴权认证
                 .anyRequest().authenticated()