客服端 内容管理功能

This commit is contained in:
wong
2025-10-13 16:14:33 +08:00
parent 381eb37f1a
commit 6e2fc369e2
11 changed files with 963 additions and 26 deletions

View File

@@ -155,4 +155,34 @@ class GetDeviceDetailV1Controller extends BaseController
return ResponseHelper::error($e->getMessage(), $e->getCode());
}
}
public function isUpdataWechat()
{
$id = $this->request->param('id/d');
$companyId = $this->getUserInfo('companyId');
$newWechat = DeviceWechatLoginModel::alias('a')
->field('b.*')
->join('wechat_account b', 'a.wechatId = b.wechatId')
->where(['a.deviceId' => $id,'a.isTips' => 0,'a.companyId' => $companyId])
->order('a.id', 'desc')
->find();
if (empty($newWechat)){
return ResponseHelper::success('','该设备绑定的微信无需迁移',201);
}
$oldWechat = DeviceWechatLoginModel::alias('a')
->field('b.*')
->join('wechat_account b', 'a.wechatId = b.wechatId')
->where(['a.companyId' => $companyId])
->where('a.deviceId' ,'<>', $id)
->order('a.id', 'desc')
->find();
if (empty($oldWechat)){
return ResponseHelper::success('','该设备绑定的微信无需迁移',201);
}else{
DeviceWechatLoginModel::where(['deviceId' => $id,'isTips' => 0,'companyId' => $companyId])->update(['isTips' => 1]);;
return ResponseHelper::success(['newWechat' => $newWechat,'oldWechat' => $oldWechat]);
}
}
}