parent
04881ef3b8
commit
999cef2073
|
|
@ -82,7 +82,7 @@ namespace Learn.VideoAnalysis.API
|
|||
app.UseSqlSugarExpand();
|
||||
app.UseCoravelExpand();
|
||||
// 注册启动后的回调
|
||||
app.UseServiceSystem();
|
||||
app.UseServiceSystem(null,false);
|
||||
|
||||
|
||||
app.Run();
|
||||
|
|
|
|||
|
|
@ -25,7 +25,8 @@ namespace VideoAnalysisCore.Common.Expand
|
|||
/// 系统服务
|
||||
/// </summary>
|
||||
/// <param name="app1"></param>
|
||||
public static void UseServiceSystem(this IHost app1,Action? action=null)
|
||||
/// <param name="openBrowser">打开浏览器?</param>
|
||||
public static void UseServiceSystem(this IHost app1,Action? action=null,bool openBrowser =true)
|
||||
{
|
||||
var app = app1.Services;
|
||||
// 注册启动后的回调
|
||||
|
|
@ -52,7 +53,7 @@ namespace VideoAnalysisCore.Common.Expand
|
|||
.Replace("+", "127.0.0.1");
|
||||
var uri = new Uri(normalizedAddress);
|
||||
int port = uri.Port; // 这里的 port 就是你要的数字 (int)
|
||||
if (OperatingSystem.IsWindows())
|
||||
if (openBrowser && OperatingSystem.IsWindows())
|
||||
OpenBrowser($"http://localhost:{uri.Port}/ui/index.html");
|
||||
if(action != null)
|
||||
action();
|
||||
|
|
|
|||
|
|
@ -447,6 +447,7 @@ namespace VideoAnalysisCore.Controllers.Dto
|
|||
/// 课程阶段
|
||||
/// </summary>
|
||||
public virtual string? Stage { get; set; }
|
||||
public virtual string? CourseLevel { get; set; }
|
||||
/// <summary>
|
||||
/// 视频所属云校ID
|
||||
/// <para><see cref="UserCenter.Model.CloudSchool"/> 用户中心的云校id</para>
|
||||
|
|
|
|||
|
|
@ -311,6 +311,8 @@ namespace VideoAnalysisCore.Controllers
|
|||
stageQuery = stageQuery.WhereIF(!string.IsNullOrWhiteSpace(req.Theme), s => s.Theme.Contains(req.Theme));
|
||||
stageQuery = stageQuery.WhereIF(!string.IsNullOrWhiteSpace(req.Content), s => s.Content.Contains(req.Content));
|
||||
|
||||
//stageQuery = stageQuery.Where(s => s.Stage != StageEnum.课程引入);
|
||||
|
||||
var pageIndex = req.PageIndex < 0 ? 0 : req.PageIndex;
|
||||
var pageSize = req.PageSize <= 0 ? 50 : req.PageSize > 100 ? 100 : req.PageSize;
|
||||
string[]? knowArr = null;
|
||||
|
|
@ -333,8 +335,8 @@ namespace VideoAnalysisCore.Controllers
|
|||
var taskIdArr = stagePageArr.Select(s => s.VideoTaskId).ToArray();
|
||||
var kpQuery = videoKonwPointDB.AsQueryable()
|
||||
.Where(s => taskIdArr.Contains(s.VideoTaskId) && s.KnowPointId != null);
|
||||
if (knowArr != null && knowArr.Length > 0)
|
||||
kpQuery = kpQuery.Where(s => knowArr.Contains(s.KnowPointId));
|
||||
//if (knowArr != null && knowArr.Length > 0)
|
||||
// kpQuery = kpQuery.Where(s => knowArr.Contains(s.KnowPoint));
|
||||
|
||||
var kpArr = await kpQuery
|
||||
.Select(s => new { s.StageId, s.KnowPoint })
|
||||
|
|
@ -358,6 +360,7 @@ namespace VideoAnalysisCore.Controllers
|
|||
Theme = s.Theme,
|
||||
CloudSchoolId = s.CloudSchoolId,
|
||||
Stage = s.Stage.ToString(),
|
||||
CourseLevel = ((爱学蝶变层次Enum)(int)(s.CourseLevel ??CourselevelTypeEnum.无层次)).ToString(),
|
||||
GradeId = s.GradeId.ToString(),
|
||||
GradeYear = s.GradeYear?.ToString(),
|
||||
//PreviewUrl= videoInfoRes.ContainsKey(s.VideoTaskId.ToString())? videoInfoRes[] :
|
||||
|
|
|
|||
|
|
@ -16,4 +16,15 @@ namespace VideoAnalysisCore.Model.Enum
|
|||
三层次 = 3,
|
||||
无层次 = 10
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 转换为课程层次
|
||||
/// </summary>
|
||||
public enum 爱学蝶变层次Enum
|
||||
{
|
||||
PB = 1,
|
||||
TK = 2,
|
||||
BJ = 3,
|
||||
无 = 10
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ namespace VideoAnalysisCore.Model
|
|||
/// <summary>
|
||||
/// 课程阶段
|
||||
/// </summary>
|
||||
[SugarColumn(IsIgnore = true)]
|
||||
[SugarColumn(IsNullable = true)]
|
||||
public virtual StageEnum? Stage { get; set; }
|
||||
/// <summary>
|
||||
/// 视频所属云校ID
|
||||
|
|
|
|||
Loading…
Reference in New Issue