package com.tmerclub.cloud.user.controller.platform;

import com.tmerclub.cloud.common.database.dto.PageDTO;
import com.tmerclub.cloud.common.database.vo.PageVO;
import com.tmerclub.cloud.common.response.ServerResponseEntity;
import com.tmerclub.cloud.user.dto.UserLevelLogDTO;
import com.tmerclub.cloud.user.service.UserLevelLogService;
import com.tmerclub.cloud.user.vo.UserLevelLogVO;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.validation.Valid;
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: zsm
 * @date: 2023/2/3 16:49
 */
@RestController("platformUserLevelLogController")
@RequestMapping("/p/userLevelLog")
@Tag(name = "用户等级记录")
public class UserLevelLogController {

    @Autowired
    private UserLevelLogService userLevelLogService;

    @GetMapping("/getUserLevelLogPage")
    @Operation(summary = "获取付费会员购买记录", description = "获取付费会员购买记录")
    ServerResponseEntity<PageVO<UserLevelLogVO>> getUserLevelLogPage(@Valid PageDTO pageDTO, UserLevelLogDTO userLevelLogDTO) {
        return ServerResponseEntity.success(userLevelLogService.pageBuyLevelLog(pageDTO, userLevelLogDTO));
    }

}
