package com.ruoyi.device.mapper;
|
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.ruoyi.device.pojo.DeviceRepairSparePart;
|
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Select;
|
|
import java.util.List;
|
|
@Mapper
|
public interface DeviceRepairSparePartMapper extends BaseMapper<DeviceRepairSparePart> {
|
|
@Select("SELECT d.*, s.name as spare_part_name FROM device_repair_spare_part d LEFT JOIN spare_parts s ON d.spare_part_id = s.id WHERE d.source_id = #{sourceId} AND d.source_type = #{sourceType}")
|
List<DeviceRepairSparePart> selectListWithPartName(Long sourceId, Integer sourceType);
|
}
|