package com.base.biz.controller;

import com.base.biz.model.dto.PayloadInfoDTO;
import com.base.biz.model.dto.request.PayloadInfoDTOListReq;
import com.base.biz.service.PayloadService;
import com.base.orbit.web.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;

@RestController
@RequestMapping("/api/payload")
@Api(tags = "载荷管理")
public class PayloadController {

    @Resource
    PayloadService payloadService;

    @ApiOperation(value = "载荷信息查询",response = PayloadInfoDTO.class)
    @GetMapping("/list")
    public Object getPayloadInfoList(PayloadInfoDTOListReq req){
       return Result.success(payloadService.getPayloadInfoList(req));
    }
}
