Skip to content

Commit 726bcd3

Browse files
author
lidehua
committed
优化
1 parent 61a623d commit 726bcd3

File tree

12 files changed

+217
-6386
lines changed

12 files changed

+217
-6386
lines changed

api/book.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,14 @@ type SearchResponse struct {
3030
Documents []DocumentResponse `json:"documents"`
3131
}
3232

33+
// @Description 获取书籍列表
34+
// @Accept json
35+
// @Produce json
36+
// @Param pageNum path int true "1" ,pageSize path int true "10"
37+
// @Success 200 {object} model.Book
38+
// @Header 200 {string} x-token "qwerty"
39+
// @Failure 500 {object} response.Response
40+
// @Router /book/list [get]
3341
func Books(c *gin.Context) {
3442
pageNum := 1
3543
pageSize := 10

config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ mysql:
1717
config: 'charset=utf8&parseTime=True&loc=Local'
1818
max-idle-conns: 10
1919
max-open-conns: 10
20-
log-mode: false
20+
log-mode: true
2121

2222
# oss configuration
2323
qiniu:
@@ -35,7 +35,7 @@ redis:
3535
system:
3636
use-multipoint: false
3737
env: 'public' # Change to "develop" to skip authentication for development mode
38-
addr: 8888
38+
addr: 9090
3939
db-type: "mysql"
4040

4141
# captcha configuration

0 commit comments

Comments
 (0)