|
@@ -80,12 +80,10 @@ class AuctionProc {
|
|
|
|
|
|
$buyoutPrice = $aucItem->buyoutPrice;
|
|
|
|
|
|
- my_Assert($aucItem->sellerid != req()->uid, "不能竞拍自己的拍品");
|
|
|
-
|
|
|
- $price = $buyoutPrice + intval($buyoutPrice * 0.05);
|
|
|
- my_Assert(req()->userInfo->game->baseInfo->cash >=$price, ErrCode::notenough_cash_msg);
|
|
|
+ my_Assert($aucItem->sellerid != req()->uid, "不能竞拍自己的拍品");
|
|
|
+ my_Assert(req()->userInfo->game->baseInfo->cash >= $buyoutPrice, ErrCode::notenough_cash_msg);
|
|
|
//扣除钻石--交易费用 + 手续费
|
|
|
- req()->userInfo->game->baseInfo->cash -= $price;
|
|
|
+ req()->userInfo->game->baseInfo->cash -= $buyoutPrice;
|
|
|
|
|
|
//更新表里的交易状态
|
|
|
$aucItem->result = "完成";
|
|
@@ -100,11 +98,12 @@ class AuctionProc {
|
|
|
$sList = explode(',', $aucItem->contents);
|
|
|
EmailProc::SendAuctionItemsMail(req()->zoneid, req()->uid, $sList[0], $sList[1]);
|
|
|
|
|
|
- EmailProc::SendAuctionCashMail(req()->zoneid,$aucItem->sellerid, $sList[0], 2, $buyoutPrice);//上架玩家给钻石邮件
|
|
|
+ EmailProc::SendAuctionCashMail(req()->zoneid,$aucItem->sellerid, $sList[0], 2, $buyoutPrice -intval($buyoutPrice * 0.05));//上架玩家给钻石邮件
|
|
|
|
|
|
UserProc::updateUserInfo(); # 回写玩家数据
|
|
|
return Resp::ok(array(
|
|
|
"auction" => $obj->data,
|
|
|
+ "cash"=>req()->userInfo->game->baseInfo->cash,
|
|
|
));
|
|
|
}
|
|
|
|