- 新增许愿树页面(Canvas绘制、许愿条展示) - 新增许愿详情页面 - 新增许愿创建弹窗(免费/付费两种模式) - 新增网络请求封装 utils/request.js - 新增Go后端项目结构(Gin + Inertia.js) - 新增用户、订单、许愿数据模型 - 新增数据库迁移脚本 - 更新.gitignore补全忽略规则 - 更新.env.local配置(robot=2, 版本1.0.1) - 添加secrets目录说明文档
39 lines
912 B
Go
39 lines
912 B
Go
package service
|
|
|
|
import (
|
|
"github.com/gouki/lunar-server/internal/model"
|
|
)
|
|
|
|
// WishService 许愿服务
|
|
type WishService struct{}
|
|
|
|
// GetWishTree 获取许愿树
|
|
func (s *WishService) GetWishTree(treeID uint) (*model.WishTree, error) {
|
|
// TODO: 实现数据库查询
|
|
return &model.WishTree{}, nil
|
|
}
|
|
|
|
// CreateWish 创建许愿
|
|
func (s *WishService) CreateWish(wish *model.Wish) error {
|
|
// TODO: 实现数据库创建
|
|
return nil
|
|
}
|
|
|
|
// GetWishList 获取许愿列表
|
|
func (s *WishService) GetWishList(treeID uint, page, pageSize int) ([]*model.Wish, int64, error) {
|
|
// TODO: 实现数据库查询
|
|
return []*model.Wish{}, 0, nil
|
|
}
|
|
|
|
// DeleteWish 删除许愿
|
|
func (s *WishService) DeleteWish(id uint) error {
|
|
// TODO: 实现数据库删除
|
|
return nil
|
|
}
|
|
|
|
// CreateRobotWish 创建机器人许愿
|
|
func (s *WishService) CreateRobotWish(treeID uint) error {
|
|
// TODO: 实现机器人自动许愿
|
|
return nil
|
|
}
|