<?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.newfiber.api.pc.dao.newmonitoring.BaseFileInfoDao"> <resultMap id="BaseResultMap" type="com.newfiber.api.pc.model.entity.BaseFileInfo"> <id column="id" jdbcType="BIGINT" property="id" /> <result column="file_no" jdbcType="VARCHAR" property="fileNo" /> <result column="file_extension" jdbcType="VARCHAR" property="fileExtension" /> <result column="file_original_name" jdbcType="VARCHAR" property="fileOriginalName" /> <result column="file_cloud_storage_key" jdbcType="VARCHAR" property="fileCloudStorageKey" /> <result column="file_abbreviated_cloud_storage_key" jdbcType="VARCHAR" property="fileAbbreviatedCloudStorageKey" /> <result column="file_upload_type" jdbcType="VARCHAR" property="fileUploadType" /> <result column="file_upload_type_desc" jdbcType="VARCHAR" property="fileUploadTypeDesc" /> <result column="type_selection" jdbcType="INTEGER" property="typeSelection" /> <result column="type_selection_desc" jdbcType="VARCHAR" property="typeSelectionDesc" /> <result column="generation_time" jdbcType="TIMESTAMP" property="generationTime" /> <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" /> <result column="file_founder" jdbcType="VARCHAR" property="fileFounder" /> <result column="site_reserve1" jdbcType="VARCHAR" property="siteReserve1" /> <result column="site_reserve2" jdbcType="VARCHAR" property="siteReserve2" /> </resultMap> <sql id="Base_Column_List"> id, file_no, file_extension, file_original_name, file_cloud_storage_key, file_abbreviated_cloud_storage_key, file_upload_type, file_upload_type_desc, type_selection, type_selection_desc, generation_time, update_time, file_founder, site_reserve1, site_reserve2 </sql> <sql id="Base_Column_List_Ext"> f.id as id, f.file_no as file_no, file_extension, file_original_name, file_cloud_storage_key, file_abbreviated_cloud_storage_key, file_upload_type, file_upload_type_desc, type_selection, type_selection_desc, generation_time, update_time, file_founder, site_reserve1, site_reserve2 </sql> <resultMap id="BaseResultMapExt" type="com.newfiber.api.pc.model.entity.BaseFileInfoEntity"> <id column="id" jdbcType="BIGINT" property="id" /> <result column="file_no" jdbcType="VARCHAR" property="fileNo" /> <result column="file_extension" jdbcType="VARCHAR" property="fileExtension" /> <result column="file_original_name" jdbcType="VARCHAR" property="fileOriginalName" /> <result column="file_cloud_storage_key" jdbcType="VARCHAR" property="fileCloudStorageKey" /> <result column="file_abbreviated_cloud_storage_key" jdbcType="VARCHAR" property="fileAbbreviatedCloudStorageKey" /> <result column="file_upload_type" jdbcType="VARCHAR" property="fileUploadType" /> <result column="file_upload_type_desc" jdbcType="VARCHAR" property="fileUploadTypeDesc" /> <result column="type_selection" jdbcType="INTEGER" property="typeSelection" /> <result column="type_selection_desc" jdbcType="VARCHAR" property="typeSelectionDesc" /> <result column="generation_time" jdbcType="TIMESTAMP" property="generationTime" /> <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" /> <result column="file_founder" jdbcType="VARCHAR" property="fileFounder" /> <result column="site_reserve1" jdbcType="VARCHAR" property="siteReserve1" /> <result column="site_reserve2" jdbcType="VARCHAR" property="siteReserve2" /> <result column="site_no" jdbcType="VARCHAR" property="siteNo" /> </resultMap> <select id="selectByStationNos" parameterType="java.util.List" resultMap="BaseResultMapExt"> select sf.site_no as site_no,<include refid="Base_Column_List_Ext" /> from nf_monitor.base_file_info f inner join pro_site_file sf on f.file_no = sf.file_no where 1 = 1 <if test="siteNos != null and siteNos.size() > 0"> and sf.site_no in <foreach collection="siteNos" item="item" open="(" separator="," close=")"> #{item} </foreach> </if> </select> </mapper>