| | |
| | | package com.vci.ubcs.code.controller; |
| | | |
| | | import com.vci.ubcs.code.service.UniversalInterfaceI; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springblade.core.tool.api.R; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | /** |
| | | * 主题库分类控制器 |
| | | * |
| | | * @author xiejun |
| | | * @date 2022-01-20 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/codeSyncUniversalController") |
| | | public class CodeSyncUniversalController { |
| | | /** |
| | | * 日志 |
| | | */ |
| | | private Logger logger = LoggerFactory.getLogger(getClass()); |
| | | /** |
| | | * 接口集成服务 |
| | | */ |
| | | @Autowired |
| | | private UniversalInterfaceI universalInterfaceI; |
| | | /**** |
| | | * 申请接口 |
| | | * @param dataString 属性信息 |
| | | * @param dataType 数据格式类型 |
| | | * @return |
| | | * @throws Throwable |
| | | */ |
| | | @PostMapping("/applyCode") |
| | | public String applyCode(@RequestParam("dataString")String dataString, @RequestParam("dataType")String dataType) { |
| | | String result=""; |
| | | try { |
| | | result = universalInterfaceI.applyCode(dataString, dataType); |
| | | }catch (Throwable e){ |
| | | e.printStackTrace(); |
| | | logger.error("applyCode->"+e.getMessage()); |
| | | } |
| | | return result; |
| | | } |
| | | } |