package com.ruoyi.web.controller.app;

import com.fasterxml.jackson.annotation.JsonView;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.domain.JsonViewProfile;
import com.ruoyi.ss.channelWithdraw.service.ChannelWithdrawService;
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;

/**
 * @author wjh
 * 2024/8/2
 */
@RestController
@RequestMapping("/app/channel/withdraw")
public class AppChannelWithdrawController extends BaseController {

    @Autowired
    private ChannelWithdrawService channelWithdrawService;

    @ApiOperation("获取提现渠道列表")
    @GetMapping("/enabledList")
    @JsonView(JsonViewProfile.App.class)
    public AjaxResult getWithdrawEnabledList() {
        return success(channelWithdrawService.selectEnabledList(getUserId()));
    }

}
