From 7eebfc8a64d2cbbd73453a2b653d5a5bfd66a32f Mon Sep 17 00:00:00 2001
From: rk <94314517@qq.com>
Date: 星期四, 16 四月 2026 20:10:44 +0800
Subject: [PATCH] 代码生成
---
server/web/src/main/java/com/doumee/api/web/ConfigApi.java | 93 +++++++++++++++++++++++++++++++++++++++++++---
1 files changed, 86 insertions(+), 7 deletions(-)
diff --git a/server/web/src/main/java/com/doumee/api/web/ConfigApi.java b/server/web/src/main/java/com/doumee/api/web/ConfigApi.java
index f59c98f..0391012 100644
--- a/server/web/src/main/java/com/doumee/api/web/ConfigApi.java
+++ b/server/web/src/main/java/com/doumee/api/web/ConfigApi.java
@@ -3,20 +3,26 @@
import com.doumee.core.annotation.LoginRequired;
import com.doumee.core.annotation.trace.Trace;
import com.doumee.core.model.ApiResponse;
+import com.doumee.dao.business.model.Areas;
+import com.doumee.dao.business.model.Banner;
import com.doumee.dao.business.model.Category;
+import com.doumee.dao.dto.CalculateLocalPriceDTO;
+import com.doumee.dao.dto.CalculateRemotePriceDTO;
import com.doumee.dao.vo.AccountResponse;
-import com.doumee.service.business.CategoryService;
+import com.doumee.dao.vo.PriceCalculateVO;
+import com.doumee.dao.vo.PlatformAboutVO;
+import com.doumee.service.business.*;
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.checkerframework.checker.units.qual.A;
import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestParam;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.*;
+import javax.validation.Valid;
+import java.math.BigDecimal;
import java.util.List;
/**
@@ -28,21 +34,94 @@
@Api(tags = "閰嶇疆绫绘帴鍙�")
@Trace(exclude = true)
@RestController
-@RequestMapping("/web/orders")
+@RequestMapping("/web/config")
@Slf4j
public class ConfigApi extends ApiController{
@Autowired
private CategoryService categoryService;
+ @Autowired
+ private AreasService areasService;
+
+ @Autowired
+ private BannerService bannerService;
+
+ @Autowired
+ private OrdersService ordersService;
+
+ @Autowired
+ private MemberService memberService;
+
@ApiOperation(value = "鑾峰彇鍒嗙被鍒楄〃", notes = "灏忕▼搴忕")
@GetMapping("/getCategoryList")
@ApiImplicitParams({
- @ApiImplicitParam(paramType = "query", dataType = "Integer", name = "type", value = "绫诲瀷:0=鍝佺閰嶇疆;1=杞﹁締绫诲瀷閰嶇疆;2=椁愭爣閰嶇疆;3=鎵嬬画璐归厤缃�;", required = true)
+ @ApiImplicitParam(paramType = "query", dataType = "Integer", name = "type", value = "绫诲瀷:1=杞﹁締绫诲瀷;2=鐗╁搧鍒嗙被;3=鐗╁搧绛夌骇;4=鐗╁搧灏哄;", required = true)
})
public ApiResponse<List<Category>> getCategoryList(@RequestParam Integer type) {
return ApiResponse.success("鎿嶄綔鎴愬姛",categoryService.getCategoryList(type));
}
+ @ApiOperation(value = "鑾峰彇寮�鏀惧煄甯傚垪琛�", notes = "杩斿洖宸插紑鏀惧煄甯傦紝鍚瀛楁瘝锛屾寜棣栧瓧姣嶆帓搴�")
+ @GetMapping("/getOpenCityList")
+ public ApiResponse<List<Areas>> getOpenCityList() {
+ return ApiResponse.success("鎿嶄綔鎴愬姛", areasService.getOpenCityList());
+ }
+
+ @ApiOperation(value = "鑾峰彇杞挱鍥惧垪琛�", notes = "鏍规嵁浣嶇疆杩斿洖杞挱鍥撅紝鍚浘鐗囧叏璺緞")
+ @GetMapping("/getBannerList")
+ @ApiImplicitParams({
+ @ApiImplicitParam(paramType = "query", dataType = "Integer", name = "position", value = "浣嶇疆:0=浼氬憳绔椤佃疆鎾�;1=鍙告満APP寮曞椤�;", required = true)
+ })
+ public ApiResponse<List<Banner>> getBannerList(@RequestParam Integer position) {
+ return ApiResponse.success("鎿嶄綔鎴愬姛", bannerService.findListByPosition(position));
+ }
+
+ @ApiOperation(value = "鑾峰彇鍩庡競宸插紑閫氱墿鍝佸昂瀵�", notes = "鏍规嵁鍩庡競涓婚敭鏌ヨ宸插紑閫氱殑鐗╁搧灏哄(category type=4)")
+ @GetMapping("/getCitySizeList")
+ @ApiImplicitParams({
+ @ApiImplicitParam(paramType = "query", dataType = "Integer", name = "cityId", value = "鍩庡競涓婚敭", required = true)
+ })
+ public ApiResponse<List<Category>> getCitySizeList(@RequestParam Integer cityId) {
+ return ApiResponse.success("鎿嶄綔鎴愬姛", categoryService.getCitySizeList(cityId));
+ }
+
+
+ @ApiOperation(value = "鑾峰彇绯荤粺閰嶇疆", notes = "灏忕▼搴忕")
+ @GetMapping("/getPlatformAboutUs")
+ public ApiResponse<PlatformAboutVO> getPlatformAboutUs() {
+ return ApiResponse.success("鏌ヨ鎴愬姛",memberService.getPlatformAboutUs());
+ }
+
+ @LoginRequired
+ @ApiOperation(value = "璁$畻淇濅环璐圭敤", notes = "鏍规嵁鎶ヤ环閲戦璁$畻淇濅环璐圭敤")
+ @GetMapping("/calculateInsuranceFee")
+ @ApiImplicitParams({
+ @ApiImplicitParam(paramType = "query", dataType = "BigDecimal", name = "declaredValue", value = "鎶ヤ环閲戦", required = true),
+ @ApiImplicitParam(paramType = "header", dataType = "String", name = "token", value = "鐢ㄦ埛token鍊�", required = true)
+ })
+ public ApiResponse<BigDecimal> calculateInsuranceFee(@RequestParam BigDecimal declaredValue) {
+ return ApiResponse.success("鎿嶄綔鎴愬姛", ordersService.calculateInsuranceFee(declaredValue));
+ }
+
+ @LoginRequired
+ @ApiOperation(value = "璁$畻灏卞湴瀛樺彇棰勪及璐圭敤", notes = "鏍规嵁鍩庡競銆佸ぉ鏁般�佺墿鍝佺被鍨嬪拰鏁伴噺璁$畻灏卞湴瀛樺彇棰勪及璐圭敤")
+ @PostMapping("/calculateLocalPrice")
+ public ApiResponse<PriceCalculateVO> calculateLocalPrice(@RequestBody @Valid CalculateLocalPriceDTO dto) {
+ return ApiResponse.success("鎿嶄綔鎴愬姛", ordersService.calculateLocalPrice(dto));
+ }
+
+ @LoginRequired
+ @ApiOperation(value = "璁$畻寮傚湴瀛樺彇棰勪及璐圭敤", notes = "鏍规嵁璺濈銆佺墿鍝佺被鍨嬪拰鏁伴噺璁$畻寮傚湴瀛樺彇棰勪及璐圭敤")
+ @PostMapping("/calculateRemotePrice")
+ public ApiResponse<PriceCalculateVO> calculateRemotePrice(@RequestBody @Valid CalculateRemotePriceDTO dto) {
+ return ApiResponse.success("鎿嶄綔鎴愬姛", ordersService.calculateRemotePrice(dto));
+ }
+
+
+
+
+
+
}
--
Gitblit v1.9.3