😎 feat(文本简称): 将绑定简称特性示例迁移至demo实体
This commit is contained in:
parent
d9e56baeb9
commit
c6ef34a0f7
@ -25,6 +25,22 @@ public class TestCodeGenDemo : EntityBase
|
|||||||
[SugarColumn(ColumnDescription = "文本", Length = 128)]
|
[SugarColumn(ColumnDescription = "文本", Length = 128)]
|
||||||
public string? Name { get; set; }
|
public string? Name { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 姓名简拼
|
||||||
|
/// </summary>
|
||||||
|
[BindTextAbbr(nameof(Name))]
|
||||||
|
[SugarColumn(ColumnDescription = "简拼", Length = 32)]
|
||||||
|
[MaxLength(32)]
|
||||||
|
public virtual string? Pinyin { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 姓名全拼
|
||||||
|
/// </summary>
|
||||||
|
[BindTextAbbr(nameof(Name), true)]
|
||||||
|
[SugarColumn(ColumnDescription = "姓名全拼", Length = 32)]
|
||||||
|
[MaxLength(32)]
|
||||||
|
public virtual string? AllPinyin { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 数值
|
/// 数值
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@ -38,22 +38,6 @@ public partial class SysUser : EntityTenant
|
|||||||
[MaxLength(32)]
|
[MaxLength(32)]
|
||||||
public virtual string RealName { get; set; }
|
public virtual string RealName { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 姓名简拼
|
|
||||||
/// </summary>
|
|
||||||
[BindTextAbbr(nameof(RealName))]
|
|
||||||
[SugarColumn(ColumnDescription = "简拼", Length = 32)]
|
|
||||||
[MaxLength(32)]
|
|
||||||
public virtual string? Pinyin { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 姓名全拼
|
|
||||||
/// </summary>
|
|
||||||
[BindTextAbbr(nameof(RealName), true)]
|
|
||||||
[SugarColumn(ColumnDescription = "姓名全拼", Length = 32)]
|
|
||||||
[MaxLength(32)]
|
|
||||||
public virtual string? AllPinyin { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 昵称
|
/// 昵称
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@ -82,7 +82,7 @@ public class SysUserService : IDynamicApiController, ITransient
|
|||||||
.Where(u => u.AccountType != AccountTypeEnum.SuperAdmin)
|
.Where(u => u.AccountType != AccountTypeEnum.SuperAdmin)
|
||||||
.WhereIF(orgList != null || extOrgUserIdList != null, u => orgList.Contains(u.OrgId) || extOrgUserIdList.Contains(u.Id))
|
.WhereIF(orgList != null || extOrgUserIdList != null, u => orgList.Contains(u.OrgId) || extOrgUserIdList.Contains(u.Id))
|
||||||
.WhereIF(!string.IsNullOrWhiteSpace(input.Account), u => u.Account.Contains(input.Account))
|
.WhereIF(!string.IsNullOrWhiteSpace(input.Account), u => u.Account.Contains(input.Account))
|
||||||
.WhereIF(!string.IsNullOrWhiteSpace(input.RealName), u => u.RealName.Contains(input.RealName) || u.Pinyin.Contains(input.RealName) || u.AllPinyin.Replace(" ", "").Contains(input.RealName))
|
.WhereIF(!string.IsNullOrWhiteSpace(input.RealName), u => u.RealName.Contains(input.RealName))
|
||||||
.WhereIF(!string.IsNullOrWhiteSpace(input.PosName), (u, a, b) => b.Name.Contains(input.PosName))
|
.WhereIF(!string.IsNullOrWhiteSpace(input.PosName), (u, a, b) => b.Name.Contains(input.PosName))
|
||||||
.WhereIF(!string.IsNullOrWhiteSpace(input.Phone), u => u.Phone.Contains(input.Phone))
|
.WhereIF(!string.IsNullOrWhiteSpace(input.Phone), u => u.Phone.Contains(input.Phone))
|
||||||
.OrderBy(u => new { u.OrderNo, u.Id })
|
.OrderBy(u => new { u.OrderNo, u.Id })
|
||||||
|
|||||||
@ -159,9 +159,6 @@ const options = useVxeTable<UserOutput>(
|
|||||||
{ field: 'nickName', title: t('message.list.nickname'), minWidth: 120, showOverflow: 'tooltip' },
|
{ field: 'nickName', title: t('message.list.nickname'), minWidth: 120, showOverflow: 'tooltip' },
|
||||||
|
|
||||||
{ field: 'realName', title: t('message.list.realName'), minWidth: 120, showOverflow: 'tooltip' },
|
{ field: 'realName', title: t('message.list.realName'), minWidth: 120, showOverflow: 'tooltip' },
|
||||||
{ field: 'pinyin', title: t('message.list.pinyin'), minWidth: 120, showOverflow: 'tooltip' },
|
|
||||||
{ field: 'allPinyin', title: t('message.list.allPinyin'), minWidth: 120, showOverflow: 'tooltip' },
|
|
||||||
|
|
||||||
{ field: 'phone', title: t('message.list.phoneNumber'), minWidth: 120, showOverflow: 'tooltip' },
|
{ field: 'phone', title: t('message.list.phoneNumber'), minWidth: 120, showOverflow: 'tooltip' },
|
||||||
|
|
||||||
{ field: 'birthday', title: t('message.list.birthDate'), minWidth: 100, showOverflow: 'tooltip', formatter: ({ cellValue }: any) => XEUtils.toDateString(cellValue, 'yyyy-MM-dd') },
|
{ field: 'birthday', title: t('message.list.birthDate'), minWidth: 100, showOverflow: 'tooltip', formatter: ({ cellValue }: any) => XEUtils.toDateString(cellValue, 'yyyy-MM-dd') },
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user