diff --git a/Yi.Abp.Net8/Yi.Abp.sln b/Yi.Abp.Net8/Yi.Abp.sln
index d4e242fa..22d4ac71 100644
--- a/Yi.Abp.Net8/Yi.Abp.sln
+++ b/Yi.Abp.Net8/Yi.Abp.sln
@@ -64,18 +64,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Yi.Framework.Rbac.Domain.Sh
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Yi.Framework.Rbac.SqlSugarCore", "module\rbac\Yi.Framework.Rbac.SqlSugarCore\Yi.Framework.Rbac.SqlSugarCore.csproj", "{4503A2F9-139D-4CBC-AF11-689C34F0D77B}"
EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "bbs", "bbs", "{E902A945-4F41-4E96-A0DA-9F66CDA22261}"
-EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Yi.Framework.Bbs.Domain.Shared", "module\bbs\Yi.Framework.Bbs.Domain.Shared\Yi.Framework.Bbs.Domain.Shared.csproj", "{EB9349E2-256D-41EB-A345-21635A1361B3}"
-EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Yi.Framework.Bbs.Domain", "module\bbs\Yi.Framework.Bbs.Domain\Yi.Framework.Bbs.Domain.csproj", "{4EABBC84-BCED-46C1-8CF1-62A7B8081ED7}"
-EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Yi.Framework.Bbs.Application.Contracts", "module\bbs\Yi.Framework.Bbs.Application.Contracts\Yi.Framework.Bbs.Application.Contracts.csproj", "{7E569FD9-B1AB-4848-8AB7-FD9EFA1DBA20}"
-EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Yi.Framework.Bbs.Application", "module\bbs\Yi.Framework.Bbs.Application\Yi.Framework.Bbs.Application.csproj", "{AD4EE9E6-F4A3-4139-AF05-71388167DE5B}"
-EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Yi.Framework.Bbs.SqlSugarCore", "module\bbs\Yi.Framework.Bbs.SqlSugarCore\Yi.Framework.Bbs.SqlSugarCore.csproj", "{6C86BA71-9F87-4E2C-B467-2950D77DCDFA}"
-EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "audit-logging", "audit-logging", "{73CCF2C4-B9FD-44AB-8D4B-0A421805B094}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Yi.Framework.AuditLogging.SqlSugarCore", "module\audit-logging\Yi.Framework.AuditLogging.SqlSugarCore\Yi.Framework.AuditLogging.SqlSugarCore.csproj", "{48806510-8E18-4E1E-9BAF-5B97E88C5FC3}"
@@ -98,20 +86,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Yi.Framework.TenantManageme
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Yi.Framework.TenantManagement.Application.Contracts", "module\tenant-management\Yi.Framework.TenantManagement.Application.Contracts\Yi.Framework.TenantManagement.Application.Contracts.csproj", "{FA735055-CBDD-4EFD-B84B-85810DA1425E}"
EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "code-gen", "code-gen", "{4FFE7212-21F2-476D-B628-3C65E6C5075E}"
-EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Yi.Framework.CodeGen.Application", "module\code-gen\Yi.Framework.CodeGen.Application\Yi.Framework.CodeGen.Application.csproj", "{97EC40D7-DBFA-467A-98CB-221AF27B14F2}"
-EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Yi.Framework.CodeGen.Application.Contracts", "module\code-gen\Yi.Framework.CodeGen.Application.Contracts\Yi.Framework.CodeGen.Application.Contracts.csproj", "{882BC563-2F75-4B95-AC96-F4BF23F5E69D}"
-EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Yi.Framework.CodeGen.Domain", "module\code-gen\Yi.Framework.CodeGen.Domain\Yi.Framework.CodeGen.Domain.csproj", "{85CB8517-2B80-42D8-B954-081079AC9BA0}"
-EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Yi.Framework.CodeGen.Domain.Shared", "module\code-gen\Yi.Framework.CodeGen.Domain.Shared\Yi.Framework.CodeGen.Domain.Shared.csproj", "{EEFF0F05-2709-4151-A8CE-667935CEAE0B}"
-EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Yi.Framework.Caching.FreeRedis", "framework\Yi.Framework.Caching.FreeRedis\Yi.Framework.Caching.FreeRedis.csproj", "{862BB0EF-3D4E-44FF-AB15-0EB74CE553D3}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Yi.Framework.CodeGen.SqlSugarCore", "module\code-gen\Yi.Framework.CodeGen.SqlSugarCore\Yi.Framework.CodeGen.SqlSugarCore.csproj", "{FB09ACC2-A27D-4D87-8D85-1435FDED4D04}"
-EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "client", "client", "{8B27846A-043D-4F2F-8140-5CEC9D1863B5}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Yi.Abp.HttpApi.Client", "client\Yi.Abp.HttpApi.Client\Yi.Abp.HttpApi.Client.csproj", "{6B554DCC-3A81-4624-9141-4E39365ADA35}"
@@ -126,18 +102,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Yi.Framework.SettingManagem
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Yi.Framework.SettingManagement.SqlSugarCore", "module\setting-management\Yi.Framework.SettingManagement.SqlSugarCore\Yi.Framework.SettingManagement.SqlSugarCore.csproj", "{495C4643-39D4-46E7-BDC8-237589627BE4}"
EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "chat-hub", "chat-hub", "{D8CDDE99-3684-4EED-A5E5-87F2AF4C78AB}"
-EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Yi.Framework.ChatHub.Application.Contracts", "module\chat-hub\Yi.Framework.ChatHub.Application.Contracts\Yi.Framework.ChatHub.Application.Contracts.csproj", "{65D4D033-5504-44B9-B152-0172ACD64CE6}"
-EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Yi.Framework.ChatHub.Domain.Shared", "module\chat-hub\Yi.Framework.ChatHub.Domain.Shared\Yi.Framework.ChatHub.Domain.Shared.csproj", "{DEEC0B15-190C-4464-B469-C45C6563C592}"
-EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Yi.Framework.ChatHub.SqlSugarCore", "module\chat-hub\Yi.Framework.ChatHub.SqlSugarCore\Yi.Framework.ChatHub.SqlSugarCore.csproj", "{E476D266-8FB2-4D6B-AE2B-F0D279D4264E}"
-EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Yi.Framework.ChatHub.Domain", "module\chat-hub\Yi.Framework.ChatHub.Domain\Yi.Framework.ChatHub.Domain.csproj", "{C2DCA2FD-BFB4-4E76-967B-0AF8CC4F4D47}"
-EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Yi.Framework.ChatHub.Application", "module\chat-hub\Yi.Framework.ChatHub.Application\Yi.Framework.ChatHub.Application.csproj", "{B7A1A8F3-CFA6-4ECF-A707-0F33FE0A6F1D}"
-EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Yi.Framework.Rbac.Test", "test\Yi.Framework.Rbac.Test\Yi.Framework.Rbac.Test.csproj", "{9ECF0841-53BE-4FD8-95D1-A7223C7F3A07}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tool", "tool", "{084CBEEC-5D37-4716-B9C7-D80D6960DFF4}"
@@ -158,34 +122,10 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Yi.Abp.Tool.HttpApi.Client"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Yi.Framework.SettingManagement.Application", "module\setting-management\Yi.Framework.SettingManagement.Application\Yi.Framework.SettingManagement.Application.csproj", "{2A31D7CB-BDCC-4253-BA73-273B6B5E1956}"
EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "digital-collectibles", "digital-collectibles", "{B8F76A6B-2EEB-4E64-9F26-D84584E16B9C}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Yi.Framework.DigitalCollectibles.Application", "module\digital-collectibles\Yi.Framework.DigitalCollectibles.Application\Yi.Framework.DigitalCollectibles.Application.csproj", "{236B88D4-F018-4A5F-A506-7458F2308C70}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Yi.Framework.DigitalCollectibles.Application.Contracts", "module\digital-collectibles\Yi.Framework.DigitalCollectibles.Application.Contracts\Yi.Framework.DigitalCollectibles.Application.Contracts.csproj", "{4FE7AC0E-91CC-4DF1-ACA7-ED83483C3F3B}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Yi.Framework.DigitalCollectibles.Domain", "module\digital-collectibles\Yi.Framework.DigitalCollectibles.Domain\Yi.Framework.DigitalCollectibles.Domain.csproj", "{9B5CAE1A-E062-4C9B-8121-E58FBF69309C}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Yi.Framework.DigitalCollectibles.Domain.Shared", "module\digital-collectibles\Yi.Framework.DigitalCollectibles.Domain.Shared\Yi.Framework.DigitalCollectibles.Domain.Shared.csproj", "{FFEC9DA6-1A13-480A-AE9E-2BF8763D3061}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Yi.Framework.DigitalCollectibles.SqlSugarCore", "module\digital-collectibles\Yi.Framework.DigitalCollectibles.SqlSugarCore\Yi.Framework.DigitalCollectibles.SqlSugarCore.csproj", "{4CE6E4AE-0BA4-4984-A4F1-A9A414B1BB8F}"
-EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Yi.Framework.WeChat.MiniProgram", "framework\Yi.Framework.WeChat.MiniProgram\Yi.Framework.WeChat.MiniProgram.csproj", "{81CEA2ED-917B-41D8-BE0D-39A785B050C0}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Yi.Framework.BackgroundWorkers.Hangfire", "framework\Yi.Framework.BackgroundWorkers.Hangfire\Yi.Framework.BackgroundWorkers.Hangfire.csproj", "{862CA181-BEE6-4870-82D2-B662E527ED8C}"
EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ai-stock", "ai-stock", "{DB46873F-981A-43D8-91B0-D464CCB65943}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Yi.Framework.Stock.Application", "module\ai-stock\Yi.Framework.Stock.Application\Yi.Framework.Stock.Application.csproj", "{B79CE23C-10F8-48A5-A039-5940A188CF5A}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Yi.Framework.Stock.Application.Contracts", "module\ai-stock\Yi.Framework.Stock.Application.Contracts\Yi.Framework.Stock.Application.Contracts.csproj", "{846B781A-B77E-4F86-A31F-0B5B57AB0775}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Yi.Framework.Stock.Domain", "module\ai-stock\Yi.Framework.Stock.Domain\Yi.Framework.Stock.Domain.csproj", "{162821E4-8FE0-4A68-B3C0-49BD6596446F}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Yi.Framework.Stock.Domain.Shared", "module\ai-stock\Yi.Framework.Stock.Domain.Shared\Yi.Framework.Stock.Domain.Shared.csproj", "{10273544-715D-4BB3-893C-6F010D947BDD}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Yi.Framework.Stock.SqlSugarCore", "module\ai-stock\Yi.Framework.Stock.SqlSugarCore\Yi.Framework.Stock.SqlSugarCore.csproj", "{5F49318F-E6C7-4194-BAE0-83D4FB8D1983}"
-EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -264,26 +204,6 @@ Global
{4503A2F9-139D-4CBC-AF11-689C34F0D77B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4503A2F9-139D-4CBC-AF11-689C34F0D77B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4503A2F9-139D-4CBC-AF11-689C34F0D77B}.Release|Any CPU.Build.0 = Release|Any CPU
- {EB9349E2-256D-41EB-A345-21635A1361B3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {EB9349E2-256D-41EB-A345-21635A1361B3}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {EB9349E2-256D-41EB-A345-21635A1361B3}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {EB9349E2-256D-41EB-A345-21635A1361B3}.Release|Any CPU.Build.0 = Release|Any CPU
- {4EABBC84-BCED-46C1-8CF1-62A7B8081ED7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {4EABBC84-BCED-46C1-8CF1-62A7B8081ED7}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {4EABBC84-BCED-46C1-8CF1-62A7B8081ED7}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {4EABBC84-BCED-46C1-8CF1-62A7B8081ED7}.Release|Any CPU.Build.0 = Release|Any CPU
- {7E569FD9-B1AB-4848-8AB7-FD9EFA1DBA20}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {7E569FD9-B1AB-4848-8AB7-FD9EFA1DBA20}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {7E569FD9-B1AB-4848-8AB7-FD9EFA1DBA20}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {7E569FD9-B1AB-4848-8AB7-FD9EFA1DBA20}.Release|Any CPU.Build.0 = Release|Any CPU
- {AD4EE9E6-F4A3-4139-AF05-71388167DE5B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {AD4EE9E6-F4A3-4139-AF05-71388167DE5B}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {AD4EE9E6-F4A3-4139-AF05-71388167DE5B}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {AD4EE9E6-F4A3-4139-AF05-71388167DE5B}.Release|Any CPU.Build.0 = Release|Any CPU
- {6C86BA71-9F87-4E2C-B467-2950D77DCDFA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {6C86BA71-9F87-4E2C-B467-2950D77DCDFA}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {6C86BA71-9F87-4E2C-B467-2950D77DCDFA}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {6C86BA71-9F87-4E2C-B467-2950D77DCDFA}.Release|Any CPU.Build.0 = Release|Any CPU
{48806510-8E18-4E1E-9BAF-5B97E88C5FC3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{48806510-8E18-4E1E-9BAF-5B97E88C5FC3}.Debug|Any CPU.Build.0 = Debug|Any CPU
{48806510-8E18-4E1E-9BAF-5B97E88C5FC3}.Release|Any CPU.ActiveCfg = Release|Any CPU
@@ -320,30 +240,10 @@ Global
{FA735055-CBDD-4EFD-B84B-85810DA1425E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{FA735055-CBDD-4EFD-B84B-85810DA1425E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{FA735055-CBDD-4EFD-B84B-85810DA1425E}.Release|Any CPU.Build.0 = Release|Any CPU
- {97EC40D7-DBFA-467A-98CB-221AF27B14F2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {97EC40D7-DBFA-467A-98CB-221AF27B14F2}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {97EC40D7-DBFA-467A-98CB-221AF27B14F2}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {97EC40D7-DBFA-467A-98CB-221AF27B14F2}.Release|Any CPU.Build.0 = Release|Any CPU
- {882BC563-2F75-4B95-AC96-F4BF23F5E69D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {882BC563-2F75-4B95-AC96-F4BF23F5E69D}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {882BC563-2F75-4B95-AC96-F4BF23F5E69D}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {882BC563-2F75-4B95-AC96-F4BF23F5E69D}.Release|Any CPU.Build.0 = Release|Any CPU
- {85CB8517-2B80-42D8-B954-081079AC9BA0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {85CB8517-2B80-42D8-B954-081079AC9BA0}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {85CB8517-2B80-42D8-B954-081079AC9BA0}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {85CB8517-2B80-42D8-B954-081079AC9BA0}.Release|Any CPU.Build.0 = Release|Any CPU
- {EEFF0F05-2709-4151-A8CE-667935CEAE0B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {EEFF0F05-2709-4151-A8CE-667935CEAE0B}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {EEFF0F05-2709-4151-A8CE-667935CEAE0B}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {EEFF0F05-2709-4151-A8CE-667935CEAE0B}.Release|Any CPU.Build.0 = Release|Any CPU
{862BB0EF-3D4E-44FF-AB15-0EB74CE553D3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{862BB0EF-3D4E-44FF-AB15-0EB74CE553D3}.Debug|Any CPU.Build.0 = Debug|Any CPU
{862BB0EF-3D4E-44FF-AB15-0EB74CE553D3}.Release|Any CPU.ActiveCfg = Release|Any CPU
{862BB0EF-3D4E-44FF-AB15-0EB74CE553D3}.Release|Any CPU.Build.0 = Release|Any CPU
- {FB09ACC2-A27D-4D87-8D85-1435FDED4D04}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {FB09ACC2-A27D-4D87-8D85-1435FDED4D04}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {FB09ACC2-A27D-4D87-8D85-1435FDED4D04}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {FB09ACC2-A27D-4D87-8D85-1435FDED4D04}.Release|Any CPU.Build.0 = Release|Any CPU
{6B554DCC-3A81-4624-9141-4E39365ADA35}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6B554DCC-3A81-4624-9141-4E39365ADA35}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6B554DCC-3A81-4624-9141-4E39365ADA35}.Release|Any CPU.ActiveCfg = Release|Any CPU
@@ -364,26 +264,6 @@ Global
{495C4643-39D4-46E7-BDC8-237589627BE4}.Debug|Any CPU.Build.0 = Debug|Any CPU
{495C4643-39D4-46E7-BDC8-237589627BE4}.Release|Any CPU.ActiveCfg = Release|Any CPU
{495C4643-39D4-46E7-BDC8-237589627BE4}.Release|Any CPU.Build.0 = Release|Any CPU
- {65D4D033-5504-44B9-B152-0172ACD64CE6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {65D4D033-5504-44B9-B152-0172ACD64CE6}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {65D4D033-5504-44B9-B152-0172ACD64CE6}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {65D4D033-5504-44B9-B152-0172ACD64CE6}.Release|Any CPU.Build.0 = Release|Any CPU
- {DEEC0B15-190C-4464-B469-C45C6563C592}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {DEEC0B15-190C-4464-B469-C45C6563C592}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {DEEC0B15-190C-4464-B469-C45C6563C592}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {DEEC0B15-190C-4464-B469-C45C6563C592}.Release|Any CPU.Build.0 = Release|Any CPU
- {E476D266-8FB2-4D6B-AE2B-F0D279D4264E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {E476D266-8FB2-4D6B-AE2B-F0D279D4264E}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {E476D266-8FB2-4D6B-AE2B-F0D279D4264E}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {E476D266-8FB2-4D6B-AE2B-F0D279D4264E}.Release|Any CPU.Build.0 = Release|Any CPU
- {C2DCA2FD-BFB4-4E76-967B-0AF8CC4F4D47}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {C2DCA2FD-BFB4-4E76-967B-0AF8CC4F4D47}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {C2DCA2FD-BFB4-4E76-967B-0AF8CC4F4D47}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {C2DCA2FD-BFB4-4E76-967B-0AF8CC4F4D47}.Release|Any CPU.Build.0 = Release|Any CPU
- {B7A1A8F3-CFA6-4ECF-A707-0F33FE0A6F1D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {B7A1A8F3-CFA6-4ECF-A707-0F33FE0A6F1D}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {B7A1A8F3-CFA6-4ECF-A707-0F33FE0A6F1D}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {B7A1A8F3-CFA6-4ECF-A707-0F33FE0A6F1D}.Release|Any CPU.Build.0 = Release|Any CPU
{9ECF0841-53BE-4FD8-95D1-A7223C7F3A07}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9ECF0841-53BE-4FD8-95D1-A7223C7F3A07}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9ECF0841-53BE-4FD8-95D1-A7223C7F3A07}.Release|Any CPU.ActiveCfg = Release|Any CPU
@@ -420,26 +300,6 @@ Global
{2A31D7CB-BDCC-4253-BA73-273B6B5E1956}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2A31D7CB-BDCC-4253-BA73-273B6B5E1956}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2A31D7CB-BDCC-4253-BA73-273B6B5E1956}.Release|Any CPU.Build.0 = Release|Any CPU
- {236B88D4-F018-4A5F-A506-7458F2308C70}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {236B88D4-F018-4A5F-A506-7458F2308C70}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {236B88D4-F018-4A5F-A506-7458F2308C70}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {236B88D4-F018-4A5F-A506-7458F2308C70}.Release|Any CPU.Build.0 = Release|Any CPU
- {4FE7AC0E-91CC-4DF1-ACA7-ED83483C3F3B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {4FE7AC0E-91CC-4DF1-ACA7-ED83483C3F3B}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {4FE7AC0E-91CC-4DF1-ACA7-ED83483C3F3B}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {4FE7AC0E-91CC-4DF1-ACA7-ED83483C3F3B}.Release|Any CPU.Build.0 = Release|Any CPU
- {9B5CAE1A-E062-4C9B-8121-E58FBF69309C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {9B5CAE1A-E062-4C9B-8121-E58FBF69309C}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {9B5CAE1A-E062-4C9B-8121-E58FBF69309C}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {9B5CAE1A-E062-4C9B-8121-E58FBF69309C}.Release|Any CPU.Build.0 = Release|Any CPU
- {FFEC9DA6-1A13-480A-AE9E-2BF8763D3061}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {FFEC9DA6-1A13-480A-AE9E-2BF8763D3061}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {FFEC9DA6-1A13-480A-AE9E-2BF8763D3061}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {FFEC9DA6-1A13-480A-AE9E-2BF8763D3061}.Release|Any CPU.Build.0 = Release|Any CPU
- {4CE6E4AE-0BA4-4984-A4F1-A9A414B1BB8F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {4CE6E4AE-0BA4-4984-A4F1-A9A414B1BB8F}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {4CE6E4AE-0BA4-4984-A4F1-A9A414B1BB8F}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {4CE6E4AE-0BA4-4984-A4F1-A9A414B1BB8F}.Release|Any CPU.Build.0 = Release|Any CPU
{81CEA2ED-917B-41D8-BE0D-39A785B050C0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{81CEA2ED-917B-41D8-BE0D-39A785B050C0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{81CEA2ED-917B-41D8-BE0D-39A785B050C0}.Release|Any CPU.ActiveCfg = Release|Any CPU
@@ -448,26 +308,6 @@ Global
{862CA181-BEE6-4870-82D2-B662E527ED8C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{862CA181-BEE6-4870-82D2-B662E527ED8C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{862CA181-BEE6-4870-82D2-B662E527ED8C}.Release|Any CPU.Build.0 = Release|Any CPU
- {B79CE23C-10F8-48A5-A039-5940A188CF5A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {B79CE23C-10F8-48A5-A039-5940A188CF5A}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {B79CE23C-10F8-48A5-A039-5940A188CF5A}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {B79CE23C-10F8-48A5-A039-5940A188CF5A}.Release|Any CPU.Build.0 = Release|Any CPU
- {846B781A-B77E-4F86-A31F-0B5B57AB0775}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {846B781A-B77E-4F86-A31F-0B5B57AB0775}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {846B781A-B77E-4F86-A31F-0B5B57AB0775}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {846B781A-B77E-4F86-A31F-0B5B57AB0775}.Release|Any CPU.Build.0 = Release|Any CPU
- {162821E4-8FE0-4A68-B3C0-49BD6596446F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {162821E4-8FE0-4A68-B3C0-49BD6596446F}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {162821E4-8FE0-4A68-B3C0-49BD6596446F}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {162821E4-8FE0-4A68-B3C0-49BD6596446F}.Release|Any CPU.Build.0 = Release|Any CPU
- {10273544-715D-4BB3-893C-6F010D947BDD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {10273544-715D-4BB3-893C-6F010D947BDD}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {10273544-715D-4BB3-893C-6F010D947BDD}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {10273544-715D-4BB3-893C-6F010D947BDD}.Release|Any CPU.Build.0 = Release|Any CPU
- {5F49318F-E6C7-4194-BAE0-83D4FB8D1983}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {5F49318F-E6C7-4194-BAE0-83D4FB8D1983}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {5F49318F-E6C7-4194-BAE0-83D4FB8D1983}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {5F49318F-E6C7-4194-BAE0-83D4FB8D1983}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -492,12 +332,6 @@ Global
{C04D3F71-1557-46D0-B810-97B1FBB6AB73} = {9CC7A457-1236-40BA-B47B-E7B710A3F061}
{A2BB899D-4F9A-4184-81BD-94B938E2AB03} = {9CC7A457-1236-40BA-B47B-E7B710A3F061}
{4503A2F9-139D-4CBC-AF11-689C34F0D77B} = {9CC7A457-1236-40BA-B47B-E7B710A3F061}
- {E902A945-4F41-4E96-A0DA-9F66CDA22261} = {2317227D-7796-4E7B-BEDB-7CD1CAE7B853}
- {EB9349E2-256D-41EB-A345-21635A1361B3} = {E902A945-4F41-4E96-A0DA-9F66CDA22261}
- {4EABBC84-BCED-46C1-8CF1-62A7B8081ED7} = {E902A945-4F41-4E96-A0DA-9F66CDA22261}
- {7E569FD9-B1AB-4848-8AB7-FD9EFA1DBA20} = {E902A945-4F41-4E96-A0DA-9F66CDA22261}
- {AD4EE9E6-F4A3-4139-AF05-71388167DE5B} = {E902A945-4F41-4E96-A0DA-9F66CDA22261}
- {6C86BA71-9F87-4E2C-B467-2950D77DCDFA} = {E902A945-4F41-4E96-A0DA-9F66CDA22261}
{73CCF2C4-B9FD-44AB-8D4B-0A421805B094} = {2317227D-7796-4E7B-BEDB-7CD1CAE7B853}
{48806510-8E18-4E1E-9BAF-5B97E88C5FC3} = {73CCF2C4-B9FD-44AB-8D4B-0A421805B094}
{791AC2FA-50D3-4408-8D68-31DA72F608BE} = {77B949E9-530E-45A5-9657-20F7D5C6875C}
@@ -509,25 +343,13 @@ Global
{9C8C3C53-3DCE-4516-867E-228858E61B26} = {73CCF2C4-B9FD-44AB-8D4B-0A421805B094}
{17816837-E53B-486B-B796-53C601FE6CD9} = {499A8C71-7892-42D0-A77E-48756E1EFF16}
{FA735055-CBDD-4EFD-B84B-85810DA1425E} = {499A8C71-7892-42D0-A77E-48756E1EFF16}
- {4FFE7212-21F2-476D-B628-3C65E6C5075E} = {2317227D-7796-4E7B-BEDB-7CD1CAE7B853}
- {97EC40D7-DBFA-467A-98CB-221AF27B14F2} = {4FFE7212-21F2-476D-B628-3C65E6C5075E}
- {882BC563-2F75-4B95-AC96-F4BF23F5E69D} = {4FFE7212-21F2-476D-B628-3C65E6C5075E}
- {85CB8517-2B80-42D8-B954-081079AC9BA0} = {4FFE7212-21F2-476D-B628-3C65E6C5075E}
- {EEFF0F05-2709-4151-A8CE-667935CEAE0B} = {4FFE7212-21F2-476D-B628-3C65E6C5075E}
{862BB0EF-3D4E-44FF-AB15-0EB74CE553D3} = {77B949E9-530E-45A5-9657-20F7D5C6875C}
- {FB09ACC2-A27D-4D87-8D85-1435FDED4D04} = {4FFE7212-21F2-476D-B628-3C65E6C5075E}
{6B554DCC-3A81-4624-9141-4E39365ADA35} = {8B27846A-043D-4F2F-8140-5CEC9D1863B5}
{2D23B44A-DFA3-4C36-8516-4F5AE442403C} = {8B27846A-043D-4F2F-8140-5CEC9D1863B5}
{00E49781-C6A0-491C-86A1-46F685C90915} = {8B27846A-043D-4F2F-8140-5CEC9D1863B5}
{8C68059E-F3B1-4D28-A1C9-A5830F53E5D3} = {2317227D-7796-4E7B-BEDB-7CD1CAE7B853}
{6FEE0EB3-EAD2-47F8-B6FC-3D0FD3CCABFF} = {8C68059E-F3B1-4D28-A1C9-A5830F53E5D3}
{495C4643-39D4-46E7-BDC8-237589627BE4} = {8C68059E-F3B1-4D28-A1C9-A5830F53E5D3}
- {D8CDDE99-3684-4EED-A5E5-87F2AF4C78AB} = {2317227D-7796-4E7B-BEDB-7CD1CAE7B853}
- {65D4D033-5504-44B9-B152-0172ACD64CE6} = {D8CDDE99-3684-4EED-A5E5-87F2AF4C78AB}
- {DEEC0B15-190C-4464-B469-C45C6563C592} = {D8CDDE99-3684-4EED-A5E5-87F2AF4C78AB}
- {E476D266-8FB2-4D6B-AE2B-F0D279D4264E} = {D8CDDE99-3684-4EED-A5E5-87F2AF4C78AB}
- {C2DCA2FD-BFB4-4E76-967B-0AF8CC4F4D47} = {D8CDDE99-3684-4EED-A5E5-87F2AF4C78AB}
- {B7A1A8F3-CFA6-4ECF-A707-0F33FE0A6F1D} = {D8CDDE99-3684-4EED-A5E5-87F2AF4C78AB}
{9ECF0841-53BE-4FD8-95D1-A7223C7F3A07} = {0D10EEF2-FBAE-4C72-B816-A52823FC299B}
{4FEBBDD9-E4F4-4BAF-8599-E2D57C08A74F} = {084CBEEC-5D37-4716-B9C7-D80D6960DFF4}
{2CE51D4C-1EF9-462B-BA14-7EA01A7E4AF1} = {084CBEEC-5D37-4716-B9C7-D80D6960DFF4}
@@ -537,20 +359,8 @@ Global
{4AE84CDE-2A47-4D68-8E93-86193F72E4E8} = {084CBEEC-5D37-4716-B9C7-D80D6960DFF4}
{C8F97775-D903-4365-A4FF-3DA97E318CD2} = {084CBEEC-5D37-4716-B9C7-D80D6960DFF4}
{2A31D7CB-BDCC-4253-BA73-273B6B5E1956} = {8C68059E-F3B1-4D28-A1C9-A5830F53E5D3}
- {B8F76A6B-2EEB-4E64-9F26-D84584E16B9C} = {2317227D-7796-4E7B-BEDB-7CD1CAE7B853}
- {236B88D4-F018-4A5F-A506-7458F2308C70} = {B8F76A6B-2EEB-4E64-9F26-D84584E16B9C}
- {4FE7AC0E-91CC-4DF1-ACA7-ED83483C3F3B} = {B8F76A6B-2EEB-4E64-9F26-D84584E16B9C}
- {9B5CAE1A-E062-4C9B-8121-E58FBF69309C} = {B8F76A6B-2EEB-4E64-9F26-D84584E16B9C}
- {FFEC9DA6-1A13-480A-AE9E-2BF8763D3061} = {B8F76A6B-2EEB-4E64-9F26-D84584E16B9C}
- {4CE6E4AE-0BA4-4984-A4F1-A9A414B1BB8F} = {B8F76A6B-2EEB-4E64-9F26-D84584E16B9C}
{81CEA2ED-917B-41D8-BE0D-39A785B050C0} = {77B949E9-530E-45A5-9657-20F7D5C6875C}
{862CA181-BEE6-4870-82D2-B662E527ED8C} = {77B949E9-530E-45A5-9657-20F7D5C6875C}
- {DB46873F-981A-43D8-91B0-D464CCB65943} = {2317227D-7796-4E7B-BEDB-7CD1CAE7B853}
- {B79CE23C-10F8-48A5-A039-5940A188CF5A} = {DB46873F-981A-43D8-91B0-D464CCB65943}
- {846B781A-B77E-4F86-A31F-0B5B57AB0775} = {DB46873F-981A-43D8-91B0-D464CCB65943}
- {162821E4-8FE0-4A68-B3C0-49BD6596446F} = {DB46873F-981A-43D8-91B0-D464CCB65943}
- {10273544-715D-4BB3-893C-6F010D947BDD} = {DB46873F-981A-43D8-91B0-D464CCB65943}
- {5F49318F-E6C7-4194-BAE0-83D4FB8D1983} = {DB46873F-981A-43D8-91B0-D464CCB65943}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {23D6FBC9-C970-4641-BC1E-2AEA59F51C18}
diff --git a/Yi.Abp.Net8/framework/Yi.Framework.AspNetCore/Microsoft/AspNetCore/Middlewares/ApiInfoMiddleware.cs b/Yi.Abp.Net8/framework/Yi.Framework.AspNetCore/Microsoft/AspNetCore/Middlewares/ApiInfoMiddleware.cs
index 8a8bb7b7..94f0dd48 100644
--- a/Yi.Abp.Net8/framework/Yi.Framework.AspNetCore/Microsoft/AspNetCore/Middlewares/ApiInfoMiddleware.cs
+++ b/Yi.Abp.Net8/framework/Yi.Framework.AspNetCore/Microsoft/AspNetCore/Middlewares/ApiInfoMiddleware.cs
@@ -20,12 +20,12 @@ namespace Yi.Framework.AspNetCore.Microsoft.AspNetCore.Middlewares
/// 异步任务
public async Task InvokeAsync(HttpContext context, RequestDelegate next)
{
- // 在响应开始时处理文件下载相关的响应头
- context.Response.OnStarting(() =>
- {
- HandleFileDownloadResponse(context);
- return Task.CompletedTask;
- });
+ // // 在响应开始时处理文件下载相关的响应头
+ // context.Response.OnStarting(() =>
+ // {
+ // HandleFileDownloadResponse(context);
+ // return Task.CompletedTask;
+ // });
// 继续处理管道中的下一个中间件
await next(context);
diff --git a/Yi.Abp.Net8/module/ai-stock/Yi.Framework.Stock.Application.Contracts/Dtos/StockHolding/StockHoldingDto.cs b/Yi.Abp.Net8/module/ai-stock/Yi.Framework.Stock.Application.Contracts/Dtos/StockHolding/StockHoldingDto.cs
deleted file mode 100644
index 19dafdfe..00000000
--- a/Yi.Abp.Net8/module/ai-stock/Yi.Framework.Stock.Application.Contracts/Dtos/StockHolding/StockHoldingDto.cs
+++ /dev/null
@@ -1,66 +0,0 @@
-using System;
-using Volo.Abp.Application.Dtos;
-
-namespace Yi.Framework.Stock.Application.Contracts.Dtos.StockHolding
-{
- ///
- /// 用户股票持仓DTO
- ///
- public class StockHoldingDto : EntityDto
- {
- ///
- /// 用户ID
- ///
- public Guid UserId { get; set; }
-
- ///
- /// 股票ID
- ///
- public Guid StockId { get; set; }
-
- ///
- /// 股票代码
- ///
- public string StockCode { get; set; }
-
- ///
- /// 股票名称
- ///
- public string StockName { get; set; }
-
- ///
- /// 持有数量
- ///
- public int Quantity { get; set; }
-
- ///
- /// 持仓成本
- ///
- public decimal CostPrice { get; set; }
-
- ///
- /// 当前价格
- ///
- public decimal CurrentPrice { get; set; }
-
- ///
- /// 持仓市值
- ///
- public decimal MarketValue { get; set; }
-
- ///
- /// 盈亏金额
- ///
- public decimal ProfitLoss { get; set; }
-
- ///
- /// 盈亏百分比
- ///
- public decimal ProfitLossPercentage { get; set; }
-
- ///
- /// 创建时间
- ///
- public DateTime CreationTime { get; set; }
- }
-}
\ No newline at end of file
diff --git a/Yi.Abp.Net8/module/ai-stock/Yi.Framework.Stock.Application.Contracts/Dtos/StockHolding/StockHoldingGetListInputDto.cs b/Yi.Abp.Net8/module/ai-stock/Yi.Framework.Stock.Application.Contracts/Dtos/StockHolding/StockHoldingGetListInputDto.cs
deleted file mode 100644
index 8447c357..00000000
--- a/Yi.Abp.Net8/module/ai-stock/Yi.Framework.Stock.Application.Contracts/Dtos/StockHolding/StockHoldingGetListInputDto.cs
+++ /dev/null
@@ -1,21 +0,0 @@
-using System;
-using Volo.Abp.Application.Dtos;
-
-namespace Yi.Framework.Stock.Application.Contracts.Dtos.StockHolding
-{
- ///
- /// 获取用户持仓列表的输入DTO
- ///
- public class StockHoldingGetListInputDto : PagedAndSortedResultRequestDto
- {
- ///
- /// 股票代码
- ///
- public string? StockCode { get; set; }
-
- ///
- /// 股票名称
- ///
- public string? StockName { get; set; }
- }
-}
\ No newline at end of file
diff --git a/Yi.Abp.Net8/module/ai-stock/Yi.Framework.Stock.Application.Contracts/Dtos/StockMarket/BuyStockInputDto.cs b/Yi.Abp.Net8/module/ai-stock/Yi.Framework.Stock.Application.Contracts/Dtos/StockMarket/BuyStockInputDto.cs
deleted file mode 100644
index cc154d9d..00000000
--- a/Yi.Abp.Net8/module/ai-stock/Yi.Framework.Stock.Application.Contracts/Dtos/StockMarket/BuyStockInputDto.cs
+++ /dev/null
@@ -1,20 +0,0 @@
-using System;
-
-namespace Yi.Framework.Stock.Application.Contracts.Dtos.StockMarket
-{
- ///
- /// 买入股票输入DTO
- ///
- public class BuyStockInputDto
- {
- ///
- /// 股票ID
- ///
- public Guid StockId { get; set; }
-
- ///
- /// 买入数量
- ///
- public int Quantity { get; set; }
- }
-}
\ No newline at end of file
diff --git a/Yi.Abp.Net8/module/ai-stock/Yi.Framework.Stock.Application.Contracts/Dtos/StockMarket/CreateStockMarketInputDto.cs b/Yi.Abp.Net8/module/ai-stock/Yi.Framework.Stock.Application.Contracts/Dtos/StockMarket/CreateStockMarketInputDto.cs
deleted file mode 100644
index c0320597..00000000
--- a/Yi.Abp.Net8/module/ai-stock/Yi.Framework.Stock.Application.Contracts/Dtos/StockMarket/CreateStockMarketInputDto.cs
+++ /dev/null
@@ -1,23 +0,0 @@
-using System;
-
-namespace Yi.Framework.Stock.Application.Contracts.Dtos.StockMarket;
-///
-/// 创建股市输入DTO
-///
-public class CreateStockMarketInputDto
-{
- ///
- /// 股市代码
- ///
- public string MarketCode { get; set; }
-
- ///
- /// 股市名称
- ///
- public string MarketName { get; set; }
-
- ///
- /// 股市描述
- ///
- public string Description { get; set; }
-}
diff --git a/Yi.Abp.Net8/module/ai-stock/Yi.Framework.Stock.Application.Contracts/Dtos/StockMarket/SellStockInputDto.cs b/Yi.Abp.Net8/module/ai-stock/Yi.Framework.Stock.Application.Contracts/Dtos/StockMarket/SellStockInputDto.cs
deleted file mode 100644
index d552750e..00000000
--- a/Yi.Abp.Net8/module/ai-stock/Yi.Framework.Stock.Application.Contracts/Dtos/StockMarket/SellStockInputDto.cs
+++ /dev/null
@@ -1,20 +0,0 @@
-using System;
-
-namespace Yi.Framework.Stock.Application.Contracts.Dtos.StockMarket
-{
- ///
- /// 卖出股票输入DTO
- ///
- public class SellStockInputDto
- {
- ///
- /// 股票ID
- ///
- public Guid StockId { get; set; }
-
- ///
- /// 卖出数量
- ///
- public int Quantity { get; set; }
- }
-}
\ No newline at end of file
diff --git a/Yi.Abp.Net8/module/ai-stock/Yi.Framework.Stock.Application.Contracts/Dtos/StockMarket/StockMarketDto.cs b/Yi.Abp.Net8/module/ai-stock/Yi.Framework.Stock.Application.Contracts/Dtos/StockMarket/StockMarketDto.cs
deleted file mode 100644
index 19659159..00000000
--- a/Yi.Abp.Net8/module/ai-stock/Yi.Framework.Stock.Application.Contracts/Dtos/StockMarket/StockMarketDto.cs
+++ /dev/null
@@ -1,36 +0,0 @@
-using System;
-using Volo.Abp.Application.Dtos;
-
-namespace Yi.Framework.Stock.Application.Contracts.Dtos.StockMarket
-{
- ///
- /// 股市信息DTO
- ///
- public class StockMarketDto : EntityDto
- {
- ///
- /// 股市代码
- ///
- public string MarketCode { get; set; }
-
- ///
- /// 股市名称
- ///
- public string MarketName { get; set; }
-
- ///
- /// 股市描述
- ///
- public string Description { get; set; }
-
- ///
- /// 状态
- ///
- public bool State { get; set; }
-
- ///
- /// 创建时间
- ///
- public DateTime CreationTime { get; set; }
- }
-}
\ No newline at end of file
diff --git a/Yi.Abp.Net8/module/ai-stock/Yi.Framework.Stock.Application.Contracts/Dtos/StockMarket/StockMarketGetListInputDto.cs b/Yi.Abp.Net8/module/ai-stock/Yi.Framework.Stock.Application.Contracts/Dtos/StockMarket/StockMarketGetListInputDto.cs
deleted file mode 100644
index 38cf5faa..00000000
--- a/Yi.Abp.Net8/module/ai-stock/Yi.Framework.Stock.Application.Contracts/Dtos/StockMarket/StockMarketGetListInputDto.cs
+++ /dev/null
@@ -1,26 +0,0 @@
-using System;
-using Volo.Abp.Application.Dtos;
-
-namespace Yi.Framework.Stock.Application.Contracts.Dtos.StockMarket
-{
- ///
- /// 获取股市列表的输入DTO
- ///
- public class StockMarketGetListInputDto : PagedAndSortedResultRequestDto
- {
- ///
- /// 股市代码
- ///
- public string? MarketCode { get; set; }
-
- ///
- /// 股市名称
- ///
- public string? MarketName { get; set; }
-
- ///
- /// 状态
- ///
- public bool? State { get; set; }
- }
-}
\ No newline at end of file
diff --git a/Yi.Abp.Net8/module/ai-stock/Yi.Framework.Stock.Application.Contracts/Dtos/StockNews/StockNewsDto.cs b/Yi.Abp.Net8/module/ai-stock/Yi.Framework.Stock.Application.Contracts/Dtos/StockNews/StockNewsDto.cs
deleted file mode 100644
index 6a4150b2..00000000
--- a/Yi.Abp.Net8/module/ai-stock/Yi.Framework.Stock.Application.Contracts/Dtos/StockNews/StockNewsDto.cs
+++ /dev/null
@@ -1,41 +0,0 @@
-using System;
-using Volo.Abp.Application.Dtos;
-
-namespace Yi.Framework.Stock.Application.Contracts.Dtos.StockNews
-{
- ///
- /// 股市新闻DTO
- ///
- public class StockNewsDto : EntityDto
- {
- ///
- /// 新闻标题
- ///
- public string Title { get; set; }
-
- ///
- /// 新闻内容
- ///
- public string Content { get; set; }
-
- ///
- /// 发布时间
- ///
- public DateTime PublishTime { get; set; }
-
- ///
- /// 新闻来源
- ///
- public string Source { get; set; }
-
- ///
- /// 创建时间
- ///
- public DateTime CreationTime { get; set; }
-
- ///
- /// 排序号
- ///
- public int OrderNum { get; set; }
- }
-}
\ No newline at end of file
diff --git a/Yi.Abp.Net8/module/ai-stock/Yi.Framework.Stock.Application.Contracts/Dtos/StockNews/StockNewsGetListInputDto.cs b/Yi.Abp.Net8/module/ai-stock/Yi.Framework.Stock.Application.Contracts/Dtos/StockNews/StockNewsGetListInputDto.cs
deleted file mode 100644
index 4a934fcd..00000000
--- a/Yi.Abp.Net8/module/ai-stock/Yi.Framework.Stock.Application.Contracts/Dtos/StockNews/StockNewsGetListInputDto.cs
+++ /dev/null
@@ -1,37 +0,0 @@
-using System;
-using Volo.Abp.Application.Dtos;
-
-namespace Yi.Framework.Stock.Application.Contracts.Dtos.StockNews
-{
- ///
- /// 获取股市新闻列表的输入DTO
- ///
- public class StockNewsGetListInputDto : PagedAndSortedResultRequestDto
- {
- ///
- /// 新闻标题关键词
- ///
- public string? Title { get; set; }
-
- ///
- /// 新闻来源
- ///
- public string? Source { get; set; }
-
- ///
- /// 开始时间
- ///
- public DateTime? StartTime { get; set; }
-
- ///
- /// 结束时间
- ///
- public DateTime? EndTime { get; set; }
-
- ///
- /// 是否只显示最近10天的新闻
- ///
- /// 默认为true,查询最近10天的新闻
- public bool IsRecent { get; set; } = true;
- }
-}
\ No newline at end of file
diff --git a/Yi.Abp.Net8/module/ai-stock/Yi.Framework.Stock.Application.Contracts/Dtos/StockPrice/StockPriceRecordDto.cs b/Yi.Abp.Net8/module/ai-stock/Yi.Framework.Stock.Application.Contracts/Dtos/StockPrice/StockPriceRecordDto.cs
deleted file mode 100644
index 8b7b5574..00000000
--- a/Yi.Abp.Net8/module/ai-stock/Yi.Framework.Stock.Application.Contracts/Dtos/StockPrice/StockPriceRecordDto.cs
+++ /dev/null
@@ -1,47 +0,0 @@
-using System;
-using Volo.Abp.Application.Dtos;
-using Yi.Framework.Stock.Domain.Shared;
-
-namespace Yi.Framework.Stock.Application.Contracts.Dtos.StockPrice
-{
- ///
- /// 股市价格记录DTO
- ///
- public class StockPriceRecordDto : EntityDto
- {
- ///
- /// 股票ID
- ///
- public Guid StockId { get; set; }
-
- ///
- /// 记录时间
- ///
- public DateTime CreationTime { get; set; }
-
- ///
- /// 当前价
- ///
- public decimal CurrentPrice { get; set; }
-
- ///
- /// 交易量
- ///
- public long Volume { get; set; }
-
- ///
- /// 交易额
- ///
- public decimal Turnover { get; set; }
-
- ///
- /// 时间周期类型
- ///
- public PeriodTypeEnum PeriodType { get; set; }
-
- ///
- /// 记录时间
- ///
- public DateTime RecordTime { get; set; }
- }
-}
\ No newline at end of file
diff --git a/Yi.Abp.Net8/module/ai-stock/Yi.Framework.Stock.Application.Contracts/Dtos/StockPrice/StockPriceRecordGetListInputDto.cs b/Yi.Abp.Net8/module/ai-stock/Yi.Framework.Stock.Application.Contracts/Dtos/StockPrice/StockPriceRecordGetListInputDto.cs
deleted file mode 100644
index 84fcf6e1..00000000
--- a/Yi.Abp.Net8/module/ai-stock/Yi.Framework.Stock.Application.Contracts/Dtos/StockPrice/StockPriceRecordGetListInputDto.cs
+++ /dev/null
@@ -1,32 +0,0 @@
-using System;
-using Volo.Abp.Application.Dtos;
-using Yi.Framework.Stock.Domain.Shared;
-
-namespace Yi.Framework.Stock.Application.Contracts.Dtos.StockPrice
-{
- ///
- /// 获取股市价格记录的输入DTO
- ///
- public class StockPriceRecordGetListInputDto : PagedAndSortedResultRequestDto
- {
- ///
- /// 股票ID
- ///
- public Guid? StockId { get; set; }
-
- ///
- /// 开始时间
- ///
- public DateTime? StartTime { get; set; }
-
- ///
- /// 结束时间
- ///
- public DateTime? EndTime { get; set; }
-
- ///
- /// 时间周期类型
- ///
- public PeriodTypeEnum? PeriodType { get; set; }
- }
-}
\ No newline at end of file
diff --git a/Yi.Abp.Net8/module/ai-stock/Yi.Framework.Stock.Application.Contracts/Dtos/StockTransaction/StockTransactionDto.cs b/Yi.Abp.Net8/module/ai-stock/Yi.Framework.Stock.Application.Contracts/Dtos/StockTransaction/StockTransactionDto.cs
deleted file mode 100644
index 955af11d..00000000
--- a/Yi.Abp.Net8/module/ai-stock/Yi.Framework.Stock.Application.Contracts/Dtos/StockTransaction/StockTransactionDto.cs
+++ /dev/null
@@ -1,62 +0,0 @@
-using System;
-using Volo.Abp.Application.Dtos;
-using Yi.Framework.Stock.Domain.Shared;
-
-namespace Yi.Framework.Stock.Application.Contracts.Dtos.StockTransaction
-{
- ///
- /// 股票交易记录DTO
- ///
- public class StockTransactionDto : EntityDto
- {
- ///
- /// 用户ID
- ///
- public Guid UserId { get; set; }
-
- ///
- /// 股票ID
- ///
- public Guid StockId { get; set; }
-
- ///
- /// 股票代码
- ///
- public string StockCode { get; set; }
-
- ///
- /// 股票名称
- ///
- public string StockName { get; set; }
-
- ///
- /// 交易类型
- ///
- public TransactionTypeEnum TransactionType { get; set; }
-
- ///
- /// 交易价格
- ///
- public decimal Price { get; set; }
-
- ///
- /// 交易数量
- ///
- public int Quantity { get; set; }
-
- ///
- /// 交易总额
- ///
- public decimal TotalAmount { get; set; }
-
- ///
- /// 交易费用
- ///
- public decimal Fee { get; set; }
-
- ///
- /// 交易时间
- ///
- public DateTime CreationTime { get; set; }
- }
-}
\ No newline at end of file
diff --git a/Yi.Abp.Net8/module/ai-stock/Yi.Framework.Stock.Application.Contracts/Dtos/StockTransaction/StockTransactionGetListInputDto.cs b/Yi.Abp.Net8/module/ai-stock/Yi.Framework.Stock.Application.Contracts/Dtos/StockTransaction/StockTransactionGetListInputDto.cs
deleted file mode 100644
index 9c00eb73..00000000
--- a/Yi.Abp.Net8/module/ai-stock/Yi.Framework.Stock.Application.Contracts/Dtos/StockTransaction/StockTransactionGetListInputDto.cs
+++ /dev/null
@@ -1,37 +0,0 @@
-using System;
-using Volo.Abp.Application.Dtos;
-using Yi.Framework.Stock.Domain.Shared;
-
-namespace Yi.Framework.Stock.Application.Contracts.Dtos.StockTransaction
-{
- ///
- /// 获取交易记录的输入DTO
- ///
- public class StockTransactionGetListInputDto : PagedAndSortedResultRequestDto
- {
- ///
- /// 股票代码
- ///
- public string? StockCode { get; set; }
-
- ///
- /// 股票名称
- ///
- public string? StockName { get; set; }
-
- ///
- /// 交易类型
- ///
- public TransactionTypeEnum? TransactionType { get; set; }
-
- ///
- /// 开始时间
- ///
- public DateTime? StartTime { get; set; }
-
- ///
- /// 结束时间
- ///
- public DateTime? EndTime { get; set; }
- }
-}
\ No newline at end of file
diff --git a/Yi.Abp.Net8/module/ai-stock/Yi.Framework.Stock.Application.Contracts/IServices/IStockHoldingService.cs b/Yi.Abp.Net8/module/ai-stock/Yi.Framework.Stock.Application.Contracts/IServices/IStockHoldingService.cs
deleted file mode 100644
index 1f4cdd09..00000000
--- a/Yi.Abp.Net8/module/ai-stock/Yi.Framework.Stock.Application.Contracts/IServices/IStockHoldingService.cs
+++ /dev/null
@@ -1,29 +0,0 @@
-using System;
-using System.Threading.Tasks;
-using Volo.Abp.Application.Dtos;
-using Volo.Abp.Application.Services;
-using Yi.Framework.Stock.Application.Contracts.Dtos.StockHolding;
-using Yi.Framework.Stock.Application.Contracts.Dtos.StockTransaction;
-
-namespace Yi.Framework.Stock.Application.Contracts.IServices
-{
- ///
- /// 用户持仓服务接口
- ///
- public interface IStockHoldingService : IApplicationService
- {
- ///
- /// 获取当前用户的持仓列表
- ///
- /// 查询条件
- /// 持仓列表
- Task> GetUserHoldingsAsync(StockHoldingGetListInputDto input);
-
- ///
- /// 获取当前用户的交易记录
- ///
- /// 查询条件
- /// 交易记录列表
- Task> GetUserTransactionsAsync(StockTransactionGetListInputDto input);
- }
-}
\ No newline at end of file
diff --git a/Yi.Abp.Net8/module/ai-stock/Yi.Framework.Stock.Application.Contracts/IServices/IStockMarketService.cs b/Yi.Abp.Net8/module/ai-stock/Yi.Framework.Stock.Application.Contracts/IServices/IStockMarketService.cs
deleted file mode 100644
index 1a7fc6df..00000000
--- a/Yi.Abp.Net8/module/ai-stock/Yi.Framework.Stock.Application.Contracts/IServices/IStockMarketService.cs
+++ /dev/null
@@ -1,49 +0,0 @@
-using System;
-using System.Threading.Tasks;
-using Volo.Abp.Application.Dtos;
-using Volo.Abp.Application.Services;
-using Yi.Framework.Stock.Application.Contracts.Dtos.StockMarket;
-using Yi.Framework.Stock.Application.Contracts.Dtos.StockPrice;
-
-namespace Yi.Framework.Stock.Application.Contracts.IServices
-{
- ///
- /// 股市服务接口
- ///
- public interface IStockMarketService : IApplicationService
- {
- ///
- /// 获取股市列表
- ///
- /// 查询条件
- /// 股市列表
- Task> GetStockMarketListAsync(StockMarketGetListInputDto input);
-
- ///
- /// 获取股市价格记录看板
- ///
- /// 查询条件
- /// 股价记录列表
- Task> GetStockPriceRecordListAsync(StockPriceRecordGetListInputDto input);
-
- ///
- /// 买入股票
- ///
- /// 买入股票参数
- /// 操作结果
- Task BuyStockAsync(BuyStockInputDto input);
-
- ///
- /// 卖出股票
- ///
- /// 卖出股票参数
- /// 操作结果
- Task SellStockAsync(SellStockInputDto input);
-
- ///
- /// 生成最新股票记录
- ///
- /// 操作结果
- Task GenerateStocksAsync();
- }
-}
\ No newline at end of file
diff --git a/Yi.Abp.Net8/module/ai-stock/Yi.Framework.Stock.Application.Contracts/IServices/IStockNewsService.cs b/Yi.Abp.Net8/module/ai-stock/Yi.Framework.Stock.Application.Contracts/IServices/IStockNewsService.cs
deleted file mode 100644
index 5689682c..00000000
--- a/Yi.Abp.Net8/module/ai-stock/Yi.Framework.Stock.Application.Contracts/IServices/IStockNewsService.cs
+++ /dev/null
@@ -1,20 +0,0 @@
-using System.Threading.Tasks;
-using Volo.Abp.Application.Dtos;
-using Volo.Abp.Application.Services;
-using Yi.Framework.Stock.Application.Contracts.Dtos.StockNews;
-
-namespace Yi.Framework.Stock.Application.Contracts.IServices
-{
- ///
- /// 股市新闻服务接口
- ///
- public interface IStockNewsService : IApplicationService
- {
- ///
- /// 获取股市新闻列表
- ///
- /// 查询条件
- /// 新闻列表
- Task> GetStockNewsListAsync(StockNewsGetListInputDto input);
- }
-}
\ No newline at end of file
diff --git a/Yi.Abp.Net8/module/ai-stock/Yi.Framework.Stock.Application.Contracts/Yi.Framework.Stock.Application.Contracts.csproj b/Yi.Abp.Net8/module/ai-stock/Yi.Framework.Stock.Application.Contracts/Yi.Framework.Stock.Application.Contracts.csproj
deleted file mode 100644
index ae605feb..00000000
--- a/Yi.Abp.Net8/module/ai-stock/Yi.Framework.Stock.Application.Contracts/Yi.Framework.Stock.Application.Contracts.csproj
+++ /dev/null
@@ -1,15 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/Yi.Abp.Net8/module/ai-stock/Yi.Framework.Stock.Application.Contracts/YiFrameworkStockApplicationContractsModule.cs b/Yi.Abp.Net8/module/ai-stock/Yi.Framework.Stock.Application.Contracts/YiFrameworkStockApplicationContractsModule.cs
deleted file mode 100644
index cdafbd0d..00000000
--- a/Yi.Abp.Net8/module/ai-stock/Yi.Framework.Stock.Application.Contracts/YiFrameworkStockApplicationContractsModule.cs
+++ /dev/null
@@ -1,17 +0,0 @@
-using Volo.Abp.SettingManagement;
-using Yi.Framework.Stock.Domain.Shared;
-using Yi.Framework.Ddd.Application.Contracts;
-
-namespace Yi.Framework.Stock.Application.Contracts
-{
- [DependsOn(
- typeof(YiFrameworkStockDomainSharedModule),
-
- typeof(AbpSettingManagementApplicationContractsModule),
-
- typeof(YiFrameworkDddApplicationContractsModule))]
- public class YiFrameworkStockApplicationContractsModule:AbpModule
- {
-
- }
-}
\ No newline at end of file
diff --git a/Yi.Abp.Net8/module/ai-stock/Yi.Framework.Stock.Application/Services/StockHoldingService.cs b/Yi.Abp.Net8/module/ai-stock/Yi.Framework.Stock.Application/Services/StockHoldingService.cs
deleted file mode 100644
index 4f1f8959..00000000
--- a/Yi.Abp.Net8/module/ai-stock/Yi.Framework.Stock.Application/Services/StockHoldingService.cs
+++ /dev/null
@@ -1,107 +0,0 @@
-using System;
-using System.Threading.Tasks;
-using Microsoft.AspNetCore.Authorization;
-using Microsoft.AspNetCore.Mvc;
-using SqlSugar;
-using Volo.Abp.Application.Dtos;
-using Volo.Abp.Application.Services;
-using Yi.Framework.Stock.Application.Contracts.Dtos.StockHolding;
-using Yi.Framework.Stock.Application.Contracts.Dtos.StockTransaction;
-using Yi.Framework.Stock.Application.Contracts.IServices;
-using Yi.Framework.Stock.Domain.Entities;
-using Yi.Framework.SqlSugarCore.Abstractions;
-using Volo.Abp.Users;
-
-namespace Yi.Framework.Stock.Application.Services
-{
- ///
- /// 用户持仓服务实现
- ///
- [Authorize]
- public class StockHoldingService : ApplicationService, IStockHoldingService
- {
- private readonly ISqlSugarRepository _stockHoldingRepository;
- private readonly ISqlSugarRepository _stockTransactionRepository;
-
- public StockHoldingService(
- ISqlSugarRepository stockHoldingRepository,
- ISqlSugarRepository stockTransactionRepository)
- {
- _stockHoldingRepository = stockHoldingRepository;
- _stockTransactionRepository = stockTransactionRepository;
- }
-
- ///
- /// 获取当前用户的持仓列表
- ///
- [Authorize]
- [HttpGet("stock/user-holdings")]
- public async Task> GetUserHoldingsAsync(StockHoldingGetListInputDto input)
- {
- Guid userId = CurrentUser.GetId();
- RefAsync total = 0;
-
- var query = _stockHoldingRepository._DbQueryable
- .Where(h => h.UserId == userId)
- .WhereIF(!string.IsNullOrEmpty(input.StockCode), h => h.StockCode.Contains(input.StockCode))
- .WhereIF(!string.IsNullOrEmpty(input.StockName), h => h.StockName.Contains(input.StockName))
- .OrderByIF(!string.IsNullOrEmpty(input.Sorting),input.Sorting)
- .OrderByIF(string.IsNullOrEmpty(input.Sorting),t=>t.CreationTime,OrderByType.Desc);
-
- var list = await query
- .Select(h => new StockHoldingDto
- {
- Id = h.Id,
- UserId = h.UserId,
- StockId = h.StockId,
- StockCode = h.StockCode,
- StockName = h.StockName,
- Quantity = h.Quantity,
- CreationTime = h.CreationTime
- })
- .ToPageListAsync(input.SkipCount, input.MaxResultCount, total);
-
- return new PagedResultDto(total, list);
- }
-
- ///
- /// 获取当前用户的交易记录
- ///
- [Authorize]
- [HttpGet("stock/user-transactions")]
- public async Task> GetUserTransactionsAsync(StockTransactionGetListInputDto input)
- {
- Guid userId = CurrentUser.GetId();
- RefAsync total = 0;
-
- var query = _stockTransactionRepository._DbQueryable
- .Where(t => t.UserId == userId)
- .WhereIF(!string.IsNullOrEmpty(input.StockCode), t => t.StockCode.Contains(input.StockCode))
- .WhereIF(!string.IsNullOrEmpty(input.StockName), t => t.StockName.Contains(input.StockName))
- .WhereIF(input.TransactionType.HasValue, t => t.TransactionType == input.TransactionType.Value)
- .WhereIF(input.StartTime.HasValue, t => t.CreationTime >= input.StartTime.Value)
- .WhereIF(input.EndTime.HasValue, t => t.CreationTime <= input.EndTime.Value)
- .OrderByIF(!string.IsNullOrEmpty(input.Sorting),input.Sorting)
- .OrderByIF(string.IsNullOrEmpty(input.Sorting),t=>t.CreationTime,OrderByType.Desc);
-
- var list = await query
- .Select(t => new StockTransactionDto
- {
- Id = t.Id,
- UserId = t.UserId,
- StockId = t.StockId,
- StockCode = t.StockCode,
- StockName = t.StockName,
- TransactionType = t.TransactionType,
- Price = t.Price,
- Quantity = t.Quantity,
- TotalAmount = t.TotalAmount,
- Fee = t.Fee,
- CreationTime = t.CreationTime
- })
- .ToPageListAsync(input.SkipCount, input.MaxResultCount, total);
-
- return new PagedResultDto(total, list);
- }
- }
-}
\ No newline at end of file
diff --git a/Yi.Abp.Net8/module/ai-stock/Yi.Framework.Stock.Application/Services/StockMarketService.cs b/Yi.Abp.Net8/module/ai-stock/Yi.Framework.Stock.Application/Services/StockMarketService.cs
deleted file mode 100644
index 2f22bfb2..00000000
--- a/Yi.Abp.Net8/module/ai-stock/Yi.Framework.Stock.Application/Services/StockMarketService.cs
+++ /dev/null
@@ -1,167 +0,0 @@
-using System;
-using System.Threading.Tasks;
-using Microsoft.AspNetCore.Authorization;
-using Microsoft.AspNetCore.Mvc;
-using SqlSugar;
-using Volo.Abp.Application.Dtos;
-using Volo.Abp.Application.Services;
-using Volo.Abp.Users;
-using Yi.Framework.Stock.Application.Contracts.Dtos.StockMarket;
-using Yi.Framework.Stock.Application.Contracts.Dtos.StockPrice;
-using Yi.Framework.Stock.Application.Contracts.IServices;
-using Yi.Framework.Stock.Domain.Entities;
-using Yi.Framework.SqlSugarCore.Abstractions;
-using Yi.Framework.Stock.Domain.Managers;
-using Mapster;
-
-namespace Yi.Framework.Stock.Application.Services
-{
- ///
- /// 股市服务实现
- ///
- public class StockMarketService : ApplicationService, IStockMarketService
- {
- private readonly ISqlSugarRepository _stockMarketRepository;
- private readonly ISqlSugarRepository _stockPriceRecordRepository;
- private readonly StockMarketManager _stockMarketManager;
-
- public StockMarketService(
- ISqlSugarRepository stockMarketRepository,
- ISqlSugarRepository stockPriceRecordRepository,
- StockMarketManager stockMarketManager)
- {
- _stockMarketRepository = stockMarketRepository;
- _stockPriceRecordRepository = stockPriceRecordRepository;
- _stockMarketManager = stockMarketManager;
- }
-
- ///
- /// 创建股市
- ///
- [HttpPost("stock/markets")]
- [Authorize]
- public async Task CreateStockMarketAsync(CreateStockMarketInputDto input)
- {
- // 使用映射将输入DTO转换为实体
- var stockMarket = input.Adapt();
-
- // 保存到数据库
- var result = await _stockMarketRepository.InsertReturnEntityAsync(stockMarket);
-
- // 使用映射将实体转换为返回DTO
- return result.Adapt();
- }
-
- ///
- /// 获取股市列表
- ///
- [HttpGet("stock/markets")]
- public async Task> GetStockMarketListAsync(StockMarketGetListInputDto input)
- {
- RefAsync total = 0;
-
- var query = _stockMarketRepository._DbQueryable
- .WhereIF(!string.IsNullOrEmpty(input.MarketCode), m => m.MarketCode.Contains(input.MarketCode))
- .WhereIF(!string.IsNullOrEmpty(input.MarketName), m => m.MarketName.Contains(input.MarketName))
- .WhereIF(input.State.HasValue, m => m.State == input.State.Value)
- .OrderByIF(!string.IsNullOrEmpty(input.Sorting),input.Sorting)
- .OrderByIF(string.IsNullOrEmpty(input.Sorting),m=>m.OrderNum,OrderByType.Asc)
- .OrderByIF(string.IsNullOrEmpty(input.Sorting),m=>m.CreationTime,OrderByType.Desc);
-
- var list = await query
- .Select(m => new StockMarketDto
- {
- Id = m.Id,
- MarketCode = m.MarketCode,
- MarketName = m.MarketName,
- Description = m.Description,
- State = m.State,
- CreationTime = m.CreationTime
- })
- .ToPageListAsync(input.SkipCount, input.MaxResultCount, total);
-
- return new PagedResultDto(total, list);
- }
-
- ///
- /// 获取股市价格记录看板
- ///
- [HttpGet("stock/price-records")]
- public async Task> GetStockPriceRecordListAsync(StockPriceRecordGetListInputDto input)
- {
- RefAsync total = 0;
-
- var query = _stockPriceRecordRepository._DbQueryable
- .WhereIF(input.StockId.HasValue, p => p.StockId == input.StockId.Value)
- .WhereIF(input.StartTime.HasValue, p => p.RecordTime >= input.StartTime.Value)
- .WhereIF(input.EndTime.HasValue, p => p.RecordTime <= input.EndTime.Value)
- .WhereIF(input.PeriodType.HasValue, p => p.PeriodType == input.PeriodType.Value)
- .Where(x=>x.RecordTime<=DateTime.Now)
- .OrderByIF(!string.IsNullOrEmpty(input.Sorting),input.Sorting)
- .OrderByIF(string.IsNullOrEmpty(input.Sorting),p=>p.RecordTime);
-
- var list = await query
- .Select(p => new StockPriceRecordDto
- {
- Id = p.Id,
- StockId = p.StockId,
- CreationTime = p.CreationTime,
- RecordTime = p.RecordTime,
- CurrentPrice = p.CurrentPrice,
- Volume = p.Volume,
- Turnover = p.Turnover,
- PeriodType = p.PeriodType
- })
- .ToPageListAsync(input.SkipCount, input.MaxResultCount, total);
-
- return new PagedResultDto(total, list);
- }
-
- ///
- /// 买入股票
- ///
- [HttpPost("stock/buy")]
- [Authorize]
- public async Task BuyStockAsync(BuyStockInputDto input)
- {
- // 获取当前登录用户ID
- var userId = CurrentUser.GetId();
-
- // 调用领域服务进行股票购买
- await _stockMarketManager.BuyStockAsync(
- userId,
- input.StockId,
- input.Quantity
- );
- }
-
- ///
- /// 卖出股票
- ///
- [HttpDelete("stock/sell")]
- [Authorize]
- public async Task SellStockAsync(SellStockInputDto input)
- {
- // 获取当前登录用户ID
- var userId = CurrentUser.GetId();
-
- // 调用领域服务进行股票卖出
- await _stockMarketManager.SellStockAsync(
- userId,
- input.StockId,
- input.Quantity
- );
- }
-
- ///
- /// 生成最新股票记录
- ///
- [HttpPost("stock/generate")]
- [Authorize]
- public async Task GenerateStocksAsync()
- {
- await _stockMarketManager.GenerateStocksAsync();
- }
-
- }
-}
\ No newline at end of file
diff --git a/Yi.Abp.Net8/module/ai-stock/Yi.Framework.Stock.Application/Services/StockNewsService.cs b/Yi.Abp.Net8/module/ai-stock/Yi.Framework.Stock.Application/Services/StockNewsService.cs
deleted file mode 100644
index 1dd4ced1..00000000
--- a/Yi.Abp.Net8/module/ai-stock/Yi.Framework.Stock.Application/Services/StockNewsService.cs
+++ /dev/null
@@ -1,80 +0,0 @@
-using System;
-using System.Threading.Tasks;
-using Microsoft.AspNetCore.Mvc;
-using SqlSugar;
-using Volo.Abp.Application.Dtos;
-using Volo.Abp.Application.Services;
-using Yi.Framework.Stock.Application.Contracts.Dtos.StockNews;
-using Yi.Framework.Stock.Application.Contracts.IServices;
-using Yi.Framework.Stock.Domain.Entities;
-using Yi.Framework.SqlSugarCore.Abstractions;
-using Yi.Framework.Stock.Domain.Managers;
-
-namespace Yi.Framework.Stock.Application.Services
-{
- ///
- /// 股市新闻服务实现
- ///
- public class StockNewsService : ApplicationService, IStockNewsService
- {
- private readonly ISqlSugarRepository _stockNewsRepository;
- private readonly NewsManager _newsManager;
-
- public StockNewsService(
- ISqlSugarRepository stockNewsRepository,
- NewsManager newsManager)
- {
- _stockNewsRepository = stockNewsRepository;
- _newsManager = newsManager;
- }
-
- ///
- /// 获取股市新闻列表
- ///
- [HttpGet("/api/app/stock/news")]
- public async Task> GetStockNewsListAsync(StockNewsGetListInputDto input)
- {
- RefAsync total = 0;
-
- // 计算10天前的日期
- DateTime tenDaysAgo = DateTime.Now.AddDays(-10);
-
- var query = _stockNewsRepository._DbQueryable
- .WhereIF(!string.IsNullOrEmpty(input.Title), n => n.Title.Contains(input.Title))
- .WhereIF(!string.IsNullOrEmpty(input.Source), n => n.Source.Contains(input.Source))
- .WhereIF(input.StartTime.HasValue, n => n.PublishTime >= input.StartTime.Value)
- .WhereIF(input.EndTime.HasValue, n => n.PublishTime <= input.EndTime.Value)
- // 如果IsRecent为true,则只查询最近10天的新闻
- .WhereIF(input.IsRecent, n => n.PublishTime >= tenDaysAgo)
- .OrderByIF(!string.IsNullOrEmpty(input.Sorting),input.Sorting)
- .OrderByIF(string.IsNullOrEmpty(input.Sorting),n=>n.OrderNum,OrderByType.Asc)
- .OrderByIF(string.IsNullOrEmpty(input.Sorting),n=>n.PublishTime,OrderByType.Desc) ;
-
-
- var list = await query
- .Select(n => new StockNewsDto
- {
- Id = n.Id,
- Title = n.Title,
- Content = n.Content,
- PublishTime = n.PublishTime,
- Source = n.Source,
- CreationTime = n.CreationTime,
- OrderNum = n.OrderNum
- })
- .ToPageListAsync(input.SkipCount, input.MaxResultCount, total);
-
- return new PagedResultDto(total, list);
- }
-
- ///
- /// 生成股市新闻
- ///
- /// 生成结果
- [HttpPost("/api/app/stock/news/generate")]
- public async Task GenerateNewsAsync()
- {
- await _newsManager.GenerateNewsAsync();
- }
- }
-}
\ No newline at end of file
diff --git a/Yi.Abp.Net8/module/ai-stock/Yi.Framework.Stock.Application/Yi.Framework.Stock.Application.csproj b/Yi.Abp.Net8/module/ai-stock/Yi.Framework.Stock.Application/Yi.Framework.Stock.Application.csproj
deleted file mode 100644
index 2e7ba8dc..00000000
--- a/Yi.Abp.Net8/module/ai-stock/Yi.Framework.Stock.Application/Yi.Framework.Stock.Application.csproj
+++ /dev/null
@@ -1,12 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/Yi.Abp.Net8/module/ai-stock/Yi.Framework.Stock.Application/YiFrameworkStockApplicationModule.cs b/Yi.Abp.Net8/module/ai-stock/Yi.Framework.Stock.Application/YiFrameworkStockApplicationModule.cs
deleted file mode 100644
index 67554bdd..00000000
--- a/Yi.Abp.Net8/module/ai-stock/Yi.Framework.Stock.Application/YiFrameworkStockApplicationModule.cs
+++ /dev/null
@@ -1,17 +0,0 @@
-using Yi.Framework.Stock.Application.Contracts;
-using Yi.Framework.Stock.Domain;
-using Yi.Framework.Ddd.Application;
-
-namespace Yi.Framework.Stock.Application
-{
- [DependsOn(
- typeof(YiFrameworkStockApplicationContractsModule),
- typeof(YiFrameworkStockDomainModule),
-
- typeof(YiFrameworkDddApplicationModule)
-
- )]
- public class YiFrameworkStockApplicationModule : AbpModule
- {
- }
-}
\ No newline at end of file
diff --git a/Yi.Abp.Net8/module/ai-stock/Yi.Framework.Stock.Domain.Shared/Enums/PeriodTypeEnum.cs b/Yi.Abp.Net8/module/ai-stock/Yi.Framework.Stock.Domain.Shared/Enums/PeriodTypeEnum.cs
deleted file mode 100644
index 4ca57fa4..00000000
--- a/Yi.Abp.Net8/module/ai-stock/Yi.Framework.Stock.Domain.Shared/Enums/PeriodTypeEnum.cs
+++ /dev/null
@@ -1,41 +0,0 @@
-namespace Yi.Framework.Stock.Domain.Shared
-{
- ///
- /// 时间周期类型枚举
- ///
- ///
- /// 用于定义股票价格记录的时间周期类型
- ///
- public enum PeriodTypeEnum
- {
- ///
- /// 分钟
- ///
- Minute = 0,
-
- ///
- /// 小时
- ///
- Hour = 1,
-
- ///
- /// 天
- ///
- Day = 2,
-
- ///
- /// 周
- ///
- Week = 3,
-
- ///
- /// 月
- ///
- Month = 4,
-
- ///
- /// 年
- ///
- Year = 5
- }
-}
\ No newline at end of file
diff --git a/Yi.Abp.Net8/module/ai-stock/Yi.Framework.Stock.Domain.Shared/Enums/TransactionTypeEnum.cs b/Yi.Abp.Net8/module/ai-stock/Yi.Framework.Stock.Domain.Shared/Enums/TransactionTypeEnum.cs
deleted file mode 100644
index b8e0d6d3..00000000
--- a/Yi.Abp.Net8/module/ai-stock/Yi.Framework.Stock.Domain.Shared/Enums/TransactionTypeEnum.cs
+++ /dev/null
@@ -1,18 +0,0 @@
-namespace Yi.Framework.Stock.Domain.Shared
-{
- ///
- /// 交易类型枚举
- ///
- public enum TransactionTypeEnum
- {
- ///
- /// 买入
- ///
- Buy = 0,
-
- ///
- /// 卖出
- ///
- Sell = 1
- }
-}
\ No newline at end of file
diff --git a/Yi.Abp.Net8/module/ai-stock/Yi.Framework.Stock.Domain.Shared/Etos/StockTransactionEto.cs b/Yi.Abp.Net8/module/ai-stock/Yi.Framework.Stock.Domain.Shared/Etos/StockTransactionEto.cs
deleted file mode 100644
index e37f07d9..00000000
--- a/Yi.Abp.Net8/module/ai-stock/Yi.Framework.Stock.Domain.Shared/Etos/StockTransactionEto.cs
+++ /dev/null
@@ -1,56 +0,0 @@
-using System;
-using Yi.Framework.Stock.Domain.Shared;
-
-namespace Yi.Framework.Stock.Domain.Shared.Etos
-{
- ///
- /// 股票交易事件数据传输对象
- ///
- public class StockTransactionEto
- {
- ///
- /// 用户ID
- ///
- public Guid UserId { get; set; }
-
- ///
- /// 股票ID
- ///
- public Guid StockId { get; set; }
-
- ///
- /// 股票代码
- ///
- public string StockCode { get; set; }
-
- ///
- /// 股票名称
- ///
- public string StockName { get; set; }
-
- ///
- /// 交易类型
- ///
- public TransactionTypeEnum TransactionType { get; set; }
-
- ///
- /// 交易价格
- ///
- public decimal Price { get; set; }
-
- ///
- /// 交易数量
- ///
- public int Quantity { get; set; }
-
- ///
- /// 交易总额
- ///
- public decimal TotalAmount { get; set; }
-
- ///
- /// 交易费用
- ///
- public decimal Fee { get; set; }
- }
-}
\ No newline at end of file
diff --git a/Yi.Abp.Net8/module/ai-stock/Yi.Framework.Stock.Domain.Shared/Yi.Framework.Stock.Domain.Shared.csproj b/Yi.Abp.Net8/module/ai-stock/Yi.Framework.Stock.Domain.Shared/Yi.Framework.Stock.Domain.Shared.csproj
deleted file mode 100644
index 94311f04..00000000
--- a/Yi.Abp.Net8/module/ai-stock/Yi.Framework.Stock.Domain.Shared/Yi.Framework.Stock.Domain.Shared.csproj
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/Yi.Abp.Net8/module/ai-stock/Yi.Framework.Stock.Domain.Shared/YiFrameworkStockDomainSharedModule.cs b/Yi.Abp.Net8/module/ai-stock/Yi.Framework.Stock.Domain.Shared/YiFrameworkStockDomainSharedModule.cs
deleted file mode 100644
index a351386f..00000000
--- a/Yi.Abp.Net8/module/ai-stock/Yi.Framework.Stock.Domain.Shared/YiFrameworkStockDomainSharedModule.cs
+++ /dev/null
@@ -1,14 +0,0 @@
-using Volo.Abp.Domain;
-using Volo.Abp.SettingManagement;
-
-namespace Yi.Framework.Stock.Domain.Shared
-{
- [DependsOn(
-
- typeof(AbpSettingManagementDomainSharedModule),
- typeof(AbpDddDomainSharedModule))]
- public class YiFrameworkStockDomainSharedModule : AbpModule
- {
-
- }
-}
\ No newline at end of file
diff --git a/Yi.Abp.Net8/module/ai-stock/Yi.Framework.Stock.Domain/Entities/StockHoldingAggregateRoot.cs b/Yi.Abp.Net8/module/ai-stock/Yi.Framework.Stock.Domain/Entities/StockHoldingAggregateRoot.cs
deleted file mode 100644
index 4d815593..00000000
--- a/Yi.Abp.Net8/module/ai-stock/Yi.Framework.Stock.Domain/Entities/StockHoldingAggregateRoot.cs
+++ /dev/null
@@ -1,141 +0,0 @@
-using SqlSugar;
-using Volo.Abp.Auditing;
-using Volo.Abp.Domain.Entities;
-using Yi.Framework.Core.Data;
-
-namespace Yi.Framework.Stock.Domain.Entities
-{
- ///
- /// 用户股票持仓聚合根
- ///
- ///
- /// 记录用户持有的股票数量和相关信息
- ///
- [SugarTable("Stock_Holding")]
- public class StockHoldingAggregateRoot : AggregateRoot, ISoftDelete, IAuditedObject
- {
-
- ///
- /// 逻辑删除
- ///
- public bool IsDeleted { get; set; }
-
- ///
- /// 创建时间
- ///
- public DateTime CreationTime { get; set; } = DateTime.Now;
-
- ///
- /// 创建者
- ///
- public Guid? CreatorId { get; set; }
-
- ///
- /// 最后修改者
- ///
- public Guid? LastModifierId { get; set; }
-
- ///
- /// 最后修改时间
- ///
- public DateTime? LastModificationTime { get; set; }
-
- ///
- /// 用户ID
- ///
- /// 关联到持有股票的用户
- public Guid UserId { get; set; }
-
- ///
- /// 股票ID
- ///
- /// 关联到具体的股票
- public Guid StockId { get; set; }
-
- ///
- /// 股票代码
- ///
- /// 冗余字段,方便查询
- public string StockCode { get; set; } = string.Empty;
-
- ///
- /// 股票名称
- ///
- /// 冗余字段,方便查询
- public string StockName { get; set; } = string.Empty;
-
- ///
- /// 持有数量
- ///
- /// 用户持有的股票数量
- public int Quantity { get; set; }
-
- ///
- /// 平均成本价
- ///
- /// 用户购买这些股票的平均成本价
- public decimal AverageCostPrice { get; set; }
-
- ///
- /// 持仓成本
- ///
- /// 总投入成本 = 平均成本价 * 持有数量
- [SugarColumn(IsIgnore = true)]
- public decimal TotalCost => AverageCostPrice * Quantity;
-
- public StockHoldingAggregateRoot() { }
-
- public StockHoldingAggregateRoot(
- Guid userId,
- Guid stockId,
- string stockCode,
- string stockName,
- int quantity,
- decimal averageCostPrice)
- {
- UserId = userId;
- StockId = stockId;
- StockCode = stockCode;
- StockName = stockName;
- Quantity = quantity;
- AverageCostPrice = averageCostPrice;
- }
-
- ///
- /// 增加持仓数量
- ///
- /// 增加的数量
- /// 本次购买价格
- public void AddQuantity(int quantity, decimal price)
- {
- if (quantity <= 0)
- throw new ArgumentException("增加的数量必须大于0");
-
- // 计算新的平均成本价
- decimal totalCost = AverageCostPrice * Quantity + price * quantity;
- Quantity += quantity;
- AverageCostPrice = totalCost / Quantity;
- }
-
- ///
- /// 减少持仓数量
- ///
- /// 减少的数量
- public void ReduceQuantity(int quantity)
- {
- if (quantity <= 0)
- throw new ArgumentException("减少的数量必须大于0");
-
- if (quantity > Quantity)
- throw new ArgumentException("减少的数量不能大于持有数量");
-
- Quantity -= quantity;
-
- // 如果数量为0,标记为删除
- if (Quantity == 0)
- {
- IsDeleted = true;
- }
- }
- }
-}
\ No newline at end of file
diff --git a/Yi.Abp.Net8/module/ai-stock/Yi.Framework.Stock.Domain/Entities/StockMarketAggregateRoot.cs b/Yi.Abp.Net8/module/ai-stock/Yi.Framework.Stock.Domain/Entities/StockMarketAggregateRoot.cs
deleted file mode 100644
index 937ff00f..00000000
--- a/Yi.Abp.Net8/module/ai-stock/Yi.Framework.Stock.Domain/Entities/StockMarketAggregateRoot.cs
+++ /dev/null
@@ -1,79 +0,0 @@
-using SqlSugar;
-using Volo.Abp.Auditing;
-using Volo.Abp.Domain.Entities;
-using Yi.Framework.Core.Data;
-
-namespace Yi.Framework.Stock.Domain.Entities
-{
- ///
- /// 股市聚合根实体
- ///
- ///
- /// 用于定义有哪些公司上架的股市
- ///
- [SugarTable("Stock_Market")]
- public class StockMarketAggregateRoot : AggregateRoot, ISoftDelete, IAuditedObject, IOrderNum, IState
- {
- ///
- /// 逻辑删除
- ///
- public bool IsDeleted { get; set; }
-
- ///
- /// 创建时间
- ///
- public DateTime CreationTime { get; set; }
-
- ///
- /// 创建者
- ///
- public Guid? CreatorId { get; set; }
-
- ///
- /// 最后修改者
- ///
- public Guid? LastModifierId { get; set; }
-
- ///
- /// 最后修改时间
- ///
- public DateTime? LastModificationTime { get; set; }
-
- ///
- /// 排序
- ///
- public int OrderNum { get; set; } = 0;
-
- ///
- /// 状态
- ///
- public bool State { get; set; } = true;
-
- ///
- /// 股市代码
- ///
- public string MarketCode { get; set; } = string.Empty;
-
- ///
- /// 股市名称
- ///
- public string MarketName { get; set; } = string.Empty;
-
- ///
- /// 股市描述
- ///
- public string Description { get; set; } = string.Empty;
-
- public StockMarketAggregateRoot() { }
-
- public StockMarketAggregateRoot(
- string marketCode,
- string marketName,
- string description = "")
- {
- MarketCode = marketCode;
- MarketName = marketName;
- Description = description;
- }
- }
-}
\ No newline at end of file
diff --git a/Yi.Abp.Net8/module/ai-stock/Yi.Framework.Stock.Domain/Entities/StockNewsAggregateRoot.cs b/Yi.Abp.Net8/module/ai-stock/Yi.Framework.Stock.Domain/Entities/StockNewsAggregateRoot.cs
deleted file mode 100644
index db7c3803..00000000
--- a/Yi.Abp.Net8/module/ai-stock/Yi.Framework.Stock.Domain/Entities/StockNewsAggregateRoot.cs
+++ /dev/null
@@ -1,87 +0,0 @@
-using SqlSugar;
-using Volo.Abp.Auditing;
-using Volo.Abp.Domain.Entities;
-using Yi.Framework.Core.Data;
-
-namespace Yi.Framework.Stock.Domain.Entities
-{
- ///
- /// 股市新闻聚合根实体
- ///
- ///
- /// 用于记录影响股市波动的新闻事件
- ///
- [SugarTable("Stock_News")]
- public class StockNewsAggregateRoot : AggregateRoot, ISoftDelete, IAuditedObject, IOrderNum
- {
- ///
- /// 逻辑删除
- ///
- public bool IsDeleted { get; set; }
-
- ///
- /// 创建时间
- ///
- public DateTime CreationTime { get; set; }
-
- ///
- /// 创建者ID
- ///
- public Guid? CreatorId { get; set; }
-
- ///
- /// 最后修改时间
- ///
- public DateTime? LastModificationTime { get; set; }
-
- ///
- /// 最后修改者ID
- ///
- public Guid? LastModifierId { get; set; }
-
- ///
- /// 排序号
- ///
- public int OrderNum { get; set; } = 0;
-
- ///
- /// 新闻标题
- ///
- public string Title { get; set; } = string.Empty;
-
- ///
- /// 新闻内容
- ///
- [SugarColumn(ColumnDataType = StaticConfig.CodeFirst_BigString)]
- public string Content { get; set; } = string.Empty;
-
- ///
- /// 发布时间
- ///
- public DateTime PublishTime { get; set; }
-
- ///
- /// 新闻来源
- ///
- public string Source { get; set; } = string.Empty;
-
- ///
- /// 新闻摘要
- ///
- public string Summary { get; set; } = string.Empty;
-
- public StockNewsAggregateRoot() { }
-
- public StockNewsAggregateRoot(
- string title,
- string content,
- string source = "")
- {
- Title = title;
- Content = content;
- Source = source;
- PublishTime = DateTime.Now;
- }
-
- }
-}
\ No newline at end of file
diff --git a/Yi.Abp.Net8/module/ai-stock/Yi.Framework.Stock.Domain/Entities/StockPriceRecordEntity.cs b/Yi.Abp.Net8/module/ai-stock/Yi.Framework.Stock.Domain/Entities/StockPriceRecordEntity.cs
deleted file mode 100644
index 08dd09cc..00000000
--- a/Yi.Abp.Net8/module/ai-stock/Yi.Framework.Stock.Domain/Entities/StockPriceRecordEntity.cs
+++ /dev/null
@@ -1,78 +0,0 @@
-using SqlSugar;
-using Volo.Abp.Domain.Entities;
-using Volo.Abp.Auditing;
-using Yi.Framework.Stock.Domain.Shared;
-
-namespace Yi.Framework.Stock.Domain.Entities
-{
- ///
- /// 股票价格记录实体
- ///
- ///
- /// 用于记录每支股票在不同时间点的价格数据,支持趋势分析和图表展示
- ///
- [SugarTable("Stock_PriceRecord")]
- public class StockPriceRecordEntity : Entity, IHasCreationTime
- {
-
- ///
- /// 股票ID
- ///
- /// 关联到具体的股票
- public Guid StockId { get; set; }
-
- ///
- /// 创建时间(审计日志)
- ///
- public DateTime CreationTime { get; set; }
-
- ///
- /// 记录时间
- ///
- /// 价格记录的实际时间点
- public DateTime RecordTime { get; set; }
-
- ///
- /// 当前价
- ///
- public decimal CurrentPrice { get; set; }
-
- ///
- /// 交易量
- ///
- /// 该时间段内的交易股数
- public long Volume { get; set; }
-
- ///
- /// 交易额
- ///
- /// 该时间段内的交易金额
- public decimal Turnover { get; set; }
-
- ///
- /// 时间周期类型
- ///
- ///
- /// 记录的时间周期类型:分钟、小时、日、周、月等
- ///
- public PeriodTypeEnum PeriodType { get; set; }
-
- public StockPriceRecordEntity() { }
-
- public StockPriceRecordEntity(
- Guid stockId,
- decimal currentPrice,
- long volume = 0,
- decimal turnover = 0,
- PeriodTypeEnum periodType = PeriodTypeEnum.Day)
- {
- StockId = stockId;
- CreationTime = DateTime.Now;
- RecordTime = DateTime.Now;
- CurrentPrice = currentPrice;
- Volume = volume;
- Turnover = turnover;
- PeriodType = periodType;
- }
- }
-}
\ No newline at end of file
diff --git a/Yi.Abp.Net8/module/ai-stock/Yi.Framework.Stock.Domain/Entities/StockTransactionEntity.cs b/Yi.Abp.Net8/module/ai-stock/Yi.Framework.Stock.Domain/Entities/StockTransactionEntity.cs
deleted file mode 100644
index 389a60e4..00000000
--- a/Yi.Abp.Net8/module/ai-stock/Yi.Framework.Stock.Domain/Entities/StockTransactionEntity.cs
+++ /dev/null
@@ -1,121 +0,0 @@
-using SqlSugar;
-using Volo.Abp.Domain.Entities;
-using Volo.Abp.Auditing;
-using Yi.Framework.Stock.Domain.Shared;
-
-namespace Yi.Framework.Stock.Domain.Entities
-{
- ///
- /// 股票交易记录实体
- ///
- ///
- /// 用于记录用户买入或卖出股票的交易历史
- ///
- [SugarTable("Stock_Transaction")]
- public class StockTransactionEntity : Entity, IAuditedObject
- {
- ///
- /// 用户ID
- ///
- /// 进行交易的用户
- public Guid UserId { get; set; }
-
- ///
- /// 股票ID
- ///
- /// 交易的股票
- public Guid StockId { get; set; }
-
- ///
- /// 股票代码
- ///
- /// 冗余字段,方便查询
- public string StockCode { get; set; } = string.Empty;
-
- ///
- /// 股票名称
- ///
- /// 冗余字段,方便查询
- public string StockName { get; set; } = string.Empty;
-
- ///
- /// 交易类型
- ///
- public TransactionTypeEnum TransactionType { get; set; }
-
- ///
- /// 交易价格
- ///
- /// 股票的单价
- public decimal Price { get; set; }
-
- ///
- /// 交易数量
- ///
- /// 买入或卖出的股票数量
- public int Quantity { get; set; }
-
- ///
- /// 交易总额
- ///
- /// 价格 × 数量
- public decimal TotalAmount { get; set; }
-
- ///
- /// 交易费用
- ///
- /// 手续费、佣金等
- public decimal Fee { get; set; }
-
- ///
- /// 创建时间
- ///
- /// 交易发生时间
- public DateTime CreationTime { get; set; }
-
- ///
- /// 创建者ID
- ///
- public Guid? CreatorId { get; set; }
-
- ///
- /// 最后修改时间
- ///
- public DateTime? LastModificationTime { get; set; }
-
- ///
- /// 最后修改者ID
- ///
- public Guid? LastModifierId { get; set; }
-
- ///
- /// 备注
- ///
- public string Remark { get; set; } = string.Empty;
-
- public StockTransactionEntity() { }
-
- public StockTransactionEntity(
- Guid userId,
- Guid stockId,
- string stockCode,
- string stockName,
- TransactionTypeEnum transactionType,
- decimal price,
- int quantity,
- decimal fee = 0)
- {
- Id = Guid.NewGuid();
- UserId = userId;
- StockId = stockId;
- StockCode = stockCode;
- StockName = stockName;
- TransactionType = transactionType;
- Price = price;
- Quantity = quantity;
- TotalAmount = price * quantity;
- Fee = fee;
- CreationTime = DateTime.Now;
- }
- }
-}
\ No newline at end of file
diff --git a/Yi.Abp.Net8/module/ai-stock/Yi.Framework.Stock.Domain/EventHandlers/StockTransactionEventHandler.cs b/Yi.Abp.Net8/module/ai-stock/Yi.Framework.Stock.Domain/EventHandlers/StockTransactionEventHandler.cs
deleted file mode 100644
index 75fdc3c1..00000000
--- a/Yi.Abp.Net8/module/ai-stock/Yi.Framework.Stock.Domain/EventHandlers/StockTransactionEventHandler.cs
+++ /dev/null
@@ -1,42 +0,0 @@
-using System;
-using System.Threading.Tasks;
-using Volo.Abp.DependencyInjection;
-using Volo.Abp.EventBus;
-using Yi.Framework.Stock.Domain.Entities;
-using Yi.Framework.Stock.Domain.Shared.Etos;
-using Yi.Framework.SqlSugarCore.Abstractions;
-
-namespace Yi.Framework.Stock.Domain.EventHandlers
-{
- ///
- /// 股票交易事件处理器
- ///
- public class StockTransactionEventHandler : ILocalEventHandler, ITransientDependency
- {
- private readonly ISqlSugarRepository _transactionRepository;
-
- public StockTransactionEventHandler(
- ISqlSugarRepository transactionRepository)
- {
- _transactionRepository = transactionRepository;
- }
-
- public async Task HandleEventAsync(StockTransactionEto eventData)
- {
- // 创建交易记录实体
- var transaction = new StockTransactionEntity(
- eventData.UserId,
- eventData.StockId,
- eventData.StockCode,
- eventData.StockName,
- eventData.TransactionType,
- eventData.Price,
- eventData.Quantity,
- eventData.Fee
- );
-
- // 保存交易记录
- await _transactionRepository.InsertAsync(transaction);
- }
- }
-}
\ No newline at end of file
diff --git a/Yi.Abp.Net8/module/ai-stock/Yi.Framework.Stock.Domain/Managers/NewsManager.cs b/Yi.Abp.Net8/module/ai-stock/Yi.Framework.Stock.Domain/Managers/NewsManager.cs
deleted file mode 100644
index 7e9ff774..00000000
--- a/Yi.Abp.Net8/module/ai-stock/Yi.Framework.Stock.Domain/Managers/NewsManager.cs
+++ /dev/null
@@ -1,91 +0,0 @@
-using Volo.Abp.Domain.Services;
-using Yi.Framework.SqlSugarCore.Abstractions;
-using Yi.Framework.Stock.Domain.Entities;
-using Yi.Framework.Stock.Domain.Managers.SemanticKernel;
-using Yi.Framework.Stock.Domain.Managers.SemanticKernel.Plugins;
-using System.Text;
-using System.IO;
-
-namespace Yi.Framework.Stock.Domain.Managers;
-
-public class NewsManager:DomainService
-{
- private SemanticKernelClient _skClient;
- private ISqlSugarRepository _newsRepository;
- public NewsManager(SemanticKernelClient skClient,ISqlSugarRepository newsRepository)
- {
- _skClient = skClient;
- _newsRepository = newsRepository;
- }
-
- ///
- /// 获取最近的新闻
- ///
- /// 获取数量
- /// 最近的新闻列表
- public async Task> GetRecentNewsAsync(int count = 10)
- {
- return await _newsRepository._DbQueryable
- .OrderByDescending(n => n.CreationTime)
- .Take(count)
- .Select(n => new StockNewsAggregateRoot
- {
- Title = n.Title,
- Summary = n.Summary,
- Source = n.Source,
- CreationTime = n.CreationTime
- })
- .ToListAsync();
- }
-
- ///
- /// 生成一个新闻
- ///
- ///
- public async Task GenerateNewsAsync()
- {
- // 获取最近10条新闻
- var recentNews = await GetRecentNewsAsync(10);
-
- // 构建新闻背景上下文
- var newsContext = new StringBuilder();
- if (recentNews.Any())
- {
- newsContext.AppendLine("以下是最近的新闻简介:");
- foreach (var news in recentNews)
- {
- newsContext.AppendLine($"- {news.CreationTime:yyyy-MM-dd} 来源:{news.Source}");
- newsContext.AppendLine($" 标题:{news.Title}");
- newsContext.AppendLine($" 简介:{news.Summary}");
- newsContext.AppendLine();
- }
- }
- else
- {
- newsContext.AppendLine("目前没有最近的新闻记录。");
- }
-
- var promptPath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "wwwroot", "stock", "newsPrompt.txt");
- var question = await File.ReadAllTextAsync(promptPath);
- question = question.Replace("{{newsContext}}", newsContext.ToString());
-
- await _skClient.ChatCompletionAsync(question, ("NewsPlugins","save_news"));
- }
-
- public async Task SaveNewsAsync(NewsModel news)
- {
- var newsEntity = new StockNewsAggregateRoot(
- title: news.Title,
- content: news.Content,
- source: news.Source
- )
- {
- Summary = news.Summary,
- CreationTime = DateTime.Now,
- IsDeleted = false,
- OrderNum = 0
- };
-
- await _newsRepository.InsertAsync(newsEntity);
- }
-}
\ No newline at end of file
diff --git a/Yi.Abp.Net8/module/ai-stock/Yi.Framework.Stock.Domain/Managers/SemanticKernel/Plugins/NewsPlugins.cs b/Yi.Abp.Net8/module/ai-stock/Yi.Framework.Stock.Domain/Managers/SemanticKernel/Plugins/NewsPlugins.cs
deleted file mode 100644
index be6fecfb..00000000
--- a/Yi.Abp.Net8/module/ai-stock/Yi.Framework.Stock.Domain/Managers/SemanticKernel/Plugins/NewsPlugins.cs
+++ /dev/null
@@ -1,42 +0,0 @@
-using System.ComponentModel;
-using System.Text.Json.Serialization;
-using Microsoft.Extensions.DependencyInjection;
-using Microsoft.SemanticKernel;
-
-namespace Yi.Framework.Stock.Domain.Managers.SemanticKernel.Plugins;
-
-public class NewsPlugins
-{
- private readonly IServiceProvider _serviceProvider;
-
- public NewsPlugins(IServiceProvider serviceProvider)
- {
- _serviceProvider = serviceProvider;
- }
-
- [KernelFunction("save_news"), Description("生成并保存一个新闻")]
- public async Task SaveAsync(NewsModel news)
- {
- var newsManager = _serviceProvider.GetRequiredService();
- await newsManager.SaveNewsAsync(news);
- }
-}
-
-public class NewsModel
-{
- [JsonPropertyName("title")]
- [DisplayName("新闻标题")]
- public string Title { get; set; }
-
- [JsonPropertyName("content")]
- [DisplayName("新闻内容")]
- public string Content { get; set; }
-
- [JsonPropertyName("summary")]
- [DisplayName("新闻简介")]
- public string Summary { get; set; }
-
- [JsonPropertyName("source")]
- [DisplayName("新闻来源")]
- public string Source { get; set; }
-}
\ No newline at end of file
diff --git a/Yi.Abp.Net8/module/ai-stock/Yi.Framework.Stock.Domain/Managers/SemanticKernel/Plugins/StockPlugins.cs b/Yi.Abp.Net8/module/ai-stock/Yi.Framework.Stock.Domain/Managers/SemanticKernel/Plugins/StockPlugins.cs
deleted file mode 100644
index 2cecdbf7..00000000
--- a/Yi.Abp.Net8/module/ai-stock/Yi.Framework.Stock.Domain/Managers/SemanticKernel/Plugins/StockPlugins.cs
+++ /dev/null
@@ -1,34 +0,0 @@
-using System.ComponentModel;
-using System.Text.Json.Serialization;
-using Microsoft.Extensions.DependencyInjection;
-using Microsoft.SemanticKernel;
-
-namespace Yi.Framework.Stock.Domain.Managers.SemanticKernel.Plugins;
-
-public class StockPlugins
-{
- private readonly IServiceProvider _serviceProvider;
-
- public StockPlugins(IServiceProvider serviceProvider)
- {
- _serviceProvider = serviceProvider;
- }
-
- [KernelFunction("save_stocks"), Description("生成并且保存多个股票记录")]
- public async Task SaveAsync(List stockModels)
- {
- var stockMarketManager= _serviceProvider.GetRequiredService();
- await stockMarketManager.SaveStockAsync(stockModels);
- }
-}
-
-public class StockModel
-{
- [JsonPropertyName("id")]
- [DisplayName("股票id")]
- public Guid Id { get; set; }
-
- [JsonPropertyName("values")]
- [DisplayName("股票未来24小时价格")]
- public decimal[] Values { get; set; }
-}
\ No newline at end of file
diff --git a/Yi.Abp.Net8/module/ai-stock/Yi.Framework.Stock.Domain/Managers/SemanticKernel/SemanticKernelClient.cs b/Yi.Abp.Net8/module/ai-stock/Yi.Framework.Stock.Domain/Managers/SemanticKernel/SemanticKernelClient.cs
deleted file mode 100644
index 0443b2ef..00000000
--- a/Yi.Abp.Net8/module/ai-stock/Yi.Framework.Stock.Domain/Managers/SemanticKernel/SemanticKernelClient.cs
+++ /dev/null
@@ -1,55 +0,0 @@
-using Microsoft.SemanticKernel;
-using Microsoft.SemanticKernel.ChatCompletion;
-using Microsoft.SemanticKernel.Connectors.OpenAI;
-using Volo.Abp.DependencyInjection;
-
-namespace Yi.Framework.Stock.Domain.Managers.SemanticKernel;
-
-public class SemanticKernelClient:ITransientDependency
-{
- public Kernel Kernel { get;}
-
- public SemanticKernelClient(Kernel kernel)
- {
- this.Kernel = kernel;
- }
- ///
- /// 执行插件
- ///
- ///
- ///
- ///
- ///
- public async Task InovkerFunctionAsync(string input, string pluginName, string functionName)
- {
- KernelFunction jsonFun = this.Kernel.Plugins.GetFunction(pluginName, functionName);
- var result = await this.Kernel.InvokeAsync(function: jsonFun, new KernelArguments() { ["input"] = input });
- return result.GetValue();
- }
-
- ///
- /// 聊天对话,调用方法
- ///
- ///
- public async Task> ChatCompletionAsync(string question,params (string,string)[] functions)
- {
- if (functions is null)
- {
- throw new Exception("请选择插件");
- }
- var openSettings = new OpenAIPromptExecutionSettings()
- {
- FunctionChoiceBehavior = FunctionChoiceBehavior.Auto(functions.Select(x=>this.Kernel.Plugins.GetFunction(x.Item1, x.Item2)).ToList(),true),
- // ToolCallBehavior = ToolCallBehavior.AutoInvokeKernelFunctions,
- MaxTokens =1000
- };
-
- var chatCompletionService = this.Kernel.GetRequiredService();
-
- var results =await chatCompletionService.GetChatMessageContentsAsync(
- question,
- executionSettings: openSettings,
- kernel: Kernel);
- return results;
- }
-}
\ No newline at end of file
diff --git a/Yi.Abp.Net8/module/ai-stock/Yi.Framework.Stock.Domain/Managers/SemanticKernel/SemanticKernelOptions.cs b/Yi.Abp.Net8/module/ai-stock/Yi.Framework.Stock.Domain/Managers/SemanticKernel/SemanticKernelOptions.cs
deleted file mode 100644
index afa754d4..00000000
--- a/Yi.Abp.Net8/module/ai-stock/Yi.Framework.Stock.Domain/Managers/SemanticKernel/SemanticKernelOptions.cs
+++ /dev/null
@@ -1,9 +0,0 @@
-namespace Yi.Framework.Stock.Domain.Managers.SemanticKernel
-{
- public class SemanticKernelOptions
- {
- public List ModelIds { get; set; }
- public string Endpoint { get; set; }
- public string ApiKey { get; set; }
- }
-}
\ No newline at end of file
diff --git a/Yi.Abp.Net8/module/ai-stock/Yi.Framework.Stock.Domain/Managers/StockMarketManager.cs b/Yi.Abp.Net8/module/ai-stock/Yi.Framework.Stock.Domain/Managers/StockMarketManager.cs
deleted file mode 100644
index 648f232d..00000000
--- a/Yi.Abp.Net8/module/ai-stock/Yi.Framework.Stock.Domain/Managers/StockMarketManager.cs
+++ /dev/null
@@ -1,446 +0,0 @@
-using System;
-using System.Threading.Tasks;
-using Volo.Abp;
-using Volo.Abp.Domain.Services;
-using Volo.Abp.EventBus.Local;
-using Yi.Framework.Bbs.Domain.Shared.Etos;
-using Yi.Framework.Stock.Domain.Entities;
-using Yi.Framework.Stock.Domain.Shared;
-using Yi.Framework.Stock.Domain.Shared.Etos;
-using Yi.Framework.SqlSugarCore.Abstractions;
-using Yi.Framework.Stock.Domain.Managers.SemanticKernel;
-using Yi.Framework.Stock.Domain.Managers.SemanticKernel.Plugins;
-using Microsoft.Extensions.Hosting;
-using System.Text;
-using System.IO;
-
-namespace Yi.Framework.Stock.Domain.Managers
-{
- ///
- /// 股市领域服务
- ///
- ///
- /// 处理股票交易相关业务,例如买入、卖出等
- ///
- public class StockMarketManager : DomainService
- {
- private readonly ISqlSugarRepository _stockHoldingRepository;
- private readonly ISqlSugarRepository _stockTransactionRepository;
- private readonly ISqlSugarRepository _stockPriceRecordRepository;
- private readonly ISqlSugarRepository _stockMarketRepository;
- private readonly ILocalEventBus _localEventBus;
- private readonly SemanticKernelClient _skClient;
- private readonly IHostEnvironment _hostEnvironment;
- private readonly NewsManager _newsManager;
-
- public StockMarketManager(
- ISqlSugarRepository stockHoldingRepository,
- ISqlSugarRepository stockTransactionRepository,
- ISqlSugarRepository stockPriceRecordRepository,
- ISqlSugarRepository stockMarketRepository,
- ILocalEventBus localEventBus,
- SemanticKernelClient skClient,
- IHostEnvironment hostEnvironment,
- NewsManager newsManager)
- {
- _stockHoldingRepository = stockHoldingRepository;
- _stockTransactionRepository = stockTransactionRepository;
- _stockPriceRecordRepository = stockPriceRecordRepository;
- _stockMarketRepository = stockMarketRepository;
- _localEventBus = localEventBus;
- _skClient = skClient;
- _hostEnvironment = hostEnvironment;
- _newsManager = newsManager;
- }
-
- ///
- /// 购买股票
- ///
- /// 用户ID
- /// 股票ID
- /// 购买数量
- ///
- public async Task BuyStockAsync(Guid userId, Guid stockId, int quantity)
- {
- if (quantity <= 0)
- {
- throw new UserFriendlyException("购买数量必须大于0");
- }
-
- // 通过stockId查询获取股票信息
- var stockInfo = await _stockMarketRepository.GetFirstAsync(s => s.Id == stockId);
- if (stockInfo == null)
- {
- throw new UserFriendlyException("找不到指定的股票");
- }
-
- string stockCode = stockInfo.MarketCode; // 根据实际字段调整
- string stockName = stockInfo.MarketName; // 根据实际字段调整
-
- // 获取当前股票价格
- decimal currentPrice = await GetCurrentStockPriceAsync(stockId);
-
- // 计算总金额和手续费
- decimal totalAmount = currentPrice * quantity;
- decimal fee = CalculateTradingFee(totalAmount, TransactionTypeEnum.Buy);
- decimal totalCost = totalAmount + fee;
-
- // 扣减用户资金
- await _localEventBus.PublishAsync(
- new MoneyChangeEventArgs { UserId = userId, Number = -totalCost }, false);
-
- // 更新或创建用户持仓
- var holding = await _stockHoldingRepository.GetFirstAsync(h =>
- h.UserId == userId &&
- h.StockId == stockId &&
- !h.IsDeleted);
-
- if (holding == null)
- {
- // 创建新持仓
- holding = new StockHoldingAggregateRoot(
- userId,
- stockId,
- stockCode,
- stockName,
- quantity,
- currentPrice);
-
- await _stockHoldingRepository.InsertAsync(holding);
- }
- else
- {
- // 更新现有持仓
- holding.AddQuantity(quantity, currentPrice);
- await _stockHoldingRepository.UpdateAsync(holding);
- }
- // 发布交易事件
- await _localEventBus.PublishAsync(new StockTransactionEto
- {
- UserId = userId,
- StockId = stockId,
- StockCode = stockCode,
- StockName = stockName,
- TransactionType = TransactionTypeEnum.Buy,
- Price = currentPrice,
- Quantity = quantity,
- TotalAmount = totalAmount,
- Fee = fee
- }, false);
- }
-
- ///
- /// 卖出股票
- ///
- /// 用户ID
- /// 股票ID
- /// 卖出数量
- ///
- public async Task SellStockAsync(Guid userId, Guid stockId, int quantity)
- {
- // 验证卖出时间
- VerifySellTime();
-
- if (quantity <= 0)
- {
- throw new UserFriendlyException("卖出数量必须大于0");
- }
-
- // 获取用户持仓
- var holding = await _stockHoldingRepository.GetFirstAsync(h =>
- h.UserId == userId &&
- h.StockId == stockId &&
- !h.IsDeleted);
-
- if (holding == null)
- {
- throw new UserFriendlyException("您没有持有该股票");
- }
-
- if (holding.Quantity < quantity)
- {
- throw new UserFriendlyException("持仓数量不足");
- }
-
- // 获取当前股票价格
- decimal currentPrice = await GetCurrentStockPriceAsync(stockId);
-
- // 计算总金额和手续费
- decimal totalAmount = currentPrice * quantity;
- decimal fee = CalculateTradingFee(totalAmount, TransactionTypeEnum.Sell);
- decimal actualIncome = totalAmount - fee;
-
- // 增加用户资金
- await _localEventBus.PublishAsync(
- new MoneyChangeEventArgs { UserId = userId, Number = actualIncome }, false);
-
- // 更新用户持仓
- holding.ReduceQuantity(quantity);
-
- if (holding.Quantity > 0)
- {
- await _stockHoldingRepository.UpdateAsync(holding);
- }
- else
- {
- await _stockHoldingRepository.DeleteAsync(holding);
- }
-
- // 发布交易事件
- await _localEventBus.PublishAsync(new StockTransactionEto
- {
- UserId = userId,
- StockId = stockId,
- StockCode = holding.StockCode,
- StockName = holding.StockName,
- TransactionType = TransactionTypeEnum.Sell,
- Price = currentPrice,
- Quantity = quantity,
- TotalAmount = totalAmount,
- Fee = fee
- }, false);
- }
-
- ///
- /// 获取股票当前价格
- ///
- /// 股票ID
- /// 当前价格
- public async Task GetCurrentStockPriceAsync(Guid stockId)
- {
- // 获取最新的价格记录
- var latestPriceRecord = await _stockPriceRecordRepository._DbQueryable
- .Where(p => p.StockId == stockId)
- .Where(x=>x.RecordTime<=DateTime.Now)
- .OrderByDescending(p => p.RecordTime)
- .FirstAsync();
-
- if (latestPriceRecord == null)
- {
- throw new UserFriendlyException("无法获取股票价格信息");
- }
-
- return latestPriceRecord.CurrentPrice;
- }
-
- ///
- /// 计算交易手续费
- ///
- /// 交易金额
- /// 交易类型
- /// 手续费
- private decimal CalculateTradingFee(decimal amount, TransactionTypeEnum transactionType)
- {
- // 买入不收手续费,卖出收2%
- decimal feeRate = transactionType == TransactionTypeEnum.Buy ? 0m : 0.02m;
- return amount * feeRate;
- }
-
- ///
- /// 验证卖出时间
- ///
- /// 如果不在允许卖出的时间范围内
- private void VerifySellTime()
- {
- // 如果是开发环境,跳过验证
- if (_hostEnvironment.IsDevelopment())
- {
- return;
- }
-
- DateTime now = DateTime.Now;
-
- // 检查是否为工作日(周一到周五)
- if (now.DayOfWeek == DayOfWeek.Saturday || now.DayOfWeek == DayOfWeek.Sunday)
- {
- throw new UserFriendlyException("股票只能在工作日(周一至周五)卖出");
- }
-
- // 检查是否在下午5点到6点之间
- if (now.Hour < 17 || now.Hour >= 18)
- {
- throw new UserFriendlyException("股票只能在下午5点到6点之间卖出");
- }
- }
-
-
- ///
- /// 批量保存多个股票的最新价格记录
- ///
- /// 价格记录列表
- /// 保存的记录数量
- public async Task BatchSaveStockPriceRecordsAsync(List priceRecords)
- {
- if (priceRecords == null || !priceRecords.Any())
- {
- return;
- }
-
- // 验证数据
- for (int i = 0; i < priceRecords.Count; i++)
- {
- var record = priceRecords[i];
- if (record.CurrentPrice <= 0)
- {
- throw new UserFriendlyException($"股票ID {record.StockId} 的价格必须大于0");
- }
-
- // 计算交易额(如果未设置)
- if (record.Turnover == 0 && record.Volume > 0)
- {
- record.Turnover = record.CurrentPrice * record.Volume;
- }
- }
-
- await _stockPriceRecordRepository.InsertManyAsync(priceRecords);
- }
-
- public async Task SaveStockAsync(List stockModels)
- {
- if (stockModels == null || !stockModels.Any())
- {
- return;
- }
-
- // 收集所有股票ID
- var stockIds = stockModels.Select(m => m.Id).ToList();
-
- // 一次性查询所有相关股票信息
- var stockMarkets = await _stockMarketRepository.GetListAsync(s => stockIds.Contains(s.Id));
-
- // 构建字典以便快速查找
- var stockMarketsDict = stockMarkets.ToDictionary(s => s.Id);
-
- // 将StockModel转换为StockPriceRecordEntity
- var priceRecords = new List();
-
- // 获取当前小时的起始时间点
- var currentHour = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day, DateTime.Now.Hour, 0, 0);
-
- foreach (var stockModel in stockModels)
- {
- if (stockModel.Values == null || !stockModel.Values.Any())
- {
- continue;
- }
-
- // 从字典中查找股票信息,而不是每次查询数据库
- if (!stockMarketsDict.TryGetValue(stockModel.Id, out var stockMarket))
- {
- continue;
- }
-
- // 为每个价格点创建一个记录,并设置递增的时间
- for (int i = 0; i < stockModel.Values.Count(); i++)
- {
- var priceValue = stockModel.Values[i];
- var recordTime = currentHour.AddHours(i); // 从当前小时开始,每个价格点加1小时
-
- var priceRecord = new StockPriceRecordEntity
- {
- StockId = stockMarket.Id,
- CurrentPrice = priceValue,
- Volume = 0, // 可以根据实际情况设置
- Turnover = 0, // 可以根据实际情况设置
- PeriodType = PeriodTypeEnum.Hour,
- RecordTime = recordTime // 直接在这里设置时间
- };
-
- priceRecords.Add(priceRecord);
- }
- }
-
- // 批量保存价格记录
- if (priceRecords.Any())
- {
- await _stockPriceRecordRepository.InsertManyAsync(priceRecords);
- }
- }
-
- ///
- /// 获取所有活跃股票的最新价格
- ///
- /// 股票ID和最新价格的字典
- private async Task> GetLatestStockPricesAsync()
- {
- // 获取所有活跃的股票
- var activeStocks = await _stockMarketRepository.GetListAsync(s => s.State && !s.IsDeleted);
- var result = new Dictionary();
-
- foreach (var stock in activeStocks)
- {
- try
- {
- var price = await GetCurrentStockPriceAsync(stock.Id);
- result.Add(stock.Id, price);
- }
- catch
- {
- // 如果获取价格失败,使用默认价格10
- result.Add(stock.Id, 10m);
- }
- }
-
- return result;
- }
-
- ///
- /// 生成最新股票记录
- ///
- ///
- public async Task GenerateStocksAsync()
- {
- // 获取所有活跃股票的最新价格
- var stockPrices = await GetLatestStockPricesAsync();
- if (!stockPrices.Any())
- {
- return; // 没有股票数据,直接返回
- }
-
- // 获取所有活跃股票信息,用于构建提示词
- var activeStocks = await _stockMarketRepository.GetListAsync(s =>
- s.State && !s.IsDeleted && stockPrices.Keys.Contains(s.Id));
-
- // 获取最近10条新闻
- var recentNews = await _newsManager.GetRecentNewsAsync(10);
-
- // 构建新闻上下文
- var newsContext = new StringBuilder();
- if (recentNews.Any())
- {
- newsContext.AppendLine("以下是最近的新闻摘要:");
- foreach (var news in recentNews)
- {
- newsContext.AppendLine($"- {news.CreationTime:yyyy-MM-dd}: {news.Title}");
- newsContext.AppendLine($" {news.Summary}");
- newsContext.AppendLine();
- }
- }
- else
- {
- newsContext.AppendLine("最近没有重要新闻报道。");
- }
-
- // 构建股票信息上下文
- var stocksContext = new StringBuilder();
- stocksContext.AppendLine("以下是需要预测的股票信息:");
- foreach (var stock in activeStocks)
- {
- if (stockPrices.TryGetValue(stock.Id, out var price))
- {
- stocksContext.AppendLine($"{stock.MarketName}:id:{stock.Id},简介:{stock.Description} 最后一次价格:{price:F2}");
- }
- }
-
- // 从文件读取问题模板
- string promptTemplate = File.ReadAllText(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "wwwroot", "stock", "marketPrompt.txt"));
-
- // 替换变量
- string question = promptTemplate
- .Replace("{{newsContext}}", newsContext.ToString())
- .Replace("{{stocksContext}}", stocksContext.ToString());
-
- await _skClient.ChatCompletionAsync(question, ("StockPlugins", "save_stocks"));
- }
- }
-}
\ No newline at end of file
diff --git a/Yi.Abp.Net8/module/ai-stock/Yi.Framework.Stock.Domain/Yi.Framework.Stock.Domain.csproj b/Yi.Abp.Net8/module/ai-stock/Yi.Framework.Stock.Domain/Yi.Framework.Stock.Domain.csproj
deleted file mode 100644
index 55c6a318..00000000
--- a/Yi.Abp.Net8/module/ai-stock/Yi.Framework.Stock.Domain/Yi.Framework.Stock.Domain.csproj
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/Yi.Abp.Net8/module/ai-stock/Yi.Framework.Stock.Domain/YiFrameworkStockDomainModule.cs b/Yi.Abp.Net8/module/ai-stock/Yi.Framework.Stock.Domain/YiFrameworkStockDomainModule.cs
deleted file mode 100644
index 35820783..00000000
--- a/Yi.Abp.Net8/module/ai-stock/Yi.Framework.Stock.Domain/YiFrameworkStockDomainModule.cs
+++ /dev/null
@@ -1,51 +0,0 @@
-using Microsoft.Extensions.Configuration;
-using Microsoft.Extensions.DependencyInjection;
-using Microsoft.SemanticKernel;
-using Volo.Abp.Caching;
-using Volo.Abp.Domain;
-using Yi.Framework.Mapster;
-using Yi.Framework.Stock.Domain.Managers;
-using Yi.Framework.Stock.Domain.Managers.SemanticKernel;
-using Yi.Framework.Stock.Domain.Managers.SemanticKernel.Plugins;
-using Yi.Framework.Stock.Domain.Shared;
-
-namespace Yi.Framework.Stock.Domain
-{
- [DependsOn(
- typeof(YiFrameworkStockDomainSharedModule),
- typeof(YiFrameworkMapsterModule),
- typeof(AbpDddDomainModule),
- typeof(AbpCachingModule)
- )]
- public class YiFrameworkStockDomainModule : AbpModule
- {
- public override void ConfigureServices(ServiceConfigurationContext context)
- {
- var configuration = context.Services.GetConfiguration();
- var services = context.Services;
-
- // 配置绑定
- var semanticKernelSection = configuration.GetSection("SemanticKernel");
- services.Configure(configuration.GetSection("SemanticKernel"));
-
- services.AddHttpClient();
-#pragma warning disable SKEXP0010
- // 从配置中获取值
- var options = semanticKernelSection.Get();
- //股市优先使用第一个ai模型
- services.AddKernel()
- .AddOpenAIChatCompletion(
- modelId: options.ModelIds.FirstOrDefault(),
- endpoint: new Uri(options.Endpoint),
- apiKey: options.ApiKey);
-#pragma warning restore SKEXP0010
-
- // 添加插件
- services.AddSingleton(sp => KernelPluginFactory.CreateFromType(serviceProvider: sp));
- services.AddSingleton(sp => KernelPluginFactory.CreateFromType(serviceProvider: sp));
-
- // 注册NewsManager
- services.AddTransient();
- }
- }
-}
\ No newline at end of file
diff --git a/Yi.Abp.Net8/module/ai-stock/Yi.Framework.Stock.SqlSugarCore/Yi.Framework.Stock.SqlSugarCore.csproj b/Yi.Abp.Net8/module/ai-stock/Yi.Framework.Stock.SqlSugarCore/Yi.Framework.Stock.SqlSugarCore.csproj
deleted file mode 100644
index e6030e96..00000000
--- a/Yi.Abp.Net8/module/ai-stock/Yi.Framework.Stock.SqlSugarCore/Yi.Framework.Stock.SqlSugarCore.csproj
+++ /dev/null
@@ -1,19 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/Yi.Abp.Net8/module/ai-stock/Yi.Framework.Stock.SqlSugarCore/YiFrameworkStockSqlSugarCoreModule.cs b/Yi.Abp.Net8/module/ai-stock/Yi.Framework.Stock.SqlSugarCore/YiFrameworkStockSqlSugarCoreModule.cs
deleted file mode 100644
index 071a9325..00000000
--- a/Yi.Abp.Net8/module/ai-stock/Yi.Framework.Stock.SqlSugarCore/YiFrameworkStockSqlSugarCoreModule.cs
+++ /dev/null
@@ -1,30 +0,0 @@
-using Yi.Framework.Stock.Domain;
-using Yi.Framework.AuditLogging.SqlSugarCore;
-using Yi.Framework.Mapster;
-using Yi.Framework.Rbac.SqlSugarCore;
-using Yi.Framework.SettingManagement.SqlSugarCore;
-using Yi.Framework.SqlSugarCore;
-using Yi.Framework.TenantManagement.SqlSugarCore;
-
-namespace Yi.Framework.Stock.SqlsugarCore
-{
- [DependsOn(
- typeof(YiFrameworkStockDomainModule),
-
- typeof(YiFrameworkRbacSqlSugarCoreModule),
-
- typeof(YiFrameworkSettingManagementSqlSugarCoreModule),
- typeof(YiFrameworkAuditLoggingSqlSugarCoreModule),
- typeof(YiFrameworkTenantManagementSqlSugarCoreModule),
- typeof(YiFrameworkMapsterModule),
- typeof(YiFrameworkSqlSugarCoreModule)
- )]
- public class YiFrameworkStockSqlSugarCoreModule : AbpModule
- {
- public override void ConfigureServices(ServiceConfigurationContext context)
- {
- //默认不开放,可根据项目需要是否Db直接对外开放
- //context.Services.AddTransient(x => x.GetRequiredService().SqlSugarClient);
- }
- }
-}
\ No newline at end of file
diff --git a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/AccessLog/AccessLogDto.cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/AccessLog/AccessLogDto.cs
deleted file mode 100644
index 0ff1db50..00000000
--- a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/AccessLog/AccessLogDto.cs
+++ /dev/null
@@ -1,9 +0,0 @@
-namespace Yi.Framework.Bbs.Application.Contracts.Dtos.AccessLog
-{
- public class AccessLogDto
- {
- public long Number { get; set; }
- public DateTime? LastModificationTime { get; set; }
- public DateTime CreationTime { get; set; }
- }
-}
diff --git a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Analyse/BaseAnalyseTopUserDto.cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Analyse/BaseAnalyseTopUserDto.cs
deleted file mode 100644
index 48386106..00000000
--- a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Analyse/BaseAnalyseTopUserDto.cs
+++ /dev/null
@@ -1,24 +0,0 @@
-using Yi.Framework.Bbs.Domain.Shared.Enums;
-
-namespace Yi.Framework.Bbs.Application.Contracts.Dtos.Analyse;
-
-///
-/// 用户排行榜
-///
-public class BaseAnalyseTopUserDto
-{
- public Guid UserId { get; set; }
- public string UserName { get; set; }
- public string? Nick { get; set; }
- public int Order { get; set; }
- public string? Icon { get; set; }
- public int Level { get; set; }
- ///
- /// 用户等级名称
- ///
- public string LevelName { get; set; }
- ///
- /// 用户限制
- ///
- public UserLimitEnum UserLimit { get; set; }
-}
\ No newline at end of file
diff --git a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Analyse/MoneyTopUserDto.cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Analyse/MoneyTopUserDto.cs
deleted file mode 100644
index 23781369..00000000
--- a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Analyse/MoneyTopUserDto.cs
+++ /dev/null
@@ -1,7 +0,0 @@
-namespace Yi.Framework.Bbs.Application.Contracts.Dtos.Analyse;
-
-public class MoneyTopUserDto:BaseAnalyseTopUserDto
-{
- public decimal Money { get; set; }
-
-}
\ No newline at end of file
diff --git a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Analyse/PointsTopUserDto.cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Analyse/PointsTopUserDto.cs
deleted file mode 100644
index 573c69aa..00000000
--- a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Analyse/PointsTopUserDto.cs
+++ /dev/null
@@ -1,8 +0,0 @@
-using Yi.Framework.Bbs.Domain.Shared.Enums;
-
-namespace Yi.Framework.Bbs.Application.Contracts.Dtos.Analyse;
-
-public class PointsTopUserDto:BaseAnalyseTopUserDto
-{
- public int Points { get; set; }
-}
\ No newline at end of file
diff --git a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Analyse/RegisterAnalyseDto.cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Analyse/RegisterAnalyseDto.cs
deleted file mode 100644
index baa88cac..00000000
--- a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Analyse/RegisterAnalyseDto.cs
+++ /dev/null
@@ -1,20 +0,0 @@
-namespace Yi.Framework.Bbs.Application.Contracts.Dtos.Analyse;
-
-public class RegisterAnalyseDto
-{
- public RegisterAnalyseDto(DateTime time, int number)
- {
- Time = time;
- Number = number;
- }
-
- ///
- /// 时间
- ///
- public DateTime Time { get; set; }
-
- ///
- /// 人数
- ///
- public int Number { get; set; }
-}
\ No newline at end of file
diff --git a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Analyse/ValueTopUserDto.cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Analyse/ValueTopUserDto.cs
deleted file mode 100644
index 01ef7681..00000000
--- a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Analyse/ValueTopUserDto.cs
+++ /dev/null
@@ -1,6 +0,0 @@
-namespace Yi.Framework.Bbs.Application.Contracts.Dtos.Analyse;
-
-public class ValueTopUserDto:BaseAnalyseTopUserDto
-{
- public decimal Value { get; set; }
-}
\ No newline at end of file
diff --git a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Argee/AgreeDto.cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Argee/AgreeDto.cs
deleted file mode 100644
index 6b9f8815..00000000
--- a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Argee/AgreeDto.cs
+++ /dev/null
@@ -1,24 +0,0 @@
-namespace Yi.Framework.Bbs.Application.Contracts.Dtos.Argee
-{
- public class AgreeDto
- {
- public AgreeDto(bool isAgree)
- {
- IsAgree = isAgree;
- if (isAgree)
- {
-
- Message = "点赞成功,点赞+1";
- }
- else
- {
-
- Message = "取消点赞,点赞-1";
- }
-
- }
-
- public bool IsAgree { get; set; }
- public string Message { get; set; }
- }
-}
diff --git a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Article/ArticleAllOutputDto.cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Article/ArticleAllOutputDto.cs
deleted file mode 100644
index 454cf0e7..00000000
--- a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Article/ArticleAllOutputDto.cs
+++ /dev/null
@@ -1,16 +0,0 @@
-using Volo.Abp.Application.Dtos;
-
-namespace Yi.Framework.Bbs.Application.Contracts.Dtos.Article
-{
- public class ArticleAllOutputDto : EntityDto
- {
-
- //批量查询,不给内容,性能考虑
- //public string Content { get; set; }
- public string Name { get; set; }
- public Guid DiscussId { get; set; }
- public Guid ParentId { get; set; }
-
- public List? Children { get; set; }
- }
-}
diff --git a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Article/ArticleCreateInputVo.cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Article/ArticleCreateInputVo.cs
deleted file mode 100644
index 0258a37b..00000000
--- a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Article/ArticleCreateInputVo.cs
+++ /dev/null
@@ -1,19 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace Yi.Framework.Bbs.Application.Contracts.Dtos.Article
-{
- ///
- /// Article输入创建对象
- ///
- public class ArticleCreateInputVo
- {
- public string Content { get; set; }
- public string Name { get; set; }
- public Guid DiscussId { get; set; }
- public Guid ParentId { get; set; }
- }
-}
diff --git a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Article/ArticleGetListInputVo.cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Article/ArticleGetListInputVo.cs
deleted file mode 100644
index b10278a1..00000000
--- a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Article/ArticleGetListInputVo.cs
+++ /dev/null
@@ -1,13 +0,0 @@
-using Volo.Abp.Application.Dtos;
-using Yi.Framework.Ddd.Application.Contracts;
-
-namespace Yi.Framework.Bbs.Application.Contracts.Dtos.Article
-{
- public class ArticleGetListInputVo : PagedAllResultRequestDto
- {
- public string? Content { get; set; }
- public string? Name { get; set; }
- public Guid? DiscussId { get; set; }
- public Guid? ParentId { get; set; }
- }
-}
diff --git a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Article/ArticleGetListOutputDto.cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Article/ArticleGetListOutputDto.cs
deleted file mode 100644
index 01c347c1..00000000
--- a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Article/ArticleGetListOutputDto.cs
+++ /dev/null
@@ -1,14 +0,0 @@
-using Volo.Abp.Application.Dtos;
-
-namespace Yi.Framework.Bbs.Application.Contracts.Dtos.Article
-{
- public class ArticleGetListOutputDto : EntityDto
- {
- public string Name { get; set; }
- public Guid DiscussId { get; set; }
-
- public List? Children { get; set; }
-
- public DateTime CreationTime { get; set; }
- }
-}
diff --git a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Article/ArticleGetOutputDto.cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Article/ArticleGetOutputDto.cs
deleted file mode 100644
index b76fa472..00000000
--- a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Article/ArticleGetOutputDto.cs
+++ /dev/null
@@ -1,33 +0,0 @@
-using Volo.Abp.Application.Dtos;
-using Yi.Framework.Bbs.Domain.Shared.Consts;
-
-namespace Yi.Framework.Bbs.Application.Contracts.Dtos.Article
-{
- public class ArticleGetOutputDto : EntityDto
- {
- public string Content { get; set; }
- public string Name { get; set; }
- public Guid DiscussId { get; set; }
- public Guid ParentId { get; set; }
-
- public DateTime CreationTime { get; set; }
-
- public bool HasPermission { get;internal set; }
-
- ///
- /// 设置权限
- ///
- public void SetPassPermission()
- {
- HasPermission = true;
- }
- ///
- /// 设置无权限
- ///
- public void SetNoPermission()
- {
- HasPermission = false;
- Content=DiscussConst.Privacy;
- }
- }
-}
diff --git a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Article/ArticleImprotDto.cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Article/ArticleImprotDto.cs
deleted file mode 100644
index 9adb2ac5..00000000
--- a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Article/ArticleImprotDto.cs
+++ /dev/null
@@ -1,24 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.ComponentModel.DataAnnotations;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using Microsoft.AspNetCore.Http;
-using Yi.Framework.Bbs.Domain.Shared.Enums;
-
-namespace Yi.Framework.Bbs.Application.Contracts.Dtos.Article
-{
- public class ArticleImprotDto
- {
- ///
- /// 主题id
- ///
- [Required]
- public Guid DiscussId { get; set; }
-
- public Guid ArticleParentId { get; set; }= Guid.Empty;
-
- public ArticleImportTypeEnum ImportType { get; set; } = ArticleImportTypeEnum.Default;
-}
-}
diff --git a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Article/ArticleUpdateInputVo.cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Article/ArticleUpdateInputVo.cs
deleted file mode 100644
index 0e6f6ed0..00000000
--- a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Article/ArticleUpdateInputVo.cs
+++ /dev/null
@@ -1,10 +0,0 @@
-namespace Yi.Framework.Bbs.Application.Contracts.Dtos.Article
-{
- public class ArticleUpdateInputVo
- {
- public string Content { get; set; }
- public string Name { get; set; }
- public Guid DiscussId { get; set; }
- public Guid ParentId { get; set; }
- }
-}
diff --git a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Assignment/AssignmentDefineGetListOutputDto.cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Assignment/AssignmentDefineGetListOutputDto.cs
deleted file mode 100644
index f651300c..00000000
--- a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Assignment/AssignmentDefineGetListOutputDto.cs
+++ /dev/null
@@ -1,44 +0,0 @@
-using Volo.Abp.Application.Dtos;
-using Yi.Framework.Bbs.Domain.Shared.Enums;
-
-namespace Yi.Framework.Bbs.Application.Contracts.Dtos.Assignment;
-
-public class AssignmentDefineGetListOutputDto : EntityDto
-{
- ///
- /// 任务名称
- ///
- public string Name { get; set; }
-
- ///
- /// 备注
- ///
- public string Remarks { get; set; }
-
- ///
- /// 任务类型
- ///
- public AssignmentTypeEnum AssignmentType { get; set; }
-
- ///
- /// 任务需求类型
- ///
- public AssignmentRequirementTypeEnum AssignmentRequirementType{ get; set; }
-
- ///
- /// 总共步骤数
- ///
- public int TotalStepNumber { get; set; }
-
- ///
- /// 前置任务id
- ///
- public Guid? PreAssignmentId { get; set; }
-
- ///
- /// 任务奖励的钱钱数量
- ///
- public decimal RewardsMoneyNumber { get; set; }
-
- public int OrderNum { get; set; }
-}
\ No newline at end of file
diff --git a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Assignment/AssignmentGetListInput.cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Assignment/AssignmentGetListInput.cs
deleted file mode 100644
index af308e36..00000000
--- a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Assignment/AssignmentGetListInput.cs
+++ /dev/null
@@ -1,24 +0,0 @@
-using Volo.Abp.Application.Dtos;
-
-namespace Yi.Framework.Bbs.Application.Contracts.Dtos.Assignment;
-
-public class AssignmentGetListInput
-{
- ///
- /// 任务查询条件
- ///
- public AssignmentQueryStateEnum AssignmentQueryState { get; set; } = AssignmentQueryStateEnum.Progress;
-}
-
-public enum AssignmentQueryStateEnum
-{
- ///
- /// 正在进行
- ///
- Progress,
-
- ///
- /// 已结束
- ///
- End
-}
\ No newline at end of file
diff --git a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Assignment/AssignmentGetListOutputDto.cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Assignment/AssignmentGetListOutputDto.cs
deleted file mode 100644
index cdd7baf1..00000000
--- a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Assignment/AssignmentGetListOutputDto.cs
+++ /dev/null
@@ -1,54 +0,0 @@
-using Volo.Abp.Application.Dtos;
-using Yi.Framework.Bbs.Domain.Shared.Enums;
-
-namespace Yi.Framework.Bbs.Application.Contracts.Dtos.Assignment;
-
-public class AssignmentGetListOutputDto:EntityDto
-{
- ///
- /// 任务名称
- ///
- public string Name { get; set; }
-
- ///
- /// 备注
- ///
- public string Remarks { get; set; }
- ///
- /// 当前步骤数
- ///
- public int CurrentStepNumber { get; set; }
-
- ///
- /// 总共步骤数
- ///
- public int TotalStepNumber { get; set; }
- ///
- /// 任务类型
- ///
- public AssignmentTypeEnum AssignmentType { get; set; }
-
- ///
- /// 任务需求类型
- ///
- public AssignmentRequirementTypeEnum AssignmentRequirementType{ get; set; }
- ///
- /// 任务状态
- ///
- public AssignmentStateEnum AssignmentState { get; set; }
-
- ///
- /// 任务奖励的钱钱数量
- ///
- public decimal RewardsMoneyNumber { get; set; }
- ///
- /// 任务过期时间
- ///
- public DateTime? ExpireTime { get; set; }
-
- public DateTime? CompleteTime { get; set; }
-
-
- public DateTime CreationTime { get; set; }
- public int OrderNum { get; set; }
-}
\ No newline at end of file
diff --git a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Bank/BankCardDto.cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Bank/BankCardDto.cs
deleted file mode 100644
index 82e5df09..00000000
--- a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Bank/BankCardDto.cs
+++ /dev/null
@@ -1,44 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using Volo.Abp.Application.Dtos;
-using Yi.Framework.Bbs.Domain.Shared.Enums;
-
-namespace Yi.Framework.Bbs.Application.Contracts.Dtos.Bank
-{
- public class BankCardDto:EntityDto
- {
- ///
- /// 满期限时间,可空
- ///
- public DateTime? FulltermTime { get; set; }
- public DateTime? LastDepositTime { get; set; }
- public DateTime CreationTime { get; set; }
-
- ///
- /// 用户id
- ///
- public Guid UserId { get; set; }
-
- ///
- /// 当前存储的钱
- ///
- public decimal StorageMoney { get; set; }
-
-
- ///
- /// 最大可存储的钱钱
- ///
- public decimal MaxStorageMoney { get; set; }
-
-
-
- ///
- /// 银行卡状态
- ///
- public BankCardStateEnum BankCardState { get; set; } = BankCardStateEnum.Unused;
-
- }
-}
diff --git a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Bank/InterestRecordsDto.cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Bank/InterestRecordsDto.cs
deleted file mode 100644
index c27d5554..00000000
--- a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Bank/InterestRecordsDto.cs
+++ /dev/null
@@ -1,25 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using Volo.Abp.Application.Dtos;
-
-namespace Yi.Framework.Bbs.Application.Contracts.Dtos.Bank
-{
- public class InterestRecordsDto : EntityDto
- {
- public DateTime CreationTime { get; set; }
-
- ///
- /// 当前汇率值
- ///
- public decimal Value { get; set; }
-
- ///
- /// 是否波动期
- ///
- public bool IsFluctuate { get; set; }
-
- }
-}
diff --git a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Banner/BannerCreateInputVo.cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Banner/BannerCreateInputVo.cs
deleted file mode 100644
index b0e429b8..00000000
--- a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Banner/BannerCreateInputVo.cs
+++ /dev/null
@@ -1,12 +0,0 @@
-namespace Yi.Framework.Bbs.Application.Contracts.Dtos.Banner
-{
- ///
- /// Banner输入创建对象
- ///
- public class BannerCreateInputVo
- {
- public string Name { get; set; }
- public string? Logo { get; set; }
- public string? Color { get; set; }
- }
-}
diff --git a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Banner/BannerGetListInputVo.cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Banner/BannerGetListInputVo.cs
deleted file mode 100644
index 5e496646..00000000
--- a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Banner/BannerGetListInputVo.cs
+++ /dev/null
@@ -1,9 +0,0 @@
-using Volo.Abp.Application.Dtos;
-
-namespace Yi.Framework.Bbs.Application.Contracts.Dtos.Banner
-{
- public class BannerGetListInputVo : PagedAndSortedResultRequestDto
- {
- public string? Name { get; set; }
- }
-}
diff --git a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Banner/BannerGetListOutputDto.cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Banner/BannerGetListOutputDto.cs
deleted file mode 100644
index a44287af..00000000
--- a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Banner/BannerGetListOutputDto.cs
+++ /dev/null
@@ -1,13 +0,0 @@
-using Volo.Abp.Application.Dtos;
-
-namespace Yi.Framework.Bbs.Application.Contracts.Dtos.Banner
-{
- public class BannerGetListOutputDto : EntityDto
- {
- public string Name { get; set; }
- public string? Logo { get; set; }
- public string? Color { get; set; }
-
- public DateTime CreationTime { get; set; }
- }
-}
diff --git a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Banner/BannerGetOutputDto.cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Banner/BannerGetOutputDto.cs
deleted file mode 100644
index c31e1861..00000000
--- a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Banner/BannerGetOutputDto.cs
+++ /dev/null
@@ -1,13 +0,0 @@
-using Volo.Abp.Application.Dtos;
-
-namespace Yi.Framework.Bbs.Application.Contracts.Dtos.Banner
-{
- public class BannerGetOutputDto : EntityDto
- {
- public string Name { get; set; }
- public string? Logo { get; set; }
- public string? Color { get; set; }
-
- public DateTime CreationTime { get; set; }
- }
-}
diff --git a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Banner/BannerUpdateInputVo.cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Banner/BannerUpdateInputVo.cs
deleted file mode 100644
index 369bc283..00000000
--- a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Banner/BannerUpdateInputVo.cs
+++ /dev/null
@@ -1,9 +0,0 @@
-namespace Yi.Framework.Bbs.Application.Contracts.Dtos.Banner
-{
- public class BannerUpdateInputVo
- {
- public string? Name { get; set; }
- public string? Logo { get; set; }
- public string? Color { get; set; }
- }
-}
diff --git a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/BbsUser/BbsUserAnalyseGetOutput.cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/BbsUser/BbsUserAnalyseGetOutput.cs
deleted file mode 100644
index 34edba67..00000000
--- a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/BbsUser/BbsUserAnalyseGetOutput.cs
+++ /dev/null
@@ -1,27 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace Yi.Framework.Bbs.Application.Contracts.Dtos.BbsUser
-{
- public class BbsUserAnalyseGetOutput
- {
- ///
- /// 注册人数
- ///
- public long RegisterNumber { get; set; }
-
-
- ///
- /// 在线人数
- ///
- public long OnlineNumber { get; set; }
-
- ///
- /// 昨天新增用户
- ///
- public long YesterdayNewUser { get; set; }
- }
-}
diff --git a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/BbsUser/BbsUserGetListOutputDto.cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/BbsUser/BbsUserGetListOutputDto.cs
deleted file mode 100644
index 52018463..00000000
--- a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/BbsUser/BbsUserGetListOutputDto.cs
+++ /dev/null
@@ -1,39 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using Yi.Framework.Bbs.Domain.Shared.Enums;
-using Yi.Framework.Rbac.Application.Contracts.Dtos.User;
-
-namespace Yi.Framework.Bbs.Application.Contracts.Dtos.BbsUser
-{
- public class BbsUserGetListOutputDto: UserGetListOutputDto
- {
- ///
- /// 用户等级
- ///
- public int Level { get; set; }
-
- ///
- /// 用户限制
- ///
- public UserLimitEnum UserLimit { get; set; }
-
- ///
- /// 钱钱
- ///
- public decimal Money { get; set; }
-
-
- ///
- /// 经验
- ///
- public long Experience { get; set; }
-
- ///
- /// 用户等级名称
- ///
- public string LevelName { get; set; }
- }
-}
diff --git a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/BbsUser/BbsUserGetOutputDto.cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/BbsUser/BbsUserGetOutputDto.cs
deleted file mode 100644
index cce27810..00000000
--- a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/BbsUser/BbsUserGetOutputDto.cs
+++ /dev/null
@@ -1,23 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using Yi.Framework.Bbs.Domain.Shared.Enums;
-using Yi.Framework.Rbac.Application.Contracts.Dtos.User;
-
-namespace Yi.Framework.Bbs.Application.Contracts.Dtos.BbsUser
-{
- public class BbsUserGetOutputDto: UserGetOutputDto
- {
- ///
- /// 用户等级
- ///
- public int Level { get; set; }
-
- ///
- /// 用户限制
- ///
- public UserLimitEnum UserLimit { get; set; }
- }
-}
diff --git a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Comment/CommentCreateInputVo.cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Comment/CommentCreateInputVo.cs
deleted file mode 100644
index 6cc4abb1..00000000
--- a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Comment/CommentCreateInputVo.cs
+++ /dev/null
@@ -1,29 +0,0 @@
-namespace Yi.Framework.Bbs.Application.Contracts.Dtos.Comment
-{
- ///
- /// Comment输入创建对象
- ///
- public class CommentCreateInputVo
- {
-
- ///
- /// 评论id
- ///
- public string? Content { get; set; }
-
- ///
- /// 主题id
- ///
- public Guid DiscussId { get; set; }
-
- ///
- /// 第一层评论id,第一层为0
- ///
- public Guid RootId { get; set; }
-
- ///
- /// 被回复的CommentId,第一层为0
- ///
- public Guid ParentId { get; set; }
- }
-}
diff --git a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Comment/CommentGetListInputVo.cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Comment/CommentGetListInputVo.cs
deleted file mode 100644
index 14920c8e..00000000
--- a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Comment/CommentGetListInputVo.cs
+++ /dev/null
@@ -1,11 +0,0 @@
-namespace Yi.Framework.Bbs.Application.Contracts.Dtos.Comment
-{
- public class CommentGetListInputVo
- {
- public DateTime? creationTime { get; set; }
- public string? Content { get; set; }
-
- //ӦѡĪѯ
- public Guid? DiscussId { get; set; }
- }
-}
diff --git a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Comment/CommentGetListOutputDto.cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Comment/CommentGetListOutputDto.cs
deleted file mode 100644
index fc7b23a3..00000000
--- a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Comment/CommentGetListOutputDto.cs
+++ /dev/null
@@ -1,49 +0,0 @@
-using Volo.Abp.Application.Dtos;
-using Yi.Framework.Bbs.Application.Contracts.Dtos.BbsUser;
-using Yi.Framework.Rbac.Application.Contracts.Dtos.User;
-
-namespace Yi.Framework.Bbs.Application.Contracts.Dtos.Comment
-{
- ///
- /// ۶෴
- ///
- public class CommentGetListOutputDto : EntityDto
- {
-
- public DateTime? CreationTime { get; set; }
-
-
-
-
- public string Content { get; set; }
-
-
- ///
- /// id
- ///
- public Guid DiscussId { get; set; }
-
- public Guid ParentId { get; set; }
-
- public Guid RootId { get; set; }
-
- ///
- /// û,ûϢ
- ///
- public BbsUserGetOutputDto CreateUser { get; set; }
-
-
- public Guid? CreatorId { get; set; }
-
- ///
- /// ۵ûϢ
- ///
- public BbsUserGetOutputDto CommentedUser { get; set; }
-
-
- ///
- /// һΣǴһά飬Childrenֻڶʱֻһ
- ///
- public List Children { get; set; } = new List();
- }
-}
diff --git a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Comment/CommentGetOutputDto.cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Comment/CommentGetOutputDto.cs
deleted file mode 100644
index cd348c86..00000000
--- a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Comment/CommentGetOutputDto.cs
+++ /dev/null
@@ -1,35 +0,0 @@
-using Volo.Abp.Application.Dtos;
-using Yi.Framework.Bbs.Application.Contracts.Dtos.BbsUser;
-using Yi.Framework.Rbac.Application.Contracts.Dtos.User;
-
-namespace Yi.Framework.Bbs.Application.Contracts.Dtos.Comment
-{
- ///
- /// أصۼ
- ///
- public class CommentGetOutputDto : EntityDto
- {
-
- public DateTime? CreateTime { get; set; }
- public string Content { get; set; }
-
- public Guid DiscussId { get; set; }
-
-
- ///
- /// ûidΪû
- ///
-
- public BbsUserGetOutputDto User { get; set; }
- ///
- /// ڵid
- ///
- public Guid RootId { get; set; }
-
- ///
- /// ظCommentId
- ///
- public Guid ParentId { get; set; }
-
- }
-}
diff --git a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Comment/CommentUpdateInputVo.cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Comment/CommentUpdateInputVo.cs
deleted file mode 100644
index 02d7fb44..00000000
--- a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Comment/CommentUpdateInputVo.cs
+++ /dev/null
@@ -1,10 +0,0 @@
-namespace Yi.Framework.Bbs.Application.Contracts.Dtos.Comment
-{
- public class CommentUpdateInputVo
- {
-
- public string Content { get; set; }
-
- //²ܽת
- }
-}
diff --git a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Discuss/DiscussCreateInput.cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Discuss/DiscussCreateInput.cs
deleted file mode 100644
index 2834c938..00000000
--- a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Discuss/DiscussCreateInput.cs
+++ /dev/null
@@ -1,71 +0,0 @@
-using Yi.Framework.Bbs.Domain.Shared.Enums;
-
-namespace Yi.Framework.Bbs.Application.Contracts.Dtos.Discuss
-{
- ///
- /// Discuss输入创建对象
- ///
- public class DiscussCreateInput
- {
- public DiscussTypeEnum DiscussType { get; set; }
-
- public string Title { get; set; }
- public string? Types { get; set; }
- public string? Introduction { get; set; }
- public DateTime? CreateTime { get; set; } = DateTime.Now;
- public string Content { get; set; }
- public string? Color { get; set; }
-
- public Guid PlateId { get; set; }
-
- ///
- /// 默认公开
- ///
- public DiscussPermissionTypeEnum PermissionType { get; set; } = DiscussPermissionTypeEnum.Public;
- ///
- /// 封面
- ///
- public string? Cover { get; set; }
-
- public int OrderNum { get; set; } = 0;
-
- ///
- /// 是否禁止评论创建功能
- ///
- public bool IsDisableCreateComment { get; set; }
-
- ///
- /// 标签
- ///
- public List? DiscussLableIds { get; set; }
-
- ///
- /// 角色
- ///
- public List? PermissionRoleCodes { get; set; } = new List();
-
- ///
- /// 悬赏类型主题
- ///
- public DiscussRewardCreateInput? RewardData { get; set; }
- }
-
-
- public class DiscussRewardCreateInput
- {
- ///
- /// 悬赏最小价值
- ///
- public decimal MinValue { get; set; }
-
- ///
- /// 悬赏最大价值
- ///
- public decimal? MaxValue { get; set; }
-
- ///
- /// 作者联系方式
- ///
- public string Contact { get; set; }
- }
-}
diff --git a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Discuss/DiscussGetListInputVo.cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Discuss/DiscussGetListInputVo.cs
deleted file mode 100644
index 9c93e93d..00000000
--- a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Discuss/DiscussGetListInputVo.cs
+++ /dev/null
@@ -1,25 +0,0 @@
-using Volo.Abp.Application.Dtos;
-using Yi.Framework.Bbs.Domain.Shared.Enums;
-
-namespace Yi.Framework.Bbs.Application.Contracts.Dtos.Discuss
-{
- public class DiscussGetListInputVo : PagedAndSortedResultRequestDto
- {
- ///
- /// 创建者的用户名
- ///
- public string? UserName { get; set; }
- public Guid? UserId { get; set; }
-
- public string? Title { get; set; }
-
- public Guid? PlateId { get; set; }
-
- //默认查询非置顶
- public bool? IsTop { get; set; }
-
-
- //查询方式
- public QueryDiscussTypeEnum Type { get; set; } = QueryDiscussTypeEnum.New;
- }
-}
diff --git a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Discuss/DiscussGetListOutputDto.cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Discuss/DiscussGetListOutputDto.cs
deleted file mode 100644
index 8678f9a2..00000000
--- a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Discuss/DiscussGetListOutputDto.cs
+++ /dev/null
@@ -1,58 +0,0 @@
-using Volo.Abp.Application.Dtos;
-using Yi.Framework.Bbs.Application.Contracts.Dtos.BbsUser;
-using Yi.Framework.Bbs.Application.Contracts.Dtos.DiscussLable;
-using Yi.Framework.Bbs.Domain.Shared.Consts;
-using Yi.Framework.Bbs.Domain.Shared.Enums;
-using Yi.Framework.Rbac.Application.Contracts.Dtos.User;
-
-namespace Yi.Framework.Bbs.Application.Contracts.Dtos.Discuss
-{
- public class DiscussGetListOutputDto : EntityDto
- {
- ///
- /// 是否禁止评论创建功能
- ///
- public bool IsDisableCreateComment { get; set; }
- ///
- /// 是否已点赞,默认未登录不点赞
- ///
- public bool IsAgree { get; set; } = false;
- public string Title { get; set; }
- public string? Introduction { get; set; }
-
- public int AgreeNum { get; set; }
- public int SeeNum { get; set; }
-
- //批量查询,不给内容,性能考虑
- //public string Content { get; set; }
- public string? Color { get; set; }
-
- public Guid PlateId { get; set; }
-
- //是否置顶,默认false
- public bool IsTop { get; set; }
-
- public DiscussTypeEnum DiscussType { get; set; }
-
- public DiscussPermissionTypeEnum PermissionType { get; set; }
- //是否禁止,默认false
- public bool IsBan { get; set; }
-
-
- ///
- /// 封面
- ///
- public string? Cover { get; set; }
-
- public DateTime CreationTime { get; set; }
-
- ///
- /// 所需角色
- ///
- public List? PermissionRoleCodes { get; set; } = new List();
-
- public BbsUserGetListOutputDto User { get; set; }
- public List? DiscussLableIds { get; set; } = new List();
- public List Lables { get; set; } = new List();
- }
-}
diff --git a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Discuss/DiscussGetOutputDto.cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Discuss/DiscussGetOutputDto.cs
deleted file mode 100644
index ab36be8b..00000000
--- a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Discuss/DiscussGetOutputDto.cs
+++ /dev/null
@@ -1,73 +0,0 @@
-using Volo.Abp.Application.Dtos;
-using Yi.Framework.Bbs.Application.Contracts.Dtos.BbsUser;
-using Yi.Framework.Bbs.Application.Contracts.Dtos.DiscussLable;
-using Yi.Framework.Bbs.Application.Contracts.Dtos.Plate;
-using Yi.Framework.Bbs.Domain.Shared.Consts;
-using Yi.Framework.Bbs.Domain.Shared.Enums;
-using Yi.Framework.Rbac.Application.Contracts.Dtos.User;
-
-namespace Yi.Framework.Bbs.Application.Contracts.Dtos.Discuss
-{
- public class DiscussGetOutputDto : EntityDto
- {
- ///
- /// 是否禁止评论创建功能
- ///
- public bool IsDisableCreateComment { get; set; }
- public string Title { get; set; }
- public string? Introduction { get; set; }
- public int AgreeNum { get; set; }
- public int SeeNum { get; set; }
- public string Content { get; set; }
- public string? Color { get; set; }
-
- public Guid PlateId { get; set; }
- //是否置顶,默认false
- public bool IsTop { get; set; }
- ///
- /// 主题类型
- ///
- public DiscussTypeEnum DiscussType { get; set; }
- ///
- /// 封面
- ///
- public string? Cover { get; set; }
- //是否私有,默认false
- public bool IsPrivate { get; set; }
-
- //私有需要判断code权限
- public string? PrivateCode { get; set; }
- public DateTime CreationTime { get; set; }
- public DiscussPermissionTypeEnum PermissionType { get; set; }
- public bool IsAgree { get; set; } = false;
- public List PermissionRoleCodes { get; set; } = new List();
-
-
-
- public BbsUserGetListOutputDto User { get; set; }
-
- public PlateGetOutputDto Plate { get; set; }
-
- public List? DiscussLableIds { get; set; } = new List();
- public List Lables { get; set; } =new List();
-
- public bool HasPermission { get;internal set; }
-
- public DiscussRewardGetOutputDto? RewardData { get; set; }
- ///
- /// 设置权限
- ///
- public void SetPassPermission()
- {
- HasPermission = true;
- }
- ///
- /// 设置无权限
- ///
- public void SetNoPermission()
- {
- HasPermission = false;
- Content=DiscussConst.Privacy;
- }
- }
-}
diff --git a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Discuss/DiscussRewardGetOutputDto.cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Discuss/DiscussRewardGetOutputDto.cs
deleted file mode 100644
index ed49f831..00000000
--- a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Discuss/DiscussRewardGetOutputDto.cs
+++ /dev/null
@@ -1,23 +0,0 @@
-namespace Yi.Framework.Bbs.Application.Contracts.Dtos.Discuss;
-
-public class DiscussRewardGetOutputDto
-{
- ///
- /// 是否已解决
- ///
- public bool IsResolved{ get; set; }
- ///
- /// 悬赏最小价值
- ///
- public decimal MinValue { get; set; }
-
- ///
- /// 悬赏最大价值
- ///
- public decimal? MaxValue { get; set; }
-
- ///
- /// 作者联系方式
- ///
- public string Contact { get; set; }
-}
\ No newline at end of file
diff --git a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Discuss/DiscussUpdateInput.cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Discuss/DiscussUpdateInput.cs
deleted file mode 100644
index 628d331b..00000000
--- a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Discuss/DiscussUpdateInput.cs
+++ /dev/null
@@ -1,39 +0,0 @@
-using Yi.Framework.Bbs.Domain.Shared.Enums;
-
-namespace Yi.Framework.Bbs.Application.Contracts.Dtos.Discuss
-{
- public class DiscussUpdateInput
- {
- public string Title { get; set; }
- public string? Types { get; set; }
- public string? Introduction { get; set; }
- public string Content { get; set; }
- public string? Color { get; set; }
-
- public List? PermissionUserIds { get; set; }
-
- public DiscussPermissionTypeEnum PermissionType { get; set; }
-
- ///
- /// 封面
- ///
- public string? Cover { get; set; }
-
- public int OrderNum { get; set; }
-
- ///
- /// 是否禁止评论创建功能
- ///
- public bool IsDisableCreateComment { get; set; }
-
- ///
- /// 标签
- ///
- public List? DiscussLableIds { get; set; }
-
- ///
- /// 需求角色
- ///
- public List? PermissionRoleCodes { get; set; } = new List();
- }
-}
diff --git a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/DiscussLable/DiscussLableGetOutputDto.cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/DiscussLable/DiscussLableGetOutputDto.cs
deleted file mode 100644
index 40ebe4c7..00000000
--- a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/DiscussLable/DiscussLableGetOutputDto.cs
+++ /dev/null
@@ -1,11 +0,0 @@
-using Volo.Abp.Application.Dtos;
-
-namespace Yi.Framework.Bbs.Application.Contracts.Dtos.DiscussLable;
-
-public class DiscussLableGetOutputDto:EntityDto
-{
- public Guid Id { get; set; }
- public string Name { get; set; }
- public string? Color { get; set; }
- public string? BackgroundColor { get; set; }
-}
\ No newline at end of file
diff --git a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Integral/SignInDto.cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Integral/SignInDto.cs
deleted file mode 100644
index 6923cf99..00000000
--- a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Integral/SignInDto.cs
+++ /dev/null
@@ -1,31 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using Volo.Abp.Application.Dtos;
-
-namespace Yi.Framework.Bbs.Application.Contracts.Dtos.Integral
-{
- public class SignInDto
- {
- ///
- /// 签到数据
- ///
- public List SignInItem { get; set; }=new List();
-
- ///
- /// 当前连续签到次数
- ///
- public int CurrentContinuousNumber { get; set; }
- }
-
-
- public class SignInItemDto : EntityDto
- {
- ///
- /// 签到时间
- ///
- public DateTime CreationTime { get; set; }
- }
-}
diff --git a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Level/LevelGetListInputDto.cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Level/LevelGetListInputDto.cs
deleted file mode 100644
index 76a7ee49..00000000
--- a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Level/LevelGetListInputDto.cs
+++ /dev/null
@@ -1,21 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using Volo.Abp.Application.Dtos;
-
-namespace Yi.Framework.Bbs.Application.Contracts.Dtos.Level
-{
- public class LevelGetListInputDto:PagedResultRequestDto
- { ///
- /// 当前等级
- ///
- public int? MinLevel { get; set; }
-
- ///
- /// 等级名称
- ///
- public string? Name { get; set; }
- }
-}
diff --git a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Level/LevelOutputDto.cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Level/LevelOutputDto.cs
deleted file mode 100644
index f6584fa9..00000000
--- a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Level/LevelOutputDto.cs
+++ /dev/null
@@ -1,34 +0,0 @@
-using Volo.Abp.Application.Dtos;
-
-namespace Yi.Framework.Bbs.Application.Contracts.Dtos.Level
-{
- public class LevelOutputDto : EntityDto
- {
- public Guid Id { get; set; }
-
- ///
- /// 当前等级
- ///
- public int CurrentLevel { get; set; }
-
- ///
- /// 最小所需经验值
- ///
- public decimal MinExperience { get; set; }
-
- ///
- /// 等级名称
- ///
- public string Name { get; set; }
-
- ///
- /// 等级称号
- ///
- public string? Nick { get; set; }
-
- ///
- /// 等候logo
- ///
- public string? Logo { get; set; }
- }
-}
diff --git a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/MyType/DiscussLableCreateInputVo.cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/MyType/DiscussLableCreateInputVo.cs
deleted file mode 100644
index 872bbd34..00000000
--- a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/MyType/DiscussLableCreateInputVo.cs
+++ /dev/null
@@ -1,12 +0,0 @@
-namespace Yi.Framework.Bbs.Application.Contracts.Dtos.MyType
-{
- ///
- /// Label输入创建对象
- ///
- public class DiscussLableCreateInputVo
- {
- public string Name { get; set; }
- public string? Color { get; set; }
- public string? BackgroundColor { get; set; }
- }
-}
diff --git a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/MyType/DiscussLableGetListInputVo.cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/MyType/DiscussLableGetListInputVo.cs
deleted file mode 100644
index ef8ba68a..00000000
--- a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/MyType/DiscussLableGetListInputVo.cs
+++ /dev/null
@@ -1,9 +0,0 @@
-using Volo.Abp.Application.Dtos;
-
-namespace Yi.Framework.Bbs.Application.Contracts.Dtos.MyType
-{
- public class DiscussLableGetListInputVo : PagedAndSortedResultRequestDto
- {
- public string? Name { get; set; }
- }
-}
diff --git a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/MyType/DiscussLableGetListOutputDto.cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/MyType/DiscussLableGetListOutputDto.cs
deleted file mode 100644
index 2f15e1e1..00000000
--- a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/MyType/DiscussLableGetListOutputDto.cs
+++ /dev/null
@@ -1,11 +0,0 @@
-using Volo.Abp.Application.Dtos;
-
-namespace Yi.Framework.Bbs.Application.Contracts.Dtos.MyType
-{
- public class DiscussLableGetListOutputDto : EntityDto
- {
- public string Name { get; set; }
- public string? Color { get; set; }
- public string? BackgroundColor { get; set; }
- }
-}
diff --git a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/MyType/DiscussLableOutputDto.cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/MyType/DiscussLableOutputDto.cs
deleted file mode 100644
index fe34703e..00000000
--- a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/MyType/DiscussLableOutputDto.cs
+++ /dev/null
@@ -1,12 +0,0 @@
-using Volo.Abp.Application.Dtos;
-
-namespace Yi.Framework.Bbs.Application.Contracts.Dtos.MyType
-{
- public class DiscussLableOutputDto : EntityDto
- {
- public string Name { get; set; }
- public string? Color { get; set; }
- public string? BackgroundColor { get; set; }
- public Guid UserId { get; set; }
- }
-}
diff --git a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/MyType/DiscussLableUpdateInputVo.cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/MyType/DiscussLableUpdateInputVo.cs
deleted file mode 100644
index b91b6d41..00000000
--- a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/MyType/DiscussLableUpdateInputVo.cs
+++ /dev/null
@@ -1,9 +0,0 @@
-namespace Yi.Framework.Bbs.Application.Contracts.Dtos.MyType
-{
- public class DiscussLableUpdateInputVo
- {
- public string Name { get; set; }
- public string? Color { get; set; }
- public string? BackgroundColor { get; set; }
- }
-}
diff --git a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Notice/BbsNoticeGetListInputVo.cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Notice/BbsNoticeGetListInputVo.cs
deleted file mode 100644
index 866dcbbc..00000000
--- a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Notice/BbsNoticeGetListInputVo.cs
+++ /dev/null
@@ -1,14 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using Volo.Abp.Application.Dtos;
-using Yi.Framework.Ddd.Application.Contracts;
-
-namespace Yi.Framework.Bbs.Application.Contracts.Dtos.Notice
-{
- public class BbsNoticeGetListInputVo:PagedAllResultRequestDto
- {
- }
-}
diff --git a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Notice/BbsNoticeGetListOutputDto.cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Notice/BbsNoticeGetListOutputDto.cs
deleted file mode 100644
index fe3aea20..00000000
--- a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Notice/BbsNoticeGetListOutputDto.cs
+++ /dev/null
@@ -1,37 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using Yi.Framework.Bbs.Domain.Shared.Enums;
-
-namespace Yi.Framework.Bbs.Application.Contracts.Dtos.Notice
-{
- public class BbsNoticeGetListOutputDto
- {
- ///
- /// 消息,支持html
- ///
- public string Message { get; set; }
-
- ///
- /// 消息类型
- ///
- public NoticeTypeEnum NoticeType { get; }
-
- ///
- /// 是否已读
- ///
- public bool IsRead { get; private set; }
-
- ///
- /// 已读时间
- ///
- public DateTime? ReadTime { get; private set; }
-
- ///
- /// 消息创建时间
- ///
- public DateTime CreationTime { get; set; }
- }
-}
diff --git a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Plate/PlateCreateInputVo.cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Plate/PlateCreateInputVo.cs
deleted file mode 100644
index e2855ab4..00000000
--- a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Plate/PlateCreateInputVo.cs
+++ /dev/null
@@ -1,18 +0,0 @@
-namespace Yi.Framework.Bbs.Application.Contracts.Dtos.Plate
-{
- ///
- /// Plate输入创建对象
- ///
- public class PlateCreateInputVo
- {
- public string Name { get; set; }
- public string? Logo { get; set; }
- public string? Introduction { get; set; }
-
- public string Code { get; set; }
-
- public int OrderNum { get; set; }
-
- public bool IsDisableCreateDiscuss { get; set; }
- }
-}
diff --git a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Plate/PlateGetListInputVo.cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Plate/PlateGetListInputVo.cs
deleted file mode 100644
index b424154c..00000000
--- a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Plate/PlateGetListInputVo.cs
+++ /dev/null
@@ -1,11 +0,0 @@
-using Volo.Abp.Application.Dtos;
-using Yi.Framework.Ddd.Application.Contracts;
-
-namespace Yi.Framework.Bbs.Application.Contracts.Dtos.Plate
-{
- public class PlateGetListInputVo : PagedAllResultRequestDto
- {
- public string? Name { get; set; }
- public string? Code { get; set; }
- }
-}
diff --git a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Plate/PlateGetListOutputDto.cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Plate/PlateGetListOutputDto.cs
deleted file mode 100644
index a0ae195c..00000000
--- a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Plate/PlateGetListOutputDto.cs
+++ /dev/null
@@ -1,19 +0,0 @@
-using Volo.Abp.Application.Dtos;
-
-namespace Yi.Framework.Bbs.Application.Contracts.Dtos.Plate
-{
- public class PlateGetListOutputDto : EntityDto
- {
-
- public string Name { get; set; }
- public string? Logo { get; set; }
- public string? Introduction { get; set; }
-
- public string Code { get; set; }
-
- public DateTime CreationTime { get; set; }
-
- public int OrderNum { get; set; }
- public bool IsDisableCreateDiscuss { get; set; }
- }
-}
diff --git a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Plate/PlateGetOutputDto.cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Plate/PlateGetOutputDto.cs
deleted file mode 100644
index d5d71cb9..00000000
--- a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Plate/PlateGetOutputDto.cs
+++ /dev/null
@@ -1,17 +0,0 @@
-using Volo.Abp.Application.Dtos;
-
-namespace Yi.Framework.Bbs.Application.Contracts.Dtos.Plate
-{
- public class PlateGetOutputDto : EntityDto
- {
- public string Name { get; set; }
- public string? Logo { get; set; }
- public string? Introduction { get; set; }
- public string Code { get; set; }
-
- public DateTime CreationTime { get; set; }
-
- public int OrderNum { get; set; }
- public bool IsDisableCreateDiscuss { get; set; }
- }
-}
diff --git a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Plate/PlateUpdateInputVo.cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Plate/PlateUpdateInputVo.cs
deleted file mode 100644
index 52603146..00000000
--- a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Plate/PlateUpdateInputVo.cs
+++ /dev/null
@@ -1,16 +0,0 @@
-namespace Yi.Framework.Bbs.Application.Contracts.Dtos.Plate
-{
- public class PlateUpdateInputVo
- {
- public string? Name { get; set; }
- public string? Logo { get; set; }
- public string? Introduction { get; set; }
-
- public string? Code { get; set; }
-
- public int OrderNum { get; set; }
-
-
- public bool IsDisableCreateDiscuss { get; set; }
- }
-}
diff --git a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Shop/BbsShopAccountDto.cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Shop/BbsShopAccountDto.cs
deleted file mode 100644
index 56e7575e..00000000
--- a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Shop/BbsShopAccountDto.cs
+++ /dev/null
@@ -1,19 +0,0 @@
-namespace Yi.Framework.Bbs.Application.Contracts.Dtos.Shop;
-
-public class BbsShopAccountDto
-{
- ///
- /// 钱钱
- ///
- public decimal Money { get; set; }
-
- ///
- /// 积分
- ///
- public int Points { get; set; }
-
- ///
- /// 价值
- ///
- public decimal Value { get; set; }
-}
\ No newline at end of file
diff --git a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Shop/BuyShopInputDto.cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Shop/BuyShopInputDto.cs
deleted file mode 100644
index 321e23a4..00000000
--- a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Shop/BuyShopInputDto.cs
+++ /dev/null
@@ -1,7 +0,0 @@
-namespace Yi.Framework.Bbs.Application.Contracts.Dtos.Shop;
-
-public class BuyShopInputDto
-{
- public Guid GoodsId { get; set; }
- public string ContactInformation { get; set; }
-}
\ No newline at end of file
diff --git a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Shop/ShopGetListOutput.cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Shop/ShopGetListOutput.cs
deleted file mode 100644
index 9401c085..00000000
--- a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Shop/ShopGetListOutput.cs
+++ /dev/null
@@ -1,74 +0,0 @@
-using Volo.Abp.Application.Dtos;
-using Yi.Framework.Bbs.Domain.Shared.Enums;
-
-namespace Yi.Framework.Bbs.Application.Contracts.Dtos.Shop;
-
-public class ShopGetListOutput:EntityDto
-{
- ///
- /// 上架时间
- ///
- public DateTime CreationTime { get; set; }
-
- ///
- /// 商品类型
- ///
- public GoodsTypeEnum GoodsType{ get; set; }
-
- ///
- /// 下架时间
- ///
- public DateTime? EndTime { get; set; }
-
- ///
- /// 商品名称
- ///
- public string Name { get; set; }
-
- ///
- /// 每人限购数量
- ///
- public int LimitNumber { get; set; }
-
- ///
- /// 当前库存数量
- ///
- public int StockNumber { get; set; }
-
- ///
- /// 商品图片url
- ///
- public string ImageUrl { get; set; }
-
- ///
- /// 描述
- ///
- public string Describe { get; set; }
-
- ///
- /// 编号
- ///
- public string Code { get; set; }
-
- ///
- /// 所需钱钱
- ///
- public decimal NeedMoney { get; set; }
-
- ///
- /// 所需价值
- ///
- public decimal NeedValue { get; set; }
-
- ///
- /// 所需积分
- ///
- public decimal NeedPoints { get; set; }
-
- public int OrderNum { get; set; }
-
- ///
- /// 是否已限制
- ///
- public bool IsLimit { get; set; }
-}
\ No newline at end of file
diff --git a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/IServices/IAccessLogService.cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/IServices/IAccessLogService.cs
deleted file mode 100644
index 09af4933..00000000
--- a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/IServices/IAccessLogService.cs
+++ /dev/null
@@ -1,12 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace Yi.Framework.Bbs.Application.Contracts.IServices
-{
- public interface IAccessLogService
- {
- }
-}
diff --git a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/IServices/IArticleService.cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/IServices/IArticleService.cs
deleted file mode 100644
index 04a8bddd..00000000
--- a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/IServices/IArticleService.cs
+++ /dev/null
@@ -1,13 +0,0 @@
-using Yi.Framework.Bbs.Application.Contracts.Dtos.Article;
-using Yi.Framework.Ddd.Application.Contracts;
-
-namespace Yi.Framework.Bbs.Application.Contracts.IServices
-{
- ///
- /// Article服务抽象
- ///
- public interface IArticleService : IYiCrudAppService
- {
-
- }
-}
diff --git a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/IServices/IBannerService.cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/IServices/IBannerService.cs
deleted file mode 100644
index 63c3d2e5..00000000
--- a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/IServices/IBannerService.cs
+++ /dev/null
@@ -1,13 +0,0 @@
-using Yi.Framework.Bbs.Application.Contracts.Dtos.Banner;
-using Yi.Framework.Ddd.Application.Contracts;
-
-namespace Yi.Framework.Bbs.Application.Contracts.IServices
-{
- ///
- /// Banner抽象
- ///
- public interface IBannerService : IYiCrudAppService
- {
-
- }
-}
diff --git a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/IServices/IBbsUserInfoService.cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/IServices/IBbsUserInfoService.cs
deleted file mode 100644
index d6a5f0c4..00000000
--- a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/IServices/IBbsUserInfoService.cs
+++ /dev/null
@@ -1,12 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace Yi.Framework.Bbs.Application.Contracts.IServices
-{
- public interface IBbsUserInfoService
- {
- }
-}
diff --git a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/IServices/ICommentService.cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/IServices/ICommentService.cs
deleted file mode 100644
index c3e693c7..00000000
--- a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/IServices/ICommentService.cs
+++ /dev/null
@@ -1,13 +0,0 @@
-using Yi.Framework.Bbs.Application.Contracts.Dtos.Comment;
-using Yi.Framework.Ddd.Application.Contracts;
-
-namespace Yi.Framework.Bbs.Application.Contracts.IServices
-{
- ///
- /// Comment服务抽象
- ///
- public interface ICommentService : IYiCrudAppService
- {
-
- }
-}
diff --git a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/IServices/IDiscussLableService.cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/IServices/IDiscussLableService.cs
deleted file mode 100644
index 14c0e3f7..00000000
--- a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/IServices/IDiscussLableService.cs
+++ /dev/null
@@ -1,12 +0,0 @@
-using Yi.Framework.Bbs.Application.Contracts.Dtos.MyType;
-using Yi.Framework.Ddd.Application.Contracts;
-namespace Yi.Framework.Bbs.Application.Contracts.IServices
-{
- ///
- /// Label服务抽象
- ///
- public interface IDiscussLableService : IYiCrudAppService
- {
-
- }
-}
diff --git a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/IServices/IDiscussService.cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/IServices/IDiscussService.cs
deleted file mode 100644
index 6a2a34f8..00000000
--- a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/IServices/IDiscussService.cs
+++ /dev/null
@@ -1,12 +0,0 @@
-using Yi.Framework.Bbs.Application.Contracts.Dtos.Discuss;
-using Yi.Framework.Ddd.Application.Contracts;
-
-namespace Yi.Framework.Bbs.Application.Contracts.IServices
-{
- ///
- /// Discuss服务抽象
- ///
- public interface IDiscussService : IYiCrudAppService
- {
- }
-}
diff --git a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/IServices/ILevelService.cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/IServices/ILevelService.cs
deleted file mode 100644
index 66d5b9f7..00000000
--- a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/IServices/ILevelService.cs
+++ /dev/null
@@ -1,14 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using Yi.Framework.Bbs.Application.Contracts.Dtos.Level;
-using Yi.Framework.Ddd.Application.Contracts;
-
-namespace Yi.Framework.Bbs.Application.Contracts.IServices
-{
- public interface ILevelService : IYiCrudAppService
- {
- }
-}
diff --git a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/IServices/IPlateService.cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/IServices/IPlateService.cs
deleted file mode 100644
index e2a05217..00000000
--- a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/IServices/IPlateService.cs
+++ /dev/null
@@ -1,13 +0,0 @@
-using Yi.Framework.Bbs.Application.Contracts.Dtos.Plate;
-using Yi.Framework.Ddd.Application.Contracts;
-
-namespace Yi.Framework.Bbs.Application.Contracts.IServices
-{
- ///
- /// Plate服务抽象
- ///
- public interface IPlateService : IYiCrudAppService
- {
-
- }
-}
diff --git a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/IServices/ISettingService.cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/IServices/ISettingService.cs
deleted file mode 100644
index ba722425..00000000
--- a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/IServices/ISettingService.cs
+++ /dev/null
@@ -1,11 +0,0 @@
-using Volo.Abp.Application.Services;
-
-namespace Yi.Framework.Bbs.Application.Contracts.IServices
-{
- ///
- /// Setting应用抽象
- ///
- public interface ISettingService : IApplicationService
- {
- }
-}
diff --git a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Yi.Framework.Bbs.Application.Contracts.csproj b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Yi.Framework.Bbs.Application.Contracts.csproj
deleted file mode 100644
index a4775b67..00000000
--- a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Yi.Framework.Bbs.Application.Contracts.csproj
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
diff --git a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/YiFrameworkBbsApplicationContractsModule.cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/YiFrameworkBbsApplicationContractsModule.cs
deleted file mode 100644
index 99753575..00000000
--- a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/YiFrameworkBbsApplicationContractsModule.cs
+++ /dev/null
@@ -1,15 +0,0 @@
-using Volo.Abp.Modularity;
-using Yi.Framework.Bbs.Domain.Shared;
-using Yi.Framework.Rbac.Application.Contracts;
-
-namespace Yi.Framework.Bbs.Application.Contracts
-{
- [DependsOn(typeof(YiFrameworkBbsDomainSharedModule),
-
- typeof(YiFrameworkRbacApplicationContractsModule)
- )]
- public class YiFrameworkBbsApplicationContractsModule : AbpModule
- {
-
- }
-}
\ No newline at end of file
diff --git a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application/Extensions/AccessLogExtensions.cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application/Extensions/AccessLogExtensions.cs
deleted file mode 100644
index 54387205..00000000
--- a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application/Extensions/AccessLogExtensions.cs
+++ /dev/null
@@ -1,12 +0,0 @@
-using Microsoft.AspNetCore.Builder;
-
-namespace Yi.Framework.Bbs.Application.Extensions;
-
-public static class AccessLogExtensions
-{
- public static IApplicationBuilder UseAccessLog(this IApplicationBuilder app)
- {
- app.UseMiddleware();
- return app;
- }
-}
\ No newline at end of file
diff --git a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application/Extensions/AccessLogMiddleware.cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application/Extensions/AccessLogMiddleware.cs
deleted file mode 100644
index 24634a61..00000000
--- a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application/Extensions/AccessLogMiddleware.cs
+++ /dev/null
@@ -1,91 +0,0 @@
-using FreeRedis;
-using Microsoft.AspNetCore.Http;
-using Microsoft.Extensions.Configuration;
-using Microsoft.Extensions.Options;
-using Volo.Abp.Caching;
-using Volo.Abp.DependencyInjection;
-using Volo.Abp.EventBus;
-using Yi.Framework.Bbs.Domain.Shared.Caches;
-using Yi.Framework.Bbs.Domain.Shared.Etos;
-
-namespace Yi.Framework.Bbs.Application.Extensions;
-
-///
-/// 访问日志中间件
-/// 并发最高,采用缓存,默认10分钟才会真正操作一次数据库
-/// 需考虑一致性问题,又不能上锁影响性能
-///
-public class AccessLogMiddleware : IMiddleware, ITransientDependency
-{
- private static int _accessLogNumber = 0;
-
- internal static void ResetAccessLogNumber()
- {
- _accessLogNumber = 0;
- }
- internal static int GetAccessLogNumber()
- {
- return _accessLogNumber;
- }
-
-
- public async Task InvokeAsync(HttpContext context, RequestDelegate next)
- {
- await next(context);
-
- Interlocked.Increment(ref _accessLogNumber);
- }
-}
-
-public class AccessLogResetEventHandler : ILocalEventHandler,
- ITransientDependency
-{
- ///
- /// 缓存前缀
- ///
- private string CacheKeyPrefix => LazyServiceProvider.LazyGetRequiredService>()
- .Value.KeyPrefix;
-
- ///
- /// 使用懒加载防止报错
- ///
- private IRedisClient RedisClient => LazyServiceProvider.LazyGetRequiredService();
-
- ///
- /// 属性注入
- ///
- public IAbpLazyServiceProvider LazyServiceProvider { get; set; }
-
- private bool EnableRedisCache
- {
- get
- {
- var redisEnabled = LazyServiceProvider.LazyGetRequiredService()["Redis:IsEnabled"];
- return redisEnabled.IsNullOrEmpty() || bool.Parse(redisEnabled);
- }
- }
-
- //该事件由job定时10秒触发
- public async Task HandleEventAsync(AccessLogResetArgs eventData)
- {
- if (EnableRedisCache)
- {
- //分布式锁
- if (await RedisClient.SetNxAsync("AccessLogLock",true,TimeSpan.FromSeconds(5)))
- {
- //自增长数
- var incrNumber= AccessLogMiddleware.GetAccessLogNumber();
- //立即重置,开始计算,方式丢失
- AccessLogMiddleware.ResetAccessLogNumber();
- if (incrNumber>0)
- {
- await RedisClient.IncrByAsync(
- $"{CacheKeyPrefix}{AccessLogCacheConst.Key}:{DateTime.Now.Date:yyyyMMdd}", incrNumber);
- }
-
-
- }
-
- }
- }
-}
\ No newline at end of file
diff --git a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application/Services/Analyses/AccessLogService.cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application/Services/Analyses/AccessLogService.cs
deleted file mode 100644
index 1c90ae40..00000000
--- a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application/Services/Analyses/AccessLogService.cs
+++ /dev/null
@@ -1,140 +0,0 @@
-using Mapster;
-using Microsoft.AspNetCore.Mvc;
-using Volo.Abp.Application.Services;
-using Yi.Framework.Bbs.Application.Contracts.Dtos.AccessLog;
-using Yi.Framework.Bbs.Application.Contracts.IServices;
-using Yi.Framework.Bbs.Domain.Entities;
-using Yi.Framework.Bbs.Domain.Shared.Enums;
-using Yi.Framework.SqlSugarCore.Abstractions;
-
-namespace Yi.Framework.Bbs.Application.Services
-{
- public class AccessLogService : ApplicationService, IAccessLogService
- {
- private readonly ISqlSugarRepository _repository;
-
- public AccessLogService(ISqlSugarRepository repository)
- {
- _repository = repository;
- }
-
- public DateTime GetWeekFirst()
- {
- var week = DateTime.Now.DayOfWeek;
- switch (week)
- {
- case DayOfWeek.Sunday:
- return DateTime.Now.AddDays(-6).Date;
-
- case DayOfWeek.Monday:
- return DateTime.Now.AddDays(-0).Date;
-
- case DayOfWeek.Tuesday:
- return DateTime.Now.AddDays(-1).Date;
-
- case DayOfWeek.Wednesday:
- return DateTime.Now.AddDays(-2).Date;
-
- case DayOfWeek.Thursday:
- return DateTime.Now.AddDays(-3).Date;
-
- case DayOfWeek.Friday:
- return DateTime.Now.AddDays(-4).Date;
-
- case DayOfWeek.Saturday:
- return DateTime.Now.AddDays(-5).Date;
-
- default:
- throw new ArgumentException("日期错误");
- }
- }
-
-
- ///
- /// 获取全部访问流量(3个月)
- ///
- ///
- ///
- public async Task> GetListAsync([FromQuery] AccessLogTypeEnum accessLogType)
- {
- var entities = await _repository._DbQueryable.Where(x => x.AccessLogType == accessLogType)
- .Where(x => x.CreationTime >= DateTime.Now.AddMonths(-3))
- .OrderBy(x => x.CreationTime).ToListAsync();
- var output = entities.Adapt>();
- output?.ForEach(x => x.CreationTime = x.CreationTime.Date);
- return output;
- }
-
- ///
- /// 首页点击触发
- ///
- ///
- [HttpPost("access-log")]
- public async Task AccessAsync()
- {
- //可判断http重复,防止同一ip多次访问
- var last = await _repository._DbQueryable.Where(x=>x.AccessLogType==AccessLogTypeEnum.HomeClick).OrderByDescending(x => x.CreationTime).FirstAsync();
-
- if (last is null || last.CreationTime.Date != DateTime.Today)
- {
- await _repository.InsertAsync(new AccessLogAggregateRoot(){AccessLogType=AccessLogTypeEnum.HomeClick});
- }
- else
- {
- await _repository._Db.Updateable().SetColumns(it => it.Number == it.Number + 1)
- .Where(it => it.Id == last.Id).ExecuteCommandAsync();
- }
- }
-
- ///
- /// 获取当前周首页点击数据
- ///
- ///
- public async Task GetWeekAsync([FromQuery] AccessLogTypeEnum accessLogType)
- {
- var lastSeven = await _repository._DbQueryable
- .Where(x => x.AccessLogType == accessLogType)
- .OrderByDescending(x => x.CreationTime).ToPageListAsync(1, 7);
-
- return WeekTimeHandler(lastSeven.ToArray());
- }
-
- ///
- /// Todo: 可放入领域层
- ///
- ///
- ///
- private AccessLogDto[] WeekTimeHandler(AccessLogAggregateRoot[] data)
- {
- data = data.Where(x => x.CreationTime >= GetWeekFirst()).OrderByDescending(x => x.CreationTime)
- .DistinctBy(x => x.CreationTime.DayOfWeek).ToArray();
-
- Dictionary processedData = new Dictionary();
-
- // 初始化字典,将每天的数据都设为0
- foreach (DayOfWeek dayOfWeek in Enum.GetValues(typeof(DayOfWeek)))
- {
- processedData.Add(dayOfWeek, new AccessLogDto());
- }
-
-
- // 处理原始数据
- foreach (var item in data)
- {
- DayOfWeek dayOfWeek = item.CreationTime.DayOfWeek;
- // 如果当天有数据,则更新字典中的值为对应的Number
- var sss = data.Adapt();
- processedData[dayOfWeek] = item.Adapt();
- }
-
- var result = processedData.Values.ToList();
-
- //此时的时间是周日-周一-周二,需要处理
- var first = result[0]; // 获取第一个元素
- result.RemoveAt(0); // 移除第一个元素
- result.Add(first); // 将第一个元素添加到末尾
-
- return result.ToArray();
- }
- }
-}
\ No newline at end of file
diff --git a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application/Services/Analyses/BbsForumAnalyseService.cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application/Services/Analyses/BbsForumAnalyseService.cs
deleted file mode 100644
index 03d91c94..00000000
--- a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application/Services/Analyses/BbsForumAnalyseService.cs
+++ /dev/null
@@ -1,132 +0,0 @@
-using Microsoft.AspNetCore.Mvc;
-using SqlSugar;
-using Volo.Abp.Application.Dtos;
-using Volo.Abp.Application.Services;
-using Yi.Framework.Bbs.Application.Contracts.Dtos.BbsUser;
-using Yi.Framework.Bbs.Application.Contracts.Dtos.Discuss;
-using Yi.Framework.Bbs.Domain.Entities;
-using Yi.Framework.Bbs.Domain.Entities.Forum;
-using Yi.Framework.Bbs.Domain.Managers;
-using Yi.Framework.Bbs.Domain.Shared.Enums;
-using Yi.Framework.Rbac.Domain.Entities;
-using Yi.Framework.Rbac.Domain.Shared.Consts;
-using Yi.Framework.SqlSugarCore.Abstractions;
-
-namespace Yi.Framework.Bbs.Application.Services.Analyses
-{
- public class BbsForumAnalyseService : ApplicationService, IApplicationService
- {
- private ForumManager _forumManager;
- private ISqlSugarRepository _agreeRepository;
- public BbsForumAnalyseService(ForumManager forumManager, ISqlSugarRepository agreeRepository)
- {
- _forumManager = forumManager;
- _agreeRepository = agreeRepository;
- }
-
- ///
- /// 推荐主题,随机返回主题列表
- ///
- ///
- [HttpGet("analyse/bbs-discuss/random")]
- public async Task> GetRandomDiscussAsync([FromQuery] PagedResultRequestDto input)
- {
- var output = await _forumManager._discussRepository._DbQueryable
- .Where(discuss=>discuss.PermissionType== DiscussPermissionTypeEnum.Public)
- .LeftJoin((discuss, user) => discuss.CreatorId == user.Id)
- .LeftJoin((discuss, user, info) => user.Id == info.UserId)
-
- .OrderBy(discuss => SqlFunc.GetRandom())
- .Select((discuss, user, info) => new DiscussGetListOutputDto
- {
- Id = discuss.Id,
- // IsAgree = SqlFunc.Subqueryable().WhereIF(CurrentUser.Id != null, x => x.CreatorId == CurrentUser.Id && x.DiscussId == discuss.Id).Any(),
-
- User = new BbsUserGetListOutputDto()
- {
- Id = user.Id,
- UserName = user.UserName,
- Nick = user.Nick,
- Icon = user.Icon,
- Level = info.Level,
- UserLimit = info.UserLimit
- }
-
- }, true)
- .ToPageListAsync(input.SkipCount, input.MaxResultCount);
- var discussId = output.Select(x => x.Id);
- //点赞字典,key为主题id,y为用户ids
- var agreeDic =
- (await _agreeRepository._DbQueryable.Where(x => discussId.Contains(x.DiscussId)).ToListAsync())
- .GroupBy(x => x.DiscussId)
- .ToDictionary(x => x.Key, y => y.Select(y => y.CreatorId).ToList());
-
- //等级、是否点赞赋值
- output?.ForEach(x =>
- {
- if (CurrentUser.Id is not null)
- {
- //默认fasle
- if (agreeDic.TryGetValue(x.Id,out var userIds))
- {
- x.IsAgree = userIds.Contains(CurrentUser.Id);
- }
- }
- });
-
- return output;
- }
-
- ///
- /// 作者主题,返回当前作者最新的主题
- ///
- ///
- [HttpGet("analyse/bbs-discuss/author/{userId}")]
- public async Task> GetAuthorDiscussAsync(
- [FromRoute] Guid userId,
- [FromQuery] PagedResultRequestDto input)
- {
- var output = await _forumManager._discussRepository._DbQueryable.Where(discuss=>discuss.CreatorId==userId)
- .Where(discuss=>discuss.PermissionType== DiscussPermissionTypeEnum.Public)
- .LeftJoin((discuss, user) => discuss.CreatorId == user.Id)
- .LeftJoin((discuss, user, info) => user.Id == info.UserId)
- .OrderByDescending(discuss => discuss.CreationTime)
- .Select((discuss, user, info) => new DiscussGetListOutputDto
- {
- Id = discuss.Id,
- User = new BbsUserGetListOutputDto()
- {
- Id = user.Id,
- UserName = user.UserName,
- Nick = user.Nick,
- Icon = user.Icon,
- Level = info.Level,
- UserLimit = info.UserLimit
- }
-
- }, true)
- .ToPageListAsync(input.SkipCount, input.MaxResultCount);
- var discussId = output.Select(x => x.Id);
- //点赞字典,key为主题id,y为用户ids
- var agreeDic =
- (await _agreeRepository._DbQueryable.Where(x => discussId.Contains(x.DiscussId)).ToListAsync())
- .GroupBy(x => x.DiscussId)
- .ToDictionary(x => x.Key, y => y.Select(y => y.CreatorId).ToList());
-
- //等级、是否点赞赋值
- output?.ForEach(x =>
- {
- if (CurrentUser.Id is not null)
- {
- //默认fasle
- if (agreeDic.TryGetValue(x.Id,out var userIds))
- {
- x.IsAgree = userIds.Contains(CurrentUser.Id);
- }
- }
- });
-
- return output;
- }
- }
-}
diff --git a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application/Services/Analyses/BbsUserAnalyseService.cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application/Services/Analyses/BbsUserAnalyseService.cs
deleted file mode 100644
index 2daa4bb3..00000000
--- a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application/Services/Analyses/BbsUserAnalyseService.cs
+++ /dev/null
@@ -1,294 +0,0 @@
-using Mapster;
-using Microsoft.AspNetCore.Mvc;
-using SqlSugar;
-using Volo.Abp.Application.Dtos;
-using Volo.Abp.Application.Services;
-using Yi.Framework.Bbs.Application.Contracts.Dtos.Analyse;
-using Yi.Framework.Bbs.Application.Contracts.Dtos.BbsUser;
-using Yi.Framework.Bbs.Domain.Entities;
-using Yi.Framework.Bbs.Domain.Entities.Integral;
-using Yi.Framework.Bbs.Domain.Managers;
-using Yi.Framework.Bbs.Domain.Shared.Enums;
-using Yi.Framework.DigitalCollectibles.Application.Contracts.IServices;
-using Yi.Framework.Rbac.Application.Contracts.IServices;
-using Yi.Framework.Rbac.Domain.Authorization;
-using Yi.Framework.Rbac.Domain.Shared.Consts;
-using Yi.Framework.Rbac.Domain.Shared.Model;
-
-namespace Yi.Framework.Bbs.Application.Services.Analyses
-{
- public class BbsUserAnalyseService : ApplicationService, IApplicationService
- {
- private BbsUserManager _bbsUserManager;
- private IOnlineService _onlineService;
- private readonly IPointAnalyseService _pointAnalyseService;
- private readonly IValueAnalyseService _valueAnalyseService;
-
- public BbsUserAnalyseService(BbsUserManager bbsUserManager, IOnlineService onlineService,
- IPointAnalyseService pointAnalyseService, IValueAnalyseService valueAnalyseService)
- {
- _bbsUserManager = bbsUserManager;
- _onlineService = onlineService;
- _pointAnalyseService = pointAnalyseService;
- _valueAnalyseService = valueAnalyseService;
- }
-
-
- ///
- /// 人数注册统计(近3个月)
- ///
- ///
- ///
- [HttpGet("analyse/bbs-user/register")]
- public async Task> GetRegisterAsync()
-
- {
- using (DataFilter.DisablePermissionHandler())
- {
- var users = await _bbsUserManager._userRepository._DbQueryable
- .Where(u => u.CreationTime >= DateTime.Now.AddMonths(-3))
- .LeftJoin((u, info) => u.Id == info.UserId)
- .Select((u, info) => new BbsUserGetListOutputDto()
- {
- Id = u.Id,
- Icon = u.Icon,
- Level = info.Level,
- UserLimit = info.UserLimit,
- Money = info.Money,
- Experience = info.Experience,
- CreationTime = u.CreationTime
- })
- .ToListAsync();
-
- var minCreateUser = users.MinBy(x => x.CreationTime);
-
- var userCreateTimeDic = users.OrderBy(x => x.CreationTime)
- .GroupBy(x => x.CreationTime.Date)
- .ToDictionary(x => x.Key.Date, y => y.Count());
-
- DateTime startDate = minCreateUser.CreationTime.Date;
- DateTime endDate = DateTime.Today;
-
- List output = new List();
-
- // 计算从起始日期到今天的所有天数
- for (DateTime date = startDate; date <= endDate; date = date.AddDays(1))
- {
- var count = 0;
- userCreateTimeDic.TryGetValue(date, out count);
- RegisterAnalyseDto dayInfo = new RegisterAnalyseDto(date, count);
- output.Add(dayInfo);
- }
-
- return output;
- }
- }
-
-
- ///
- /// 财富排行榜
- ///
- ///
- [HttpGet("analyse/bbs-user/money-top/{userId?}")]
- public async Task> GetMoneyTopAsync([FromQuery] PagedResultRequestDto input,
- [FromRoute] Guid? userId)
- {
- using (DataFilter.DisablePermissionHandler())
- {
- var pageIndex = input.SkipCount;
-
-
- RefAsync total = 0;
- var output = await _bbsUserManager._userRepository._DbQueryable
- .LeftJoin((u, info) => u.Id == info.UserId)
- .OrderByDescending((u, info) => info.Money)
- .Select((u, info) =>
- new MoneyTopUserDto
- {
- UserName = u.UserName,
- Nick = u.Nick,
- Money = info.Money,
- Icon = u.Icon,
- Level = info.Level,
- UserLimit = info.UserLimit,
- Order = SqlFunc.RowNumber(SqlFunc.Desc(info.Money))
- }
- )
- .ToPageListAsync(pageIndex, input.MaxResultCount, total);
-
- var levelCache = await _bbsUserManager.GetLevelCacheMapAsync();
-
- output.ForEach(x => { x.LevelName = levelCache[x.Level].Name; });
- return new PagedResultDto
- {
- Items = output,
- TotalCount = total
- };
- }
- }
-
-
- ///
- /// 推荐好友,随机返回好友列表
- ///
- ///
- [HttpGet("analyse/bbs-user/random")]
- public async Task> GetRandomUserAsync([FromQuery] PagedResultRequestDto input)
- {
- using (DataFilter.DisablePermissionHandler())
- {
- var randUserIds = await _bbsUserManager._userRepository._DbQueryable
- //.Where(x => x.UserName != UserConst.Admin)
- .OrderBy(x => SqlFunc.GetRandom())
- .Select(x => x.Id).ToPageListAsync(input.SkipCount, input.MaxResultCount);
- var output = await _bbsUserManager.GetBbsUserInfoAsync(randUserIds);
- return output.Adapt>();
-
- //这里关闭了数据权限,所有用户都能查询的到
- }
- //这里有数据权限,会根据用户角色进行过滤
- }
-
- ///
- /// 用户分析
- ///
- ///
- [HttpGet("analyse/bbs-user")]
- public async Task GetUserAnalyseAsync()
- {
- using (DataFilter.DisablePermissionHandler())
- {
- var sss = DataFilter.IsEnabled();
- var registerUser = await _bbsUserManager._userRepository._DbQueryable.CountAsync();
-
-
- DateTime now = DateTime.Now;
- DateTime yesterday = now.AddDays(-1);
- DateTime startTime = new DateTime(yesterday.Year, yesterday.Month, yesterday.Day, 0, 0, 0);
- DateTime endTime = startTime.AddHours(24);
- var yesterdayNewUser = await _bbsUserManager._userRepository._DbQueryable
- .Where(x => x.CreationTime >= startTime && x.CreationTime <= endTime).CountAsync();
-
- var userOnline = (await _onlineService.GetListAsync(new OnlineUserModel { })).TotalCount;
-
- var output = new BbsUserAnalyseGetOutput()
- { OnlineNumber = userOnline, RegisterNumber = registerUser, YesterdayNewUser = yesterdayNewUser };
-
- return output;
- }
- }
-
-
- ///
- /// 积分排行榜
- ///
- ///
- [HttpGet("analyse/dc-user/points-top/{userId?}")]
- public async Task> GetPointsTopAsync([FromQuery] PagedResultRequestDto input,
- [FromRoute] Guid? userId)
- {
- var result = await _pointAnalyseService.GetValueTopAsync(input, null);
-
- var userIds = result.Items.Select(x => x.UserId).ToList();
-
- var baseOutput = await _bbsUserManager._userRepository._DbQueryable
- .Where(u => userIds.Contains(u.Id))
- .LeftJoin((u, info) => u.Id == info.UserId)
- .Select((u, info) =>
- new BaseAnalyseTopUserDto
- {
- UserName = u.UserName,
- Nick = u.Nick,
- Icon = u.Icon,
- Level = info.Level,
- UserLimit = info.UserLimit,
- UserId = info.UserId
- }
- ).ToListAsync();
-
-
- var output = new List();
- var levelCache = await _bbsUserManager.GetLevelCacheMapAsync();
- result.Items.ToList().ForEach(x =>
- {
- var currentUserInfo = baseOutput.Where(u => u.UserId == x.UserId).FirstOrDefault();
-
- if (currentUserInfo is not null)
- {
- output.Add(new PointsTopUserDto
- {
- UserName = currentUserInfo.UserName,
- Nick = currentUserInfo.Nick,
- Order = x.Order,
- Icon = currentUserInfo.Icon,
- Level = currentUserInfo.Level,
- LevelName = levelCache[currentUserInfo.Level].Name,
- UserLimit = UserLimitEnum.Normal,
- Points = x.Points
- });
- }
- });
- return new PagedResultDto
- {
- Items = output,
- TotalCount = result.TotalCount
- };
- }
-
- ///
- /// 价值排行榜
- ///
- ///
- [HttpGet("analyse/dc-user/value-top/{userId?}")]
- public async Task> GetValueTopAsync([FromQuery] PagedResultRequestDto input,
- [FromRoute] Guid? userId)
- {
- var result = await _valueAnalyseService.GetValueTopAsync(input, null);
-
- var userIds = result.Items.Select(x => x.UserId).ToList();
-
- var baseOutput = await _bbsUserManager._userRepository._DbQueryable
- .Where(u => userIds.Contains(u.Id))
- .LeftJoin((u, info) => u.Id == info.UserId)
- .Select((u, info) =>
- new BaseAnalyseTopUserDto
- {
- UserName = u.UserName,
- Nick = u.Nick,
- Icon = u.Icon,
- Level = info.Level,
- UserLimit = info.UserLimit,
- UserId = info.UserId
- }
- ).ToListAsync();
-
-
- var output = new List();
- var levelCache = await _bbsUserManager.GetLevelCacheMapAsync();
- result.Items.ToList().ForEach(x =>
- {
- var currentUserInfo = baseOutput.Where(u => u.UserId == x.UserId).FirstOrDefault();
-
- if (currentUserInfo is not null)
- {
- output.Add(new ValueTopUserDto
- {
- UserName = currentUserInfo.UserName,
- Nick = currentUserInfo.Nick,
- Order = x.Order,
- Icon = currentUserInfo.Icon,
- Level = currentUserInfo.Level,
- LevelName =levelCache[currentUserInfo.Level].Name,
- UserLimit = UserLimitEnum.Normal,
- Value = x.Value
- });
- }
- });
- return new PagedResultDto
- {
- Items = output,
- TotalCount = result.TotalCount
- };
- }
- }
-}
\ No newline at end of file
diff --git a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application/Services/AssignmentService.cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application/Services/AssignmentService.cs
deleted file mode 100644
index 456fdfea..00000000
--- a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application/Services/AssignmentService.cs
+++ /dev/null
@@ -1,82 +0,0 @@
-using Mapster;
-using Microsoft.AspNetCore.Authorization;
-using Microsoft.AspNetCore.Mvc;
-using Volo.Abp.Application.Services;
-using Volo.Abp.Users;
-using Yi.Framework.Bbs.Application.Contracts.Dtos.Assignment;
-using Yi.Framework.Bbs.Domain.Entities.Assignment;
-using Yi.Framework.Bbs.Domain.Managers;
-using Yi.Framework.Bbs.Domain.Shared.Enums;
-
-namespace Yi.Framework.Bbs.Application.Services;
-
-///
-/// 任务系统
-///
-[Authorize]
-public class AssignmentService : ApplicationService
-{
- private readonly AssignmentManager _assignmentManager;
-
- public AssignmentService(AssignmentManager assignmentManager)
- {
- _assignmentManager = assignmentManager;
- }
-
- ///
- /// 接收任务
- ///
- ///
- [HttpPost("assignment/accept/{id}")]
- public async Task AcceptAsync([FromRoute] Guid id)
- {
- await _assignmentManager.AcceptAsync(CurrentUser.GetId(), id);
- }
-
- ///
- /// 领取任务奖励
- ///
- ///
- [HttpPost("assignment/complete/{id}")]
- public async Task ReceiveRewardsAsync([FromRoute] Guid id)
- {
- await _assignmentManager.ReceiveRewardsAsync(id);
- }
-
- ///
- /// 查看可接受的任务
- ///
- ///
- [HttpGet("assignment/receive")]
- public async Task> GetCanReceiveListAsync()
- {
- var entities = await _assignmentManager.GetCanReceiveListAsync(CurrentUser.GetId());
- var output = entities.Adapt>();
- return output;
- }
-
- ///
- /// 查询接受的任务
- ///
- [HttpGet("assignment")]
- public async Task> GetListAsync([FromQuery] AssignmentGetListInput input)
- {
- var output = await _assignmentManager._assignmentRepository._DbQueryable
- .Where(x => x.UserId == CurrentUser.GetId())
- .WhereIF(input.AssignmentQueryState == AssignmentQueryStateEnum.Progress,
- x => x.AssignmentState == AssignmentStateEnum.Progress||
- x.AssignmentState == AssignmentStateEnum.Completed)
- .WhereIF(input.AssignmentQueryState == AssignmentQueryStateEnum.End,
- x => x.AssignmentState == AssignmentStateEnum.End ||
- x.AssignmentState == AssignmentStateEnum.Expired)
- .OrderBy(x=>x.CreationTime)
- .LeftJoin((x, define) => x.AssignmentDefineId==define.Id)
- .Select((x, define) => new AssignmentGetListOutputDto
- {
- Id = x.Id
- },true)
- .ToListAsync();
-
- return output;
- }
-}
\ No newline at end of file
diff --git a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application/Services/Bank/BankService.cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application/Services/Bank/BankService.cs
deleted file mode 100644
index 182b6a64..00000000
--- a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application/Services/Bank/BankService.cs
+++ /dev/null
@@ -1,109 +0,0 @@
-using Mapster;
-using Microsoft.AspNetCore.Authorization;
-using Microsoft.AspNetCore.Mvc;
-using Volo.Abp.Application.Services;
-using Yi.Framework.Bbs.Application.Contracts.Dtos.Bank;
-using Yi.Framework.Bbs.Domain.Entities.Bank;
-using Yi.Framework.Bbs.Domain.Managers;
-using Yi.Framework.SqlSugarCore.Abstractions;
-
-namespace Yi.Framework.Bbs.Application.Services.Bank
-{
- public class BankService : ApplicationService
- {
- private BankManager _bankManager;
- private BbsUserManager _bbsUserManager;
- private ISqlSugarRepository _repository;
- private ISqlSugarRepository _interestRepository;
- public BankService(BankManager bankManager, BbsUserManager userManager, ISqlSugarRepository repository, ISqlSugarRepository interestRepository)
- {
- _bankManager = bankManager;
- _bbsUserManager = userManager;
- _repository = repository;
- _interestRepository = interestRepository;
- }
-
- ///
- /// 获取最近24小时汇率记录
- ///
- ///
- [HttpGet("bank/interest")]
- public async Task> GetInterestRecordsAsync()
- {
- var entities = await _interestRepository._DbQueryable.OrderByDescending(x => x.CreationTime).ToPageListAsync(1, 24);
- var output = entities.Adapt>().OrderBy(x=>x.CreationTime).ToList();
- return output;
- }
-
- ///
- /// 获取登录用户全部银行卡信息
- ///
- ///
- [Authorize]
- [HttpGet("bank")]
- public async Task> GetBankCardListAsync()
- {
- var entities = await _repository._DbQueryable.Where(x => x.UserId == CurrentUser.Id).OrderBy(x=>x.CreationTime).ToListAsync();
- var output = entities.Adapt>();
- return output;
- }
-
- ///
- /// 给用户申请银行卡
- ///
- ///
- [Authorize]
- [HttpPost("bank/applying")]
- public async Task ApplyingBankCardAsync()
- {
- var userInfo = await _bbsUserManager.GetBbsUserInfoAsync(CurrentUser.Id!.Value);
- var banCardNum = await _repository.CountAsync(x => x.UserId == CurrentUser.Id!.Value);
-
- var diffNum = userInfo.Level - banCardNum;
- if (diffNum <= 0)
- {
- throw new UserFriendlyException($"申请失败,当前等级-【{userInfo.Level}】,最多可申领-【{userInfo.Level}】张银行卡,目前已拥有-【{banCardNum}】,请提升你的等级信誉,行长会考虑的");
- }
- else
- {
- await _bankManager.ApplyingBankCardAsync(CurrentUser.Id.Value, diffNum);
- }
- }
-
- ///
- /// 给银行卡提款
- ///
- ///
- ///
- [Authorize]
- [HttpPut("bank/draw/{cardId}")]
- public Task DrawMoneyAsync(Guid cardId)
- {
- return _bankManager.DrawMoneyAsync(cardId);
- }
- ///
- /// 给银行卡存款
- ///
- ///
- ///
- ///
- [Authorize]
- [HttpPut("bank/deposit/{cardId}/{moneyNum}")]
- public async Task DepositAsync(Guid cardId, decimal moneyNum)
- {
- if (moneyNum < 50)
- {
- throw new UserFriendlyException("存款金额不能小于50");
- }
- var userInfo = await _bbsUserManager.GetBbsUserInfoAsync(CurrentUser.Id!.Value);
- if (userInfo.Money < moneyNum)
- {
- throw new UserFriendlyException("存钱失败!你的钱钱不足,再存进去,就负数啦~");
- }
-
- await _bankManager.DepositAsync(cardId, moneyNum);
- }
-
-
- }
-}
diff --git a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application/Services/BbsNoticeService.cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application/Services/BbsNoticeService.cs
deleted file mode 100644
index 562593b2..00000000
--- a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application/Services/BbsNoticeService.cs
+++ /dev/null
@@ -1,72 +0,0 @@
-using Mapster;
-using Microsoft.AspNetCore.Authorization;
-using Microsoft.AspNetCore.Mvc;
-using SqlSugar;
-using Volo.Abp.Application.Dtos;
-using Volo.Abp.Application.Services;
-using Yi.Framework.Bbs.Application.Contracts.Dtos.Notice;
-using Yi.Framework.Bbs.Domain.Entities;
-using Yi.Framework.SqlSugarCore.Abstractions;
-
-namespace Yi.Framework.Bbs.Application.Services
-{
- public class BbsNoticeService : ApplicationService
- {
- private ISqlSugarRepository _repository;
- public BbsNoticeService(ISqlSugarRepository repository)
- {
- _repository = repository;
- }
-
-
- ///
- /// 查询用户的消息,需登录
- ///
- ///
- ///
- ///
- [Authorize]
- public async Task> GetListAsync(BbsNoticeGetListInputVo input)
- {
- RefAsync total = 0;
- var entities = await _repository._DbQueryable.Where(x => x.AcceptUserId == CurrentUser.Id)
- .OrderByDescending(x => x.CreationTime)
- .ToPageListAsync(input.SkipCount, input.MaxResultCount, total);
-
- var output = entities.Adapt>();
- return new PagedResultDto(total, output);
- }
-
- ///
- /// 已读消息,不传guid,代表一键已读,需登录
- ///
- ///
- [Authorize]
- [Route("bbs-notice/read/{noticeId?}")]
- public async Task PutReadAsync(Guid? noticeId)
- {
- //一键已读
- if (noticeId is null)
- {
- await _repository._Db.Updateable()
- .SetColumns(it => it.IsRead == true)
- .Where(x => x.AcceptUserId == CurrentUser.Id)
- .Where(x => x.IsRead == false)
- .ExecuteCommandAsync();
- }
- //已读一条
- else
- {
- await _repository._Db.Updateable()
- .SetColumns(it => it.IsRead == true)
- .Where(x => x.AcceptUserId == CurrentUser.Id)
- .Where(x => x.IsRead == false)
- .Where(x => x.Id == noticeId)
- .ExecuteCommandAsync();
-
- }
-
- }
-
- }
-}
diff --git a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application/Services/BbsUserInfoService.cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application/Services/BbsUserInfoService.cs
deleted file mode 100644
index 495428c8..00000000
--- a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application/Services/BbsUserInfoService.cs
+++ /dev/null
@@ -1,46 +0,0 @@
-using System.ComponentModel.DataAnnotations;
-using Microsoft.AspNetCore.Mvc;
-using Volo.Abp.Application.Services;
-using Yi.Framework.Bbs.Application.Contracts.IServices;
-using Yi.Framework.Bbs.Domain.Managers;
-
-namespace Yi.Framework.Bbs.Application.Services
-{
- public class BbsUserInfoService : ApplicationService, IBbsUserInfoService
- {
- private readonly BbsUserManager _bbsUserManager;
- public BbsUserInfoService(BbsUserManager bbsUserManager)
- {
- _bbsUserManager = bbsUserManager;
- }
-
- [HttpGet("bbs-user/{userNameOrUserId}")]
- public async Task GetUserInfoByUserNameOrUserIdAsync([FromRoute][Required] string userNameOrUserId)
- {
- Guid userId;
- if (Guid.TryParse(userNameOrUserId, out var userGuidId))
- {
- userId = userGuidId;
- }
- else
- {
- var userEntity = await _bbsUserManager._userRepository.GetFirstAsync(x => x.UserName == userNameOrUserId);
- if (userEntity == null)
- {
- throw new UserFriendlyException("该用户不存在");
- }
- userId= userEntity.Id;
- }
-
- var output =await _bbsUserManager.GetBbsUserInfoAsync(userId);
-
- //不是自己
- if (CurrentUser.Id != output.Id)
- {
- output.Phone = null;
- output.Email=null;
- }
- return output!;
- }
- }
-}
diff --git a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application/Services/Forum/AgreeService.cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application/Services/Forum/AgreeService.cs
deleted file mode 100644
index 1163efd5..00000000
--- a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application/Services/Forum/AgreeService.cs
+++ /dev/null
@@ -1,72 +0,0 @@
-using Microsoft.AspNetCore.Authorization;
-using Volo.Abp;
-using Volo.Abp.Application.Services;
-using Volo.Abp.Uow;
-using Volo.Abp.Users;
-using Yi.Framework.Bbs.Application.Contracts.Dtos.Argee;
-using Yi.Framework.Bbs.Domain.Entities.Forum;
-using Yi.Framework.Bbs.Domain.Managers;
-using Yi.Framework.SqlSugarCore.Abstractions;
-
-namespace Yi.Framework.Bbs.Application.Services.Forum
-{
- ///
- /// 点赞功能
- ///
- public class AgreeService : ApplicationService, IApplicationService
- {
- public AgreeService(ISqlSugarRepository repository, ISqlSugarRepository discssRepository, BbsUserManager bbsUserManager)
- {
- _repository = repository;
- _discssRepository = discssRepository;
- _bbsUserManager = bbsUserManager;
- }
- private readonly BbsUserManager _bbsUserManager;
- private ISqlSugarRepository _repository { get; set; }
-
- private ISqlSugarRepository _discssRepository { get; set; }
-
-
- ///
- /// 点赞,返回true为点赞+1,返回false为点赞-1
- /// Todo: 可放入领域层,但是没必要,这个项目太简单了
- ///
- ///
- [Authorize]
- public async Task PostOperateAsync(Guid discussId)
- {
- await _bbsUserManager.VerifyUserLimitAsync(CurrentUser.GetId());
- var entity = await _repository.GetFirstAsync(x => x.DiscussId == discussId && x.CreatorId == CurrentUser.Id);
- //判断是否已经点赞过
- if (entity is null)
- {
- //没点赞过,添加记录即可,,修改总点赞数量
- await _repository.InsertAsync(new AgreeEntity(discussId));
- var discussEntity = await _discssRepository.GetByIdAsync(discussId);
- if (discussEntity is null)
- {
- throw new UserFriendlyException("主题为空");
- }
- discussEntity.AgreeNum += 1;
- await _discssRepository.UpdateAsync(discussEntity);
-
- return new AgreeDto(true);
-
- }
- else
- {
- //点赞过,删除即可,修改总点赞数量
- await _repository.DeleteAsync(entity);
- var discussEntity = await _discssRepository.GetByIdAsync(discussId);
- if (discussEntity is null)
- {
- throw new UserFriendlyException("主题为空");
- }
- discussEntity.AgreeNum -= 1;
- await _discssRepository.UpdateAsync(discussEntity);
-
- return new AgreeDto(false);
- }
- }
- }
-}
diff --git a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application/Services/Forum/ArticleService.cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application/Services/Forum/ArticleService.cs
deleted file mode 100644
index 96a0b795..00000000
--- a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application/Services/Forum/ArticleService.cs
+++ /dev/null
@@ -1,196 +0,0 @@
-using System.ComponentModel.DataAnnotations;
-using System.Text;
-using Mapster;
-using Microsoft.AspNetCore.Authorization;
-using Microsoft.AspNetCore.Http;
-using Microsoft.AspNetCore.Mvc;
-using SqlSugar;
-using Volo.Abp.Application.Dtos;
-using Yi.Framework.Bbs.Application.Contracts.Dtos.Article;
-using Yi.Framework.Bbs.Application.Contracts.IServices;
-using Yi.Framework.Bbs.Domain.Entities.Forum;
-using Yi.Framework.Bbs.Domain.Managers;
-using Yi.Framework.Bbs.Domain.Repositories;
-using Yi.Framework.Bbs.Domain.Shared.Consts;
-using Yi.Framework.Bbs.Domain.Shared.Model;
-using Yi.Framework.Ddd.Application;
-using Yi.Framework.Rbac.Domain.Authorization;
-using Yi.Framework.SqlSugarCore.Abstractions;
-
-namespace Yi.Framework.Bbs.Application.Services.Forum
-{
- ///
- /// Article服务实现
- ///
- public class ArticleService : YiCrudAppService,
- IArticleService
- {
- public ArticleService(IArticleRepository articleRepository,
- ISqlSugarRepository discussRepository,
- ForumManager forumManager) : base(articleRepository)
- {
- _articleRepository = articleRepository;
- _discussRepository = discussRepository;
- _forumManager = forumManager;
- }
-
- private readonly ForumManager _forumManager;
- private readonly IArticleRepository _articleRepository;
- private readonly ISqlSugarRepository _discussRepository;
-
- public override async Task> GetListAsync(ArticleGetListInputVo input)
- {
- RefAsync total = 0;
-
- var entities = await _articleRepository._DbQueryable
- .WhereIF(!string.IsNullOrEmpty(input.Name), x => x.Name.Contains(input.Name!))
- .WhereIF(input.StartTime is not null && input.EndTime is not null,
- x => x.CreationTime >= input.StartTime && x.CreationTime <= input.EndTime)
- .ToPageListAsync(input.SkipCount, input.MaxResultCount, total);
- return new PagedResultDto(total, await MapToGetListOutputDtosAsync(entities));
- }
-
- ///
- /// 查询文章
- ///
- ///
- ///
- public override async Task GetAsync(Guid id)
- {
- var entity = await _articleRepository.GetAsync(id);
- var output = entity.Adapt();
- if (!await _forumManager.VerifyDiscussPermissionAsync(entity.DiscussId, CurrentUser.Id, CurrentUser.Roles))
- {
- output.SetNoPermission();
- }
- else
- {
- output.SetPassPermission();
- }
-
- return output;
- }
-
- ///
- /// 获取文章全部树级信息
- ///
- ///
- ///
- ///
- [Route("article/all/discuss-id/{discussId}")]
- public async Task> GetAllAsync([FromRoute] Guid discussId)
- {
- var entities = await _articleRepository.GetTreeAsync(x => x.DiscussId == discussId);
- var items = entities.Adapt>();
- return items;
- }
-
- ///
- /// 查询文章概述
- ///
- ///
- ///
- ///
- public async Task> GetDiscussIdAsync([FromRoute] Guid discussId)
- {
- if (!await _discussRepository.IsAnyAsync(x => x.Id == discussId))
- {
- throw new UserFriendlyException(DiscussConst.No_Exist);
- }
-
- var entities = await _articleRepository.GetTreeAsync(x => x.DiscussId == discussId);
- var items = await MapToGetListOutputDtosAsync(entities);
- return items;
- }
-
- ///
- /// 发表文章
- ///
- ///
- ///
- ///
- [Permission("bbs:article:add")]
- [Authorize]
- public override async Task CreateAsync(ArticleCreateInputVo input)
- {
- await VerifyPermissionAsync(input.DiscussId);
- return await base.CreateAsync(input);
- }
-
- ///
- /// 更新文章
- ///
- ///
- ///
- ///
- public override async Task UpdateAsync(Guid id, ArticleUpdateInputVo input)
- {
- var entity = await _articleRepository.GetByIdAsync(id);
- await VerifyPermissionAsync(entity.DiscussId);
- return await base.UpdateAsync(id, input);
- }
-
-
- ///
- /// 删除文章
- ///
- ///
- ///
- public override async Task DeleteAsync(Guid id)
- {
- var entity = await _articleRepository.GetByIdAsync(id);
- await VerifyPermissionAsync(entity.DiscussId);
- await base.DeleteAsync(id);
- }
-
-
- ///
- /// 导入文章
- ///
- ///
- public async Task PostImportAsync([FromQuery] ArticleImprotDto input,
- [FromForm] [Required] IFormFileCollection file)
- {
- await VerifyPermissionAsync(input.DiscussId);
- var fileObjs = new List();
- if (file.Count > 0)
- {
- foreach (var item in file)
- {
- if (item.Length > 0)
- {
- using (var stream = item.OpenReadStream())
- {
- using (var fileStream = new MemoryStream())
- {
- await item.CopyToAsync(fileStream);
- var bytes = fileStream.ToArray();
-
- // 将字节转换成字符串
- var content = Encoding.UTF8.GetString(bytes);
- fileObjs.Add(new FileObject() { FileName = item.FileName, Content = content });
- }
- }
- }
- }
- }
- else
- {
- throw new UserFriendlyException("未选择文件");
- }
-
- //使用简单工厂根据传入的类型进行判断
- await _forumManager.PostImportAsync(input.DiscussId, input.ArticleParentId, fileObjs, input.ImportType);
- }
-
-
- private async Task VerifyPermissionAsync(Guid discussId)
- {
- if (!await _forumManager.VerifyDiscussPermissionAsync(discussId, CurrentUser.Id, isVerifyLook: false))
- {
- throw new UserFriendlyException("您无权限进行操作", "403");
- }
- }
- }
-}
\ No newline at end of file
diff --git a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application/Services/Forum/BannerService.cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application/Services/Forum/BannerService.cs
deleted file mode 100644
index 805149c8..00000000
--- a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application/Services/Forum/BannerService.cs
+++ /dev/null
@@ -1,32 +0,0 @@
-using SqlSugar;
-using Volo.Abp.Application.Dtos;
-using Volo.Abp.Domain.Repositories;
-using Yi.Framework.Bbs.Application.Contracts.Dtos.Banner;
-using Yi.Framework.Bbs.Application.Contracts.IServices;
-using Yi.Framework.Bbs.Domain.Entities.Forum;
-using Yi.Framework.Ddd.Application;
-using Yi.Framework.SqlSugarCore.Abstractions;
-
-namespace Yi.Framework.Bbs.Application.Services.Forum
-{
- ///
- /// Banner服务实现
- ///
- public class BannerService : YiCrudAppService,
- IBannerService
- {
- private ISqlSugarRepository _repository;
- public BannerService(ISqlSugarRepository repository) : base(repository)
- {
- _repository = repository;
- }
-
- public override async Task> GetListAsync(BannerGetListInputVo input)
- {
- RefAsync total = 0;
- var entities = await _repository._DbQueryable.WhereIF(!string.IsNullOrEmpty(input.Name), x => x.Name.Contains(input.Name!))
- .ToPageListAsync(input.SkipCount, input.MaxResultCount, total);
- return new PagedResultDto(total, await MapToGetListOutputDtosAsync(entities));
- }
- }
-}
diff --git a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application/Services/Forum/CommentService.cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application/Services/Forum/CommentService.cs
deleted file mode 100644
index be2b8603..00000000
--- a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application/Services/Forum/CommentService.cs
+++ /dev/null
@@ -1,147 +0,0 @@
-using Mapster;
-using Microsoft.AspNetCore.Authorization;
-using Microsoft.AspNetCore.Mvc;
-using SqlSugar;
-using Volo.Abp;
-using Volo.Abp.Application.Dtos;
-using Volo.Abp.Users;
-using Yi.Framework.Bbs.Application.Contracts.Dtos.BbsUser;
-using Yi.Framework.Bbs.Application.Contracts.Dtos.Comment;
-using Yi.Framework.Bbs.Application.Contracts.IServices;
-using Yi.Framework.Bbs.Domain.Entities.Forum;
-using Yi.Framework.Bbs.Domain.Managers;
-using Yi.Framework.Bbs.Domain.Shared.Consts;
-using Yi.Framework.Ddd.Application;
-using Yi.Framework.Rbac.Domain.Authorization;
-using Yi.Framework.Rbac.Domain.Extensions;
-using Yi.Framework.Rbac.Domain.Shared.Consts;
-using Yi.Framework.SqlSugarCore.Abstractions;
-
-namespace Yi.Framework.Bbs.Application.Services.Forum
-{
- ///
- /// 评论
- ///
- public class CommentService : YiCrudAppService,
- ICommentService
- {
- private readonly ISqlSugarRepository _repository;
- private readonly BbsUserManager _bbsUserManager;
- public CommentService(ForumManager forumManager, ISqlSugarRepository discussRepository, IDiscussService discussService, ISqlSugarRepository CommentRepository, BbsUserManager bbsUserManager) : base(CommentRepository)
- {
- _forumManager = forumManager;
- _discussRepository = discussRepository;
- _discussService = discussService;
- _repository = CommentRepository;
- _bbsUserManager = bbsUserManager;
- }
- private ForumManager _forumManager { get; set; }
- private ISqlSugarRepository _discussRepository { get; set; }
-
- private IDiscussService _discussService { get; set; }
-
- ///
- /// 获取改主题下的评论,结构为二维列表,该查询无分页
- ///
- ///
- ///
- ///
- public async Task> GetDiscussIdAsync([FromRoute] Guid discussId, [FromQuery] CommentGetListInputVo input)
- {
- await _forumManager.VerifyDiscussPermissionAsync(discussId,CurrentUser.Id);
-
- var entities = await _repository._DbQueryable.WhereIF(!string.IsNullOrEmpty(input.Content), x => x.Content.Contains(input.Content))
- .Where(x => x.DiscussId == discussId)
- .Includes(x => x.CreateUser)
- .ToListAsync();
-
- //该实体需要进行转换
-
- //同时为所有用户id进行bbs的扩展即可
- List userIds = entities.Where(x => x.CreatorId != null).Select(x => x.CreatorId ?? Guid.Empty).ToList();
- var bbsUserInfoDic = (await _bbsUserManager.GetBbsUserInfoAsync(userIds)).ToDictionary(x => x.Id);
-
- //------数据查询完成------,以下只是dto的简单组装
-
- //从根目录开始组装
- //结果初始值,第一层等于全部根节点
- var allOutPut = entities.OrderByDescending(x => x.CreationTime).ToList();
-
- //获取全量主题评论, 先获取顶级的,将其他子组合到顶级下,形成一个二维,先转成dto
- List allOutoutDto = await MapToGetListOutputDtosAsync(allOutPut);
-
- //开始映射额外用户信息字段
- allOutoutDto?.ForEach(x => x.CreateUser = bbsUserInfoDic[x.CreatorId ?? Guid.Empty].Adapt());
-
- //开始组装dto的层级关系
- //将全部数据进行hash
- var dic = allOutoutDto.ToDictionary(x => x.Id);
-
- foreach (var comment in allOutoutDto)
- {
- //不是根节点,需要赋值 被评论者用户信息等
- if (comment.ParentId != Guid.Empty)
- {
- if (dic.ContainsKey(comment.ParentId))
- {
- var parentComment = dic[comment.ParentId];
- comment.CommentedUser = parentComment.CreateUser;
- }
- else
- {
- continue;
- }
- }
- //root或者parent id,根节点都是等于0的
- var id = comment.RootId;
- if (id != Guid.Empty)
- {
- dic[id].Children.Add(comment);
- }
-
- }
-
- //子类需要排序
- var rootOutoutDto = allOutoutDto.Where(x => x.ParentId == Guid.Empty).ToList();
- rootOutoutDto?.ForEach(x =>
- {
- x.Children = x.Children.OrderByDescending(x => x.CreationTime).ToList();
- });
- return new PagedResultDto(entities.Count(), rootOutoutDto);
- }
-
-
- ///
- /// 发表评论
- ///
- ///
- ///
- ///
- [Permission("bbs:comment:add")]
- [Authorize]
- public override async Task CreateAsync(CommentCreateInputVo input)
- {
- if (string.IsNullOrWhiteSpace(input.Content)|| input.Content=="
")
- {
- throw new UserFriendlyException("评论不能为空");
- }
- await _bbsUserManager.VerifyUserLimitAsync(CurrentUser.GetId());
- var discuess = await _discussRepository.GetFirstAsync(x => x.Id == input.DiscussId);
- if (discuess is null)
- {
- throw new UserFriendlyException(DiscussConst.No_Exist);
- }
- //不是超级管理员,且主题开启禁止评论
-
- if (discuess.IsDisableCreateComment == true && !CurrentUser.GetPermissions().Contains(UserConst.AdminPermissionCode))
- {
- throw new UserFriendlyException("该主题已禁止评论功能");
- }
-
-
- var entity = await _forumManager.CreateCommentAsync(input.DiscussId, input.ParentId, input.RootId, input.Content);
- return await MapToGetOutputDtoAsync(entity);
- }
-
- }
-}
diff --git a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application/Services/Forum/DiscussLableService.cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application/Services/Forum/DiscussLableService.cs
deleted file mode 100644
index 7994bada..00000000
--- a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application/Services/Forum/DiscussLableService.cs
+++ /dev/null
@@ -1,53 +0,0 @@
-using Microsoft.AspNetCore.Mvc;
-using SqlSugar;
-using Volo.Abp.Application.Dtos;
-using Volo.Abp.Data;
-using Yi.Framework.Bbs.Application.Contracts.Dtos.MyType;
-using Yi.Framework.Bbs.Application.Contracts.IServices;
-using Yi.Framework.Bbs.Domain.Entities.Forum;
-using Yi.Framework.Ddd.Application;
-using Yi.Framework.SqlSugarCore.Abstractions;
-
-namespace Yi.Framework.Bbs.Application.Services.Forum
-{
- ///
- /// DiscussLable服务实现
- ///
- public class DiscussLableService : YiCrudAppService,
- IDiscussLableService
- {
- private ISqlSugarRepository _repository;
-
- public DiscussLableService(ISqlSugarRepository repository) : base(repository)
- {
- _repository = repository;
- }
-
- [HttpGet("discuss-lable/all")]
- public async Task> GetAllListAsync(DiscussLableGetListInputVo input)
- {
- var order = input.Sorting ?? nameof(DiscussLableAggregateRoot.Name);
- var output = await _repository._DbQueryable
- .WhereIF(input.Name is not null, x => x.Name.Contains(input.Name))
- .OrderBy(order)
- .Select(x => new DiscussLableGetListOutputDto(), true)
- .ToListAsync();
- return new ListResultDto(output);
- }
-
- public override async Task> GetListAsync(
- DiscussLableGetListInputVo input)
- {
- RefAsync total = 0;
- var order = input.Sorting ?? nameof(DiscussLableAggregateRoot.Name);
- var output = await _repository._DbQueryable
- .WhereIF(input.Name is not null, x => x.Name.Contains(input.Name))
- .OrderBy(order)
- .Select(x => new DiscussLableGetListOutputDto(), true)
- .ToPageListAsync(input.SkipCount, input.MaxResultCount, total);
- return new PagedResultDto(total, output);
- }
- }
-}
\ No newline at end of file
diff --git a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application/Services/Forum/DiscussService.cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application/Services/Forum/DiscussService.cs
deleted file mode 100644
index 82c53b1c..00000000
--- a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application/Services/Forum/DiscussService.cs
+++ /dev/null
@@ -1,343 +0,0 @@
-using System.Linq;
-using Mapster;
-using Microsoft.AspNetCore.Authorization;
-using Microsoft.AspNetCore.Mvc;
-using SqlSugar;
-using Volo.Abp;
-using Volo.Abp.Application.Dtos;
-using Volo.Abp.EventBus.Local;
-using Volo.Abp.Users;
-using Yi.Framework.Bbs.Application.Contracts.Dtos.BbsUser;
-using Yi.Framework.Bbs.Application.Contracts.Dtos.Discuss;
-using Yi.Framework.Bbs.Application.Contracts.Dtos.DiscussLable;
-using Yi.Framework.Bbs.Application.Contracts.IServices;
-using Yi.Framework.Bbs.Domain.Entities;
-using Yi.Framework.Bbs.Domain.Entities.Forum;
-using Yi.Framework.Bbs.Domain.Managers;
-using Yi.Framework.Bbs.Domain.Repositories;
-using Yi.Framework.Bbs.Domain.Shared.Consts;
-using Yi.Framework.Bbs.Domain.Shared.Enums;
-using Yi.Framework.Bbs.Domain.Shared.Etos;
-using Yi.Framework.Ddd.Application;
-using Yi.Framework.Rbac.Application.Contracts.Dtos.User;
-using Yi.Framework.Rbac.Domain.Authorization;
-using Yi.Framework.Rbac.Domain.Entities;
-using Yi.Framework.Rbac.Domain.Extensions;
-using Yi.Framework.Rbac.Domain.Shared.Consts;
-using Yi.Framework.SqlSugarCore.Abstractions;
-
-namespace Yi.Framework.Bbs.Application.Services.Forum
-{
- ///
- /// Discuss应用服务实现,用于参数校验、领域服务业务组合、日志记录、事务处理、账户信息
- ///
- public class DiscussService : YiCrudAppService,
- IDiscussService
- {
- private ISqlSugarRepository _discussTopRepository;
- private ISqlSugarRepository _agreeRepository;
- private BbsUserManager _bbsUserManager;
- private IDiscussLableRepository _discussLableRepository;
-
- public DiscussService(BbsUserManager bbsUserManager, ForumManager forumManager,
- ISqlSugarRepository discussTopRepository,
- ISqlSugarRepository plateEntityRepository, ILocalEventBus localEventBus,
- ISqlSugarRepository agreeRepository, IDiscussLableRepository discussLableRepository) : base(
- forumManager._discussRepository)
- {
- _forumManager = forumManager;
- _plateEntityRepository = plateEntityRepository;
- _localEventBus = localEventBus;
- _agreeRepository = agreeRepository;
- _discussLableRepository = discussLableRepository;
- _discussTopRepository = discussTopRepository;
- _bbsUserManager = bbsUserManager;
- }
-
- private readonly ILocalEventBus _localEventBus;
- private ForumManager _forumManager { get; set; }
-
-
- private ISqlSugarRepository _plateEntityRepository { get; set; }
-
- ///
- /// 单查
- ///
- ///
- ///
- public override async Task GetAsync(Guid id)
- {
- //查询主题发布 浏览主题 事件,浏览数+1
- var output = await _forumManager._discussRepository._DbQueryable
- .LeftJoin((discuss, user) => discuss.CreatorId == user.Id)
- .LeftJoin((discuss, user, info) => user.Id == info.UserId)
- .LeftJoin((discuss, user, info, plate) => plate.Id == discuss.PlateId)
- .Select((discuss, user, info, plate) => new DiscussGetOutputDto
- {
- Id = discuss.Id,
- IsAgree = false,
- User = new BbsUserGetListOutputDto()
- {
- UserName = user.UserName,
- Nick = user.Nick,
- Icon = user.Icon,
- Id = user.Id,
- Level = info.Level,
- UserLimit = info.UserLimit,
- Money = info.Money,
- Experience = info.Experience
- },
- Plate = new Contracts.Dtos.Plate.PlateGetOutputDto()
- {
- Name = plate.Name,
- Id = plate.Id,
- Code = plate.Code,
- Introduction = plate.Introduction,
- Logo = plate.Logo
- }
- }, true)
- .FirstAsync(discuss => discuss.Id == id);
-
- if (output is null)
- {
- throw new UserFriendlyException("该主题不存在", "404");
- }
-
- switch (output.DiscussType)
- {
- case DiscussTypeEnum.Article: break;
- //查询的是悬赏主题
- case DiscussTypeEnum.Reward:
- var reward = await _forumManager._discussRewardRepository.GetAsync(x => x.DiscussId == output.Id);
- output.RewardData = reward.Adapt();
- break;
- }
-
-
- //组装点赞
- var agreeCreatorList =
- (await _agreeRepository._DbQueryable.Where(x => x.DiscussId == output.Id).Select(x => x.CreatorId)
- .ToListAsync());
- //已登录
- if (CurrentUser.Id is not null)
- {
- output.IsAgree = agreeCreatorList.Contains(CurrentUser.Id);
- }
-
- //组装标签
- var lableDic = await _discussLableRepository.GetDiscussLableCacheMapAsync();
- foreach (var lableId in output.DiscussLableIds)
- {
- if (lableDic.TryGetValue(lableId, out var item))
- {
- output.Lables.Add(item.Adapt());
- }
- }
-
- //如果没有权限
- if (!await _forumManager.VerifyDiscussPermissionAsync(output.Id, CurrentUser.Id, CurrentUser.Roles))
- {
- output.SetNoPermission();
- }
- else
- {
- output.SetPassPermission();
- }
-
- await _localEventBus.PublishAsync(new SeeDiscussEventArgs
- { DiscussId = output.Id, OldSeeNum = output.SeeNum });
- return output;
- }
-
- ///