sendMessage(); return ; if (!$template_id) { return null; } $params = [ ['name' => '时间', 'value' => $withdrawModel->created_at->toDateTimeString()], ['name' => '金额', 'value' => $withdrawModel->amounts], ['name' => '手续费', 'value' => $withdrawModel->actual_poundage], ]; static::notice($template_id,$params,$withdrawModel->member_id); } public static function withdrawSuccessNotice(Model $withdrawModel) { $template_id = \Setting::get('shop.notice.withdraw_success'); $successNotice = new WithdrawSuccessNotice($withdrawModel); $successNotice->sendMessage(); return ; if (!$template_id) { return null; } $pay_at = $withdrawModel->pay_at; if(empty($pay_at)){ $pay_at = time(); } $params = [ ['name' => '时间', 'value' => date('Y-m-d H:i:s', $pay_at)], ['name' => '金额', 'value' => $withdrawModel->amounts], ['name' => '手续费', 'value' => $withdrawModel->actual_poundage], ]; static::notice($template_id,$params,$withdrawModel->member_id); } public static function withdrawFailureNotice(Model $withdrawModel) { $template_id = \Setting::get('shop.notice.withdraw_fail'); $failNotice = new WithdrawFailNotice($withdrawModel); $failNotice->sendMessage(); return ; if (!$template_id) { return null; } $params = [ ['name' => '时间', 'value' => date('Y-m-d H:i:s', $withdrawModel->audit_at)], ['name' => '金额', 'value' => $withdrawModel->amounts], ['name' => '手续费', 'value' => $withdrawModel->actual_poundage], ['name' => '提现单号', 'value' => $withdrawModel->withdraw_sn], ]; static::notice($template_id,$params,$withdrawModel->member_id); } public static function withdrawRejectNotice(Model $withdrawModel) { $template_id = \Setting::get('shop.notice.withdraw_reject'); $rejectNotice = new WithdrawRejectNotice($withdrawModel); $rejectNotice->sendMessage(); return ; if (!$template_id) { return null; } $params = [ ['name' => '时间', 'value' => date('Y-m-d H:i:s', $withdrawModel->audit_at)], ['name' => '金额', 'value' => $withdrawModel->amounts], ['name' => '手续费', 'value' => $withdrawModel->actual_poundage], ]; static::notice($template_id,$params,$withdrawModel->member_id); } public static function notice($templateId,$params,$memberId) { if (!$templateId) { return; } $msg = MessageTemp::getSendMsg($templateId, $params); if (!$msg) { return; } $news_link = MessageTemp::find($templateId)->news_link; $news_link = $news_link ?:''; MessageService::notice(MessageTemp::$template_id, $msg, $memberId,'',$news_link); } }