package com.njcn.msgpush.module.push.service.channel;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.njcn.msgpush.module.push.dal.dataobject.channel.ProviderErrorCodeMappingDO;
import com.njcn.msgpush.module.push.dal.mysql.channel.ProviderErrorCodeMappingMappper;
import org.springframework.stereotype.Service;


/**
 * @author caozehui
 * @data 2026-03-02
 */
@Service
public class ProviderErrorCodeMappingServiceImpl extends ServiceImpl<ProviderErrorCodeMappingMappper, ProviderErrorCodeMappingDO> implements ProviderErrorCodeMappingService {

    @Override
    public ProviderErrorCodeMappingDO getByProviderErrorCode(String providerType, String channel, String originalCode) {
        return this.lambdaQuery().eq(ProviderErrorCodeMappingDO::getProviderType, providerType)
                .eq(ProviderErrorCodeMappingDO::getChannel, channel)
                .eq(ProviderErrorCodeMappingDO::getOriginalCode, originalCode)
                .one();
    }
}
