package com.yh.saas.plugin.yiliangyiyun.controller;


import com.baomidou.mybatisplus.plugins.Page;
import com.yh.saas.plugin.yiliangyiyun.entity.RepaymentManagement;
import com.yh.saas.plugin.yiliangyiyun.service.IRepaymentManagementService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 * 贸易仓单还款管理 前端控制器
 * </p>
 *
 * @author Gdc
 * @since 2021-11-09
 */
@RestController
@RequestMapping("/repaymentManagement")
public class RepaymentManagementController {

    @Autowired
    private IRepaymentManagementService repaymentManagementService;

    /**
     * 还款列表
     * @param repaymentManagement
     * @return
     */
    @GetMapping("/selectRepaymentManagement")
    public Page<RepaymentManagement> selectRepaymentManagement(RepaymentManagement repaymentManagement){
        return repaymentManagementService.selectRepaymentManagement(repaymentManagement);
    }

    /**
     * 还款
     * @param repaymentManagement
     * @return
     */
    @PostMapping("/api/repaymentMoney")
    public String repaymentMoney(@RequestBody RepaymentManagement repaymentManagement){
        return repaymentManagementService.repaymentMoney(repaymentManagement);
    }
}

