This commit is contained in:
songliang 2023-07-15 16:24:54 +08:00
parent 1ac67a6007
commit d46d156bdf
4 changed files with 39 additions and 34 deletions

View File

@ -126,13 +126,13 @@
| 参数名 | 类型 |必填 | 说明 |
| ----------- | ------- | ---- | ------------------------------------------------- |
| tokenId | string | 是 | google or apple |
| owner | string | 是 | 订单表,一次返回多个 |
| nftToken | string | 是 | 签名 |
| amount | string | 是 | 签名 |
| orderId | string | 是 | 签名 |
| currency | string | 是 | 签名 |
| price | string | 是 | 签名 |
| tokenId | string | 是 | tokenId |
| owner | string | 是 | 商品持有者 |
| nftToken | string | 是 | nftToken |
| amount | string | 是 | 数量 |
| orderId | string | 是 | 链上订单id |
| currency | string | 是 | 交易所需币种 |
| price | string | 是 | 出售价格 |
返回说明:
@ -151,9 +151,9 @@
| 参数名 | 类型 |必填 | 说明 |
| ----------- | ------- | ---- | ------------------------------------------------- |
| orderId | string | 是 | google or apple |
| nftToken | array | 是 | 订单表,一次返回多个 |
| tokenId | string | 是 | 签名 |
| orderId | string | 是 | 链上订单id |
| nftToken | string | 是 | nftToken |
| tokenId | string | 是 | tokenId |
返回说明:
@ -172,11 +172,11 @@
| 参数名 | 类型 |必填 | 说明 |
| ----------- | ------- | ---- | ------------------------------------------------- |
| orderId | string | 是 | google or apple |
| nftToken | array | 是 | 订单表,一次返回多个 |
| tokenId | string | 是 | 签名 |
| priceOld | string | 是 | 签名 |
| price | string | 是 | 签名 |
| orderId | string | 是 | 链上订单id |
| nftToken | string | 是 | notToken |
| tokenId | string | 是 | tokenId |
| priceOld | string | 是 | 原价格 |
| price | string | 是 | 更新价格 |
返回说明:
@ -195,14 +195,14 @@
| 参数名 | 类型 | 必填 | 说明 |
| ----------- | ------- | ---- | ------------------------------------------------- |
| tokenId | string | 是 | 签名 |
| orderId | string | 是 | 签名 |
| nftToken | string | 是 | 签名 |
| amount | string | 是 | 签名 |
| seller | string | 是 | 签名 |
| buyer | string | 是 | 签名 |
| crc20 | string | 是 | 签名 |
| price | string | 是 | 签名 |
| tokenId | string | 是 | tokenId |
| orderId | string | 是 | 链上订单id |
| nftToken | string | 是 | nftToken |
| amount | string | 是 | 数量 |
| seller | string | 是 | 卖家地址>> |
| buyer | string | 是 | 买家地址<< |
| crc20 | string | 是 | crc20 |
| price | string | 是 | 价格 |
返回说明:

View File

@ -46,7 +46,7 @@ class MarketBuyOrderOk extends MarketCallbackBase
$conn = myself()->_getMysql('');
// 1. check order status
$chk = SqlHelper::selectOne($conn, 't_market_store', array('status', 'idx', 'c_name', 'token_type'), array('o_link' => $o_link));
$chk = SqlHelper::selectOne($conn, 't_market_store', array('status', 'idx', 'c_name', 'token_type'), array('o_link' => $o_link, 'status' => 0));
if (empty($chk)) {
$this->_rspErr(2, 'not found order, o_link=' . $o_link);
return;
@ -79,7 +79,12 @@ class MarketBuyOrderOk extends MarketCallbackBase
$this->_rspOk();
return;
}
}
else {
// 操作失败,暂时视为未找到订单
$this->_rspErr(2, 'order status error, o_link=' . $o_link);
return;
}
}
}
}

View File

@ -32,8 +32,8 @@ class MarketCancelOrderOk extends MarketCallbackBase
$o_link = $orderId;
$conn = myself()->_getMysql('');
// 1. check order status
$chk = SqlHelper::selectOne($conn, 't_market_store', array('status'), array('o_link' => $o_link));
// 检查订单是否在销售中,并且没有人购买
$chk = SqlHelper::selectOne($conn, 't_market_store', array('status'), array('o_link' => $o_link, 'status' => 0));
if (empty($chk)) {
$this->_rspErr(2, 'not found order, o_link=' . $o_link);
return;
@ -55,6 +55,5 @@ class MarketCancelOrderOk extends MarketCallbackBase
return;
}
}
$this->_rspErr(2, 'order status error, o_link=' . $o_link);
}
}

View File

@ -37,7 +37,7 @@ class MarketPriceUpdateOrderOk extends MarketCallbackBase
$conn = myself()->_getMysql('');
// 订单没找到
$chk = SqlHelper::selectOne($conn, 't_market_store', array('status'), array('o_link' => $o_link));
$chk = SqlHelper::selectOne($conn, 't_market_store', array('status'), array('o_link' => $o_link, 'status' => 0, 's_price' => $priceOld));
if (empty($chk)) {
$this->_rspErr(2, 'not found order, o_link=' . $o_link);
return;
@ -57,9 +57,10 @@ class MarketPriceUpdateOrderOk extends MarketCallbackBase
if ($r) {
$this->_rspOk();
return;
} else {
$this->_rspErr(2, 'not found order, o_link=' . $o_link);
return;
}
}
// 更新价格失败,视作订单未找到
$this->_rspErr(2, 'price update failed, o_link=' . $o_link);
}
}