Commit 8f8d082e authored by zhuwei's avatar zhuwei

1

parent 52fb38eb
...@@ -268,6 +268,7 @@ class CostParameter extends Basic ...@@ -268,6 +268,7 @@ class CostParameter extends Basic
if((isset($params['deduct'])) && ($params['deduct'] > 0)) if((isset($params['deduct'])) && ($params['deduct'] > 0))
$data['deduct'] = $params['deduct']; $data['deduct'] = $params['deduct'];
$res = $this->m_store_data->updateStoreData($data); $res = $this->m_store_data->updateStoreData($data);
return $res; return $res;
} }
...@@ -440,11 +441,11 @@ class CostParameter extends Basic ...@@ -440,11 +441,11 @@ class CostParameter extends Basic
if(!$params['id_discounts_json']) if(!$params['id_discounts_json'])
return $this->response("101", 'id_discounts_json不能为空'); return $this->response("101", 'id_discounts_json不能为空');
$id_value_json = json_decode($params['id_discounts_json'],true); $id_discounts_json = json_decode($params['id_discounts_json'],true);
foreach ($id_value_json as $k => $v) { foreach ($id_discounts_json as $k => $v) {
if((isset($v['id']) && $v['id']> 0) && (isset($v['discounts']) && in_array($v['discounts'], [0,1]))) if((isset($v['id']) && $v['id']> 0) && (isset($v['discounts']) && in_array($v['discounts'], [0,1])))
$f_params['is_discounts'] = $v['discounts']; $f_params['is_discounts'] = $v['discounts'];
$this->updateStoreData($v['id'], $f_params); $this->updateStoreData($v['id'], $f_params);
} }
return $this->response("200", "成功"); return $this->response("200", "成功");
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment