feat: 部署初版测试
This commit is contained in:
22
server/internal/service/product_profile_service.go
Normal file
22
server/internal/service/product_profile_service.go
Normal file
@@ -0,0 +1,22 @@
|
||||
package service
|
||||
|
||||
import (
|
||||
"github.com/zs/InsightReply/internal/model"
|
||||
"github.com/zs/InsightReply/internal/repository"
|
||||
)
|
||||
|
||||
type ProductProfileService struct {
|
||||
repo *repository.ProductProfileRepository
|
||||
}
|
||||
|
||||
func NewProductProfileService(repo *repository.ProductProfileRepository) *ProductProfileService {
|
||||
return &ProductProfileService{repo: repo}
|
||||
}
|
||||
|
||||
func (s *ProductProfileService) GetProfile(userID string) (*model.UserProductProfile, error) {
|
||||
return s.repo.GetByUserID(userID)
|
||||
}
|
||||
|
||||
func (s *ProductProfileService) SaveProfile(profile *model.UserProductProfile) error {
|
||||
return s.repo.Save(profile)
|
||||
}
|
||||
Reference in New Issue
Block a user