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); } }