21 lines
742 B
PHP
21 lines
742 B
PHP
<?php
|
|
|
|
namespace App\Http\Service;
|
|
|
|
use App\Models\WebsiteMessages;
|
|
use Carbon\Carbon;
|
|
|
|
class MessageService
|
|
{
|
|
public function createPriceExceptionMessage(string $businessOrderId
|
|
,string $productName,string $skuName,string $goodsPrice,string $cost){
|
|
$arr['title'] = "订单价格异常告警";
|
|
$arr['role_id'] = 9;
|
|
$arr['content'] = Carbon::yesterday()->format('Y-m-d')."订单号:{$businessOrderId}-商品{$productName}
|
|
规格{$skuName}价格有异常,当前售价{$goodsPrice}/支,当前成本价{$cost}/支";
|
|
$arr['created_at'] = Carbon::now()->toDateTimeString();
|
|
$arr['updated_at'] = Carbon::now()->toDateTimeString();
|
|
return WebsiteMessages::insert($arr);
|
|
}
|
|
|
|
} |