Skip to content

Commit 8423e1f

Browse files
committed
Merge branch 'develop'
2 parents fd0ef07 + c8a28f0 commit 8423e1f

File tree

13 files changed

+1132
-41
lines changed

13 files changed

+1132
-41
lines changed

.bumpversion.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[bumpversion]
2-
current_version = 1.3.0
2+
current_version = 1.4.0
33
commit = True
44
tag = True
55

.travis.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@ matrix:
55
include:
66
- env:
77
- PYTHON_MAJOR="py34|py35"
8-
- PYTHON_VERSION="3.5.2 3.4.5"
8+
- PYTHON_VERSION="3.5.5 3.4.8"
99
- env:
1010
- PYTHON_MAJOR="py36"
11-
- PYTHON_VERSION="3.6.2"
11+
- PYTHON_VERSION="3.6.5"
1212
- env:
1313
- PYTHON_MAJOR=py2
14-
- PYTHON_VERSION="2.7.12"
14+
- PYTHON_VERSION="2.7.14"
1515
- env:
1616
- PYTHON_MAJOR=pypy
1717
- PYTHON_VERSION="pypy2.7-5.10.0"

README.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ WeRoBot
1414
:target: https://jq.qq.com/?_wv=1027&k=449sXsV
1515

1616

17-
.. image:: http://werobot-slack.whtsky.com/badge.svg
18-
:target: http://werobot-slack.whtsky.com
17+
.. image:: https://werobot-slackin.herokuapp.com/badge.svg
18+
:target: https://werobot-slackin.herokuapp.com
1919

2020
WeRoBot 是一个微信公众号开发框架,采用MIT协议发布。
2121

docs/changelog.rst

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,22 @@
11
Changelog
22
=============
33

4+
Version 1.4.0
5+
----------------
6+
+ 增加 :class:`werobot.messages.events.CardPassCheckEvent`
7+
+ 增加 :class:`werobot.messages.events.CardNotPassCheckEvent`
8+
+ 增加 :class:`werobot.messages.events.UserGetCardEvent`
9+
+ 增加 :class:`werobot.messages.events.UserGiftingCardEvent`
10+
+ 增加 :class:`werobot.messages.events.UserDelCardEvent`
11+
+ 增加 :class:`werobot.messages.events.UserConsumeCardEvent`
12+
+ 增加 :class:`werobot.messages.events.UserPayFromPayCellEvent`
13+
+ 增加 :class:`werobot.messages.events.UserViewCardEvent`
14+
+ 增加 :class:`werobot.messages.events.UserEnterSessionFromCardEvent`
15+
+ 增加 :class:`werobot.messages.events.UpdateMemberCardEvent`
16+
+ 增加 :class:`werobot.messages.events.CardSkuRemindEvent`
17+
+ 增加 :class:`werobot.messages.events.CardPayOrderEvent`
18+
+ 增加 :class:`werobot.messages.events.SubmitMembercardUserInfoEvent`
19+
420
Version 1.3.0
521
----------------
622
+ 增加 :class:`werobot.messages.events.UserScanProductEvent`

docs/deploy.rst

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,10 +101,11 @@ server 支持以下几种:
101101
配置文件样例: ::
102102

103103
[program:wechat_robot]
104-
command = python /home/whtsky/robot.py
105-
user = whtsky
104+
command = python /home/<username>/robot.py
105+
user = <username>
106106
redirect_stderr = true
107-
stdout_logfile = /home/whtsky/logs/robot.log
107+
stdout_logfile = /home/<username>/logs/robot.log
108+
stdout_errfile = /home/<username>/logs/robot_error.log
108109

109110
使用 Nginx 进行反向代理
110111
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

docs/events.rst

Lines changed: 204 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,210 @@ result 审核结果。verify_ok表示审核通过,verify_not_pass表
251251
reason_msg 审核未通过的原因。
252252
============= ======================================================================
253253

