|
|
@@ -7,6 +7,7 @@ import ( |
|
|
|
"applet/app/utils/cache" |
|
|
|
"applet/app/utils/logx" |
|
|
|
"applet/consume/md" |
|
|
|
"code.fnuoos.com/EggPlanet/egg_models.git/src/dao" |
|
|
|
"code.fnuoos.com/EggPlanet/egg_models.git/src/implement" |
|
|
|
"code.fnuoos.com/EggPlanet/egg_models.git/src/model" |
|
|
|
"code.fnuoos.com/EggPlanet/egg_system_rules.git" |
|
|
@@ -158,6 +159,12 @@ type InitAlipayStruct struct { |
|
|
|
func InitAlipay(initData *InitAlipayStruct) (client *alipay.Client, err error) { |
|
|
|
if initData == nil { |
|
|
|
sysCfgDb := implement.NewSysCfgDb(db.Db, cache.GetPool().Get()) |
|
|
|
defer func(sysCfgDb dao.SysCfgDao) { |
|
|
|
err := sysCfgDb.Close() |
|
|
|
if err != nil { |
|
|
|
logx.Error("redis close err:" + err.Error()) // 记录错误信息 |
|
|
|
} |
|
|
|
}(sysCfgDb) |
|
|
|
sysCfgMap := sysCfgDb.SysCfgFindWithDb(enum.AlipayAppId, enum.AlipayPrivateKey, enum.AlipayPublicKey, enum.AlipayPublicContentRSA2, enum.AlipayRootContent, enum.AppPublicContent) |
|
|
|
initData = &InitAlipayStruct{ |
|
|
|
IsProd: true, |
|
|
|