refactor: 优化查询参数字典 API 地址

This commit is contained in:
Charles7c 2024-04-23 22:01:04 +08:00
parent 67fa4edc4d
commit 79a3de8971

View File

@ -110,10 +110,10 @@ public class CommonController {
}
@SaIgnore
@Operation(summary = "查询参数", description = "查询参数")
@GetMapping("/option")
@Operation(summary = "查询参数字典", description = "查询参数字典")
@GetMapping("/dict/option")
@Cached(key = "#query.code", name = CacheConstants.OPTION_KEY_PREFIX)
public R<List<LabelValueResp<String>>> listOption(@Validated OptionQuery query) {
public R<List<LabelValueResp<String>>> listOptionDict(@Validated OptionQuery query) {
return R.ok(optionService.list(query)
.stream()
.map(option -> new LabelValueResp<>(option.getCode(), StrUtil.nullToDefault(option.getValue(), option