<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yd.oss.service.dao.RelObjectMaterialMapper">

    <select id="page" resultType="com.yd.oss.feign.response.ApiRelObjectMaterialPageResponse">
        select rom.id,rom.rel_object_material_biz_id,rom.material_biz_id
        rom.status,m.data_person,m.data_type,m.precautions
        from rel_object_material rom
        left join material m on m.material_biz_id = rom.material_biz_id and m.is_deleted = 0
        <where>
            <if test="request.objectBizId != null and request.objectBizId != ''">
                and rom.object_biz_id = #{request.objectBizId}
            </if>
            and rom.is_deleted = 0
        </where>
    </select>
</mapper>
