Commit 870816af authored by szh's avatar szh

update insert new addr

parent b44b26ff
......@@ -229,13 +229,18 @@ func UploadInfo(KP map[string]string) error {
}
func convertAccountList(accstr string) error {
logging.Debug("accountstr", accstr)
accountList := make([]*models.RaspAddrAccounts, 0)
err := json.Unmarshal([]byte(accstr), &accountList)
if err != nil {
logging.Error("convertAccountList", "err", err)
return err
}
logging.Debug("accountlist", len(accountList))
for _, v := range accountList {
if v == nil {
continue
}
v.Balance = v.Balance / 1e8
v.Frozen = v.Frozen / 1e8
err = models.InsertNewAccounts(v)
......
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