package com.base.biz.controller;

import com.base.biz.model.dto.request.LinkCountDTO;
import com.base.biz.service.LinkCountService;
import com.base.orbit.web.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/api/link")
@Api(value = "余量计算")
public class LinkCountController {

    @Autowired
    private LinkCountService linkCountService;


    @ApiOperation(value = "余量计算")
    @PostMapping("/count")
    public Object linkCount(@RequestBody LinkCountDTO req){
        Double Margin= linkCountService.linkCount(req);
        return Result.success(Margin);
    }
}
