“mitao”
2026-04-10 ff81ea1b22aa35776012233f0e3c8b4073faee69
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
package com.xiaopeng.trafficControl.controller;
 
 
import com.xiaopeng.common.core.domain.R;
import com.xiaopeng.trafficControl.utils.MinistryOfTransport;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
 
import javax.annotation.Resource;
 
@RestController
@RequestMapping("/")
public class HttpTestController {
 
    @Resource
    private MinistryOfTransport ministryOfTransport;
 
 
    /**
     * 测试上传数据接口
     * 用于验证上传数据的准确性
     * 模拟交通部接口
     */
    @ResponseBody
    @RequestMapping("/base/v0.1/testPush")
    public R<String> testPush(){
        try {
            String token = ministryOfTransport.getToken();
            return R.ok(token);
        }catch (Exception e){
            e.printStackTrace();
            return R.fail(e.getMessage());
        }
    }
}