erp/app/Http/Service/MessageService.php

21 lines
742 B
PHP
Raw Normal View History

2024-07-25 17:54:14 +08:00
<?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);
}
}