diff --git a/Myshipping.Core/Entity/DJY/DjyUserConfig.cs b/Myshipping.Core/Entity/DJY/DjyUserConfig.cs index f9ee176d..17590f89 100644 --- a/Myshipping.Core/Entity/DJY/DjyUserConfig.cs +++ b/Myshipping.Core/Entity/DJY/DjyUserConfig.cs @@ -16,7 +16,7 @@ namespace Myshipping.Core.Entity /// /// 类型(列表显示列、查询条件自定义等) /// - public DjyUserConfigType Type { get; set; } + public string Type { get; set; } /// /// 配置数据json /// diff --git a/Myshipping.Core/Enum/DjyUserConfig.cs b/Myshipping.Core/Enum/DjyUserConfig.cs deleted file mode 100644 index 545481a2..00000000 --- a/Myshipping.Core/Enum/DjyUserConfig.cs +++ /dev/null @@ -1,25 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace Myshipping.Core -{ - public enum DjyUserConfigType - { - /// - /// 订舱台账列 - /// - [Description("订舱台账列")] - BOOKING_COLUMN = 10, - - /// - /// 订舱台账列 - /// - [Description("订舱台账查询条件")] - BOOKING_QUERYC_CONDITION = 20, - } - -} diff --git a/Myshipping.Core/Myshipping.Core.xml b/Myshipping.Core/Myshipping.Core.xml index c9a2d9e9..94818b7a 100644 --- a/Myshipping.Core/Myshipping.Core.xml +++ b/Myshipping.Core/Myshipping.Core.xml @@ -3055,16 +3055,6 @@ 自定义数据 - - - 订舱台账列 - - - - - 订舱台账列 - - 文档类型 @@ -7054,33 +7044,13 @@ - + 获取用户自定义配置 - - - 订舱自定义配置输出参数 - - - - - 主键 - - - - - 类型(列表显示列、查询条件自定义等) - - - - - 配置数据json - - 自定义配置输入参数 @@ -10563,14 +10533,14 @@ - + 获取用户拥有角色 - + 获取用户拥有数据 diff --git a/Myshipping.Core/Service/DjyUserConfig/DjyUserConfigService.cs b/Myshipping.Core/Service/DjyUserConfig/DjyUserConfigService.cs index 929ec12c..8e690c6f 100644 --- a/Myshipping.Core/Service/DjyUserConfig/DjyUserConfigService.cs +++ b/Myshipping.Core/Service/DjyUserConfig/DjyUserConfigService.cs @@ -32,7 +32,7 @@ namespace Myshipping.Core.Service public async Task Page([FromQuery] QueryDjyUserConfigInput input) { var entities = await _rep.AsQueryable() - .WhereIF(input.Type.HasValue, u => u.Type == input.Type) + .WhereIF(!string.IsNullOrWhiteSpace(input.Type), u => u.Type == input.Type) .WhereIF(!string.IsNullOrWhiteSpace(input.ConfigJson), u => u.ConfigJson == input.ConfigJson) .ToPagedListAsync(input.PageNo, input.PageSize); return entities.XnPagedResult(); @@ -89,7 +89,7 @@ namespace Myshipping.Core.Service /// /// [HttpGet("/DjyUserConfig/get")] - public async Task Get([FromQuery] DjyUserConfigType type) + public async Task Get([FromQuery] string type) { return await _rep.FirstOrDefaultAsync(u => u.CreatedUserId == UserManager.UserId && u.Type == type); } diff --git a/Myshipping.Core/Service/DjyUserConfig/Dto/DjyUserConfigDto.cs b/Myshipping.Core/Service/DjyUserConfig/Dto/DjyUserConfigDto.cs deleted file mode 100644 index 08a2e4c2..00000000 --- a/Myshipping.Core/Service/DjyUserConfig/Dto/DjyUserConfigDto.cs +++ /dev/null @@ -1,27 +0,0 @@ -using System; -using Myshipping.Core; - -namespace Myshipping.Core.Service -{ - /// - /// 订舱自定义配置输出参数 - /// - public class DjyUserConfigDto - { - /// - /// 主键 - /// - public long? Id { get; set; } - - /// - /// 类型(列表显示列、查询条件自定义等) - /// - public DjyUserConfigType Type { get; set; } - - /// - /// 配置数据json - /// - public string ConfigJson { get; set; } - - } -} diff --git a/Myshipping.Core/Service/DjyUserConfig/Dto/DjyUserConfigInput.cs b/Myshipping.Core/Service/DjyUserConfig/Dto/DjyUserConfigInput.cs index f9100844..4e0354ff 100644 --- a/Myshipping.Core/Service/DjyUserConfig/Dto/DjyUserConfigInput.cs +++ b/Myshipping.Core/Service/DjyUserConfig/Dto/DjyUserConfigInput.cs @@ -12,7 +12,7 @@ namespace Myshipping.Core.Service /// /// 类型(列表显示列、查询条件自定义等) /// - public virtual DjyUserConfigType Type { get; set; } + public virtual string Type { get; set; } /// /// 配置数据json @@ -67,7 +67,7 @@ namespace Myshipping.Core.Service /// /// 类型(列表显示列、查询条件自定义等) /// - public virtual DjyUserConfigType? Type { get; set; } + public virtual string Type { get; set; } /// /// 配置数据json diff --git a/Myshipping.Core/Service/DjyUserConfig/Dto/DjyUserConfigOutput.cs b/Myshipping.Core/Service/DjyUserConfig/Dto/DjyUserConfigOutput.cs index ea1beb2d..9b4fdbc4 100644 --- a/Myshipping.Core/Service/DjyUserConfig/Dto/DjyUserConfigOutput.cs +++ b/Myshipping.Core/Service/DjyUserConfig/Dto/DjyUserConfigOutput.cs @@ -15,7 +15,7 @@ namespace Myshipping.Core.Service /// /// 类型(列表显示列、查询条件自定义等) /// - public DjyUserConfigType Type { get; set; } + public string Type { get; set; } /// /// 配置数据json diff --git a/Myshipping.Core/Service/DjyUserConfig/IDjyUserConfigService.cs b/Myshipping.Core/Service/DjyUserConfig/IDjyUserConfigService.cs index 19630e8f..981d26c5 100644 --- a/Myshipping.Core/Service/DjyUserConfig/IDjyUserConfigService.cs +++ b/Myshipping.Core/Service/DjyUserConfig/IDjyUserConfigService.cs @@ -11,6 +11,6 @@ namespace Myshipping.Core.Service Task Add(AddDjyUserConfigInput input); Task Update(UpdateDjyUserConfigInput input); Task Delete(GetDjyUserConfigInput input); - Task Get([FromQuery] DjyUserConfigType type); + Task Get([FromQuery] string type); } } \ No newline at end of file