| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243 |
- <?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.TacInspPersAreaPrisDao">
- <resultMap type="cn.com.goldenwater.dcproj.model.TacInspPersAreaPris" id="tacInspPersAreaPrisResultMap">
- <result property="avoidYrSize" column="AVOID_YR_SIZE"/>
- <result property="siSaPersNum" column="SI_SA_PERS_NUM"/>
- <result property="siNvPersNum" column="SI_NV_PERS_NUM"/>
- <result property="siBadPersNum" column="SI_BAD_PERS_NUM"/>
- <result property="siGoodPersNum" column="SI_GOOD_PERS_NUM"/>
- <result property="id" column="ID"/>
- <result property="yearBatchId" column="YEAR_BATCH_ID"/>
- <result property="year" column="YEAR"/>
- <result property="batch" column="BATCH"/>
- <result property="isCommon" column="IS_COMMON"/>
- <result property="isProbation" column="IS_PROBATION"/>
- <result property="isPick" column="IS_PICK"/>
- <result property="isFit" column="IS_FIT"/>
- <result property="isA" column="IS_A"/>
- <result property="isB" column="IS_B"/>
- <result property="isC" column="IS_C"/>
- <result property="isD" column="IS_D"/>
- <result property="isE" column="IS_E"/>
- <result property="isNew" column="IS_NEW"/>
- <result property="newSize" column="NEW_SIZE"/>
- <result property="isReason" column="IS_REASON"/>
- <result property="avoidSize" column="AVOID_SIZE"/>
- <result property="isArea" column="IS_AREA"/>
- <result property="isPorc" column="IS_PORC"/>
- <result property="persId" column="PERS_ID"/>
- <result property="inTm" column="IN_TM"/>
- <result property="upTm" column="UP_TM"/>
- <result property="dataStat" column="DATA_STAT"/>
- </resultMap>
- <sql id="table_columns">
- AVOID_YR_SIZE,
- SI_SA_PERS_NUM,
- SI_NV_PERS_NUM,
- SI_BAD_PERS_NUM,
- SI_GOOD_PERS_NUM,
- ID,
- YEAR_BATCH_ID,
- YEAR,
- BATCH,
- IS_COMMON,
- IS_PROBATION,
- IS_PICK,
- IS_FIT,
- IS_A,
- IS_B,
- IS_C,
- IS_D,
- IS_E,
- IS_NEW,
- NEW_SIZE,
- IS_REASON,
- AVOID_SIZE,
- IS_AREA,
- IS_PORC,
- PERS_ID,
- IN_TM,
- UP_TM,
- DATA_STAT
- </sql>
- <sql id="entity_properties">
- #{avoidYrSize},
- #{siSaPersNum},
- #{siNvPersNum},
- #{siBadPersNum},
- #{siGoodPersNum},
- #{id},
- #{yearBatchId},
- #{year},
- #{batch},
- #{isCommon},
- #{isProbation},
- #{isPick},
- #{isFit},
- #{isA},
- #{isB},
- #{isC},
- #{isD},
- #{isE},
- #{isNew},
- #{newSize},
- #{isReason},
- #{avoidSize},
- #{isArea},
- #{isPorc},
- #{persId},
- #{inTm},
- #{upTm},
- #{dataStat}
- </sql>
- <!-- 使用like用法:columnName like concat('%',#columnName#,'%') -->
- <sql id="page_where">
- <trim prefix="where" prefixOverrides="and | or ">
- <if test="siSaPersNum != null and siSaPersNum != ''">and SI_SA_PERS_NUM = #{siSaPersNum}</if>
- <if test="siNvPersNum != null and siNvPersNum != ''">and SI_NV_PERS_NUM = #{siNvPersNum}</if>
- <if test="siBadPersNum != null and siBadPersNum != ''">and SI_BAD_PERS_NUM = #{siBadPersNum}</if>
- <if test="siGoodPersNum != null and siGoodPersNum != ''">and SI_GOOD_PERS_NUM = #{siGoodPersNum}</if>
- <if test="id != null and id != ''">and ID = #{id}</if>
- <if test="yearBatchId != null and yearBatchId != ''">and YEAR_BATCH_ID = #{yearBatchId}</if>
- <if test="year != null and year != ''">and YEAR = #{year}</if>
- <if test="batch != null and batch != ''">and BATCH = #{batch}</if>
- <if test="isCommon != null and isCommon != ''">and IS_COMMON = #{isCommon}</if>
- <if test="isProbation != null and isProbation != ''">and IS_PROBATION = #{isProbation}</if>
- <if test="isPick != null and isPick != ''">and IS_PICK = #{isPick}</if>
- <if test="isFit != null and isFit != ''">and IS_FIT = #{isFit}</if>
- <if test="isA != null and isA != ''">and IS_A = #{isA}</if>
- <if test="isB != null and isB != ''">and IS_B = #{isB}</if>
- <if test="isC != null and isC != ''">and IS_C = #{isC}</if>
- <if test="isD != null and isD != ''">and IS_D = #{isD}</if>
- <if test="isE != null and isE != ''">and IS_E = #{isE}</if>
- <if test="isNew != null and isNew != ''">and IS_NEW = #{isNew}</if>
- <if test="newSize != null and newSize != ''">and NEW_SIZE = #{newSize}</if>
- <if test="isReason != null and isReason != ''">and IS_REASON = #{isReason}</if>
- <if test="avoidSize != null and avoidSize != ''">and AVOID_SIZE = #{avoidSize}</if>
- <if test="isArea != null and isArea != ''">and IS_AREA = #{isArea}</if>
- <if test="isPorc != null and isPorc != ''">and IS_PORC = #{isPorc}</if>
- <if test="persId != null and persId != ''">and PERS_ID = #{persId}</if>
- <if test="inTm != null">and IN_TM = #{inTm}</if>
- <if test="upTm != null">and UP_TM = #{upTm}</if>
- <if test="dataStat != null and dataStat != ''">and DATA_STAT = #{dataStat}</if>
- </trim>
- </sql>
- <select id="get" resultMap="tacInspPersAreaPrisResultMap" parameterType="String" >
- select <include refid="table_columns" /> from TAC_INSP_PERS_AREA_PRIS where ID = #{id}
- </select>
- <select id="getBy" resultMap="tacInspPersAreaPrisResultMap">
- select <include refid="table_columns" /> from TAC_INSP_PERS_AREA_PRIS <include refid="page_where" />
- </select>
- <select id="findAll" resultMap="tacInspPersAreaPrisResultMap">
- select <include refid="table_columns" /> from TAC_INSP_PERS_AREA_PRIS
- </select>
- <select id="findList" resultMap="tacInspPersAreaPrisResultMap">
- select <include refid="table_columns" /> from TAC_INSP_PERS_AREA_PRIS <include refid="page_where" />
- </select>
- <select id="selectCount" resultType="int" >
- select count(ID) from TAC_INSP_PERS_AREA_PRIS <include refid="page_where" />
- </select>
- <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.TacInspPersAreaPris">
- insert into TAC_INSP_PERS_AREA_PRIS( <include refid="table_columns" /> )
- values ( <include refid="entity_properties" /> )
- </insert>
- <delete id="delete" parameterType="java.lang.String">
- delete from TAC_INSP_PERS_AREA_PRIS where ID = #{id}
- </delete>
- <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.TacInspPersAreaPris">
- delete from TAC_INSP_PERS_AREA_PRIS <include refid="page_where" />
- </delete>
- <update id="deleteInFlag" parameterType="java.lang.String">
- update TAC_INSP_PERS_AREA_PRIS set flag_valid = 0 where ID = #{id}
- </update>
- <update id="update" parameterType="cn.com.goldenwater.dcproj.model.TacInspPersAreaPris">
- update TAC_INSP_PERS_AREA_PRIS
- <trim prefix="set" suffixOverrides=",">
- SI_SA_PERS_NUM = #{siSaPersNum},
- SI_NV_PERS_NUM = #{siNvPersNum},
- SI_BAD_PERS_NUM = #{siBadPersNum},
- SI_GOOD_PERS_NUM = #{siGoodPersNum},
- <if test="id != null and id != ''">ID = #{id},</if>
- <if test="yearBatchId != null and yearBatchId != ''">YEAR_BATCH_ID = #{yearBatchId},</if>
- <if test="year != null and year != ''">YEAR = #{year},</if>
- <if test="batch != null and batch != ''">BATCH = #{batch},</if>
- <if test="isCommon != null and isCommon != ''">IS_COMMON = #{isCommon},</if>
- <if test="isProbation != null and isProbation != ''">IS_PROBATION = #{isProbation},</if>
- <if test="isPick != null and isPick != ''">IS_PICK = #{isPick},</if>
- <if test="isFit != null and isFit != ''">IS_FIT = #{isFit},</if>
- <if test="isA != null and isA != ''">IS_A = #{isA},</if>
- <if test="isB != null and isB != ''">IS_B = #{isB},</if>
- <if test="isC != null and isC != ''">IS_C = #{isC},</if>
- <if test="isD != null and isD != ''">IS_D = #{isD},</if>
- <if test="isE != null and isE != ''">IS_E = #{isE},</if>
- <if test="isNew != null and isNew != ''">IS_NEW = #{isNew},</if>
- NEW_SIZE = #{newSize},
- <if test="isReason != null and isReason != ''">IS_REASON = #{isReason},</if>
- AVOID_SIZE = #{avoidSize},
- <if test="isArea != null and isArea != ''">IS_AREA = #{isArea},</if>
- <if test="isPorc != null and isPorc != ''">IS_PORC = #{isPorc},</if>
- <if test="persId != null and persId != ''">PERS_ID = #{persId},</if>
- <if test="inTm != null">IN_TM = #{inTm},</if>
- <if test="upTm != null">UP_TM = #{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.TacInspPersAreaPris">
- update TAC_INSP_PERS_AREA_PRIS
- <trim prefix="set" suffixOverrides=",">
- SI_SA_PERS_NUM = #{siSaPersNum},
- SI_NV_PERS_NUM = #{siNvPersNum},
- SI_BAD_PERS_NUM = #{siBadPersNum},
- SI_GOOD_PERS_NUM = #{siGoodPersNum},
- <if test="id != null and id != ''">ID = #{id},</if>
- <if test="yearBatchId != null and yearBatchId != ''">YEAR_BATCH_ID = #{yearBatchId},</if>
- <if test="year != null and year != ''">YEAR = #{year},</if>
- <if test="batch != null and batch != ''">BATCH = #{batch},</if>
- <if test="isCommon != null and isCommon != ''">IS_COMMON = #{isCommon},</if>
- <if test="isProbation != null and isProbation != ''">IS_PROBATION = #{isProbation},</if>
- <if test="isPick != null and isPick != ''">IS_PICK = #{isPick},</if>
- <if test="isFit != null and isFit != ''">IS_FIT = #{isFit},</if>
- <if test="isA != null and isA != ''">IS_A = #{isA},</if>
- <if test="isB != null and isB != ''">IS_B = #{isB},</if>
- <if test="isC != null and isC != ''">IS_C = #{isC},</if>
- <if test="isD != null and isD != ''">IS_D = #{isD},</if>
- <if test="isE != null and isE != ''">IS_E = #{isE},</if>
- <if test="isNew != null and isNew != ''">IS_NEW = #{isNew},</if>
- NEW_SIZE = #{newSize},
- <if test="isReason != null and isReason != ''">IS_REASON = #{isReason},</if>
- AVOID_SIZE = #{avoidSize},
- <if test="isArea != null and isArea != ''">IS_AREA = #{isArea},</if>
- <if test="isPorc != null and isPorc != ''">IS_PORC = #{isPorc},</if>
- <if test="persId != null and persId != ''">PERS_ID = #{persId},</if>
- <if test="inTm != null">IN_TM = #{inTm},</if>
- <if test="upTm != null">UP_TM = #{upTm},</if>
- <if test="dataStat != null and dataStat != ''">DATA_STAT = #{dataStat},</if>
- </trim>
- <include refid="page_where" />
- </update>
- <!-- 其他自定义SQL -->
- </mapper>
|