This commit is contained in:
parent
91f093867a
commit
629075f38b
|
|
@ -41,6 +41,11 @@ namespace LY.App.Model
|
|||
/// 是否管理员,如果不是管理员,不可操作
|
||||
/// </summary>
|
||||
public bool IsAdmin { get; set; }
|
||||
/// <summary>
|
||||
/// 用户关键防区数组
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "position_id", ColumnDescription = "阵地ids", IsJson = true)]
|
||||
public List<long> positionId { get; set; }
|
||||
}
|
||||
public class AddUser
|
||||
{
|
||||
|
|
@ -56,6 +61,7 @@ namespace LY.App.Model
|
|||
/// 是否管理员,如果不是管理员,不可操作
|
||||
/// </summary>
|
||||
public bool IsAdmin { get; set; }
|
||||
public List<long> positionId { get; set; }
|
||||
}
|
||||
public class UpdateUser:AddUser
|
||||
{
|
||||
|
|
|
|||
|
|
@ -142,6 +142,7 @@ namespace LY.App.Service
|
|||
//加入redis
|
||||
await _redisService.SetAsync<string>(RedisKeyList.TokenUser(input.username),
|
||||
token, TimeSpan.FromSeconds(60 * 60 * 24 * 7));
|
||||
var positionIds = entity.positionId?.Select(s => s.ToString()).ToList();
|
||||
return new ApiResult()
|
||||
{
|
||||
code = 1,
|
||||
|
|
@ -150,7 +151,8 @@ namespace LY.App.Service
|
|||
token,
|
||||
expires = DateTime.UtcNow.AddSeconds(60 * 60 * 24 * 7),
|
||||
isAdmin = entity.IsAdmin,
|
||||
userid = entity.Id.ToString()
|
||||
userid = entity.Id.ToString(),
|
||||
positionIds
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue