| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179 |
- <?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.BisInspOrgBaseDao">
- <resultMap type="cn.com.goldenwater.dcproj.model.BisInspOrgBase" id="bisInspOrgBaseResultMap">
- <result property="recPers" column="REC_PERS"/>
- <result property="collTime" column="COLL_TIME"/>
- <result property="note" column="NOTE"/>
- <result property="guid" column="GUID"/>
- <result property="pguid" column="PGUID"/>
- <result property="orgName" column="ORG_NAME"/>
- <result property="orgCode" column="ORG_CODE"/>
- <result property="baadGuid" column="BAAD_GUID"/>
- <result property="orgLong" column="ORG_LONG"/>
- <result property="orgLat" column="ORG_LAT"/>
- <result property="adCode" column="AD_CODE"/>
- <result property="adminWiunGuid" column="ADMIN_WIUN_GUID"/>
- <result property="orgLevel" column="ORG_LEVEL"/>
- <result property="ordernum" column="ORDERNUM"/>
- <result property="dataStat" column="DATA_STAT"/>
- </resultMap>
- <sql id="table_columns">
- REC_PERS,
- COLL_TIME,
- NOTE,
- GUID,
- PGUID,
- ORG_NAME,
- ORG_CODE,
- BAAD_GUID,
- ORG_LONG,
- ORG_LAT,
- AD_CODE,
- ADMIN_WIUN_GUID,
- ORG_LEVEL,
- ORDERNUM,
- DATA_STAT
- </sql>
- <sql id="entity_properties">
- #{recPers},
- #{collTime},
- #{note},
- #{guid},
- #{pguid},
- #{orgName},
- #{orgCode},
- #{baadGuid},
- #{orgLong},
- #{orgLat},
- #{adCode},
- #{adminWiunGuid},
- #{orgLevel},
- #{ordernum},
- #{dataStat}
- </sql>
- <!-- 使用like用法:columnName like concat('%',#columnName#,'%') -->
- <sql id="page_where">
- <trim prefix="where" prefixOverrides="and | or ">
- <if test="collTime != null">and COLL_TIME = #{collTime}</if>
- <if test="note != null and note != ''">and NOTE = #{note}</if>
- <if test="guid != null and guid != ''">and GUID = #{guid}</if>
- <if test="pguid != null and pguid != ''">and PGUID = #{pguid}</if>
- <if test="orgName != null and orgName != ''">and ORG_NAME = #{orgName}</if>
- <if test="orgCode != null and orgCode != ''">and ORG_CODE = #{orgCode}</if>
- <if test="baadGuid != null and baadGuid != ''">and BAAD_GUID = #{baadGuid}</if>
- <if test="orgLong != null and orgLong != ''">and ORG_LONG = #{orgLong}</if>
- <if test="orgLat != null and orgLat != ''">and ORG_LAT = #{orgLat}</if>
- <if test="adCode != null and adCode != ''">and AD_CODE = #{adCode}</if>
- <if test="adminWiunGuid != null and adminWiunGuid != ''">and ADMIN_WIUN_GUID = #{adminWiunGuid}</if>
- <if test="orgLevel != null and orgLevel != ''">and ORG_LEVEL = #{orgLevel}</if>
- <if test="ordernum != null and ordernum != ''">and ORDERNUM = #{ordernum}</if>
- <if test="dataStat != null and dataStat != ''">and DATA_STAT = #{dataStat}</if>
- </trim>
- </sql>
- <select id="get" resultMap="bisInspOrgBaseResultMap" parameterType="String">
- select
- <include refid="table_columns"/>
- from bis_insp_org_base where ID = #{id}
- </select>
- <select id="getBy" resultMap="bisInspOrgBaseResultMap">
- select
- <include refid="table_columns"/>
- from bis_insp_org_base
- <include refid="page_where"/>
- </select>
- <select id="findAll" resultMap="bisInspOrgBaseResultMap">
- select
- <include refid="table_columns"/>
- from bis_insp_org_base
- </select>
- <select id="findList" resultMap="bisInspOrgBaseResultMap">
- select
- <include refid="table_columns"/>
- from bis_insp_org_base
- <include refid="page_where"/>
- </select>
- <select id="selectCount" resultType="int">
- select count(ID) from bis_insp_org_base
- <include refid="page_where"/>
- </select>
- <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.BisInspOrgBase">
- insert into bis_insp_org_base(
- <include refid="table_columns"/>
- )
- values (
- <include refid="entity_properties"/>
- )
- </insert>
- <delete id="delete" parameterType="java.lang.String">
- delete from bis_insp_org_base where ID = #{id}
- </delete>
- <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspOrgBase">
- delete from bis_insp_org_base
- <include refid="page_where"/>
- </delete>
- <update id="deleteInFlag" parameterType="java.lang.String">
- update bis_insp_org_base set flag_valid = 0 where ID = #{id}
- </update>
- <update id="update" parameterType="cn.com.goldenwater.dcproj.model.BisInspOrgBase">
- update bis_insp_org_base
- <trim prefix="set" suffixOverrides=",">
- <if test="collTime != null">COLL_TIME = #{collTime},</if>
- <if test="note != null and note != ''">NOTE = #{note},</if>
- <if test="guid != null and guid != ''">GUID = #{guid},</if>
- <if test="pguid != null and pguid != ''">PGUID = #{pguid},</if>
- <if test="orgName != null and orgName != ''">ORG_NAME = #{orgName},</if>
- <if test="orgCode != null and orgCode != ''">ORG_CODE = #{orgCode},</if>
- <if test="baadGuid != null and baadGuid != ''">BAAD_GUID = #{baadGuid},</if>
- <if test="orgLong != null and orgLong != ''">ORG_LONG = #{orgLong},</if>
- <if test="orgLat != null and orgLat != ''">ORG_LAT = #{orgLat},</if>
- <if test="adCode != null and adCode != ''">AD_CODE = #{adCode},</if>
- <if test="adminWiunGuid != null and adminWiunGuid != ''">ADMIN_WIUN_GUID = #{adminWiunGuid},</if>
- <if test="orgLevel != null and orgLevel != ''">ORG_LEVEL = #{orgLevel},</if>
- <if test="ordernum != null and ordernum != ''">ORDERNUM = #{ordernum},</if>
- <if test="dataStat != null and dataStat != ''">DATA_STAT = #{dataStat},</if>
- </trim>
- <where>ORG_ID = #{orgId}</where>
- </update>
- <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspOrgBase">
- update bis_insp_org_base
- <trim prefix="set" suffixOverrides=",">
- <if test="collTime != null">COLL_TIME = #{collTime},</if>
- <if test="note != null and note != ''">NOTE = #{note},</if>
- <if test="guid != null and guid != ''">GUID = #{guid},</if>
- <if test="pguid != null and pguid != ''">PGUID = #{pguid},</if>
- <if test="orgName != null and orgName != ''">ORG_NAME = #{orgName},</if>
- <if test="orgCode != null and orgCode != ''">ORG_CODE = #{orgCode},</if>
- <if test="baadGuid != null and baadGuid != ''">BAAD_GUID = #{baadGuid},</if>
- <if test="orgLong != null and orgLong != ''">ORG_LONG = #{orgLong},</if>
- <if test="orgLat != null and orgLat != ''">ORG_LAT = #{orgLat},</if>
- <if test="adCode != null and adCode != ''">AD_CODE = #{adCode},</if>
- <if test="adminWiunGuid != null and adminWiunGuid != ''">ADMIN_WIUN_GUID = #{adminWiunGuid},</if>
- <if test="orgLevel != null and orgLevel != ''">ORG_LEVEL = #{orgLevel},</if>
- <if test="ordernum != null and ordernum != ''">ORDERNUM = #{ordernum},</if>
- <if test="dataStat != null and dataStat != ''">DATA_STAT = #{dataStat},</if>
- </trim>
- <include refid="page_where"/>
- </update>
- <!-- 其他自定义SQL -->
- </mapper>
|