fix 金额处理
This commit is contained in:
@@ -24,9 +24,13 @@ public class BalanceSupplementRequest : IValidatableObject
|
||||
|
||||
public IEnumerable<ValidationResult> Validate(ValidationContext validationContext)
|
||||
{
|
||||
if (Amount > 0)
|
||||
{
|
||||
yield return new ValidationResult("金额有误", new[] { nameof(Amount) });
|
||||
}
|
||||
//if (Amount > 0)
|
||||
//{
|
||||
// yield return new ValidationResult("金额有误", new[] { nameof(Amount) });
|
||||
//}
|
||||
|
||||
//都是消费处理
|
||||
Amount = -Math.Abs(Amount);
|
||||
yield break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -85,7 +85,7 @@ public class DeviceUploadLogService : IDeviceUploadLogService
|
||||
var device = devices.FirstOrDefault(item => item.UniqueNo == x.Key);
|
||||
if (device != null)
|
||||
{
|
||||
return x.AsEnumerable().Select(item => new DeviceUploadLogEntity
|
||||
return x.Select(item => new DeviceUploadLogEntity
|
||||
{
|
||||
DeviceUniqueNo = x.Key,
|
||||
UserUniqueNo = item.UserUniqueNo,
|
||||
|
||||
Reference in New Issue
Block a user