Blame view

parking-module-order/src/main/resources/mybatis/mapper/smapper/TdBPayBlncacAbcSMapper.xml 3.89 KB
55f68655   王彪总   新项目
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
  <?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">
  <mapper namespace="com.zteits.order.mapper.smapper.TdBPayBlncacAbcSmapper">
    <resultMap id="BaseResultMap" type="com.zteits.order.domain.TdBPayBlncacAbc">
      <id column="id" jdbcType="BIGINT" property="id" />
      <result column="bill_date" jdbcType="DATE" property="billDate" />
      <result column="app_id" jdbcType="VARCHAR" property="appId" />
      <result column="transaction_id" jdbcType="VARCHAR" property="transactionId" />
      <result column="pay_order_id" jdbcType="VARCHAR" property="payOrderId" />
      <result column="busi_type" jdbcType="INTEGER" property="busiType" />
      <result column="busi_type_name" jdbcType="VARCHAR" property="busiTypeName" />
      <result column="bank_order_id" jdbcType="VARCHAR" property="bankOrderId" />
      <result column="trade_time" jdbcType="TIMESTAMP" property="tradeTime" />
      <result column="order_fee" jdbcType="BIGINT" property="orderFee" />
      <result column="actual_fee" jdbcType="BIGINT" property="actualFee" />
      <result column="serve_fee" jdbcType="BIGINT" property="serveFee" />
      <result column="rebate_fee" jdbcType="BIGINT" property="rebateFee" />
      <result column="stage_fee" jdbcType="BIGINT" property="stageFee" />
      <result column="org_id" jdbcType="BIGINT" property="orgId" />
      <result column="remark" jdbcType="VARCHAR" property="remark" />
      <result column="data_state" jdbcType="INTEGER" property="dataState" />
      <result column="create_emp_id" jdbcType="VARCHAR" property="createEmpId" />
      <result column="create_date" jdbcType="TIMESTAMP" property="createDate" />
      <result column="modify_emp_id" jdbcType="VARCHAR" property="modifyEmpId" />
      <result column="modify_date" jdbcType="TIMESTAMP" property="modifyDate" />
    </resultMap>
    <sql id="Base_Column_List">
      id, bill_date, app_id, transaction_id, pay_order_id, busi_type, busi_type_name, bank_order_id, 
      trade_time, order_fee, actual_fee, serve_fee, rebate_fee, stage_fee, org_id, remark,
      data_state, create_emp_id, create_date, modify_emp_id, modify_date
    </sql>
    <insert id="batchInsertPayBlncac" parameterType="com.zteits.order.domain.TdBPayBlncacAbc">
      <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
        SELECT LAST_INSERT_ID()
      </selectKey>
      insert into td_b_pay_blncac_abc (bill_date, app_id, transaction_id, 
        pay_order_id, busi_type, busi_type_name, 
        bank_order_id, trade_time, order_fee, actual_fee, serve_fee, rebate_fee, stage_fee,
        org_id, remark, data_state, 
        create_emp_id, create_date, modify_emp_id, 
        modify_date)
      values
      <foreach collection="list" item="item" index="index" separator=",">
       (#{item.billDate,jdbcType=DATE}, #{item.appId,jdbcType=VARCHAR}, #{item.transactionId,jdbcType=VARCHAR},
        #{item.payOrderId,jdbcType=VARCHAR}, #{item.busiType,jdbcType=INTEGER}, #{item.busiTypeName,jdbcType=VARCHAR},
        #{item.bankOrderId,jdbcType=VARCHAR}, #{item.tradeTime,jdbcType=TIMESTAMP}, #{item.orderFee,jdbcType=BIGINT},
        #{item.actualFee,jdbcType=BIGINT}, #{item.serveFee,jdbcType=BIGINT}, #{item.rebateFee,jdbcType=BIGINT},
        #{item.stageFee,jdbcType=BIGINT},
        #{item.orgId,jdbcType=BIGINT}, #{item.remark,jdbcType=VARCHAR}, #{item.dataState,jdbcType=INTEGER},
        #{item.createEmpId,jdbcType=VARCHAR}, #{item.createDate,jdbcType=TIMESTAMP}, #{item.modifyEmpId,jdbcType=VARCHAR},
        #{item.modifyDate,jdbcType=TIMESTAMP})
      </foreach>
    </insert>
  
    <!--查询农行对账单-->
    <select id="queryTdBPayBlncacAbcForList" resultMap="BaseResultMap">
      select
      <include refid="Base_Column_List" />
      from td_b_pay_blncac_abc
      where 1=1
      and data_state=1
      and busi_type = #{busiType}
      <![CDATA[and trade_time >= #{beginTime}]]>
      <![CDATA[and trade_time <= #{endTime}]]>
      and pay_order_id%#{threadNum}=#{modId}
  
    </select>
  </mapper>