Go workspace (go.work) with 5 microservices + shared library: - gateway (8080), auth-service (8081), purchaser-service (8082) - textile-service (8083), washing-service (8084) - shared: proto definitions, common packages Infrastructure: docker-compose for local dev, K8s manifests for K3s cluster deployment (mysql/redis/etcd + traefik ingress). Frontend (iloom-flatten) added as git submodule. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
24 lines
574 B
Go
24 lines
574 B
Go
package service
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/muyuqingfeng/iloom/washing-service/internal/repository"
|
|
)
|
|
|
|
type PaymentService struct {
|
|
repo *repository.PaymentRepo
|
|
}
|
|
|
|
func NewPaymentService(repo *repository.PaymentRepo) *PaymentService {
|
|
return &PaymentService{repo: repo}
|
|
}
|
|
|
|
func (s *PaymentService) List(ctx context.Context, companyID string) ([]repository.PaymentWithDetails, error) {
|
|
return s.repo.ListByCompany(ctx, companyID)
|
|
}
|
|
|
|
func (s *PaymentService) Confirm(ctx context.Context, paymentID, companyID string) error {
|
|
return s.repo.Confirm(ctx, paymentID)
|
|
}
|