package beilv.userbill.controller;

import beilv.common.annotation.Log;
import beilv.common.core.controller.BaseController;
import beilv.common.core.domain.AjaxResult;
import beilv.common.core.page.TableDataInfo;
import beilv.common.enums.BusinessType;
import beilv.common.utils.poi.ExcelUtil;
import beilv.system.domain.SysMember;
import beilv.system.domain.dto.SysMemberDTO;
import beilv.system.service.ISysMemberService;
import beilv.userbill.domain.SysUserBill;
import beilv.userbill.service.ISysUserBillService;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * 小程序用户积分流水Controller
 *
 * @author ruoyi
 * @date 2024-12-31
 */
@RestController
@RequestMapping("/app-api/bill")
public class AppUserBillController extends BaseController {

    @Autowired
    private ISysUserBillService sysUserBillService;


    /**
     * 根据userId查询用户积分流水列表
     */
    @GetMapping("/selectBillListByUserId")
    @ResponseBody
    public AjaxResult listByUserId(SysUserBill sysUserBill) {
        startPage();
        List<SysUserBill> list = sysUserBillService.listByUserId(sysUserBill.getId());
        return AjaxResult.success(getDataTable(list));
    }
}
