package com.mcwl.memberCenter.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.mcwl.memberCenter.domain.Benefit;
import com.mcwl.memberCenter.domain.MemberBenefit;
import com.mcwl.memberCenter.domain.MemberLevel;
import com.mcwl.memberCenter.domain.vo.MemberBenefitVO;
import com.mcwl.memberCenter.enums.MemberBenefitTypeEnum;
import com.mcwl.memberCenter.mapper.BenefitMapper;
import com.mcwl.memberCenter.mapper.MemberBenefitMapper;
import com.mcwl.memberCenter.service.BenefitService;
import com.mcwl.memberCenter.service.MemberBenefitService;
import com.mcwl.memberCenter.service.MemberLevelService;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

@Service
@RequiredArgsConstructor
public class BenefitServiceImpl extends ServiceImpl<BenefitMapper, Benefit> implements BenefitService {

    @Override
    public List<Benefit> getBenefitList() {
        return baseMapper.getBenefitList();
    }

    @Override
    public List<Benefit> getBenefitListByMemberLevelId(Long memberLevelId) {
        return baseMapper.getBenefitListByMemberLevelId(memberLevelId);
    }

    @Override
    public List<Benefit> getNotBenefitList(Long memberLevelId) {
        return baseMapper.getNotBenefitList(memberLevelId);
    }

    @Override
    public Benefit getBenefitByType(Long memberLevelId, MemberBenefitTypeEnum memberBenefitTypeEnum) {
        return baseMapper.getBenefitByType(memberLevelId, memberBenefitTypeEnum.getValue());
    }
}
