@@ -0,0 +1,42 @@ | |||||
package consume | |||||
import ( | |||||
"applet/app/cfg" | |||||
"applet/app/db" | |||||
md2 "code.fnuoos.com/EggPlanet/egg_system_rules.git/rule/egg_energy/md" | |||||
"code.fnuoos.com/go_rely_warehouse/zyos_go_mq.git/rabbit" | |||||
"fmt" | |||||
"testing" | |||||
) | |||||
func TestEggEnergyTeamAssistanceConsume(t *testing.T) { | |||||
dbcfg := cfg.DBCfg{ | |||||
Host: "119.23.182.117:3306", | |||||
Name: "egg", | |||||
User: "root", | |||||
Psw: "Fnuo123com@", | |||||
ShowLog: true, | |||||
MaxLifetime: 30, | |||||
MaxOpenConns: 100, | |||||
MaxIdleConns: 100, | |||||
Path: "tmp/%s.log", | |||||
} | |||||
db.InitDB(&dbcfg) | |||||
err := rabbit.Init("120.77.153.180", "5672", "guest", "guest") | |||||
if err != nil { | |||||
return | |||||
} | |||||
ch, err := rabbit.Cfg.Pool.GetChannel() | |||||
if err != nil { | |||||
fmt.Println("DealFundDataGetRabbitChannel_ERR:::::", err.Error()) | |||||
return | |||||
} | |||||
defer ch.Release() | |||||
ch.Publish(md2.EggEnergyExchange, md2.EggEnergyTeamAssistanceReq{ | |||||
AssistanceUid: 27, | |||||
Uid: 16, | |||||
AssistanceValue: 100, | |||||
SignStart: "2024-12-19 08:00:00", | |||||
SignEnd: "2024-12-20 08:00:00", | |||||
}, md2.EggEnergyTeamAssistance) | |||||
} |
@@ -81,16 +81,16 @@ log: | |||||
file_name: 'debug.log' | file_name: 'debug.log' | ||||
# 连接RabbitMq | # 连接RabbitMq | ||||
#mq: | |||||
# host: '120.77.153.180' | |||||
# port: '15672' | |||||
# user: 'guest' | |||||
# pwd: 'guest' | |||||
mq: | mq: | ||||
host: '116.62.62.35' | |||||
host: '120.77.153.180' | |||||
port: '5672' | port: '5672' | ||||
user: 'zhios' | |||||
pwd: 'ZHIoscnfnuo123' | |||||
user: 'guest' | |||||
pwd: 'guest' | |||||
#mq: | |||||
# host: '116.62.62.35' | |||||
# port: '5672' | |||||
# user: 'zhios' | |||||
# pwd: 'ZHIoscnfnuo123' | |||||
#es: | #es: | ||||
# url: 'http://120.55.48.175:9200' | # url: 'http://120.55.48.175:9200' | ||||
@@ -7,7 +7,7 @@ go 1.19 | |||||
//replace code.fnuoos.com/EggPlanet/egg_system_rules.git => E:/company/Egg/egg_system_rules | //replace code.fnuoos.com/EggPlanet/egg_system_rules.git => E:/company/Egg/egg_system_rules | ||||
require ( | require ( | ||||
code.fnuoos.com/EggPlanet/egg_models.git v0.2.1-0.20241219064152-64f53e54701e | |||||
code.fnuoos.com/EggPlanet/egg_models.git v0.2.1-0.20241219065721-3ff292c78b75 | |||||
code.fnuoos.com/EggPlanet/egg_system_rules.git v0.0.4-0.20241219043645-3f6b3590ae75 | code.fnuoos.com/EggPlanet/egg_system_rules.git v0.0.4-0.20241219043645-3f6b3590ae75 | ||||
code.fnuoos.com/go_rely_warehouse/zyos_go_es.git v1.0.1-0.20241118083738-0f22da9ba0be | 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 | code.fnuoos.com/go_rely_warehouse/zyos_go_mq.git v0.0.5 | ||||