| | |
| | | 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; |
| | |
| | | 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; |
| | | |
| | |
| | | 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新增,false修改 |
| | | * @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; |
| | | } |
| | | } |
| | | } |