Pārlūkot izejas kodu

add 区块星链

tags/v2.1.5
DengBiao pirms 2 gadiem
vecāks
revīzija
6ae8f41661
1 mainītis faili ar 5 papildinājumiem un 1 dzēšanām
  1. +5
    -1
      db/db_block_star_chain.go

+ 5
- 1
db/db_block_star_chain.go Parādīt failu

@@ -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
}



Notiek ielāde…
Atcelt
Saglabāt