From cd437c221fcd71fed893f523137d093d1926a650 Mon Sep 17 00:00:00 2001 From: wangw <1594593906@qq.com> Date: Fri, 13 Mar 2026 14:10:47 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B8=AE=E5=8A=A9=E4=B8=AD=E5=BF=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../user/UserVersionController.java | 25 ++++++++++++++++--- .../czg/system/service/SysParamsService.java | 8 ++++++ .../service/impl/SysParamsServiceImpl.java | 6 +++++ 3 files changed, 36 insertions(+), 3 deletions(-) diff --git a/cash-api/system-server/src/main/java/com/czg/controller/user/UserVersionController.java b/cash-api/system-server/src/main/java/com/czg/controller/user/UserVersionController.java index 9632c7dfd..741dcb82e 100644 --- a/cash-api/system-server/src/main/java/com/czg/controller/user/UserVersionController.java +++ b/cash-api/system-server/src/main/java/com/czg/controller/user/UserVersionController.java @@ -1,7 +1,9 @@ package com.czg.controller.user; import com.czg.resp.CzgResult; +import com.czg.system.dto.SysParamsDTO; import com.czg.system.dto.VersionDTO; +import com.czg.system.service.SysParamsService; import com.czg.system.service.VersionService; import jakarta.annotation.Resource; import org.springframework.web.bind.annotation.GetMapping; @@ -9,23 +11,40 @@ import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; +import java.util.List; + /** + * 用户端 * @author GYJoker */ @RestController -@RequestMapping("/user/version") +@RequestMapping("/user") public class UserVersionController { @Resource private VersionService versionService; + @Resource + private SysParamsService sysParamsService; /** * 获取版本信息 + * * @param source 渠道 - * @param type 类型 + * @param type 类型 * @return VersionDTO */ - @GetMapping("/info/{source}/{type}") + @GetMapping("/version/info/{source}/{type}") public CzgResult getVersionInfo(@PathVariable("source") String source, @PathVariable("type") String type) { return versionService.getVersionInfo(source, type); } + + + /** + * 帮助中心 + * + * @return VersionDTO + */ + @GetMapping("/getHelp") + public CzgResult> getHelpInfo() { + return sysParamsService.getParamsByParamType("system_help"); + } } diff --git a/cash-common/cash-common-service/src/main/java/com/czg/system/service/SysParamsService.java b/cash-common/cash-common-service/src/main/java/com/czg/system/service/SysParamsService.java index 4ab6e97dc..7b660d470 100644 --- a/cash-common/cash-common-service/src/main/java/com/czg/system/service/SysParamsService.java +++ b/cash-common/cash-common-service/src/main/java/com/czg/system/service/SysParamsService.java @@ -75,4 +75,12 @@ public interface SysParamsService extends IService { * @param keyList 内容为 {@link com.czg.constants.ParamCodeCst}的Set集合 */ Map getParamsByMap(String type, Set keyList) throws CzgException; + + /** + * 根据参数类型获取参数 + * + * @param paramType 参数类型 + * @return 参数列表 + */ + CzgResult> getParamsByParamType(String paramType) throws CzgException; } diff --git a/cash-service/system-service/src/main/java/com/czg/service/system/service/impl/SysParamsServiceImpl.java b/cash-service/system-service/src/main/java/com/czg/service/system/service/impl/SysParamsServiceImpl.java index 83d4db32a..ba2edc66b 100644 --- a/cash-service/system-service/src/main/java/com/czg/service/system/service/impl/SysParamsServiceImpl.java +++ b/cash-service/system-service/src/main/java/com/czg/service/system/service/impl/SysParamsServiceImpl.java @@ -151,4 +151,10 @@ public class SysParamsServiceImpl extends ServiceImpl> getParamsByParamType(String paramType) throws CzgException { + return CzgResult.success(listAs(query().eq(SysParams::getParamType, paramType), SysParamsDTO.class)); + } }