From 3aa44b5d90d1dec942cf531f662189114d66eb95 Mon Sep 17 00:00:00 2001 From: xiaofajia <1665375861@qq.com> Date: Wed, 6 Nov 2024 12:04:41 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=A2=84=E7=BA=A6=E9=80=89?= =?UTF-8?q?=E6=8B=A9=E4=B8=9A=E5=8A=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../app/dict/controller/DictController.java | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 dl-module-base/src/main/java/cn/iocoder/yudao/module/app/dict/controller/DictController.java diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/app/dict/controller/DictController.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/app/dict/controller/DictController.java new file mode 100644 index 00000000..ee0f7eb1 --- /dev/null +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/app/dict/controller/DictController.java @@ -0,0 +1,35 @@ +package cn.iocoder.yudao.module.app.dict.controller; + +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.module.system.api.dict.DictDataApi; +import cn.iocoder.yudao.module.system.api.dict.dto.DictDataRespDTO; +import io.swagger.v3.oas.annotations.Operation; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; + +import javax.annotation.Resource; +import java.util.List; + +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; + +/** + * 通用的非PC查字典数据 + * + * @author 小李 + * @date 11:20 2024/11/6 +**/ +@RestController +@RequestMapping("/userClient/dict") +public class DictController { + + @Resource + private DictDataApi dictDataApi; + + @GetMapping("/type") + @Operation(summary = "根据类型查该类型的所有数据") + public CommonResult getDictByType(@RequestParam("type") String type) { + return success(dictDataApi.getDictDataList(type)); + } +}