blsm-vd-core 0.7.8 → 0.8.0
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/clearing_item.rb +1 -1
- data/lib/blsm-vd-core/model/order.rb +1 -0
- data/lib/blsm-vd-core/model/shippingorder.rb +6 -0
- data/lib/blsm-vd-core/version.rb +1 -1
- data/lib/blsm-vd-core.rb +13 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a069ba05cde82b661959f01d83fe63f1b441189d
|
4
|
+
data.tar.gz: b0c79284b266fc27f7f6791bbce34f495ac6dbe0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 496bfa14705c081fe1cd753ba05da262555b623b038c93947a3cb07f0bcfc3a7700786f085e288fd0c7826d3a92ec7de863a3dce7d1f4eaf18d09ae707d1740e
|
7
|
+
data.tar.gz: be53804e26b9b2eb79e665e90cce1f141c87d774c8139f922d32279dcada6dd409b2e2cce5c8e44492517921bffce70e660bdf802619e91bab0e5dc89c2ffaec
|
data/Gemfile.lock
CHANGED
@@ -28,7 +28,7 @@ module BlsmVdCore
|
|
28
28
|
update_params[:notes] = note
|
29
29
|
update_params[:state] = 'CASH_BACK'
|
30
30
|
if self.order.toggle_delivery_deposit && self.order.pay_type.to_i==1
|
31
|
-
update_params[:real_amount] = self.
|
31
|
+
update_params[:real_amount] = self.express_service_fee - (self.earn_amount - self.order_amount) - reduce_real_amount
|
32
32
|
else
|
33
33
|
update_params[:real_amount] = self.express_service_fee - (self.earn_amount - self.order_amount + self.order.real_shipping_charge * 2) - reduce_real_amount
|
34
34
|
end
|
@@ -6,6 +6,7 @@ module BlsmVdCore
|
|
6
6
|
has_many :clearing_items, class_name: "::BlsmVdCore::ClearingItem"
|
7
7
|
has_many :line_items, class_name: "::BlsmVdCore::LineItem"
|
8
8
|
belongs_to :application, class_name: "::BlsmVdCore::Application", foreign_key: "application_id"
|
9
|
+
belongs_to :shippingorder, class_name: "::BlsmVdCore::Shippingorder", foreign_key: "shippingorder_id"
|
9
10
|
belongs_to :ubox_vm, class_name: "::BlsmVdCore::UboxVm", foreign_key: 'ubox_vmid', primary_key: 'ubox_vmid'
|
10
11
|
|
11
12
|
encrypted_id key: 'bYqILlFMZn3xd8Cy'
|
data/lib/blsm-vd-core/version.rb
CHANGED
data/lib/blsm-vd-core.rb
CHANGED
@@ -25,6 +25,7 @@ require 'blsm-vd-core/model/application'
|
|
25
25
|
require 'blsm-vd-core/model/setting'
|
26
26
|
require 'blsm-vd-core/model/recharge_spread'
|
27
27
|
require 'blsm-vd-core/model/user_spread'
|
28
|
+
require 'blsm-vd-core/model/shippingorder'
|
28
29
|
require 'faraday'
|
29
30
|
require 'blsm-mp-wx'
|
30
31
|
|
@@ -74,6 +75,18 @@ module BlsmVdCore
|
|
74
75
|
return on_order_canceled(order.application.user_id, order_id) if order.application
|
75
76
|
end
|
76
77
|
|
78
|
+
#订单被拒签=>创建shippingorder 拒签的记录
|
79
|
+
if order.state.to_s.include?('客户拒签,原件返回')
|
80
|
+
shippingorder = Shippingorder.where(:id=>order.shippingorder_id).first
|
81
|
+
if shippingorder.blank?
|
82
|
+
shippingorder = Shippingorder.create(:refuse_at=>Time.now)
|
83
|
+
order.update_attributes(:shippingorder_id=>shippingorder.id)
|
84
|
+
else
|
85
|
+
shippingorder.update_attributes(:refuse_at=>Time.now)
|
86
|
+
end
|
87
|
+
return
|
88
|
+
end
|
89
|
+
|
77
90
|
#在线支付(客户签收,订单完成)=>确认结算项
|
78
91
|
if order.state.to_s.include?('客户签收,订单完成')
|
79
92
|
create_clearing_item(order_id) if order.ubox_order?
|
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
|
+
version: 0.8.0
|
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-
|
12
|
+
date: 2016-12-05 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rspec
|
@@ -195,6 +195,7 @@ files:
|
|
195
195
|
- lib/blsm-vd-core/model/rc_user.rb
|
196
196
|
- lib/blsm-vd-core/model/recharge_spread.rb
|
197
197
|
- lib/blsm-vd-core/model/setting.rb
|
198
|
+
- lib/blsm-vd-core/model/shippingorder.rb
|
198
199
|
- lib/blsm-vd-core/model/ubox_vm.rb
|
199
200
|
- lib/blsm-vd-core/model/user.rb
|
200
201
|
- lib/blsm-vd-core/model/user_spread.rb
|