|
|
|
@ -440,9 +440,19 @@ class Api_SquirrelController extends Ctrl_Api{ |
|
|
|
|
$uid = empty($this->POST['uid'])?Tool_Fnc::apiMsg('请登录', '500'):$this->POST['uid']; |
|
|
|
|
$id = empty($this->POST['id'])?Tool_Fnc::apiMsg('幼崽信息获取失败', '500'):$this->POST['id']; |
|
|
|
|
if(!$this->NewSquirrelmodel->where("id={$id} and c_user_id={$uid}")->del()){ |
|
|
|
|
Tool_Fnc::apiMsg('删除失败', '1'); |
|
|
|
|
Tool_Fnc::apiMsg('删除失败', '500'); |
|
|
|
|
} |
|
|
|
|
Tool_Fnc::apiMsg('删除成功', '500'); |
|
|
|
|
Tool_Fnc::apiMsg('删除成功', '1'); |
|
|
|
|
} |
|
|
|
|
public function deletesAction(){ |
|
|
|
|
$uid = empty($this->POST['uid'])?Tool_Fnc::apiMsg('请登录', '500'):$this->POST['uid']; |
|
|
|
|
$id = empty($this->POST['id'])?Tool_Fnc::apiMsg('幼崽信息获取失败', '500'):$this->POST['id']; |
|
|
|
|
$id = implode(",",$id); |
|
|
|
|
$sql = "update {$this->Squirrelmodel->table} set is_delete=1 where id in ({$id}) and c_user_id={$uid}"; |
|
|
|
|
if(!$this->NewSquirrelmodel->exec($sql)){ |
|
|
|
|
Tool_Fnc::apiMsg('删除失败', '500'); |
|
|
|
|
} |
|
|
|
|
Tool_Fnc::apiMsg('删除成功', '1'); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|