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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ddc25d5bc15d686ab2a58a6ff6282e775079b4f4
4
- data.tar.gz: cf22d35da1070654dac313e72b2724fce6d7fd4e
3
+ metadata.gz: b7d234ba7e348a81c7e4f336d483f94c2e31c440
4
+ data.tar.gz: 4b8aab14b2c2326c108d79e2ff2f7f5f95f38603
5
5
  SHA512:
6
- metadata.gz: 78b7d20c1952dcaae111caf96d7758bb5a9523a851436b10c3645e91e34a0e0f2c221cda95feb169f8f7204aed33fa13587d31836a43c2af488b7add9663667e
7
- data.tar.gz: 38dbc54bf3e91639688797f892e6aea856b6e54c9ed7816117dbf912a701e7157f6ce00e2b1003be4dc8fa1d49cd3dc6a01c4ebf9d9daa26b92eac11662cc425
6
+ metadata.gz: fdb277c73ca1603237fa815e838946d04459c9b351fee9848807b111a488eadbee446028f48180b7956f06ee7759e18bf4926caad579bde44bd4f27a6dc2140e
7
+ data.tar.gz: b6ab4c4c29fb6d84ee72f42d8295e8ccc9e644a899d4db7a0732eb89b004fa7889bee81189a47e3addf317a297d013e503229b6cc2015b71334484527774dfac
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- blsm-vd-core (0.7.4)
4
+ blsm-vd-core (0.7.5)
5
5
 
6
6
  GEM
7
7
  remote: https://ruby.taobao.org/
@@ -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
@@ -1,3 +1,3 @@
1
1
  module BlsmVdCore
2
- VERSION = "0.7.4"
2
+ VERSION = "0.7.6"
3
3
  end
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
- on_order_sale_out(order.application.user_id, order_id) if order.application
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
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-07 00:00:00.000000000 Z
12
+ date: 2016-11-11 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rspec