package org.jeecg.modules.regular.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.jeecg.modules.regular.entity.Regular;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;

/**
 * @Description: 检修规程
 * @Author: jeecg-boot
 * @Date:   2025-01-16
 * @Version: V1.0
 */
public interface RegularMapper extends BaseMapper<Regular> {

    @Select("SELECT id FROM bu_regular WHERE device_type_id = (SELECT device_type_id FROM bu_device WHERE id=#{deviceId}) AND rapair_range=#{rapairRange} LIMIT 1 ")
    String findRegularIdByDeviceId(@Param("deviceId") String deviceId, @Param("rapairRange") String rapairRange);

}
