Ver a proveniência

syscfg

master
huangjiajun há 1 semana
ascendente
cometimento
8330c86235
6 ficheiros alterados com 36 adições e 1 eliminações
  1. +7
    -0
      consume/aliyun_sms_record_consume.go
  2. +7
    -0
      consume/egg_fin_withdraw_apply_consume.go
  3. +7
    -0
      consume/jpush_record_consume.go
  4. +7
    -0
      consume/playlet_reward_consume.go
  5. +7
    -0
      consume/video_reward_consume.go
  6. +1
    -1
      go.mod

+ 7
- 0
consume/aliyun_sms_record_consume.go Ver ficheiro

@@ -3,6 +3,7 @@ package consume
import (
"applet/app/cfg"
"applet/app/db"
"code.fnuoos.com/EggPlanet/egg_models.git/src/dao"
"code.fnuoos.com/EggPlanet/egg_system_rules.git"

utils2 "applet/app/utils"
@@ -77,6 +78,12 @@ func handleAliyunSmsRecordConsume(msgData []byte) error {
engine := db.Db
redisConn := cache.GetPool().Get()
sysCfgDb := implement.NewSysCfgDb(engine, redisConn)
defer func(sysCfgDb dao.SysCfgDao) {
err := sysCfgDb.Close()
if err != nil {
logx.Error("redis close err:" + err.Error()) // 记录错误信息
}
}(sysCfgDb)
aliyunSmsId := sysCfgDb.SysCfgGetWithDb("aliyun_sms_id")
aliyunSmsSecret := sysCfgDb.SysCfgGetWithDb("aliyun_sms_secret")
aliyunSmsSignName := sysCfgDb.SysCfgGetWithDb("aliyun_sms_sign_name")


+ 7
- 0
consume/egg_fin_withdraw_apply_consume.go Ver ficheiro

@@ -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,


+ 7
- 0
consume/jpush_record_consume.go Ver ficheiro

@@ -3,6 +3,7 @@ package consume
import (
"applet/app/cfg"
"applet/app/db"
"code.fnuoos.com/EggPlanet/egg_models.git/src/dao"

utils2 "applet/app/utils"
"applet/app/utils/cache"
@@ -78,6 +79,12 @@ func handleJpushRecordConsume(msgData []byte) error {
engine := db.Db
redisConn := cache.GetPool().Get()
sysCfgDb := implement.NewSysCfgDb(engine, redisConn)
defer func(sysCfgDb dao.SysCfgDao) {
err := sysCfgDb.Close()
if err != nil {
logx.Error("redis close err:" + err.Error()) // 记录错误信息
}
}(sysCfgDb)
jpushKey := sysCfgDb.SysCfgGetWithDb("jpush_key")
jpushSecret := sysCfgDb.SysCfgGetWithDb("jpush_secret")
if msg.Target == "0" { //广播全部


+ 7
- 0
consume/playlet_reward_consume.go Ver ficheiro

@@ -5,6 +5,7 @@ import (
"applet/app/db"
"applet/app/e"
utils2 "applet/app/utils"
"code.fnuoos.com/EggPlanet/egg_models.git/src/dao"
"code.fnuoos.com/EggPlanet/egg_system_rules.git"
"code.fnuoos.com/EggPlanet/egg_system_rules.git/enum"
md2 "code.fnuoos.com/EggPlanet/egg_system_rules.git/rule/egg_energy/md"
@@ -89,6 +90,12 @@ func handlePlayletRewardConsume(ch *rabbit.Channel, msgData []byte) error {
eg := db.Db
redisConn := cache.GetPool().Get()
sysCfgDb := implement.NewSysCfgDb(eg, redisConn)
defer func(sysCfgDb dao.SysCfgDao) {
err := sysCfgDb.Close()
if err != nil {
logx.Error("redis close err:" + err.Error()) // 记录错误信息
}
}(sysCfgDb)
playletBase := sysCfgDb.SysCfgGetWithDb("playlet_base")
sess := eg.NewSession()
defer sess.Close()


+ 7
- 0
consume/video_reward_consume.go Ver ficheiro

@@ -8,6 +8,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"
@@ -88,6 +89,12 @@ func handleVideoRewardConsume(ch *rabbit.Channel, msgData []byte) error {
eg := db.Db
redisConn := cache.GetPool().Get()
sysCfgDb := implement.NewSysCfgDb(eg, redisConn)
defer func(sysCfgDb dao.SysCfgDao) {
err := sysCfgDb.Close()
if err != nil {
logx.Error("redis close err:" + err.Error()) // 记录错误信息
}
}(sysCfgDb)
videoBase := sysCfgDb.SysCfgGetWithDb("video_base")
sess := eg.NewSession()
defer sess.Close()


+ 1
- 1
go.mod Ver ficheiro

@@ -7,7 +7,7 @@ go 1.19
// replace code.fnuoos.com/EggPlanet/egg_system_rules.git => E:/company/Egg/egg_system_rules

require (
code.fnuoos.com/EggPlanet/egg_models.git v0.2.1-0.20241210121211-81406596ad48
code.fnuoos.com/EggPlanet/egg_models.git v0.2.1-0.20241211055111-7c47b67b46d2
code.fnuoos.com/EggPlanet/egg_system_rules.git v0.0.4-0.20241210121337-7d0f83ee12bc
code.fnuoos.com/go_rely_warehouse/zyos_go_es.git v1.0.1-0.20241118083738-0f22da9ba0be
code.fnuoos.com/go_rely_warehouse/zyos_go_mq.git v0.0.5


Carregando…
Cancelar
Guardar