Commit d5c9607d authored by hujun's avatar hujun

批量操作

parent f44defd7
......@@ -318,7 +318,13 @@ class Cost extends Basic
}
$service = new CostService();
if (isset($params['id_array'])) {
$result = $service->checkArray($params, $this->userId);
} else {
$result = $service->check($params, $this->userId);
}
if ($result['status'] != 'fail') {
$code = 200;
}
......
......@@ -111,7 +111,7 @@ class CostService
$result['status'] = 'fail';
$result['msg'] = '';
if (count($params['id_array']) > 30) {
if (count($params['id_array']) > 30 || empty($params['id_array'])) {
$result['msg'] = '批量操作数量超过限制';
return $result;
}
......
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