订单、纠纷

This commit is contained in:
cano
2024-03-11 02:21:52 +08:00
parent 6d242ae973
commit 1161f06aeb
15 changed files with 855 additions and 53 deletions

View File

@ -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

View File

@ -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)