blsm-vd-core 0.4.4 → 0.4.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/blsm-vd-core/model/order.rb +4 -0
- data/lib/blsm-vd-core/version.rb +1 -1
- data/lib/blsm-vd-core.rb +6 -6
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2b244c6be1d637b092eda8d78d28fc281de11de2
|
4
|
+
data.tar.gz: 2068c352a48048c956360c226a904b9a476b8a30
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2af23a1b25bc42921546232427f0c51d6da1fb7a5a7fdf16d63dcc8f104ac3b557e3f69a2a18c9c4462dde999afdb048553cca018fa0e447f9d08adbb08a7ebf
|
7
|
+
data.tar.gz: 2f7343108c0d48dc69d6cf96ea4bf0ed637f370f5c5a565973ff6b46135e8dd73c6c6d5c4718a5cb3d4bedc9498265625ce9d38c5519e9a3e5a0cdb9b93efe1a
|
data/Gemfile.lock
CHANGED
data/lib/blsm-vd-core/version.rb
CHANGED
data/lib/blsm-vd-core.rb
CHANGED
@@ -199,7 +199,7 @@ module BlsmVdCore
|
|
199
199
|
order_id: Order.encrypt(Order.encrypted_id_key, order.id.to_s),
|
200
200
|
score_change: leader_change,
|
201
201
|
money_change: (leader_change*VdUserScore::SCORES[:SCORE_TO_MONEY]).round(2),
|
202
|
-
content: "首趣黑带#{leader.username}
|
202
|
+
content: "首趣黑带#{leader.username},你好:你的队员【#{user.username}】已成功确认订单,"
|
203
203
|
} if leader && leader_info
|
204
204
|
BlsmMpWx.create_msg(nil, leader.openid, distribute_leader_notify, 'distribute') if distribute_leader_notify
|
205
205
|
|
@@ -231,7 +231,7 @@ module BlsmVdCore
|
|
231
231
|
end
|
232
232
|
|
233
233
|
#【积分获取】商品售卖出去
|
234
|
-
#
|
234
|
+
# 什么时候调用此方法合适?当订单的状态变更为‘客户签收,订单完成’时,标明商品已经被售出
|
235
235
|
#微店主的积分会根据商品总的供货价的
|
236
236
|
#商品卖出,微店主会获取直接的 订单供货价 * +SCORES[:SALE_OUT_DIRECT]+ 积分
|
237
237
|
# 微店主所属的队长(直接上级)获取 订单供货价 * +SCORES[:SALE_OUT_INDIRECT]+ 积分
|
@@ -265,8 +265,8 @@ module BlsmVdCore
|
|
265
265
|
leader_info.update_attributes({:score => leader_info.score.to_f+leader_change}) if leader_info
|
266
266
|
|
267
267
|
#积分变动通知
|
268
|
-
seller_notify = {touser: seller.openid, change: seller_change, total: seller_info.score, content: "
|
269
|
-
leader_notify = {touser: leader.openid, change: leader_change, total: leader_info.score, content: "
|
268
|
+
seller_notify = {touser: seller.openid, change: seller_change, total: seller_info.score, content: "您好,订单#{order.number}已成功签收,分销#{franchise_sum}元"}
|
269
|
+
leader_notify = {touser: leader.openid, change: leader_change, total: leader_info.score, content: "首趣黑带#{leader.username},你好,你的队员【#{seller.username}】订单#{order.number}已成功签收,分销#{franchise_sum}元"} if leader && leader_info
|
270
270
|
BlsmMpWx.create_msg(nil, seller.openid, seller_notify, 'score_change')
|
271
271
|
BlsmMpWx.create_msg(nil, leader.openid, leader_notify, 'score_change') if leader_notify
|
272
272
|
|
@@ -274,13 +274,13 @@ module BlsmVdCore
|
|
274
274
|
VdUserScore.create({
|
275
275
|
user_id: seller_id,
|
276
276
|
score: seller_change,
|
277
|
-
notes: "
|
277
|
+
notes: "订单#{order.number}已成功签收,分销#{franchise_sum}元",
|
278
278
|
score_type: vd_transaction
|
279
279
|
})
|
280
280
|
VdUserScore.create({
|
281
281
|
user_id: leader.id,
|
282
282
|
score: leader_change,
|
283
|
-
notes: "
|
283
|
+
notes: "队员【#{seller.username}】订单#{order.number}已成功签收,分销#{franchise_sum}元",
|
284
284
|
score_type: vd_transaction
|
285
285
|
}) if leader_info
|
286
286
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: blsm-vd-core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- saxer
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date: 2015-11-
|
12
|
+
date: 2015-11-27 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rspec
|