fix CanteenSettingItemEnumType参数校验异常信息修正

This commit is contained in:
cheche
2024-01-11 18:18:51 +08:00
parent 1133de5850
commit 9a5d9ecd4f

View File

@@ -103,12 +103,10 @@ public class CanteenSettingService : ICanteenSettingService
// 对 InitBalance 进行 decimal 转换验证
if (!decimal.TryParse(request.Value, out _))
{
throw new UserFriendlyException("InitBalance 参数无效。它应该是 decimal 类型");
throw new UserFriendlyException($"{request.Item} 参数无效。它应该是 decimal 类型");
}
}
public async Task SetEnableAsync(CanteenSettingSetEnableRequest request)
{
var entity = await _context.Queryable<CanteenSettingEntity>().FirstAsync(x => x.Id == request.Id);