优化 文件订阅Page

This commit is contained in:
小肥羊 2025-03-13 09:48:21 +08:00
parent 3d7abaecd5
commit d25fa4bcff
5 changed files with 8 additions and 6 deletions

View File

@ -75,8 +75,7 @@ namespace Learn.VideoAnalysis.Components.Pages
{ {
var data = rowData; var data = rowData;
modalBtnLoading = true; modalBtnLoading = true;
await criteria.DeleteAsync(s => s.Subject == editSubject); await criteria.UpdateAsync(data);
await criteria.InsertRangeAsync(_editSource);
_table.ReloadData(); _table.ReloadData();
modalShow = false; modalShow = false;

View File

@ -20,7 +20,7 @@ namespace Learn.VideoAnalysis.Expand
service.AddScheduler(); service.AddScheduler();
service.AddTransient<NodeSubscriptionJob>(); service.AddTransient<NodeSubscriptionJob>();
} }
public static void Run(IServiceProvider provider) public static void UseCoravelExpand(this IServiceProvider provider)
{ {
provider.UseScheduler(scheduler => provider.UseScheduler(scheduler =>
{ {

View File

@ -134,7 +134,7 @@ namespace Learn.VideoAnalysis
//自定义 应用 //自定义 应用
SqlSugarExpand.InitDB(); SqlSugarExpand.InitDB();
CoravelExpand.Run(app.Services); app.Services.UseCoravelExpand();
app.Run(); app.Run();

View File

@ -13,7 +13,8 @@
" TimeSlice": 600 " TimeSlice": 600
}, },
"DB": { "DB": {
"ConnectionString": "AllowLoadLocalInfile=true;Server=10.255.255.3;Port=3306;Database=learn.videoanalysis;User ID=marking;Password=qwe123!@#;CharSet=utf8mb4;pooling=true;SslMode=None", //"ConnectionString": "AllowLoadLocalInfile=true;Server=10.255.255.3;Port=3306;Database=learn.videoanalysis;User ID=marking;Password=qwe123!@#;CharSet=utf8mb4;pooling=true;SslMode=None",
"ConnectionString": "AllowLoadLocalInfile=true;Server=rm-2vc20nd3d11g0oh6g.rwlb.cn-chengdu.rds.aliyuncs.com;User ID=marking;Password=poiuytPOIUYT098765)(*&^%;Port=3306;Database=learn.videoanalysis;CharSet=utf8mb4;pooling=true;SslMode=None",
"SqlType": "MySql", "SqlType": "MySql",
"UpdateTable": false "UpdateTable": false
} }

View File

@ -23,7 +23,9 @@ namespace VideoAnalysisCore.Common
var t = typeof(T); var t = typeof(T);
if (CID.ContainsKey(t)) if (CID.ContainsKey(t))
{ {
base.Context = DbScoped.Sugar.GetConnectionScope(CID[t]); base.Context = CID[t]!=null
? DbScoped.Sugar.GetConnectionScope(CID[t])
: DbScoped.Sugar;
return; return;
} }
var c = t.GetCustomAttribute<TenantAttribute>(); var c = t.GetCustomAttribute<TenantAttribute>();