帮助中心

This commit is contained in:
2026-03-13 14:32:23 +08:00
parent cd437c221f
commit 9d120c7e49
3 changed files with 19 additions and 16 deletions

View File

@@ -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<VersionDTO> 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<VersionDTO> 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<List<SysParamsDTO>> getHelpInfo() {
return sysParamsService.getParamsByParamType("system_help");
public CzgResult<Map<String, String>> getHelpInfo() {
List<SysParamsDTO> systemHelps = sysParamsService.getParamsByParamType("system_help");
return CzgResult.success(systemHelps.stream().collect(Collectors.toMap(SysParamsDTO::getParamCode, SysParamsDTO::getParamValue)));
}
}

View File

@@ -82,5 +82,5 @@ public interface SysParamsService extends IService<SysParams> {
* @param paramType 参数类型
* @return 参数列表
*/
CzgResult<List<SysParamsDTO>> getParamsByParamType(String paramType) throws CzgException;
List<SysParamsDTO> getParamsByParamType(String paramType) throws CzgException;
}

View File

@@ -154,7 +154,7 @@ public class SysParamsServiceImpl extends ServiceImpl<SysParamsMapper, SysParams
@Cacheable(cacheNames = "params:paramType", key = "#paramType")
@Override
public CzgResult<List<SysParamsDTO>> getParamsByParamType(String paramType) throws CzgException {
return CzgResult.success(listAs(query().eq(SysParams::getParamType, paramType), SysParamsDTO.class));
public List<SysParamsDTO> getParamsByParamType(String paramType) throws CzgException {
return listAs(query().eq(SysParams::getParamType, paramType), SysParamsDTO.class);
}
}