package com.ruoyi.applet.contoller;

import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.model.service.ITransactionDetailsService;
import com.ruoyi.model.service.IWalletService;
import io.swagger.annotations.Api;
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;

@Api(description = "钱包")
@RestController
@RequestMapping("/applet/wallet")
public class AppletWalletController extends BaseController {
    @Autowired
    private IWalletService walletService;

    @ApiOperation("钱包列表")
    @GetMapping("/getWalletList")
    public TableDataInfo getWalletList(){
        return getDataTable(walletService.getWalletList());
    }
    @Autowired
    private ITransactionDetailsService transactionDetailsService;

    @ApiOperation("交易明细记录列表")
    @GetMapping("/getTransactionDetailsList")
    public TableDataInfo getTransactionDetailsList(){
        return getDataTable(transactionDetailsService.getTransactionDetailsList());
    }
}
