From 7ee466ebc953bb5640bcf42f2b8e2a87aa471c21 Mon Sep 17 00:00:00 2001
From: MrShi <1878285526@qq.com>
Date: 星期三, 15 四月 2026 20:12:21 +0800
Subject: [PATCH] Merge branch 'master' of http://139.186.142.91:10010/r/productDev/gtzxinglijicun

---
 server/web/src/main/java/com/doumee/api/web/AccountApi.java |   44 +++++++++++++++++++++++++++++++++-----------
 1 files changed, 33 insertions(+), 11 deletions(-)

diff --git a/server/web/src/main/java/com/doumee/api/web/AccountApi.java b/server/web/src/main/java/com/doumee/api/web/AccountApi.java
index eccaa23..eb4aeaa 100644
--- a/server/web/src/main/java/com/doumee/api/web/AccountApi.java
+++ b/server/web/src/main/java/com/doumee/api/web/AccountApi.java
@@ -5,15 +5,19 @@
 import com.doumee.core.annotation.trace.Trace;
 import com.doumee.core.model.ApiResponse;
 import com.doumee.dao.business.model.Member;
+import com.doumee.dao.dto.ShopLoginDTO;
 import com.doumee.dao.dto.WxPhoneRequest;
 import com.doumee.dao.vo.AccountResponse;
+import com.doumee.dao.vo.ShopLoginVO;
 import com.doumee.service.business.MemberService;
+import com.doumee.service.business.ShopInfoService;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiImplicitParam;
 import io.swagger.annotations.ApiImplicitParams;
 import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.*;
 
 /**
@@ -33,9 +37,12 @@
     @Autowired
     private MemberService memberService;
 
+    @Autowired
+    private ShopInfoService shopInfoService;
+
 
     @Trace
-    @ApiOperation(value = "寰俊鎺堟潈", notes = "灏忕▼搴忕")
+    @ApiOperation(value = "浼氬憳寰俊鎺堟潈", notes = "灏忕▼搴忕")
     @GetMapping("/wxLogin")
     @ApiImplicitParams({
             @ApiImplicitParam(paramType = "query", dataType = "String", name = "code", value = "寰俊code", required = true)
@@ -45,7 +52,7 @@
     }
 
 
-    @ApiOperation(value = "鎺堟潈鎵嬫満鍙�", notes = "灏忕▼搴忕")
+    @ApiOperation(value = "浼氬憳鎺堟潈鎵嬫満鍙�", notes = "灏忕▼搴忕")
     @PostMapping("/wxAuthPhone")
     @ApiImplicitParams({
             @ApiImplicitParam(paramType = "query", dataType = "String", name = "code", value = "寰俊code", required = true)
@@ -54,20 +61,23 @@
         return  ApiResponse.success("鎿嶄綔鎴愬姛",memberService.wxAuthPhone(wxPhoneRequest));
     }
 
-    @LoginRequired
-    @ApiOperation(value = "閫�鍑虹櫥褰�", notes = "灏忕▼搴忕")
-    @GetMapping("/logOff")
+    @ApiOperation(value = "闂ㄥ簵璐﹀彿瀵嗙爜鐧诲綍", notes = "灏忕▼搴忕锛岄棬搴楃敤鎴烽�氳繃鎵嬫満鍙�+瀵嗙爜鐧诲綍")
+    @PostMapping("/shopLogin")
+    public ApiResponse<ShopLoginVO> shopLogin(@RequestBody @Validated ShopLoginDTO dto) {
+        return ApiResponse.success("鎿嶄綔鎴愬姛", shopInfoService.shopPasswordLogin(dto));
+    }
+
+    @ApiOperation(value = "闂ㄥ簵闈欓粯鐧诲綍", notes = "鏍规嵁openid鑷姩鐧诲綍闂ㄥ簵锛屾湭缁戝畾鍒欒繑鍥炵┖")
+    @GetMapping("/shopSilentLogin")
     @ApiImplicitParams({
-            @ApiImplicitParam(paramType = "header", dataType = "String", name = "token", value = "鐢ㄦ埛token鍊�", required = true),
+            @ApiImplicitParam(paramType = "query", dataType = "String", name = "openid", value = "寰俊openid", required = true)
     })
-    public ApiResponse logOff() {
-        String token = this.getRequest().getHeader(JwtTokenUtil.HEADER_KEY);
-        memberService.logOut(token,getMemberId());
-        return  ApiResponse.success("鎿嶄綔鎴愬姛");
+    public ApiResponse<ShopLoginVO> shopSilentLogin(@RequestParam String openid) {
+        return ApiResponse.success("鎿嶄綔鎴愬姛", shopInfoService.shopSilentLogin(openid));
     }
 
     @LoginRequired
-    @ApiOperation(value = "鐢ㄦ埛娉ㄩ攢", notes = "灏忕▼搴忕")
+    @ApiOperation(value = "閫�鍑虹櫥褰�", notes = "灏忕▼搴忕")
     @GetMapping("/logOut")
     @ApiImplicitParams({
             @ApiImplicitParam(paramType = "header", dataType = "String", name = "token", value = "鐢ㄦ埛token鍊�", required = true),
@@ -78,6 +88,18 @@
         return  ApiResponse.success("鎿嶄綔鎴愬姛");
     }
 
+    @LoginRequired
+    @ApiOperation(value = "鐢ㄦ埛娉ㄩ攢", notes = "灏忕▼搴忕")
+    @GetMapping("/logOff")
+    @ApiImplicitParams({
+            @ApiImplicitParam(paramType = "header", dataType = "String", name = "token", value = "鐢ㄦ埛token鍊�", required = true),
+    })
+    public ApiResponse logOff() {
+        String token = this.getRequest().getHeader(JwtTokenUtil.HEADER_KEY);
+        memberService.logOff(token,getMemberId());
+        return  ApiResponse.success("鎿嶄綔鎴愬姛");
+    }
+
 
 
 

--
Gitblit v1.9.3