订单、纠纷
This commit is contained in:
@ -8,12 +8,12 @@ class Logs
|
||||
{
|
||||
static function ErrLog($title, \Exception $e, $params = []): void
|
||||
{
|
||||
Log::error(self::getTitle($title,'success:'), ['message' => $e->getMessage(), 'trace' => $e->getTrace(), 'params' => $params]);
|
||||
Log::error(self::getTitle($title,'error:'), ['message' => $e->getMessage(), 'trace' => $e->getTrace(), 'params' => $params]);
|
||||
}
|
||||
|
||||
static function SuccLog($title, $params = []): void
|
||||
{
|
||||
Log::error(self::getTitle($title,'error:'), $params);
|
||||
Log::error(self::getTitle($title,'success:'), $params);
|
||||
}
|
||||
|
||||
static function getTitle($title,$prefix=''): string
|
||||
|
||||
@ -1,10 +1,17 @@
|
||||
<?php
|
||||
|
||||
namespace App\Tools;
|
||||
use Godruoyi\Snowflake\Snowflake;
|
||||
use Illuminate\Support\Str;
|
||||
|
||||
class Tools
|
||||
{
|
||||
//雪花算法生成唯一ID
|
||||
public static function genSnowflakeId($prefix = ''): string
|
||||
{
|
||||
$oSnowflake = new Snowflake();
|
||||
return $prefix.$oSnowflake->id();
|
||||
}
|
||||
|
||||
//生成随机数
|
||||
public static function generateRandStr($length = 8)
|
||||
|
||||
Reference in New Issue
Block a user