refactor: 拆分微信API到独立项目并迁移相关代码
1. 新增WeChatApi独立项目,将原WebApi中的微信相关控制器迁移至新项目 2. 新增后台权限管理相关实体、服务接口和基础控制器 3. 完善管理员用户服务,增加角色关联查询和赋值逻辑 4. 修复WebApi Swagger文档过滤微信API版本的问题 5. 更新解决方案文件,添加新的微信API项目引用 6. 新增微信API基础配置文件和项目属性配置
This commit is contained in:
@ -47,6 +47,7 @@ public class JournalTaskReceiveConsumer(
|
||||
{
|
||||
PropertyNameCaseInsensitive = true
|
||||
}) ?? throw new InvalidOperationException("期刊任务消息内容为空");
|
||||
data.Normalize();
|
||||
|
||||
if (data.Questions == null || data.Questions.Length == 0)
|
||||
{
|
||||
@ -1093,11 +1094,26 @@ public class QuestionData
|
||||
/// </summary>
|
||||
public long UserId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 学生ID
|
||||
/// </summary>
|
||||
public long StudentId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 期刊ID
|
||||
/// </summary>
|
||||
public long JournalId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 作业ID
|
||||
/// </summary>
|
||||
public long HomeworkId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 书籍ID
|
||||
/// </summary>
|
||||
public long BookId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 页ID
|
||||
/// </summary>
|
||||
@ -1117,6 +1133,22 @@ public class QuestionData
|
||||
/// 创建时间
|
||||
/// </summary>
|
||||
public DateTime CreatedTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 兼容新版作答消息字段
|
||||
/// </summary>
|
||||
public void Normalize()
|
||||
{
|
||||
if (UserId <= 0)
|
||||
{
|
||||
UserId = StudentId;
|
||||
}
|
||||
|
||||
if (JournalId <= 0)
|
||||
{
|
||||
JournalId = BookId > 0 ? BookId : HomeworkId;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user