Ken 3 zile în urmă
părinte
comite
6fe62662be
1 a modificat fișierele cu 0 adăugiri și 35 ștergeri
  1. 0 35
      app/Services/PublicService.php

+ 0 - 35
app/Services/PublicService.php

@@ -37,41 +37,6 @@ class PublicService extends BaseService
         return [$chatId, $firstName, $username];
         return [$chatId, $firstName, $username];
     }
     }
 
 
-
-    /**
-     * 设置用户的访客ID
-     * @param  $memberId string 会员编号
-     * @param $visitorId string 访客ID
-     * @return void
-     * @throws Exception
-     */
-    public static function setVisitorId(string $memberId, string $visitorId): void
-    {
-
-        try {
-            $user = User::where('member_id', $memberId)->first();
-            if (!$user) throw new Exception('验证失败', HttpStatus::CUSTOM_ERROR);
-            if (empty($user->visitor_id)) {
-                if (User::where('visitor_id', $visitorId)->exists()) {
-                    User::where('visitor_id', $visitorId)->update(['status' => 1]);
-                    $user->status = 1;
-                }
-                $user->visitor_id = $visitorId;
-            }
-            if (empty($user->register_ip)) {
-                $registerIp = request()->ip();
-                if (User::where('register_ip', $registerIp)->exists()) {
-                    User::where('register_ip', $registerIp)->update(['status' => 1]);
-                    $user->status = 1;
-                }
-                $user->register_ip = $registerIp;
-            }
-            $user->save();
-        } catch (Exception $e) {
-            throw new Exception('验证失败', HttpStatus::CUSTOM_ERROR);
-        }
-    }
-
     /**
     /**
      * 用户初始化 (用户注册)/ 更新用户昵称
      * 用户初始化 (用户注册)/ 更新用户昵称
      * @param $chatId
      * @param $chatId