<?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.equipment.BizEquipmentStandardBuildMapper"> <!-- 通用查询映射结果 --> <resultMap id="BaseResultMap" type="com.casic.missiles.model.equipment.BizEquipmentStandardBuild"> <id column="id" property="id" /> <result column="apply_no" property="applyNo" /> <result column="apply_name" property="applyName" /> <result column="standard_name" property="standardName" /> <result column="meter_organize" property="meterOrganize" /> <result column="standard_file_template" property="standardFileTemplate" /> <result column="build_standard_report_file" property="buildStandardReportFile" /> <result column="exam_table_file" property="examTableFile" /> <result column="standard_certificate_file" property="standardCertificateFile" /> <result column="remark" property="remark" /> <result column="process_id" property="processId" /> <result column="approval_status" property="approvalStatus" /> <result column="create_user_id" property="createUserId" /> <result column="create_user_name" property="createUserName" /> <result column="create_time" property="createTime" /> <result column="update_time" property="updateTime" /> </resultMap> <!-- 通用查询结果列 --> <sql id="Base_Column_List"> id, apply_no, apply_name, standard_name, meter_organize, standard_file_template, build_standard_report_file, exam_table_file, standard_certificate_file, process_id, approval_status, remark, create_user_id, create_user_name, create_time, update_time </sql> <select id="selectBatchForApprovalList" resultMap="BaseResultMap"> SELECT * FROM biz_equipment_standard_build WHERE 1=1 <if test="request != null and request.approvalStatus != null and request.approvalStatus !=''"> and approval_status = #{request.approvalStatus} </if> <if test="request != null and request.createUserId != null and request.createUserId !=''"> and create_user_id = #{request.createUserId} </if> <if test="request != null and request.applyNo != null and request.applyNo !=''"> and apply_no like concat('%',#{request.applyNo},'%') </if> <if test="request != null and request.applyName != null and request.applyName !=''"> and apply_name like concat('%',#{request.applyName},'%') </if> <if test="request != null and request.standardName != null and request.standardName !=''"> and standard_name like concat('%',#{request.standardName},'%') </if> <if test="request != null and request.createUserName != null and request.createUserName !=''"> and create_user_name like concat('%',#{request.createUserName},'%') </if> <if test="request.createTimeStart != null and request.createTimeStart !=''"> and create_time >= #{request.createTimeStart} </if> <if test="request.createTimeEnd != null and request.createTimeEnd !=''"> and create_time <= #{request.createTimeEnd} </if> <if test="businessKeys != null"> and id in <foreach collection="businessKeys" item="id" index="index" open="(" close=")" separator=","> #{id} </foreach> </if> ORDER BY create_time DESC </select> <select id="selectMaxNo" resultType="java.lang.Long"> SELECT IFNULL(max(RIGHT(apply_no, 12)), 0) from biz_equipment_standard_build </select> </mapper>