Merge branch 'abp-dev' of https://gitee.com/ccnetcore/Yi into abp-dev

This commit is contained in:
橙子
2024-07-07 00:59:53 +08:00
7 changed files with 22 additions and 20 deletions

View File

@@ -70,23 +70,12 @@ namespace Yi.Framework.Bbs.Domain.Managers
/// <returns></returns>
private async Task<InterestRecordsAggregateRoot> CreateInterestRecordsAsync()
{
//获取最新的实体
var lastEntity = await _interestRepository._DbQueryable.OrderByDescending(x => x.CreationTime).FirstAsync();
decimal oldValue = DefalutRate;
var thirdPartyValue = await _bankValueProvider.GetValueAsync();
//获取实际值的变化率
decimal changeRate = (thirdPartyValue - _bankValueProvider.StandardValue) / (thirdPartyValue);
//说明不是第一次
if (lastEntity is not null)
{
oldValue = lastEntity.Value;
}
//判断市场是否波动
bool isFluctuate = IsMarketVolatility();
//市场波动
@@ -98,7 +87,7 @@ namespace Yi.Framework.Bbs.Domain.Managers
//根据上一次的老值进行变化率比较
var currentValue = oldValue + (oldValue * changeRate);
var entity = new InterestRecordsAggregateRoot(thirdPartyValue, currentValue);
var entity = new InterestRecordsAggregateRoot(thirdPartyValue, currentValue, isFluctuate);
var output = await _interestRepository.InsertReturnEntityAsync(entity);
return output;

View File

@@ -134,7 +134,7 @@ namespace Yi.Framework.Rbac.Application.Services.System
/// <param name="input"></param>
/// <returns></returns>
[OperLog("更新用户", OperEnum.Update)]
[Permission("system:user:update")]
[Permission("system:user:edit")]
public async override Task<UserGetOutputDto> UpdateAsync(Guid id, UserUpdateInputVo input)
{
if (input.UserName == UserConst.Admin || input.UserName == UserConst.TenantAdmin)

View File

@@ -1,4 +1,4 @@
using Volo.Abp.Data;
using Volo.Abp.Data;
using Volo.Abp.DependencyInjection;
using Volo.Abp.Guids;
using Yi.Framework.Rbac.Domain.Entities;
@@ -718,6 +718,19 @@ namespace Yi.Framework.Rbac.SqlSugarCore.DataSeeds
entities.Add(userRemove);
MenuAggregateRoot userResetPwd = new MenuAggregateRoot(_guidGenerator.Create())
{
MenuName = "重置密码",
PermissionCode = "system:user:resetPwd",
MenuType = MenuTypeEnum.Component,
OrderNum = 100,
ParentId = user.Id,
IsDeleted = false
};
entities.Add(userResetPwd);
//角色管理
MenuAggregateRoot role = new MenuAggregateRoot(_guidGenerator.Create())
{