blsm-vd-core 0.6.8 → 0.6.9

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: 4bbba240c6e96672ee38bfa3da3c664de0a80444
4
- data.tar.gz: 18526f60cba5e3b0c77d2e043a9d433c33aa87f3
3
+ metadata.gz: ad693fd9d47f9e810039d67e597981dfcb0234c1
4
+ data.tar.gz: ae0e966c7efbd5e712d47dfaeef7a520906d5a24
5
5
  SHA512:
6
- metadata.gz: a227abd61ff46e3a8266350e5dcefb30162313f5b881fce2a8681d7448df08db6770082a82966e573899f3596d326d5a6fd49015ac64e66f9467a6d0a1ce2555
7
- data.tar.gz: 4b671fb1bc598d98f2a84032d496762d0e3df35b8e118e41da6ba8f58c78baf0d23984312916dccb34a8e336df663654b2d6eb9bc62e9426a8d79c6b0dcb1410
6
+ metadata.gz: 96d6faf48800aa549ad251161c81547a01dbccee1e75debed813a8c7a243c05412bc2f62b37a8dc3bc4b936555daf817428a5ea1cb9e742096e9c4aac3940246
7
+ data.tar.gz: 016d63046ab6d9178755913fc0e3fcbd42f162af321eea76f7df6deb7d2288000d0d6942431d0fbf0a7698407458ad8a0b21c66b1b4cffcdb500a5b1bd3f2f72
data/Gemfile.lock CHANGED
@@ -34,7 +34,7 @@ GEM
34
34
  i18n (~> 0.6)
35
35
  multi_json (~> 1.0)
36
36
  arel (3.0.2)
37
- blsm-mp-wx (0.2.8)
37
+ blsm-mp-wx (0.3.2)
38
38
  builder (3.0.0)
39
39
  coderay (1.1.0)
40
40
  diff-lcs (1.2.5)
@@ -116,7 +116,7 @@ DEPENDENCIES
116
116
  activemodel (~> 3.2)
117
117
  activerecord (~> 3.2)
118
118
  activesupport (~> 3.2)
119
- blsm-mp-wx (~> 0.2.8)
119
+ blsm-mp-wx (~> 0.3.2)
120
120
  blsm-vd-core!
121
121
  bundler (~> 1.9)
122
122
  faraday (~> 0.9)
data/blsm-vd-core.gemspec CHANGED
@@ -37,6 +37,6 @@ Gem::Specification.new do |spec|
37
37
  spec.add_development_dependency "activerecord", "~> 3.2"
38
38
  spec.add_development_dependency "activesupport", "~> 3.2"
39
39
  spec.add_development_dependency "faraday", "~> 0.9"
40
- spec.add_development_dependency "blsm-mp-wx", "~> 0.2.8"
40
+ spec.add_development_dependency "blsm-mp-wx", "~> 0.3.2"
41
41
  spec.add_development_dependency "pry"
42
42
  end
@@ -1,3 +1,3 @@
1
1
  module BlsmVdCore
2
- VERSION = "0.6.8"
2
+ VERSION = "0.6.9"
3
3
  end
data/lib/blsm-vd-core.rb CHANGED
@@ -362,7 +362,7 @@ module BlsmVdCore
362
362
  order = Order.where(id: order_id).first
363
363
 
364
364
  return ERROR_CODES[4045] unless seller
365
- return ERROR_CODES[401] if !order || !order.application || !(order.application.user_id==seller_id)
365
+ return ERROR_CODES[401] if !order || !order.application
366
366
 
367
367
 
368
368
  return ERROR_CODES[0] unless order.clearing_items
@@ -386,16 +386,19 @@ module BlsmVdCore
386
386
  # seller_info = seller.create_vd_user_info
387
387
  # leader_info = leader && leader.is_vd_black? ? leader.create_vd_user_info : nil
388
388
 
389
+ content = "您的订单(编号#{order.number})客户先签收后又拒签。"
389
390
  VdUserScore.where(score_type: score_type_str).each do |score|
390
391
  score_change = -score.score
391
- if score.user && !order.ubox_order?
392
+ if score.user && !order.ubox_order? && score_change!=0
392
393
  score.user.create_vd_user_info.change_score(score_change)
393
- notify = {touser: score.user.openid, change: score_change, total: score.user.create_vd_user_info.score, content: "订单#{order_id}取消"}
394
+
395
+ content = "您的队员#{seller.username}的订单(订单编号#{order.number})客户先签收后又拒签。" if seller.id != score.user.id
396
+ notify = {touser: score.user.openid, change: score_change, total: score.user.create_vd_user_info.score, content: "变动原因:#{content}"}
394
397
  BlsmMpWx.create_msg(nil, score.user.openid, notify, 'score_change')
395
398
  VdUserScore.create({
396
399
  user_id: score.user_id,
397
400
  score: score_change,
398
- notes: "订单#{order.number}取消,积分扣取",
401
+ notes: content,
399
402
  score_type: vd_transaction
400
403
  })
401
404
  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.6.8
4
+ version: 0.6.9
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-08-16 00:00:00.000000000 Z
12
+ date: 2016-08-25 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rspec
@@ -143,14 +143,14 @@ dependencies:
143
143
  requirements:
144
144
  - - "~>"
145
145
  - !ruby/object:Gem::Version
146
- version: 0.2.8
146
+ version: 0.3.2
147
147
  type: :development
148
148
  prerelease: false
149
149
  version_requirements: !ruby/object:Gem::Requirement
150
150
  requirements:
151
151
  - - "~>"
152
152
  - !ruby/object:Gem::Version
153
- version: 0.2.8
153
+ version: 0.3.2
154
154
  - !ruby/object:Gem::Dependency
155
155
  name: pry
156
156
  requirement: !ruby/object:Gem::Requirement