TdBAbnormalIncomeSMapper.xml
3.82 KB
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
<?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.TdBAbnormalIncomeSMapper">
<resultMap id="BaseResultMap" type="com.zteits.order.domain.TdBAbnormalIncome">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="abnormal_date" jdbcType="DATE" property="abnormalDate" />
<result column="pl_no" jdbcType="VARCHAR" property="plNo" />
<result column="pl_name" jdbcType="VARCHAR" property="plName" />
<result column="order_total_fee" jdbcType="BIGINT" property="orderTotalFee" />
<result column="order_payed_fee" jdbcType="BIGINT" property="orderPayedFee" />
<result column="order_escape_fee" jdbcType="BIGINT" property="orderEscapeFee" />
<result column="authorized_free_fee" jdbcType="BIGINT" property="authorizedFreeFee" />
<result column="authorized_free_num" jdbcType="INTEGER" property="authorizedFreeNum" />
<result column="hand_free_fee" jdbcType="BIGINT" property="handFreeFee" />
<result column="hand_free_num" jdbcType="INTEGER" property="handFreeNum" />
<result column="short_time_free_num" jdbcType="INTEGER" property="shortTimeFreeNum" />
<result column="white_list_free_num" jdbcType="INTEGER" property="whiteListFreeNum" />
<result column="data_state" jdbcType="INTEGER" property="dataState" />
<result column="create_emp_id" jdbcType="VARCHAR" property="createEmpId" />
<result column="create_emp_name" jdbcType="VARCHAR" property="createEmpName" />
<result column="create_date" jdbcType="TIMESTAMP" property="createDate" />
<result column="modfiy_emp_id" jdbcType="VARCHAR" property="modfiyEmpId" />
<result column="modfiy_emp_name" jdbcType="VARCHAR" property="modfiyEmpName" />
<result column="modfiy_date" jdbcType="TIMESTAMP" property="modfiyDate" />
<result column="remark" jdbcType="VARCHAR" property="remark" />
</resultMap>
<sql id="Base_Column_List">
id, abnormal_date, pl_no, pl_name, order_total_fee, order_payed_fee, order_escape_fee,
authorized_free_fee, authorized_free_num, hand_free_fee, hand_free_num, short_time_free_num,
white_list_free_num, data_state, create_emp_id, create_emp_name, create_date, modfiy_emp_id,
modfiy_emp_name, modfiy_date, remark
</sql>
<delete id="deleteAbnormalIncomeByTime" >
delete from td_b_abnormal_income
where pl_no=#{plNo} abnormal_date BETWEEN #{beginTime} and #{endTime}
</delete>
<insert id="batchInsertAbnormalIncome" >
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID()
</selectKey>
insert into td_b_abnormal_income (abnormal_date, pl_no, pl_name,
order_total_fee, order_payed_fee, order_escape_fee,
authorized_free_fee, authorized_free_num, hand_free_fee,
hand_free_num, short_time_free_num, white_list_free_num,
data_state, create_emp_id, create_emp_name,
create_date, modfiy_emp_id, modfiy_emp_name,
modfiy_date, remark)
values <foreach collection="list" item="item" separator=",">
(#{item.abnormalDate,jdbcType=DATE}, #{item.plNo,jdbcType=VARCHAR}, #{item.plName,jdbcType=VARCHAR},
#{item.orderTotalFee,jdbcType=BIGINT}, #{item.orderPayedFee,jdbcType=BIGINT}, #{item.orderEscapeFee,jdbcType=BIGINT},
#{item.authorizedFreeFee,jdbcType=BIGINT},
#{item.authorizedFreeNum,jdbcType=INTEGER}, #{item.handFreeFee,jdbcType=BIGINT}, #{item.handFreeNum,jdbcType=INTEGER},
#{item.shortTimeFreeNum,jdbcType=INTEGER}, #{item.whiteListFreeNum,jdbcType=INTEGER}, 1,
-1, -1, now(),-1, -1, now(),
#{item.remark,jdbcType=VARCHAR})
</foreach>
</insert>
</mapper>