<?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="org.springnewfiber.dataadapter.sswj.mapper.SqHpRMapper"> <!-- 通用查询映射结果 --> <resultMap id="SqHpRResultMap" type="org.springnewfiber.dataadapter.sswj.entity.SqHpR"> <result column="DATA_UP_UUID" property="dataUpUuid"/> <result column="DATETIME" property="datetime"/> <result column="ZR" property="zr"/> <result column="PPTN" property="pptn"/> <result column="DATA_UP_STATUS" property="dataUpStatus"/> <result column="DATA_UP_TIME" property="dataUpTime"/> </resultMap> <!-- 通用查询结果列 --> <sql id="Base_Column_List"> , t.DATA_UP_UUID , t.DATETIME , t.ZR , t.PPTN , t.DATA_UP_STATUS , t.DATA_UP_TIME </sql> <sql id="Where_Condition"> <if test="request.dataUpUuid != null and request.dataUpUuid != ''"> and t.DATA_UP_UUID = #{request.dataUpUuid} </if> <if test="request.datetime != null and request.datetime != ''"> and t.DATETIME = #{request.datetime} </if> <if test="request.zr != null and request.zr != ''"> and t.ZR = #{request.zr} </if> <if test="request.pptn != null and request.pptn != ''"> and t.PPTN = #{request.pptn} </if> <if test="request.dataUpStatus != null and request.dataUpStatus != ''"> and t.DATA_UP_STATUS = #{request.dataUpStatus} </if> <if test="request.dataUpTime != null and request.dataUpTime != ''"> and t.DATA_UP_TIME = #{request.dataUpTime} </if> </sql> <select id="selectByCondition" resultMap="SqHpRResultMap"> select <include refid="Base_Column_List"/> from whsw_sq_hp_r t where t.is_deleted = 0 <include refid="Where_Condition"/> </select> </mapper>