Commit 0c9a5e64 authored by duanjinfei's avatar duanjinfei

change insert data log

parent c5c479b2
......@@ -60,12 +60,12 @@ func LotteryContractHandler(vLog types.Log) error {
Hash: txHash,
SortBy: txHash[len(txHash)-6:],
}
log.Info("Insert data lottery:", lottery)
o := orm.NewOrm()
exist := o.QueryTable("lottery").Filter("hash", lottery.Hash).Exist()
if exist {
break
}
log.Info("Insert data lottery:", lottery)
_, err = o.Insert(lottery)
if err != nil {
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