更新调试转售信息
This commit is contained in:
parent
c3f462cadd
commit
1bbe212c77
@ -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,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user