package cn.axzo.msg.center.dal.impl;

import cn.axzo.msg.center.dal.MNSMessageChannelDao;
import cn.axzo.msg.center.dal.mapper.MNSMessageChannelMapper;
import cn.axzo.msg.center.domain.entity.MNSMessageChannel;
import cn.axzo.msg.center.notices.common.enums.AvailableStatusEnum;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * <p>
 * 消息渠道表 Dao实现类
 * </p>
 *
 * @author zhaoyong
 * @since 2021-05-19
 */
@Repository("mnsMessageChannelDao")
public class MNSMessageChannelDaoImpl extends ServiceImpl<MNSMessageChannelMapper, MNSMessageChannel> implements MNSMessageChannelDao {

  @Override
  public List<MNSMessageChannel> queryAvailable() {
    return this.lambdaQuery()
        .eq(MNSMessageChannel::getStatus, AvailableStatusEnum.AVAILABLE.getStatus())
        .list();
  }
}
