用户字段设置及查询条件设置添加标识序号

usertest
ZR20090193-陈敬勇 5 months ago
parent 8080a29968
commit fe89025be7

@ -1,5 +1,6 @@
using DS.Module.Core;
using FluentValidation;
using SqlSugar;
namespace DS.WMS.Core.Code.Dtos;
@ -18,6 +19,10 @@ public class CodeQuerySetReq
/// </summary>
public long? PermissionId { get; set; }
/// <summary>
/// 标识序号
/// </summary>
public int TagNo { get; set; } = 0;
/// <summary>
/// 权限模块名称
/// </summary>
public string PermissionName { get; set; }

@ -17,6 +17,10 @@ public class CodeQuerySetRes
/// </summary>
public long? PermissionId { get; set; }
/// <summary>
/// 标识序号
/// </summary>
public int TagNo { get; set; } = 0;
/// <summary>
/// 权限模块名称
/// </summary>
public string PermissionName { get; set; }

@ -16,6 +16,11 @@ public class CodeQuerySet : BaseOrgModel<long>
[SugarColumn(ColumnDescription = "权限Id", IsNullable = false)]
public long? PermissionId { get; set; }
/// <summary>
/// 标识序号
/// </summary>
[SugarColumn(ColumnDescription = "标识序号", IsNullable = false, DefaultValue = "0")]
public int TagNo { get; set; } = 0;
/// <summary>
/// 权限模块名称
/// </summary>
[SugarColumn(ColumnDescription = "权限模块名称", IsNullable = false,Length = 50)]

@ -1,3 +1,5 @@
using SqlSugar;
namespace DS.WMS.Core.Sys.Dtos;
/// <summary>
@ -9,7 +11,11 @@ public class UserFieldSetUpdateReq
/// 权限Id
/// </summary>
public long? PermissionId { get; set; }
/// <summary>
/// 标识序号
/// </summary>
public int TagNo { get; set; } = 0;
/// <summary>
/// 字段设置
/// </summary>

@ -23,7 +23,12 @@ public class SysFieldSet
/// 权限Id
/// </summary>
public long? PermissionId { get; set; }
/// <summary>
/// 标识序号
/// </summary>
[SugarColumn(ColumnDescription = "标识序号", IsNullable = false, DefaultValue = "0")]
public int TagNo { get; set; } = 0;
/// <summary>
/// 字段设置
/// </summary>

@ -169,8 +169,9 @@ public interface ICommonService
/// 获取用户字段设置
/// </summary>
/// <param name="permissionId"></param>
/// <param name="tagNo">标识序号</param>
/// <returns></returns>
public DataResult<SysFieldSet> GetUserFieldSet(string permissionId);
public DataResult<SysFieldSet> GetUserFieldSet(string permissionId, int tagNo = 0);
/// <summary>

@ -1241,11 +1241,12 @@ public class CommonService : ICommonService
/// 获取用户字段设置
/// </summary>
/// <param name="permissionId"></param>
/// <param name="tagNo">标识序号</param>
/// <returns></returns>
public DataResult<SysFieldSet> GetUserFieldSet(string permissionId)
public DataResult<SysFieldSet> GetUserFieldSet(string permissionId, int tagNo = 0)
{
var info = db.Queryable<SysFieldSet>()
.Where(x => x.UserId == long.Parse(user.UserId) && x.PermissionId == long.Parse(permissionId)).First();
.Where(x => x.UserId == long.Parse(user.UserId) && x.PermissionId == long.Parse(permissionId) && x.TagNo == tagNo).First();
return DataResult<SysFieldSet>.Success(info);
}
@ -1265,6 +1266,7 @@ public class CommonService : ICommonService
var entity = new SysFieldSet
{
UserId = long.Parse(user.UserId),
TagNo = req.TagNo,
PermissionId = req.PermissionId,
Content = req.Content
};

Loading…
Cancel
Save