From 467fe3b3ec6aa9d449b094bdd9df4611323d88d1 Mon Sep 17 00:00:00 2001
From: rk <94314517@qq.com>
Date: 星期五, 24 四月 2026 21:43:50 +0800
Subject: [PATCH] 代码生成
---
server/web/src/main/java/com/doumee/api/web/WalletApi.java | 34 ++++++++++++++++++++++++++++++----
1 files changed, 30 insertions(+), 4 deletions(-)
diff --git a/server/web/src/main/java/com/doumee/api/web/WalletApi.java b/server/web/src/main/java/com/doumee/api/web/WalletApi.java
index ac0cb79..57012c0 100644
--- a/server/web/src/main/java/com/doumee/api/web/WalletApi.java
+++ b/server/web/src/main/java/com/doumee/api/web/WalletApi.java
@@ -1,10 +1,12 @@
package com.doumee.api.web;
+import com.doumee.core.annotation.LoginDriverRequired;
import com.doumee.core.annotation.LoginRequired;
import com.doumee.core.annotation.LoginShopRequired;
import com.doumee.core.model.ApiResponse;
import com.doumee.dao.dto.WithdrawalDTO;
import com.doumee.dao.vo.RevenueStatisticsVO;
+import com.doumee.dao.business.model.WithdrawalOrders;
import com.doumee.service.business.RevenueService;
import com.doumee.service.business.WithdrawalOrdersService;
import io.swagger.annotations.Api;
@@ -14,6 +16,7 @@
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
+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;
@@ -38,14 +41,14 @@
@Autowired
private RevenueService revenueService;
- @LoginRequired
+ @LoginDriverRequired
@ApiOperation(value = "鍙告満鎻愮幇鐢宠", notes = "灏忕▼搴忕")
@PostMapping("/driverApply")
@ApiImplicitParams({
@ApiImplicitParam(paramType = "header", dataType = "String", name = "token", value = "鐢ㄦ埛token鍊�", required = true),
})
public ApiResponse driverApply(@RequestBody @Validated WithdrawalDTO dto) {
- withdrawalOrdersService.applyDriverWithdrawal(dto, getMemberId());
+ withdrawalOrdersService.applyDriverWithdrawal(dto, getDriverId());
return ApiResponse.success("鎻愮幇鐢宠宸叉彁浜�");
}
@@ -70,14 +73,37 @@
return ApiResponse.success("鏌ヨ鎴愬姛", revenueService.getShopRevenueStatistics(getShopId()));
}
- @LoginRequired
+ @LoginDriverRequired
@ApiOperation(value = "鍙告満鏀剁泭缁熻", notes = "褰撳墠鐧诲綍鍙告満鐨勬敹鐩�/鎻愮幇缁熻")
@GetMapping("/driverStatistics")
@ApiImplicitParams({
@ApiImplicitParam(paramType = "header", dataType = "String", name = "token", value = "鐢ㄦ埛token鍊�", required = true)
})
public ApiResponse<RevenueStatisticsVO> driverStatistics() {
- return ApiResponse.success("鏌ヨ鎴愬姛", revenueService.getDriverRevenueStatistics(getMemberId()));
+ return ApiResponse.success("鏌ヨ鎴愬姛", revenueService.getDriverRevenueStatistics(getDriverId()));
+ }
+
+ @LoginShopRequired
+ @ApiOperation(value = "闂ㄥ簵鎻愮幇璇︽儏", notes = "鏍规嵁鎻愮幇涓婚敭鏌ヨ璇︽儏锛堝惈瀹℃壒浜轰俊鎭級")
+ @GetMapping("/shopDetail/{id}")
+ @ApiImplicitParams({
+ @ApiImplicitParam(paramType = "header", dataType = "String", name = "token", value = "鐢ㄦ埛token鍊�", required = true),
+ @ApiImplicitParam(paramType = "path", dataType = "Integer", name = "id", value = "鎻愮幇璁板綍涓婚敭", required = true)
+ })
+ public ApiResponse<WithdrawalOrders> shopDetail(@PathVariable Integer id) {
+ return ApiResponse.success("鏌ヨ鎴愬姛", withdrawalOrdersService.findById(id));
+ }
+
+
+ @LoginDriverRequired
+ @ApiOperation(value = "鍙告満鎻愮幇璇︽儏", notes = "鏍规嵁鎻愮幇涓婚敭鏌ヨ璇︽儏锛堝惈瀹℃壒浜轰俊鎭級")
+ @GetMapping("/driverDetail/{id}")
+ @ApiImplicitParams({
+ @ApiImplicitParam(paramType = "header", dataType = "String", name = "token", value = "鐢ㄦ埛token鍊�", required = true),
+ @ApiImplicitParam(paramType = "path", dataType = "Integer", name = "id", value = "鎻愮幇璁板綍涓婚敭", required = true)
+ })
+ public ApiResponse<WithdrawalOrders> driverDetail(@PathVariable Integer id) {
+ return ApiResponse.success("鏌ヨ鎴愬姛", withdrawalOrdersService.findById(id));
}
}
--
Gitblit v1.9.3