更新报错

This commit is contained in:
shengchanzhe 2023-12-13 17:49:04 +08:00
parent bc548f2afa
commit d859876f71

View File

@ -321,7 +321,7 @@ class ProductRepository extends BaseRepository
}
app()->make(SpuRepository::class)->changeStatus($id, $productType);
Db::commit();
return $res;
return true;
} catch (\Exception $e) {
Db::rollback();
return false;
@ -541,7 +541,7 @@ class ProductRepository extends BaseRepository
{
$result = [];
foreach ($data as $value) {
if ($value['category']) {
if (is_int($value)||$value['category']) {
$result[] = [
'product_id' => $productId,
'mer_cate_id' => $value,