存客宝微信好友表更名,模型动态引用

This commit is contained in:
柳清爽
2025-05-12 15:32:42 +08:00
parent 138e1c1deb
commit dbf6bb592a
14 changed files with 177 additions and 90 deletions

View File

@@ -5,7 +5,7 @@ namespace app\cunkebao\controller\device;
use app\common\model\Device as DeviceModel;
use app\common\model\DeviceUser as DeviceUserModel;
use app\common\model\User as UserModel;
use app\common\model\WechatFriend as WechatFriendModel;
use app\common\model\WechatFriendShip as WechatFriendShipModel;
use app\cunkebao\controller\BaseController;
use library\ResponseHelper;
@@ -105,7 +105,7 @@ class GetDeviceListV1Controller extends BaseController
$sections = $item->toArray();
if ($item->wechatId) {
$sections['totalFriend'] = WechatFriendModel::where(['ownerWechatId' => $item->wechatId])->count();
$sections['totalFriend'] = WechatFriendShipModel::where(['ownerWechatId' => $item->wechatId])->count();
}
array_push($resultSets, $sections);