|
@@ -72,17 +72,17 @@ class GroupController extends BaseController
|
|
|
/**
|
|
/**
|
|
|
* 编辑分组
|
|
* 编辑分组
|
|
|
*
|
|
*
|
|
|
- * @param int $id 分组ID
|
|
|
|
|
|
|
+ * @param int $gr_id 分组ID
|
|
|
* @return mixed
|
|
* @return mixed
|
|
|
*/
|
|
*/
|
|
|
- public function edit($id)
|
|
|
|
|
|
|
+ public function edit($gr_id)
|
|
|
{
|
|
{
|
|
|
- if (!$id) {
|
|
|
|
|
|
|
+ if (!$gr_id) {
|
|
|
return json(['code' => -1, 'msg' => '参数错误']);
|
|
return json(['code' => -1, 'msg' => '参数错误']);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
$groupModel = new GroupModel();
|
|
$groupModel = new GroupModel();
|
|
|
- $group = $groupModel->find($id);
|
|
|
|
|
|
|
+ $group = $groupModel->find($gr_id);
|
|
|
if (!$group) {
|
|
if (!$group) {
|
|
|
return json(['code' => -1, 'msg' => '分组不存在']);
|
|
return json(['code' => -1, 'msg' => '分组不存在']);
|
|
|
}
|
|
}
|
|
@@ -100,7 +100,7 @@ class GroupController extends BaseController
|
|
|
'audit' => $status,
|
|
'audit' => $status,
|
|
|
];
|
|
];
|
|
|
|
|
|
|
|
- $result = $groupModel->edit($id, $data);
|
|
|
|
|
|
|
+ $result = $groupModel->edit($gr_id, $data);
|
|
|
|
|
|
|
|
if ($result) {
|
|
if ($result) {
|
|
|
return json(['code' => 0, 'msg' => '保存成功']);
|
|
return json(['code' => 0, 'msg' => '保存成功']);
|