|
|
@@ -0,0 +1,43 @@
|
|
|
+package com.kym.miniapp.controller;
|
|
|
+
|
|
|
+import com.kym.common.IQuery;
|
|
|
+import com.kym.common.R;
|
|
|
+import com.kym.common.annotation.SysLog;
|
|
|
+import com.kym.common.controller.IController;
|
|
|
+import com.kym.entity.miniapp.DataDict;
|
|
|
+import com.kym.service.miniapp.DataDictService;
|
|
|
+import jakarta.annotation.Resource;
|
|
|
+import org.springframework.web.bind.annotation.PostMapping;
|
|
|
+import org.springframework.web.bind.annotation.RequestBody;
|
|
|
+import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
+import org.springframework.web.bind.annotation.RestController;
|
|
|
+
|
|
|
+
|
|
|
+/**
|
|
|
+ * <p>
|
|
|
+ * 数据字典 前端控制器
|
|
|
+ * </p>
|
|
|
+ * <ul>
|
|
|
+ * <li>字典以常量形式定义在业务实体类中,业务逻辑以常量替代,取消魔法值</li>
|
|
|
+ * <li>字典只提供查询接口,修改、新增由数据库DML执行实现</li>
|
|
|
+ * <li>为保持与前端及关联系统一致,字典定义后不可修改,不可删除,可废弃</li>
|
|
|
+ * </ul>
|
|
|
+ *
|
|
|
+ * @author zuy
|
|
|
+ * @since 2023-08-13
|
|
|
+ */
|
|
|
+@RestController
|
|
|
+@RequestMapping("/dataDict")
|
|
|
+public class DataDictController extends IController {
|
|
|
+
|
|
|
+ @Resource
|
|
|
+ private DataDictService dataDictService;
|
|
|
+
|
|
|
+ @SysLog("字典列表")
|
|
|
+ @PostMapping("list")
|
|
|
+ public R<?> list(@RequestBody IQuery<DataDict> query) {
|
|
|
+ return resp(() -> dataDictService.list(query));
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+}
|