模型功能完善

This commit is contained in:
2017-06-19 10:56:18 +08:00
parent 0b4855605e
commit d8feb066ea
5 changed files with 25 additions and 61 deletions

View File

@@ -139,7 +139,7 @@ class Content extends Admin {
}
$map['id'] = array('IN', $id);
$result = $this->model->del($map);
$result = $this->model->where($map)->delete();
if (false !== $result) {
return $this->success("删除成功!");
@@ -202,6 +202,8 @@ class Content extends Admin {
foreach ($rows as $key => $value) {
$fields[$field_group[$value['group_id']]][] = $value;
}
}else{
$fields = array();
}
return $fields;
}

View File

@@ -138,9 +138,6 @@ class Model extends Admin {
}
$model = $this->model->where($map)->find();
if ($model['table_status'] != 1 && $data['status'] == 1) {
return $this->error('数据表未创建或更新');
}
if ($model['list_grid'] == '' && $data['status'] == 1) {
return $this->error('模型列表未定义');
}