|
@@ -26,6 +26,11 @@ func NewRefreshLoginQRLogic(ctx context.Context, svcCtx *svc.ServiceContext) *Re
|
|
|
}
|
|
|
|
|
|
func (l *RefreshLoginQRLogic) RefreshLoginQR(req *types.RefreshLoginQRReq) (resp *types.RefreshLoginQRResp, err error) {
|
|
|
+ //wxInfo, err := l.svcCtx.DB.Wx.Query().Where(wx.ServerIDEQ(*req.ServerId)).Where(wx.PortEQ(*req.Port)).Limit(1).Only(l.ctx)
|
|
|
+ //if err != nil {
|
|
|
+ // l.Error("查询微信信息失败", err)
|
|
|
+ // return
|
|
|
+ //}
|
|
|
|
|
|
// 获取服务器信息
|
|
|
server, err := l.svcCtx.DB.Server.Get(l.ctx, *req.ServerId)
|
|
@@ -34,7 +39,7 @@ func (l *RefreshLoginQRLogic) RefreshLoginQR(req *types.RefreshLoginQRReq) (resp
|
|
|
return
|
|
|
}
|
|
|
hookClient := hook.NewHook(server.PrivateIP, server.AdminPort, *req.Port)
|
|
|
-
|
|
|
+ //_, _ = hookClient.TerminateThisWeChat(wxInfo.ProcessID)
|
|
|
// 如端口未被占用则启动微信
|
|
|
portOccupied, err := hookClient.GetPortOccupiedInfo(*req.Port)
|
|
|
if err != nil {
|