diff --git a/server/marketserver/api/v1/shopcart/shopcart.go b/server/marketserver/api/v1/shopcart/shopcart.go index c86211b8..2ff035df 100644 --- a/server/marketserver/api/v1/shopcart/shopcart.go +++ b/server/marketserver/api/v1/shopcart/shopcart.go @@ -151,6 +151,30 @@ func (this *ShopCartApi) Add(c *gin.Context) { p.AddTime = q5.ToInt32(f5.GetApp().GetRealSeconds()) dirty = true; } else { + var err1 error + f5.GetGoStyleDb().OrmSelectOne( + constant.BCNFT_DB, + "t_order", + [][]string{ + {"net_id", q5.ToString(netId)}, + {"contract_address", contractAddress}, + {"token_id", tokenId}, + {"status", constant.ORDER_STATUS_ACTIVE}, + }, + func (err error, ds* f5.DataSet) { + err1 = err + if err == nil { + if ds.Next() { + } else { + } + } + }) + if err1 != nil { + rspObj.ErrCode = 500 + rspObj.ErrMsg = "server internal error" + c.JSON(200, rspObj) + return + } dirty = true; } }