| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187 |
- <?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="cn.com.goldenwater.dcproj.dao.AttWiuIntPlDao">
- <resultMap type="cn.com.goldenwater.dcproj.model.AttWiuIntPl" id="attWiuIntPlResultMap">
- <result property="id" column="ID"/>
- <result property="wiuId" column="WIU_ID"/>
- <result property="yrTp" column="YR_TP"/>
- <result property="yr" column="YR"/>
- <result property="yrWw" column="YR_WW"/>
- <result property="janWw" column="JAN_WW"/>
- <result property="febWw" column="FEB_WW"/>
- <result property="marWw" column="MAR_WW"/>
- <result property="aprWw" column="APR_WW"/>
- <result property="mayWw" column="MAY_WW"/>
- <result property="junWw" column="JUN_WW"/>
- <result property="julWw" column="JUL_WW"/>
- <result property="augWw" column="AUG_WW"/>
- <result property="sepWw" column="SEP_WW"/>
- <result property="octWw" column="OCT_WW"/>
- <result property="novWw" column="NOV_WW"/>
- <result property="decWw" column="DEC_WW"/>
- <result property="inTm" column="IN_TM"/>
- <result property="upTm" column="UP_TM"/>
- </resultMap>
-
- <sql id="table_columns">
- ID,
- WIU_ID,
- YR_TP,
- YR,
- YR_WW,
- JAN_WW,
- FEB_WW,
- MAR_WW,
- APR_WW,
- MAY_WW,
- JUN_WW,
- JUL_WW,
- AUG_WW,
- SEP_WW,
- OCT_WW,
- NOV_WW,
- DEC_WW,
- IN_TM,
- UP_TM
- </sql>
- <sql id="entity_properties">
- #{id},
- #{wiuId},
- #{yrTp},
- #{yr},
- #{yrWw},
- #{janWw},
- #{febWw},
- #{marWw},
- #{aprWw},
- #{mayWw},
- #{junWw},
- #{julWw},
- #{augWw},
- #{sepWw},
- #{octWw},
- #{novWw},
- #{decWw},
- #{inTm},
- #{upTm}
- </sql>
- <!-- 使用like用法:columnName like concat('%',#columnName#,'%') -->
- <sql id="page_where">
- <trim prefix="where" prefixOverrides="and | or ">
- <if test="wiuId != null and wiuId != ''">and WIU_ID = #{wiuId}</if>
- <if test="yrTp != null and yrTp != ''">and YR_TP = #{yrTp}</if>
- <if test="yr != null and yr != ''">and YR = #{yr}</if>
- <if test="yrWw != null and yrWw != ''">and YR_WW = #{yrWw}</if>
- <if test="janWw != null and janWw != ''">and JAN_WW = #{janWw}</if>
- <if test="febWw != null and febWw != ''">and FEB_WW = #{febWw}</if>
- <if test="marWw != null and marWw != ''">and MAR_WW = #{marWw}</if>
- <if test="aprWw != null and aprWw != ''">and APR_WW = #{aprWw}</if>
- <if test="mayWw != null and mayWw != ''">and MAY_WW = #{mayWw}</if>
- <if test="junWw != null and junWw != ''">and JUN_WW = #{junWw}</if>
- <if test="julWw != null and julWw != ''">and JUL_WW = #{julWw}</if>
- <if test="augWw != null and augWw != ''">and AUG_WW = #{augWw}</if>
- <if test="sepWw != null and sepWw != ''">and SEP_WW = #{sepWw}</if>
- <if test="octWw != null and octWw != ''">and OCT_WW = #{octWw}</if>
- <if test="novWw != null and novWw != ''">and NOV_WW = #{novWw}</if>
- <if test="decWw != null and decWw != ''">and DEC_WW = #{decWw}</if>
- <if test="inTm != null">and IN_TM = #{inTm}</if>
- <if test="upTm != null">and UP_TM = #{upTm}</if>
- </trim>
- </sql>
- <select id="get" resultMap="attWiuIntPlResultMap" parameterType="String" >
- select <include refid="table_columns" /> from ATT_WIU_INT_PL where ID = #{id}
- </select>
- <select id="getBy" resultMap="attWiuIntPlResultMap">
- select <include refid="table_columns" /> from ATT_WIU_INT_PL <include refid="page_where" />
- </select>
- <select id="findAll" resultMap="attWiuIntPlResultMap">
- select <include refid="table_columns" /> from ATT_WIU_INT_PL
- </select>
- <select id="findList" resultMap="attWiuIntPlResultMap">
- select <include refid="table_columns" /> from ATT_WIU_INT_PL <include refid="page_where" />
- </select>
- <select id="selectCount" resultType="int" >
- select count(ID) from ATT_WIU_INT_PL <include refid="page_where" />
- </select>
- <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.AttWiuIntPl">
- insert into ATT_WIU_INT_PL( <include refid="table_columns" /> )
- values ( <include refid="entity_properties" /> )
- </insert>
- <delete id="delete" parameterType="java.lang.String">
- delete from ATT_WIU_INT_PL where ID = #{id}
- </delete>
- <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.AttWiuIntPl">
- delete from ATT_WIU_INT_PL <include refid="page_where" />
- </delete>
- <update id="deleteInFlag" parameterType="java.lang.String">
- update ATT_WIU_INT_PL set flag_valid = 0 where ID = #{id}
- </update>
- <update id="update" parameterType="cn.com.goldenwater.dcproj.model.AttWiuIntPl">
- update ATT_WIU_INT_PL
- <trim prefix="set" suffixOverrides=",">
- <if test="wiuId != null and wiuId != ''">WIU_ID = #{wiuId},</if>
- <if test="yrTp != null and yrTp != ''">YR_TP = #{yrTp},</if>
- <if test="yr != null and yr != ''">YR = #{yr},</if>
- <if test="yrWw != null and yrWw != ''">YR_WW = #{yrWw},</if>
- <if test="janWw != null and janWw != ''">JAN_WW = #{janWw},</if>
- <if test="febWw != null and febWw != ''">FEB_WW = #{febWw},</if>
- <if test="marWw != null and marWw != ''">MAR_WW = #{marWw},</if>
- <if test="aprWw != null and aprWw != ''">APR_WW = #{aprWw},</if>
- <if test="mayWw != null and mayWw != ''">MAY_WW = #{mayWw},</if>
- <if test="junWw != null and junWw != ''">JUN_WW = #{junWw},</if>
- <if test="julWw != null and julWw != ''">JUL_WW = #{julWw},</if>
- <if test="augWw != null and augWw != ''">AUG_WW = #{augWw},</if>
- <if test="sepWw != null and sepWw != ''">SEP_WW = #{sepWw},</if>
- <if test="octWw != null and octWw != ''">OCT_WW = #{octWw},</if>
- <if test="novWw != null and novWw != ''">NOV_WW = #{novWw},</if>
- <if test="decWw != null and decWw != ''">DEC_WW = #{decWw},</if>
- <if test="inTm != null">IN_TM = #{inTm},</if>
- <if test="upTm != null">UP_TM = #{upTm},</if>
- </trim>
- <where>ID = #{id}</where>
- </update>
- <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.AttWiuIntPl">
- update ATT_WIU_INT_PL
- <trim prefix="set" suffixOverrides=",">
- <if test="wiuId != null and wiuId != ''">WIU_ID = #{wiuId},</if>
- <if test="yrTp != null and yrTp != ''">YR_TP = #{yrTp},</if>
- <if test="yr != null and yr != ''">YR = #{yr},</if>
- <if test="yrWw != null and yrWw != ''">YR_WW = #{yrWw},</if>
- <if test="janWw != null and janWw != ''">JAN_WW = #{janWw},</if>
- <if test="febWw != null and febWw != ''">FEB_WW = #{febWw},</if>
- <if test="marWw != null and marWw != ''">MAR_WW = #{marWw},</if>
- <if test="aprWw != null and aprWw != ''">APR_WW = #{aprWw},</if>
- <if test="mayWw != null and mayWw != ''">MAY_WW = #{mayWw},</if>
- <if test="junWw != null and junWw != ''">JUN_WW = #{junWw},</if>
- <if test="julWw != null and julWw != ''">JUL_WW = #{julWw},</if>
- <if test="augWw != null and augWw != ''">AUG_WW = #{augWw},</if>
- <if test="sepWw != null and sepWw != ''">SEP_WW = #{sepWw},</if>
- <if test="octWw != null and octWw != ''">OCT_WW = #{octWw},</if>
- <if test="novWw != null and novWw != ''">NOV_WW = #{novWw},</if>
- <if test="decWw != null and decWw != ''">DEC_WW = #{decWw},</if>
- <if test="inTm != null">IN_TM = #{inTm},</if>
- <if test="upTm != null">UP_TM = #{upTm},</if>
- </trim>
- <include refid="page_where" />
- </update>
- <!-- 其他自定义SQL -->
- </mapper>
|