许鹏程
2023-10-23 a7b18ead641993787f29cfb3c143a39ef3e60b5e
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
package com.product.data.center.controller;
 
import com.product.core.controller.support.AbstractBaseController;
import com.product.core.exception.BaseException;
import com.product.data.center.service.DataValidationService;
import com.product.module.sys.version.ApiVersion;
import com.product.util.BaseUtil;
import org.springframework.scheduling.annotation.Async;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
 
import javax.annotation.Resource;
 
/**
 * @Author cheng
 * @Date 2022/11/23 15:31
 * @Desc
 */
@RestController
@RequestMapping("/api/mes-data-validation")
public class DataValidationController extends AbstractBaseController {
 
    @Resource
    DataValidationService dataValidationService;
 
    @PostMapping("/{version}")
    @ApiVersion(1)
    public String getMesValidationData() {
        try {
 
            return BaseUtil.success(dataValidationService.getValidationData());
        } catch (BaseException e) {
            e.printStackTrace();
            return error(e);
        } catch (Exception e) {
            return error(new BaseException(e));
        }
    }
}