基础项目
Some checks failed
CI / init (pull_request) Has been cancelled
CI / Frontend node 18.16.0 (pull_request) Has been cancelled
CI / Backend go (1.22) (pull_request) Has been cancelled
CI / release-pr (pull_request) Has been cancelled
CI / devops-test (1.22, 18.16.0) (pull_request) Has been cancelled
CI / release-please (pull_request) Has been cancelled
CI / devops-prod (1.22, 18.x) (pull_request) Has been cancelled
CI / docker (pull_request) Has been cancelled

This commit is contained in:
2026-04-26 15:32:21 +08:00
parent cc40d743cb
commit 1e33640629
102 changed files with 4088 additions and 197 deletions

View File

@@ -0,0 +1,23 @@
package book
import (
"github.com/flipped-aurora/gin-vue-admin/server/middleware"
"github.com/gin-gonic/gin"
)
type BookRouter struct{}
func (r *BookRouter) InitBookRouter(Router *gin.RouterGroup) {
bookRouter := Router.Group("book").Use(middleware.OperationRecord())
bookRouterWithoutRecord := Router.Group("book")
registerBookRoutes(bookRouter, bookRouterWithoutRecord)
registerBookAuthorRoutes(bookRouter, bookRouterWithoutRecord)
registerBookAuthorRelationRoutes(bookRouter, bookRouterWithoutRecord)
registerBookChapterRoutes(bookRouter, bookRouterWithoutRecord)
registerBookCommentRoutes(bookRouter, bookRouterWithoutRecord)
registerBookCommentLikeRecordRoutes(bookRouter, bookRouterWithoutRecord)
registerBookFavoriteRecordRoutes(bookRouter, bookRouterWithoutRecord)
registerBookReadRecordRoutes(bookRouter, bookRouterWithoutRecord)
registerBookSeriesRoutes(bookRouter, bookRouterWithoutRecord)
}

View File

@@ -0,0 +1,12 @@
package book
import "github.com/gin-gonic/gin"
func registerBookAuthorRoutes(router gin.IRoutes, routerWithoutRecord gin.IRoutes) {
router.POST("createBookAuthor", bookApiGroup.BookAuthorApi.CreateBookAuthor)
router.DELETE("deleteBookAuthor", bookApiGroup.BookAuthorApi.DeleteBookAuthor)
router.DELETE("deleteBookAuthorByIds", bookApiGroup.BookAuthorApi.DeleteBookAuthorByIds)
router.PUT("updateBookAuthor", bookApiGroup.BookAuthorApi.UpdateBookAuthor)
routerWithoutRecord.GET("findBookAuthor", bookApiGroup.BookAuthorApi.FindBookAuthor)
routerWithoutRecord.GET("getBookAuthorList", bookApiGroup.BookAuthorApi.GetBookAuthorList)
}

View File

@@ -0,0 +1,12 @@
package book
import "github.com/gin-gonic/gin"
func registerBookAuthorRelationRoutes(router gin.IRoutes, routerWithoutRecord gin.IRoutes) {
router.POST("createBookAuthorRelation", bookApiGroup.BookAuthorRelationApi.CreateBookAuthorRelation)
router.DELETE("deleteBookAuthorRelation", bookApiGroup.BookAuthorRelationApi.DeleteBookAuthorRelation)
router.DELETE("deleteBookAuthorRelationByIds", bookApiGroup.BookAuthorRelationApi.DeleteBookAuthorRelationByIds)
router.PUT("updateBookAuthorRelation", bookApiGroup.BookAuthorRelationApi.UpdateBookAuthorRelation)
routerWithoutRecord.GET("findBookAuthorRelation", bookApiGroup.BookAuthorRelationApi.FindBookAuthorRelation)
routerWithoutRecord.GET("getBookAuthorRelationList", bookApiGroup.BookAuthorRelationApi.GetBookAuthorRelationList)
}

View File

@@ -0,0 +1,12 @@
package book
import "github.com/gin-gonic/gin"
func registerBookChapterRoutes(router gin.IRoutes, routerWithoutRecord gin.IRoutes) {
router.POST("createBookChapter", bookApiGroup.BookChapterApi.CreateBookChapter)
router.DELETE("deleteBookChapter", bookApiGroup.BookChapterApi.DeleteBookChapter)
router.DELETE("deleteBookChapterByIds", bookApiGroup.BookChapterApi.DeleteBookChapterByIds)
router.PUT("updateBookChapter", bookApiGroup.BookChapterApi.UpdateBookChapter)
routerWithoutRecord.GET("findBookChapter", bookApiGroup.BookChapterApi.FindBookChapter)
routerWithoutRecord.GET("getBookChapterList", bookApiGroup.BookChapterApi.GetBookChapterList)
}

View File

@@ -0,0 +1,12 @@
package book
import "github.com/gin-gonic/gin"
func registerBookCommentRoutes(router gin.IRoutes, routerWithoutRecord gin.IRoutes) {
router.POST("createBookComment", bookApiGroup.BookCommentApi.CreateBookComment)
router.DELETE("deleteBookComment", bookApiGroup.BookCommentApi.DeleteBookComment)
router.DELETE("deleteBookCommentByIds", bookApiGroup.BookCommentApi.DeleteBookCommentByIds)
router.PUT("updateBookComment", bookApiGroup.BookCommentApi.UpdateBookComment)
routerWithoutRecord.GET("findBookComment", bookApiGroup.BookCommentApi.FindBookComment)
routerWithoutRecord.GET("getBookCommentList", bookApiGroup.BookCommentApi.GetBookCommentList)
}

