本文整理汇总了Golang中admin/app/models.User_Group.Priceyear方法的典型用法代码示例。如果您正苦于以下问题:Golang User_Group.Priceyear方法的具体用法?Golang User_Group.Priceyear怎么用?Golang User_Group.Priceyear使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类admin/app/models.User_Group
的用法示例。
在下文中一共展示了User_Group.Priceyear方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Golang代码示例。
示例1: Add
//.........这里部分代码省略.........
if err != nil {
revel.WARN.Println(err)
}
user_group.Allowupgrade = Allowupgrade
var allowsendmessage string = c.Params.Get("allowsendmessage")
Allowsendmessage, err := strconv.ParseInt(allowsendmessage, 10, 64)
if err != nil {
revel.WARN.Println(err)
}
user_group.Allowsendmessage = Allowsendmessage
var allowattachment string = c.Params.Get("allowattachment")
Allowattachment, err := strconv.ParseInt(allowattachment, 10, 64)
if err != nil {
revel.WARN.Println(err)
}
user_group.Allowattachment = Allowattachment
var allowsearch string = c.Params.Get("allowsearch")
Allowsearch, err := strconv.ParseInt(allowsearch, 10, 64)
if err != nil {
revel.WARN.Println(err)
}
user_group.Allowsearch = Allowsearch
var priceday string = c.Params.Get("priceday")
Priceday, err := strconv.ParseFloat(priceday, 64)
if err != nil {
revel.WARN.Println(err)
}
user_group.Priceday = Priceday
var pricemonth string = c.Params.Get("pricemonth")
Pricemonth, err := strconv.ParseFloat(pricemonth, 64)
if err != nil {
revel.WARN.Println(err)
}
user_group.Pricemonth = Pricemonth
var priceyear string = c.Params.Get("priceyear")
Priceyear, err := strconv.ParseFloat(priceyear, 64)
if err != nil {
revel.WARN.Println(err)
}
user_group.Priceyear = Priceyear
var allowmessage string = c.Params.Get("allowmessage")
if len(allowmessage) <= 0 {
data["status"] = "0"
data["message"] = "请输入最大短消息数!"
return c.RenderJson(data)
} else {
Allowmessage, err := strconv.ParseInt(allowmessage, 10, 64)
if err != nil {
revel.WARN.Println(err)
}
user_group.Allowmessage = Allowmessage
}
var allowpostnum string = c.Params.Get("allowpostnum")
if len(allowpostnum) <= 0 {
data["status"] = "0"
data["message"] = "请输入日最大投稿数!"
return c.RenderJson(data)
} else {
Allowpostnum, err := strconv.ParseInt(allowpostnum, 10, 64)
if err != nil {
revel.WARN.Println(err)
}
user_group.Allowpostnum = Allowpostnum
}
var usernamecolor string = c.Params.Get("usernamecolor")
user_group.Usernamecolor = usernamecolor
var icon string = c.Params.Get("icon")
user_group.Icon = icon
var desc string = c.Params.Get("desc")
user_group.Desc = desc
var status string = c.Params.Get("status")
Status, err := strconv.ParseInt(status, 10, 64)
if err != nil {
revel.WARN.Println(err)
}
user_group.Status = Status
if user_group.Save() {
data["status"] = "1"
data["message"] = "添加成功!"
return c.RenderJson(data)
} else {
data["status"] = "0"
data["message"] = "添加失败!"
return c.RenderJson(data)
}
}
}