| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189 |
- <?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.TacPawpBstocmTsopbfpSctnDao">
- <resultMap type="cn.com.goldenwater.dcproj.model.TacPawpBstocmTsopbfpSctn" id="tacPawpBstocmTsopbfpSctnResultMap">
- <result property="id" column="ID"/>
- <result property="tsopbfpId" column="TSOPBFP_ID"/>
- <result property="sctnName" column="SCTN_NAME"/>
- <result property="biddingType" column="BIDDING_TYPE"/>
- <result property="agncy" column="AGNCY"/>
- <result property="bidUnit" column="BID_UNIT"/>
- <result property="cdtlLevl" column="CDTL_LEVL"/>
- <result property="bidCost" column="BID_COST"/>
- <result property="isWps" column="IS_WPS"/>
- <result property="isRbb" column="IS_RBB"/>
- <result property="isStabsr" column="IS_STABSR"/>
- <result property="note" column="NOTE"/>
- <result property="persId" column="PERS_ID"/>
- <result property="intm" column="INTM"/>
- <result property="uptm" column="UPTM"/>
- <result property="dataStat" column="DATA_STAT"/>
- <result property="sctnType" column="SCTN_TYPE"/>
- </resultMap>
- <sql id="table_columns">
- ID,SCTN_TYPE,
- TSOPBFP_ID,
- SCTN_NAME,
- BIDDING_TYPE,
- AGNCY,
- BID_UNIT,
- CDTL_LEVL,
- BID_COST,
- IS_WPS,
- IS_RBB,
- IS_STABSR,
- NOTE,
- PERS_ID,
- INTM,
- UPTM,
- DATA_STAT
- </sql>
- <sql id="entity_properties">
- #{id},#{sctnType},
- #{tsopbfpId},
- #{sctnName},
- #{biddingType},
- #{agncy},
- #{bidUnit},
- #{cdtlLevl},
- #{bidCost},
- #{isWps},
- #{isRbb},
- #{isStabsr},
- #{note},
- #{persId},
- #{intm},
- #{uptm},
- #{dataStat}
- </sql>
- <!-- 使用like用法:columnName like concat('%',#columnName#,'%') -->
- <sql id="page_where">
- <trim prefix="where" prefixOverrides="and | or ">
- <if test="tsopbfpId != null and tsopbfpId != ''">and TSOPBFP_ID = #{tsopbfpId}</if>
- <if test="sctnName != null and sctnName != ''">and SCTN_NAME like '%${sctnName}%'</if>
- <if test="sctnType != null and sctnType != ''">and SCTN_TYPE = #{sctnType}</if>
- <if test="biddingType != null and biddingType != ''">and BIDDING_TYPE = #{biddingType}</if>
- <if test="agncy != null and agncy != ''">and AGNCY like '%${agncy}%'</if>
- <if test="bidUnit != null and bidUnit != ''">and BID_UNIT like '%${bidUnit}%'</if>
- <if test="cdtlLevl != null and cdtlLevl != ''">and CDTL_LEVL = #{cdtlLevl}</if>
- <if test="bidCost != null and bidCost != ''">and BID_COST = #{bidCost}</if>
- <if test="isWps != null and isWps != ''">and IS_WPS = #{isWps}</if>
- <if test="isRbb != null and isRbb != ''">and IS_RBB = #{isRbb}</if>
- <if test="isStabsr != null and isStabsr != ''">and IS_STABSR = #{isStabsr}</if>
- <if test="note != null and note != ''">and NOTE like '%${note}%'</if>
- <if test="persId != null and persId != ''">and PERS_ID = #{persId}</if>
- <if test="intm != null">and INTM = #{intm}</if>
- <if test="uptm != null">and UPTM = #{uptm}</if>
- <if test="dataStat != null and dataStat != ''">and DATA_STAT = #{dataStat}</if>
- </trim>
- </sql>
- <select id="get" resultMap="tacPawpBstocmTsopbfpSctnResultMap" parameterType="String">
- select
- <include refid="table_columns"/>
- from TAC_PAWP_BSTOCM_TSOPBFP_SCTN where ID = #{id}
- </select>
- <select id="getBy" resultMap="tacPawpBstocmTsopbfpSctnResultMap">
- select
- <include refid="table_columns"/>
- from TAC_PAWP_BSTOCM_TSOPBFP_SCTN
- <include refid="page_where"/>
- </select>
- <select id="findAll" resultMap="tacPawpBstocmTsopbfpSctnResultMap">
- select
- <include refid="table_columns"/>
- from TAC_PAWP_BSTOCM_TSOPBFP_SCTN
- </select>
- <select id="findList" resultMap="tacPawpBstocmTsopbfpSctnResultMap">
- select
- <include refid="table_columns"/>
- from TAC_PAWP_BSTOCM_TSOPBFP_SCTN
- <include refid="page_where"/>
- </select>
- <select id="selectCount" resultType="int">
- select count(ID) from TAC_PAWP_BSTOCM_TSOPBFP_SCTN
- <include refid="page_where"/>
- </select>
- <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.TacPawpBstocmTsopbfpSctn">
- insert into TAC_PAWP_BSTOCM_TSOPBFP_SCTN(
- <include refid="table_columns"/>
- )
- values (
- <include refid="entity_properties"/>
- )
- </insert>
- <delete id="delete" parameterType="java.lang.String">
- delete from TAC_PAWP_BSTOCM_TSOPBFP_SCTN where ID = #{id}
- </delete>
- <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.TacPawpBstocmTsopbfpSctn">
- delete from TAC_PAWP_BSTOCM_TSOPBFP_SCTN
- <include refid="page_where"/>
- </delete>
- <update id="deleteInFlag" parameterType="java.lang.String">
- update TAC_PAWP_BSTOCM_TSOPBFP_SCTN set flag_valid = 0 where ID = #{id}
- </update>
- <update id="update" parameterType="cn.com.goldenwater.dcproj.model.TacPawpBstocmTsopbfpSctn">
- update TAC_PAWP_BSTOCM_TSOPBFP_SCTN
- <trim prefix="set" suffixOverrides=",">
- <if test="tsopbfpId != null and tsopbfpId != ''">TSOPBFP_ID = #{tsopbfpId},</if>
- <if test="sctnName != null and sctnName != ''">SCTN_NAME = #{sctnName},</if>
- <if test="biddingType != null">BIDDING_TYPE = #{biddingType},</if>
- <if test="agncy != null">AGNCY = #{agncy},</if>
- <if test="bidUnit != null">BID_UNIT = #{bidUnit},</if>
- <if test="cdtlLevl != null">CDTL_LEVL = #{cdtlLevl},</if>
- <if test="sctnType != null">SCTN_TYPE = #{sctnType},</if>
- <if test="bidCost != null">BID_COST = #{bidCost},</if>
- <if test="isWps != null and isWps != ''">IS_WPS = #{isWps},</if>
- <if test="isRbb != null and isRbb != ''">IS_RBB = #{isRbb},</if>
- <if test="isStabsr != null and isStabsr != ''">IS_STABSR = #{isStabsr},</if>
- <if test="note != null">NOTE = #{note},</if>
- <if test="persId != null and persId != ''">PERS_ID = #{persId},</if>
- <if test="intm != null">INTM = #{intm},</if>
- <if test="uptm != null">UPTM = #{uptm},</if>
- <if test="dataStat != null and dataStat != ''">DATA_STAT = #{dataStat},</if>
- </trim>
- <where>ID = #{id}</where>
- </update>
- <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.TacPawpBstocmTsopbfpSctn">
- update TAC_PAWP_BSTOCM_TSOPBFP_SCTN
- <trim prefix="set" suffixOverrides=",">
- <if test="tsopbfpId != null and tsopbfpId != ''">TSOPBFP_ID = #{tsopbfpId},</if>
- <if test="sctnName != null and sctnName != ''">SCTN_NAME = #{sctnName},</if>
- <if test="biddingType != null">BIDDING_TYPE = #{biddingType},</if>
- <if test="agncy != null">AGNCY = #{agncy},</if>
- <if test="bidUnit != null">BID_UNIT = #{bidUnit},</if>
- <if test="cdtlLevl != null">CDTL_LEVL = #{cdtlLevl},</if>
- <if test="bidCost != null">BID_COST = #{bidCost},</if>
- <if test="isWps != null and isWps != ''">IS_WPS = #{isWps},</if>
- <if test="isRbb != null and isRbb != ''">IS_RBB = #{isRbb},</if>
- <if test="isStabsr != null and isStabsr != ''">IS_STABSR = #{isStabsr},</if>
- <if test="note != null">NOTE = #{note},</if>
- <if test="persId != null and persId != ''">PERS_ID = #{persId},</if>
- <if test="intm != null">INTM = #{intm},</if>
- <if test="uptm != null">UPTM = #{uptm},</if>
- <if test="dataStat != null and dataStat != ''">DATA_STAT = #{dataStat},</if>
- </trim>
- <include refid="page_where"/>
- </update>
- <!-- 其他自定义SQL -->
- </mapper>
|