From 2ccdf86ac2599562ca994bc4047ded2d925e8bae Mon Sep 17 00:00:00 2001 From: Pu Zhibing <393733352@qq.com> Date: 星期五, 29 十一月 2024 16:33:12 +0800 Subject: [PATCH] 开发确认购物车订单逻辑 --- ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/SystemConfigController.java | 17 ++++++++++++++--- 1 files changed, 14 insertions(+), 3 deletions(-) diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/SystemConfigController.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/SystemConfigController.java index 5971bd0..5ae1bc6 100644 --- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/SystemConfigController.java +++ b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/SystemConfigController.java @@ -4,9 +4,7 @@ import com.ruoyi.common.core.domain.R; import com.ruoyi.other.api.domain.SystemConfig; import com.ruoyi.other.service.SystemConfigService; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.bind.annotation.*; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; @@ -31,5 +29,18 @@ SystemConfig one = systemConfigService.lambdaQuery().eq(SystemConfig::getType, type).last("limit 1").one(); return R.ok(one); } + + + /** + * 根据类型获取系统配置 + * @param type + * @return + */ + @ResponseBody + @PostMapping("/getSystemConfig") + public R<SystemConfig> getSystemConfig(@RequestParam("type") Integer type){ + SystemConfig one = systemConfigService.lambdaQuery().eq(SystemConfig::getType, type).last("limit 1").one(); + return R.ok(one); + } } -- Gitblit v1.7.1