ufutx.love.util/app/Services/UtilService.php
2025-08-12 14:46:31 +08:00

19 lines
344 B
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php
namespace App\Services;
class UtilService
{
/**
* 随机生成16位数作为本地服务器的支付订单ID
* @return string
*/
public function getTradeNO()
{
$dateline = time();
$mix_1 = rand(100, 999);
$mix_2 = rand(100, 999);
return $dateline . $mix_1 . $mix_2;
}
}