This commit is contained in:
2026-07-21 15:53:29 +08:00
parent 024b6614ba
commit c943f575d5
40 changed files with 5362 additions and 275 deletions

View File

@@ -28,6 +28,7 @@ type Config struct {
App AppConfig `mapstructure:"app"`
WechatWork WechatWorkConfig `mapstructure:"wechat_work"`
Esign EsignConfig `mapstructure:"esign"`
Fadada FadadaConfig `mapstructure:"fadada"`
Wallet WalletConfig `mapstructure:"wallet"`
WestDex WestDexConfig `mapstructure:"westdex"`
Zhicha ZhichaConfig `mapstructure:"zhicha"`
@@ -388,6 +389,41 @@ type SignConfig struct {
RedirectURL string `mapstructure:"redirect_url"` // 重定向URL
}
// FadadaConfig 法大大FASC OpenAPI配置
type FadadaConfig struct {
AppID string `mapstructure:"app_id"` // 应用ID
AppSecret string `mapstructure:"app_secret"` // 应用密钥
ServerURL string `mapstructure:"server_url"` // 服务器URL
OpenCorpID string `mapstructure:"open_corp_id"` // 接入方海宇在法大大侧企业ID
NoAuthSceneCode string `mapstructure:"no_auth_scene_code"` // 免验证签场景码(仅 freeSignType=business 时用;当前为 template 可留空)
TemplateID string `mapstructure:"template_id"` // 模板ID
PartyAActorID string `mapstructure:"party_a_actor_id"` // 签署模板甲方参与方标识actorId
PartyBActorID string `mapstructure:"party_b_actor_id"` // 签署模板乙方参与方标识actorId
TemplateDocID string `mapstructure:"template_doc_id"` // 签署模板文档 docId填单用
TemplateFields FadadaTemplateFields `mapstructure:"template_fields"` // 模板控件编码
Contract ContractConfig `mapstructure:"contract"` // 合同配置
Auth AuthConfig `mapstructure:"auth"` // 认证配置
Sign SignConfig `mapstructure:"sign"` // 签署配置
Callback CallbackConfig `mapstructure:"callback"` // 回调配置
}
// FadadaTemplateFields 法大大合作协议模板控件 fieldId
type FadadaTemplateFields struct {
AgreementNo []string `mapstructure:"agreement_no"` // 协议编号(多控件同值)
ContractDate string `mapstructure:"contract_date"` // 签订日期
PartyAName []string `mapstructure:"party_a_name"` // 甲方企业名(多控件同值)
PartyAUSCC string `mapstructure:"party_a_uscc"` // 甲方统一信用代码
PartyAAddress string `mapstructure:"party_a_address"` // 甲方联系地址
PartyARep string `mapstructure:"party_a_rep"` // 甲方授权代表/法人
PartyASignDate string `mapstructure:"party_a_sign_date"` // 甲方签署日期(签署控件,可空)
PartyBSignDate string `mapstructure:"party_b_sign_date"` // 乙方签署日期(签署控件,可空)
}
// CallbackConfig 第三方回调配置
type CallbackConfig struct {
Enabled bool `mapstructure:"enabled"`
}
// WalletConfig 钱包配置
type WalletConfig struct {
DefaultCreditLimit float64 `mapstructure:"default_credit_limit"`
@@ -669,10 +705,10 @@ type TianyuanapiConfig struct {
// TianyuanapiLoggingConfig 天远 API 日志配置
type TianyuanapiLoggingConfig struct {
Enabled bool `mapstructure:"enabled"`
LogDir string `mapstructure:"log_dir"`
UseDaily bool `mapstructure:"use_daily"`
EnableLevelSeparation bool `mapstructure:"enable_level_separation"`
Enabled bool `mapstructure:"enabled"`
LogDir string `mapstructure:"log_dir"`
UseDaily bool `mapstructure:"use_daily"`
EnableLevelSeparation bool `mapstructure:"enable_level_separation"`
LevelConfigs map[string]TianyuanapiLevelFileConfig `mapstructure:"level_configs"`
}
@@ -740,28 +776,28 @@ type NuoerLevelFileConfig struct {
// HuiboConfig 汇博配置
type HuiboConfig struct {
URL string `mapstructure:"url"`
AppID string `mapstructure:"app_id"`
AppKey string `mapstructure:"app_key"`
XOrderCode string `mapstructure:"x_order_code"`
SecretID string `mapstructure:"secret_id"`
AESKey string `mapstructure:"aes_key"`
WorkOrderCode string `mapstructure:"work_order_code"`
ProductCode string `mapstructure:"product_code"`
BaseURL2 string `mapstructure:"baseUrl2"`
AppCode2 string `mapstructure:"app_code2"`
AuthPDFStorageDir string `mapstructure:"auth_pdf_storage_dir"`
URL string `mapstructure:"url"`
AppID string `mapstructure:"app_id"`
AppKey string `mapstructure:"app_key"`
XOrderCode string `mapstructure:"x_order_code"`
SecretID string `mapstructure:"secret_id"`
AESKey string `mapstructure:"aes_key"`
WorkOrderCode string `mapstructure:"work_order_code"`
ProductCode string `mapstructure:"product_code"`
BaseURL2 string `mapstructure:"baseUrl2"`
AppCode2 string `mapstructure:"app_code2"`
AuthPDFStorageDir string `mapstructure:"auth_pdf_storage_dir"`
Logging HuiboLoggingConfig `mapstructure:"logging"`
}
// HuiboLoggingConfig 汇博日志配置
type HuiboLoggingConfig struct {
Enabled bool `mapstructure:"enabled"`
LogDir string `mapstructure:"log_dir"`
ServiceName string `mapstructure:"service_name"`
UseDaily bool `mapstructure:"use_daily"`
EnableLevelSeparation bool `mapstructure:"enable_level_separation"`
Enabled bool `mapstructure:"enabled"`
LogDir string `mapstructure:"log_dir"`
ServiceName string `mapstructure:"service_name"`
UseDaily bool `mapstructure:"use_daily"`
EnableLevelSeparation bool `mapstructure:"enable_level_separation"`
LevelConfigs map[string]HuiboLevelFileConfig `mapstructure:"level_configs"`
}