package com.ruoyi.web.controller.app;

import java.util.List;

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;

import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.ss.vipLevel.domain.VipLevelQuery;
import com.ruoyi.ss.vipLevel.domain.VipLevelVO;
import com.ruoyi.ss.vipLevel.domain.enums.VipLevelStatus;
import com.ruoyi.ss.vipLevel.service.VipLevelService;

import io.swagger.annotations.ApiOperation;

@RestController
@RequestMapping("/app/vipLevel")
public class AppVipLevelController extends BaseController {
    
    @Autowired
    private VipLevelService vipLevelService;

    @ApiOperation("查询在售的会员等级列表")
    @GetMapping("/list")
    public TableDataInfo list(VipLevelQuery query) {
        startPage();
        query.setStatus(VipLevelStatus.ON_SALE.getStatus());
        List<VipLevelVO> list = vipLevelService.selectVipLevelList(query);
        return getDataTable(list);
    }


}
