<?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.unis.safeStorage.modular.ssSafeGrainStorageInspection.mapper.SsSafeGrainStorageInspectionMapper">

    <select id="selectMyPage"
            resultType="com.unis.safeStorage.modular.ssSafeGrainStorageInspection.vo.SsSafeGrainStorageInspectionPageVO">

        SELECT
        t1.*,
        t2.org_name
        FROM
        biz_ss_safe_grain_storage_inspection t1
        LEFT JOIN depot_qh.org_info t2 ON t1.org_id = t2.org_id
        <where>
            <if test="orgName!=null and orgName!=''">
                and t2.org_name like concat("%",#{orgName},"%")
            </if>
        </where>
        order by t1.create_time desc
    </select>
</mapper>