|
@@ -0,0 +1,206 @@
|
|
|
|
+<?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.picc.modules.base.dao.CompanyDAO">
|
|
|
|
+ <resultMap id="CompanyMap" type="com.jpsoft.picc.modules.base.entity.Company">
|
|
|
|
+ <id property="id" column="id_" />
|
|
|
|
+ <result property="name" column="name_" />
|
|
|
|
+ <result property="realName" column="real_name" />
|
|
|
|
+ <result property="passWord" column="pass_word" />
|
|
|
|
+ <result property="legalName" column="legal_name" />
|
|
|
|
+ <result property="legalCard" column="legal_card" />
|
|
|
|
+ <result property="legalCardFile" column="legal_card_file" />
|
|
|
|
+ <result property="usccCode" column="uscc_code" />
|
|
|
|
+ <result property="usccFiles" column="uscc_files" />
|
|
|
|
+ <result property="type" column="type_" />
|
|
|
|
+ <result property="businessNature" column="business_nature" />
|
|
|
|
+ <result property="businessScope" column="business_scope" />
|
|
|
|
+ <result property="industryType" column="industry_type" />
|
|
|
|
+ <result property="employeesNumber" column="employees_number" />
|
|
|
|
+ <result property="insuredNumber" column="insured_number" />
|
|
|
|
+ <result property="person" column="person_" />
|
|
|
|
+ <result property="tel" column="tel_" />
|
|
|
|
+ <result property="mail" column="mail_" />
|
|
|
|
+ <result property="postal" column="postal_" />
|
|
|
|
+ <result property="address" column="address_" />
|
|
|
|
+ <result property="companyStampFile" column="company_stamp_file" />
|
|
|
|
+ <result property="promoter" column="promoter_" />
|
|
|
|
+ <result property="remark" column="remark_" />
|
|
|
|
+ <result property="openId" column="open_id" />
|
|
|
|
+ <result property="buyId" column="buy_id" />
|
|
|
|
+ <result property="status" column="status_" />
|
|
|
|
+ <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.picc.modules.base.entity.Company">
|
|
|
|
+ <!--
|
|
|
|
+ <selectKey resultType="java.lang.String" order="BEFORE" keyProperty="id">
|
|
|
|
+ select sys_guid() from dual
|
|
|
|
+ </selectKey>
|
|
|
|
+ -->
|
|
|
|
+ <![CDATA[
|
|
|
|
+ insert into base_company
|
|
|
|
+ (id_,name_,real_name,pass_word,legal_name,legal_card,legal_card_file,uscc_code,uscc_files,type_,business_nature,business_scope,industry_type,employees_number,insured_number,person_,tel_,mail_,postal_,address_,company_stamp_file,promoter_,remark_,open_id,buy_id,status_,create_by,create_time,update_by,update_time,del_flag)
|
|
|
|
+ values
|
|
|
|
+ (
|
|
|
|
+#{id,jdbcType=VARCHAR}
|
|
|
|
+,#{name,jdbcType=VARCHAR}
|
|
|
|
+,#{realName,jdbcType=VARCHAR}
|
|
|
|
+,#{passWord,jdbcType=VARCHAR}
|
|
|
|
+,#{legalName,jdbcType=VARCHAR}
|
|
|
|
+,#{legalCard,jdbcType=VARCHAR}
|
|
|
|
+,#{legalCardFile,jdbcType=VARCHAR}
|
|
|
|
+,#{usccCode,jdbcType=VARCHAR}
|
|
|
|
+,#{usccFiles,jdbcType=VARCHAR}
|
|
|
|
+,#{type,jdbcType=VARCHAR}
|
|
|
|
+,#{businessNature,jdbcType=VARCHAR}
|
|
|
|
+,#{businessScope,jdbcType=VARCHAR}
|
|
|
|
+,#{industryType,jdbcType=VARCHAR}
|
|
|
|
+,#{employeesNumber,jdbcType= NUMERIC }
|
|
|
|
+,#{insuredNumber,jdbcType= NUMERIC }
|
|
|
|
+,#{person,jdbcType=VARCHAR}
|
|
|
|
+,#{tel,jdbcType=VARCHAR}
|
|
|
|
+,#{mail,jdbcType=VARCHAR}
|
|
|
|
+,#{postal,jdbcType=VARCHAR}
|
|
|
|
+,#{address,jdbcType=VARCHAR}
|
|
|
|
+,#{companyStampFile,jdbcType=VARCHAR}
|
|
|
|
+,#{promoter,jdbcType=VARCHAR}
|
|
|
|
+,#{remark,jdbcType=VARCHAR}
|
|
|
|
+,#{openId,jdbcType=VARCHAR}
|
|
|
|
+,#{buyId,jdbcType=VARCHAR}
|
|
|
|
+,#{status,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_company where id_=#{id,jdbcType=VARCHAR}
|
|
|
|
+ </delete>
|
|
|
|
+ <update id="update" parameterType="com.jpsoft.picc.modules.base.entity.Company">
|
|
|
|
+ update base_company
|
|
|
|
+ <set>
|
|
|
|
+ <if test="name!=null">
|
|
|
|
+ name_=#{name,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="realName!=null">
|
|
|
|
+ real_name=#{realName,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="passWord!=null">
|
|
|
|
+ pass_word=#{passWord,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="legalName!=null">
|
|
|
|
+ legal_name=#{legalName,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="legalCard!=null">
|
|
|
|
+ legal_card=#{legalCard,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="legalCardFile!=null">
|
|
|
|
+ legal_card_file=#{legalCardFile,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="usccCode!=null">
|
|
|
|
+ uscc_code=#{usccCode,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="usccFiles!=null">
|
|
|
|
+ uscc_files=#{usccFiles,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="type!=null">
|
|
|
|
+ type_=#{type,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="businessNature!=null">
|
|
|
|
+ business_nature=#{businessNature,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="businessScope!=null">
|
|
|
|
+ business_scope=#{businessScope,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="industryType!=null">
|
|
|
|
+ industry_type=#{industryType,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="employeesNumber!=null">
|
|
|
|
+ employees_number=#{employeesNumber,jdbcType= NUMERIC },
|
|
|
|
+ </if>
|
|
|
|
+ <if test="insuredNumber!=null">
|
|
|
|
+ insured_number=#{insuredNumber,jdbcType= NUMERIC },
|
|
|
|
+ </if>
|
|
|
|
+ <if test="person!=null">
|
|
|
|
+ person_=#{person,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="tel!=null">
|
|
|
|
+ tel_=#{tel,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="mail!=null">
|
|
|
|
+ mail_=#{mail,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="postal!=null">
|
|
|
|
+ postal_=#{postal,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="address!=null">
|
|
|
|
+ address_=#{address,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="companyStampFile!=null">
|
|
|
|
+ company_stamp_file=#{companyStampFile,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="promoter!=null">
|
|
|
|
+ promoter_=#{promoter,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="remark!=null">
|
|
|
|
+ remark_=#{remark,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="openId!=null">
|
|
|
|
+ open_id=#{openId,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="buyId!=null">
|
|
|
|
+ buy_id=#{buyId,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="status!=null">
|
|
|
|
+ status_=#{status,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="CompanyMap">
|
|
|
|
+ select
|
|
|
|
+id_,name_,real_name,pass_word,legal_name,legal_card,legal_card_file,uscc_code,uscc_files,type_,business_nature,business_scope,industry_type,employees_number,insured_number,person_,tel_,mail_,postal_,address_,company_stamp_file,promoter_,remark_,open_id,buy_id,status_,create_by,create_time,update_by,update_time,del_flag from base_company where id_=#{0}
|
|
|
|
+ </select>
|
|
|
|
+ <select id="exist" parameterType="string" resultType="int">
|
|
|
|
+ select count(*) from base_company where id_=#{0}
|
|
|
|
+ </select>
|
|
|
|
+ <select id="list" resultMap="CompanyMap">
|
|
|
|
+ select * from base_company
|
|
|
|
+ </select>
|
|
|
|
+ <select id="search" parameterType="hashmap" resultMap="CompanyMap">
|
|
|
|
+ <![CDATA[
|
|
|
|
+ select * from base_company
|
|
|
|
+ ]]>
|
|
|
|
+ <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>
|