本文整理匯總了Golang中One/Service/ProjectService.ProjectService類的典型用法代碼示例。如果您正苦於以下問題:Golang ProjectService類的具體用法?Golang ProjectService怎麽用?Golang ProjectService使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
在下文中一共展示了ProjectService類的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。
示例1: HandleProjectAllGet
func HandleProjectAllGet(c *gin.Context) {
var result = make(map[string]interface{}, 16)
var userid string
//var cookieid string
var projectid string
userid = c.Params.ByName("personid")
if userid == "" {
result["code"] = 400
result["descrip"] = "userid is empty"
result["data"] = nil
c.JSON(200, result)
return
}
ser := new(Service.ProjectService)
ser.Userid = tools.ToInt64(userid)
ser.Projectid = tools.ToInt64(projectid)
ser.ActionType = Service.PROJECT_GET_ACTION
ser.ServerType = Service.PROJECT_ALL_SERVICE_TYPE
ok, _ := ser.ProcessService()
result["code"] = 0
result["descrip"] = "ok"
result["data"] = ser.Container
if ok == false {
tools.Info(result)
c.JSON(200, result)
return
}
c.JSON(200, result)
return
}
示例2: HandleProjectStaticsGet
func HandleProjectStaticsGet(c *gin.Context) {
var result = make(map[string]interface{}, 16)
var userid string
var projectid string
// var cookieid string
ser := new(Service.ProjectService)
ser.Userid = tools.ToInt64(userid)
ser.Projectid = tools.ToInt64(projectid)
ser.ActionType = Service.PROJECT_GET_ACTION
ok, _ := ser.ProcessService()
result["code"] = ok
result["result"] = ser.Container
if ok == false {
tools.Info(result)
}
}