Browse Source

add 区块星链

tags/v2.1.5
DengBiao 2 years ago
parent
commit
6ae8f41661
1 changed files with 5 additions and 1 deletions
  1. +5
    -1
      db/db_block_star_chain.go

+ 5
- 1
db/db_block_star_chain.go View File

@@ -78,9 +78,13 @@ func BlockStarChainUpdate(session *xorm.Session, id interface{}, BlockStarChain
func BlockStarChainGetOneByParams(session *xorm.Session, params map[string]interface{}) (*model.BlockStarChain, error) {
var m model.BlockStarChain
var query = fmt.Sprintf("%s =?", params["key"])
if has, err := session.Where(query, params["value"]).Get(&m); err != nil || has == false {
has, err := session.Where(query, params["value"]).Get(&m)
if err != nil {
return nil, zhios_order_relate_logx.Error(err)
}
if has == false {
return nil, errors.New("未查询到相应的 block_star_chain 记录")
}
return &m, nil
}



Loading…
Cancel
Save