init project

This commit is contained in:
yanghao05
2023-01-28 11:09:11 +08:00
parent 11a561bdd7
commit 114c003b2b
38 changed files with 2011 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
package service
import (
"app/modules/system/dao"
"app/modules/system/dto"
"context"
)
type SystemService interface {
GetName(ctx context.Context) (dto.Name, error)
}
type systemService struct {
dao dao.Dao
}
func NewSystemService(dao dao.Dao) SystemService {
return &systemService{dao: dao}
}
func (svc *systemService) GetName(ctx context.Context) (dto.Name, error) {
if err := svc.dao.Release(ctx, 10, "Rogee"); err != nil {
return dto.Name{}, err
}
return dto.Name{Name: "System.GetName"}, nil
}