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: 17, Uid: 2, AssistanceValue: 100, SignStart: "2024-12-20 08:00:00", SignEnd: "2024-12-21 08:00:00", }, md2.EggEnergyTeamAssistance) }