让七月迭代具备可直接部署的配置基线
补齐三套环境配置、测试环境部署门禁与 system_config 初始化,并按当前无企微应用的约束将企微凭据改为明文存储。 Constraint: 当前测试环境尚无企微应用及历史企微密文数据 Rejected: 使用启动环境变量加密企微凭据 | 用户明确要求直接明文保存并移除加密密钥 Confidence: high Scope-risk: moderate Directive: 企微真实闭环完成前保持两个旧审批入口开关为 true Tested: gofmt;git diff --check;bash -n;docker compose config;Gitea workflow YAML 解析;OpenAPI 重新生成 Not-tested: go test;常规 go build;LSP;实际数据库迁移;真实测试环境部署;企微真实联调
This commit is contained in:
@@ -317,13 +317,9 @@ func initWorkerRuntime(ctx context.Context, cfg *config.Config, appLogger *zap.L
|
||||
// registerWeComApprovalOutboxConsumer 注册企业微信审批提交和标准终态业务消费者。
|
||||
func registerWeComApprovalOutboxConsumer(runtime *workerRuntime, cfg *config.Config, appLogger *zap.Logger) {
|
||||
applicationRepository := wecomInfra.NewApplicationRepository(runtime.db)
|
||||
credentialCipher, err := wecomInfra.NewCredentialCipher(cfg.WeCom.CredentialEncryptionKey)
|
||||
if err != nil {
|
||||
appLogger.Warn("企业微信凭据加密密钥未配置或无效,审批提交将失败关闭", zap.Error(err))
|
||||
}
|
||||
integrationRepository := integrationlog.NewRepository(runtime.db)
|
||||
tokenProvider := wecomInfra.NewTokenProvider(
|
||||
applicationRepository, credentialCipher, runtime.redisClient, integrationRepository,
|
||||
applicationRepository, runtime.redisClient, integrationRepository,
|
||||
cfg.WeCom.BaseURL, cfg.WeCom.Timeout, appLogger,
|
||||
)
|
||||
consumer := wecomInfra.NewApprovalSubmissionConsumer(
|
||||
@@ -382,13 +378,9 @@ func registerWeComApprovalOutboxConsumer(runtime *workerRuntime, cfg *config.Con
|
||||
// registerWeComApprovalTasks 注册企微权威详情同步和主动恢复任务。
|
||||
func registerWeComApprovalTasks(mux *asynq.ServeMux, runtime *workerRuntime, cfg *config.Config, appLogger *zap.Logger) {
|
||||
applicationRepository := wecomInfra.NewApplicationRepository(runtime.db)
|
||||
credentialCipher, err := wecomInfra.NewCredentialCipher(cfg.WeCom.CredentialEncryptionKey)
|
||||
if err != nil {
|
||||
appLogger.Warn("企业微信凭据加密密钥未配置或无效,审批详情同步将失败关闭", zap.Error(err))
|
||||
}
|
||||
integrationRepository := integrationlog.NewRepository(runtime.db)
|
||||
tokenProvider := wecomInfra.NewTokenProvider(
|
||||
applicationRepository, credentialCipher, runtime.redisClient, integrationRepository,
|
||||
applicationRepository, runtime.redisClient, integrationRepository,
|
||||
cfg.WeCom.BaseURL, cfg.WeCom.Timeout, appLogger,
|
||||
)
|
||||
decisionSync := approvalApp.NewSyncDecisionService(
|
||||
|
||||
Reference in New Issue
Block a user