|
@@ -53,7 +53,7 @@ class Helpers
|
|
|
* @param int|null $inviter_id 邀请人
|
|
|
* @param string|null $nickname 昵称
|
|
|
*/
|
|
|
- public static function addUser(string $username, string $password, int $transfer_enable, ?string $date = null, ?int $inviter_id = null, ?string $nickname = null): User
|
|
|
+ public static function addUser(string $username, string $password, int $transfer_enable, string $date = null, int $inviter_id = null, string $nickname = null): User
|
|
|
{
|
|
|
return User::create([
|
|
|
'nickname' => $nickname ?? $username,
|
|
@@ -133,7 +133,7 @@ class Helpers
|
|
|
* @param string|null $msgId 对公查询ID
|
|
|
* @param string $address 收信方
|
|
|
*/
|
|
|
- public static function addNotificationLog(string $title, string $content, int $type, int $status = 1, ?string $error = null, ?string $msgId = null, string $address = 'admin'): int
|
|
|
+ public static function addNotificationLog(string $title, string $content, int $type, int $status = 1, string $error = null, string $msgId = null, string $address = 'admin'): int
|
|
|
{
|
|
|
$log = new NotificationLog();
|
|
|
$log->type = $type;
|
|
@@ -156,7 +156,7 @@ class Helpers
|
|
|
* @param int|null $goodsId 商品ID
|
|
|
* @param int|null $orderId 订单ID
|
|
|
*/
|
|
|
- public static function addCouponLog(string $description, int $couponId, ?int $goodsId = null, ?int $orderId = null): bool
|
|
|
+ public static function addCouponLog(string $description, int $couponId, int $goodsId = null, int $orderId = null): bool
|
|
|
{
|
|
|
$log = new CouponLog();
|
|
|
$log->coupon_id = $couponId;
|
|
@@ -177,7 +177,7 @@ class Helpers
|
|
|
* @param int $amount 发生金额
|
|
|
* @param string|null $description 描述
|
|
|
*/
|
|
|
- public static function addUserCreditLog(int $userId, ?int $orderId, int $before, int $after, int $amount, ?string $description = null): bool
|
|
|
+ public static function addUserCreditLog(int $userId, ?int $orderId, int $before, int $after, int $amount, string $description = null): bool
|
|
|
{
|
|
|
$log = new UserCreditLog();
|
|
|
$log->user_id = $userId;
|
|
@@ -200,7 +200,7 @@ class Helpers
|
|
|
* @param string|null $description 描述
|
|
|
* @param int|null $orderId 订单ID
|
|
|
*/
|
|
|
- public static function addUserTrafficModifyLog(int $userId, int $before, int $after, ?string $description = null, ?int $orderId = null): bool
|
|
|
+ public static function addUserTrafficModifyLog(int $userId, int $before, int $after, string $description = null, int $orderId = null): bool
|
|
|
{
|
|
|
$log = new UserDataModifyLog();
|
|
|
$log->user_id = $userId;
|
|
@@ -222,7 +222,7 @@ class Helpers
|
|
|
* @param int $status 状态
|
|
|
* @param string|null $error 报错
|
|
|
*/
|
|
|
- public static function addMarketing(string $receiver, int $type, string $title, string $content, int $status = 1, ?string $error = null): bool
|
|
|
+ public static function addMarketing(string $receiver, int $type, string $title, string $content, int $status = 1, string $error = null): bool
|
|
|
{
|
|
|
$marketing = new Marketing();
|
|
|
$marketing->type = $type;
|