ludc
2023-05-17 b7a96fdc87ba86a100cd8fddbd03080f72703089
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
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;
    }
}