xialei 1 год назад
Родитель
Сommit
84b12f72bd
1 измененных файлов с 7 добавлено и 1 удалено
  1. 7 1
      app/common/repositories/store/product/ProductRepository.php

+ 7 - 1
app/common/repositories/store/product/ProductRepository.php

@@ -2043,7 +2043,13 @@ class ProductRepository extends BaseRepository
2043 2043
     // 供应链商品上下架
2044 2044
     public function changeStatus($ids, $is_show)
2045 2045
     {
2046
-        $data = ['is_show' => $is_show, 'is_status' => 1];
2046
+    
2047
+        if ($is_show == 1) {
2048
+            $data = ['is_show' => $is_show, 'is_status' => 0];
2049
+        } else {
2050
+            $data = ['is_show' => $is_show, 'is_status' => 1];
2051
+        }
2052
+
2047 2053
         $this->dao->updates($ids, $data);
2048 2054
 
2049 2055
         foreach ($ids as $id) {