|
@@ -4,7 +4,6 @@ using System;
|
|
|
using System.Collections.Generic;
|
|
|
using System.Linq;
|
|
|
using System.Threading.Tasks;
|
|
|
-using TEAMModelOS.Service.Model.Exam.Models;
|
|
|
using TEAMModelOS.SDK.Extension.DataResult.JsonRpcRequest;
|
|
|
using TEAMModelOS.SDK.Extension.DataResult.JsonRpcResponse;
|
|
|
using TEAMModelOS.SDK.Helper.Common.CollectionHelper;
|
|
@@ -13,13 +12,12 @@ using TEAMModelOS.SDK.Module.AzureCosmosDB.Interfaces;
|
|
|
using TEAMModelOS.SDK.Module.AzureTable.Interfaces;
|
|
|
using TEAMModelOS.Service.Analysis.Interfaces;
|
|
|
|
|
|
-using TEAMModelOS.Service.Models.Core;
|
|
|
-using TEAMModelOS.Service.Models.Exam.Models;
|
|
|
using TEAMModelOS.SDK.Module.AzureCosmosDBV3;
|
|
|
using System.Diagnostics;
|
|
|
using TEAMModelOS.SDK.Helper.Common.JsonHelper;
|
|
|
using TEAMModelOS.SDK.Helper.Security.ShaHash;
|
|
|
using TEAMModelOS.SDK.Context.Exception;
|
|
|
+using TEAMModelOS.Service.Models;
|
|
|
|
|
|
namespace TEAMModelOS.Controllers.Analysis
|
|
|
{
|
|
@@ -748,7 +746,7 @@ namespace TEAMModelOS.Controllers.Analysis
|
|
|
{
|
|
|
exams = await FindExamResultRedis(examMap, "FindExamResultRedis");
|
|
|
}
|
|
|
- List<ExamPaper> paper = new List<ExamPaper>();
|
|
|
+ List<Paper> paper = new List<Paper>();
|
|
|
if (RedisHelper.Instance != null)
|
|
|
{
|
|
|
paper = await RedisHelper.CacheShellAsync(CacheCosmosPrefix + "FindExamPaperRedis",
|
|
@@ -1003,7 +1001,7 @@ namespace TEAMModelOS.Controllers.Analysis
|
|
|
{
|
|
|
exams = await FindExamResultRedis(examMap, "FindExamResultRedis");
|
|
|
}
|
|
|
- List<ExamPaper> paper = new List<ExamPaper>();
|
|
|
+ List<Paper> paper = new List<Paper>();
|
|
|
if (RedisHelper.Instance != null)
|
|
|
{
|
|
|
paper = await RedisHelper.CacheShellAsync(CacheCosmosPrefix + "FindExamPaperRedis",
|
|
@@ -1514,24 +1512,24 @@ namespace TEAMModelOS.Controllers.Analysis
|
|
|
if (RedisHelper.Instance != null)
|
|
|
{
|
|
|
|
|
|
- List<ExamPaper> info = await RedisHelper.CacheShellAsync(CacheCosmosPrefix + request.method,
|
|
|
+ List<Paper> info = await RedisHelper.CacheShellAsync(CacheCosmosPrefix + request.method,
|
|
|
ShaHashHelper.GetSHA1(JsonNetHelper.ToJson(request.@params)), timeoutSeconds, () => { return FindExamPaperRedis(request.@params, request.method); });
|
|
|
builder.Data(info);
|
|
|
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- List<ExamPaper> info = await FindExamPaperRedis(request.@params, request.method);
|
|
|
+ List<Paper> info = await FindExamPaperRedis(request.@params, request.method);
|
|
|
builder.Data(info);
|
|
|
}
|
|
|
|
|
|
return builder.build();
|
|
|
}
|
|
|
- public async Task<List<ExamPaper>> FindExamPaperRedis(Dictionary<string, object> dict, string method)
|
|
|
+ public async Task<List<Paper>> FindExamPaperRedis(Dictionary<string, object> dict, string method)
|
|
|
{
|
|
|
try
|
|
|
{
|
|
|
- List<ExamPaper> info = await azureCosmosDBRepository.FindByDict<ExamPaper>(dict);
|
|
|
+ List<Paper> info = await azureCosmosDBRepository.FindByDict<Paper>(dict);
|
|
|
if (RedisHelper.Instance != null)
|
|
|
{
|
|
|
if (!RedisHelper.Exists(CacheCosmosPrefix + method))
|