refactor(journal task): 重构期刊任务模块,优化答案数据结构与流程
1. 移除废弃的KeywordAnalysis相关接口与代码 2. 重构任务答案存储逻辑,改用一对多关联存储多组答案 3. 调整实体与DTO字段,统一评分、时长等任务配置字段位置 4. 优化任务查询与返回结构,使用列表统一管理答案数据 5. 修复微信授权控制器默认返回逻辑
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
using QYZH.InteractiveMagazine.Models.Enum;
|
||||
using QYZH.InteractiveMagazine.Models.Enum;
|
||||
using QYZH.InteractiveMagazine.Common.Extensions;
|
||||
using QYZH.InteractiveMagazine.Common.Helpers;
|
||||
using QYZH.InteractiveMagazine.Models.Enum;
|
||||
@ -47,36 +47,56 @@ namespace QYZH.InteractiveMagazine.Models.Dto.Journal
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 选项
|
||||
/// 答案列表
|
||||
/// </summary>
|
||||
public string Options { get; set; }
|
||||
public List<JournalTaskAnswerOutput> Answers { get; set; }
|
||||
|
||||
private string _answer;
|
||||
private string _imageUrl;
|
||||
/// <summary>
|
||||
/// 答案
|
||||
/// 图片地址
|
||||
/// </summary>
|
||||
public string Answer
|
||||
public string ImageUrl
|
||||
{
|
||||
get { return _answer.AddDomain(DomainHelper.OssDomain); }
|
||||
set { _answer = value; }
|
||||
get { return DomainHelper.OssFullUrl(_imageUrl); }
|
||||
set { _imageUrl = value; }
|
||||
}
|
||||
|
||||
private string _analysis;
|
||||
/// <summary>
|
||||
/// 解析
|
||||
/// </summary>
|
||||
public string Analysis
|
||||
{
|
||||
get { return _analysis.AddDomain(DomainHelper.OssDomain); }
|
||||
set { _analysis = value; }
|
||||
}
|
||||
|
||||
public string AnalysisUrl { get; set; }
|
||||
public List<string> ImageUrls { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 问题分数
|
||||
/// 积分
|
||||
/// </summary>
|
||||
public float TaskScore { get; set; }
|
||||
public float Points { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 成长值
|
||||
/// </summary>
|
||||
public float GrowthPoint { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 理解力评分
|
||||
/// </summary>
|
||||
public float Comprehension { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 判断力评分
|
||||
/// </summary>
|
||||
public float Judgment { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 表达力评分
|
||||
/// </summary>
|
||||
public float Expression { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 说服力评分
|
||||
/// </summary>
|
||||
public float Persuasiveness { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 作答参考时间(秒)
|
||||
/// </summary>
|
||||
public int AnswerTime { get; set; }
|
||||
|
||||
private string _audioUrl;
|
||||
/// <summary>
|
||||
@ -108,28 +128,6 @@ namespace QYZH.InteractiveMagazine.Models.Dto.Journal
|
||||
set { _pointsUrl = value; }
|
||||
}
|
||||
|
||||
private string _imageUrl;
|
||||
/// <summary>
|
||||
/// 图片地址
|
||||
/// </summary>
|
||||
public string ImageUrl
|
||||
{
|
||||
get { return DomainHelper.OssFullUrl(_imageUrl); }
|
||||
set { _imageUrl = value; }
|
||||
}
|
||||
|
||||
public List<string> ImageUrls { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 问题分数
|
||||
/// </summary>
|
||||
public float Score { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 回答时间(秒)
|
||||
/// </summary>
|
||||
public int AnswerTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 音频开始时间
|
||||
/// </summary>
|
||||
@ -145,14 +143,37 @@ namespace QYZH.InteractiveMagazine.Models.Dto.Journal
|
||||
/// </summary>
|
||||
public string KnowledgePointIds { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 回答项解析
|
||||
/// </summary>
|
||||
public string KeywordAnalysis { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 年级
|
||||
/// </summary>
|
||||
public int Grade { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 答案输出
|
||||
/// </summary>
|
||||
public class JournalTaskAnswerOutput
|
||||
{
|
||||
public long Id { get; set; }
|
||||
|
||||
private string _answer;
|
||||
/// <summary>
|
||||
/// 参考答案
|
||||
/// </summary>
|
||||
public string Answer
|
||||
{
|
||||
get { return _answer.AddDomain(DomainHelper.OssDomain); }
|
||||
set { _answer = value; }
|
||||
}
|
||||
|
||||
private string _answerUrl;
|
||||
/// <summary>
|
||||
/// 参考答案图片
|
||||
/// </summary>
|
||||
public string AnswerUrl
|
||||
{
|
||||
get { return _answerUrl.AddDomain(DomainHelper.OssDomain); }
|
||||
set { _answerUrl = value; }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user