diff --git a/consume/egg_energy_team_assistance_consume_test.go b/consume/egg_energy_team_assistance_consume_test.go new file mode 100644 index 0000000..605b694 --- /dev/null +++ b/consume/egg_energy_team_assistance_consume_test.go @@ -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) +} diff --git a/etc/cfg.yml b/etc/cfg.yml index a1c3373..cae636e 100644 --- a/etc/cfg.yml +++ b/etc/cfg.yml @@ -81,16 +81,16 @@ log: file_name: 'debug.log' # 连接RabbitMq -#mq: -# host: '120.77.153.180' -# port: '15672' -# user: 'guest' -# pwd: 'guest' mq: - host: '116.62.62.35' + host: '120.77.153.180' port: '5672' - user: 'zhios' - pwd: 'ZHIoscnfnuo123' + user: 'guest' + pwd: 'guest' +#mq: +# host: '116.62.62.35' +# port: '5672' +# user: 'zhios' +# pwd: 'ZHIoscnfnuo123' #es: # url: 'http://120.55.48.175:9200' diff --git a/go.mod b/go.mod index a22ebaa..d79ffcf 100644 --- a/go.mod +++ b/go.mod @@ -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.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/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