书籍列表接口新增参数

This commit is contained in:
2025-08-13 15:19:42 +08:00
parent 6ccc87f2bf
commit 8afe651c64
201 changed files with 6987 additions and 1066 deletions

View File

@ -0,0 +1,33 @@
// ================================================================================
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
// You can delete these comments if you wish manually maintain this interface file.
// ================================================================================
package service
import (
"context"
"server/internal/model"
)
type (
IAds interface {
// Upload 广告数据上传 - 处理用户广告状态流转
Upload(ctx context.Context, in *model.AdsUploadIn) (out *model.AdsUploadOut, err error)
}
)
var (
localAds IAds
)
func Ads() IAds {
if localAds == nil {
panic("implement not found for interface IAds, forgot register?")
}
return localAds
}
func RegisterAds(i IAds) {
localAds = i
}

View File

@ -23,6 +23,10 @@ type (
// Apply 允许用户申请成为作者
Apply(ctx context.Context, in *model.AuthorApplyIn) (out *model.AuthorApplyOut, err error)
Detail(ctx context.Context, in *model.AuthorDetailIn) (out *model.AuthorDetailOut, err error)
// AuthorInfo 获取作者信息
AuthorInfo(ctx context.Context, in *model.AuthorInfoIn) (out *model.AuthorInfoOut, err error)
// 审核作者申请(通过/拒绝)
Review(ctx context.Context, in *model.AuthorReviewIn) (out *model.AuthorReviewOut, err error)
}
)

View File

@ -28,6 +28,8 @@ type (
SetFeatured(ctx context.Context, in *model.BookSetFeaturedIn) (out *model.BookCRUDOut, err error)
// SetRecommended: 单独修改书籍的推荐状态
SetRecommended(ctx context.Context, in *model.BookSetRecommendedIn) (out *model.BookCRUDOut, err error)
// SetHot: 单独修改书籍的热门状态
SetHot(ctx context.Context, in *model.BookSetHotIn) (out *model.BookCRUDOut, err error)
}
)

View File

@ -0,0 +1,49 @@
// ================================================================================
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
// You can delete these comments if you wish manually maintain this interface file.
// ================================================================================
package service
import (
"context"
"server/internal/model"
"github.com/gogf/gf/v2/net/ghttp"
)
type (
IBookRecommendations interface {
// List 获取推荐列表
List(ctx context.Context, in *model.BookRecommendationsListIn) (out *model.BookRecommendationsListOut, err error)
// AppList 获取APP端推荐列表
AppList(ctx context.Context, in *model.BookRecommendationsListIn) (out *model.BookRecommendationsAppListOut, err error)
// Create 新增推荐
Create(ctx context.Context, in *model.BookRecommendationsCreateIn) (out *model.BookRecommendationsCRUDOut, err error)
// Update 编辑推荐
Update(ctx context.Context, in *model.BookRecommendationsUpdateIn) (out *model.BookRecommendationsCRUDOut, err error)
// Delete 删除推荐
Delete(ctx context.Context, in *model.BookRecommendationsDeleteIn) (out *model.BookRecommendationsCRUDOut, err error)
// SetStatus 启用/禁用推荐
SetStatus(ctx context.Context, in *model.BookRecommendationsSetStatusIn) (out *model.BookRecommendationsCRUDOut, err error)
// SortOrder 设置排序
SortOrder(ctx context.Context, in *model.BookRecommendationsSortOrderIn) (out *model.BookRecommendationsCRUDOut, err error)
// UploadCover 上传推荐封面图
UploadCover(ctx context.Context, file *ghttp.UploadFile) (url string, err error)
}
)
var (
localBookRecommendations IBookRecommendations
)
func BookRecommendations() IBookRecommendations {
if localBookRecommendations == nil {
panic("implement not found for interface IBookRecommendations, forgot register?")
}
return localBookRecommendations
}
func RegisterBookRecommendations(i IBookRecommendations) {
localBookRecommendations = i
}

View File

@ -28,6 +28,8 @@ type (
AppPurchase(ctx context.Context, in *model.ChapterAppPurchaseIn) (out *model.ChapterAppPurchaseOut, err error)
// AppProgress uploads reading progress for app
AppProgress(ctx context.Context, in *model.ChapterAppProgressIn) (out *model.ChapterAppProgressOut, err error)
// AppBatchProgress uploads batch reading progress for app
AppBatchProgress(ctx context.Context, in *model.ChapterAppBatchProgressIn) (out *model.ChapterAppProgressOut, err error)
}
)

View File

