|
@@ -0,0 +1,116 @@
|
|
|
|
|
+<?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">
|
|
|
|
|
+<!-- namespace必须指向DAO接口 -->
|
|
|
|
|
+<mapper namespace="com.jpsoft.enterprise.modules.base.dao.EnterpriseInfoDAO">
|
|
|
|
|
+ <resultMap id="EnterpriseInfoMap" type="com.jpsoft.enterprise.modules.base.entity.EnterpriseInfo">
|
|
|
|
|
+ <id property="id" column="id_" />
|
|
|
|
|
+ <result property="enterpriseIntroduction" column="enterprise_introduction" />
|
|
|
|
|
+ <result property="enterpriseConstitution" column="enterprise_constitution" />
|
|
|
|
|
+ <result property="organStructure" column="organ_structure" />
|
|
|
|
|
+ <result property="basicFunction" column="basic_function" />
|
|
|
|
|
+ <result property="chargePerson" column="charge_person" />
|
|
|
|
|
+ <result property="branchIntroduction" column="branch_introduction" />
|
|
|
|
|
+ <result property="contactInformation" column="contact_information" />
|
|
|
|
|
+ <result property="createBy" column="create_by" />
|
|
|
|
|
+ <result property="createTime" column="create_time" />
|
|
|
|
|
+ <result property="updateBy" column="update_by" />
|
|
|
|
|
+ <result property="updateTime" column="update_time" />
|
|
|
|
|
+ <result property="delFlag" column="del_flag" />
|
|
|
|
|
+ </resultMap>
|
|
|
|
|
+ <insert id="insert" parameterType="com.jpsoft.enterprise.modules.base.entity.EnterpriseInfo">
|
|
|
|
|
+ <!--
|
|
|
|
|
+ <selectKey resultType="java.lang.String" order="BEFORE" keyProperty="id">
|
|
|
|
|
+ select sys_guid() from dual
|
|
|
|
|
+ </selectKey>
|
|
|
|
|
+ -->
|
|
|
|
|
+ <![CDATA[
|
|
|
|
|
+ insert into base_enterprise_info
|
|
|
|
|
+ (id_,enterprise_introduction,enterprise_constitution,organ_structure,basic_function,charge_person,branch_introduction,contact_information,create_by,create_time,update_by,update_time,del_flag)
|
|
|
|
|
+ values
|
|
|
|
|
+ (
|
|
|
|
|
+#{id,jdbcType=VARCHAR}
|
|
|
|
|
+,#{enterpriseIntroduction,jdbcType=VARCHAR}
|
|
|
|
|
+,#{enterpriseConstitution,jdbcType=VARCHAR}
|
|
|
|
|
+,#{organStructure,jdbcType=VARCHAR}
|
|
|
|
|
+,#{basicFunction,jdbcType=VARCHAR}
|
|
|
|
|
+,#{chargePerson,jdbcType=VARCHAR}
|
|
|
|
|
+,#{branchIntroduction,jdbcType=VARCHAR}
|
|
|
|
|
+,#{contactInformation,jdbcType=VARCHAR}
|
|
|
|
|
+,#{createBy,jdbcType=VARCHAR}
|
|
|
|
|
+,#{createTime,jdbcType= TIMESTAMP }
|
|
|
|
|
+,#{updateBy,jdbcType=VARCHAR}
|
|
|
|
|
+,#{updateTime,jdbcType= TIMESTAMP }
|
|
|
|
|
+,#{delFlag,jdbcType= NUMERIC }
|
|
|
|
|
+ )
|
|
|
|
|
+ ]]>
|
|
|
|
|
+ </insert>
|
|
|
|
|
+ <delete id="delete" parameterType="string">
|
|
|
|
|
+ delete from base_enterprise_info where id_=#{id,jdbcType=VARCHAR}
|
|
|
|
|
+ </delete>
|
|
|
|
|
+ <update id="update" parameterType="com.jpsoft.enterprise.modules.base.entity.EnterpriseInfo">
|
|
|
|
|
+ update base_enterprise_info
|
|
|
|
|
+ <set>
|
|
|
|
|
+ <if test="enterpriseIntroduction!=null">
|
|
|
|
|
+ enterprise_introduction=#{enterpriseIntroduction,jdbcType=VARCHAR},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="enterpriseConstitution!=null">
|
|
|
|
|
+ enterprise_constitution=#{enterpriseConstitution,jdbcType=VARCHAR},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="organStructure!=null">
|
|
|
|
|
+ organ_structure=#{organStructure,jdbcType=VARCHAR},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="basicFunction!=null">
|
|
|
|
|
+ basic_function=#{basicFunction,jdbcType=VARCHAR},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="chargePerson!=null">
|
|
|
|
|
+ charge_person=#{chargePerson,jdbcType=VARCHAR},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="branchIntroduction!=null">
|
|
|
|
|
+ branch_introduction=#{branchIntroduction,jdbcType=VARCHAR},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="contactInformation!=null">
|
|
|
|
|
+ contact_information=#{contactInformation,jdbcType=VARCHAR},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="createBy!=null">
|
|
|
|
|
+ create_by=#{createBy,jdbcType=VARCHAR},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="createTime!=null">
|
|
|
|
|
+ create_time=#{createTime,jdbcType= TIMESTAMP },
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="updateBy!=null">
|
|
|
|
|
+ update_by=#{updateBy,jdbcType=VARCHAR},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="updateTime!=null">
|
|
|
|
|
+ update_time=#{updateTime,jdbcType= TIMESTAMP },
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="delFlag!=null">
|
|
|
|
|
+ del_flag=#{delFlag,jdbcType= NUMERIC },
|
|
|
|
|
+ </if>
|
|
|
|
|
+ </set>
|
|
|
|
|
+ where id_=#{id}
|
|
|
|
|
+ </update>
|
|
|
|
|
+ <select id="get" parameterType="string" resultMap="EnterpriseInfoMap">
|
|
|
|
|
+ select
|
|
|
|
|
+id_,enterprise_introduction,enterprise_constitution,organ_structure,basic_function,charge_person,branch_introduction,contact_information,create_by,create_time,update_by,update_time,del_flag from base_enterprise_info where id_=#{0}
|
|
|
|
|
+ </select>
|
|
|
|
|
+ <select id="exist" parameterType="string" resultType="int">
|
|
|
|
|
+ select count(*) from base_enterprise_info where id_=#{0}
|
|
|
|
|
+ </select>
|
|
|
|
|
+ <select id="list" resultMap="EnterpriseInfoMap">
|
|
|
|
|
+ select * from base_enterprise_info
|
|
|
|
|
+ </select>
|
|
|
|
|
+ <select id="search" parameterType="hashmap" resultMap="EnterpriseInfoMap">
|
|
|
|
|
+ <![CDATA[
|
|
|
|
|
+ select * from base_enterprise_info
|
|
|
|
|
+ ]]>
|
|
|
|
|
+ <where>
|
|
|
|
|
+ <if test="searchParams.id != null">
|
|
|
|
|
+ and ID_ like #{searchParams.id}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ </where>
|
|
|
|
|
+ <foreach item="sort" collection="sortList" open="order by" separator=",">
|
|
|
|
|
+ ${sort.name} ${sort.order}
|
|
|
|
|
+ </foreach>
|
|
|
|
|
+ </select>
|
|
|
|
|
+</mapper>
|