This commit is contained in:
commie
2026-01-08 05:42:44 +08:00
parent 7439a4a794
commit c153975eed
1976 changed files with 776 additions and 133 deletions
Regular → Executable
View File
View File
Regular → Executable
View File
Regular → Executable
View File
+9 -9
View File
@@ -154,19 +154,19 @@ class Message
* @param string $ex 扩展字段
* @return array
*/
public function sendBusinessNotification(string $sendID, string $recvID, string $title, string $content, string $notificationUrl = '', string $ex = ''): array
public function sendBusinessNotification(string $sendID, string $recvID, array $data): array
{
// 获取管理员token
$adminToken = Utils::getAdminToken();
$data = [
'sendID' => $sendID,
'recvID' => $recvID,
'title' => $title,
'content' => $content,
'notificationUrl' => $notificationUrl,
'ex' => $ex
'sendUserID' => $sendID,
'recvUserID' => $recvID,
'recvGroupID' => '',
'key' => md5(time()),
'data' =>json_encode($data),
'sendMsg' => true,
'reliabilityLevel' => 1,
];
return Utils::send(Url::$sendBusinessNotification, $data, '发送业务通知失败', $adminToken);
return Utils::send(Url::$sendBusinessNotification, $data, '发送业务通知失败');
}
/**
Regular → Executable
+6 -20
View File
@@ -112,8 +112,6 @@ class User
*/
public function searchNotificationAccount(string $keyword, int $pagination = 1, int $showNumber = 20): array
{
// 获取管理员token
$adminToken = Utils::getAdminToken();
$data = [
'keyword' => $keyword,
'pagination' => [
@@ -121,7 +119,7 @@ class User
'showNumber' => $showNumber
]
];
return Utils::send(Url::$searchNotificationAccount, $data, '搜索通知账号错误', $adminToken);
return Utils::send(Url::$searchNotificationAccount, $data, '搜索通知账号错误');
}
/**
@@ -136,19 +134,13 @@ class User
* @param string $ex 扩展字段
* @return array
*/
public function addNotificationAccount(string $userID, string $nickname = '', string $faceURL = '', int $gender = 1, string $phoneNumber = '', string $birth = '', string $email = '', string $ex = ''): array
public function addNotificationAccount(string $userID, string $nickname = '', string $faceURL = '', int $appMangerLevel = 3): array
{
// 获取管理员token
$adminToken = Utils::getAdminToken();
$data = [
'userID' => $userID,
'nickname' => $nickname,
'faceURL' => $faceURL,
'gender' => $gender,
'phoneNumber' => $phoneNumber,
'birth' => $birth,
'email' => $email,
'ex' => $ex
'appMangerLevel' => $appMangerLevel,
];
return Utils::send(Url::$addNotificationAccount, $data, '添加通知账号错误');
}
@@ -165,21 +157,15 @@ class User
* @param string $ex 扩展字段
* @return array
*/
public function updateNotificationAccount(string $userID, string $nickname = '', string $faceURL = '', int $gender = 1, string $phoneNumber = '', string $birth = '', string $email = '', string $ex = ''): array
public function updateNotificationAccount(string $userID, string $nickname = '', string $faceURL = ''): array
{
// 获取管理员token
$adminToken = Utils::getAdminToken();
$data = [
'userID' => $userID,
'nickname' => $nickname,
'faceURL' => $faceURL,
'gender' => $gender,
'phoneNumber' => $phoneNumber,
'birth' => $birth,
'email' => $email,
'ex' => $ex
'faceURL' => $faceURL
];
return Utils::send(Url::$updateNotificationAccount, $data, '更新通知账号错误', $adminToken);
return Utils::send(Url::$updateNotificationAccount, $data, '更新通知账号错误');
}
/**