|
|
@@ -52,6 +52,7 @@ class ProductController extends BaseController
|
|
|
}
|
|
|
}
|
|
|
$where['shopId'] = $shopId;
|
|
|
+ $where['delStatus'] = 0;
|
|
|
|
|
|
$itemInfoData = ProductClass::getAllByCondition($where, ['actualSold'=>SORT_DESC,'inTurn'=>SORT_DESC], "*");
|
|
|
$itemInfoData = ProductClass::groupProductInfo($itemInfoData);
|
|
|
@@ -207,8 +208,18 @@ class ProductController extends BaseController
|
|
|
if (empty($data) || empty($type)) {
|
|
|
util::fail("参数错误");
|
|
|
}
|
|
|
- if (in_array($type, ['inTurn', 'addPrice', 'cost', 'weight', 'ratio']))
|
|
|
+ if (in_array($type, ['inTurn', 'addPrice', 'cost', 'weight', 'ratio','delStatus'])){
|
|
|
$data = json_decode($data, true);
|
|
|
+ }
|
|
|
+ foreach ($data as $v) {
|
|
|
+ if($type=='delStatus'){
|
|
|
+ $val = $v[$type] ?? '';
|
|
|
+ if(!in_array($val,[0,1])){
|
|
|
+ util::fail("参数错误");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
foreach ($data as $v) {
|
|
|
$id = $v['id'];
|
|
|
$val = $v[$type] ?? '';
|