From cf17c2f7012fc4351f66c71d66a4aa3a9fe9e34a Mon Sep 17 00:00:00 2001
From: rk <94314517@qq.com>
Date: 星期四, 30 四月 2026 15:24:17 +0800
Subject: [PATCH] 代码生成

---
 server/web/src/main/java/com/doumee/api/web/ShopInfoApi.java |   58 +++++++++++++++++++++++++++++++++++++++++++++++++++++++---
 1 files changed, 55 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..0d1f123 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,10 +2,13 @@
 
 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;
 import com.doumee.dao.business.model.Member;
+import com.doumee.dao.dto.ChangePasswordDTO;
 import com.doumee.dao.dto.ShopApplyDTO;
 import com.doumee.dao.dto.ShopDetailQueryDTO;
 import com.doumee.dao.dto.ShopInfoMaintainDTO;
@@ -13,6 +16,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;
@@ -22,6 +26,7 @@
 import io.swagger.annotations.ApiImplicitParams;
 import io.swagger.annotations.ApiOperation;
 import org.springframework.beans.factory.annotation.Autowired;
+import javax.validation.Valid;
 import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.*;
 
@@ -30,7 +35,7 @@
  * @author rk
  * @date 2026/04/10
  */
-@Api(tags = "闂ㄥ簵鍏ラ┗")
+@Api(tags = "闂ㄥ簵涓氬姟鎺ュ彛")
 @RestController
 @RequestMapping("/web/shopInfo")
 public class ShopInfoApi extends ApiController {
@@ -57,6 +62,7 @@
         return ApiResponse.success(shopInfoService.getMyShop(this.getMemberId()));
     }
 
+
     @ApiOperation("闄勮繎闂ㄥ簵鍒嗛〉鍒楄〃")
     @PostMapping("/nearby")
     public ApiResponse<PageData<ShopNearbyVO>> nearby(@RequestBody @Validated PageWrap<ShopNearbyDTO> pageWrap) {
@@ -80,10 +86,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 +118,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 +131,29 @@
         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(@RequestBody @Valid ChangePasswordDTO dto) {
+        String token = this.getRequest().getHeader(JwtTokenUtil.HEADER_KEY);
+        shopInfoService.changePassword(this.getShopId(), dto.getOldPassword(), dto.getNewPassword(), token);
+        return ApiResponse.success("瀵嗙爜淇敼鎴愬姛锛岃閲嶆柊鐧诲綍");
+    }
+
+    @LoginShopRequired
+    @ApiOperation("闂ㄥ簵鎵撳嵃璁㈠崟鏍囩")
+    @GetMapping("/printOrderLabel/{orderId}")
+    @ApiImplicitParams({
+            @ApiImplicitParam(paramType = "header", dataType = "String", name = "token", value = "闂ㄥ簵token鍊�", required = true),
+            @ApiImplicitParam(paramType = "path", dataType = "Integer", name = "orderId", value = "璁㈠崟涓婚敭", required = true)
+    })
+    public ApiResponse printOrderLabel(@PathVariable Integer orderId) {
+        ordersService.printOrderLabel(orderId, this.getShopId());
+        return ApiResponse.success("鎵撳嵃鎴愬姛");
+    }
+
 }

--
Gitblit v1.9.3