Commit 9c406110 by haojie

1

parent 299876bb
......@@ -23,6 +23,7 @@ public function toBuy($address, $hash, $id, $invite_code, $Invitees_box_id)
$price = BlindBoxList::query()->where('id', $id)->first(['price']);
# 检查提交的盲盒id是否存在
$box_id_item = BlindBoxList::query()->where('id', $Invitees_box_id)->first(['id']);
if ($price) {
# 判断是否存在邀请人
if ($invite_code && $box_id_item) {
# 是分享的链接
......@@ -45,14 +46,15 @@ public function toBuy($address, $hash, $id, $invite_code, $Invitees_box_id)
# 创建订单
UserWallet::query()->create(['user_address' => $address, 'status' => 0, 'price' => $price->price, 'blind_box_id' => $id, 'hash' => $hash]);
}
$address = SetAddress::query()->first();
$to = $address->address;
# 添加订单后
# 异步检查到账情况
dispatch(new CheckArrival($hash, $price->price, $address, $to));
return true;
} else {
return false;
}
}
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment