DatavMapper.xml
6.19 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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
<?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.glsk.mapper.DatavMapper">
<resultMap id="BaseResultMap" type="com.glsk.entity.MemberOrderMonthly">
<result column="stat_month" jdbcType="VARCHAR" property="statMonth" />
<result column="module_name" jdbcType="VARCHAR" property="moduleName" />
<result column="order_num" jdbcType="INTEGER" property="orderNum" />
<result column="price_monthly" jdbcType="DOUBLE" property="priceMonthly" />
<result column="aver_price_monthly" jdbcType="DOUBLE" property="averPriceMonthly" />
</resultMap>
<!-- 自定义SQL语句 -->
<select id="sqlBySelf" resultType="map" parameterType="java.lang.String" >
${_parameter}
</select>
<insert id="batchInsertOrUpdateStaffStaticData" parameterType="com.glsk.entity.StaffStaticData">
insert into business_analysis_staff(
stat_date,staff_id,staff_name,staff_phone,merchant_id,merchant_name,business_type,output,ordernum,
total_ordernum,to_store,aftersales_to_store,buynum,finishday,totalday,targetzhuanhualv,targetatv,targetstartday,targetendday,check_month_period,
daily_contribution_traffic,created_date
) values (
#{stat_date},#{staff_id},#{staff_name},#{staff_phone},#{merchant_id},#{merchant_name},#{business_type},#{output},#{ordernum},#{total_ordernum},
#{to_store},#{aftersales_to_store},#{buynum},#{finishday},#{totalday},#{targetzhuanhualv},#{targetatv},#{targetstartday},#{targetendday},
#{check_month_period},#{daily_contribution_traffic},#{created_date}
)
ON DUPLICATE KEY UPDATE
stat_date=#{stat_date},
staff_id=#{staff_id},
staff_name=#{staff_name},
staff_phone=#{staff_phone},
merchant_id=#{merchant_id},
merchant_name=#{merchant_name},
business_type=#{business_type},
output=#{output},
ordernum=#{ordernum},
total_ordernum=#{total_ordernum},
to_store=#{to_store},
aftersales_to_store=#{aftersales_to_store},
buynum=#{buynum},
finishday=#{finishday},
totalday=#{totalday},
targetzhuanhualv=#{targetzhuanhualv},
targetatv=#{targetatv},
targetstartday=#{targetstartday},
targetendday=#{targetendday},
check_month_period=#{check_month_period},
daily_contribution_traffic=#{daily_contribution_traffic},
created_date=#{created_date}
</insert>
<insert id="batchInsertOrUpdateMerchantStaticData" parameterType="com.glsk.entity.MerchantStaticData">
insert into business_analysis_overview(
stat_date,merchant_id,merchant_name,business_type,item_name,output,ordernum,
total_ordernum,to_store,aftersales_to_store,buynum,created_date
) values (
#{stat_date},#{merchant_id},#{merchant_name},#{business_type},#{item_name},#{output},#{ordernum},#{total_ordernum},
#{to_store},#{aftersales_to_store},#{buynum},#{created_date}
)
ON DUPLICATE KEY UPDATE
stat_date=#{stat_date},
merchant_id=#{merchant_id},
merchant_name=#{merchant_name},
business_type=#{business_type},
item_name=#{item_name},
output=#{output},
ordernum=#{ordernum},
total_ordernum=#{total_ordernum},
to_store=#{to_store},
aftersales_to_store=#{aftersales_to_store},
buynum=#{buynum},
created_date=#{created_date}
</insert>
<insert id="batchInsertOrUpdateMerchantStaticDatatmp" parameterType="com.glsk.entity.MerchantStaticData">
insert into business_analysis_overview_tmp(
stat_date,merchant_id,merchant_name,business_type,item_name,output,ordernum,
total_ordernum,to_store,aftersales_to_store,buynum,created_date
) values (
#{stat_date},#{merchant_id},#{merchant_name},#{business_type},#{item_name},#{output},#{ordernum},#{total_ordernum},
#{to_store},#{aftersales_to_store},#{buynum},#{created_date}
)
ON DUPLICATE KEY UPDATE
stat_date=#{stat_date},
merchant_id=#{merchant_id},
merchant_name=#{merchant_name},
business_type=#{business_type},
item_name=#{item_name},
output=#{output},
ordernum=#{ordernum},
total_ordernum=#{total_ordernum},
to_store=#{to_store},
aftersales_to_store=#{aftersales_to_store},
buynum=#{buynum},
created_date=#{created_date}
</insert>
<insert id="batchInsertOrUpdateEmployeeFlowData" parameterType="com.glsk.entity.EmployeeFlowData">
insert into business_analysis_employee_flow(
stat_date,staff_id,staff_name,staff_phone,merchant_id,merchant_name,business_type,ordernum,
total_ordernum,daily_contribution_traffic,created_date
) values (
#{stat_date},#{staff_id},#{staff_name},#{staff_phone},#{merchant_id},#{merchant_name},#{business_type},#{ordernum},
#{total_ordernum},#{daily_contribution_traffic},#{created_date}
)
ON DUPLICATE KEY UPDATE
stat_date=#{stat_date},
staff_id=#{staff_id},
staff_name=#{staff_name},
staff_phone=#{staff_phone},
merchant_id=#{merchant_id},
merchant_name=#{merchant_name},
business_type=#{business_type},
ordernum=#{ordernum},
total_ordernum=#{total_ordernum},
daily_contribution_traffic=#{daily_contribution_traffic},
created_date=#{created_date}
</insert>
<insert id="batchInsertOrUpdateStaffToStoreData" parameterType="com.glsk.entity.StaffToStoreData">
insert into business_analysis_staff_tostore(
stat_date,staff_id,merchant_id,business_type,to_store,aftersales_to_store,buynum,created_date
) values (
#{stat_date},#{staff_id},#{merchant_id},#{business_type},
#{to_store},#{aftersales_to_store},#{buynum},#{created_date}
)
ON DUPLICATE KEY UPDATE
stat_date=#{stat_date},
staff_id=#{staff_id},
merchant_id=#{merchant_id},
business_type=#{business_type},
to_store=#{to_store},
aftersales_to_store=#{aftersales_to_store},
buynum=#{buynum},
created_date=#{created_date}
</insert>
<insert id="batchInsertOrUpdateMerchantBuyNum" parameterType="com.glsk.entity.MerchantBuyNum">
insert into business_analysis_merchant_buynum(
stat_date,merchant_id,buynum,created_date
) values (
#{stat_date},#{merchant_id},#{buynum},#{created_date}
)
ON DUPLICATE KEY UPDATE
stat_date=#{stat_date},
merchant_id=#{merchant_id},
buynum=#{buynum},
created_date=#{created_date}
</insert>
</mapper>