|
@@ -0,0 +1,130 @@
|
|
|
|
+<?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.CompanyInvoiceDAO">
|
|
|
|
+ <resultMap id="CompanyInvoiceMap" type="com.jpsoft.picc.modules.base.entity.CompanyInvoice">
|
|
|
|
+ <id property="id" column="id_" />
|
|
|
|
+ <result property="companyId" column="company_id" />
|
|
|
|
+ <result property="type" column="type_" />
|
|
|
|
+ <result property="title" column="title_" />
|
|
|
|
+ <result property="identifier" column="identifier_" />
|
|
|
|
+ <result property="bank" column="bank_" />
|
|
|
|
+ <result property="companyAccount" column="company_account" />
|
|
|
|
+ <result property="bankAccount" column="bank_account" />
|
|
|
|
+ <result property="address" column="address_" />
|
|
|
|
+ <result property="telephone" column="telephone_" />
|
|
|
|
+ <result property="delFlag" column="del_flag" />
|
|
|
|
+ <result property="createBy" column="create_by" />
|
|
|
|
+ <result property="createTime" column="create_time" />
|
|
|
|
+ <result property="updateBy" column="update_by" />
|
|
|
|
+ <result property="updateTime" column="update_time" />
|
|
|
|
+ </resultMap>
|
|
|
|
+ <insert id="insert" parameterType="com.jpsoft.picc.modules.base.entity.CompanyInvoice">
|
|
|
|
+ <!--
|
|
|
|
+ <selectKey resultType="java.lang.String" order="BEFORE" keyProperty="id">
|
|
|
|
+ select sys_guid() from dual
|
|
|
|
+ </selectKey>
|
|
|
|
+ -->
|
|
|
|
+ <![CDATA[
|
|
|
|
+ insert into base_company_invoice
|
|
|
|
+ (id_,company_id,type_,title_,identifier_,bank_,company_account,bank_account,address_,telephone_,del_flag,create_by,create_time,update_by,update_time)
|
|
|
|
+ values
|
|
|
|
+ (
|
|
|
|
+#{id,jdbcType=VARCHAR}
|
|
|
|
+,#{companyId,jdbcType=VARCHAR}
|
|
|
|
+,#{type,jdbcType=VARCHAR}
|
|
|
|
+,#{title,jdbcType=VARCHAR}
|
|
|
|
+,#{identifier,jdbcType=VARCHAR}
|
|
|
|
+,#{bank,jdbcType=VARCHAR}
|
|
|
|
+,#{companyAccount,jdbcType=VARCHAR}
|
|
|
|
+,#{bankAccount,jdbcType=VARCHAR}
|
|
|
|
+,#{address,jdbcType=VARCHAR}
|
|
|
|
+,#{telephone,jdbcType=VARCHAR}
|
|
|
|
+,#{delFlag,jdbcType= NUMERIC }
|
|
|
|
+,#{createBy,jdbcType=VARCHAR}
|
|
|
|
+,#{createTime,jdbcType= TIMESTAMP }
|
|
|
|
+,#{updateBy,jdbcType=VARCHAR}
|
|
|
|
+,#{updateTime,jdbcType= TIMESTAMP }
|
|
|
|
+ )
|
|
|
|
+ ]]>
|
|
|
|
+ </insert>
|
|
|
|
+ <delete id="delete" parameterType="string">
|
|
|
|
+ delete from base_company_invoice where id_=#{id,jdbcType=VARCHAR}
|
|
|
|
+ </delete>
|
|
|
|
+ <update id="update" parameterType="com.jpsoft.picc.modules.base.entity.CompanyInvoice">
|
|
|
|
+ update base_company_invoice
|
|
|
|
+ <set>
|
|
|
|
+ <if test="companyId!=null">
|
|
|
|
+ company_id=#{companyId,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="type!=null">
|
|
|
|
+ type_=#{type,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="title!=null">
|
|
|
|
+ title_=#{title,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="identifier!=null">
|
|
|
|
+ identifier_=#{identifier,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="bank!=null">
|
|
|
|
+ bank_=#{bank,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="companyAccount!=null">
|
|
|
|
+ company_account=#{companyAccount,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="bankAccount!=null">
|
|
|
|
+ bank_account=#{bankAccount,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="address!=null">
|
|
|
|
+ address_=#{address,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="telephone!=null">
|
|
|
|
+ telephone_=#{telephone,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="delFlag!=null">
|
|
|
|
+ del_flag=#{delFlag,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>
|
|
|
|
+ </set>
|
|
|
|
+ where id_=#{id}
|
|
|
|
+ </update>
|
|
|
|
+ <select id="get" parameterType="string" resultMap="CompanyInvoiceMap">
|
|
|
|
+ select
|
|
|
|
+id_,company_id,type_,title_,identifier_,bank_,company_account,bank_account,address_,telephone_,del_flag,create_by,create_time,update_by,update_time from base_company_invoice where id_=#{0}
|
|
|
|
+ </select>
|
|
|
|
+ <select id="getByCompanyId" parameterType="string" resultMap="CompanyInvoiceMap">
|
|
|
|
+ select id_,company_id,type_,title_,identifier_,bank_,company_account,bank_account,address_,telephone_,del_flag,create_by,create_time,update_by,update_time from base_company_invoice
|
|
|
|
+ where company_id=#{0}
|
|
|
|
+ </select>
|
|
|
|
+ <select id="exist" parameterType="string" resultType="int">
|
|
|
|
+ select count(*) from base_company_invoice where id_=#{0}
|
|
|
|
+ </select>
|
|
|
|
+ <select id="list" resultMap="CompanyInvoiceMap">
|
|
|
|
+ select * from base_company_invoice
|
|
|
|
+ </select>
|
|
|
|
+ <select id="search" parameterType="hashmap" resultMap="CompanyInvoiceMap">
|
|
|
|
+ <![CDATA[
|
|
|
|
+ select * from base_company_invoice
|
|
|
|
+ ]]>
|
|
|
|
+ <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>
|