| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197 |
- <?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.modules.base.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="area" column="area_" />
- <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" />
- <result property="logo" column="logo_" />
- </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,logo_,area_)
- 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= VARCHAR }
- ,#{creditCode,jdbcType=VARCHAR}
- ,#{legalPerson,jdbcType=VARCHAR}
- ,#{legalTel,jdbcType=VARCHAR}
- ,#{businessLicenseUrl,jdbcType=VARCHAR}
- ,#{logo,jdbcType=VARCHAR}
- ,#{area,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= VARCHAR },
- </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>
- <if test="logo!=null">
- logo_=#{logo,jdbcType=VARCHAR},
- </if>
- <if test="area!=null">
- area_=#{area,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 where del_flag = 0
- </select>
- <select id="search" parameterType="hashmap" resultMap="CompanyMap">
- <![CDATA[
- select * from base_company
- ]]>
- <where>
- del_flag = 0
- <if test="searchParams.id != null">
- and ID_ like #{searchParams.id}
- </if>
- <if test="searchParams.name != null">
- and name_ like #{searchParams.name}
- </if>
- <if test="searchParams.scale != null">
- and scale_ = #{searchParams.scale}
- </if>
- <if test="searchParams.industry != null">
- and industry_ = #{searchParams.industry}
- </if>
- <if test="searchParams.isCertification != null">
- and is_certification = #{searchParams.isCertification}
- </if>
- <if test="searchParams.companyName != null">
- and name_ like #{searchParams.companyName}
- </if>
- </where>
- <foreach item="sort" collection="sortList" open="order by" separator=",">
- ${sort.name} ${sort.order}
- </foreach>
- </select>
- <select id="findByAll" resultMap="CompanyMap">
- select * from base_company where del_flag = 0
- and is_certification = 2
- order by sort_no
- </select>
- </mapper>
|