blsm-vd-core 0.7.4 → 0.7.6
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 +4 -4
- data/Gemfile.lock +1 -1
- data/lib/blsm-vd-core/model/vd_rc_msg_notify.rb +19 -0
- data/lib/blsm-vd-core/version.rb +1 -1
- data/lib/blsm-vd-core.rb +7 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b7d234ba7e348a81c7e4f336d483f94c2e31c440
|
4
|
+
data.tar.gz: 4b8aab14b2c2326c108d79e2ff2f7f5f95f38603
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fdb277c73ca1603237fa815e838946d04459c9b351fee9848807b111a488eadbee446028f48180b7956f06ee7759e18bf4926caad579bde44bd4f27a6dc2140e
|
7
|
+
data.tar.gz: b6ab4c4c29fb6d84ee72f42d8295e8ccc9e644a899d4db7a0732eb89b004fa7889bee81189a47e3addf317a297d013e503229b6cc2015b71334484527774dfac
|
data/Gemfile.lock
CHANGED
@@ -258,5 +258,24 @@ module BlsmVdCore
|
|
258
258
|
})
|
259
259
|
|
260
260
|
end
|
261
|
+
|
262
|
+
#客户签收后,该怎么维护老客户?
|
263
|
+
def self.create_order_finish_notify(username)
|
264
|
+
vd_rc_msg = VdRcMsgNotify.where(:to_ids=>username,:title=>"维护客户提醒").where("left(created_at,10)='#{Time.now.strftime("%F")}'").first
|
265
|
+
if vd_rc_msg.blank? #每天最多发送一条
|
266
|
+
VdRcMsgNotify.create({user_id: 3,
|
267
|
+
to_ids: username,
|
268
|
+
title: "维护客户提醒",
|
269
|
+
to_type: 'single',
|
270
|
+
msg_type: 'CU:ImgTextMsg',
|
271
|
+
content: {
|
272
|
+
title: "维护客户提醒",
|
273
|
+
content: "客户签收后,该怎么维护老客户?",
|
274
|
+
imageUri: "http://image.yepcolor.com/images/20161110/11.png",
|
275
|
+
url: "http://shouqu360.cn/articles/f9e914902209c7f39595da5facbe75ce?ak=70cc889e",
|
276
|
+
extra: "维护客户提醒"
|
277
|
+
}.to_json})
|
278
|
+
end
|
279
|
+
end
|
261
280
|
end
|
262
281
|
end
|
data/lib/blsm-vd-core/version.rb
CHANGED
data/lib/blsm-vd-core.rb
CHANGED
@@ -78,8 +78,13 @@ module BlsmVdCore
|
|
78
78
|
if order.state.to_s.include?('客户签收,订单完成')
|
79
79
|
create_clearing_item(order_id) if order.ubox_order?
|
80
80
|
clearing_item = ClearingItem.where(order_id: order.id).first if order.ubox_order?
|
81
|
-
|
82
|
-
|
81
|
+
if order.application
|
82
|
+
on_order_sale_out(order.application.user_id, order_id)
|
83
|
+
#订单完成, 发送融云消息
|
84
|
+
if order.application.user
|
85
|
+
VdRcMsgNotify.create_order_finish_notify(order.application.user.username)
|
86
|
+
end
|
87
|
+
end
|
83
88
|
clearing_item.update_attributes({earn_amount: order.jm_profit, state: 'CASH_BACK'}) if clearing_item && order.pay_on_line?
|
84
89
|
return ERROR_CODES[200]
|
85
90
|
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.7.
|
4
|
+
version: 0.7.6
|
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-11-
|
12
|
+
date: 2016-11-11 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rspec
|