View File

@@ -0,0 +1,12 @@
package book
import "github.com/gin-gonic/gin"
func registerBookCommentLikeRecordRoutes(router gin.IRoutes, routerWithoutRecord gin.IRoutes) {
router.POST("createBookCommentLikeRecord", bookApiGroup.BookCommentLikeRecordApi.CreateBookCommentLikeRecord)
router.DELETE("deleteBookCommentLikeRecord", bookApiGroup.BookCommentLikeRecordApi.DeleteBookCommentLikeRecord)
router.DELETE("deleteBookCommentLikeRecordByIds", bookApiGroup.BookCommentLikeRecordApi.DeleteBookCommentLikeRecordByIds)
router.PUT("updateBookCommentLikeRecord", bookApiGroup.BookCommentLikeRecordApi.UpdateBookCommentLikeRecord)
routerWithoutRecord.GET("findBookCommentLikeRecord", bookApiGroup.BookCommentLikeRecordApi.FindBookCommentLikeRecord)
routerWithoutRecord.GET("getBookCommentLikeRecordList", bookApiGroup.BookCommentLikeRecordApi.GetBookCommentLikeRecordList)
}

View File

@@ -0,0 +1,12 @@
package book
import "github.com/gin-gonic/gin"
func registerBookFavoriteRecordRoutes(router gin.IRoutes, routerWithoutRecord gin.IRoutes) {
router.POST("createBookFavoriteRecord", bookApiGroup.BookFavoriteRecordApi.CreateBookFavoriteRecord)
router.DELETE("deleteBookFavoriteRecord", bookApiGroup.BookFavoriteRecordApi.DeleteBookFavoriteRecord)
router.DELETE("deleteBookFavoriteRecordByIds", bookApiGroup.BookFavoriteRecordApi.DeleteBookFavoriteRecordByIds)
router.PUT("updateBookFavoriteRecord", bookApiGroup.BookFavoriteRecordApi.UpdateBookFavoriteRecord)
routerWithoutRecord.GET("findBookFavoriteRecord", bookApiGroup.BookFavoriteRecordApi.FindBookFavoriteRecord)
routerWithoutRecord.GET("getBookFavoriteRecordList", bookApiGroup.BookFavoriteRecordApi.GetBookFavoriteRecordList)
}

View File

@@ -0,0 +1,12 @@
package book
import "github.com/gin-gonic/gin"
func registerBookReadRecordRoutes(router gin.IRoutes, routerWithoutRecord gin.IRoutes) {
router.POST("createBookReadRecord", bookApiGroup.BookReadRecordApi.CreateBookReadRecord)
router.DELETE("deleteBookReadRecord", bookApiGroup.BookReadRecordApi.DeleteBookReadRecord)
router.DELETE("deleteBookReadRecordByIds", bookApiGroup.BookReadRecordApi.DeleteBookReadRecordByIds)
router.PUT("updateBookReadRecord", bookApiGroup.BookReadRecordApi.UpdateBookReadRecord)
routerWithoutRecord.GET("findBookReadRecord", bookApiGroup.BookReadRecordApi.FindBookReadRecord)
routerWithoutRecord.GET("getBookReadRecordList", bookApiGroup.BookReadRecordApi.GetBookReadRecordList)
}

View File

@@ -0,0 +1,12 @@
package book
import "github.com/gin-gonic/gin"
func registerBookRoutes(router gin.IRoutes, routerWithoutRecord gin.IRoutes) {
router.POST("createBook", bookApiGroup.BookApi.CreateBook)
router.DELETE("deleteBook", bookApiGroup.BookApi.DeleteBook)
router.DELETE("deleteBookByIds", bookApiGroup.BookApi.DeleteBookByIds)
router.PUT("updateBook", bookApiGroup.BookApi.UpdateBook)
routerWithoutRecord.GET("findBook", bookApiGroup.BookApi.FindBook)
routerWithoutRecord.GET("getBookList", bookApiGroup.BookApi.GetBookList)
}

View File

@@ -0,0 +1,12 @@
package book
import "github.com/gin-gonic/gin"
func registerBookSeriesRoutes(router gin.IRoutes, routerWithoutRecord gin.IRoutes) {
router.POST("createBookSeries", bookApiGroup.BookSeriesApi.CreateBookSeries)
router.DELETE("deleteBookSeries", bookApiGroup.BookSeriesApi.DeleteBookSeries)
router.DELETE("deleteBookSeriesByIds", bookApiGroup.BookSeriesApi.DeleteBookSeriesByIds)
router.PUT("updateBookSeries", bookApiGroup.BookSeriesApi.UpdateBookSeries)
routerWithoutRecord.GET("findBookSeries", bookApiGroup.BookSeriesApi.FindBookSeries)
routerWithoutRecord.GET("getBookSeriesList", bookApiGroup.BookSeriesApi.GetBookSeriesList)
}

View File

@@ -0,0 +1,9 @@
package book
import api "github.com/flipped-aurora/gin-vue-admin/server/api/v1"
type RouterGroup struct {
BookRouter
}
var bookApiGroup = api.ApiGroupApp.BookApiGroup