<?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.casic.missiles.mapper.quality.BizQualityManagementReviewFileMapper"> <!-- 通用查询映射结果 --> <resultMap id="BaseResultMap" type="com.casic.missiles.model.quality.BizQualityManagementReviewFile"> <result column="id" property="id"/> <result column="create_time" property="createTime"/> <result column="update_time" property="updateTime"/> <result column="file_type" property="fileType"/> <result column="target_id" property="targetId"/> <result column="management_id" property="managementId"/> <result column="file_name" property="fileName"/> <result column="file_path" property="filePath"/> <result column="item_index" property="itemIndex"/> <result column="file_code" property="fileCode"/> <result column="source_type" property="sourceType"/> </resultMap> <!-- 通用查询结果列 --> <sql id="Base_Column_List"> id , create_time as createTime , update_time as updateTime , file_type as fileType , target_id as targetId , management_id as managementId , file_name as fileName , file_path as filePath , item_index as itemIndex , file_code as fileCode , source_type as sourceType </sql> <select id="selectBizQualityManagementReviewFilePage" resultType="com.casic.missiles.model.quality.BizQualityManagementReviewFile"> select a.id , a.create_time as createTime , a.update_time as updateTime , a.file_type as fileType , a.target_id as targetId , a.management_id as managementId , a.file_name as fileName , a.file_path as filePath , a.item_index as itemIndex , a.file_code as fileCode , a.source_type as sourceType from biz_quality_management_review_file a <where> <if test="ew != null"> ${ew.sqlSegment} </if> </where> </select> <sql id="Base_Column_Query"> <if test="request!=null"> <if test="request.fileType!= null and request.fileType!=''"> and file_type = #{request.fileType} </if> <if test="request.targetId!= null and request.targetId!=''"> and target_id = #{request.targetId} </if> <if test="request.managementId!= null and request.managementId!=''"> and management_id = #{request.managementId} </if> <if test="request.fileName!= null and request.fileName!=''"> and file_name like concat('%',#{request.fileName},'%') </if> <if test="request.fileCode!= null and request.fileCode!=''"> and file_code like concat('%',#{request.fileCode},'%') </if> <if test="request.sourceType!= null and request.sourceType!=''"> and source_type = #{request.sourceType} </if> </if> </sql> </mapper>