mirror of
https://gitee.com/koogua/course-tencent-cloud.git
synced 2025-06-30 06:11:38 +08:00
优化通知
This commit is contained in:
parent
ce2329a71c
commit
fb5feb0759
@ -9,7 +9,6 @@ namespace App\Services\Logic\Notice\External;
|
||||
|
||||
use App\Models\Task as TaskModel;
|
||||
use App\Models\User as UserModel;
|
||||
use App\Repos\WeChatSubscribe as WeChatSubscribeRepo;
|
||||
use App\Services\Logic\Notice\External\WeChat\AccountLogin as WeChatAccountLoginNotice;
|
||||
use App\Services\Logic\Service as LogicService;
|
||||
use App\Traits\Client as ClientTrait;
|
||||
@ -23,19 +22,11 @@ class AccountLogin extends LogicService
|
||||
{
|
||||
$wechatNoticeEnabled = $this->wechatNoticeEnabled();
|
||||
|
||||
if (!$wechatNoticeEnabled) return;
|
||||
|
||||
$params = $task->item_info;
|
||||
|
||||
$userId = $task->item_info['user']['id'];
|
||||
|
||||
$subscribeRepo = new WeChatSubscribeRepo();
|
||||
|
||||
$subscribe = $subscribeRepo->findByUserId($userId);
|
||||
|
||||
if ($subscribe) {
|
||||
if ($wechatNoticeEnabled) {
|
||||
$notice = new WeChatAccountLoginNotice();
|
||||
$notice->handle($subscribe, $params);
|
||||
$notice->handle($params);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -12,7 +12,6 @@ use App\Models\Task as TaskModel;
|
||||
use App\Repos\Consult as ConsultRepo;
|
||||
use App\Repos\Course as CourseRepo;
|
||||
use App\Repos\User as UserRepo;
|
||||
use App\Repos\WeChatSubscribe as WeChatSubscribeRepo;
|
||||
use App\Services\Logic\Notice\External\Sms\ConsultReply as SmsConsultReplyNotice;
|
||||
use App\Services\Logic\Notice\External\WeChat\ConsultReply as WeChatConsultReplyNotice;
|
||||
use App\Services\Logic\Service as LogicService;
|
||||
@ -25,8 +24,6 @@ class ConsultReply extends LogicService
|
||||
$wechatNoticeEnabled = $this->wechatNoticeEnabled();
|
||||
$smsNoticeEnabled = $this->smsNoticeEnabled();
|
||||
|
||||
if (!$wechatNoticeEnabled && !$smsNoticeEnabled) return;
|
||||
|
||||
$consultId = $task->item_info['consult']['id'];
|
||||
|
||||
$consultRepo = new ConsultRepo();
|
||||
@ -65,18 +62,14 @@ class ConsultReply extends LogicService
|
||||
],
|
||||
];
|
||||
|
||||
$subscribeRepo = new WeChatSubscribeRepo();
|
||||
|
||||
$subscribe = $subscribeRepo->findByUserId($consult->owner_id);
|
||||
|
||||
if ($wechatNoticeEnabled && $subscribe) {
|
||||
if ($wechatNoticeEnabled) {
|
||||
$notice = new WeChatConsultReplyNotice();
|
||||
$notice->handle($subscribe, $params);
|
||||
$notice->handle($params);
|
||||
}
|
||||
|
||||
if ($smsNoticeEnabled) {
|
||||
$notice = new SmsConsultReplyNotice();
|
||||
$notice->handle($user, $params);
|
||||
$notice->handle($params);
|
||||
}
|
||||
}
|
||||
|
||||
|
16
app/Services/Logic/Notice/External/LiveBegin.php
vendored
16
app/Services/Logic/Notice/External/LiveBegin.php
vendored
@ -13,7 +13,6 @@ use App\Models\Task as TaskModel;
|
||||
use App\Repos\Chapter as ChapterRepo;
|
||||
use App\Repos\Course as CourseRepo;
|
||||
use App\Repos\User as UserRepo;
|
||||
use App\Repos\WeChatSubscribe as WeChatSubscribeRepo;
|
||||
use App\Services\Logic\Notice\External\Sms\LiveBegin as SmsLiveBeginNotice;
|
||||
use App\Services\Logic\Notice\External\WeChat\LiveBegin as WeChatLiveBeginNotice;
|
||||
use App\Services\Logic\Service as LogicService;
|
||||
@ -26,8 +25,6 @@ class LiveBegin extends LogicService
|
||||
$wechatNoticeEnabled = $this->wechatNoticeEnabled();
|
||||
$smsNoticeEnabled = $this->smsNoticeEnabled();
|
||||
|
||||
if (!$wechatNoticeEnabled && !$smsNoticeEnabled) return;
|
||||
|
||||
$courseUser = $task->item_info['course_user'];
|
||||
$chapterId = $task->item_info['chapter']['id'];
|
||||
|
||||
@ -60,21 +57,16 @@ class LiveBegin extends LogicService
|
||||
'start_time' => $chapter->attrs['start_time'],
|
||||
'end_time' => $chapter->attrs['end_time'],
|
||||
],
|
||||
'course_user' => $courseUser,
|
||||
];
|
||||
|
||||
$subscribeRepo = new WeChatSubscribeRepo();
|
||||
|
||||
$subscribe = $subscribeRepo->findByUserId($user->id);
|
||||
|
||||
if ($wechatNoticeEnabled && $subscribe) {
|
||||
if ($wechatNoticeEnabled) {
|
||||
$notice = new WeChatLiveBeginNotice();
|
||||
$notice->handle($subscribe, $params);
|
||||
$notice->handle($params);
|
||||
}
|
||||
|
||||
if ($smsNoticeEnabled) {
|
||||
$notice = new SmsLiveBeginNotice();
|
||||
$notice->handle($user, $params);
|
||||
$notice->handle($params);
|
||||
}
|
||||
}
|
||||
|
||||
@ -91,8 +83,6 @@ class LiveBegin extends LogicService
|
||||
'course_user' => [
|
||||
'course_id' => $courseUser->course_id,
|
||||
'user_id' => $courseUser->user_id,
|
||||
'role_type' => $courseUser->role_type,
|
||||
'source_type' => $courseUser->role_type,
|
||||
],
|
||||
'chapter' => [
|
||||
'id' => $chapter->id,
|
||||
|
@ -11,7 +11,6 @@ use App\Models\Order as OrderModel;
|
||||
use App\Models\Task as TaskModel;
|
||||
use App\Repos\Order as OrderRepo;
|
||||
use App\Repos\User as UserRepo;
|
||||
use App\Repos\WeChatSubscribe as WeChatSubscribeRepo;
|
||||
use App\Services\Logic\Notice\External\Sms\OrderFinish as SmsOrderFinishNotice;
|
||||
use App\Services\Logic\Notice\External\WeChat\OrderFinish as WeChatOrderFinishNotice;
|
||||
use App\Services\Logic\Service as LogicService;
|
||||
@ -24,8 +23,6 @@ class OrderFinish extends LogicService
|
||||
$wechatNoticeEnabled = $this->wechatNoticeEnabled();
|
||||
$smsNoticeEnabled = $this->smsNoticeEnabled();
|
||||
|
||||
if (!$wechatNoticeEnabled && !$smsNoticeEnabled) return;
|
||||
|
||||
$orderId = $task->item_info['order']['id'];
|
||||
|
||||
$orderRepo = new OrderRepo();
|
||||
@ -50,18 +47,14 @@ class OrderFinish extends LogicService
|
||||
],
|
||||
];
|
||||
|
||||
$subscribeRepo = new WeChatSubscribeRepo();
|
||||
|
||||
$subscribe = $subscribeRepo->findByUserId($order->owner_id);
|
||||
|
||||
if ($wechatNoticeEnabled && $subscribe) {
|
||||
if ($wechatNoticeEnabled) {
|
||||
$notice = new WeChatOrderFinishNotice();
|
||||
$notice->handle($subscribe, $params);
|
||||
$notice->handle($params);
|
||||
}
|
||||
|
||||
if ($smsNoticeEnabled) {
|
||||
$notice = new SmsOrderFinishNotice();
|
||||
$notice->handle($user, $params);
|
||||
$notice->handle($params);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -11,7 +11,6 @@ use App\Models\PointGiftRedeem as PointGiftRedeemModel;
|
||||
use App\Models\Task as TaskModel;
|
||||
use App\Repos\PointGiftRedeem as PointGiftRedeemRepo;
|
||||
use App\Repos\User as UserRepo;
|
||||
use App\Repos\WeChatSubscribe as WeChatSubscribeRepo;
|
||||
use App\Services\Logic\Notice\External\Sms\GoodsDeliver as SmsGoodsDeliverNotice;
|
||||
use App\Services\Logic\Notice\External\WeChat\GoodsDeliver as WeChatGoodsDeliverNotice;
|
||||
use App\Services\Logic\Service as LogicService;
|
||||
@ -24,9 +23,7 @@ class PointGoodsDeliver extends LogicService
|
||||
$wechatNoticeEnabled = $this->wechatNoticeEnabled();
|
||||
$smsNoticeEnabled = $this->smsNoticeEnabled();
|
||||
|
||||
if (!$wechatNoticeEnabled && !$smsNoticeEnabled) return;
|
||||
|
||||
$redeemId = $task->item_info['point_redeem']['id'];
|
||||
$redeemId = $task->item_info['redeem']['id'];
|
||||
|
||||
$redeemRepo = new PointGiftRedeemRepo();
|
||||
|
||||
@ -46,18 +43,14 @@ class PointGoodsDeliver extends LogicService
|
||||
'deliver_time' => time(),
|
||||
];
|
||||
|
||||
$subscribeRepo = new WeChatSubscribeRepo();
|
||||
|
||||
$subscribe = $subscribeRepo->findByUserId($user->id);
|
||||
|
||||
if ($wechatNoticeEnabled && $subscribe) {
|
||||
if ($wechatNoticeEnabled) {
|
||||
$notice = new WeChatGoodsDeliverNotice();
|
||||
$notice->handle($subscribe, $params);
|
||||
$notice->handle($params);
|
||||
}
|
||||
|
||||
if ($smsNoticeEnabled) {
|
||||
$notice = new SmsGoodsDeliverNotice();
|
||||
$notice->handle($user, $params);
|
||||
$notice->handle($params);
|
||||
}
|
||||
}
|
||||
|
||||
@ -71,7 +64,7 @@ class PointGoodsDeliver extends LogicService
|
||||
$task = new TaskModel();
|
||||
|
||||
$itemInfo = [
|
||||
'point_gift_redeem' => ['id' => $redeem->id],
|
||||
'redeem' => ['id' => $redeem->id],
|
||||
];
|
||||
|
||||
$task->item_id = $redeem->id;
|
||||
|
@ -11,7 +11,6 @@ use App\Models\Refund as RefundModel;
|
||||
use App\Models\Task as TaskModel;
|
||||
use App\Repos\Refund as RefundRepo;
|
||||
use App\Repos\User as UserRepo;
|
||||
use App\Repos\WeChatSubscribe as WeChatSubscribeRepo;
|
||||
use App\Services\Logic\Notice\External\Sms\RefundFinish as SmsRefundFinishNotice;
|
||||
use App\Services\Logic\Notice\External\WeChat\RefundFinish as WeChatRefundFinishNotice;
|
||||
use App\Services\Logic\Service as LogicService;
|
||||
@ -24,8 +23,6 @@ class RefundFinish extends LogicService
|
||||
$wechatNoticeEnabled = $this->wechatNoticeEnabled();
|
||||
$smsNoticeEnabled = $this->smsNoticeEnabled();
|
||||
|
||||
if (!$wechatNoticeEnabled && !$smsNoticeEnabled) return;
|
||||
|
||||
$refundId = $task->item_info['refund']['id'];
|
||||
|
||||
$refundRepo = new RefundRepo();
|
||||
@ -50,18 +47,14 @@ class RefundFinish extends LogicService
|
||||
],
|
||||
];
|
||||
|
||||
$subscribeRepo = new WeChatSubscribeRepo();
|
||||
|
||||
$subscribe = $subscribeRepo->findByUserId($refund->owner_id);
|
||||
|
||||
if ($wechatNoticeEnabled && $subscribe) {
|
||||
if ($wechatNoticeEnabled) {
|
||||
$notice = new WeChatRefundFinishNotice();
|
||||
$notice->handle($subscribe, $params);
|
||||
$notice->handle($params);
|
||||
}
|
||||
|
||||
if ($smsNoticeEnabled) {
|
||||
$notice = new SmsRefundFinishNotice();
|
||||
$notice->handle($user, $params);
|
||||
$notice->handle($params);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -7,7 +7,6 @@
|
||||
|
||||
namespace App\Services\Logic\Notice\External\Sms;
|
||||
|
||||
use App\Models\User as UserModel;
|
||||
use App\Repos\Account as AccountRepo;
|
||||
use App\Services\Smser;
|
||||
|
||||
@ -17,15 +16,14 @@ class ConsultReply extends Smser
|
||||
protected $templateCode = 'consult_reply';
|
||||
|
||||
/**
|
||||
* @param UserModel $user
|
||||
* @param array $params
|
||||
* @return bool|null
|
||||
*/
|
||||
public function handle(UserModel $user, array $params)
|
||||
public function handle(array $params)
|
||||
{
|
||||
$accountRepo = new AccountRepo();
|
||||
|
||||
$account = $accountRepo->findById($user->id);
|
||||
$account = $accountRepo->findById($params['user']['id']);
|
||||
|
||||
if (!$account->phone) return null;
|
||||
|
||||
|
@ -7,7 +7,6 @@
|
||||
|
||||
namespace App\Services\Logic\Notice\External\Sms;
|
||||
|
||||
use App\Models\User as UserModel;
|
||||
use App\Repos\Account as AccountRepo;
|
||||
use App\Services\Smser;
|
||||
|
||||
@ -17,22 +16,21 @@ class GoodsDeliver extends Smser
|
||||
protected $templateCode = 'goods_deliver';
|
||||
|
||||
/**
|
||||
* @param UserModel $user
|
||||
* @param array $params
|
||||
* @return bool|null
|
||||
*/
|
||||
public function handle(UserModel $user, array $params)
|
||||
public function handle(array $params)
|
||||
{
|
||||
$params['deliver_time'] = date('Y-m-d H:i', $params['deliver_time']);
|
||||
|
||||
$accountRepo = new AccountRepo();
|
||||
|
||||
$account = $accountRepo->findById($user->id);
|
||||
$account = $accountRepo->findById($params['user']['id']);
|
||||
|
||||
if (!$account->phone) return null;
|
||||
|
||||
$templateId = $this->getTemplateId($this->templateCode);
|
||||
|
||||
$params['deliver_time'] = date('Y-m-d H:i', $params['deliver_time']);
|
||||
|
||||
$params = [
|
||||
$params['goods_name'],
|
||||
$params['order_sn'],
|
||||
|
@ -7,7 +7,6 @@
|
||||
|
||||
namespace App\Services\Logic\Notice\External\Sms;
|
||||
|
||||
use App\Models\User as UserModel;
|
||||
use App\Repos\Account as AccountRepo;
|
||||
use App\Services\Smser;
|
||||
|
||||
@ -17,20 +16,19 @@ class LiveBegin extends Smser
|
||||
protected $templateCode = 'live_begin';
|
||||
|
||||
/**
|
||||
* @param UserModel $user
|
||||
* @param array $params
|
||||
* @return bool|null
|
||||
*/
|
||||
public function handle(UserModel $user, array $params)
|
||||
public function handle(array $params)
|
||||
{
|
||||
$params['live']['start_time'] = date('H:i', $params['live']['start_time']);
|
||||
|
||||
$accountRepo = new AccountRepo();
|
||||
|
||||
$account = $accountRepo->findById($user->id);
|
||||
$account = $accountRepo->findById($params['user']['id']);
|
||||
|
||||
if (!$account->phone) return null;
|
||||
|
||||
$params['live']['start_time'] = date('H:i', $params['live']['start_time']);
|
||||
|
||||
$params = [
|
||||
$params['course']['title'],
|
||||
$params['chapter']['title'],
|
||||
|
@ -7,7 +7,6 @@
|
||||
|
||||
namespace App\Services\Logic\Notice\External\Sms;
|
||||
|
||||
use App\Models\User as UserModel;
|
||||
use App\Repos\Account as AccountRepo;
|
||||
use App\Services\Smser;
|
||||
|
||||
@ -17,15 +16,14 @@ class OrderFinish extends Smser
|
||||
protected $templateCode = 'order_finish';
|
||||
|
||||
/**
|
||||
* @param UserModel $user
|
||||
* @param array $params
|
||||
* @return bool|null
|
||||
*/
|
||||
public function handle(UserModel $user, array $params)
|
||||
public function handle(array $params)
|
||||
{
|
||||
$accountRepo = new AccountRepo();
|
||||
|
||||
$account = $accountRepo->findById($user->id);
|
||||
$account = $accountRepo->findById($params['user']['id']);
|
||||
|
||||
if (!$account->phone) return null;
|
||||
|
||||
|
@ -7,7 +7,6 @@
|
||||
|
||||
namespace App\Services\Logic\Notice\External\Sms;
|
||||
|
||||
use App\Models\User as UserModel;
|
||||
use App\Repos\Account as AccountRepo;
|
||||
use App\Services\Smser;
|
||||
|
||||
@ -17,15 +16,14 @@ class RefundFinish extends Smser
|
||||
protected $templateCode = 'refund_finish';
|
||||
|
||||
/**
|
||||
* @param UserModel $user
|
||||
* @param array $params
|
||||
* @return bool|null
|
||||
*/
|
||||
public function handle(UserModel $user, array $params)
|
||||
public function handle(array $params)
|
||||
{
|
||||
$accountRepo = new AccountRepo();
|
||||
|
||||
$account = $accountRepo->findById($user->id);
|
||||
$account = $accountRepo->findById($params['user']['id']);
|
||||
|
||||
if (!$account->phone) return null;
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
namespace App\Services\Logic\Notice\External\WeChat;
|
||||
|
||||
use App\Models\WeChatSubscribe as WeChatSubscribeModel;
|
||||
use App\Repos\WeChatSubscribe as WeChatSubscribeRepo;
|
||||
use App\Services\WeChatNotice;
|
||||
|
||||
class AccountLogin extends WeChatNotice
|
||||
@ -16,12 +16,17 @@ class AccountLogin extends WeChatNotice
|
||||
protected $templateCode = 'account_login';
|
||||
|
||||
/**
|
||||
* @param WeChatSubscribeModel $subscribe
|
||||
* @param array $params
|
||||
* @return bool
|
||||
* @return bool|null
|
||||
*/
|
||||
public function handle(WeChatSubscribeModel $subscribe, array $params)
|
||||
public function handle(array $params)
|
||||
{
|
||||
$subscribeRepo = new WeChatSubscribeRepo();
|
||||
|
||||
$subscribe = $subscribeRepo->findByUserId($params['user']['id']);
|
||||
|
||||
if (!$subscribe) return null;
|
||||
|
||||
$first = '你好,登录系统成功!';
|
||||
$remark = '如果非本人操作,请立即修改密码哦!';
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
namespace App\Services\Logic\Notice\External\WeChat;
|
||||
|
||||
use App\Models\WeChatSubscribe as WeChatSubscribeModel;
|
||||
use App\Repos\WeChatSubscribe as WeChatSubscribeRepo;
|
||||
use App\Services\WeChatNotice;
|
||||
|
||||
class ConsultReply extends WeChatNotice
|
||||
@ -16,12 +16,17 @@ class ConsultReply extends WeChatNotice
|
||||
protected $templateCode = 'consult_reply';
|
||||
|
||||
/**
|
||||
* @param WeChatSubscribeModel $subscribe
|
||||
* @param array $params
|
||||
* @return bool
|
||||
* @return bool|null
|
||||
*/
|
||||
public function handle(WeChatSubscribeModel $subscribe, array $params)
|
||||
public function handle(array $params)
|
||||
{
|
||||
$subscribeRepo = new WeChatSubscribeRepo();
|
||||
|
||||
$subscribe = $subscribeRepo->findByUserId($params['user']['id']);
|
||||
|
||||
if (!$subscribe) return null;
|
||||
|
||||
$first = sprintf('%s 回复了你的咨询!', $params['replier']['name']);
|
||||
|
||||
$remark = '如果还有其它疑问,请和我们保持联系哦!';
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
namespace App\Services\Logic\Notice\External\WeChat;
|
||||
|
||||
use App\Models\WeChatSubscribe as WeChatSubscribeModel;
|
||||
use App\Repos\WeChatSubscribe as WeChatSubscribeRepo;
|
||||
use App\Services\WeChatNotice;
|
||||
|
||||
class GoodsDeliver extends WeChatNotice
|
||||
@ -16,12 +16,16 @@ class GoodsDeliver extends WeChatNotice
|
||||
protected $templateCode = 'goods_deliver';
|
||||
|
||||
/**
|
||||
* @param WeChatSubscribeModel $subscribe
|
||||
* @param array $params
|
||||
* @return bool
|
||||
* @return bool|null
|
||||
*/
|
||||
public function handle(WeChatSubscribeModel $subscribe, $params)
|
||||
public function handle($params)
|
||||
{
|
||||
$subscribeRepo = new WeChatSubscribeRepo();
|
||||
|
||||
$subscribe = $subscribeRepo->findByUserId($params['user']['id']);
|
||||
|
||||
if (!$subscribe) return null;
|
||||
|
||||
$first = '发货已处理完成!';
|
||||
$remark = '感谢您的支持,有疑问请联系客服哦!';
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
namespace App\Services\Logic\Notice\External\WeChat;
|
||||
|
||||
use App\Models\WeChatSubscribe as WeChatSubscribeModel;
|
||||
use App\Repos\WeChatSubscribe as WeChatSubscribeRepo;
|
||||
use App\Services\WeChatNotice;
|
||||
|
||||
class LiveBegin extends WeChatNotice
|
||||
@ -16,12 +16,17 @@ class LiveBegin extends WeChatNotice
|
||||
protected $templateCode = 'live_begin';
|
||||
|
||||
/**
|
||||
* @param WeChatSubscribeModel $subscribe
|
||||
* @param array $params
|
||||
* @return bool
|
||||
* @return bool|null
|
||||
*/
|
||||
public function handle(WeChatSubscribeModel $subscribe, array $params)
|
||||
public function handle(array $params)
|
||||
{
|
||||
$subscribeRepo = new WeChatSubscribeRepo();
|
||||
|
||||
$subscribe = $subscribeRepo->findByUserId($params['user']['id']);
|
||||
|
||||
if (!$subscribe) return null;
|
||||
|
||||
$first = '你参与的课程直播就要开始了!';
|
||||
|
||||
$startTime = date('H:i', $params['live']['start_time']);
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
namespace App\Services\Logic\Notice\External\WeChat;
|
||||
|
||||
use App\Models\WeChatSubscribe as WeChatSubscribeModel;
|
||||
use App\Repos\WeChatSubscribe as WeChatSubscribeRepo;
|
||||
use App\Services\WeChatNotice;
|
||||
|
||||
class OrderFinish extends WeChatNotice
|
||||
@ -16,12 +16,16 @@ class OrderFinish extends WeChatNotice
|
||||
protected $templateCode = 'order_finish';
|
||||
|
||||
/**
|
||||
* @param WeChatSubscribeModel $subscribe
|
||||
* @param array $params
|
||||
* @return bool
|
||||
* @return bool|null
|
||||
*/
|
||||
public function handle(WeChatSubscribeModel $subscribe, $params)
|
||||
public function handle($params)
|
||||
{
|
||||
$subscribeRepo = new WeChatSubscribeRepo();
|
||||
|
||||
$subscribe = $subscribeRepo->findByUserId($params['user']['id']);
|
||||
|
||||
if (!$subscribe) return null;
|
||||
|
||||
$first = '订单已处理完成!';
|
||||
$remark = '感谢您的支持,有疑问请联系客服哦!';
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
namespace App\Services\Logic\Notice\External\WeChat;
|
||||
|
||||
use App\Models\WeChatSubscribe as WeChatSubscribeModel;
|
||||
use App\Repos\WeChatSubscribe as WeChatSubscribeRepo;
|
||||
use App\Services\WeChatNotice;
|
||||
|
||||
class RefundFinish extends WeChatNotice
|
||||
@ -16,12 +16,17 @@ class RefundFinish extends WeChatNotice
|
||||
protected $templateCode = 'refund_finish';
|
||||
|
||||
/**
|
||||
* @param WeChatSubscribeModel $subscribe
|
||||
* @param array $params
|
||||
* @return bool
|
||||
*/
|
||||
public function handle(WeChatSubscribeModel $subscribe, array $params)
|
||||
public function handle(array $params)
|
||||
{
|
||||
$subscribeRepo = new WeChatSubscribeRepo();
|
||||
|
||||
$subscribe = $subscribeRepo->findByUserId($params['user']['id']);
|
||||
|
||||
if (!$subscribe) return null;
|
||||
|
||||
$first = '退款已处理完成!';
|
||||
$remark = '感谢您的支持,有疑问请联系客服哦!';
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user