@ -0,0 +1,43 @@
// ================================================================================
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
// You can delete these comments if you wish manually maintain this interface file.
// ================================================================================
package service
import (
"context"
"server/internal/model"
)
type (
ISignInRewardDetails interface {
// Create 新增签到奖励明细
Create(ctx context.Context, in *model.SignInRewardDetail) (int64, error)
// Update 编辑签到奖励明细
Update(ctx context.Context, in *model.SignInRewardDetail) error
// Delete 删除签到奖励明细
Delete(ctx context.Context, in *model.SignInRewardDetailDeleteIn) (*model.SignInRewardDetailDeleteOut, error)
// Get 查询单个签到奖励明细
Get(ctx context.Context, in *model.SignInRewardDetailGetIn) (*model.SignInRewardDetailGetOut, error)
// List 根据 ruleId 查询签到奖励明细列表
List(ctx context.Context, in *model.SignInRewardDetailListIn) (*model.SignInRewardDetailListOut, error)
// SetStatus 设置签到奖励明细状态
SetStatus(ctx context.Context, in *model.SignInRewardDetailSetStatusIn) (*model.SignInRewardDetailSetStatusOut, error)
}
)
var (
localSignInRewardDetails ISignInRewardDetails
)
func SignInRewardDetails() ISignInRewardDetails {
if localSignInRewardDetails == nil {
panic("implement not found for interface ISignInRewardDetails, forgot register?")
}
return localSignInRewardDetails
}
func RegisterSignInRewardDetails(i ISignInRewardDetails) {
localSignInRewardDetails = i
}

View File

@ -0,0 +1,42 @@
// ================================================================================
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
// You can delete these comments if you wish manually maintain this interface file.
// ================================================================================
package service
import (
"context"
"server/internal/model"
)
type (
ISignInRewardRules interface {
// List 获取签到奖励规则列表
List(ctx context.Context, in *model.SignInRewardRulesListIn) (out *model.SignInRewardRulesListOut, err error)
// Create 新增签到奖励规则
Create(ctx context.Context, in *model.SignInRewardRulesCreateIn) (out *model.SignInRewardRulesCRUDOut, err error)
// Update 编辑签到奖励规则
Update(ctx context.Context, in *model.SignInRewardRulesUpdateIn) (out *model.SignInRewardRulesCRUDOut, err error)
// Delete 删除签到奖励规则
Delete(ctx context.Context, in *model.SignInRewardRulesDeleteIn) (out *model.SignInRewardRulesCRUDOut, err error)
// SetStatus 设置签到奖励规则状态
SetStatus(ctx context.Context, in *model.SignInRewardRulesSetStatusIn) (out *model.SignInRewardRulesCRUDOut, err error)
SignInList(ctx context.Context, in *model.SignInListIn) (out *model.SignInListOut, err error)
}
)
var (
localSignInRewardRules ISignInRewardRules
)
func SignInRewardRules() ISignInRewardRules {
if localSignInRewardRules == nil {
panic("implement not found for interface ISignInRewardRules, forgot register?")
}
return localSignInRewardRules
}
func RegisterSignInRewardRules(i ISignInRewardRules) {
localSignInRewardRules = i
}

View File

@ -0,0 +1,34 @@
// ================================================================================
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
// You can delete these comments if you wish manually maintain this interface file.
// ================================================================================
package service
import (
"context"
"server/internal/model"
)
type (
ISystem interface {
Unique(ctx context.Context, in *model.SystemUniqueInput) (*model.SystemOutput, error)
Version(ctx context.Context) (*model.SystemVersionOutput, error)
Save(ctx context.Context, in *model.SystemSaveInput) (err error)
}
)
var (
localSystem ISystem
)
func System() ISystem {
if localSystem == nil {
panic("implement not found for interface ISystem, forgot register?")
}
return localSystem
}
func RegisterSystem(i ISystem) {
localSystem = i
}

37
internal/service/task.go Normal file
View File

@ -0,0 +1,37 @@
// ================================================================================
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
// You can delete these comments if you wish manually maintain this interface file.
// ================================================================================
package service
import (
"context"
"server/internal/model"
)
type (
ITask interface {
List(ctx context.Context, in *model.TaskListIn) (out *model.TaskListOut, err error)
Add(ctx context.Context, in *model.TaskAddIn) (out *model.TaskCRUDOut, err error)
Edit(ctx context.Context, in *model.TaskEditIn) (out *model.TaskCRUDOut, err error)
Delete(ctx context.Context, in *model.TaskDelIn) (out *model.TaskCRUDOut, err error)
// AppList 获取任务列表(只返回任务类型和奖励积分)
AppList(ctx context.Context, in *model.TaskAppListIn) (out *model.TaskSimpleListOut, err error)
}
)
var (
localTask ITask
)
func Task() ITask {
if localTask == nil {
panic("implement not found for interface ITask, forgot register?")
}
return localTask
}
func RegisterTask(i ITask) {
localTask = i
}

