From 79aebca90280ae4d4b25ed6ba6267128cdb61d3a Mon Sep 17 00:00:00 2001
From: rk <94314517@qq.com>
Date: 星期六, 25 四月 2026 14:26:37 +0800
Subject: [PATCH] 代码生成

---
 server/web/src/main/java/com/doumee/api/web/ShopInfoApi.java |   44 +++++++++++++++++++++++++++++++++++++++++---
 1 files changed, 41 insertions(+), 3 deletions(-)

diff --git a/server/web/src/main/java/com/doumee/api/web/ShopInfoApi.java b/server/web/src/main/java/com/doumee/api/web/ShopInfoApi.java
index 6595950..3b5a48a 100644
--- a/server/web/src/main/java/com/doumee/api/web/ShopInfoApi.java
+++ b/server/web/src/main/java/com/doumee/api/web/ShopInfoApi.java
@@ -2,6 +2,8 @@
 
 import com.doumee.core.annotation.LoginRequired;
 import com.doumee.core.annotation.LoginShopRequired;
+import com.doumee.core.annotation.trace.Trace;
+import com.doumee.config.jwt.JwtTokenUtil;
 import com.doumee.core.model.ApiResponse;
 import com.doumee.core.model.PageData;
 import com.doumee.core.model.PageWrap;
@@ -13,6 +15,7 @@
 import com.doumee.dao.vo.ShopDetailVO;
 import com.doumee.dao.vo.ShopCenterVO;
 import com.doumee.dao.vo.ShopNearbyVO;
+import com.doumee.dao.vo.ShopSalesStatsVO;
 import com.doumee.dao.vo.ShopWebDetailVO;
 import com.doumee.dao.vo.PayResponse;
 import com.doumee.service.business.OrdersService;
@@ -30,7 +33,7 @@
  * @author rk
  * @date 2026/04/10
  */
-@Api(tags = "闂ㄥ簵鍏ラ┗")
+@Api(tags = "闂ㄥ簵涓氬姟鎺ュ彛")
 @RestController
 @RequestMapping("/web/shopInfo")
 public class ShopInfoApi extends ApiController {
@@ -57,6 +60,7 @@
         return ApiResponse.success(shopInfoService.getMyShop(this.getMemberId()));
     }
 
+
     @ApiOperation("闄勮繎闂ㄥ簵鍒嗛〉鍒楄〃")
     @PostMapping("/nearby")
     public ApiResponse<PageData<ShopNearbyVO>> nearby(@RequestBody @Validated PageWrap<ShopNearbyDTO> pageWrap) {
@@ -80,10 +84,31 @@
     }
 
     @LoginShopRequired
+    @ApiOperation("闂ㄥ簵绔煡璇㈤棬搴楄鎯�")
+    @GetMapping("/shopDetail")
+    @ApiImplicitParams({
+            @ApiImplicitParam(paramType = "header", dataType = "String", name = "token", value = "闂ㄥ簵token鍊�", required = true)
+    })
+    public ApiResponse<ShopDetailVO> shopDetail() {
+        return ApiResponse.success("鏌ヨ鎴愬姛", shopInfoService.getShopDetail(getShopId()));
+    }
+
+    @LoginShopRequired
+    @ApiOperation("闂ㄥ簵閿�鍞粺璁�")
+    @GetMapping("/salesStats")
+    @ApiImplicitParams({
+            @ApiImplicitParam(paramType = "header", dataType = "String", name = "token", value = "闂ㄥ簵token鍊�", required = true),
+            @ApiImplicitParam(paramType = "query", dataType = "Integer", name = "period", value = "缁熻鍛ㄦ湡锛�0=浠婃棩, 1=鏈湀, 2=涓婃湀", required = true)
+    })
+    public ApiResponse<ShopSalesStatsVO> salesStats(@RequestParam Integer period) {
+        return ApiResponse.success("鏌ヨ鎴愬姛", shopInfoService.getShopSalesStats(getShopId(), period));
+    }
+
+    @LoginShopRequired
     @ApiOperation("缁存姢闂ㄥ簵淇℃伅锛堟敮浠樻娂閲戝悗锛�")
     @PostMapping("/maintain")
     public ApiResponse maintain(@RequestBody ShopInfoMaintainDTO dto) {
-        shopInfoService.maintainShopInfo(this.getMemberId(), dto);
+        shopInfoService.maintainShopInfo(this.getShopId(), dto);
         return ApiResponse.success("鎿嶄綔鎴愬姛");
     }
 
@@ -91,7 +116,7 @@
     @ApiOperation("鏌ヨ闂ㄥ簵缁存姢淇℃伅")
     @PostMapping("/maintainInfo")
     public ApiResponse<ShopInfoMaintainDTO> maintainInfo() {
-        return ApiResponse.success(shopInfoService.getShopMaintainInfo(this.getMemberId()));
+        return ApiResponse.success(shopInfoService.getShopMaintainInfo(this.getShopId()));
     }
 
     @LoginRequired
@@ -104,4 +129,17 @@
         return ApiResponse.success("鎿嶄綔鎴愬姛", ordersService.payShopDeposit(getMemberId()));
     }
 
+    @LoginShopRequired
+    @Trace
+    @ApiOperation(value = "闂ㄥ簵淇敼瀵嗙爜", notes = "鏂板瘑鐮佸繀椤诲悓鏃跺寘鍚瓧姣嶅拰鏁板瓧锛屼慨鏀规垚鍔熷悗闇�閲嶆柊鐧诲綍")
+    @PostMapping("/changePassword")
+    @ApiImplicitParams({
+            @ApiImplicitParam(paramType = "header", dataType = "String", name = "token", value = "闂ㄥ簵token鍊�", required = true),
+    })
+    public ApiResponse changePassword(@RequestParam String newPassword) {
+        String token = this.getRequest().getHeader(JwtTokenUtil.HEADER_KEY);
+        shopInfoService.changePassword(this.getShopId(), newPassword, token);
+        return ApiResponse.success("瀵嗙爜淇敼鎴愬姛锛岃閲嶆柊鐧诲綍");
+    }
+
 }

--
Gitblit v1.9.3