新增事件消息
This commit is contained in:
29
catch/wechat/library/messages/events/Unsubscribe.php
Normal file
29
catch/wechat/library/messages/events/Unsubscribe.php
Normal file
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | CatchAdmin [Just Like ~ ]
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2017~2020 http://catchadmin.com All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | Licensed ( https://github.com/yanwenwu/catch-admin/blob/master/LICENSE.txt )
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: JaguarJack [ njphper@gmail.com ]
|
||||
// +----------------------------------------------------------------------
|
||||
namespace catchAdmin\wechat\library\messages\events;
|
||||
|
||||
use catchAdmin\wechat\library\messages\Message;
|
||||
use catchAdmin\wechat\model\WechatUsers;
|
||||
|
||||
/**
|
||||
* 取消订阅事件
|
||||
*
|
||||
* Class Unsubscribe
|
||||
* @package catchAdmin\wechat\library\messages\events
|
||||
*/
|
||||
class Unsubscribe extends Message
|
||||
{
|
||||
public function reply()
|
||||
{
|
||||
// TODO: Implement reply() method.
|
||||
WechatUsers::where('openid', $this->fromUserName())->find()->delete();
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user