package com.hzs.system.config.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.hzs.common.core.enums.ERangeAwards;
import com.hzs.common.domain.system.config.BdRangeAwards;
import com.hzs.system.config.mapper.BdRangeAwardsMapper;
import com.hzs.system.config.service.IBdRangeAwardsService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 极差奖衔配置表 服务实现类
 */
@Service
public class BdRangeAwardsServiceImpl extends ServiceImpl<BdRangeAwardsMapper, BdRangeAwards> implements IBdRangeAwardsService {

    @Override
    public List<BdRangeAwards> queryRangeAwards() {
        LambdaQueryWrapper<BdRangeAwards> queryWrapper = new LambdaQueryWrapper<>();
        queryWrapper.gt(BdRangeAwards::getAwardsValue, ERangeAwards.S0.getValue());
        queryWrapper.orderByAsc(BdRangeAwards::getAwardsValue);
        return baseMapper.selectList(queryWrapper);
    }
}
