package com.ruoyi.cai.service.impl;

import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.cai.domain.MemberPrice;
import com.ruoyi.cai.mapper.MemberPriceMapper;
import com.ruoyi.cai.service.MemberPriceService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 会员价格Service业务层处理
 *
 * @author 77
 * @date 2024-01-03
 */
@Service
public class MemberPriceServiceImpl extends ServiceImpl<MemberPriceMapper,MemberPrice> implements MemberPriceService {
    @Override
    public List<MemberPrice> listByType(Integer type) {
        return this.list(Wrappers.lambdaQuery(MemberPrice.class)
                .eq(MemberPrice::getStatus,0)
                .eq(MemberPrice::getMemberType,type)
                .orderByAsc(MemberPrice::getPrice));
    }
}
