Commit 0c9a5e64 authored by duanjinfei's avatar duanjinfei

change insert data log

parent c5c479b2
...@@ -60,12 +60,12 @@ func LotteryContractHandler(vLog types.Log) error { ...@@ -60,12 +60,12 @@ func LotteryContractHandler(vLog types.Log) error {
Hash: txHash, Hash: txHash,
SortBy: txHash[len(txHash)-6:], SortBy: txHash[len(txHash)-6:],
} }
log.Info("Insert data lottery:", lottery)
o := orm.NewOrm() o := orm.NewOrm()
exist := o.QueryTable("lottery").Filter("hash", lottery.Hash).Exist() exist := o.QueryTable("lottery").Filter("hash", lottery.Hash).Exist()
if exist { if exist {
break break
} }
log.Info("Insert data lottery:", lottery)
_, err = o.Insert(lottery) _, err = o.Insert(lottery)
if err != nil { if err != nil {
logs.Error("Insert lottery error:", err.Error()) logs.Error("Insert lottery error:", err.Error())
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment