feat: 部署初版测试
Some checks failed
Extension Build & Release / build (push) Failing after 1m5s
Backend Deploy (Go + Docker) / deploy (push) Failing after 1m40s
Web Console Deploy (Vue 3 + Vite) / deploy (push) Has been cancelled

This commit is contained in:
zs
2026-03-02 21:25:21 +08:00
parent db3abb3174
commit 8cf6cb944b
97 changed files with 10250 additions and 209 deletions

View File

@@ -0,0 +1,30 @@
package service
import (
"github.com/zs/InsightReply/internal/model"
"github.com/zs/InsightReply/internal/repository"
)
type CustomStrategyService struct {
repo *repository.CustomStrategyRepository
}
func NewCustomStrategyService(repo *repository.CustomStrategyRepository) *CustomStrategyService {
return &CustomStrategyService{repo: repo}
}
func (s *CustomStrategyService) ListStrategies(userID string) ([]model.UserCustomStrategy, error) {
return s.repo.ListByUserID(userID)
}
func (s *CustomStrategyService) CreateStrategy(strategy *model.UserCustomStrategy) error {
return s.repo.Create(strategy)
}
func (s *CustomStrategyService) UpdateStrategy(strategy *model.UserCustomStrategy) error {
return s.repo.Update(strategy)
}
func (s *CustomStrategyService) DeleteStrategy(id string, userID string) error {
return s.repo.Delete(id, userID)
}