示例#1
0
文件: user.go 项目: zacklin923/GoCMS
//删除
func (c *User) Delete(user *models.User) revel.Result {

	var ids string = c.Params.Get("ids")

	data := make(map[string]string)

	if len(ids) <= 0 {
		data["status"] = "0"
		data["message"] = "请至少选择一个!"
		return c.RenderJson(data)
	}

	if user.DelByIDS(ids) {
		data["status"] = "1"
		data["message"] = "删除成功!"
		return c.RenderJson(data)
	} else {
		data["status"] = "0"
		data["message"] = "删除失败!"
		return c.RenderJson(data)
	}
}