fix 查询缺少字段
This commit is contained in:
@@ -5,6 +5,9 @@ namespace Dlhis.Canteen.Setting.Response;
|
||||
|
||||
public class CanteenSettingResponse
|
||||
{
|
||||
|
||||
public long Id { get; set; }
|
||||
|
||||
public CanteenSettingUnqiueEnumType UniqueType { get; set; }
|
||||
public string UniqueTypeDesc => UniqueType.GetDescription();
|
||||
|
||||
|
||||
@@ -33,12 +33,12 @@ public class CanteenSettingService : ICanteenSettingService
|
||||
.LeftJoin<CanteenUserEntity>((setting, user) => setting.UniqueValue == user.UserNo)
|
||||
.WhereIF(request.UniqueType.HasValue, setting => setting.UniqueType == request.UniqueType)
|
||||
.WhereIF(request.Item.HasValue, setting => setting.Item == request.Item)
|
||||
.WhereIF(request.Search.IsPresent(), setting => setting.UniqueValue.Contains(request.Search))
|
||||
.WhereIF(request.Search.IsPresent(), setting => setting.Catalog.Contains(request.Search))
|
||||
.Select((setting, user) => new CanteenSettingResponse
|
||||
{
|
||||
Id = setting.Id,
|
||||
UniqueType = setting.UniqueType,
|
||||
UniqueValue = setting.UniqueValue,
|
||||
//UniqueValueDesc = user.UserName,
|
||||
Catalog = setting.Catalog,
|
||||
Enable = setting.Enable,
|
||||
Item = setting.Item,
|
||||
@@ -90,7 +90,7 @@ public class CanteenSettingService : ICanteenSettingService
|
||||
|
||||
//bool
|
||||
CanteenSettingItemEnumType.AllowSendAtMeal => IsValidFormat<bool>(value, request.Item),
|
||||
CanteenSettingItemEnumType.AllowRepeatInOneShift => IsValidFormat<bool>(value,request.Item),
|
||||
CanteenSettingItemEnumType.AllowRepeatInOneShift => IsValidFormat<bool>(value, request.Item),
|
||||
CanteenSettingItemEnumType.AllowCrossTenant => IsValidFormat<bool>(value, request.Item),
|
||||
_ => throw new NotImplementedException(),
|
||||
};
|
||||
@@ -177,15 +177,15 @@ public class CanteenSettingService : ICanteenSettingService
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if(type == CanteenSettingItemEnumType.BusinessSwitchTime)
|
||||
}
|
||||
if (type == CanteenSettingItemEnumType.BusinessSwitchTime)
|
||||
{
|
||||
var timeOnly = value.Adapt<TimeOnly>();
|
||||
return timeOnly.Minute == 0 && timeOnly.Second == 0;
|
||||
}
|
||||
//mapster
|
||||
value.Adapt<T>();
|
||||
|
||||
value.Adapt<T>();
|
||||
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
@@ -194,5 +194,5 @@ public class CanteenSettingService : ICanteenSettingService
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user