| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264 |
- <?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.ImpPblmInfoDao">
- <resultMap type="cn.com.goldenwater.dcproj.model.ImpPblmInfo" id="impPblmInfoResultMap">
- <result property="id" column="ID"/>
- <result property="sn" column="SN"/>
- <result property="proCode" column="PRO_CODE"/>
- <result property="proName" column="PRO_NAME"/>
- <result property="cityCode" column="CITY_CODE"/>
- <result property="cityName" column="CITY_NAME"/>
- <result property="countyCode" column="COUNTY_CODE"/>
- <result property="countyName" column="COUNTY_NAME"/>
- <result property="rsCode" column="RS_CODE"/>
- <result property="rsName" column="RS_NAME"/>
- <result property="engScal" column="ENG_SCAL"/>
- <result property="unit" column="UNIT"/>
- <result property="pblmType" column="PBLM_TYPE"/>
- <result property="pblmOption" column="PBLM_OPTION"/>
- <result property="pblmDesc" column="PBLM_DESC"/>
- <result property="pblmLevl" column="PBLM_LEVL"/>
- <result property="attach" column="ATTACH"/>
- <result property="pblmSn" column="PBLM_SN"/>
- <result property="pblmId" column="PBLM_ID"/>
- <result property="mnth" column="MNTH"/>
- <result property="oldGroupId" column="OLD_GROUP_ID"/>
- <result property="groupId" column="GROUP_ID"/>
- <result property="groupNm" column="GROUP_NM"/>
- <result property="regId" column="REG_ID"/>
- <result property="objId" column="OBJ_ID"/>
- <result property="note" column="NOTE"/>
- <result property="orgId" column="ORG_ID"/>
- <result property="orgNm" column="ORG_NM"/>
- <result property="pblmTypeId" column="PBLMS_TYPE_ID"/>
- </resultMap>
- <sql id="table_columns">
- ID,
- SN,
- PRO_CODE,
- PRO_NAME,
- CITY_CODE,
- CITY_NAME,
- COUNTY_CODE,
- COUNTY_NAME,
- RS_CODE,
- RS_NAME,
- ENG_SCAL,
- UNIT,
- PBLM_TYPE,
- PBLM_OPTION,
- PBLM_DESC,
- PBLM_LEVL,
- ATTACH,
- PBLM_SN,
- PBLM_ID,
- MNTH,
- OLD_GROUP_ID,
- GROUP_ID,
- GROUP_NM,
- REG_ID,
- OBJ_ID,
- NOTE,
- ORG_ID,
- ORG_NM,
- PBLMS_TYPE_ID
- </sql>
- <sql id="entity_properties">
- #{id},
- #{sn},
- #{proCode},
- #{proName},
- #{cityCode},
- #{cityName},
- #{countyCode},
- #{countyName},
- #{rsCode},
- #{rsName},
- #{engScal},
- #{unit},
- #{pblmType},
- #{pblmOption},
- #{pblmDesc},
- #{pblmLevl},
- #{attach},
- #{pblmSn},
- #{pblmId},
- #{mnth},
- #{oldGroupId},
- #{groupId},
- #{groupNm},
- #{regId},
- #{objId},
- #{note},
- #{orgId},
- #{orgNm},
- #{pblmTypeId}
- </sql>
- <!-- 使用like用法:columnName like concat('%',#columnName#,'%') -->
- <sql id="page_where">
- <trim prefix="where" prefixOverrides="and | or ">
- <if test="sn != null and sn != ''">and SN = #{sn}</if>
- <if test="proCode != null and proCode != ''">and PRO_CODE = #{proCode}</if>
- <if test="proName != null and proName != ''">and PRO_NAME = #{proName}</if>
- <if test="cityCode != null and cityCode != ''">and CITY_CODE = #{cityCode}</if>
- <if test="cityName != null and cityName != ''">and CITY_NAME = #{cityName}</if>
- <if test="countyCode != null and countyCode != ''">and COUNTY_CODE = #{countyCode}</if>
- <if test="countyName != null and countyName != ''">and COUNTY_NAME = #{countyName}</if>
- <if test="rsCode != null and rsCode != ''">and RS_CODE = #{rsCode}</if>
- <if test="rsName != null and rsName != ''">and RS_NAME = #{rsName}</if>
- <if test="engScal != null and engScal != ''">and ENG_SCAL = #{engScal}</if>
- <if test="unit != null and unit != ''">and UNIT = #{unit}</if>
- <if test="pblmType != null and pblmType != ''">and PBLM_TYPE = #{pblmType}</if>
- <if test="pblmOption != null and pblmOption != ''">and PBLM_OPTION = #{pblmOption}</if>
- <if test="pblmDesc != null and pblmDesc != ''">and PBLM_DESC = #{pblmDesc}</if>
- <if test="pblmLevl != null and pblmLevl != ''">and PBLM_LEVL = #{pblmLevl}</if>
- <if test="attach != null and attach != ''">and ATTACH = #{attach}</if>
- <if test="pblmSn != null and pblmSn != ''">and PBLM_SN = #{pblmSn}</if>
- <if test="pblmId != null and pblmId != ''">and PBLM_ID = #{pblmId}</if>
- <if test="mnth != null and mnth != ''">and MNTH = #{mnth}</if>
- <if test="oldGroupId != null and oldGroupId != ''">and OLD_GROUP_ID = #{oldGroupId}</if>
- <if test="groupId != null and groupId != ''">and GROUP_ID = #{groupId}</if>
- <if test="groupNm != null and groupNm != ''">and GROUP_NM = #{groupNm}</if>
- <if test="regId != null and regId != ''">and REG_ID = #{regId}</if>
- <if test="objId != null and objId != ''">and OBJ_ID = #{objId}</if>
- <if test="note != null and note != ''">and NOTE = #{note},</if>
- <if test="orgId != null and orgId != ''">and ORG_ID = #{orgId}</if>
- <if test="orgNm != null and orgNm != ''">and ORG_NM = #{orgNm}</if>
- <if test="pblmTypeId != null and pblmTypeId != ''">AND PBLMS_TYPE_ID = #{pblmTypeId},</if>
- </trim>
- </sql>
- <select id="get" resultMap="impPblmInfoResultMap" parameterType="String">
- select
- <include refid="table_columns"/>
- from IMP_PBLM_INFO where ID = #{id}
- </select>
- <select id="getBy" resultMap="impPblmInfoResultMap">
- select
- <include refid="table_columns"/>
- from IMP_PBLM_INFO
- <include refid="page_where"/>
- </select>
- <select id="findAll" resultMap="impPblmInfoResultMap">
- select
- <include refid="table_columns"/>
- from IMP_PBLM_INFO
- </select>
- <select id="findList" resultMap="impPblmInfoResultMap">
- select
- <include refid="table_columns"/>
- from IMP_PBLM_INFO
- <include refid="page_where"/>
- </select>
- <select id="selectCount" resultType="int">
- select count(ID) from IMP_PBLM_INFO
- <include refid="page_where"/>
- </select>
- <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.ImpPblmInfo">
- insert into IMP_PBLM_INFO(
- <include refid="table_columns"/>
- )
- values (
- <include refid="entity_properties"/>
- )
- </insert>
- <delete id="delete" parameterType="java.lang.String">
- delete from IMP_PBLM_INFO where ID = #{id}
- </delete>
- <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.ImpPblmInfo">
- delete from IMP_PBLM_INFO
- <include refid="page_where"/>
- </delete>
- <update id="deleteInFlag" parameterType="java.lang.String">
- update IMP_PBLM_INFO set flag_valid = 0 where ID = #{id}
- </update>
- <update id="update" parameterType="cn.com.goldenwater.dcproj.model.ImpPblmInfo">
- update IMP_PBLM_INFO
- <trim prefix="set" suffixOverrides=",">
- <if test="sn != null and sn != ''">SN = #{sn},</if>
- <if test="proCode != null and proCode != ''">PRO_CODE = #{proCode},</if>
- <if test="proName != null and proName != ''">PRO_NAME = #{proName},</if>
- <if test="cityCode != null and cityCode != ''">CITY_CODE = #{cityCode},</if>
- <if test="cityName != null and cityName != ''">CITY_NAME = #{cityName},</if>
- <if test="countyCode != null and countyCode != ''">COUNTY_CODE = #{countyCode},</if>
- <if test="countyName != null and countyName != ''">COUNTY_NAME = #{countyName},</if>
- <if test="rsCode != null and rsCode != ''">RS_CODE = #{rsCode},</if>
- <if test="rsName != null and rsName != ''">RS_NAME = #{rsName},</if>
- <if test="engScal != null and engScal != ''">ENG_SCAL = #{engScal},</if>
- <if test="unit != null and unit != ''">UNIT = #{unit},</if>
- <if test="pblmType != null and pblmType != ''">PBLM_TYPE = #{pblmType},</if>
- <if test="pblmOption != null and pblmOption != ''">PBLM_OPTION = #{pblmOption},</if>
- <if test="pblmDesc != null and pblmDesc != ''">PBLM_DESC = #{pblmDesc},</if>
- <if test="pblmLevl != null and pblmLevl != ''">PBLM_LEVL = #{pblmLevl},</if>
- <if test="attach != null and attach != ''">ATTACH = #{attach},</if>
- <if test="pblmSn != null and pblmSn != ''">PBLM_SN = #{pblmSn},</if>
- <if test="pblmId != null and pblmId != ''">PBLM_ID = #{pblmId},</if>
- <if test="mnth != null and mnth != ''">MNTH = #{mnth},</if>
- <if test="oldGroupId != null and oldGroupId != ''">OLD_GROUP_ID = #{oldGroupId},</if>
- <if test="groupId != null and groupId != ''">GROUP_ID = #{groupId},</if>
- <if test="groupNm != null and groupNm != ''">GROUP_NM = #{groupNm},</if>
- <if test="regId != null and regId != ''">REG_ID = #{regId},</if>
- <if test="objId != null and objId != ''">OBJ_ID = #{objId},</if>
- <if test="note != null and note != ''">NOTE = #{note},</if>
- <if test="orgId != null and orgId != ''">ORG_ID = #{orgId},</if>
- <if test="orgNm != null and orgNm != ''">ORG_NM = #{orgNm},</if>
- <if test="pblmTypeId != null and pblmTypeId != ''">PBLMS_TYPE_ID = #{pblmTypeId},</if>
- </trim>
- <where>ID = #{id}</where>
- </update>
- <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.ImpPblmInfo">
- update IMP_PBLM_INFO
- <trim prefix="set" suffixOverrides=",">
- <if test="sn != null and sn != ''">SN = #{sn},</if>
- <if test="proCode != null and proCode != ''">PRO_CODE = #{proCode},</if>
- <if test="proName != null and proName != ''">PRO_NAME = #{proName},</if>
- <if test="cityCode != null and cityCode != ''">CITY_CODE = #{cityCode},</if>
- <if test="cityName != null and cityName != ''">CITY_NAME = #{cityName},</if>
- <if test="countyCode != null and countyCode != ''">COUNTY_CODE = #{countyCode},</if>
- <if test="countyName != null and countyName != ''">COUNTY_NAME = #{countyName},</if>
- <if test="rsCode != null and rsCode != ''">RS_CODE = #{rsCode},</if>
- <if test="rsName != null and rsName != ''">RS_NAME = #{rsName},</if>
- <if test="engScal != null and engScal != ''">ENG_SCAL = #{engScal},</if>
- <if test="unit != null and unit != ''">UNIT = #{unit},</if>
- <if test="pblmType != null and pblmType != ''">PBLM_TYPE = #{pblmType},</if>
- <if test="pblmOption != null and pblmOption != ''">PBLM_OPTION = #{pblmOption},</if>
- <if test="pblmDesc != null and pblmDesc != ''">PBLM_DESC = #{pblmDesc},</if>
- <if test="pblmLevl != null and pblmLevl != ''">PBLM_LEVL = #{pblmLevl},</if>
- <if test="attach != null and attach != ''">ATTACH = #{attach},</if>
- <if test="pblmSn != null and pblmSn != ''">PBLM_SN = #{pblmSn},</if>
- <if test="pblmId != null and pblmId != ''">PBLM_ID = #{pblmId},</if>
- <if test="mnth != null and mnth != ''">MNTH = #{mnth},</if>
- <if test="oldGroupId != null and oldGroupId != ''">OLD_GROUP_ID = #{oldGroupId},</if>
- <if test="groupId != null and groupId != ''">GROUP_ID = #{groupId},</if>
- <if test="groupNm != null and groupNm != ''">GROUP_NM = #{groupNm},</if>
- <if test="regId != null and regId != ''">REG_ID = #{regId},</if>
- <if test="objId != null and objId != ''">OBJ_ID = #{objId},</if>
- <if test="note != null and note != ''">NOTE = #{note},</if>
- <if test="orgId != null and orgId != ''">ORG_ID = #{orgId},</if>
- <if test="orgNm != null and orgNm != ''">ORG_NM = #{orgNm},</if>
- <if test="pblmTypeId != null and pblmTypeId != ''">PBLMS_TYPE_ID = #{pblmTypeId},</if>
- </trim>
- <include refid="page_where"/>
- </update>
- <!-- 其他自定义SQL -->
- </mapper>
|