|
@@ -1,120 +1,126 @@
|
|
|
<?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">
|
|
|
+ "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
<!-- namespace必须指向DAO接口 -->
|
|
|
<mapper namespace="com.jpsoft.picc.modules.base.dao.TransactionRecordDAO">
|
|
|
- <resultMap id="TransactionRecordMap" type="com.jpsoft.picc.modules.base.entity.TransactionRecord">
|
|
|
- <id property="id" column="id_" />
|
|
|
- <result property="companyId" column="company_id" />
|
|
|
- <result property="transactionNumber" column="transaction_number" />
|
|
|
- <result property="amount" column="amount_" />
|
|
|
- <result property="orderNo" column="order_no" />
|
|
|
- <result property="paymentStatus" column="payment_status" />
|
|
|
- <result property="buyType" column="buy_type" />
|
|
|
- <result property="paymentTime" column="payment_time" />
|
|
|
- <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.TransactionRecord">
|
|
|
- <!--
|
|
|
- <selectKey resultType="java.lang.String" order="BEFORE" keyProperty="id">
|
|
|
- select sys_guid() from dual
|
|
|
- </selectKey>
|
|
|
- -->
|
|
|
- <![CDATA[
|
|
|
+ <resultMap id="TransactionRecordMap" type="com.jpsoft.picc.modules.base.entity.TransactionRecord">
|
|
|
+ <id property="id" column="id_"/>
|
|
|
+ <result property="companyId" column="company_id"/>
|
|
|
+ <result property="applicationId" column="application_id"/>
|
|
|
+ <result property="transactionNumber" column="transaction_number"/>
|
|
|
+ <result property="amount" column="amount_"/>
|
|
|
+ <result property="orderNo" column="order_no"/>
|
|
|
+ <result property="paymentStatus" column="payment_status"/>
|
|
|
+ <result property="buyType" column="buy_type"/>
|
|
|
+ <result property="paymentTime" column="payment_time"/>
|
|
|
+ <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.TransactionRecord">
|
|
|
+ <!--
|
|
|
+ <selectKey resultType="java.lang.String" order="BEFORE" keyProperty="id">
|
|
|
+ select sys_guid() from dual
|
|
|
+ </selectKey>
|
|
|
+ -->
|
|
|
+ <![CDATA[
|
|
|
insert into base_transaction_record
|
|
|
- (id_,company_id,transaction_number,amount_,order_no,payment_status,buy_type,payment_time,create_by,create_time,update_by,update_time,del_flag)
|
|
|
+ (id_,company_id,application_id,
|
|
|
+ transaction_number,amount_,order_no,payment_status,
|
|
|
+ buy_type,payment_time,create_by,create_time,update_by,update_time,del_flag)
|
|
|
values
|
|
|
(
|
|
|
-#{id,jdbcType=VARCHAR}
|
|
|
-,#{companyId,jdbcType=VARCHAR}
|
|
|
-,#{transactionNumber,jdbcType=VARCHAR}
|
|
|
-,#{amount,jdbcType= NUMERIC }
|
|
|
-,#{orderNo,jdbcType=VARCHAR}
|
|
|
-,#{paymentStatus,jdbcType=VARCHAR}
|
|
|
-,#{buyType,jdbcType=VARCHAR}
|
|
|
-,#{paymentTime,jdbcType= TIMESTAMP }
|
|
|
-,#{createBy,jdbcType=VARCHAR}
|
|
|
-,#{createTime,jdbcType= TIMESTAMP }
|
|
|
-,#{updateBy,jdbcType=VARCHAR}
|
|
|
-,#{updateTime,jdbcType= TIMESTAMP }
|
|
|
-,#{delFlag,jdbcType= NUMERIC }
|
|
|
+ #{id,jdbcType=VARCHAR}
|
|
|
+ ,#{companyId,jdbcType=VARCHAR}
|
|
|
+ ,#{applicationId,jdbcType=VARCHAR}
|
|
|
+ ,#{transactionNumber,jdbcType=VARCHAR}
|
|
|
+ ,#{amount,jdbcType= NUMERIC }
|
|
|
+ ,#{orderNo,jdbcType=VARCHAR}
|
|
|
+ ,#{paymentStatus,jdbcType=VARCHAR}
|
|
|
+ ,#{buyType,jdbcType=VARCHAR}
|
|
|
+ ,#{paymentTime,jdbcType= TIMESTAMP }
|
|
|
+ ,#{createBy,jdbcType=VARCHAR}
|
|
|
+ ,#{createTime,jdbcType= TIMESTAMP }
|
|
|
+ ,#{updateBy,jdbcType=VARCHAR}
|
|
|
+ ,#{updateTime,jdbcType= TIMESTAMP }
|
|
|
+ ,#{delFlag,jdbcType= NUMERIC }
|
|
|
)
|
|
|
]]>
|
|
|
- </insert>
|
|
|
- <delete id="delete" parameterType="string">
|
|
|
- delete from base_transaction_record where id_=#{id,jdbcType=VARCHAR}
|
|
|
- </delete>
|
|
|
- <update id="update" parameterType="com.jpsoft.picc.modules.base.entity.TransactionRecord">
|
|
|
- update base_transaction_record
|
|
|
- <set>
|
|
|
- <if test="companyId!=null">
|
|
|
- company_id=#{companyId,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="transactionNumber!=null">
|
|
|
- transaction_number=#{transactionNumber,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="amount!=null">
|
|
|
- amount_=#{amount,jdbcType= NUMERIC },
|
|
|
- </if>
|
|
|
- <if test="orderNo!=null">
|
|
|
- order_no=#{orderNo,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="paymentStatus!=null">
|
|
|
- payment_status=#{paymentStatus,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="buyType!=null">
|
|
|
- buy_type=#{buyType,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="paymentTime!=null">
|
|
|
- payment_time=#{paymentTime,jdbcType= TIMESTAMP },
|
|
|
- </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="TransactionRecordMap">
|
|
|
- select
|
|
|
-id_,company_id,transaction_number,amount_,order_no,payment_status,buy_type,payment_time,create_by,create_time,update_by,update_time,del_flag from base_transaction_record where id_=#{0}
|
|
|
- </select>
|
|
|
- <select id="exist" parameterType="string" resultType="int">
|
|
|
- select count(*) from base_transaction_record where id_=#{0}
|
|
|
- </select>
|
|
|
- <select id="list" resultMap="TransactionRecordMap">
|
|
|
- select * from base_transaction_record
|
|
|
- </select>
|
|
|
- <select id="search" parameterType="hashmap" resultMap="TransactionRecordMap">
|
|
|
- <![CDATA[
|
|
|
+ </insert>
|
|
|
+ <delete id="delete" parameterType="string">
|
|
|
+ delete from base_transaction_record where id_=#{id,jdbcType=VARCHAR}
|
|
|
+ </delete>
|
|
|
+ <update id="update" parameterType="com.jpsoft.picc.modules.base.entity.TransactionRecord">
|
|
|
+ update base_transaction_record
|
|
|
+ <set>
|
|
|
+ <if test="companyId!=null">
|
|
|
+ company_id=#{companyId,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="applicationId!=null">
|
|
|
+ application_id=#{applicationId,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="transactionNumber!=null">
|
|
|
+ transaction_number=#{transactionNumber,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="amount!=null">
|
|
|
+ amount_=#{amount,jdbcType= NUMERIC },
|
|
|
+ </if>
|
|
|
+ <if test="orderNo!=null">
|
|
|
+ order_no=#{orderNo,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="paymentStatus!=null">
|
|
|
+ payment_status=#{paymentStatus,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="buyType!=null">
|
|
|
+ buy_type=#{buyType,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="paymentTime!=null">
|
|
|
+ payment_time=#{paymentTime,jdbcType= TIMESTAMP },
|
|
|
+ </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="TransactionRecordMap">
|
|
|
+ select * from base_transaction_record where id_=#{0}
|
|
|
+ </select>
|
|
|
+ <select id="exist" parameterType="string" resultType="int">
|
|
|
+ select count(*) from base_transaction_record where id_=#{0}
|
|
|
+ </select>
|
|
|
+ <select id="list" resultMap="TransactionRecordMap">
|
|
|
+ select * from base_transaction_record
|
|
|
+ </select>
|
|
|
+ <select id="search" parameterType="hashmap" resultMap="TransactionRecordMap">
|
|
|
+ <![CDATA[
|
|
|
select * from base_transaction_record
|
|
|
]]>
|
|
|
- <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>
|
|
|
+ <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>
|
|
|
|
|
|
- <select id="getByOrderNo" resultMap="TransactionRecordMap">
|
|
|
- select * from base_transaction_record where order_no = #{0}
|
|
|
- </select>
|
|
|
+ <select id="getByOrderNo" resultMap="TransactionRecordMap">
|
|
|
+ select * from base_transaction_record where order_no = #{0}
|
|
|
+ </select>
|
|
|
</mapper>
|