模型功能完善
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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('模型列表未定义');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user