mirror of
https://github.com/cedar2025/Xboard.git
synced 2025-02-02 07:28:13 -05:00
Compare commits
1 Commits
1fb4406d15
...
f9f1209750
Author | SHA1 | Date | |
---|---|---|---|
|
f9f1209750 |
@ -51,12 +51,11 @@ class MigrateFromV2b extends Command
|
|||||||
],
|
],
|
||||||
'1.7.3' => [
|
'1.7.3' => [
|
||||||
'ALTER TABLE `v2_stat_order` RENAME TO `v2_stat`;',
|
'ALTER TABLE `v2_stat_order` RENAME TO `v2_stat`;',
|
||||||
"ALTER TABLE `v2_stat` CHANGE COLUMN order_amount paid_total INT COMMENT '订单合计';",
|
"ALTER TABLE `v2_stat` CHANGE COLUMN order_amount order_total INT COMMENT '订单合计';",
|
||||||
"ALTER TABLE `v2_stat` CHANGE COLUMN order_count paid_count INT COMMENT '邀请佣金';",
|
|
||||||
"ALTER TABLE `v2_stat` CHANGE COLUMN commission_amount commission_total INT COMMENT '佣金合计';",
|
"ALTER TABLE `v2_stat` CHANGE COLUMN commission_amount commission_total INT COMMENT '佣金合计';",
|
||||||
"ALTER TABLE `v2_stat`
|
"ALTER TABLE `v2_stat`
|
||||||
ADD COLUMN order_count INT NULL,
|
ADD COLUMN paid_count INT NULL,
|
||||||
ADD COLUMN order_total INT NULL,
|
ADD COLUMN paid_total INT NULL,
|
||||||
ADD COLUMN register_count INT NULL,
|
ADD COLUMN register_count INT NULL,
|
||||||
ADD COLUMN invite_count INT NULL,
|
ADD COLUMN invite_count INT NULL,
|
||||||
ADD COLUMN transfer_used_total VARCHAR(32) NULL;
|
ADD COLUMN transfer_used_total VARCHAR(32) NULL;
|
||||||
|
@ -12,17 +12,11 @@ class UnBind extends Telegram {
|
|||||||
|
|
||||||
public function handle($message, $match = []) {
|
public function handle($message, $match = []) {
|
||||||
if (!$message->is_private) return;
|
if (!$message->is_private) return;
|
||||||
if (!isset($message->args[0])) {
|
|
||||||
$user = User::where('telegram_id', $message->chat_id)->first();
|
$user = User::where('telegram_id', $message->chat_id)->first();
|
||||||
} else {
|
$telegramService = $this->telegramService;
|
||||||
$chat = User::where('telegram_id', $message->chat_id)->first();
|
if (!$user) {
|
||||||
if (!$chat) return;
|
$telegramService->sendMessage($message->chat_id, '没有查询到您的用户信息,请先绑定账号', 'markdown');
|
||||||
if (!($chat->is_admin || $chat->is_staff)) return;
|
return;
|
||||||
if (strpos($message->args[0], '@') !== true) {
|
|
||||||
$user = User::where('email', $message->args[0])->first();
|
|
||||||
} else {
|
|
||||||
$user = User::where('telegram_id', $message->args[0])->first();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
$user->telegram_id = NULL;
|
$user->telegram_id = NULL;
|
||||||
if (!$user->save()) {
|
if (!$user->save()) {
|
||||||
|
@ -110,20 +110,11 @@ class Helper
|
|||||||
|
|
||||||
public static function getSubscribeUrl(string $token, $subscribeUrl = null)
|
public static function getSubscribeUrl(string $token, $subscribeUrl = null)
|
||||||
{
|
{
|
||||||
$strs = 'QWERTYUIOPASDFGHJKLZXCVBNM1234567890qwertyuiopasdfghjklzxcvbnm';
|
|
||||||
$randstr = substr(str_shuffle($strs), 0, rand(4,8));
|
|
||||||
|
|
||||||
$path = route('client.subscribe', ['token' => $token], false);
|
$path = route('client.subscribe', ['token' => $token], false);
|
||||||
if(!$subscribeUrl){
|
if(!$subscribeUrl){
|
||||||
$subscribeUrls = explode(',', admin_setting('subscribe_url'));
|
$subscribeUrls = explode(',', admin_setting('subscribe_url'));
|
||||||
$subscribeUrl = \Arr::random($subscribeUrls);
|
$subscribeUrl = \Arr::random($subscribeUrls);
|
||||||
$subscribeUrl = self::replaceByPattern($subscribeUrl);
|
$subscribeUrl = self::replaceByPattern($subscribeUrl);
|
||||||
if (strpos($subscribeUrl, "*") !== false) {
|
|
||||||
$subscribeUrl = str_replace("*", $randstr, $subscribeUrl);
|
|
||||||
} elseif (strpos($subscribeUrl, '{uuid}') !== false) {
|
|
||||||
$user = User::where('token', $token)->first();
|
|
||||||
$subscribeUrl = str_replace('{uuid}', $user->uuid, $subscribeUrl);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return $subscribeUrl ? rtrim($subscribeUrl, '/') . $path : url($path);
|
return $subscribeUrl ? rtrim($subscribeUrl, '/') . $path : url($path);
|
||||||
}
|
}
|
||||||
|
@ -11,7 +11,7 @@ if ! command -v git &> /dev/null; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
git config --global --add safe.directory $(pwd)
|
git config --global --add safe.directory $(pwd)
|
||||||
git fetch --all && git reset --hard origin/legacy && git pull origin legacy
|
git fetch --all && git reset --hard origin/dev && git pull origin dev
|
||||||
rm -rf composer.lock composer.phar
|
rm -rf composer.lock composer.phar
|
||||||
wget https://github.com/composer/composer/releases/latest/download/composer.phar -O composer.phar
|
wget https://github.com/composer/composer/releases/latest/download/composer.phar -O composer.phar
|
||||||
php composer.phar update -vvv
|
php composer.phar update -vvv
|
||||||
|
Loading…
Reference in New Issue
Block a user