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 | 32 +++++++++++++++++++++++++++++---
1 files changed, 29 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 9897cb0..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;
@@ -31,7 +33,7 @@
* @author rk
* @date 2026/04/10
*/
-@Api(tags = "闂ㄥ簵鍏ラ┗")
+@Api(tags = "闂ㄥ簵涓氬姟鎺ュ彛")
@RestController
@RequestMapping("/web/shopInfo")
public class ShopInfoApi extends ApiController {
@@ -58,6 +60,7 @@
return ApiResponse.success(shopInfoService.getMyShop(this.getMemberId()));
}
+
@ApiOperation("闄勮繎闂ㄥ簵鍒嗛〉鍒楄〃")
@PostMapping("/nearby")
public ApiResponse<PageData<ShopNearbyVO>> nearby(@RequestBody @Validated PageWrap<ShopNearbyDTO> pageWrap) {
@@ -81,6 +84,16 @@
}
@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({
@@ -95,7 +108,7 @@
@ApiOperation("缁存姢闂ㄥ簵淇℃伅锛堟敮浠樻娂閲戝悗锛�")
@PostMapping("/maintain")
public ApiResponse maintain(@RequestBody ShopInfoMaintainDTO dto) {
- shopInfoService.maintainShopInfo(this.getMemberId(), dto);
+ shopInfoService.maintainShopInfo(this.getShopId(), dto);
return ApiResponse.success("鎿嶄綔鎴愬姛");
}
@@ -103,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
@@ -116,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