|
|
@@ -0,0 +1,167 @@
|
|
|
+<?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.employment.dao.CompanyDAO">
|
|
|
+ <resultMap id="CompanyMap" type="com.jpsoft.employment.modules.base.entity.Company">
|
|
|
+ <id property="id" column="id_" />
|
|
|
+ <result property="name" column="name_" />
|
|
|
+ <result property="type" column="type_" />
|
|
|
+ <result property="scale" column="scale_" />
|
|
|
+ <result property="industry" column="industry_" />
|
|
|
+ <result property="address" column="address_" />
|
|
|
+ <result property="introduction" column="introduction_" />
|
|
|
+ <result property="contactPerson" column="contact_person" />
|
|
|
+ <result property="tel" column="tel_" />
|
|
|
+ <result property="longtitude" column="longtitude_" />
|
|
|
+ <result property="latitude" column="latitude_" />
|
|
|
+ <result property="email" column="email_" />
|
|
|
+ <result property="sortNo" column="sort_no" />
|
|
|
+ <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" />
|
|
|
+ <result property="isCertification" column="is_certification" />
|
|
|
+ <result property="creditCode" column="credit_code" />
|
|
|
+ <result property="legalPerson" column="legal_person" />
|
|
|
+ <result property="legalTel" column="legal_tel" />
|
|
|
+ <result property="businessLicenseUrl" column="business_license_url" />
|
|
|
+ </resultMap>
|
|
|
+ <insert id="insert" parameterType="com.jpsoft.employment.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_,type_,scale_,industry_,address_,introduction_,contact_person,tel_,longtitude_,latitude_,email_,sort_no,create_by,create_time,update_by,update_time,del_flag,is_certification,credit_code,legal_person,legal_tel,business_license
|
|
|
+_url)
|
|
|
+ values
|
|
|
+ (
|
|
|
+#{id,jdbcType=VARCHAR}
|
|
|
+,#{name,jdbcType=VARCHAR}
|
|
|
+,#{type,jdbcType=VARCHAR}
|
|
|
+,#{scale,jdbcType=VARCHAR}
|
|
|
+,#{industry,jdbcType=VARCHAR}
|
|
|
+,#{address,jdbcType=VARCHAR}
|
|
|
+,#{introduction,jdbcType=VARCHAR}
|
|
|
+,#{contactPerson,jdbcType=VARCHAR}
|
|
|
+,#{tel,jdbcType=VARCHAR}
|
|
|
+,#{longtitude,jdbcType=VARCHAR}
|
|
|
+,#{latitude,jdbcType=VARCHAR}
|
|
|
+,#{email,jdbcType=VARCHAR}
|
|
|
+,#{sortNo,jdbcType= NUMERIC }
|
|
|
+,#{createBy,jdbcType=VARCHAR}
|
|
|
+,#{createTime,jdbcType= TIMESTAMP }
|
|
|
+,#{updateBy,jdbcType=VARCHAR}
|
|
|
+,#{updateTime,jdbcType= TIMESTAMP }
|
|
|
+,#{delFlag,jdbcType= NUMERIC }
|
|
|
+,#{isCertification,jdbcType= NUMERIC }
|
|
|
+,#{creditCode,jdbcType=VARCHAR}
|
|
|
+,#{legalPerson,jdbcType=VARCHAR}
|
|
|
+,#{legalTel,jdbcType=VARCHAR}
|
|
|
+,#{businessLicense
|
|
|
+Url,jdbcType=VARCHAR}
|
|
|
+ )
|
|
|
+ ]]>
|
|
|
+ </insert>
|
|
|
+ <delete id="delete" parameterType="string">
|
|
|
+ delete from base_company where id_=#{id,jdbcType=VARCHAR}
|
|
|
+ </delete>
|
|
|
+ <update id="update" parameterType="com.jpsoft.employment.modules.base.entity.Company">
|
|
|
+ update base_company
|
|
|
+ <set>
|
|
|
+ <if test="name!=null">
|
|
|
+ name_=#{name,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="type!=null">
|
|
|
+ type_=#{type,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="scale!=null">
|
|
|
+ scale_=#{scale,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="industry!=null">
|
|
|
+ industry_=#{industry,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="address!=null">
|
|
|
+ address_=#{address,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="introduction!=null">
|
|
|
+ introduction_=#{introduction,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="contactPerson!=null">
|
|
|
+ contact_person=#{contactPerson,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="tel!=null">
|
|
|
+ tel_=#{tel,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="longtitude!=null">
|
|
|
+ longtitude_=#{longtitude,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="latitude!=null">
|
|
|
+ latitude_=#{latitude,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="email!=null">
|
|
|
+ email_=#{email,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="sortNo!=null">
|
|
|
+ sort_no=#{sortNo,jdbcType= NUMERIC },
|
|
|
+ </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>
|
|
|
+ <if test="isCertification!=null">
|
|
|
+ is_certification=#{isCertification,jdbcType= NUMERIC },
|
|
|
+ </if>
|
|
|
+ <if test="creditCode!=null">
|
|
|
+ credit_code=#{creditCode,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="legalPerson!=null">
|
|
|
+ legal_person=#{legalPerson,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="legalTel!=null">
|
|
|
+ legal_tel=#{legalTel,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="businessLicenseUrl!=null">
|
|
|
+ business_license_url=#{businessLicenseUrl,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ </set>
|
|
|
+ where id_=#{id}
|
|
|
+ </update>
|
|
|
+ <select id="get" parameterType="string" resultMap="CompanyMap">
|
|
|
+ select * 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>
|