feat: 添加修改ip与数据库的联动,并重新生成了webapi
fix: 修复构建错误
This commit is contained in:
@@ -511,7 +511,7 @@ public class AppDataConnection : DataConnection
|
||||
{
|
||||
var board = boards[0];
|
||||
var user = this.UserTable.Where(u => u.ID == userId).FirstOrDefault();
|
||||
|
||||
|
||||
if (user == null)
|
||||
{
|
||||
logger.Error($"未找到用户: {userId}");
|
||||
@@ -542,6 +542,22 @@ public class AppDataConnection : DataConnection
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 更新实验板的IP地址
|
||||
/// </summary>
|
||||
/// <param name="boardId">实验板的唯一标识符</param>
|
||||
/// <param name="newIpAddr">新的IP地址</param>
|
||||
/// <returns>更新的记录数</returns>
|
||||
public int UpdateBoardIpAddr(Guid boardId, string newIpAddr)
|
||||
{
|
||||
var result = this.BoardTable
|
||||
.Where(b => b.ID == boardId)
|
||||
.Set(b => b.IpAddr, newIpAddr)
|
||||
.Update();
|
||||
logger.Info($"实验板 {boardId} 的IP地址已更新为 {newIpAddr},更新记录数: {result}");
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 用户表
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user