Newer
Older
newfiber-data-adapter / src / main / java / org / springnewfiber / dataadapter / sswj / mapper / SzGssydMapper.xml
<?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.SzGssydMapper">

    <!-- 通用查询映射结果 -->
    <resultMap id="SzGssydResultMap" type="org.springnewfiber.dataadapter.sswj.entity.SzGssyd">
        <result column="DATA_UP_UUID" property="dataUpUuid"/>
        <result column="YMDHM" property="ymdhm"/>
        <result column="HFF" property="hff"/>
        <result column="SW" property="sw"/>
        <result column="GMSY" property="gmsy"/>
        <result column="ZL" property="zl"/>
        <result column="ZA" property="za"/>
        <result column="RJY" property="rjy"/>
        <result column="ZD" property="zd"/>
        <result column="DDL" property="ddl"/>
        <result column="PH" property="ph"/>
        <result column="AD" property="ad"/>
        <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.YMDHM
    	, t.HFF
    	, t.SW
    	, t.GMSY
    	, t.ZL
    	, t.ZA
    	, t.RJY
    	, t.ZD
    	, t.DDL
    	, t.PH
    	, t.AD
    	, 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.ymdhm != null and request.ymdhm != ''">
			and t.YMDHM = #{request.ymdhm}
		</if>
		<if test="request.hff != null and request.hff != ''">
			and t.HFF = #{request.hff}
		</if>
		<if test="request.sw != null and request.sw != ''">
			and t.SW = #{request.sw}
		</if>
		<if test="request.gmsy != null and request.gmsy != ''">
			and t.GMSY = #{request.gmsy}
		</if>
		<if test="request.zl != null and request.zl != ''">
			and t.ZL = #{request.zl}
		</if>
		<if test="request.za != null and request.za != ''">
			and t.ZA = #{request.za}
		</if>
		<if test="request.rjy != null and request.rjy != ''">
			and t.RJY = #{request.rjy}
		</if>
		<if test="request.zd != null and request.zd != ''">
			and t.ZD = #{request.zd}
		</if>
		<if test="request.ddl != null and request.ddl != ''">
			and t.DDL = #{request.ddl}
		</if>
		<if test="request.ph != null and request.ph != ''">
			and t.PH = #{request.ph}
		</if>
		<if test="request.ad != null and request.ad != ''">
			and t.AD = #{request.ad}
		</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="SzGssydResultMap">
        select
        <include refid="Base_Column_List"/>
        from whsw_sz_gssyd t
		where t.is_deleted = 0
		<include refid="Where_Condition"/>
    </select>
    
</mapper>