254+
CardPassCheckEvent
255+
--------------------------------
256+
257+
生成的卡券通过审核时,微信推送的 Event。属性:
258+
259+
============= ======================================================================
260+
name value
261+
============= ======================================================================
262+
type 'card_pass_check_event'
263+
card_id 卡券 ID。
264+
refuse_reason 审核不通过原因。
265+
============= ======================================================================
266+
267+
CardNotPassCheckEvent
268+
--------------------------------
269+
270+
生成的卡券未通过审核时,微信推送的 Event。属性:
271+
272+
============= ======================================================================
273+
name value
274+
============= ======================================================================
275+
type 'card_not_pass_check_event'
276+
card_id 卡券 ID。
277+
refuse_reason 审核不通过原因。
278+
============= ======================================================================
279+
280+
UserGetCardEvent
281+
--------------------------------
282+
283+
用户在领取卡券时,微信推送的 Event。属性:
284+
285+
========================= ==============================================================================================
286+
name value
287+
========================= ==============================================================================================
288+
type 'user_get_card_event'
289+
card_id 卡券 ID。
290+
user_card_code code 序列号。
291+
is_give_by_friend 是否为转赠领取,1 代表是,0 代表否。
292+
friend_user_name 当 is_give_by_friend 为 1 时填入的字段,表示发起转赠用户的 openid。
293+
outer_id 未知。
294+
old_user_card_code 为保证安全,微信会在转赠发生后变更该卡券的 code 号,该字段表示转赠前的 code。
295+
outer_str 领取场景值,用于领取渠道数据统计。可在生成二维码接口及添加 Addcard 接口中自定义该字段的字符串值。
296+
is_restore_member_card 用户删除会员卡后可重新找回,当用户本次操作为找回时,该值为 1,否则为 0。
297+
is_recommend_by_friend 未知。
298+
========================= ==============================================================================================
299+
300+
UserGiftingCardEvent
301+
--------------------------------
302+
303+
用户在转赠卡券时,微信推送的 Event。属性:
304+
305+
========================= ==============================================================================================
306+
name value
307+
========================= ==============================================================================================
308+
type 'user_gifting_card_event'
309+
card_id 卡券 ID。
310+
user_card_code code 序列号。
311+
friend_user_name 接收卡券用户的openid。
312+
is_return_back 是否转赠退回,0 代表不是,1 代表是。
313+
is_chat_room 是否是群转赠。
314+
========================= ==============================================================================================
315+
316+
UserDelCardEvent
317+
--------------------------------
318+
319+
用户在删除卡券时,微信推送的 Event。属性:
320+
321+
========================= ==============================================================================================
322+
name value
323+
========================= ==============================================================================================
324+
type 'user_del_card_event'
325+
card_id 卡券 ID。
326+
user_card_code code 序列号。自定义 code 及非自定义 code 的卡券被领取后都支持事件推送。
327+
========================= ==============================================================================================
328+
329+
UserConsumeCardEvent
330+
--------------------------------
331+
332+
卡券被核销时,微信推送的 Event。属性:
333+
334+
========================= ==============================================================================================
335+
name value
336+
========================= ==============================================================================================
337+
type 'user_consume_card_event'
338+
card_id 卡券 ID。
339+
user_card_code code 序列号。
340+
consume_source 核销来源。
341+
location_name 门店名称,当前卡券核销的门店名称(只有通过自助核销和买单核销时才会出现该字段)。
342+
staff_open_id 核销该卡券核销员的 openid(只有通过卡券商户助手核销时才会出现)。
343+
verify_code 自助核销时,用户输入的验证码。
344+
remark_amount 自助核销时 ,用户输入的备注金额。
345+
outer_str 开发者发起核销时传入的自定义参数,用于进行核销渠道统计。
346+
========================= ==============================================================================================
347+
348+
UserPayFromPayCellEvent
349+
--------------------------------
350+
351+
用户微信买单完成时,微信推送的 Event。属性:
352+
353+
========================= ==============================================================================================
354+
name value
355+
========================= ==============================================================================================
356+
type 'user_pay_from_pay_cell_event'
357+
card_id 卡券 ID。
358+
user_card_code code 序列号。
359+
trans_id 微信支付交易订单号(只有使用买单功能核销的卡券才会出现)。
360+
location_id 门店 ID,当前卡券核销的门店 ID(只有通过卡券商户助手和买单核销时才会出现)。
361+
fee 实付金额,单位为分。
362+
original_fee 应付金额,单位为分。
363+
========================= ==============================================================================================
364+
365+
UserViewCardEvent
366+
--------------------------------
367+
368+
用户在进入会员卡时,微信推送的 Event。属性:
369+
370+
========================= ==============================================================================================
371+
name value
372+
========================= ==============================================================================================
373+
type 'user_view_card_event'
374+
card_id 卡券 ID。
375+
user_card_code code 序列号。
376+
outer_str 商户自定义二维码渠道参数,用于标识本次扫码打开会员卡来源来自于某个渠道值的二维码。
377+
========================= ==============================================================================================
378+
379+
UserEnterSessionFromCardEvent
380+
--------------------------------
381+
382+
用户在卡券里点击查看公众号进入会话时(需要用户已经关注公众号),微信推送的 Event。属性:
383+
384+
========================= ==============================================================================================
385+
name value
386+
========================= ==============================================================================================
387+
type 'user_enter_session_from_card_event'
388+
card_id 卡券 ID。
389+
user_card_code code 序列号。
390+
========================= ==============================================================================================
391+
392+
UpdateMemberCardEvent
393+
--------------------------------
394+
395+
用户的会员卡积分余额发生变动时,微信推送的 Event。属性:
396+
397+
========================= ==============================================================================================
398+
name value
399+
========================= ==============================================================================================
400+
type 'update_member_card_event'
401+
card_id 卡券 ID。
402+
user_card_code code 序列号。
403+
modify_bonus 变动的积分值。
404+
modify_balance 变动的余额值。
405+
========================= ==============================================================================================
406+
407+
CardSkuRemindEvent
408+
--------------------------------
409+
410+
当某个card_id的初始库存数大于200且当前库存小于等于100时,用户尝试领券,微信推送的 Event。属性:
411+
412+
========================= ==============================================================================================
413+
name value
414+
========================= ==============================================================================================
415+
type 'card_sku_remind_event'
416+
card_id 卡券 ID。
417+
detail 报警详细信息。
418+
========================= ==============================================================================================
419+
420+
CardPayOrderEvent
421+
--------------------------------
422+
423+
用户的会员卡积分余额发生变动时,微信推送的 Event。属性:
424+
425+
========================= ==============================================================================================
426+
name value
427+
========================= ==============================================================================================
428+
type 'card_pay_order_event'
429+
card_id 卡券 ID。
430+
user_card_code code 序列号。
431+
order_id 本次推送对应的订单号。
432+
status 本次订单号的状态。
433+
create_order_time 购买券点时,支付二维码的生成时间。
434+
pay_finish_time 购买券点时,实际支付成功的时间。
435+
desc 支付方式,一般为微信支付充值。
436+
free_coin_count 剩余免费券点数量。
437+
pay_coin_count 剩余付费券点数量。
438+
refund_free_coin_count 本次变动的免费券点数量。
439+
refund_pay_coin_count 本次变动的付费券点数量
440+
order_type 所要拉取的订单类型。
441+
memo 系统备注,说明此次变动的缘由,如开通账户奖励、门店奖励、核销奖励以及充值、扣减。
442+
receipt_info 所开发票的详情。
443+
========================= ==============================================================================================
444+
445+
SubmitMembercardUserInfoEvent
446+
--------------------------------
447+
448+
用户通过一键激活的方式提交信息并点击激活或者用户修改会员卡信息时,微信推送的 Event。属性:
449+
450+
========================= ==============================================================================================
451+
name value
452+
========================= ==============================================================================================
453+
type 'submit_membercard_user_info_event'
454+
card_id 卡券 ID。
455+
user_card_code code 序列号。
456+
========================= ==============================================================================================
457+
254458
UnknownEvent
255459
------------
256460

0 commit comments

Comments
 (0)