package com.ruoyi.web.controller.ss;

import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.ss.transactionBill.domain.TransactionBillQuery;
import com.ruoyi.ss.transactionBill.service.TransactionBillService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author wjh
 * 2024/8/2
 */
@RestController
@RequestMapping("/ss/withdraw")
public class WithdrawController extends BaseController {

    @Autowired
    private TransactionBillService transactionBillService;

    /**
     * 查询提现列表
     */
    @GetMapping("/list")
    public TableDataInfo list(TransactionBillQuery query) {
        startPage();
        return getDataTable(transactionBillService.selectWithdrawList(query));
    }

    /**
     * 查询提现详情
     */
    @GetMapping("/{billId}")
    public AjaxResult getInfo(@PathVariable("billId") Long billId) {
        return success(transactionBillService.selectWithdrawById(billId));
    }

}
