更新调试转售信息

This commit is contained in:
yaooo 2023-08-08 18:11:25 +08:00
parent c3f462cadd
commit 1bbe212c77
2 changed files with 3 additions and 1 deletions

View File

@ -556,6 +556,7 @@ class CommunityRepository extends BaseRepository
*/ */
public function resale($id, array $data) public function resale($id, array $data)
{ {
$insert = []; $insert = [];
foreach ($data as $value) { foreach ($data as $value) {
if (isset($value['id'])) { if (isset($value['id'])) {
@ -575,6 +576,7 @@ class CommunityRepository extends BaseRepository
if (($purchaseRecord['number'] - $purchaseRecord['sales_volume']) < $value['number']) { if (($purchaseRecord['number'] - $purchaseRecord['sales_volume']) < $value['number']) {
throw new ValidateException('库存不足'); throw new ValidateException('库存不足');
} }
if ($value) { if ($value) {
$insert[] = [ $insert[] = [
'community_id' => $id, 'community_id' => $id,

View File

@ -150,7 +150,7 @@ class paySuccessOrder
'order_sn' => $orderSn, 'order_sn' => $orderSn,
]; ];
$ch = curl_init(); $ch = curl_init();
curl_setopt($ch, CURLOPT_URL,$postUrl); curl_setopt($ch, CURLOPT_URL, $postUrl);
curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POST, 1);