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 TestHandleEggFinWithdrawApplyDataConsume(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.EggAppExchange, md2.EggFinWithdrawApplyData{ Id: 1, Uid: 2, AdmId: 3, Amount: "10", RealAmount: "10", Fee: "4", Type: 1, WithdrawAccount: "3", WithdrawName: "2", Reason: 2, PaymentDate: "2", State: 2, WithdrawKind: 2, IsFirst: 2, Memo: "测试报错例子2", UpdateAt: "", CreateAt: "", }, md2.EggFinWithdrawApply) }