eric_weixin 0.3.0 → 0.3.1

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: 4e06643833b5db46a39b5608626e49ac28492c9f
4
- data.tar.gz: 44f84ed184d053f6048266aad4b656c21f24f64a
3
+ metadata.gz: ce48f9412945bf98b5c5bc68fda84793b8c03799
4
+ data.tar.gz: 43ad31fb81824b2bf4ec7d7636bf6d262811de98
5
5
  SHA512:
6
- metadata.gz: ee04947763509c73525d8a87fdf30bbbea20cff05af608558727eeeae868879703f278d13f7dd68eac70a9799f673acbb93c95304e0df36c55d63002efe136c0
7
- data.tar.gz: 0761238ebac8ad3972c6c8033db5f04c58809ad41e4fe997b5547dd6536d9e7192880df1e72bfe448781c93fca7c59c395f174e825166b9deda09d1b21adfbec
6
+ metadata.gz: e177ab14e806a22b877a35a4b82d5ddb1b53b506ca1aac64f248d911e73b72f7dd9fefc8cde2de7f7714032278c7ed7e33fe341a58066c247ba4dee25174041b
7
+ data.tar.gz: 3863b957b56b3f9decf645827a32f8321e9f988ccc8ef59314d0ad4bf2829c69b00b53a007f14b7b65933987f66559403e8bdb8445c01c61592d12bf77d9233f
data/README.rdoc CHANGED
@@ -27,3 +27,23 @@
27
27
  * 图文管理: /eric_weixin/cms/weixin/news_datas
28
28
  * 图文素材管理: /eric_weixin/cms/weixin/article_datas
29
29
  * 链接管理: /eric_weixin/cms/weixin/url_encodes
30
+ * 微信小店订单设置 /eric_weixin/cms/weixin/xiaodian/orders
31
+
32
+
33
+ ===微信小店的初始化
34
+ * 首先对所经营的分类进行归类,并且把腾讯分类同步至数据库。为了避免分类过多,一般只同步自己行业的大类,大类编号请自查,如儿童玩具大类,食品类两类更新如下:
35
+
36
+ EricWeixin::Xiaodian::Category.import_all_categories '公众账号名称,参考 weixin_public_account表', ['538088633','538071212']
37
+ * 更新SKU信息
38
+
39
+ EricWeixin::Xiaodian::Category.update_sku_info '公众账号名称,参考 weixin_public_account表'
40
+ * 更新商品信息
41
+
42
+ EricWeixin::Xiaodian::Product.get_all_products '公众账号名称,参考 weixin_public_account表'
43
+ * 同步已有订单信息
44
+
45
+ EricWeixin::Xiaodian::Order.get_order_list_and_update nil, nil ,nil ,'公众账号名称,参考 weixin_public_account表'
46
+
47
+ *如果有新商品上架,则需要更新商品与SKU信息。 更新过程见商品列表页面,点击刷新按钮即可。由于接口调用限制,一天之内不要操作超过3次。
48
+
49
+
@@ -9,8 +9,8 @@ class EricWeixin::Xiaodian::Category < ActiveRecord::Base
9
9
  # 把所有的产品类型导入数据库。
10
10
  # public_account_name: 公众账号名称
11
11
  # parent_id: 分类腾讯id#
12
- # EricWeixin::Xiaodian::Category.import_all_categories 'rszx', 1
13
- # EricWeixin::Xiaodian::Category.import_all_categories 'rszx', ['538088633','538071212'], 1 # 玩具、模型等, 食品/茶叶/特产/滋补品
12
+
13
+ # EricWeixin::Xiaodian::Category.import_all_categories 'rszx', ['538088633','538071212'] # 玩具、模型等, 食品/茶叶/特产/滋补品
14
14
  def self.import_all_categories public_account_name, first_level_weixin_id = [], parent_id = 1
15
15
  EricWeixin::Xiaodian::Category.transaction do
16
16
  account = EricWeixin::PublicAccount.get_public_account_by_name public_account_name
@@ -32,7 +32,7 @@
32
32
  <% @orders.each do |order| %>
33
33
  <tr>
34
34
  <td style="word-break:break-all"><%= order.order_id %></td>
35
- <td style="word-break:break-all"><%= order.weixin_user.nickname %></td>
35
+ <td style="word-break:break-all"><%= order.weixin_user.nickname rescue '' %></td>
36
36
  <td style="word-break:break-all"><%= Time.at(order.order_create_time).strftime("%Y-%m-%d %H:%M:%S") %></td>
37
37
  <td style="word-break:break-all"><%= order.product.name %></td>
38
38
  <td style="word-break:break-all"><%= order.product_info %></td>
@@ -1,3 +1,3 @@
1
1
  module EricWeixin
2
- VERSION = "0.3.0"
2
+ VERSION = "0.3.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: eric_weixin
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - 刘晓琦