| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172 |
- <?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.BisInspAllOrganizationZjDao">
- <resultMap type="cn.com.goldenwater.dcproj.model.BisInspAllOrganizationZj" id="bisInspAllOrganizationZjResultMap">
- <result property="organizationId" column="ORGANIZATION_ID"/>
- <result property="parentId" column="PARENT_ID"/>
- <result property="name" column="NAME"/>
- <result property="fullName" column="FULL_NAME"/>
- <result property="address" column="ADDRESS"/>
- <result property="uncode" column="UNCODE"/>
- <result property="orderId" column="ORDER_ID"/>
- <result property="chargePerson" column="CHARGE_PERSON"/>
- <result property="phoneNumber" column="PHONE_NUMBER"/>
- <result property="mobileNumber" column="MOBILE_NUMBER"/>
- <result property="faxNumber" column="FAX_NUMBER"/>
- <result property="email" column="EMAIL"/>
- <result property="intruduction" column="INTRUDUCTION"/>
- <result property="staffCount" column="STAFF_COUNT"/>
- <result property="unitid" column="UNITID"/>
- <result property="typeCode" column="TYPE_CODE"/>
- <result property="adcd" column="ADCD"/>
- <result property="adName" column="AD_NAME"/>
- <result property="orgRelated" column="ORG_RELATED"/>
- </resultMap>
-
- <sql id="table_columns">
- ORGANIZATION_ID,
- PARENT_ID,
- NAME,
- FULL_NAME,
- ADDRESS,
- UNCODE,
- ORDER_ID,
- CHARGE_PERSON,
- PHONE_NUMBER,
- MOBILE_NUMBER,
- FAX_NUMBER,
- EMAIL,
- INTRUDUCTION,
- STAFF_COUNT,
- UNITID,
- TYPE_CODE,
- ADCD,
- AD_NAME,
- ORG_RELATED
- </sql>
- <sql id="entity_properties">
- #{organizationId},
- #{parentId},
- #{name},
- #{fullName},
- #{address},
- #{uncode},
- #{orderId},
- #{chargePerson},
- #{phoneNumber},
- #{mobileNumber},
- #{faxNumber},
- #{email},
- #{intruduction},
- #{staffCount},
- #{unitid},
- #{typeCode},
- #{adcd},
- #{adName},
- #{orgRelated}
- </sql>
- <!-- 使用like用法:columnName like concat('%',#columnName#,'%') -->
- <sql id="page_where">
- <trim prefix="where" prefixOverrides="and | or ">
- <if test="parentId != null and parentId != ''">and PARENT_ID = #{parentId}</if>
- <if test="name != null and name != ''">and NAME = #{name}</if>
- <if test="fullName != null and fullName != ''">and FULL_NAME = #{fullName}</if>
- <if test="address != null and address != ''">and ADDRESS = #{address}</if>
- <if test="uncode != null and uncode != ''">and UNCODE = #{uncode}</if>
- <if test="orderId != null and orderId != ''">and ORDER_ID = #{orderId}</if>
- <if test="chargePerson != null and chargePerson != ''">and CHARGE_PERSON = #{chargePerson}</if>
- <if test="phoneNumber != null and phoneNumber != ''">and PHONE_NUMBER = #{phoneNumber}</if>
- <if test="mobileNumber != null and mobileNumber != ''">and MOBILE_NUMBER = #{mobileNumber}</if>
- <if test="faxNumber != null and faxNumber != ''">and FAX_NUMBER = #{faxNumber}</if>
- <if test="email != null and email != ''">and EMAIL = #{email}</if>
- <if test="intruduction != null and intruduction != ''">and INTRUDUCTION = #{intruduction}</if>
- <if test="staffCount != null and staffCount != ''">and STAFF_COUNT = #{staffCount}</if>
- <if test="unitid != null and unitid != ''">and UNITID = #{unitid}</if>
- <if test="typeCode != null and typeCode != ''">and TYPE_CODE = #{typeCode}</if>
- <if test="adcd != null and adcd != ''">and ADCD = #{adcd}</if>
- <if test="adName != null and adName != ''">and AD_NAME = #{adName}</if>
- <if test="orgRelated != null and orgRelated != ''">and ORG_RELATED = #{orgRelated}</if>
- and DATA_STAT='0'
- </trim>
- </sql>
- <select id="get" resultMap="bisInspAllOrganizationZjResultMap" parameterType="String" >
- select <include refid="table_columns" /> from BIS_INSP_ALL_ORGANIZATION_ZJ where ORGANIZATION_ID = #{organizationId}
- </select>
- <!-- <select id="getBy" resultMap="bisInspAllOrganizationZjResultMap">
- select <include refid="table_columns" /> from BIS_INSP_ALL_ORGANIZATION_ZJ <include refid="page_where" />
- </select>-->
- <!-- <select id="findAll" resultMap="bisInspAllOrganizationZjResultMap">
- select <include refid="table_columns" /> from BIS_INSP_ALL_ORGANIZATION_ZJ
- </select>-->
- <!-- <select id="findList" resultMap="bisInspAllOrganizationZjResultMap">
- select <include refid="table_columns" /> from BIS_INSP_ALL_ORGANIZATION_ZJ <include refid="page_where" />
- </select>-->
- <select id="selectCount" resultType="int" >
- select count(ORGANIZATION_ID) from BIS_INSP_ALL_ORGANIZATION_ZJ where ORGANIZATION_ID =#{organizationId}
- </select>
- <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.BisInspAllOrganizationZj">
- insert into BIS_INSP_ALL_ORGANIZATION_ZJ( <include refid="table_columns" /> )
- values ( <include refid="entity_properties" /> )
- </insert>
- <update id="update" parameterType="cn.com.goldenwater.dcproj.model.BisInspAllOrganizationZj">
- update BIS_INSP_ALL_ORGANIZATION_ZJ
- <trim prefix="set" suffixOverrides=",">
- <if test="parentId != null and parentId != ''">PARENT_ID = #{parentId},</if>
- <if test="name != null and name != ''">NAME = #{name},</if>
- <if test="fullName != null and fullName != ''">FULL_NAME = #{fullName},</if>
- <if test="address != null and address != ''">ADDRESS = #{address},</if>
- <if test="uncode != null and uncode != ''">UNCODE = #{uncode},</if>
- <if test="orderId != null and orderId != ''">ORDER_ID = #{orderId},</if>
- <if test="chargePerson != null and chargePerson != ''">CHARGE_PERSON = #{chargePerson},</if>
- <if test="phoneNumber != null and phoneNumber != ''">PHONE_NUMBER = #{phoneNumber},</if>
- <if test="mobileNumber != null and mobileNumber != ''">MOBILE_NUMBER = #{mobileNumber},</if>
- <if test="faxNumber != null and faxNumber != ''">FAX_NUMBER = #{faxNumber},</if>
- <if test="email != null and email != ''">EMAIL = #{email},</if>
- <if test="intruduction != null and intruduction != ''">INTRUDUCTION = #{intruduction},</if>
- <if test="staffCount != null and staffCount != ''">STAFF_COUNT = #{staffCount},</if>
- <if test="unitid != null and unitid != ''">UNITID = #{unitid},</if>
- <if test="typeCode != null and typeCode != ''">TYPE_CODE = #{typeCode},</if>
- <if test="adcd != null and adcd != ''">ADCD = #{adcd},</if>
- <if test="adName != null and adName != ''">AD_NAME = #{adName},</if>
- <if test="orgRelated != null and orgRelated != ''">ORG_RELATED = #{orgRelated},</if>
- </trim>
- <where>ORGANIZATION_ID = #{organizationId}</where>
- </update>
- <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspAllOrganizationZj">
- update BIS_INSP_ALL_ORGANIZATION_ZJ
- <trim prefix="set" suffixOverrides=",">
- <if test="parentId != null and parentId != ''">PARENT_ID = #{parentId},</if>
- <if test="name != null and name != ''">NAME = #{name},</if>
- <if test="fullName != null and fullName != ''">FULL_NAME = #{fullName},</if>
- <if test="address != null and address != ''">ADDRESS = #{address},</if>
- <if test="uncode != null and uncode != ''">UNCODE = #{uncode},</if>
- <if test="orderId != null and orderId != ''">ORDER_ID = #{orderId},</if>
- <if test="chargePerson != null and chargePerson != ''">CHARGE_PERSON = #{chargePerson},</if>
- <if test="phoneNumber != null and phoneNumber != ''">PHONE_NUMBER = #{phoneNumber},</if>
- <if test="mobileNumber != null and mobileNumber != ''">MOBILE_NUMBER = #{mobileNumber},</if>
- <if test="faxNumber != null and faxNumber != ''">FAX_NUMBER = #{faxNumber},</if>
- <if test="email != null and email != ''">EMAIL = #{email},</if>
- <if test="intruduction != null and intruduction != ''">INTRUDUCTION = #{intruduction},</if>
- <if test="staffCount != null and staffCount != ''">STAFF_COUNT = #{staffCount},</if>
- <if test="unitid != null and unitid != ''">UNITID = #{unitid},</if>
- <if test="typeCode != null and typeCode != ''">TYPE_CODE = #{typeCode},</if>
- <if test="adcd != null and adcd != ''">ADCD = #{adcd},</if>
- <if test="adName != null and adName != ''">AD_NAME = #{adName},</if>
- <if test="orgRelated != null and orgRelated != ''">ORG_RELATED = #{orgRelated},</if>
- </trim>
- <include refid="page_where" />
- </update>
- <!-- 其他自定义SQL -->
- </mapper>
|