blsm-vd-core 0.8.4 → 0.8.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e7130be1cdc31693a861144184b4119c7e0cd265
4
- data.tar.gz: f7cf471ff2952f47bbf407b16c1b1ef8d645c7a9
3
+ metadata.gz: 9a6ca83755f4b409ea01ad20fa9f28eddf85ed15
4
+ data.tar.gz: f06095e58ad16f130e75777575498b8abe3223a3
5
5
  SHA512:
6
- metadata.gz: b13103510916d0a89e6d7697ac5c6bd66c31ec9c06f1e32dcc541dc7fe28fa898136a7a47a5103dee5cc0216b21ff41bd8e6b6f6d33f5079e64a0df720117359
7
- data.tar.gz: 25178bf9c829ccd3e0b3419b59b7001278af208192a4d0a425b4851b77573ef0247cd21d5b20aa885aff5b909c08c836b3075dd8cd053ce6aa967c964d9246c9
6
+ metadata.gz: 6fe1872fa7ed143a7e66e3d6193a1184fda0e249c3d5c8ff48a44c12e7678608ddf447b0a4c11296d890226c94da359cef943448dabc764a90c5a679b3517d99
7
+ data.tar.gz: 56bf4c26a633de9829733e76393ee0ef8b4f326452f92ab66e7c7ff8b20a535e96a4b6d665480ac05a24ac65c4374ceff203e141c0030f8aaffa84fc019b2391
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- blsm-vd-core (0.8.4)
4
+ blsm-vd-core (0.8.5)
5
5
 
6
6
  GEM
7
7
  remote: https://ruby.taobao.org/
data/lib/blsm-vd-core.rb CHANGED
@@ -121,7 +121,7 @@ module BlsmVdCore
121
121
  inviter = User.where(:invication_code=>user.invicated_from).first if user.invicated_from
122
122
  vd_transaction = "inviter_#{order.id}_reward"
123
123
  #被邀请人,金牌店主以下,渠道邀请,邀请人不为空,一个订单只能有一个结算项
124
- if user.vd_user_info.level < 2 && user.create_vd_user_info.channel == "market_invite" && !inviter.blank? && !BlsmVdCore::VdInfoSec.dangerous?(vd_transaction)
124
+ if user.vd_user_info.distribute_sum < 1500 && user.create_vd_user_info.channel == "market_invite" && !inviter.blank? && !BlsmVdCore::VdInfoSec.dangerous?(vd_transaction)
125
125
 
126
126
  #发送给邀请人微信提醒
127
127
  content = "您邀请的店主 #{user.username}(注册电话号为#{user.phone})与#{Time.now.strftime("%Y-%m-%d %H:%M:%S")}成功成交一笔订单,订单金额为#{order.total_fee.to_f}元, 您将同步获取邀请奖励#{(order.total_fee.to_f * 0.1).round(2)}元,特此通知"
@@ -39,6 +39,12 @@ module BlsmVdCore
39
39
  #利润率,跟销售额有关系
40
40
  def profit_rate
41
41
  return 1 if level>=2
42
+ #兼容老店主
43
+ if self.created_at.to_s[0,10]<'2016-12-16'
44
+ return 0.5 if self.distribute_sum.to_f<750
45
+ return 0.7 if self.distribute_sum.to_f<1500
46
+ end
47
+
42
48
  vd_wx_pay = VdWxPay.where(:user_id=>self.user_id,:return_code=>'SUCCESS',:result_code=>'SUCCESS',:vd_service_id=>2).first
43
49
  #是否是交98元开店的店主
44
50
  if vd_wx_pay.blank?
@@ -1,3 +1,3 @@
1
1
  module BlsmVdCore
2
- VERSION = "0.8.4"
2
+ VERSION = "0.8.5"
3
3
  end
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.8.4
4
+ version: 0.8.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: 2016-12-15 00:00:00.000000000 Z
12
+ date: 2016-12-16 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rspec