| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185 |
- <?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.BisInspDvdwkDao">
- <resultMap type="cn.com.goldenwater.dcproj.model.BisInspDvdwk" id="bisInspDvdwkResultMap">
- <result property="dvdwkId" column="DVDWK_ID"/>
- <result property="schmId" column="SCHM_ID"/>
- <result property="guid" column="GUID"/>
- <result property="orgDp" column="ORG_DP"/>
- <result property="dtype" column="DTYPE"/>
- <result property="content" column="CONTENT"/>
- <result property="intm" column="INTM"/>
- <result property="uptm" column="UPTM"/>
- <result property="inspNum" column="INSP_NUM"/>
- <result property="adCode" column="AD_CODE"/>
- <result property="adName" column="AD_NAME"/>
- <result property="orgName" column="ORG_NAME"/>
- <result property="inspCount" column="INSP_COUNT"/>
- <result property="inspScale" column="INSP_SCALE"/>
- </resultMap>
- <sql id="table_columns">
- DVDWK_ID,
- SCHM_ID,
- GUID,
- ORG_DP,
- DTYPE,
- CONTENT,
- INTM,
- UPTM,
- INSP_NUM,
- AD_CODE,
- AD_NAME,
- ORG_NAME,
- INSP_COUNT,
- INSP_SCALE
- </sql>
- <sql id="entity_properties">
- #{dvdwkId},
- #{schmId},
- #{guid},
- #{orgDp},
- #{dtype},
- #{content},
- #{intm},
- #{uptm},
- #{inspNum},
- #{adCode},
- #{adName},
- #{orgName},
- #{inspCount},
- #{inspScale}
- </sql>
- <!-- 使用like用法:columnName like concat('%',#columnName#,'%') -->
- <sql id="page_where">
- <trim prefix="where" prefixOverrides="and | or ">
- <if test="schmId != null and schmId != ''">and SCHM_ID = #{schmId}</if>
- <if test="guid != null and guid != ''">and GUID = #{guid}</if>
- <if test="orgDp != null and orgDp != ''">and ORG_DP = #{orgDp}</if>
- <if test="dtype != null and dtype != ''">and DTYPE = #{dtype}</if>
- <if test="content != null and content != ''">and CONTENT = #{content}</if>
- <if test="intm != null">and INTM = #{intm}</if>
- <if test="uptm != null">and UPTM = #{uptm}</if>
- <if test="inspNum != null and inspNum != ''">and INSP_NUM = #{inspNum}</if>
- <if test="adCode != null and adCode != ''">and AD_CODE = #{adCode}</if>
- <if test="adName != null and adName != ''">and AD_NAME = #{adName}</if>
- <if test="orgName != null and orgName != ''">and ORG_NAME = #{orgName}</if>
- <if test="inspCount != null and inspCount != ''">and INSP_COUNT = #{inspCount}</if>
- <if test="inspScale != null and inspScale != ''">and INSP_SCALE = #{inspScale}</if>
- </trim>
- </sql>
- <select id="get" resultMap="bisInspDvdwkResultMap" parameterType="String">
- select
- <include refid="table_columns"/>
- from BIS_INSP_DVDWK where SCHM_ID = #{id}
- </select>
- <select id="getBy" resultMap="bisInspDvdwkResultMap">
- select
- <include refid="table_columns"/>
- from BIS_INSP_DVDWK
- <include refid="page_where"/>
- </select>
- <select id="findAll" resultMap="bisInspDvdwkResultMap">
- select
- <include refid="table_columns"/>
- from BIS_INSP_DVDWK
- </select>
- <select id="findList" resultMap="bisInspDvdwkResultMap">
- select
- <include refid="table_columns"/>
- from BIS_INSP_DVDWK
- <include refid="page_where"/>
- </select>
- <select id="selectCount" resultType="int">
- select count(ID) from BIS_INSP_DVDWK
- <include refid="page_where"/>
- </select>
- <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.BisInspDvdwk">
- insert into BIS_INSP_DVDWK(
- <include refid="table_columns"/>
- )
- values (
- <include refid="entity_properties"/>
- )
- </insert>
- <delete id="delete" parameterType="java.lang.String">
- delete from BIS_INSP_DVDWK where DVDWK_ID = #{id}
- </delete>
- <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspDvdwk">
- delete from BIS_INSP_DVDWK
- <include refid="page_where"/>
- </delete>
- <update id="deleteInFlag" parameterType="java.lang.String">
- update BIS_INSP_DVDWK set flag_valid = 0 where ID = #{id}
- </update>
- <update id="update" parameterType="cn.com.goldenwater.dcproj.model.BisInspDvdwk">
- update BIS_INSP_DVDWK
- <trim prefix="set" suffixOverrides=",">
- <if test="schmId != null and schmId != ''">SCHM_ID = #{schmId},</if>
- <if test="guid != null and guid != ''">GUID = #{guid},</if>
- <if test="orgDp != null and orgDp != ''">ORG_DP = #{orgDp},</if>
- <if test="dtype != null and dtype != ''">DTYPE = #{dtype},</if>
- <if test="content != null and content != ''">CONTENT = #{content},</if>
- <if test="intm != null">INTM = #{intm},</if>
- <if test="uptm != null">UPTM = #{uptm},</if>
- INSP_NUM = #{inspNum},
- <if test="adCode != null and adCode != ''">AD_CODE = #{adCode},</if>
- <if test="adName != null and adName != ''">AD_NAME = #{adName},</if>
- <if test="orgName != null and orgName != ''">ORG_NAME = #{orgName},</if>
- INSP_COUNT = #{inspCount},
- INSP_SCALE = #{inspScale},
- </trim>
- <where>DVDWK_ID = #{dvdwkId}</where>
- </update>
- <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspDvdwk">
- update BIS_INSP_DVDWK
- <trim prefix="set" suffixOverrides=",">
- <if test="schmId != null and schmId != ''">SCHM_ID = #{schmId},</if>
- <if test="guid != null and guid != ''">GUID = #{guid},</if>
- <if test="orgDp != null and orgDp != ''">ORG_DP = #{orgDp},</if>
- <if test="dtype != null and dtype != ''">DTYPE = #{dtype},</if>
- <if test="content != null and content != ''">CONTENT = #{content},</if>
- <if test="intm != null">INTM = #{intm},</if>
- <if test="uptm != null">UPTM = #{uptm},</if>
- <if test="inspNum != null and inspNum != ''">INSP_NUM = #{inspNum},</if>
- <if test="adCode != null and adCode != ''">AD_CODE = #{adCode},</if>
- <if test="adName != null and adName != ''">AD_NAME = #{adName},</if>
- <if test="orgName != null and orgName != ''">ORG_NAME = #{orgName},</if>
- <if test="inspCount != null and inspCount != ''">INSP_COUNT = #{inspCount},</if>
- <if test="inspScale != null and inspScale != ''">INSP_SCALE = #{inspScale},</if>
- </trim>
- <include refid="page_where"/>
- </update>
- <!-- 其他自定义SQL -->
- <select id="queryDvdwk" resultType="cn.com.goldenwater.dcproj.dto.BisInspDvdwkDto">
- SELECT A.* FROM bis_insp_dvdwk A WHERE 1=1
- <if test="schmId != null and schmId != ''">and A.SCHM_ID = #{schmId}</if>
- <if test="orgDp != null and orgDp != ''">and A.ORG_DP = #{orgDp}</if>
- <if test="dtype != null and dtype != ''">and A.DTYPE = #{dtype}</if>
- <if test="content != null and content != ''">and A.CONTENT = #{content}</if>
- <if test="inspNum != null and inspNum != ''">and A.INSP_NUM = #{inspNum}</if>
- <if test="adCode != null and adCode != ''">and A.AD_CODE = #{adCode}</if>
- <if test="adName != null and adName != ''">and A.AD_NAME = #{adName}</if>
- <if test="orgName != null and orgName != ''">and A.ORG_NAME = #{orgName}</if>
- <if test="inspCount != null and inspCount != ''">and A.INSP_COUNT = #{inspCount}</if>
- <if test="inspScale != null and inspScale != ''">and A.INSP_SCALE = #{inspScale}</if>
- </select>
- </mapper>
|