From 8240d3cbfbcfe1574dbe3b4d7723e7b541d5c989 Mon Sep 17 00:00:00 2001
From: 13693261870 <252740454@qq.com>
Date: 星期一, 26 九月 2022 15:45:49 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.20.39:8989/r/LFServer

---
 src/main/java/com/lf/server/controller/data/DictController.java |   72 ++++++++++++++++++++++++++++++++++++
 1 files changed, 72 insertions(+), 0 deletions(-)

diff --git a/src/main/java/com/lf/server/controller/data/DictController.java b/src/main/java/com/lf/server/controller/data/DictController.java
new file mode 100644
index 0000000..703d766
--- /dev/null
+++ b/src/main/java/com/lf/server/controller/data/DictController.java
@@ -0,0 +1,72 @@
+package com.lf.server.controller.data;
+
+
+import com.lf.server.entity.data.DictEntity;
+import com.lf.server.service.data.DictService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+/**
+ * 瀛楀吀绠$悊
+ * @author sws
+ * @date 2022-09.26
+ */
+
+@RestController
+@RequestMapping("/Dict")
+public class DictController {
+    @Autowired
+    DictService dictService;
+
+    @RequestMapping(value = "/insertDict", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
+    public Integer insertDict(DictEntity dictEntity) {
+
+        return dictService.insertDict(dictEntity);
+    }
+
+    @RequestMapping(value = "/insertDicts", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
+    public Integer insertDicts(@RequestBody List<DictEntity> dictEntity) {
+
+        return dictService.insertDicts(dictEntity);
+    }
+
+    @ResponseBody
+    @RequestMapping(value = "/deleteDict", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
+    public Integer deleteStyle(int id) {
+        return dictService.deleteDict(id);
+    }
+
+
+    @RequestMapping(value = "/deleteDicts", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
+    public Integer deleteDicts(@RequestBody List<Integer> ids) {
+        if (!ids.isEmpty()) {
+            return dictService.deleteDicts(ids);
+        } else {
+            return -1;
+        }
+    }
+
+    @ResponseBody
+    @RequestMapping(value = "/updateDict", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
+    public Integer updateDict(DictEntity dictEntity) {
+        return dictService.updateDict(dictEntity);
+    }
+
+    @GetMapping(value = "/selectDict")
+    public DictEntity selectDict(int id) {
+        return dictService.selectDict(id);
+    }
+
+    @GetMapping(value = "/selectDictAll")
+    public List<DictEntity> selectDictAll() {
+        return dictService.selectDictAll();
+    }
+
+
+    @GetMapping(value = "/selectDictTab")
+    public List<DictEntity> selectDictTab() {
+        return dictService.selectDictTab();
+    }
+}

--
Gitblit v1.9.3