1.WebSocket登录注册

2.数据重发机制
This commit is contained in:
hehaibing-1996
2024-05-17 15:12:07 +08:00
parent c8ce453f74
commit 649e22b4ce
17 changed files with 200 additions and 163 deletions

View File

@ -5,6 +5,7 @@ using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using TouchSocket.Core;
using WCS.BLL.Manager;
using WCS.BLL.Services.IService;
using WCS.DAL;
using WCS.DAL.Db.AuthDb;
@ -440,13 +441,23 @@ namespace WCS.BLL.Services.Service
//返回字串不返回密码
user.Password = "***";
var response = new ResponseCommon<UserBase>()
{
Code = 200,
Message = "success",
Data = user
};
//登录成功
if (request.DeviceType == "WCS前端" && request.GroupNames != null)
{
var shelves = ShelfManager.Shelves.Where(t => request.GroupNames.Contains(t.GroupName))
.ToList();
foreach (var shelf in shelves)
{
shelf.WebSocketIpAddress = request.WebSocketIpAddress;
}
}
return response;
}
catch (Exception ex)