Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
杨树贤
/
search_server
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
903a5a80
authored
Jul 29, 2020
by
孙龙
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
up
parent
86bc51e6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
10 deletions
controller/ziyin_controller.go
service/ziyin_service.go
controller/ziyin_controller.go
View file @
903a5a80
...
@@ -29,11 +29,10 @@ func Zyh(ctx *gin.Context){
...
@@ -29,11 +29,10 @@ func Zyh(ctx *gin.Context){
if
err
!=
nil
{
if
err
!=
nil
{
zyhResponse
.
ErrorCode
=
1
zyhResponse
.
ErrorCode
=
1
zyhResponse
.
ErrorMsg
=
fmt
.
Sprintf
(
"%s"
,
err
)
zyhResponse
.
ErrorMsg
=
fmt
.
Sprintf
(
"%s"
,
err
)
c
tx
.
JSON
(
200
,
zyhResponse
)
c
ommon
.
Output
(
int
(
zyhResponse
.
ErrorCode
),
zyhResponse
.
ErrorMsg
,
zyhResponse
.
Data
)
}
}
//fmt.Printf("%+v",zyhResponse)
common
.
Output
(
int
(
zyhResponse
.
ErrorCode
),
zyhResponse
.
ErrorMsg
,
zyhResponse
.
Data
)
ctx
.
JSON
(
200
,
zyhResponse
)
}
}
func
Aggs
(
ctx
*
gin
.
Context
){
func
Aggs
(
ctx
*
gin
.
Context
){
...
@@ -55,12 +54,9 @@ func Aggs(ctx *gin.Context){
...
@@ -55,12 +54,9 @@ func Aggs(ctx *gin.Context){
zyhResponse
.
ErrorCode
=
1
zyhResponse
.
ErrorCode
=
1
zyhResponse
.
ErrorMsg
=
fmt
.
Sprintf
(
"%s"
,
err
)
zyhResponse
.
ErrorMsg
=
fmt
.
Sprintf
(
"%s"
,
err
)
common
.
Output
(
int
(
zyhResponse
.
ErrorCode
),
zyhResponse
.
ErrorMsg
,
zyhResponse
.
Data
)
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
)
common
.
Output
(
int
(
zyhResponse
.
ErrorCode
),
zyhResponse
.
ErrorMsg
,
zyhResponse
.
Data
)
//ctx.JSON(200,zyhResponse)
}
}
func
Index
(
ctx
*
gin
.
Context
){
func
Index
(
ctx
*
gin
.
Context
){
...
...
service/ziyin_service.go
View file @
903a5a80
...
@@ -67,10 +67,10 @@ func (this *ZyServiceImpl) Zyh(ctx *gin.Context, req map[string]string) (rsp *mo
...
@@ -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
){
func
(
this
*
ZyServiceImpl
)
Aggs
(
ctx
*
gin
.
Context
,
req
map
[
string
]
string
)
(
rsp
*
model
.
ZyhResponse
,
err
error
){
//
rsp,ok := ziyingCache(req,2)
rsp
,
ok
:=
ziyingCache
(
req
,
2
)
//
if ok {
if
ok
{
//
return rsp,nil
return
rsp
,
nil
//
}
}
rsp
=
zy
(
req
,
2
,
1
)
rsp
=
zy
(
req
,
2
,
1
)
return
rsp
,
nil
return
rsp
,
nil
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment