From 659583526e963fc9ee69ace4802d634511af7f06 Mon Sep 17 00:00:00 2001 From: little-cat-sweet <2116400472@qq.com> Date: Mon, 2 Aug 2021 11:05:08 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E4=B8=9A=E5=8A=A1=E5=AD=97?= =?UTF-8?q?=E5=85=B8post=E8=AF=B7=E6=B1=82=E6=96=B9=E5=BC=8F=E4=B8=BA?= =?UTF-8?q?=E5=AF=B9=E5=BA=94=E5=AE=9E=E4=BD=93=E7=B1=BB=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/bootstrap.yml | 6 ++-- .../src/main/resources/bootstrap.yml | 4 +-- .../controller/XhpcDictBizController.java | 36 ++++++++++--------- .../xhpc/general/domain/XhpcDictionary.java | 1 + .../general/domain/XhpcDictionaryChild.java | 18 ++++++++++ 5 files changed, 44 insertions(+), 21 deletions(-) create mode 100644 xhpc-modules/xhpc-general/src/main/java/com/xhpc/general/domain/XhpcDictionaryChild.java diff --git a/ruoyi-gateway/src/main/resources/bootstrap.yml b/ruoyi-gateway/src/main/resources/bootstrap.yml index ce407c63..3306f5ff 100644 --- a/ruoyi-gateway/src/main/resources/bootstrap.yml +++ b/ruoyi-gateway/src/main/resources/bootstrap.yml @@ -16,10 +16,10 @@ spring: nacos: discovery: # 服务注册地址 - server-addr: 118.24.137.203:8848 + server-addr: 127.0.0.1:8848 config: # 配置中心地址 - server-addr: 118.24.137.203:8848 + server-addr: 127.0.0.1:8848 # 配置文件格式 file-extension: yml # 共享配置 @@ -35,7 +35,7 @@ spring: datasource: ds1: nacos: - server-addr: 118.24.137.203:8848 + server-addr: 127.0.0.1:8848 dataId: sentinel-ruoyi-gateway groupId: DEFAULT_GROUP data-type: json diff --git a/ruoyi-modules/ruoyi-system/src/main/resources/bootstrap.yml b/ruoyi-modules/ruoyi-system/src/main/resources/bootstrap.yml index 7dfa1916..9f189be1 100644 --- a/ruoyi-modules/ruoyi-system/src/main/resources/bootstrap.yml +++ b/ruoyi-modules/ruoyi-system/src/main/resources/bootstrap.yml @@ -14,10 +14,10 @@ spring: nacos: discovery: # 服务注册地址 - server-addr: 118.24.137.203:8848 + server-addr: 127.0.0.1:8848 config: # 配置中心地址 - server-addr: 118.24.137.203:8848 + server-addr: 127.0.0.1:8848 # 配置文件格式 file-extension: yml # 共享配置 diff --git a/xhpc-modules/xhpc-general/src/main/java/com/xhpc/general/controller/XhpcDictBizController.java b/xhpc-modules/xhpc-general/src/main/java/com/xhpc/general/controller/XhpcDictBizController.java index 446471b3..cc1ff8b9 100644 --- a/xhpc-modules/xhpc-general/src/main/java/com/xhpc/general/controller/XhpcDictBizController.java +++ b/xhpc-modules/xhpc-general/src/main/java/com/xhpc/general/controller/XhpcDictBizController.java @@ -4,6 +4,7 @@ import com.xhpc.common.core.web.controller.BaseController; import com.xhpc.common.core.web.domain.AjaxResult; import com.xhpc.common.core.web.page.TableDataInfo; import com.xhpc.general.domain.XhpcDictionary; +import com.xhpc.general.domain.XhpcDictionaryChild; import com.xhpc.general.service.IXhpcDictBizService; import org.apache.ibatis.annotations.Param; import org.springframework.beans.factory.annotation.Autowired; @@ -42,8 +43,9 @@ public class XhpcDictBizController extends BaseController { * @return */ @PostMapping("/addMainItem") - public AjaxResult addMainDictionaryItem(String name, String code, Integer sort){ - return xhpcDictBizService.addADictionaryItem(name,code,sort); + public AjaxResult addMainDictionaryItem(@RequestBody XhpcDictionary xhpcDictionary){ + + return xhpcDictBizService.addADictionaryItem(xhpcDictionary.getDictValue(),xhpcDictionary.getCode(),xhpcDictionary.getSort()); } @@ -69,9 +71,9 @@ public class XhpcDictBizController extends BaseController { * @return */ @PostMapping("/addDetailItem") - public AjaxResult addDetailDictionaryItem(@RequestParam("parentId") Long parentId, String code, String dictKey, String dictValue,Integer sort){ + public AjaxResult addDetailDictionaryItem(@RequestBody XhpcDictionary xhpcDictionary){ - return xhpcDictBizService.addAChildDictionaryItem(parentId, code, dictKey, dictValue, sort); + return xhpcDictBizService.addAChildDictionaryItem(xhpcDictionary.getParentId(), xhpcDictionary.getCode(), xhpcDictionary.getDictKey(), xhpcDictionary.getDictValue(), xhpcDictionary.getSort()); } @@ -81,14 +83,15 @@ public class XhpcDictBizController extends BaseController { * @return */ @PostMapping("/deleteChildDictionaryItem") - public AjaxResult deleteChildDictionaryItem(@RequestParam Long id){ + public AjaxResult deleteChildDictionaryItem(@RequestBody XhpcDictionary xhpcDictionary){ - return xhpcDictBizService.deleteChildDictionaryItem(id); + return xhpcDictBizService.deleteChildDictionaryItem(xhpcDictionary.getDictBizId()); } @PostMapping("/deleteFather") - public AjaxResult deleteParentItem(@RequestParam Long id){ - return xhpcDictBizService.deleteParentItem(id); + public AjaxResult deleteParentItem(@RequestBody XhpcDictionary xhpcDictionary){ + + return xhpcDictBizService.deleteParentItem(xhpcDictionary.getDictBizId()); } @@ -133,9 +136,9 @@ public class XhpcDictBizController extends BaseController { * @return */ @PostMapping("/updateFatherItem") - public AjaxResult updateFatherItem(@RequestParam Long dictBizId,String code,String keyValue,Integer sort){ + public AjaxResult updateFatherItem(@RequestBody XhpcDictionary xhpcDictionary){ - return xhpcDictBizService.updateMainItem(dictBizId, code, keyValue, sort); + return xhpcDictBizService.updateMainItem(xhpcDictionary.getDictBizId(), xhpcDictionary.getCode(), xhpcDictionary.getDictValue(), xhpcDictionary.getSort()); } @@ -149,9 +152,9 @@ public class XhpcDictBizController extends BaseController { * @return */ @PostMapping("/updateChildItem") - public AjaxResult updateChildItem(@RequestParam Long parentId,@RequestParam Long id, String value, String key,Integer sort ){ + public AjaxResult updateChildItem(@RequestBody XhpcDictionary xhpcDictionary){ - return xhpcDictBizService.updateChildItem(parentId, id, value, key, sort); + return xhpcDictBizService.updateChildItem(xhpcDictionary.getParentId(), xhpcDictionary.getDictBizId(), xhpcDictionary.getDictValue(), xhpcDictionary.getDictKey(), xhpcDictionary.getSort()); } @@ -161,13 +164,14 @@ public class XhpcDictBizController extends BaseController { * @return */ @PostMapping("/deleteChildItems") - public AjaxResult deletChildItems(@RequestParam String ids){ + public AjaxResult deletChildItems(@RequestBody XhpcDictionaryChild xhpcDictionaryChild){ - return xhpcDictBizService.deleteChildItems(ids); + return xhpcDictBizService.deleteChildItems(xhpcDictionaryChild.getIds()); } @PostMapping("/deleteParentItems") - public AjaxResult deleteParentItems(@RequestParam String ids){ - return xhpcDictBizService.deleteParentItems(ids); + public AjaxResult deleteParentItems(@RequestBody XhpcDictionaryChild xhpcDictionaryChild){ + + return xhpcDictBizService.deleteParentItems(xhpcDictionaryChild.getIds()); } } diff --git a/xhpc-modules/xhpc-general/src/main/java/com/xhpc/general/domain/XhpcDictionary.java b/xhpc-modules/xhpc-general/src/main/java/com/xhpc/general/domain/XhpcDictionary.java index f8f1db01..401a76f3 100644 --- a/xhpc-modules/xhpc-general/src/main/java/com/xhpc/general/domain/XhpcDictionary.java +++ b/xhpc-modules/xhpc-general/src/main/java/com/xhpc/general/domain/XhpcDictionary.java @@ -8,6 +8,7 @@ import com.xhpc.common.core.web.domain.BaseEntity; * Date:2021-07-27 11 */ public class XhpcDictionary extends BaseEntity { + private Long dictBizId; private Long parentId; private String code; diff --git a/xhpc-modules/xhpc-general/src/main/java/com/xhpc/general/domain/XhpcDictionaryChild.java b/xhpc-modules/xhpc-general/src/main/java/com/xhpc/general/domain/XhpcDictionaryChild.java new file mode 100644 index 00000000..82e651c1 --- /dev/null +++ b/xhpc-modules/xhpc-general/src/main/java/com/xhpc/general/domain/XhpcDictionaryChild.java @@ -0,0 +1,18 @@ +package com.xhpc.general.domain; + +/** + * program: ruoyi + * User: HongYun + * Date:2021-08-02 10 + */ +public class XhpcDictionaryChild extends XhpcDictionary { + private String ids; + + public String getIds() { + return ids; + } + + public void setIds(String ids) { + this.ids = ids; + } +}