package com.starry.admin.modules.custom.controller;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.starry.admin.modules.custom.module.vo.PlayCustomRankingQueryVo;
import com.starry.admin.modules.custom.module.vo.PlayCustomRankingReturnVo;
import com.starry.admin.modules.custom.service.IPlayCustomUserInfoService;
import com.starry.common.result.R;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * 顾客Controller
 *
 * @author admin
 * @since 2024-04-08
 */
@RestController
@RequestMapping("/custom/ranking")
public class PlayCustomRankingController {
    @Resource
    private IPlayCustomUserInfoService playCustomUserInfoService;

    /**
     * 查询顾客排名列表
     */
    @PostMapping("/listByPage")
    public R list(@Validated @RequestBody PlayCustomRankingQueryVo vo) {
        IPage<PlayCustomRankingReturnVo> list = playCustomUserInfoService.selectRankingByPage(vo);
        return R.ok(list);
    }

}
