This commit is contained in:
wong
2025-07-17 11:41:52 +08:00
754 changed files with 107566 additions and 71816 deletions

View File

@@ -9,7 +9,6 @@ use app\common\model\WechatAccount as WechatAccountModel;
use app\common\model\WechatFriendShip as WechatFriendShipModel;
use app\cunkebao\controller\BaseController;
use library\ResponseHelper;
use think\Db;
use think\model\Collection as ResultCollection;
/**
@@ -101,12 +100,9 @@ class GetWechatsRelatedDeviceV1Controller extends BaseController
* @param string $wechatId
* @return string
*/
protected function getWechatAlive(string $wechatId): string
protected function getWechatAliveText(string $wechatId): string
{
$wechat_account = Db::table('s2_wechat_account')
->where('wechatId', $wechatId)
->value('wechatAlive');
return !empty($wechat_account) ? $wechat_account : 0;
return 1 ? '正常' : '异常';
}
/**
@@ -144,9 +140,7 @@ class GetWechatsRelatedDeviceV1Controller extends BaseController
$account->lastActive = $this->getWechatLastActiveTime($account->wechatId);
$account->statusText = $this->getWechatStatusText($account->wechatId);
$account->totalFriend = $this->getCountFriend($account->wechatId);
$getWechatAlive = $this->getWechatAlive($account->wechatId);
$account->wechatAlive = $getWechatAlive;
$account->wechatAliveText = !empty($getWechatAlive) ? '正常' : '异常';
$account->wechatAliveText = $this->getWechatAliveText($account->wechatId);
}
return $collection->toArray();