package cn.pluss.platform.controller;

import cn.pluss.platform.api.PageInfo;
import cn.pluss.platform.api.Result;
import cn.pluss.platform.api.ResultGenerator;
import cn.pluss.platform.app.AccountBalanceService;
import cn.pluss.platform.entity.MakeMoney;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequiredArgsConstructor
public class AccountBalanceController {

    private final AccountBalanceService accountBalanceService;

    @GetMapping(value = "/queryBills")
    @ApiOperation(tags = {"页面-余额"}, value = "查询乐刷打款账单", notes = "查询乐刷打款账单", httpMethod = "POST")
    public Result<PageInfo<MakeMoney>> queryBills(Page<MakeMoney> page)  {
        page.setSize(20);
        PageInfo<MakeMoney> result = accountBalanceService.queryBills(page);
        return ResultGenerator.genSuccessResult(result);
    }
}
