fix: 修复挖矿计算问题
This commit is contained in:
@@ -5,6 +5,5 @@ namespace Yi.Framework.DigitalCollectibles.Application.Contracts.Dtos.MiningPool
|
|||||||
|
|
||||||
public class MiningResultOutput
|
public class MiningResultOutput
|
||||||
{
|
{
|
||||||
|
public CollectiblesDto? Collectibles{ get; set; }
|
||||||
public CollectiblesUserGetOutputDto? Collectibles { get; set; }
|
|
||||||
}
|
}
|
||||||
@@ -40,6 +40,7 @@ public class CollectiblesService : ApplicationService
|
|||||||
input.StartTime is not null && input.EndTime is not null,
|
input.StartTime is not null && input.EndTime is not null,
|
||||||
u => u.CreationTime >= input.StartTime && u.CreationTime <= input.EndTime)
|
u => u.CreationTime >= input.StartTime && u.CreationTime <= input.EndTime)
|
||||||
.LeftJoin<CollectiblesAggregateRoot>((u, c) => u.CollectiblesId == c.Id)
|
.LeftJoin<CollectiblesAggregateRoot>((u, c) => u.CollectiblesId == c.Id)
|
||||||
|
.OrderBy((u,c) => c.OrderNum)
|
||||||
.GroupBy((u, c) => u.CollectiblesId)
|
.GroupBy((u, c) => u.CollectiblesId)
|
||||||
.Select((u, c) =>
|
.Select((u, c) =>
|
||||||
new CollectiblesUserGetOutputDto
|
new CollectiblesUserGetOutputDto
|
||||||
@@ -59,7 +60,6 @@ public class CollectiblesService : ApplicationService
|
|||||||
},
|
},
|
||||||
Number = SqlFunc.AggregateCount(u.CollectiblesId)
|
Number = SqlFunc.AggregateCount(u.CollectiblesId)
|
||||||
})
|
})
|
||||||
.OrderBy(dto => dto.Collectibles.OrderNum)
|
|
||||||
.ToPageListAsync(input.SkipCount, input.MaxResultCount, total);
|
.ToPageListAsync(input.SkipCount, input.MaxResultCount, total);
|
||||||
return new PagedResultDto<CollectiblesUserGetOutputDto>(total, output);
|
return new PagedResultDto<CollectiblesUserGetOutputDto>(total, output);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -43,6 +43,7 @@ public class MarketService : ApplicationService
|
|||||||
m => m.CreationTime >= input.StartTime && m.CreationTime <= input.EndTime)
|
m => m.CreationTime >= input.StartTime && m.CreationTime <= input.EndTime)
|
||||||
|
|
||||||
.LeftJoin<CollectiblesAggregateRoot>((m, c) => m.CollectiblesId == c.Id)
|
.LeftJoin<CollectiblesAggregateRoot>((m, c) => m.CollectiblesId == c.Id)
|
||||||
|
.OrderByDescending((m, c) => m.CreationTime)
|
||||||
.Select((m, c) =>
|
.Select((m, c) =>
|
||||||
|
|
||||||
new MarketGetListOutputDto
|
new MarketGetListOutputDto
|
||||||
@@ -65,7 +66,7 @@ public class MarketService : ApplicationService
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
.OrderByDescending(dto => dto.CreationTime)
|
|
||||||
.ToPageListAsync(input.SkipCount, input.MaxResultCount, total);
|
.ToPageListAsync(input.SkipCount, input.MaxResultCount, total);
|
||||||
return new PagedResultDto<MarketGetListOutputDto>(total, output);
|
return new PagedResultDto<MarketGetListOutputDto>(total, output);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,16 +16,16 @@ namespace Yi.Abp.Domain.Shared.Settings
|
|||||||
{
|
{
|
||||||
context.Add(
|
context.Add(
|
||||||
//每日矿池最大上限--控制矿池膨胀率
|
//每日矿池最大上限--控制矿池膨胀率
|
||||||
new SettingDefinition("MaxPoolLimit", "50"),
|
new SettingDefinition("MaxPoolLimit", "500"),
|
||||||
|
|
||||||
//每日挖矿最大上限--控制无限挖矿
|
//每日挖矿最大上限--控制无限挖矿
|
||||||
new SettingDefinition("MiningMaxLimit", "36"),
|
new SettingDefinition("MiningMaxLimit", "360"),
|
||||||
|
|
||||||
//每次挖矿最小间隔(秒)--控制暴力挖矿
|
//每次挖矿最小间隔(秒)--控制暴力挖矿
|
||||||
new SettingDefinition("MiningMinIntervalSeconds", "5"),
|
new SettingDefinition("MiningMinIntervalSeconds", "1"),
|
||||||
|
|
||||||
//每次挖到矿的概率--控制爆率
|
//每次挖到矿的概率--控制爆率
|
||||||
new SettingDefinition("MiningMinProbability", "0.06"),
|
new SettingDefinition("MiningMinProbability", "0.5"),
|
||||||
|
|
||||||
//交易税率--控制频繁交易
|
//交易税率--控制频繁交易
|
||||||
new SettingDefinition("MarketTaxRate", "0.2")
|
new SettingDefinition("MarketTaxRate", "0.2")
|
||||||
|
|||||||
@@ -166,8 +166,7 @@ public class MiningPoolManager : DomainService
|
|||||||
CollectiblesId = result.Collectibles.Id,
|
CollectiblesId = result.Collectibles.Id,
|
||||||
IsRead = false
|
IsRead = false
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -212,6 +212,7 @@ namespace Yi.Framework.Rbac.Application.Services
|
|||||||
/// 手机验证码
|
/// 手机验证码
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
|
[RemoteService(isEnabled:false)]
|
||||||
public async Task<object> PostCaptchaPhoneAsync(ValidationPhoneTypeEnum validationPhoneType,
|
public async Task<object> PostCaptchaPhoneAsync(ValidationPhoneTypeEnum validationPhoneType,
|
||||||
PhoneCaptchaImageDto input)
|
PhoneCaptchaImageDto input)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user