mirror of
https://github.com/nsnail/NetAdmin.git
synced 2025-06-19 18:28:17 +08:00
fix: 🐛 小问题 (#76)
This commit is contained in:
@ -15,7 +15,7 @@ public record Sys_SiteMsg : VersionEntity, IRegister, IFieldSummary
|
||||
/// 消息内容
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_TEXT)]
|
||||
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_255)]
|
||||
public virtual string Content { get; init; }
|
||||
|
||||
/// <summary>
|
||||
|
@ -1,5 +1,4 @@
|
||||
using NetAdmin.Domain.Attributes.DataValidation;
|
||||
using NetAdmin.Domain.DbMaps.Dependency.Fields;
|
||||
using NetAdmin.Domain.DbMaps.Sys;
|
||||
|
||||
namespace NetAdmin.Domain.Dto.Sys.User;
|
||||
@ -9,12 +8,9 @@ namespace NetAdmin.Domain.Dto.Sys.User;
|
||||
/// </summary>
|
||||
public sealed record CheckMobileAvailableReq : Sys_User
|
||||
{
|
||||
/// <inheritdoc cref="IFieldPrimary{T}.Id" />
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
public override long Id { get; init; }
|
||||
|
||||
/// <inheritdoc cref="Sys_User.Mobile" />
|
||||
[Mobile]
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
[Required(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.手机号码不能为空))]
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
|
||||
public override string Mobile { get; init; }
|
||||
}
|
@ -1,5 +1,4 @@
|
||||
using NetAdmin.Domain.Attributes.DataValidation;
|
||||
using NetAdmin.Domain.DbMaps.Dependency.Fields;
|
||||
using NetAdmin.Domain.DbMaps.Sys;
|
||||
|
||||
namespace NetAdmin.Domain.Dto.Sys.User;
|
||||
@ -9,12 +8,8 @@ namespace NetAdmin.Domain.Dto.Sys.User;
|
||||
/// </summary>
|
||||
public sealed record CheckUserNameAvailableReq : Sys_User
|
||||
{
|
||||
/// <inheritdoc cref="IFieldPrimary{T}.Id" />
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
public override long Id { get; init; }
|
||||
|
||||
/// <inheritdoc cref="Sys_User.UserName" />
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
|
||||
[Required(ErrorMessageResourceType = typeof(Ln), ErrorMessageResourceName = nameof(Ln.用户名不能为空))]
|
||||
[UserName]
|
||||
public override string UserName { get; init; }
|
||||
|
@ -229,6 +229,7 @@ public sealed class SiteMsgService(
|
||||
var list = await QueryMineInternal(req)
|
||||
.Page(req.Page, req.PageSize)
|
||||
.Count(out var total)
|
||||
.OrderByDescending(a => a.Max(a.Value.Item1.CreatedTime))
|
||||
.ToListAsync(a => new QuerySiteMsgRsp {
|
||||
Id = a.Max(a.Value.Item1.Id)
|
||||
, Title = a.Max(a.Value.Item1.Title)
|
||||
@ -291,7 +292,6 @@ public sealed class SiteMsgService(
|
||||
f.UserSiteMsgStatus != UserSiteMsgStatues.Deleted) &&
|
||||
(a.MsgType == SiteMsgTypes.Public || c.DeptId == contextUserInfo.DeptId ||
|
||||
roleIds.Contains(d.RoleId) || e.UserId == contextUserInfo.Id))
|
||||
.GroupBy((a, _, _, _, _, _) => a.Id)
|
||||
.OrderByDescending(a => a.Value.Item1.CreatedTime);
|
||||
.GroupBy((a, _, _, _, _, _) => a.Id);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user