去掉老床垫相关功能
This commit is contained in:
@@ -24,7 +24,7 @@ public sealed class HealthAppService : IDynamicApiController, ITransient
|
||||
private readonly SqlSugarRepository<HealthProfile> _profileRepository;
|
||||
private readonly SqlSugarRepository<HealthModuleSelection> _moduleRepository;
|
||||
private readonly SqlSugarRepository<HealthPlan> _planRepository;
|
||||
private readonly MattressComfortService _mattressComfort;
|
||||
private readonly EnvironmentAdviceService _environmentAdvice;
|
||||
private readonly IHttpContextAccessor _httpContextAccessor;
|
||||
|
||||
public HealthAppService(
|
||||
@@ -32,14 +32,14 @@ public sealed class HealthAppService : IDynamicApiController, ITransient
|
||||
SqlSugarRepository<HealthProfile> profileRepository,
|
||||
SqlSugarRepository<HealthModuleSelection> moduleRepository,
|
||||
SqlSugarRepository<HealthPlan> planRepository,
|
||||
MattressComfortService mattressComfort,
|
||||
EnvironmentAdviceService environmentAdvice,
|
||||
IHttpContextAccessor httpContextAccessor)
|
||||
{
|
||||
_userRepository = userRepository;
|
||||
_profileRepository = profileRepository;
|
||||
_moduleRepository = moduleRepository;
|
||||
_planRepository = planRepository;
|
||||
_mattressComfort = mattressComfort;
|
||||
_environmentAdvice = environmentAdvice;
|
||||
_httpContextAccessor = httpContextAccessor;
|
||||
}
|
||||
|
||||
@@ -118,11 +118,11 @@ public sealed class HealthAppService : IDynamicApiController, ITransient
|
||||
}
|
||||
|
||||
var tcmResult = TcmConstitutionRules.Read(profile);
|
||||
MattressComfortOutput? mattressComfort = null;
|
||||
EnvironmentAdviceOutput? environmentAdvice = null;
|
||||
if (tcmResult.HasCompleted)
|
||||
{
|
||||
mattressComfort = await _mattressComfort.GetAsync(profile);
|
||||
MattressComfortService.ApplyTo(tcmResult.SceneConfig, mattressComfort);
|
||||
environmentAdvice = await _environmentAdvice.GetAsync(profile);
|
||||
EnvironmentAdviceService.ApplyTo(tcmResult.SceneConfig, environmentAdvice);
|
||||
}
|
||||
|
||||
return new HealthDashboardOutput
|
||||
@@ -136,7 +136,7 @@ public sealed class HealthAppService : IDynamicApiController, ITransient
|
||||
BmiStatus = bmiStatus,
|
||||
SceneConfig = tcmResult.HasCompleted ? tcmResult.SceneConfig : null,
|
||||
TcmResult = tcmResult,
|
||||
MattressComfort = mattressComfort
|
||||
EnvironmentAdvice = environmentAdvice
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user