public JsonResult GroupAdd(string GroupName, int ShowType) { PublicUserModel loginUser = this.GetLoginUser(); ShowType = ShowType == 0 ? 0 : 1; int code = groupBll.GroupAdd(GroupName, loginUser.UserID, ShowType); string msg = string.Empty; if (code == -1) { msg = "群组名已经存在"; } else if (code == -2) { msg = "最多只能创建3个群组"; } else if (code > 0) { msg = "创建成功"; } return(Json(new { code = code, msg = msg })); }