blsm-vd-core 0.9.2 → 0.9.3

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: 427cd30691c0218276e13181262d0b96a2a96d1c
4
- data.tar.gz: 854d9d01699b3a360d5fae2420b6bf3546941eff
3
+ metadata.gz: e98eb641aa23976d2ac0c83f891c60aecf6bf7d7
4
+ data.tar.gz: d7db0be65a906e47cac49324a87581158622a238
5
5
  SHA512:
6
- metadata.gz: 7efaf10dd359396f56e724ec3730be3880187c1ff919a5280512b725dd3160e9e0a0dfe41790ab139040b97dccd91a8b9e9bb86c305c29ce2519167a8bb3bdae
7
- data.tar.gz: aae4788bee5f234542c94f3ea080e804b1d6700ab5557d5d6e6f35994f737b31a9bae804a0c2db80d52d1a2b9decff860d99a6ed72a0318193903636cd7a4645
6
+ metadata.gz: 22847a680639a9c90606e5014a6c0f0805613c14a357e72b7dd60086b69e1036ca36de86dd54701c2701d3e076afff4c7c5f43a4ba9f1929306521ced6b868d2
7
+ data.tar.gz: b4444b0f20878991adb33053f7970da44dd5c6a4da713cd763b5cd6160b35c7d1f39c41fc58ac5bbd6ddc9ba9f356f4996081bf59a4058f57c82f613ab69c993
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- blsm-vd-core (0.9.2)
4
+ blsm-vd-core (0.9.3)
5
5
 
6
6
  GEM
7
7
  remote: https://ruby.taobao.org/
@@ -1,3 +1,3 @@
1
1
  module BlsmVdCore
2
- VERSION = "0.9.2"
2
+ VERSION = "0.9.3"
3
3
  end
data/lib/blsm-vd-core.rb CHANGED
@@ -508,6 +508,30 @@ module BlsmVdCore
508
508
  earn_amount: earn_amount
509
509
  })
510
510
  seller_info.update_attributes(:purchase_fee => (seller_info.purchase_fee - earn_amount))
511
+ #进货费变动记录
512
+ VdPurchaseFeeLog.create(:user_id=>seller.id,:purchase_fee=>-earn_amount,:description=>"订单完成,系统扣除",:admin_user_id=>3)
513
+ #通知用户
514
+ fee_content = "亲爱的店主#{seller.username}:订单已经签收成功,您的优店管家—店主信息—进货费#{franchise_price}元,抵扣#{earn_amount},时间#{Time.now.strftime("%F %H:%M:%S")}"
515
+ if !seller.rc_user.blank?
516
+ #融云通知
517
+ VdRcMsgNotify.create({
518
+ user_id: 3,
519
+ to_ids: seller.username,
520
+ title: "进货费变动提醒",
521
+ to_type: 'single',
522
+ msg_type: 'RC:TxtMsg',
523
+ content: fee_content
524
+ })
525
+ end
526
+ #微信公众号通知
527
+ VdMpMsg.create!({
528
+ app_id: BlsmMpWx.APP_ID,
529
+ openid: seller.openid,
530
+ content: fee_content,
531
+ msg_name: "custom",
532
+ template_msg: false,
533
+ status: 'none'
534
+ })
511
535
  end
512
536
 
513
537
  # 给邀请人奖励
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.9.2
4
+ version: 0.9.3
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: 2017-02-08 00:00:00.000000000 Z
12
+ date: 2017-02-10 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rspec