IClearExportInterface.java
1.85 KB
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
57
58
59
package com.erry.iclear.dateInterface.controller;
import com.erry.iclear.dateInterface.service.IClearApiSystemService;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* @author Administrator
*
*/
@RestController
@RequestMapping("/system")
@Slf4j
public class IClearExportInterface {
@Autowired
private IClearApiSystemService iClearApiSystemService;
@ApiOperation(value = "IClear 健康检查", httpMethod = "GET", notes = "ex: http://localhost:8080/system/healthCheck")
@GetMapping("/healthCheck")
public String healthCheck() {
return "iClearApi 当前时间:" + System.currentTimeMillis();
}
@ApiOperation(value = "IClearApi 刷新缓存", httpMethod = "GET", notes = "ex: http://192.168.1.75:8080/system/refreshAppInfoCache")
@GetMapping("/refreshAppInfoCache")
public String refreshCache() {
try{
log.info("IClearApi 刷新缓存");
iClearApiSystemService.refreshAppInfoCache();
return "Success";
}catch (Exception e){
log.error("refreshCache() error:"+e.getMessage());
}
return "Faile";
}
//TODO 根据已记录的MAWB生成 运单数据,用户处理解析失败时的策略
@ApiOperation(value = "重新生成运单", httpMethod = "GET", notes = "ex: http://192.168.1.75:8080/system/refreshSendMawbe")
@GetMapping("/refreshSendMawbe")
public String refreshSendMawbe() {
try{
return "Success";
}catch (Exception e){
log.error("refreshCache() error:"+e.getMessage());
}
return "Faile";
}
}