From 66a397414a20aa592ce24ecd622024bc7744b7a0 Mon Sep 17 00:00:00 2001 From: yuxc <yuxc@vci-tech.com> Date: 星期三, 24 七月 2024 15:14:17 +0800 Subject: [PATCH] 新增平台链接类型的新增,修改,查询接口 --- Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/OsLinkTypeController.java | 44 ++++++++++++++++++++++++++++++++++++++++---- 1 files changed, 40 insertions(+), 4 deletions(-) diff --git a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/OsLinkTypeController.java b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/OsLinkTypeController.java index 9308325..1780a4c 100644 --- a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/OsLinkTypeController.java +++ b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/OsLinkTypeController.java @@ -1,5 +1,7 @@ package com.vci.web.controller; +import com.vci.corba.common.PLException; +import com.vci.corba.omd.ltm.LinkType; import com.vci.pagemodel.OsBtmTypeAttributeVO; import com.vci.pagemodel.OsLinkTypeAttributeVO; import com.vci.pagemodel.OsLinkTypeVO; @@ -10,11 +12,9 @@ import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.util.CollectionUtils; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.bind.annotation.*; +import java.util.Arrays; import java.util.List; import java.util.stream.Collectors; @@ -93,4 +93,40 @@ return BaseResult.success(); } } + + + /** + * 閾炬帴绫诲瀷鐨勫垪琛� + * + * @return 閾炬帴绫诲瀷鐨勬樉绀哄璞� + */ + @GetMapping("/gridLink") + public BaseResult<List<LinkType>> gridLink(){ + try { + return linkTypeService.gridLink(); + } catch (PLException e) { + BaseResult objectBaseResult = new BaseResult<>(); + objectBaseResult.setCode(Integer.parseInt(e.code)); + objectBaseResult.setMsg(Arrays.toString(e.messages)); + return objectBaseResult; + } + } + + /** + * 閾炬帴绫诲瀷淇濆瓨 + * linkType 閾炬帴绫诲瀷鐨勪繚瀛樺璞� + * addFlag 鏄惁涓烘柊澧� true鏂板锛宖alse淇敼 + * @return 淇濆瓨缁撴灉 + */ + @GetMapping("/addAndEditLink") + public BaseResult addAndEditLink(@RequestBody LinkType linkType, Boolean addFlag){ + try { + return linkTypeService.addAndEditLink(linkType, addFlag); + } catch (PLException e) { + BaseResult objectBaseResult = new BaseResult<>(); + objectBaseResult.setCode(Integer.parseInt(e.code)); + objectBaseResult.setMsg(Arrays.toString(e.messages)); + return objectBaseResult; + } + } } -- Gitblit v1.9.3