IClearExportInterface.java 1.86 KB
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";
    }

}