From 9d120c7e494d39f6ba7147055d402b1f2ec8311a Mon Sep 17 00:00:00 2001 From: wangw <1594593906@qq.com> Date: Fri, 13 Mar 2026 14:32:23 +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 | 29 ++++++++++--------- .../czg/system/service/SysParamsService.java | 2 +- .../service/impl/SysParamsServiceImpl.java | 4 +-- 3 files changed, 19 insertions(+), 16 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 741dcb82e..fe2f1c17a 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 @@ -12,6 +12,8 @@ import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; /** * 用户端 @@ -25,17 +27,17 @@ public class UserVersionController { @Resource private SysParamsService sysParamsService; - /** - * 获取版本信息 - * - * @param source 渠道 - * @param type 类型 - * @return VersionDTO - */ - @GetMapping("/version/info/{source}/{type}") - public CzgResult getVersionInfo(@PathVariable("source") String source, @PathVariable("type") String type) { - return versionService.getVersionInfo(source, type); - } +// /** +// * 获取版本信息 +// * +// * @param source 渠道 +// * @param type 类型 +// * @return VersionDTO +// */ +// @GetMapping("/version/info/{source}/{type}") +// public CzgResult getVersionInfo(@PathVariable("source") String source, @PathVariable("type") String type) { +// return versionService.getVersionInfo(source, type); +// } /** @@ -44,7 +46,8 @@ public class UserVersionController { * @return VersionDTO */ @GetMapping("/getHelp") - public CzgResult> getHelpInfo() { - return sysParamsService.getParamsByParamType("system_help"); + public CzgResult> getHelpInfo() { + List systemHelps = sysParamsService.getParamsByParamType("system_help"); + return CzgResult.success(systemHelps.stream().collect(Collectors.toMap(SysParamsDTO::getParamCode, SysParamsDTO::getParamValue))); } } 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 7b660d470..4fe59e971 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 @@ -82,5 +82,5 @@ public interface SysParamsService extends IService { * @param paramType 参数类型 * @return 参数列表 */ - CzgResult> getParamsByParamType(String paramType) throws CzgException; + List 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 ba2edc66b..27381ab4b 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 @@ -154,7 +154,7 @@ public class SysParamsServiceImpl extends ServiceImpl> getParamsByParamType(String paramType) throws CzgException { - return CzgResult.success(listAs(query().eq(SysParams::getParamType, paramType), SysParamsDTO.class)); + public List getParamsByParamType(String paramType) throws CzgException { + return listAs(query().eq(SysParams::getParamType, paramType), SysParamsDTO.class); } }