Commit 903a5a80 by 孙龙

up

parent 86bc51e6
......@@ -29,11 +29,10 @@ func Zyh(ctx *gin.Context){
if err != nil{
zyhResponse.ErrorCode = 1
zyhResponse.ErrorMsg = fmt.Sprintf("%s",err)
ctx.JSON(200,zyhResponse)
common.Output(int(zyhResponse.ErrorCode), zyhResponse.ErrorMsg, zyhResponse.Data)
}
//fmt.Printf("%+v",zyhResponse)
ctx.JSON(200,zyhResponse)
common.Output(int(zyhResponse.ErrorCode), zyhResponse.ErrorMsg, zyhResponse.Data)
}
func Aggs(ctx *gin.Context){
......@@ -55,12 +54,9 @@ func Aggs(ctx *gin.Context){
zyhResponse.ErrorCode = 1
zyhResponse.ErrorMsg = fmt.Sprintf("%s",err)
common.Output(int(zyhResponse.ErrorCode), zyhResponse.ErrorMsg, zyhResponse.Data)
//ctx.JSON(200,zyhResponse)
}
//fmt.Printf("%+v",zyhResponse)
common.Output(int(zyhResponse.ErrorCode), zyhResponse.ErrorMsg, zyhResponse.Data)
//ctx.JSON(200,zyhResponse)
}
func Index(ctx *gin.Context){
......
......@@ -67,10 +67,10 @@ func (this *ZyServiceImpl) Zyh(ctx *gin.Context, req map[string]string) (rsp *mo
func (this *ZyServiceImpl)Aggs(ctx *gin.Context, req map[string]string) (rsp *model.ZyhResponse,err error){
//rsp,ok := ziyingCache(req,2)
//if ok {
// return rsp,nil
//}
rsp,ok := ziyingCache(req,2)
if ok {
return rsp,nil
}
rsp = zy(req ,2,1)
return rsp,nil
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment