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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a8927909fedb3e3426a16fcf983ce22457b1c12b
4
- data.tar.gz: 9a7204665fdb30589b81c6bf17ca56539a1e2ecc
3
+ metadata.gz: 2b244c6be1d637b092eda8d78d28fc281de11de2
4
+ data.tar.gz: 2068c352a48048c956360c226a904b9a476b8a30
5
5
  SHA512:
6
- metadata.gz: f71a8e38bcf9662f1557223e9a83e79fdf20d28b01650e7d30f56b9a2e0e0def610fed2148b96263bff1af2be0dd92902580ddc9357ac5cdbe5ab3f5b9ca2463
7
- data.tar.gz: 880df049524b7228d0243265e13fd39d468cbc2d9661f30c1de5d508dede092079f851eb84daab42a07cdc841d3592d22334e7250e53c1bb756ca709facc39d2
6
+ metadata.gz: 2af23a1b25bc42921546232427f0c51d6da1fb7a5a7fdf16d63dcc8f104ac3b557e3f69a2a18c9c4462dde999afdb048553cca018fa0e447f9d08adbb08a7ebf
7
+ data.tar.gz: 2f7343108c0d48dc69d6cf96ea4bf0ed637f370f5c5a565973ff6b46135e8dd73c6c6d5c4718a5cb3d4bedc9498265625ce9d38c5519e9a3e5a0cdb9b93efe1a
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- blsm-vd-core (0.4.3)
4
+ blsm-vd-core (0.4.4)
5
5
 
6
6
  GEM
7
7
  remote: https://ruby.taobao.org/
@@ -29,6 +29,10 @@ module BlsmVdCore
29
29
  !(self.pay_off_line?)
30
30
  end
31
31
 
32
+ def number
33
+ created_at.to_i.to_s + (id * 2 + 19871030).to_s
34
+ end
35
+
32
36
  #加盟商(微店主)赚取的利润(直接利润)
33
37
  def jm_profit
34
38
  jm_cost = 0
@@ -1,3 +1,3 @@
1
1
  module BlsmVdCore
2
- VERSION = "0.4.4"
2
+ VERSION = "0.4.5"
3
3
  end
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},你好:成员【#{user.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: "分销#{franchise_sum}元,订单#{order_id}完成"}
269
- leader_notify = {touser: leader.openid, change: leader_change, total: leader_info.score, content: "成员【#{seller.username}】分销#{franchise_sum}元,订单#{order_id}完成"} if leader && leader_info
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: "分销#{franchise_sum}元,订单#{order_id}完成",
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: "成员【#{seller.username}】分销#{franchise_sum}元,订单#{order_id}完成",
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
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-18 00:00:00.000000000 Z
12
+ date: 2015-11-27 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rspec