diff --git a/CLAUDE.md b/CLAUDE.md index faeacbf..7ed71c0 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -1,5 +1,7 @@ # CLAUDE.md - +人与助手之间的语言交互默认为简体中文。 +python 要使用 uv run 运行。 +不要随意创建说明文档(比如 .md),除非用户有要求。 This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository. 需要遵守:@AGENTS.md diff --git a/docs/AML_Backend/docker-compose本地开发/Dockerfile.local b/docs/AML_Backend/docker-compose-local-dev/Dockerfile.local similarity index 57% rename from docs/AML_Backend/docker-compose本地开发/Dockerfile.local rename to docs/AML_Backend/docker-compose-local-dev/Dockerfile.local index 407fd47..d74c438 100644 --- a/docs/AML_Backend/docker-compose本地开发/Dockerfile.local +++ b/docs/AML_Backend/docker-compose-local-dev/Dockerfile.local @@ -6,8 +6,17 @@ # - Targets .NET 6 (the projects are net6.0; the CI Dockerfile still says 5.0). # - Does not COPY the non-existent src/access-token.bin. # - Produces two runtime targets: `host` (the API) and `migrator` (data init). +# - Bakes docker-compose-local-dev/appsettings.local.json over appsettings.json. +# The repo's appsettings.json now only carries a NacosConfig section and pulls +# the real settings from a Nacos server (192.168.1.120:8848) that is not +# reachable in local dev. Program.cs only loads Nacos when a NacosConfig +# section exists, so replacing appsettings.json with a Nacos-free, fully +# self-contained config makes the app start without Nacos. # -# Build context = repository root (AML_Backend). See Dockerfile.local.dockerignore. +# Build context = repository root (AML_Backend); this Dockerfile lives one level +# down in docker-compose-local-dev/. BuildKit uses the sibling +# docker-compose-local-dev/Dockerfile.local.dockerignore (not the repo-root +# .dockerignore), which keeps appsettings.json and docker-compose-local-dev/. ############################ # Restore + build (whole solution available) @@ -45,12 +54,28 @@ RUN --mount=type=cache,target=/root/.nuget/packages \ dotnet publish "src/iCON.Abp.FX.DbMigrator/iCON.Abp.FX.DbMigrator.csproj" \ -c "$BUILD_CONFIGURATION" -o /app/migrator /p:UseAppHost=false -m:1 +############################ +# Runtime base: refresh CA certificates so outbound HTTPS to services whose +# chain the stock image can't complete (e.g. the stag iCS at *.iconsz.com, +# ZeroSSL/Sectigo-issued -> "PartialChain") validates. The app's own cert +# bypass only covers legacy WebClient (ServicePointManager), not HttpClient, +# so we fix trust at the OS level to cover every code path. +############################ +FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS runtime-base +RUN apt-get update \ + && apt-get install -y --no-install-recommends ca-certificates \ + && update-ca-certificates \ + && rm -rf /var/lib/apt/lists/* + ############################ # Runtime: API host ############################ -FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS host +FROM runtime-base AS host WORKDIR /app COPY --from=publish-host /app/host ./ +# Local dev: replace the Nacos-only appsettings.json with a full self-contained +# config (no NacosConfig section -> the app does not try to reach Nacos). +COPY docker-compose-local-dev/appsettings.local.json ./appsettings.json EXPOSE 44331 ENTRYPOINT ["dotnet", "iCON.Abp.FX.HttpApi.Host.dll"] @@ -59,10 +84,12 @@ ENTRYPOINT ["dotnet", "iCON.Abp.FX.HttpApi.Host.dll"] # Seed contributors read data files and the full AppConfig relative to the # app base directory, so we reuse the host's appsettings.json / Data / wwwroot. ############################ -FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS migrator +FROM runtime-base AS migrator WORKDIR /app COPY --from=publish-migrator /app/migrator ./ -COPY --from=publish-host /app/host/appsettings.json ./appsettings.json +# Same Nacos-free local config as the host (the migrator's own appsettings.json +# is Nacos-only too); reuse the host's seed Data / wwwroot content. +COPY docker-compose-local-dev/appsettings.local.json ./appsettings.json COPY --from=publish-host /app/host/Data ./Data COPY --from=publish-host /app/host/wwwroot ./wwwroot ENTRYPOINT ["dotnet", "iCON.Abp.FX.DbMigrator.dll"] diff --git a/docs/AML_Backend/docker-compose本地开发/Dockerfile.local.dockerignore b/docs/AML_Backend/docker-compose-local-dev/Dockerfile.local.dockerignore similarity index 100% rename from docs/AML_Backend/docker-compose本地开发/Dockerfile.local.dockerignore rename to docs/AML_Backend/docker-compose-local-dev/Dockerfile.local.dockerignore diff --git a/docs/AML_Backend/docker-compose-local-dev/appsettings.local.json b/docs/AML_Backend/docker-compose-local-dev/appsettings.local.json new file mode 100644 index 0000000..ddee77b --- /dev/null +++ b/docs/AML_Backend/docker-compose-local-dev/appsettings.local.json @@ -0,0 +1,1963 @@ +{ + "App": { + "SelfUrl": "https://localhost:44331", + "ClientUrl": "https://localhost:4200", + "CorsOrigins": "https://*.FX.com,https://localhost:4200,http://localhost:4200,https://app.hubspot.com", + "RedirectAllowedUrls": "https://localhost:4200,https://localhost:44307,http://localhost:4200,https://app.hubspot.com" + }, + "Redis": { + "Enable": "0", + "Configuration": "127.0.0.1:6379,password=123456" + }, + "ConnectionStrings": { + "Default": "Server=localhost;Database=AbpAML;Uid=dev;Pwd=123456;", + "Mysql_IconStaging": "server=192.168.100.190;user id=dev;password=123456;database=iCONAbpFXv2_1;allow zero datetime=true;", + "Mssql_FengLocal": "Server=FENGWIN11ICONDE\\SQLEXPRESS;Database=AbpAML;Uid=dev;Pwd=123456;", + "Test": "Server=192.168.100.80,11433;Database=AML;Uid=dev;Pwd=123456;" + }, + "DBConfig": { + "DBType": "mssql", + "ConnectionStringName": "Default", + "DbMigrationsProjectFolderPath": "" + }, + "AuthServer": { + "Authority": "https://localhost:44331", + "RequireHttpsMetadata": "false", + "SwaggerClientId": "FX_Swagger", + "SwaggerClientSecret": "1q2w3e*" + }, + "StringEncryption": { + "DefaultPassPhrase": "kK47NpfjM9HOMLHG" + }, + "Settings": { + "Volo.Abp.LeptonTheme.Style": "Style6", + "Volo.Abp.LeptonTheme.Layout.MenuPlacement": "Left", + "Volo.Abp.LeptonTheme.Layout.MenuStatus": "AlwaysOpened", + "Volo.Abp.LeptonTheme.Layout.Boxed": "False", + "Abp.Mailing.Smtp.Host": "127.0.0.1", + "Abp.Mailing.Smtp.Port": "25", + "Abp.Mailing.Smtp.UserName": "", + "Abp.Mailing.Smtp.Password": "", + "Abp.Mailing.Smtp.Domain": "", + "Abp.Mailing.Smtp.EnableSsl": "false", + "Abp.Mailing.Smtp.UseDefaultCredentials": "true", + "Abp.Mailing.DefaultFromAddress": "noreply@abp.io", + "Abp.Mailing.DefaultFromDisplayName": "ABP application", + "Abp.Account.IsSelfRegistrationEnabled": "false" + }, + "iXserverAgentCSApplication": { + "BaseUrl": "http://api.epro-v1.com", + "DefaultCompanyCode": "icon_company", + "DefaultCompanyAdminCode": "icon_admin", + "SocketServer": "ws://api.epro-v1.com:33336" + }, + + "FileMediaResourceService": { + "StoreFilePath": "D:\\iCON\\data\\AML\\FileMediaResource\\", + "StoreUrlPath": "https://localhost:44331/files/", + "RelativeFolderExp": "yyyyMM", + "MaxFileCountInFolder": 20000, + "FileExpireRemindDays": 7 + }, + "VirtualFileVisualization": "D:\\TFS\\azure_justsolutions\\AMLBackend\\aspnet-core\\src\\iCON.Abp.FX.HttpApi.Host\\bin\\VirtualFileVisualization\\", + "AbpLicenseCode": "PABMAGkAYwBlAG4AcwBlAD4ACgAgACAAPABJAGQAPgBkAGIANwBjAGMAOAA2ADQALQA4ADkAYgBiAC0AYgAyAGEAZgAtAGEANgBmAGIALQAzADkAZgA3ADEAOQA4ADgANgA2ADQAMAA8AC8ASQBkAD4ACgAgACAAPABMAGkAYwBlAG4AcwBlAEEAdAB0AHIAaQBiAHUAdABlAHMAPgAKACAAIAAgACAAPABBAHQAdAByAGkAYgB1AHQAZQAgAG4AYQBtAGUAPQAiAE8AcgBnAGEAbgBpAHoAYQB0AGkAbwBuAEkAZAAiAD4AZABiADcAYwBjADgANgA0AC0AOAA5AGIAYgAtAGIAMgBhAGYALQBhADYAZgBiAC0AMwA5AGYANwAxADkAOAA4ADYANgA0ADAAPAAvAEEAdAB0AHIAaQBiAHUAdABlAD4ACgAgACAAIAAgADwAQQB0AHQAcgBpAGIAdQB0AGUAIABuAGEAbQBlAD0AIgBPAHIAZwBhAG4AaQB6AGEAdABpAG8AbgBOAGEAbQBlACIAPgBJAEMATwBOACAATABJAE0ASQBUAEUARAA8AC8AQQB0AHQAcgBpAGIAdQB0AGUAPgAKACAAIAAgACAAPABBAHQAdAByAGkAYgB1AHQAZQAgAG4AYQBtAGUAPQAiAEMAcgBlAGEAdABpAG8AbgBUAGkAbQBlACIAPgAyADAAMgAxAC0AMAAxAC0AMgA5ACAAMQAwADoANAA5ADoAMwAzADwALwBBAHQAdAByAGkAYgB1AHQAZQA+AAoAIAAgADwALwBMAGkAYwBlAG4AcwBlAEEAdAB0AHIAaQBiAHUAdABlAHMAPgAKACAAIAA8AFMAaQBnAG4AYQB0AHUAcgBlAD4ATQBFAFUAQwBJAFEAQwBRAFoAaABGAEEASgA1ADUAdwAzAEcAVgBkAC8AQQA1ACsAOABtAHkARQBNAEwAOABlAGEANQBUAFUAcABmAEUAbABwADcAZgAzAEEATgAvAEgATAB3AEkAZwBhADYATgAvAE8AVQBLAGUAbgAwAHcASgAyAFUAdwB5AFkAbgBXAHEAegBQAFkAUQBnAGoARQB6AHoANwBZAHgARwBzAG4AUwA5AFcAMwBIAG4AZgBvAD0APAAvAFMAaQBnAG4AYQB0AHUAcgBlAD4ACgA8AC8ATABpAGMAZQBuAHMAZQA+AE0ARgBrAHcARQB3AFkASABLAG8AWgBJAHoAagAwAEMAQQBRAFkASQBLAG8AWgBJAHoAagAwAEQAQQBRAGMARABRAGcAQQBFAGUANQBnAGEAOQBFAGgARQBFAGoAZQBwAE8AQQBQAEEAbAArAE4AMgBYADAAdwBNAEwAVQArAFUARwAvAEgAcgBlAHkASABxAG4AaQBlADQAbQB3AEcAQQBEADAAYwBkAFgARABCADYAVgBXAEoAMQBUADEAZwBGAGIAKwBxAFoAaABHAE4AdQBrAGwAagBBAGwAQQBqADgAMQBiAFUAdgBMAHUAZgBmADcAQQA9AD0AXwAxADIANAA=", + + "AppConfig": { + "iCS": { + "iCSRootUrl": "https://localhost:44431/", + "iCSRootUrl_local": "https://localhost:44431/", + "iCSRootUrl_test": "https://stag-abp-api.iconsz.com/", + "iCSRootUrl_prod": "https://abp-api.iconsz.com/", + "Html2PDFUrl": "api/iCS/pdf/Html2PDF", + "Excel2PDFUrl": "api/iCS/reporting/ExcelExporter", + "CreateExcelWithTemplateUrl": "api/iCS/reporting/CreateExcelWithTemplate", + "GetAvailableSurveyListUrl": "api/iCS/survey/GetAvailableSurveyList", + "GetSurveyVerifyCodeUrl": "api/iCS/survey/GetSurveyVerifyCode?surveyId=", + "CreateWordWithTemplateOfficeUrl": "api/iCS/reporting/CreateWordWithTemplateOffice", + "Excel2DataTableUrl": "api/iCS/OfficeProcess/Excel2DataTable", + "GetEngineListUrl": "api/iCS/queueing/GetEngineList", + "SubmitQueueUrl": "api/iCS/queueing/SubmitQueue", + "PaginationReadWordUrl": "api/iCS/OfficeProcess/PaginationReadWord", + "iCSSurveyPagePath": "https://stag-abp-admin.iconsz.com/#/survey-management/survey-form", + "QueueFetchCountLimited": 3, + "Credential": { + "RequestTokenPath": "connect/token?__tenant=ics", + "RequestTokenParams": "grant_type=password,response_type=token,username=admin,password=1qaz@WSX,scope=FX,client_id=aml,client_secret=7ii7U9AabN2*", + "AbpTokenExpiredSeconds": 600 + }, + "EmailApi": { + "Url": "api/iCS/emailing/send", + "MailServer": { + "ServerAddress": "smtp.yandex.com", + "UserName": "noreply@justsolutions.ai", + "Password": "AtSF2JustSm@0c", + "Port": 587, + "EnableSsl": true, + "DefaultSenderName": "JustAML" + } + } + }, + "ConsumerDetection": { + "EnableSendConsumerLinkResultMail": false, + "EnableSendConsumerLinkMail": false + }, + "Detection": { + "Basic": { + "VersionEffect": 2, + "Version1": { + "Url": "https://amldata-8c0521.ent.ap-east-1.aws.elastic-cloud.com/api/as/v1/engines/{0}/search", + "Engines": { + "Sanction": "aml-sanction-v03", + "Properties": "aml-properties" + }, + "Token": "Bearer search-zz5ntjc2i3v9jryhk4s2o4o7", + "Precision": 1, + "MaxRecordCount": 20, + "DefaultDetectionQueryThreshold": 10, + "DefaultDetectionMappingThreshold": 100 + }, + "Version2": { + "Url_test": "http://192.168.100.80:29200/{0}/_search", + "Url": "http://192.168.1.120:9200/{0}/_search", + "Url-localhost": "http://localhost:9200/{0}/_search", + "IndexName": "sanctions_v01_entity", + "MaxRecordCount": 10, + "DefaultDetectionQueryThreshold": 10, + "DefaultDetectionMappingThreshold": 100, + "DefaultKeywordSearchFields": [ + "full_name" + ], + "DefaultJurisdictionSearchFields": [ + "jurisdiction.iso_code", + "jurisdiction.name" + ], + "QueryBoost_bak": 2.5, + "FunctionsWeight_bak": 1.5, + "JurisdictionWeight_bak": 1.5, + "FullMatchWeight": 7, + "QueryMatchWeight": 1, + "JurisdictionWeight": 20, + "OrgDissolvedDateConfig": { + "WebbSiteApiUrl": "https://webb-site.com/dbpub/searchorgs.asp?sort=namup&n={0}&st=l&search=search", + "ElasticSearchIndexName": "org_dissolved_date" + } + }, + "IncludeFields": [ + "sys_id", + "entity_code", + "entity_type", + "sanction_list_type", + "full_name", + "original_name", + //"alias", + "sys_flags", + "flags", + "jurisdiction", + "addresses.country", + "addresses.STATE_PROVINCE", + "addresses.address", + "date_of_birth", + "place_of_birth", + "gender", + //"datasource", + "jobs", + "crno", + "brn", + "dissolved_date" + ] + }, + "Dowjones": { + "authurl": "https://accounts.dowjones.com/oauth2/v1/token", + "searchApiUrl": "https://api.dowjones.com/riskentities/search", + "username": "9jus000400-svcaccount@dowjones.com", + "client_id": "NRQowL79tf0OYkwi90MHlibTRBlBsmvI", + "password": "drL9OznwRFjdrxHo", + "cookie": "djcs_route=3ae39459-0162-4b34-aab0-cdba70b41d80", + "DefaultDetectionQueryThreshold": 1, + "DefaultDetectionMappingThreshold": 100 + }, + "DefaultDetectionRatingThresholdGreen": "0-52", + "DefaultDetectionRatingThresholdYellow": "52-100", + "DefaultDetectionRatingThresholdRed": "100-1000", + "ReportRemarkCount": 5, + "RelatedEntityDefaultShareholdingRatio": 0.25, + "AIDetectioniCSCallbackUrl": "https://localhost:44331/api/aml/detection/AIDetectioniCSCallback", + "EnableAIDetection": true, + "EnableAIDetectionCache": true, + "AIDetectionCacheExpireDays": 30, + "AIDetectionQueueingType": 24000, + "SubmitDetection": { + "MaxConcurrency": 1, + "MaxRetries": 3 + }, + "DetectionLegalAgeYears": 15 + }, + "General": { + "UploadTempFolder": "D:\\iCON\\data\\AML\\UploadTemp", + "STRFormFolder": "STRForm", + "InvoiceFolder": "Invoice", + "ReportFolder": "SanctionReport", + "AMLFilesPhysicalPath": "D:\\iCON\\data\\AML\\AMLFiles", + "AMLFilesVirtualFolderName": "AMLFiles", + "ClientUrl": "https://aml.iconsz.com/", + "JustClientUrl": "https://just.iconsz.com/", + "ApiLocalhostUrl": "https://localhost:44331/", + "ApiPublicUrl": "https://api-aml.iconsz.com/", + "VerifyCodeExpireMinutes": 10, + "UserHostLimitRuleGroup": [ + { + "RuleName": "Default", + "AllowHosts": "::1,127.0.0.1:localhost" + } + ], + "HostAccount": { + "LoginName": "admin", + "Password": "1q2w3E*", + "RequestTokenPath": "connect/token", + "RequestTokenParams": "grant_type=password,response_type=token,username=admin,password=1q2w3E*,scope=FX,client_id=Host,client_secret=1qaz@WSX", + "AbpTokenExpiredSeconds": "3600" + }, + "TenantPropertyCacheMins": 1, + "FreeOrderActivateUrl": "https://localhost:44331/api/amlPortal/Order/ActiveFreeOrder", + "FreeOrderActivateSuccessUrl": "https://dalongzi.wixsite.com/justsolutions/activation-success", + "FreeOrderActivateFailedUrl": "https://dalongzi.wixsite.com/justsolutions/activation-failure", + "TenantTobeExpiredRemindBeforeTimeArray": [ "0", "1w", "1m", "2m" ], + "FrontendPurchaseUrl": "https://dalongzi.wixsite.com/justsolutions/plans-1", + "ShowSwaggerUI": true, + "SendExceptionsDetailsToClients": true, + "AMLDataRootFolder": "", + "LogLocation": "", + "CustomerSupportAccount": { + "UserName": "support", + "DefaultPassword": "Z7z$y2BXcW5%", + "Email": "cs@justsolutions.ai" + }, + "TenantAdminDefaultPassword": "aMLDEFAULTPWd@20240727", + "UserDefaultPassword": "aMLDEFAULTPWd@20240907", + "BccMailSuffixes": [ "@justsolutions.ai", "@aaa.aaa" ], + "ApiUserAccount": { + "UserName": "apiUser" + }, + "AllowConcurrentLogin": false, + "TransactionConfig": { + "DefaultTransactionCustomSNPrefix": "T", + "TransactionCustomSNNumberLength": 6 + }, + "EntityCompletenessThreshold": 1, + "AIReportApiSelector": 2, + "DetectionReportGenerateTimeoutMins": 10 + }, + "AIConfig": { + "Perplexity": { + "BaseUrl": "https://api.perplexity.ai", + "ChatEndpoint": "/chat/completions", + "ApiSecretKey_william": "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", + "ApiSecretKey": "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", + "ModelName": "sonar" + }, + "LocalLLM": { + "BaseUrl": "http://openai.iconsz.com/v1", + "ChatEndpoint": "/chat/completions", + "ApiSecretKey": "sk-S3hL8valzBznw2AW072d3254946c4b6eB37c935cFf3fB843", + "ModelName0": "llama3.3:70b", + "ModelName": "qwen2.5:7b" + } + }, + "TerminalHeartbeatReminds": [ + { + "TerminalBusinessType": "FILE_SYNC", + "RemindEmails": [ "307736951@qq.com", "wanguo.2004.1@163.com" ], + "RemindIntervalMins": 4, + "OfflineThresholdMins": 2 + } + ], + "ServiceAndQuota": { + "EnableEntityCountLimit": false, + "TenantServiceLimit": true + }, + "JobConfig": { + "SanctionJob": { + "Enabled": true, + "RunOnStart": true, + "IntervalSeconds": 600, + "EnableEmailAlert": true, + "EmailSenderName": "JustAML" + }, + "EmailQueueJob": { + "Enabled": true, + "RunOnStart": true, + "IntervalSeconds": 60, + "RetryTimes": 5, + "RetryMinutes": 240 + }, + "TenantEventQueueJob": { + "Enabled": true, + "RunOnStart": true, + "IntervalSeconds": 60, + "RetryTimes": 5, + "RetryMinutes": 360 + }, + "ClearExpiredOrderCustomerJob": { + "Enabled": true, + "RunOnStart": true, + "IntervalSeconds": 60, + "RetryTimes": 0, + "RetryMinutes": 0 + }, + "TenantTobeExpiredRemindJob": { + "Enabled": true, + "RunOnStart": true, + "IntervalSeconds": 1800, + "RetryTimes": 0, + "RetryMinutes": 0 + }, + "ReportJob": { + "Enabled": true, + "RunOnStart": true, + "IntervalSeconds": 60, + "RetryTimes": 0, + "RetryMinutes": 0 + }, + "DataFixJob": { + "Enabled": true, + "RunOnStart": true, + "IntervalSeconds": 300, + "RetryTimes": 0, + "RetryMinutes": 0, + "EnableRefreshAllEntityCompleteness": true + }, + "TerminalHeartbeatJob": { + "Enabled": true, + "RunOnStart": true, + "IntervalSeconds": 60, + "RetryTimes": 0, + "RetryMinutes": 0 + }, + "EntityAddedAlertJob": { + "Enabled": true, + "RunOnStart": true, + "IntervalSeconds": 600, + "RetryTimes": 0, + "RetryMinutes": 0 + }, + "SendInvoiceJob": { + "Enabled": true, + "RunOnStart": true, + "IntervalSeconds": 60, + "RetryTimes": 0, + "RetryMinutes": 0 + }, + "AuditLogCollectorJob": { + "Enabled": true, + "RunOnStart": true, + "IntervalSeconds": 300, + "RetryTimes": 0, + "RetryMinutes": 0 + }, + "JQBalanceAlertJob": { + "Enabled": true, + "RunOnStart": true, + "IntervalSeconds": 300, + "RetryTimes": 0, + "RetryMinutes": 0 + }, + "EngineListSyncJob": { + "Enabled": true, + "RunOnStart": true, + "IntervalSeconds": 43200, + "RetryTimes": 0, + "RetryMinutes": 0 + }, + "DataCollectionProcessPushiCSJob": { + "Enabled": true, + "RunOnStart": true, + "IntervalSeconds": 60, + "RetryTimes": 0, + "RetryMinutes": 0 + } + }, + "JwtSetting": { + "SecurityKey": "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDI2a2EJ7m872v0afyoSDJT2o1+SitIeJSWtLJU8/Wz2m7gStexajkeD+Lka6DSTy8gt9Uwf8VQo6uKjVLG5Ex7PiG00DVq555hBuS7JzIYU5RvI543nNDAPfnJsas96mSA7L/mD7RTE2drj6hf3oZjJpMPZUQI/999jb5H3K3PNwID888B", + "Issuer": "http://localhost:5000", + "Audience": "http://localhost:5000", + "ExpireSeconds": 7200 + }, + "Portal": { + "RequestTokenPath": "connect/token?__tenant=Portal", + "RequestTokenParams": "grant_type=password,response_type=token,username=Portal@iconsz.com,password=1qaz@WSX,scope=FX,client_id=PortalClient,client_secret=1qaz@WSX", + "AbpTokenExpiredSeconds": "3600", + "PortalTenantId": "3A07C0C9-50E2-638F-C2BB-61A4DA42B8D4", + "ExpireOrderMins": 5, + "IsMockupPayment": true, + "SalesEmailAddress": "307736951@qq.com", + "SalesEmailAddress_prod": "sales@justsolutions.ai", + "TrialApplicationApproveUrl": "https://aml.iconsz.com/portal/trial-application-approve", + "TrialApplicationApproveUrl_prod": "https://aml.justsolutions.ai/portal/trial-application-approve", + "EditionOUMappings": [ + { + "EditionId": "3A0149C4-9F2E-C230-3D3D-88AA7CAC03D1", + "EditionName": "Standard", + "OUIDs": [] + }, + { + "EditionId": "Crypto", + "EditionName": "Crypto", + "OUIDs": [] + }, + { + "EditionId": "DPMS", + "EditionName": "DPMS", + "OUIDs": [] + }, + { + "EditionId": "Others", + "EditionName": "Others", + "OUIDs": [] + }, + { + "EditionId": "Real Estate", + "EditionName": "Real Estate", + "OUIDs": [ "3a0971b2-1628-0783-b241-903cc405bb4d" ] + }, + { + "EditionId": "root", + "OUIDs": [ "3a0971b1-75b7-c43a-f39d-3ced32e0df30" ], + "SalesAdminID": "3A0B4686-4473-DEC8-16EA-209135326E40" + } + ], + "EditionFeatureMappings": [ + { + "EditionId": "3A0149C4-9F2E-C230-3D3D-88AA7CAC03D1", + "Features": [ "AML.Transaction.RealEstates.Enable", "AML.Transaction.DPMS.Enable", "AML.Transaction.VASP.Enable", "AML.Transaction.MSO.Enable", "AML.Transaction.CRYPTO.Enable" ] + } + ], + "jQSeparatedEditions": { + "EditionIds": [ "3A1A2969-6200-7B6C-1FE2-F4001F2F17E1" ], + "EditionNames": [ "CPA" ] + } + }, + "BusinessDefaultData": { + "DefaultSubmitSurveyList": [ + { + "iCSSurveyId": "3a10d7b4-5d3c-0555-13c5-559014d02a1c", + "iCSSurveyType": "SubmitIndividual", + "iCSSurveyFieldMappings": [ + { + "amlField": "identityDocumentNumber", + "surveyLabelText": "身份證號碼" + }, + { + "amlField": "fullNameZH", + "surveyLabelText": "中文名" + }, + { + "amlField": "fullNameEN", + "surveyLabelText": "英文名" + }, + { + "amlField": "nationalityCode", + "surveyLabelText": "國籍" + } + ] + } + ], + "DefaultRoleList": [ + { + "RoleName": "agent", + "Permissions": [ + "AML.Customer", + "AML.Transaction", + "AML.UserType", + "AML.UserType.Agent", + "AuditLogging.AuditLogs" + ] + }, + { + "RoleName": "agentsupervisor", + "Permissions": [ + "AbpIdentity.OrganizationUnits", + "AbpIdentity.OrganizationUnits.ManageMembers", + "AbpIdentity.OrganizationUnits.ManageOU", + "AbpIdentity.OrganizationUnits.ManageRoles", + "AbpIdentity.Roles", + "AbpIdentity.Roles.Create", + "AbpIdentity.Roles.Delete", + "AbpIdentity.Roles.ManagePermissions", + "AbpIdentity.Roles.Update", + "AbpIdentity.Users", + "AbpIdentity.Users.Create", + "AbpIdentity.Users.Delete", + "AbpIdentity.Users.ManagePermissions", + "AbpIdentity.Users.Update", + "AML.Customer", + "AML.Customer.Create", + "AML.Customer.Delete", + "AML.Customer.Edit", + "AML.Transaction", + "AML.Transaction.Create", + "AML.Transaction.Delete", + "AML.Transaction.Edit", + "AML.UserType", + "AML.UserType.Agent", + "AuditLogging.AuditLogs" + ] + } + ], + "DefaultOuList": [ + { + "OUName": "Sales Department", + "Level": 0, + "ParentOUName": null, + "Roles": [ + "agentsupervisor" + ] + }, + { + "OUName": "Sales Team", + "Level": 1, + "ParentOUName": "Sales Department", + "Roles": [ + "agent" + ] + } + ] + }, + "DataCollection": { + "SubmitQueueiCSCallbackUrl": "https://api-aml.iconsz.com/api/aml/DataCollect/iCSCallback" + }, + "RabbitMQConfig": { + "HostName": "192.168.1.120", + "Port": 5672, + "UserName": "admin", + "Password": "123456", + "VirtualHost": "bthost", + "DelayBaseSeconds": 600, + "EnableConsumer": true, + "RabbitMQQueueList": { + "DataCollectionSubmit": { + "WorkQueueName": "aml.datacollection.submit.work.test", + "DelayQueueName": "aml.datacollection.submit.delay.test", + "DeadQueueName": "aml.datacollection.submit.dead.test" + }, + "iCSEmailSubmit": { + "WorkQueueName": "aml.icsmail.submit.work.test", + "DelayQueueName": "aml.icsmail.submit.delay.test", + "DeadQueueName": "aml.icsmail.submit.dead.test" + }, + "AMLReportGenerate": { + "WorkQueueName": "aml.report.generate.work.test", + "DelayQueueName": "aml.report.generate.delay.test", + "DeadQueueName": "aml.report.generate.dead.test" + }, + "AIDetection": { + "WorkQueueName": "aml.aidetection.submit.work.test", + "DelayQueueName": "aml.aidetection.submit.delay.test", + "DeadQueueName": "aml.aidetection.submit.dead.test" + }, + "ConsumerPortalOrderProcess": { + "WorkQueueName": "aml.consumerPortalOrder.process.work.test", + "DelayQueueName": "aml.consumerPortalOrder.process.delay.test", + "DeadQueueName": "aml.consumerPortalOrder.process.dead.test" + }, + "DetectionSubmitTask": { + "WorkQueueName": "aml.detectionsubmit.task.work.test", + "DelayQueueName": "aml.detectionsubmit.task.delay.test", + "DeadQueueName": "aml.detectionsubmit.task.dead.test" + } + } + }, + "KYCConfig": { + "EnableCreditCheckCache": true, + "CreditCheckCacheExpireDays": 30, + "XiangyunAPI": { + "BaseUrl": "https://netocr.com", + "Key": "UkC6dr19eq3JN3gvrNRk8b", + "Secret": "7e381942d8f54f09b3d98a58ddf75347", + "Timeout": 30, + "CertificateCodeMappingsLink": "https://netocr.com/api-word/typeEncodings.html", + "CertificateCodeMappings": [ + { + "AMLCode": "ForeignResidentIDCard_CHN_2017", + "OCRCode": "33", + "Remark": "外国人永久居留身份证" + }, + { + "AMLCode": "Chinese_Identity_Card|IDCard_CHN", + "OCRCode": "2", + "CreditCode": "1", + "Remark": "二代身份证正面" + }, + { + "AMLCode": "Chinese_Identity_Card_Full|IDCard_CHN_Full", + "OCRCode": "101", + "Remark": "二代身份证正反面" + }, + { + "AMLCode": "Chinese_Identity_Card_Back|IDCard_CHN_Back", + "OCRCode": "3", + "Remark": "二代身份证背面" + }, + { + "AMLCode": "Passport|Passport_CHN_2012|Passport_DEU_2017|Passport_TWN_2008|Passport_GBR_2015|Passport_USA_2020|Passport_VNM_2023", + "OCRCode": "13", + "ValidateCode": "3034", + "Remark": "护照" + }, + { + "AMLCode": "BR", + "OCRCode": "2008", + "CreditCode": "2", + "Remark": "营业执照识别" + }, + { + "AMLCode": "", + "OCRCode": "4", + "Remark": "临时身份证" + }, + { + "AMLCode": "", + "OCRCode": "5", + "Remark": "驾驶证正页" + }, + { + "AMLCode": "", + "OCRCode": "28", + "Remark": "驾驶证副页" + }, + { + "AMLCode": "", + "OCRCode": "102", + "Remark": "驾驶证正副页自动分类" + }, + { + "AMLCode": "", + "OCRCode": "6", + "Remark": "行驶证正页" + }, + { + "AMLCode": "", + "OCRCode": "30", + "Remark": "行驶证副页" + }, + { + "AMLCode": "", + "OCRCode": "103", + "Remark": "行驶证正副页自动分类" + }, + { + "AMLCode": "", + "OCRCode": "3038", + "Remark": "电子行驶证识别" + }, + { + "AMLCode": "", + "OCRCode": "3020", + "Remark": "电子驾驶证正页识别" + }, + { + "AMLCode": "", + "OCRCode": "3021", + "Remark": "电子驾驶证副页识别" + }, + { + "AMLCode": "", + "OCRCode": "104", + "Remark": "身份证、驾驶证、行驶证自动分类" + }, + { + "AMLCode": "", + "OCRCode": "31", + "Remark": "港澳台居民居住证正面" + }, + { + "AMLCode": "", + "OCRCode": "32", + "Remark": "港澳台居民居住证反面" + }, + { + "AMLCode": "IDCard_HK_2003|IDCard_HK_2018", + "OCRCode": "1001", + "Remark": "香港永久性居民身份证" + }, + { + "AMLCode": "Travel_Permit_HKMO_To_CHN_2012", + "OCRCode": "14", + "Remark": "港澳居民来往内地通行证-照片页" + }, + { + "AMLCode": "Travel_Permit_HKMO_To_CHN_2012_Back", + "OCRCode": "15", + "Remark": "港澳居民来往内地通行证-机读码页" + }, + { + "AMLCode": "Travel_Permit_CHN_To_HKMO_2014", + "OCRCode": "22", + "Remark": "往来港澳通行证2014版-照片页(卡式港澳通行证)" + }, + { + "AMLCode": "Travel_Permit_CHN_To_HKMO_2005", + "OCRCode": "9", + "Remark": "中华人民共和国往来港澳通行证2005版" + }, + { + "AMLCode": "", + "OCRCode": "1005", + "Remark": "澳门居民身份证(照片页)" + }, + { + "AMLCode": "", + "OCRCode": "1014", + "Remark": "澳门蓝卡" + }, + { + "AMLCode": "", + "OCRCode": "1031", + "Remark": "台湾身份证正面" + }, + { + "AMLCode": "", + "OCRCode": "1032", + "Remark": "台湾身份证背面" + }, + { + "AMLCode": "Travel_Permit_TWN_To_CHN_2015", + "OCRCode": "25", + "Remark": "台湾居民来往大陆通行证2015版-照片页" + }, + { + "AMLCode": "Travel_Permit_TWN_To_CHN_2015_Back", + "OCRCode": "26", + "Remark": "台湾居民往来大陆通行证2015版-机读码页" + }, + { + "AMLCode": "", + "OCRCode": "29", + "Remark": "往来台湾通行证2017版-照片页" + }, + { + "AMLCode": "", + "OCRCode": "10", + "Remark": "台湾居民往来大陆通行证1992版-照片页" + }, + { + "AMLCode": "", + "OCRCode": "11", + "Remark": "大陆居民往来台湾通行证1992版-照片页" + }, + { + "AMLCode": "", + "OCRCode": "1015", + "Remark": "香港入境小票" + }, + { + "AMLCode": "", + "OCRCode": "12", + "Remark": "签证" + }, + { + "AMLCode": "", + "OCRCode": "16", + "Remark": "常住人口登记卡(户口本)" + }, + { + "AMLCode": "", + "OCRCode": "18", + "Remark": "常住人口登记卡首页(户口本首页)" + }, + { + "AMLCode": "", + "OCRCode": "1000", + "Remark": "居住证(广东/广西/东莞)(照片页)" + }, + { + "AMLCode": "", + "OCRCode": "1013", + "Remark": "深圳居住证" + }, + { + "AMLCode": "", + "OCRCode": "1002", + "Remark": "登机牌" + }, + { + "AMLCode": "", + "OCRCode": "1003", + "Remark": "边民证(A)(照片页)" + }, + { + "AMLCode": "", + "OCRCode": "1004", + "Remark": "边民证(B)(个人信息页)" + }, + { + "AMLCode": "", + "OCRCode": "1007", + "Remark": "律师证(A) (信息页)" + }, + { + "AMLCode": "", + "OCRCode": "1008", + "Remark": "律师证(B) (照片页)" + }, + { + "AMLCode": "", + "OCRCode": "1030", + "Remark": "全民健康保险卡" + }, + { + "AMLCode": "", + "OCRCode": "1039", + "Remark": "厦门社会保障卡-照片页" + }, + { + "AMLCode": "", + "OCRCode": "1041", + "Remark": "福建社会保障卡-照片页" + }, + { + "AMLCode": "", + "OCRCode": "7", + "Remark": "军官证1998版" + }, + { + "AMLCode": "", + "OCRCode": "2001", + "Remark": "马来西亚身份证" + }, + { + "AMLCode": "", + "OCRCode": "2002", + "Remark": "美国加利福利亚驾驶证" + }, + { + "AMLCode": "", + "OCRCode": "2003", + "Remark": "新西兰驾驶证" + }, + { + "AMLCode": "", + "OCRCode": "2004", + "Remark": "新加坡身份证2004版" + }, + { + "AMLCode": "", + "OCRCode": "2010", + "Remark": "印度尼西亚居民身份证" + }, + { + "AMLCode": "", + "OCRCode": "2011", + "Remark": "泰国国民身份证" + }, + { + "AMLCode": "", + "OCRCode": "2013", + "Remark": "墨西哥选民证(ABC)" + }, + { + "AMLCode": "", + "OCRCode": "2014", + "Remark": "墨西哥选民证背面(ABC)" + }, + { + "AMLCode": "", + "OCRCode": "2020", + "Remark": "瑞典驾驶证" + }, + { + "AMLCode": "", + "OCRCode": "2021", + "Remark": "马来西亚驾驶证" + }, + { + "AMLCode": "", + "OCRCode": "2022", + "Remark": "菲律宾身份证" + }, + { + "AMLCode": "", + "OCRCode": "2031", + "Remark": "新加坡驾驶证" + }, + { + "AMLCode": "", + "OCRCode": "2041", + "Remark": "印度尼西亚驾驶证" + }, + { + "AMLCode": "", + "OCRCode": "2051", + "Remark": "日本驾驶证" + }, + { + "AMLCode": "", + "OCRCode": "20090", + "Remark": "发票识别" + }, + { + "AMLCode": "", + "OCRCode": "51", + "Remark": "银行回单识别" + }, + { + "AMLCode": "", + "OCRCode": "21", + "Remark": "人脸识别" + }, + { + "AMLCode": "", + "OCRCode": "3035", + "Remark": "静默活体检测" + }, + { + "AMLCode": "", + "OCRCode": "3036", + "Remark": "视频活体检测" + }, + { + "AMLCode": "", + "OCRCode": "9999", + "Remark": "人证合一" + }, + { + "AMLCode": "", + "OCRCode": "17", + "Remark": "银行卡识别" + }, + { + "AMLCode": "", + "OCRCode": "19", + "Remark": "车牌识别" + }, + { + "AMLCode": "", + "OCRCode": "1993", + "Remark": "通用文字(简体)" + }, + { + "AMLCode": "", + "OCRCode": "1994", + "Remark": "通用文字(手写)" + }, + { + "AMLCode": "", + "OCRCode": "1995", + "Remark": "通用文字(繁体)" + }, + { + "AMLCode": "", + "OCRCode": "1996", + "Remark": "通用文字(英文)" + }, + { + "AMLCode": "", + "OCRCode": "40", + "Remark": "房产证识别" + }, + { + "AMLCode": "", + "OCRCode": "41", + "Remark": "不动产登记证识别" + }, + { + "AMLCode": "", + "OCRCode": "42", + "Remark": "新车合格证识别" + }, + { + "AMLCode": "", + "OCRCode": "43", + "Remark": "车辆登记证识别" + }, + { + "AMLCode": "", + "OCRCode": "44", + "Remark": "承兑汇票识别" + }, + { + "AMLCode": "", + "OCRCode": "45", + "Remark": "出生证明识别" + }, + { + "AMLCode": "", + "OCRCode": "46", + "Remark": "结婚证识别" + }, + { + "AMLCode": "", + "OCRCode": "47", + "Remark": "离婚证识别" + }, + { + "AMLCode": "", + "OCRCode": "48", + "Remark": "开户许可证识别" + }, + { + "AMLCode": "", + "OCRCode": "49", + "Remark": "基本存款账户信息识别" + }, + { + "AMLCode": "", + "OCRCode": "2007", + "Remark": "VIN码识别" + }, + { + "AMLCode": "", + "OCRCode": "52", + "Remark": "进口报关单识别" + }, + { + "AMLCode": "", + "OCRCode": "53", + "Remark": "出口报关单识别" + }, + { + "AMLCode": "", + "OCRCode": "20", + "Remark": "名片识别" + }, + { + "AMLCode": "", + "OCRCode": "50", + "Remark": "印章识别" + }, + { + "AMLCode": "", + "OCRCode": "3050", + "Remark": "通用表格(简体)" + }, + { + "AMLCode": "", + "OCRCode": "3051", + "Remark": "通用表格(繁体))" + }, + { + "AMLCode": "", + "OCRCode": "3052", + "Remark": "通用表格(英文)" + }, + { + "AMLCode": "", + "OCRCode": "3053", + "Remark": "通用表格(手写简体)" + }, + { + "AMLCode": "", + "OCRCode": "3054", + "Remark": "通用表格(手写繁体)" + }, + { + "AMLCode": "", + "OCRCode": "3007", + "Remark": "发票查验(增值税系统开具发票)" + }, + { + "AMLCode": "", + "OCRCode": "3017", + "Remark": "财政票据查验" + }, + { + "AMLCode": "", + "OCRCode": "3080", + "Remark": "数电票版式文件下载" + }, + { + "AMLCode": "", + "OCRCode": "3033", + "Remark": "外国人永久居留身份证查验" + }, + { + "AMLCode": "", + "OCRCode": "3034", + "Remark": "护照查验" + }, + { + "AMLCode": "", + "OCRCode": "30341", + "Remark": "港澳居民来往内地通行证" + }, + { + "AMLCode": "", + "OCRCode": "30342", + "Remark": "台湾居民来往大陆通行证、台胞证" + }, + { + "AMLCode": "", + "OCRCode": "3009", + "Remark": "身份证号实名认证标准版" + }, + { + "AMLCode": "", + "OCRCode": "3001", + "Remark": "身份证号实名认证增强版" + }, + { + "AMLCode": "", + "OCRCode": "3012", + "Remark": "身份证实名认证标准版" + }, + { + "AMLCode": "", + "OCRCode": "3003", + "Remark": "身份证实名认证增强版" + }, + { + "AMLCode": "", + "OCRCode": "3013", + "Remark": "身份实名认证标准版" + }, + { + "AMLCode": "", + "OCRCode": "3004", + "Remark": "身份实名认证增强版" + }, + { + "AMLCode": "", + "OCRCode": "3010", + "Remark": "手机号实名认证标准版" + }, + { + "AMLCode": "", + "OCRCode": "3005", + "Remark": "手机号实名认证增强版" + }, + { + "AMLCode": "", + "OCRCode": "3011", + "Remark": "银行卡实名认证标准版" + }, + { + "AMLCode": "", + "OCRCode": "3006", + "Remark": "银行卡实名认证增强版" + }, + { + "AMLCode": "", + "OCRCode": "3016", + "Remark": "企业工商信息查询增强版" + }, + { + "AMLCode": "", + "OCRCode": "3008", + "Remark": "车架号VIN查询" + } + ] + }, + "CertificateEntityColumParseRules": [ + { + "AMLCode": "*", + "EntityColumn": "CardName", + "EntityColumnNames": [ "CARD_NAME" ] + }, + { + "AMLCode": "*", + "EntityColumn": "Name", + "EntityColumnNames": [ "姓名", "本国姓名", "名称", "Name", "name", "Chinese name", "English name", "Corrected name" ] + }, + { + "AMLCode": "*", + "EntityColumn": "Number", + "EntityColumnNames": [ "护照号码MRZ", "护照号码", "公民身份号码", "统一社会信用代码", "The passport number from MRZ", "ID Number", "ID number", "Passport number" ] + }, + { + "AMLCode": "*", + "EntityColumn": "CountryCode", + "EntityColumnNames": [ "持证人国籍代码", "Nationality code", "Issuing country code", "Nationality" ] + }, + { + "AMLCode": "*", + "EntityColumn": "Birthday", + "EntityColumnNames": [ "出生日期", "出生", "Date of Birth", "Date of birth" ] + }, + { + "AMLCode": "*", + "EntityColumn": "Address", + "EntityColumnNames": [ "住址", "Address" ] + }, + { + "AMLCode": "*", + "EntityColumn": "Sex", + "EntityColumnNames": [ "性别", "Sex", "Sex Code", "Sex(OCR)" ] + }, + { + "AMLCode": "*", + "EntityColumn": "ExpireDate", + "EntityColumnNames": [ "有效期至", "有效期至OCR", "Validity period to", "Date of Expiry", "Date of expiry" ] + }, + { + "AMLCode": "*", + "EntityColumn": "FirstOrGivenName", + "EntityColumnNames": [ "英文名", "The Given Name in English", "English first name" ] + }, + { + "AMLCode": "*", + "EntityColumn": "Surname", + "EntityColumnNames": [ "英文姓", "The Family Name in English", "English surname" ] + } + ], + "SupportCertificate": { + "Individual": [ + { + "id": "00000000-0000-0000-0000-000000000001", + "name": "中国身份证", + "code": "IDCard_CHN", + "displayOrder": 1, + "enabled": true, + "isDefault": false, + "categoryTranslations": [ + { + "categoryId": "00000000-0000-0000-0000-000000000001", + "languageCode": "en-us", + "translatedText": "Chinese Identity Card", + "category": null + }, + { + "categoryId": "00000000-0000-0000-0000-000000000001", + "languageCode": "zh-hk", + "translatedText": "中國身份證", + "category": null + }, + { + "categoryId": "00000000-0000-0000-0000-000000000001", + "languageCode": "zh-cn", + "translatedText": "中国身份证", + "category": null + }, + { + "categoryId": "00000000-0000-0000-0000-000000000001", + "languageCode": "ja-jp", + "translatedText": "中国身分証明書", + "category": null + } + ] + }, + { + "id": "00000000-0000-0000-0000-000000000003", + "name": "香港永久居民身份证", + "code": "IDCard_HKG", + "displayOrder": 1, + "enabled": true, + "isDefault": false, + "categoryTranslations": [ + { + "categoryId": "00000000-0000-0000-0000-000000000003", + "languageCode": "en-us", + "translatedText": "Hong Kong Permanent Identity Card", + "category": null + }, + { + "categoryId": "00000000-0000-0000-0000-000000000003", + "languageCode": "zh-hk", + "translatedText": "香港永久居民身份證", + "category": null + }, + { + "categoryId": "00000000-0000-0000-0000-000000000003", + "languageCode": "zh-cn", + "translatedText": "香港永久居民身份证", + "category": null + }, + { + "categoryId": "00000000-0000-0000-0000-000000000003", + "languageCode": "ja-jp", + "translatedText": "香港永久居民身分証明書", + "category": null + } + ] + }, + { + "id": "00000000-0000-0000-0000-000000000002", + "name": "前往港澳通行证-双程", + "code": "Travel_Permit_CHN_To_HKMO_2014", + "displayOrder": 1, + "enabled": true, + "isDefault": false, + "categoryTranslations": [ + { + "categoryId": "00000000-0000-0000-0000-000000000002", + "languageCode": "en-us", + "translatedText": "Chinese Two-way Entry Permit", + "category": null + }, + { + "categoryId": "00000000-0000-0000-0000-000000000002", + "languageCode": "zh-hk", + "translatedText": "前往港澳通行證-雙程", + "category": null + }, + { + "categoryId": "00000000-0000-0000-0000-000000000002", + "languageCode": "zh-cn", + "translatedText": "前往港澳通行证-双程", + "category": null + }, + { + "categoryId": "00000000-0000-0000-0000-000000000002", + "languageCode": "ja-jp", + "translatedText": "中国香港・マカオ往来通行証(二回)", + "category": null + } + ] + }, + { + "id": "00000000-0000-0000-0000-000000000007", + "name": "台湾居民来往大陆通行证", + "code": "Travel_Permit_TWN_To_CHN_2015", + "displayOrder": 1, + "enabled": true, + "isDefault": false, + "categoryTranslations": [ + { + "categoryId": "00000000-0000-0000-0000-000000000007", + "languageCode": "en-us", + "translatedText": "Taiwan Compatriot Permit", + "category": null + }, + { + "categoryId": "00000000-0000-0000-0000-000000000007", + "languageCode": "zh-hk", + "translatedText": "台灣居民來往大陸通行證", + "category": null + }, + { + "categoryId": "00000000-0000-0000-0000-000000000007", + "languageCode": "zh-cn", + "translatedText": "台湾居民来往大陆通行证", + "category": null + }, + { + "categoryId": "00000000-0000-0000-0000-000000000007", + "languageCode": "ja-jp", + "translatedText": "台湾居民大陸往来通行証", + "category": null + } + ] + }, + { + "id": "00000000-0000-0000-0000-000000000008", + "name": "港澳居民来往内地通行证", + "code": "Travel_Permit_HKMO_To_CHN_2012", + "displayOrder": 1, + "enabled": true, + "isDefault": false, + "categoryTranslations": [ + { + "categoryId": "00000000-0000-0000-0000-000000000008", + "languageCode": "en-us", + "translatedText": "Mainland Travel Permit for Hong Kong and Macau Residents", + "category": null + }, + { + "categoryId": "00000000-0000-0000-0000-000000000008", + "languageCode": "zh-hk", + "translatedText": "港澳居民來往內地通行證", + "category": null + }, + { + "categoryId": "00000000-0000-0000-0000-000000000008", + "languageCode": "zh-cn", + "translatedText": "港澳居民来往内地通行证", + "category": null + }, + { + "categoryId": "00000000-0000-0000-0000-000000000008", + "languageCode": "ja-jp", + "translatedText": "香港・マカオ住民内地往来通行証", + "category": null + } + ] + }, + { + "id": "00000000-0000-0000-0000-000000000006", + "name": "中国护照", + "code": "Passport_CHN_2012", + "displayOrder": 1.0000, + "enabled": true, + "isDefault": false, + "categoryTranslations": [ + { + "categoryId": "00000000-0000-0000-0000-000000000006", + "languageCode": "en-us", + "translatedText": "Chinese Passport", + "category": null + }, + { + "categoryId": "00000000-0000-0000-0000-000000000006", + "languageCode": "zh-hk", + "translatedText": "中國護照", + "category": null + }, + { + "categoryId": "00000000-0000-0000-0000-000000000006", + "languageCode": "zh-cn", + "translatedText": "中国护照", + "category": null + }, + { + "categoryId": "00000000-0000-0000-0000-000000000006", + "languageCode": "ja-jp", + "translatedText": "中国パスポート", + "category": null + } + ] + }, + { + "id": "00000000-0000-0000-0000-000000000005", + "name": "护照", + "code": "Passport", + "displayOrder": 1.0000, + "enabled": true, + "isDefault": false, + "categoryTranslations": [ + { + "categoryId": "00000000-0000-0000-0000-000000000005", + "languageCode": "en-us", + "translatedText": "Passport", + "category": null + }, + { + "categoryId": "00000000-0000-0000-0000-000000000005", + "languageCode": "zh-hk", + "translatedText": "護照", + "category": null + }, + { + "categoryId": "00000000-0000-0000-0000-000000000005", + "languageCode": "zh-cn", + "translatedText": "护照", + "category": null + }, + { + "categoryId": "00000000-0000-0000-0000-000000000005", + "languageCode": "ja-jp", + "translatedText": "パスポート", + "category": null + } + ] + } + ], + "Organization": [ + { + "id": "00000000-0000-0000-0000-000000000001", + "name": "中国营业执照", + "code": "ORG_CHN", + "displayOrder": 1, + "enabled": true, + "isDefault": false, + "categoryTranslations": [ + { + "categoryId": "00000000-0000-0000-0000-000000000001", + "languageCode": "en-us", + "translatedText": "Business License of China", + "category": null + }, + { + "categoryId": "00000000-0000-0000-0000-000000000001", + "languageCode": "zh-hk", + "translatedText": "中國營業執照", + "category": null + }, + { + "categoryId": "00000000-0000-0000-0000-000000000001", + "languageCode": "zh-cn", + "translatedText": "中国营业执照", + "category": null + }, + { + "categoryId": "00000000-0000-0000-0000-000000000001", + "languageCode": "ja-jp", + "translatedText": "中国営業許可証", + "category": null + } + ] + }, + { + "id": "00000000-0000-0000-0000-000000000003", + "name": "香港企业证明", + "code": "ORG_HKG", + "displayOrder": 1, + "enabled": true, + "isDefault": false, + "categoryTranslations": [ + { + "categoryId": "00000000-0000-0000-0000-000000000003", + "languageCode": "en-us", + "translatedText": "Business License of Hong Kong", + "category": null + }, + { + "categoryId": "00000000-0000-0000-0000-000000000003", + "languageCode": "zh-hk", + "translatedText": "香港企業證明", + "category": null + }, + { + "categoryId": "00000000-0000-0000-0000-000000000003", + "languageCode": "zh-cn", + "translatedText": "香港企业证明", + "category": null + }, + { + "categoryId": "00000000-0000-0000-0000-000000000003", + "languageCode": "ja-jp", + "translatedText": "香港企業証明書", + "category": null + } + ] + } + ] + }, + "TranslateMappings": [ + { + "ObjectType": "ValidateCredit", + "Value": "No Relevant Judgment Debtor Found", + "ValueSC": "未找到相关被执行人", + "ValueTC": "未找到相關被執行人", + "MatchRules": [ "未找到相关被执行人" ] + }, + { + "ObjectType": "ValidateCredit", + "Value": "Relevant Judgment Debtor Found", + "ValueSC": "找到相关被执行人", + "ValueTC": "找到相關被執行人", + "MatchRules": [ "执行成功" ] + }, + { + "ObjectType": "ValidateCredit", + "Value": "Name of the Judgment Debtor", + "ValueSC": "被执行人姓名/名称", + "ValueTC": "被執行人姓名/名稱", + "MatchRules": [ "被执行人姓名/名称" ] + }, + { + "ObjectType": "ValidateCredit", + "Value": "ID Number/Organization Code", + "ValueSC": "身份证号码/组织机构代码", + "ValueTC": "身份證號碼/組織機構代碼", + "MatchRules": [ "身份证号码/组织机构代码" ] + }, + { + "ObjectType": "ValidateCredit", + "Value": "Name of Legal Representative or Responsible Person", + "ValueSC": "法定代表人或者负责人姓名", + "ValueTC": "法定代表人或者負責人姓名", + "MatchRules": [ "法定代表人或者负责人姓名" ] + }, + { + "ObjectType": "ValidateCredit", + "Value": "Executing Court", + "ValueSC": "执行法院", + "ValueTC": "執行法院", + "MatchRules": [ "执行法院" ] + }, + { + "ObjectType": "ValidateCredit", + "Value": "Province", + "ValueSC": "省份", + "ValueTC": "省份", + "MatchRules": [ "省份" ] + }, + { + "ObjectType": "ValidateCredit", + "Value": "Execution Basis Document Number", + "ValueSC": "执行依据文号", + "ValueTC": "執行依據文號", + "MatchRules": [ "执行依据文号" ] + }, + { + "ObjectType": "ValidateCredit", + "Value": "Case Filing Date", + "ValueSC": "立案时间", + "ValueTC": "立案時間", + "MatchRules": [ "立案时间" ] + }, + { + "ObjectType": "ValidateCredit", + "Value": "Case Number", + "ValueSC": "案号", + "ValueTC": "案號", + "MatchRules": [ "案号" ] + }, + { + "ObjectType": "ValidateCredit", + "Value": "Authority Issuing Execution Basis", + "ValueSC": "做出执行依据单位", + "ValueTC": "做出執行依據單位", + "MatchRules": [ "做出执行依据单位" ] + }, + { + "ObjectType": "ValidateCredit", + "Value": "Obligations Determined by Effective Legal Documents", + "ValueSC": "生效法律文书确定的义务", + "ValueTC": "生效法律文書確定的義務", + "MatchRules": [ "生效法律文书确定的义务" ] + }, + { + "ObjectType": "ValidateCredit", + "Value": "Performance Status of the Judgment Debtor", + "ValueSC": "被执行人的履行情况", + "ValueTC": "被執行人的履行情況", + "MatchRules": [ "被执行人的履行情况" ] + }, + { + "ObjectType": "ValidateCredit", + "Value": "Specific Circumstances of Dishonest Debtor's Conduct", + "ValueSC": "失信被执行人行为具体情形", + "ValueTC": "失信被執行人行為具體情形", + "MatchRules": [ "失信被执行人行为具体情形" ] + }, + { + "ObjectType": "ValidateCredit", + "Value": "Release Date", + "ValueSC": "发布时间", + "ValueTC": "發佈時間", + "MatchRules": [ "发布时间" ] + }, + { + "ObjectType": "ValidateIDCard", + "Value": "Name and ID Number Match", + "ValueSC": "姓名及身份证号一致", + "ValueTC": "姓名及身份證號一致", + "MatchRules": [ "姓名及身份证号一致" ] + }, + { + "ObjectType": "ValidateIDCard", + "Value": "Name and ID Number Do Not Match", + "ValueSC": "姓名及身份证号不一致", + "ValueTC": "姓名及身份證號不一致", + "MatchRules": [ "姓名及身份证号不一致" ] + } + ], + "CertificateContentMatchRules": [ + { + "CertificateCode": "Chinese_Identity_Card", + "Rules": [ "公民身份号码", "民族" ] + }, + { + "CertificateCode": "Passport", + "Rules": [ "中国普通护照", "Passport" ] + }, + { + "CertificateCode": "Chinese_Two-way_Entry_Permit", + "Rules": [ "China Mainland Travel Permit for HK and Macao Residents" ] + }, + { + "CertificateCode": "Hong_Kong_Permanent_Identity_Card", + "Rules": [ "HK Resident Identity Card" ] + } + ], + "CountryCodeMatchRules": [ + { + "CountryCode": "TWN", + "Rules": [ "Taiwan Identity Card Portrait", "Taiwan, China Ordinary Passport" ] + }, + { + "CountryCode": "HKG", + "Rules": [ "Chinese Hong Kong Ordinary Passport", "HK Resident Identity Card", "China Mainland Travel Permit for HK and Macao Residents" ] + }, + { + "CountryCode": "CHN", + "Rules": [ "中国", "Chinese_Identity_Card", "居民身份证", "中国普通护照" ] + }, + { + "CountryCode": "DEU", + "Rules": [ "D" ] + } + ], + "AttachmentFileSetting": { + "Individual": [ + { + "FileTypeCode": "ID_PASSPORT", + "FileTypeName": "ID PASSPORT", + "Required": false, + "NeedUpdateAfterDays": 0, + "IsNeedUpdate": false, + "IsAutoValidate": false, + "CertificateHandlerSettings": [ + { + "Name": "Passport", + "Code": "Passport", + "CertificateCodes": [ "Passport" ], + "Handlers": [ + { + "Code": "ValidatePassport", + "Name": "ValidatePassport", + "Enable": true + } + ] + }, + { + "Name": "Chinese Identity Card", + "Code": "Chinese_Identity_Card", + "CertificateCodes": [ "Chinese_Identity_Card" ], + "Handlers": [ + { + "Code": "ValidateIDCard", + "Name": "ValidateIDCard", + "Enable": true + } + ] + } + ] + }, + { + "FileTypeCode": "ADD_PROOF", + "FileTypeName": "Address Proof", + "Required": false, + "NeedUpdateAfterDays": 0, + "IsNeedUpdate": false, + "IsAutoValidate": false, + "CertificateHandlerSettings": [ + { + "Name": "Address Proof", + "Code": "ADD_PROOF", + "CertificateCodes": [ "ADD_PROOF" ], + "Handlers": [] + } + ] + } + ], + "Organization": [ + { + "FileTypeCode": "CI", + "FileTypeName": "Certificate of Incorporation", + "Required": false, + "NeedUpdateAfterDays": 0, + "IsNeedUpdate": false, + "IsAutoValidate": false, + "CertificateHandlerSettings": [ + { + "Name": "Certificate of Incorporation", + "Code": "CI", + "CertificateCodes": [ "CI" ], + "Handlers": [] + }, + { + "Name": "Company Registry", + "Code": "CR", + "CertificateCodes": [ "CR" ], + "Handlers": [] + } + ] + }, + { + "FileTypeCode": "BR", + "FileTypeName": "Business Registration", + "Required": false, + "NeedUpdateAfterDays": 0, + "IsNeedUpdate": false, + "IsAutoValidate": false, + "CertificateHandlerSettings": [ + { + "Name": "Business Registration", + "Code": "BR", + "CertificateCodes": [ "BR" ], + "Handlers": [ + { + "Code": "ValidateCredit", + "Name": "Validate Credit", + "Enable": true + } + ] + } + ] + }, + { + "FileTypeCode": "NAR1", + "FileTypeName": "Notice of Appointment of Registered Agent", + "Required": false, + "NeedUpdateAfterDays": 0, + "IsNeedUpdate": false, + "IsAutoValidate": false, + "CertificateHandlerSettings": [ + { + "Name": "Notice of Appointment of Registered Agent", + "Code": "NAR1", + "CertificateCodes": [ "NAR1" ], + "Handlers": [] + } + ] + } + ] + }, + "ScanAndValidateSetting": { + "ScanMode": [ + { + "Name": "Chinese Identity Card", + "Code": "Scan_Chinese_Identity_Card", + "CertificateCodes": [ "Chinese_Identity_Card", "IDCard_CHN" ], + "Handlers": [ + { + "Name": "Scan OCR", + "Code": "Scan_OCR", + "Enable": true + }, + { + "Name": "Scan Chin", + "Code": "Scan_Chin", + "Enable": true + }, + { + "Name": "OCR", + "Code": "OCRIDCard", + "Enable": true + }, + { + "Name": "Validate ID Card", + "Code": "ValidateIDCard", + "Enable": true + }, + { + "Name": "Validate Credit", + "Code": "ValidateCredit", + "Enable": true + } + ] + }, + { + "Name": "Hong Kong Permanent Identity Card", + "Code": "Scan_Hong_Kong_Permanent_Identity_Card", + "CertificateCodes": [ "Hong_Kong_Permanent_Identity_Card", "IDCard_HK_2018" ], + "Handlers": [ + { + "Name": "Scan OCR", + "Code": "Scan_OCR", + "Enable": true + }, + { + "Name": "Scan Chin", + "Code": "Scan_Chin", + "Enable": true + }, + { + "Name": "OCR", + "Code": "OCRIDCard", + "Enable": true + } + ] + }, + { + "Name": "Passport", + "Code": "Scan_Passport", + "CertificateCodes": [ "Passport" ], + "Handlers": [ + { + "Name": "Scan OCR", + "Code": "Scan_OCR", + "Enable": true + }, + { + "Name": "Scan Chin", + "Code": "Scan_Chin", + "Enable": true + }, + { + "Name": "OCR", + "Code": "OCRIDCard", + "Enable": true + }, + { + "Name": "Validate Passport", + "Code": "ValidatePassport", + "Enable": true + } + ] + } + ], + "InputMode": [] + }, + "ScanAndValidateHandlers": [ + { + "Code": "Scan_OCR", + "Name": "Scan OCR", + "Remark": "扫描机:OCR", + "HandlerType": "Scan" + }, + { + "Code": "Scan_Chin", + "Name": "Scan Chin", + "Remark": "扫描机:芯片", + "HandlerType": "Scan" + }, + { + "Code": "ValidateIDCardNameAndNumber", + "Name": "Validate ID Card Name And Number", + "Remark": "检测身份证姓名和身份证号是否匹配", + "HandlerType": "Validate" + }, + { + "Code": "ValidateIDCard", + "Name": "Validate ID Card", + "Remark": "检测身份证是否有效", + "HandlerType": "Validate" + }, + { + "Code": "ValidatePassport", + "Name": "Validate Passport", + "Remark": "检测护照是否有效", + "HandlerType": "Validate" + }, + { + "Code": "ValidateCredit", + "Name": "Validate Credit", + "Remark": "检测是否是失信人或企业失信人", + "HandlerType": "Credit" + }, + { + "Code": "OCRIDCard", + "Name": "OCR ID Card", + "Remark": "身份证OCR识别", + "HandlerType": "OCR" + }, + { + "Code": "OCRBusinessLicense", + "Name": "OCR Business License", + "Remark": "营业执照OCR识别", + "HandlerType": "OCR" + }, + { + "Code": "OCRDocument", + "Name": "OCR Document", + "Remark": "文档OCR识别", + "HandlerType": "OCR" + }, + { + "Code": "OCRTable", + "Name": "OCR Table", + "Remark": "表格OCR识别", + "HandlerType": "OCR" + }, + { + "Code": "ValidateBR", + "Name": "Validate BR", + "Remark": "查询企业工商信息", + "HandlerType": "Validate" + } + ], + "CertificateMappings": [] + }, + "CrmConfig": { + "BuiltinAccount": { + "UserName": "crm", + "DefaultPassword": "JH5=eWwfwy=E", + "Email": "crm_{0}@justsolutions.ai" + }, + "RequestTokenPath": "connect/token?__tenant={0}", + "RequestTokenParams": "grant_type=password,response_type=token,username={0},password={1},scope=FX,client_id=crmClient,client_secret=1qaz@WSX", + "EnableSignatureValidation": false, + "HubSpotConfig": { + "ClientId_wanguo20041": "3fe0003d-97cd-48b9-b229-be2945dfc1a7", + "ClientSecret_wanguo20041": "7a08d212-b8e1-4625-ab4b-5c2cccd4d808", + "ClientId": "025fe4b2-cd25-40c6-a4e2-a99a7d2cb09f", + "ClientSecret": "7002302e-b064-4d07-b142-b954b522eb21", + "Scopes": "oauth crm.objects.contacts.read crm.objects.contacts.write", + "RedirectUri": "https://api-aml.iconsz.com/api/aml/crm/hubspot/oauth/callback" + }, + "DefaultDefaultTrialTenantId": "3A1E4696-4565-F5B1-410C-3C86878FF49C", + "TrialDays": 7 + } + } +} \ No newline at end of file diff --git a/docs/AML_Backend/docker-compose本地开发/docker-compose本地开发.md b/docs/AML_Backend/docker-compose-local-dev/docker-compose-local-dev.md similarity index 54% rename from docs/AML_Backend/docker-compose本地开发/docker-compose本地开发.md rename to docs/AML_Backend/docker-compose-local-dev/docker-compose-local-dev.md index f0c9bbd..f1c0d50 100644 --- a/docs/AML_Backend/docker-compose本地开发/docker-compose本地开发.md +++ b/docs/AML_Backend/docker-compose-local-dev/docker-compose-local-dev.md @@ -2,28 +2,40 @@ 用 docker-compose 在本地一键拉起 `iCON.Abp.FX.HttpApi.Host`,包含 SQL Server 数据库容器,并自动完成数据库迁移与种子数据初始化,用于本地开发调试。 -> 适用平台:macOS(含 Apple Silicon / arm64)。相关文件均位于 `AML_Backend/` 目录下。 +> 适用平台:macOS(含 Apple Silicon / arm64)。相关文件均位于 `AML_Backend/docker-compose-local-dev/` 目录下;构建上下文(build context)是上一级的仓库根目录 `AML_Backend/`。 --- ## 1. 架构概览 -`docker-compose.local.yml` 定义三个服务: +`docker-compose.local.yml` 定义四个服务: | 服务 | 作用 | 说明 | |------|------|------| | `mssql` | SQL Server 2022 数据库 | arm64 上通过 `platform: linux/amd64`(Rosetta 模拟)运行;数据持久化在命名卷 `mssql-data` | +| `rabbitmq` | 消息队列(异步任务中枢) | `rabbitmq:3.13-management`(arm64 原生);`host`/`consumer` 靠它跑数据采集、报告生成、AI 检测、门户订单等异步链路。宿主端口错开为 `5673`/`15673`(见第 8 节) | | `db-migrator` | 数据初始化 | 运行一次:执行 EF Core 迁移 + 种子数据,完成后退出(exit 0) | -| `httpapi-host` | 后端 API 主机 | 等 `db-migrator` 成功后才启动;对外暴露 `44331` | +| `httpapi-host` | 后端 API 主机 | 等 `db-migrator` 成功后才启动;对外暴露 `44331`;随宿主启动 `RabbitMQConsumerService` 消费上述队列 | -启动顺序由健康检查与 `depends_on` 保证:`mssql` 健康 → `db-migrator` 跑完 → `httpapi-host` 启动。 +启动顺序由健康检查与 `depends_on` 保证:`mssql` + `rabbitmq` 健康 → `db-migrator` 跑完 → `httpapi-host` 启动。 -配套文件: +配套文件(均在 `docker-compose-local-dev/` 内): - `Dockerfile.local`:本地多阶段构建镜像(**.NET 6**),产出 `host` 与 `migrator` 两个目标。 -- `Dockerfile.local.dockerignore`:本地构建专用忽略表(保留 `appsettings.json`,仅排除 `bin/obj/.git` 等)。 +- `Dockerfile.local.dockerignore`:本地构建专用忽略表(仅排除 `bin/obj/.git` 等)。BuildKit 会优先采用「与 Dockerfile 同目录、同名 + `.dockerignore`」的这个文件,从而**覆盖**仓库根目录的 `.dockerignore`(根目录那个会把 `appsettings.json`、`docker-compose*` 都排除掉,不适用于本地构建)。 +- `appsettings.local.json`:**本地专用、绕过 Nacos 的完整配置**(见第 1.1 节),构建时会被覆盖进镜像的 `appsettings.json`。 > ⚠️ 仓库自带的 CI 用 `src/iCON.Abp.FX.HttpApi.Host/Dockerfile` 已过时(写的是 .NET 5、且 COPY 一个不存在的 `src/access-token.bin`),**不要**用它做本地构建,请使用 `Dockerfile.local`。 +### 1.1 配置来源:为什么要绕过 Nacos + +最新代码已把配置中心切到 **Nacos**:`src/iCON.Abp.FX.HttpApi.Host/appsettings.json` 现在只剩一个 `NacosConfig` 段,真正的配置(连接串、AuthServer、AppConfig、RabbitMQ、任务开关等)都从 Nacos 服务器 `http://192.168.1.120:8848`(DataId `aml.dev.json`)拉取。 + +该 Nacos 地址是公司内网,本机通常不可达;且它指向的是共享 dev 环境(连接串指向远程 dev 库),与「本地自包含隔离栈」的目标冲突。 + +`Program.cs` 里 Nacos 是**条件加载**的——仅当配置里存在 `NacosConfig` 段才会 `AddNacosV2Configuration`。因此本地方案是:用 `appsettings.local.json`(一份**不含 `NacosConfig`、但包含完整配置**的文件)覆盖镜像里的 `appsettings.json`,App 便不再尝试连接 Nacos,直接用本地配置启动;再由 compose 的环境变量把连接串等指向本地 `mssql` 容器。 + +> `appsettings.local.json` 取自 Nacos 改造前(commit `297d3bb6` 的父提交)那版完整 `appsettings.json`,是目前唯一可自包含运行的完整配置快照。若今后 Nacos 里新增了启动必需的配置项,需要手动同步补进这个文件。 + --- ## 2. 前置条件 @@ -77,10 +89,12 @@ volumes: ## 4. 一键启动 ```bash -cd AML_Backend +cd AML_Backend/docker-compose-local-dev docker compose -f docker-compose.local.yml up -d --build ``` +> 也可在仓库根目录运行:`cd AML_Backend && docker compose -f docker-compose-local-dev/docker-compose.local.yml up -d --build`。 + 首次构建较慢(需还原大量 ABP 商业 NuGet 包并编译约 40 个项目,并拉取 SQL Server 镜像)。 构建已做内存优化(`-m:1` 单项目编译 + NuGet 缓存挂载),避免 Roslyn 因内存不足被杀(OOM / exit 137)。 @@ -100,6 +114,7 @@ docker compose -f docker-compose.local.yml ps | Swagger | http://localhost:44331/swagger (FX API + AMLPortal API) | | OpenID 配置 | http://localhost:44331/.well-known/openid-configuration | | 数据库 | `localhost,11433`,用户 `sa`,密码 `Aml@Local2026`,库名 `AbpAML` | +| RabbitMQ 管理台 | http://localhost:15673 ,用户 `admin` / 密码 `123456`(vhost `bthost`) | | 应用管理员 | `admin@abp.io` / `1q2w3E*` | 种子数据包含:管理员账号、249 个国家、155 种货币、转账类型、文本模板、检测阈值等(共约 124 张表)。 @@ -109,7 +124,7 @@ docker compose -f docker-compose.local.yml ps ## 6. 常用操作 ```bash -cd AML_Backend +cd AML_Backend/docker-compose-local-dev # 查看后端日志(注意:Release 构建日志写文件,docker logs 可能为空,见下) docker compose -f docker-compose.local.yml logs -f httpapi-host @@ -143,9 +158,12 @@ docker exec aml-mssql /opt/mssql-tools18/bin/sqlcmd \ - `ASPNETCORE_URLS=http://+:44331`,`App__SelfUrl` / `AuthServer__Authority=http://localhost:44331`(保证 IdentityServer 颁发者与浏览器访问地址一致),`AuthServer__RequireHttpsMetadata=false`。 - `ConnectionStrings__Default` 指向 `mssql` 服务(覆盖 appsettings 里的 `localhost`)。 -- 屏蔽不可达的外部集成:`AppConfig__RabbitMQConfig__HostName=127.0.0.1`(快速失败)、`...__EnableConsumer=false`;关闭 `SanctionJob`、`EngineListSyncJob`。 +- **RabbitMQ**:`AppConfig__RabbitMQConfig__HostName=rabbitmq`(指向 compose 内的 broker)、`...__EnableConsumer=true`(开启后台消费)。账号/vhost(`admin`/`123456`/`bthost`)沿用 appsettings.local.json,与 `rabbitmq` 服务的 `RABBITMQ_DEFAULT_*` 一致。 +- **iCS**:`AppConfig__iCS__iCSRootUrl=https://stag-abp-api.iconsz.com/`(iCS 服务端不在本仓库,指向共享 stag 实例,让文档/问卷/检测引擎等功能可用)。iCS 用的是 ZeroSSL/Sectigo 证书、且服务器只下发部分证书链;`Dockerfile.local` 的 `runtime-base` 阶段刷新了容器 CA 库,否则 HttpClient 会因 `PartialChain` 握手失败(应用自带的证书旁路只作用于旧式 WebClient,不管 HttpClient)。 + > 依赖 stag 那边的 iCS 凭证有效;若 stag 不可达或换了证书,相关功能会失败但不影响 host 启动。 +- 仍关闭 `SanctionJob`(依赖本地未部署的 Elasticsearch)。`EngineListSyncJob` 因 iCS 已指向 stag 而恢复默认启用。 -> 仍有部分检测功能依赖 Elasticsearch / iCS 等远程或局域网服务,本 compose 未包含。如需本地联调这些功能,需另行配置对应服务地址。 +> 仍有部分检测功能依赖 Elasticsearch(`192.168.1.120:9200` 等)等远程/局域网服务,本 compose 未包含。如需本地联调,需另行配置对应服务地址。 --- @@ -158,15 +176,22 @@ docker exec aml-mssql /opt/mssql-tools18/bin/sqlcmd \ | 构建时 `csc.dll exited with code 137` / `cannot allocate memory` | 编译 `DbMigrations` 大项目时 OOM | 已用 `-m:1` 缓解;确保 Docker 内存充足,必要时串行构建 | | `docker logs httpapi-host` 为空但服务异常 | Release 构建只写文件日志(`#if DEBUG` 才有控制台 sink),日志在容器内 `/app/Logs/<级别>/<日期>/` | `docker cp aml-httpapi-host:/app/Logs ./Logs` 后查看,或临时用 `--build-arg BUILD_CONFIGURATION=Debug` 构建以获得控制台日志 | | 访问 Swagger 401/跳转异常 | `AuthServer:Authority` 与实际访问地址不一致 | 确认仍是 `http://localhost:44331`,端口映射 `44331:44331` 未改 | +| 启动报 `Bind for 0.0.0.0:5672 failed: port is already allocated` | 宿主已有其它 RabbitMQ 占用 5672/15672 | 本 compose 已把宿主端口错开为 `5673`/`15673`;若仍冲突,改 `rabbitmq.ports` 即可(容器间通信走内部 5672,不受影响) | +| 日志含 `SSL connection could not be established ... PartialChain` | 容器 CA 库无法补全 iCS(stag) 的 ZeroSSL 证书链,且 HttpClient 不认应用的证书旁路 | 由 `Dockerfile.local` 的 `runtime-base` 刷新 CA 库解决;若复现,确认镜像是最新构建(`--build`)| +| iCS 功能报 401/token 失败(非 TLS) | stag 那边的 iCS 凭证/租户失效 | 与后端确认 `AppConfig:iCS:Credential` 在 stag 是否有效;非致命,不影响 host | --- ## 9. 相关文件清单 ``` -AML_Backend/ -├─ docker-compose.local.yml # 本地三服务编排(本说明对应文件) -├─ Dockerfile.local # 本地 .NET 6 多阶段构建(host / migrator 两个目标) -├─ Dockerfile.local.dockerignore # 本地构建忽略表(保留 appsettings.json) -└─ src/iCON.Abp.FX.HttpApi.Host/ # API 主机工程 +AML_Backend/ # 构建上下文(build context)根目录 +├─ NuGet.Config # ABP 商业源(Dockerfile 会 COPY) +├─ src/iCON.Abp.FX.HttpApi.Host/ # API 主机工程 +└─ docker-compose-local-dev/ # ← 本地开发相关文件都在这里 + ├─ docker-compose.local.yml # 本地三服务编排(本说明对应文件) + ├─ Dockerfile.local # 本地 .NET 6 多阶段构建(host / migrator 两个目标) + ├─ Dockerfile.local.dockerignore # 本地构建忽略表(覆盖根目录 .dockerignore) + ├─ appsettings.local.json # 绕过 Nacos 的完整本地配置(覆盖进镜像) + └─ docker-compose-local-dev.md # 本说明文档 ``` diff --git a/docs/AML_Backend/docker-compose本地开发/docker-compose.local.yml b/docs/AML_Backend/docker-compose-local-dev/docker-compose.local.yml similarity index 59% rename from docs/AML_Backend/docker-compose本地开发/docker-compose.local.yml rename to docs/AML_Backend/docker-compose-local-dev/docker-compose.local.yml index ece213b..7319094 100644 --- a/docs/AML_Backend/docker-compose本地开发/docker-compose.local.yml +++ b/docs/AML_Backend/docker-compose-local-dev/docker-compose.local.yml @@ -33,10 +33,33 @@ services: retries: 30 start_period: 60s + rabbitmq: + image: rabbitmq:3.13-management # has native arm64, no platform override needed + container_name: aml-rabbitmq + environment: + # Match RabbitMQConfig in appsettings.local.json (user/pass/vhost). + RABBITMQ_DEFAULT_USER: "admin" + RABBITMQ_DEFAULT_PASS: "123456" + RABBITMQ_DEFAULT_VHOST: "bthost" + ports: + # Host ports are shifted to avoid clashing with any other local RabbitMQ + # (e.g. a general dev-infra broker already on 5672/15672). The API talks to + # this broker over the compose network via internal port 5672 regardless. + - "5673:5672" # AMQP (host 5673 -> container 5672) + - "15673:15672" # management UI (http://localhost:15673 admin/123456) + healthcheck: + test: ["CMD", "rabbitmq-diagnostics", "-q", "ping"] + interval: 10s + timeout: 5s + retries: 20 + start_period: 30s + db-migrator: build: - context: . - dockerfile: Dockerfile.local + # Context is the AML_Backend repo root (one level up); this compose file and + # the Dockerfile live in docker-compose-local-dev/. + context: .. + dockerfile: docker-compose-local-dev/Dockerfile.local target: migrator image: aml-dbmigrator:local container_name: aml-dbmigrator @@ -50,14 +73,16 @@ services: httpapi-host: build: - context: . - dockerfile: Dockerfile.local + context: .. + dockerfile: docker-compose-local-dev/Dockerfile.local target: host image: aml-httpapi-host:local container_name: aml-httpapi-host depends_on: mssql: condition: service_healthy + rabbitmq: + condition: service_healthy db-migrator: condition: service_completed_successfully ports: @@ -75,11 +100,15 @@ services: App__SelfUrl: "http://localhost:44331" AuthServer__Authority: "http://localhost:44331" AuthServer__RequireHttpsMetadata: "false" - # Silence integrations that point at unreachable infra in local dev. - AppConfig__RabbitMQConfig__EnableConsumer: "false" - AppConfig__RabbitMQConfig__HostName: "127.0.0.1" + # RabbitMQ: use the bundled broker service and run the background consumer. + AppConfig__RabbitMQConfig__HostName: "rabbitmq" + AppConfig__RabbitMQConfig__EnableConsumer: "true" + # iCS is a separate iCON service (not in this repo). Point at the shared stag + # instance so document/survey/engine features work without running iCS locally. + # (Requires the iCS credentials in appsettings.local.json to be valid on stag.) + AppConfig__iCS__iCSRootUrl: "https://stag-abp-api.iconsz.com/" + # Still unavailable locally: Elasticsearch-backed sanction sync. AppConfig__JobConfig__SanctionJob__Enabled: "false" - AppConfig__JobConfig__EngineListSyncJob__Enabled: "false" restart: unless-stopped volumes: