event.php 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
  4. // +----------------------------------------------------------------------
  5. // | Copyright (c) 2016~2020 https://www.crmeb.com All rights reserved.
  6. // +----------------------------------------------------------------------
  7. // | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
  8. // +----------------------------------------------------------------------
  9. // | Author: CRMEB Team <admin@crmeb.com>
  10. // +----------------------------------------------------------------------
  11. // 事件定义文件
  12. return [
  13. 'bind' => [
  14. ],
  15. 'listen' => [
  16. 'AppInit' => [],
  17. 'HttpRun' => [],
  18. 'HttpEnd' => [\app\listener\system\http\HttpEnd::class], //HTTP请求结束回调事件
  19. 'LogLevel' => [],
  20. 'LogWrite' => [],
  21. //swoole 初始化事件
  22. 'swoole.init' => [
  23. \crmeb\listeners\InitSwooleLockListen::class, //初始化
  24. ],
  25. //swoole 启动事件
  26. 'swoole.workerStart' => [
  27. \crmeb\listeners\SwooleCronListen::class, //定时任务
  28. ],
  29. 'swoole.workerExit' => [],
  30. 'swoole.workerError' => [],
  31. 'swoole.workerStop' => [],
  32. 'swoole.shutDown' => [\crmeb\listeners\SwooleShutdownListen::class],//swoole 停止事件
  33. 'swoole.websocket.user' => [\app\webscoket\handler\UserHandler::class],//socket 用户调用事件
  34. 'swoole.websocket.admin' => [\app\webscoket\handler\AdminHandler::class],//socket 后台事件
  35. 'swoole.websocket.kefu' => [\app\webscoket\handler\KefuHandler::class],//socket 客服事件
  36. 'swoole.websocket.store' => [\app\webscoket\handler\StoreHandler::class],//socket 门店事件
  37. 'swoole.websocket.supplier' => [\app\webscoket\handler\SupplierHandler::class],//socket 供应商事件
  38. 'swoole.websocket.cashier' => [\app\webscoket\handler\CashierHandler::class],//socket 收银台事件
  39. //定时执行
  40. 'crontab' => file_exists(root_path() . "public/install/") && !file_exists(root_path() . "public/install/install.lock") ? [] : [
  41. \app\listener\system\timer\SystemTimer::class,
  42. ],
  43. 'user.register' => [\app\listener\user\Register::class], //用户注册事件
  44. 'user.cancelUser' => [\app\listener\user\CancelUser::class], //用户注销事件
  45. 'user.login' => [\app\listener\user\Login::class], //用户登录事件
  46. 'user.vipPay' => [\app\listener\user\VipUser::class], //用户购买VIP支付成功
  47. 'user.recharge' => [\app\listener\user\Recharge::class], //用户充值支付成功
  48. 'user.rechargeRefund' => [\app\listener\user\RechargeRefund::class], //用户充值退款成功
  49. 'user.extract' => [\app\listener\user\Extract::class], //用户申请提现
  50. 'user.work' => [\app\listener\user\UserBindWorkMember::class],
  51. 'user.create' => [\app\listener\user\CreateSuccess::class],//用户创建事件
  52. 'user.update' => [\app\listener\user\UpdateSuccess::class],//用户更新事件
  53. 'user.status' => [],//修改用户状态事件
  54. 'user.client' => [\app\listener\user\UserBindClient::class],//用户绑定企业微信客户
  55. 'user.member.update' => [\app\listener\user\MemberUpdateSuccess::class],//会员更新事件
  56. 'user.address.update' => [\app\listener\user\AddressUpdateSuccess::class],//修改用户状态事件
  57. 'user.activate.level' => [\app\listener\user\ActivateLevel::class],//用户激活会员卡
  58. 'pay.notify' => [\app\listener\pay\PayNotifyListener::class],//支付异步回调事件
  59. 'pay.scan.notify' => [\app\listener\pay\ScannedNotifyListener::class],//支付扫码异步回调
  60. 'pay.refunded.notify' => [\app\listener\pay\ScannedNotifyListener::class],//支付扫码异步回调
  61. 'cart.add' => [\app\listener\order\AddCart::class], //加入购物车事件
  62. 'order.create' => [\app\listener\order\Create::class], //订单创建事件
  63. 'order.price' => [\app\listener\order\PriceRevision::class], //订单改价格事件
  64. 'order.applyRefund' => [\app\listener\order\ApplyRefund::class], //订单退款申请事件
  65. 'order.refuseRefund' => [\app\listener\order\RefuseRefund::class], //订单拒绝退款申请事件
  66. 'order.refund' => [\app\listener\order\Refund::class], //订单退款事件
  67. 'order.pay' => [\app\listener\order\Pay::class], //订单支付事件
  68. 'order.delivery' => [\app\listener\order\Delivery::class], //订单发货事件
  69. 'order.take' => [\app\listener\order\Take::class], //订单收货事件
  70. 'order.comment' => [\app\listener\order\Comment::class], //订单评价事件
  71. 'order.cancel' => [\app\listener\order\Cancel::class], //订单取消删除事件
  72. 'order.writeoff' => [\app\listener\order\Writeoff::class], //订单核销事件
  73. 'order.routine.shipping' => [\app\listener\order\OrderShipping::class], //小程序发货信息事件
  74. 'notice.notice' => [\app\listener\notice\Notice::class], //通知->消息事件
  75. 'sms.sendAfter' => [\app\listener\notice\sms\SendAfterSuccess::class],//短信发送后事件
  76. 'admin.login' => [\app\listener\system\admin\LoginSuccess::class],//后台登录事件
  77. 'admin.logout' => [\app\listener\system\admin\LogoutSuccess::class],//后台退出事件
  78. 'diy.update' => [\app\listener\system\DiyUpdateSuccess::class],//DIY更新事件
  79. 'config.create' => [\app\listener\system\config\CreateSuccess::class],//创建配置事件
  80. 'config.delete' => [\app\listener\system\config\DeleteSuccess::class],//删除配置事件
  81. 'config.status' => [\app\listener\system\config\StatusSuccess::class],//删除配置事件
  82. 'product.create' => [\app\listener\product\CreateSuccess::class],//商品创建事件
  83. 'product.delete' => [\app\listener\product\DeleteSuccess::class],//商品删除事件
  84. 'product.status' => [\app\listener\product\StatusSuccess::class],//商品状态事件
  85. 'product.reply.update' => [\app\listener\product\ReplyUpdateSuccess::class],//个更新评论事件
  86. 'product.shipping.update' => [\app\listener\product\ShippingUpdateSuccess::class],//修改运费模板事件
  87. 'store.create' => [\app\listener\store\StoreSuccess::class],//创建门店事件
  88. 'store.delete' => [\app\listener\store\DeleteSuccess::class],//删除门店事件
  89. 'store.status' => [\app\listener\store\StatusSuccess::class],//门店状态事件
  90. 'supplier.verify' => [\app\listener\supplier\ApplyVerify::class],//供应商入驻审核事件
  91. 'supplier.create' => [\app\listener\supplier\SupplierSuccess::class],//创建供应商事件
  92. 'supplier.delete' => [\app\listener\supplier\DeleteSuccess::class],//删除供应商事件
  93. 'supplier.status' => [\app\listener\supplier\StatusSuccess::class],//供应商状态事件
  94. 'work.welcome' => [\app\listener\work\WelcomeSendListener::class],//企业微信欢迎语事件
  95. 'work.label' => [\app\listener\work\ClientLabelListener::class],//企业微信客户标签
  96. 'work.user' => [\app\listener\work\ClientBindUserListener::class],//企业微信客户绑定商城用户
  97. 'work.message' => [\app\listener\work\MessageSendListener::class],//企业微信应用消息发送
  98. ],
  99. 'subscribe' => [
  100. ],
  101. ];