View File

@ -0,0 +1,32 @@
// ================================================================================
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
// You can delete these comments if you wish manually maintain this interface file.
// ================================================================================
package service
import (
"context"
"server/internal/model"
)
type (
IUpload interface {
UploadImage(ctx context.Context, in *model.UploadImageIn) (*model.UploadImageOut, error)
}
)
var (
localUpload IUpload
)
func Upload() IUpload {
if localUpload == nil {
panic("implement not found for interface IUpload, forgot register?")
}
return localUpload
}
func RegisterUpload(i IUpload) {
localUpload = i
}

View File

@ -18,6 +18,7 @@ type (
Delete(ctx context.Context, in *model.UserDeleteIn) (out *model.UserDeleteOut, err error)
Code(ctx context.Context, in *model.UserCodeIn) (out *model.UserCodeOut, err error)
EditPass(ctx context.Context, in *model.UserEditPassIn) (out *model.UserEditPassOut, err error)
AuthorLogin(ctx context.Context, in *model.UserLoginIn) (out *model.UserLoginOut, err error)
}
)

View File

@ -16,8 +16,6 @@ type (
List(ctx context.Context, in *model.UserFollowAuthorListIn) (out *model.UserFollowAuthorListOut, err error)
// Create adds a new user follow author
Create(ctx context.Context, in *model.UserFollowAuthorAddIn) (out *model.UserFollowAuthorCRUDOut, err error)
// Delete removes a user follow author by id
Delete(ctx context.Context, in *model.UserFollowAuthorDelIn) (out *model.UserFollowAuthorCRUDOut, err error)
// Unfollow removes a user follow author by userId and authorId
Unfollow(ctx context.Context, userId int64, authorId int64) (out *model.UserFollowAuthorCRUDOut, err error)
}

View File

@ -12,10 +12,7 @@ import (
type (
IUserReadHistory interface {
// Add 添加历史记录
Add(ctx context.Context, in *model.UserReadHistoryAddIn) (out *model.UserReadHistoryCRUDOut, err error)
// Delete 批量删除历史记录
Delete(ctx context.Context, in *model.UserReadHistoryDelIn) (out *model.UserReadHistoryCRUDOut, err error)
Remove(ctx context.Context, in *model.UserReadHistoryDelIn) (out *model.UserReadHistoryCRUDOut, err error)
}
)

View File

@ -1,37 +0,0 @@
// ================================================================================
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
// You can delete these comments if you wish manually maintain this interface file.
// ================================================================================
package service
import (
"context"
"server/internal/model"
)
type (
IUserReadRecord interface {
// List retrieves a paginated list of user read records
List(ctx context.Context, in *model.UserReadRecordListIn) (out *model.UserReadRecordListOut, err error)
// Create adds a new user read record
Create(ctx context.Context, in *model.UserReadRecordAddIn) (out *model.UserReadRecordCRUDOut, err error)
// Delete removes user read records by userId and bookIds
Delete(ctx context.Context, in *model.UserReadRecordDelIn) (out *model.UserReadRecordCRUDOut, err error)
}
)
var (
localUserReadRecord IUserReadRecord
)
func UserReadRecord() IUserReadRecord {
if localUserReadRecord == nil {
panic("implement not found for interface IUserReadRecord, forgot register?")
}
return localUserReadRecord
}
func RegisterUserReadRecord(i IUserReadRecord) {
localUserReadRecord = i
}

View File

@ -0,0 +1,33 @@
// ================================================================================
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
// You can delete these comments if you wish manually maintain this interface file.
// ================================================================================
package service
import (
"context"
"server/internal/model"
)
type (
IUserSignInLogs interface {
// Sign 用户签到,只允许每日唯一签到
Sign(ctx context.Context, in *model.UserSignInLogSignIn) (*model.UserSignInLogSignOut, error)
}
)
var (
localUserSignInLogs IUserSignInLogs
)
func UserSignInLogs() IUserSignInLogs {
if localUserSignInLogs == nil {
panic("implement not found for interface IUserSignInLogs, forgot register?")
}
return localUserSignInLogs
}
func RegisterUserSignInLogs(i IUserSignInLogs) {
localUserSignInLogs = i
}