DataCubeUploadLogMapper.xml
6.38 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
<?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="cn.com.glsx.entmicro.mapper.DataCubeUploadLogMapper">
<resultMap id="BaseResultMap" type="cn.com.glsx.entmicro.entity.DataCubeUploadLogDO">
<!--
WARNING - @mbg.generated
-->
<id column="id" jdbcType="INTEGER" property="id"/>
<result column="created_by" jdbcType="INTEGER" property="createdBy"/>
<result column="created_time" jdbcType="TIMESTAMP" property="createdTime"/>
<result column="updated_by" jdbcType="INTEGER" property="updatedBy"/>
<result column="updated_time" jdbcType="TIMESTAMP" property="updatedTime"/>
<result column="del_flag" jdbcType="TINYINT" property="delFlag"/>
<result column="file_name" jdbcType="VARCHAR" property="fileName"/>
<result column="file_url" jdbcType="VARCHAR" property="fileUrl"/>
<result column="merchant_id" jdbcType="INTEGER" property="merchantId"/>
<result column="batch_number" jdbcType="VARCHAR" property="batchNumber"/>
<result column="state" jdbcType="INTEGER" property="state"/>
<result column="business_type" jdbcType="INTEGER" property="businessType"/>
<result column="business_name" jdbcType="VARCHAR" property="businessName"/>
<result column="created_staff_id" jdbcType="INTEGER" property="createdStaffId"/>
<result column="remarks" jdbcType="VARCHAR" property="remarks"/>
<result column="follow_staff_id" jdbcType="VARCHAR" property="followStaffId"/>
<result column="rc_file_name" jdbcType="VARCHAR" property="rcFileName"/>
<result column="fail_data_url" jdbcType="VARCHAR" property="failDataUrl"/>
<result column="notice" jdbcType="TINYINT" property="notice"/>
<result column="process_name" jdbcType="VARCHAR" property="processName"/>
<result column="transaction_id" jdbcType="INTEGER" property="transactionId"/>
<result column="start_time" jdbcType="TIMESTAMP" property="startTime"/>
<result column="end_time" jdbcType="TIMESTAMP" property="endTime"/>
<result column="total_read_count" jdbcType="INTEGER" property="totalReadCount"/>
<result column="total_success_count" jdbcType="INTEGER" property="totalSuccessCount"/>
<result column="total_failed_count" jdbcType="INTEGER" property="totalFailedCount"/>
<result column="message" jdbcType="VARCHAR" property="message"/>
<result column="in_put_file" jdbcType="VARCHAR" property="inPutFile"/>
<result column="file_exist" jdbcType="INTEGER" property="fileExist"/>
<result column="key_value_check" jdbcType="INTEGER" property="keyValueCheck"/>
<result column="exception_info" jdbcType="VARCHAR" property="exceptionInfo"/>
<result column="file_size" jdbcType="INTEGER" property="fileSize"/>
</resultMap>
<resultMap id="DataCubeUploadLogResponseResultMap" type="cn.com.glsx.entmicro.model.response.DataCubeUploadLogResponse">
<result column="created_by" jdbcType="INTEGER" property="createdBy"/>
<result column="created_time" jdbcType="TIMESTAMP" property="createdTime"/>
<result column="file_name" jdbcType="VARCHAR" property="fileName"/>
<result column="batch_number" jdbcType="VARCHAR" property="batchNumber"/>
<result column="state" jdbcType="INTEGER" property="state"/>
<result column="remarks" jdbcType="VARCHAR" property="remarks"/>
<result column="total_read_count" jdbcType="INTEGER" property="totalReadCount"/>
<result column="total_success_count" jdbcType="INTEGER" property="totalSuccessCount"/>
<result column="total_failed_count" jdbcType="INTEGER" property="totalFailedCount"/>
<result column="message" jdbcType="VARCHAR" property="message"/>
<result column="fail_data_url" jdbcType="VARCHAR" property="failDataUrl"/>
<result column="created_Staff" jdbcType="VARCHAR" property="createdStaff"/>
<result column="key_value_check" jdbcType="INTEGER" property="keyValueCheck"/>
</resultMap>
<sql id="Base_Column_List">
<!--
WARNING - @mbg.generated
-->
id, created_by, created_time, updated_by, updated_time, del_flag, file_name, file_url, merchant_id, batch_number, state,
business_type, business_name, remarks, follow_staff_id, rc_file_name, process_name, transaction_id, start_time, end_time, total_read_count,
total_success_count, total_failed_count, message, in_put_file, file_exist, key_value_check, file_size
</sql>
<update id="updateDataCubeUploadLogBybatchNumber">
UPDATE `data_cube_file_upload_log` ul
<if test="logList != null and logList.size > 0">
<foreach collection="logList" item="item" index="index" open="" close="" separator=";">
SET ul.rc_file_name = #{item.rcFileName}
<if test="state != null">
, ul.state = #{item.state}
</if>
</foreach>
</if>
WHERE ul.merchant_id = #{merchantId}
<if test="batchNumber != null and batchNumber !=''">
AND batch_number = #{batchNumber}
</if>
</update>
<select id="selectDataCubeUploadLogByPage" resultMap="DataCubeUploadLogResponseResultMap">
SELECT ul.created_time, ul.file_name, ul.batch_number, ul.state, ul.remarks, ul.total_read_count, ul.total_success_count, ul.fail_data_url,
ul.total_failed_count, ul.message, ul.created_by
FROM data_cube_file_upload_log ul
WHERE ul.merchant_id = #{merchantId}
<if test="state != null">
AND ul.state = #{state}
</if>
<if test="startTime != null">
AND ul.created_time <![CDATA[>=]]> #{startTime,jdbcType=DATE}
</if>
<if test="endTime != null">
AND ul.created_time <![CDATA[<=]]> #{endTime,jdbcType=DATE}
</if>
order by ul.created_time desc
</select>
</mapper>