SendLogController.java 1.3 KB
package com.tianbo.analysis.controller;

import com.tianbo.analysis.dao.SENDLOGMapper;
import com.tianbo.analysis.model.ResultJson;
import com.tianbo.analysis.model.SENDLOG;
import com.tianbo.analysis.service.SendLogService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
@RequestMapping("/sendlog")
public class SendLogController {

    @Resource
    SENDLOGMapper sendlogMapper;

    @Autowired
    SendLogService sendLogService;

    @RequestMapping("/id")
    public ResultJson getById(@RequestParam(value = "id",required = true) String messageId){
        List<SENDLOG> result = sendlogMapper.selectByMessageId(messageId);
        return new ResultJson<>("200","success",result);
    }

    @ApiOperation(value = "查询进出港运单放行信息")
    @RequestMapping("checkWaybillPermit")
    public ResultJson checkWaybillPermit(@RequestParam(value = "waybill",required = true) String waybill){
        return new ResultJson("200","success",sendLogService.checkWaybillPermit(waybill));
    }
}