4
hao
2025-04-16 c5fb1fbcbb2bf4d511773d348f9ef625855c61fc
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
50
51
52
53
54
55
56
package com.template.controller;
 
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
 
import com.app.base.control.WebController;
import com.app.base.data.ApiResponseResult;
import com.template.service.TemplateService;
 
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
 
@Api(description = "看板模块")
@CrossOrigin
@ControllerAdvice
//@RestController
@Controller
@RequestMapping(value = "/template")
public class TemplateController extends WebController {
 
    @Autowired
    private TemplateService templateService;
 
 
    @ApiOperation(value = "根据code获取配置样式信息", notes = "根据code获取配置样式信息")
    @RequestMapping(value = "/getCodeData", method = RequestMethod.GET)
    @ResponseBody
    public ApiResponseResult getCodeData(String code){
        try{
            return templateService.getCodeData(code);
        }catch (Exception e){
            e.printStackTrace();
            logger.error("根据code获取配置样式信息失败!", e);
            return ApiResponseResult.failure("根据code获取配置样式信息失败!");
        }
    }
    
    @ApiOperation(value = "根据code获取配置样式信息", notes = "根据code获取配置样式信息")
    @RequestMapping(value = "/getHeyiData", method = RequestMethod.GET)
    @ResponseBody
    public ApiResponseResult getHeyiData(String code){
        try{
            return templateService.getHeyiData(code);
        }catch (Exception e){
            e.printStackTrace();
            logger.error("根据code获取配置样式信息失败!", e);
            return ApiResponseResult.failure("根据code获取配置样式信息失败!");
        }
    }
 
}