From dfd77a2f5f905e27216b87d207f9fe8c4035e797 Mon Sep 17 00:00:00 2001 From: ludc Date: 星期三, 24 七月 2024 18:21:19 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- 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 2ab88b8..8b592a7 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; @@ -14,11 +16,9 @@ import org.slf4j.LoggerFactory; 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; @@ -119,4 +119,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