| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465 |
- <?php
- /**
- * Created by PhpStorm.
- * Name: 芸众商城系统
- * Author: 广州市芸众信息科技有限公司
- * Profile: 广州市芸众信息科技有限公司位于国际商贸中心的广州,专注于移动电子商务生态系统打造,拥有芸众社交电商系统、区块链数字资产管理系统、供应链管理系统、电子合同等产品/服务。官网 :www.yunzmall.com www.yunzshop.com
- * Date: 2022/8/8
- * Time: 10:01
- */
- namespace business\common\notice;
- use business\common\models\MessageNotice;
- class BusinessShopNotice extends BusinessMessageNoticeBase
- {
- public function getPluginName()
- {
- return '商城基础';
- }
- public function getPlugin()
- {
- return 'shop';
- }
- public function create($data = [])
- {
- $this->saveNotice($data['user_ids'], $data['param'], $data['html']);
- }
- public function showBody()
- {
- $notice= $this->getMessageNotice();
- $body = [
- 'head' => $notice->param['head'],
- 'title' =>$notice->param['title'],
- 'content' => $notice->html?:'',
- 'notice_time'=> $notice->created_at ? $notice->created_at->format('Y-m-d H:i:s'): date('Y-m-d H:i:s', time()),
- ];
- return $body;
- }
- public function webSocketMessage(MessageNotice $notice)
- {
- $msg['jump_url'] = yzBusinessFullUrl('login');
- $msg['creator_name'] = $notice->getSendStaff()->name;
- $msg['notice_time'] = $notice->created_at ? $notice->created_at->format('Y-m-d H:i:s'): date('Y-m-d H:i:s', time());
- $msg['content'] = $notice['html'];
- $msg['type'] = 'shop';
- $msg['code'] = $this->getPlugin();
- return $msg;
- }
- public function getAllType()
- {
- return [];
- }
- }
|