package com.ruoyi.web.controller.mch;

import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.ss.refund.domain.RefundQuery;
import com.ruoyi.ss.refund.domain.RefundVO;
import com.ruoyi.ss.refund.service.RefundService;
import io.swagger.annotations.ApiOperation;
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;

import java.util.List;

/**
 * @author wjh
 * 2024/7/30
 */
@RestController
@RequestMapping("/mch/refund")
public class MchRefundController extends BaseController {

    @Autowired
    private RefundService refundService;

    @ApiOperation("订单收款人查询退款列表")
    @GetMapping("/list")
    public TableDataInfo list(RefundQuery query)
    {
        startPage();
        query.setBillMchId(getUserId());
        List<RefundVO> list = refundService.selectRefundList(query);
        return getDataTable(list);
    }

}
