package com.seer.teach.pay.admin.withdrawal.controller;

import cn.dev33.satoken.annotation.SaCheckPermission;
import cn.dev33.satoken.stp.StpUtil;
import com.seer.teach.common.ResultBean;
import com.seer.teach.pay.admin.withdrawal.controller.response.PayWithdrawalBalanceResp;
import com.seer.teach.pay.admin.withdrawal.service.AdminPayMerchantAccountService;
import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.v3.oas.annotations.Operation;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 用户可提现余额 前端控制器
 * </p>
 *
 * @author ZS
 * @since 2025-09-22
 */
@Tag(name = "商户端 - 商户账户")
@RequiredArgsConstructor
@RestController
@RequestMapping("/pay/merchant/account")
public class AdminPayMerchantAccountController {

    private final AdminPayMerchantAccountService payWithdrawalBalanceService;


    @Operation(summary = "获取商户账户详情")
    @GetMapping("/my-detail")
    @SaCheckPermission("admin:pay:merchant:account:detail")
    public ResultBean<PayWithdrawalBalanceResp> getMyAccountDetail() {
        return ResultBean.success(payWithdrawalBalanceService.getMyAccountDetail(StpUtil.getLoginIdAsLong()));
    }

}