package com.kym.service.admin.impl;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.kym.entity.admin.EquipmentRelation;
import com.kym.mapper.admin.EquipmentRelationMapper;
import com.kym.service.admin.EquipmentRelationService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author skyline
 * @since 2023-08-07
 */
@Service
@DS("db-admin")
public class EquipmentRelationServiceImpl extends ServiceImpl<EquipmentRelationMapper, EquipmentRelation> implements EquipmentRelationService {

    @Override
    public EquipmentRelation getByShortId(String shortId) {
        return lambdaQuery().eq(EquipmentRelation::getShortId,shortId).one();
    }

    @Override
    public EquipmentRelation getByEquipmentId(String equipmentId) {
        return lambdaQuery().eq(EquipmentRelation::getEquipmentId,equipmentId).one();
    }
}
