package com.ruoyi.xq.service.impl;

import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.xq.domain.VipPrice;
import com.ruoyi.xq.mapper.VipPriceMapper;
import com.ruoyi.xq.service.VipPriceService;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 会员价格设置Service业务层处理
 *
 * @author 77
 * @date 2024-03-04
 */
@RequiredArgsConstructor
@Service
public class VipPriceServiceImpl extends ServiceImpl<VipPriceMapper,VipPrice> implements VipPriceService {

    @Override
    public List<VipPrice> listByVipType(Integer vipType) {
        return this.list(Wrappers.lambdaQuery(VipPrice.class).eq(VipPrice::getVipType,vipType)
                .orderByAsc(VipPrice::getVipTime));
    }
}
