blsm-vd-core 0.3.2 → 0.3.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/Gemfile.lock +1 -1
- data/lib/blsm-vd-core/version.rb +1 -1
- data/lib/blsm-vd-core.rb +16 -9
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
MWVhZTNmZTdmOWIyYzk1MjAzZmYwNmFmNTI1YTgxODM4NzYwNmE2Yw==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
NTMwMGM4NTY5ZTExNTFjNDExOGFlYWU1YTg0ZmIxNGZiMGVhMTEzOQ==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
OTAwOTUxOWY5MjJlMDBiNmE1MzU3OTI2NmUwYjBhZjYxMWFkYWVhMzc3NDI0
|
10
|
+
YzEzYTAxMmFkMTBjODZkYmY5ZTU1NjZiZTdhMGM4NTMyZTQ2YWRiOWE2OWJl
|
11
|
+
MGJjMTcxNzQ1N2FjZjIyN2YxNTVmYjkzNGE0MWVhYjk3NGMxODE=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
MjQ4NTkyNjk0MzlhZmEwZDY3M2ExOGEwODkzZWFhNzUzMzgzOTUyZThhNWJl
|
14
|
+
OTg0YTg1OGVhY2MxZGM5NzU1NWRlMDVjYWE1NGYxNmUwNGMxYzJmMjQxYjc1
|
15
|
+
MTg2ZDE1NTdkNzQxNTA3MGEzYmNmNjE3ZDQ5ODE4OGZhOGVjMzQ=
|
data/Gemfile.lock
CHANGED
data/lib/blsm-vd-core/version.rb
CHANGED
data/lib/blsm-vd-core.rb
CHANGED
@@ -162,7 +162,23 @@ module BlsmVdCore
|
|
162
162
|
data[:state] = 'CASH_BACK'
|
163
163
|
data[:real_amount] = order.total_fee
|
164
164
|
end
|
165
|
+
|
165
166
|
ClearingItem.new(data).save
|
167
|
+
|
168
|
+
|
169
|
+
leader = User.where("id in(select supervisor_id from vd_user_infos where user_id=#{user.id})").first
|
170
|
+
leader_info = leader.create_vd_user_info if leader
|
171
|
+
|
172
|
+
#订单确认提醒(黑带)
|
173
|
+
leader_change = order.franchise_sum.to_f*VdUserScore::SCORES[:SALE_OUT_INDIRECT]
|
174
|
+
distribute_leader_notify = {touser: leader.openid,
|
175
|
+
order_id: Order.encrypt(Order.encrypted_id_key, order.id.to_s),
|
176
|
+
score_change: leader_change,
|
177
|
+
money_change: leader_change*VdUserScore::SCORES[:SCORE_TO_MONEY],
|
178
|
+
content: "首趣黑带#{leader.username},你好:成员【#{user.username}】确认订单成功。"
|
179
|
+
} if leader && leader_info
|
180
|
+
BlsmMpWx.create_msg(nil, leader.openid, distribute_leader_notify, 'distribute') if distribute_leader_notify
|
181
|
+
|
166
182
|
return ERROR_CODES[200]
|
167
183
|
end
|
168
184
|
end
|
@@ -230,15 +246,6 @@ module BlsmVdCore
|
|
230
246
|
BlsmMpWx.create_msg(nil, seller.openid, seller_notify, 'score_change')
|
231
247
|
BlsmMpWx.create_msg(nil, leader.openid, leader_notify, 'score_change') if leader_notify
|
232
248
|
|
233
|
-
#订单确认提醒(黑带)
|
234
|
-
distribute_leader_notify = {touser: leader.openid,
|
235
|
-
order_id: Order.encrypt(Order.encrypted_id_key, order.id.to_s),
|
236
|
-
score_change: leader_change,
|
237
|
-
money_change: leader_change*VdUserScore::SCORES[:SCORE_TO_MONEY],
|
238
|
-
content: "首趣黑带#{leader.username},你好:成员【#{seller.username}】确认订单成功。"
|
239
|
-
} if leader && leader_info
|
240
|
-
BlsmMpWx.create_msg(nil, leader.openid, distribute_leader_notify, 'distribute') if distribute_leader_notify
|
241
|
-
|
242
249
|
#积分历史
|
243
250
|
VdUserScore.create({
|
244
251
|
user_id: seller_id,
|