fix version 1

This commit is contained in:
2026-09-22 21:15:34 +08:00
parent 9f86366638
commit d63d7e8b3a
277 changed files with 9959 additions and 1514 deletions

View File

@@ -1,6 +1,7 @@
package config
import (
"log"
"net"
"git.apinb.com/bsm-sdk/core/conf"
@@ -82,6 +83,16 @@ func New(srvKey string) {
// 配置校验 服务名称地址及监听地址不能为空
conf.NotNil(Spec.Service, Spec.Cache)
// 数据库配置缺失时 with.Databases 会直接 panic这里提前给出明确错误
if Spec.Databases == nil || len(Spec.Databases.Source) == 0 {
log.Fatalln("ERROR: Databases Not Nil")
}
// 渠道与钱包配置缺失会导致下单时解引用空指针,这里提前拦截
if Spec.WeChat == nil || Spec.Alipay == nil || Spec.Wallet == nil {
log.Fatalln("ERROR: WeChat/Alipay/Wallet Config Not Nil")
}
// 初始化加密SecretKey
encipher.New(env.Runtime.JwtSecretKey)