<?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.BzLiveMapper"> <!-- 通用查询映射结果 --> <resultMap id="BzLiveResultMap" type="org.springnewfiber.dataadapter.sswj.entity.BzLive"> <result column="DATA_UP_UUID" property="dataUpUuid"/> <result column="YMDHM" property="ymdhm"/> <result column="ZQ" property="zq"/> <result column="QS" property="qs"/> <result column="T" property="t"/> <result column="TS" property="ts"/> <result column="DATA_UP_TIME" property="dataUpTime"/> <result column="DATA_UP_STATUS" property="dataUpStatus"/> </resultMap> <!-- 通用查询结果列 --> <sql id="Base_Column_List"> , t.DATA_UP_UUID , t.YMDHM , t.ZQ , t.QS , t.T , t.TS , t.DATA_UP_TIME , t.DATA_UP_STATUS </sql> <sql id="Where_Condition"> <if test="request.dataUpUuid != null and request.dataUpUuid != ''"> and t.DATA_UP_UUID = #{request.dataUpUuid} </if> <if test="request.ymdhm != null and request.ymdhm != ''"> and t.YMDHM = #{request.ymdhm} </if> <if test="request.zq != null and request.zq != ''"> and t.ZQ = #{request.zq} </if> <if test="request.qs != null and request.qs != ''"> and t.QS = #{request.qs} </if> <if test="request.t != null and request.t != ''"> and t.T = #{request.t} </if> <if test="request.ts != null and request.ts != ''"> and t.TS = #{request.ts} </if> <if test="request.dataUpTime != null and request.dataUpTime != ''"> and t.DATA_UP_TIME = #{request.dataUpTime} </if> <if test="request.dataUpStatus != null and request.dataUpStatus != ''"> and t.DATA_UP_STATUS = #{request.dataUpStatus} </if> </sql> <select id="selectByCondition" resultMap="BzLiveResultMap"> select <include refid="Base_Column_List"/> from whsw_bz_live t where t.is_deleted = 0 <include refid="Where_Condition"/> </select> </mapper>