micro-bundle/internal/controller/bundle.go
2025-02-20 20:40:39 +08:00

50 lines
1.7 KiB
Go

package controller
import (
"context"
"micro-bundle/internal/logic"
"micro-bundle/pb/bundle"
)
type BundleProvider struct {
bundle.UnimplementedBundleServer
}
// 套餐相关
func (b *BundleProvider) CreateBundle(_ context.Context, req *bundle.BundleProfile) (res *bundle.CommonResponse, err error) {
return logic.CreateBundle(req)
}
func (b *BundleProvider) UpdateBundle(_ context.Context, req *bundle.BundleProfile) (res *bundle.CommonResponse, err error) {
return logic.UpdateBundle(req)
}
func (b *BundleProvider) DeleteBundle(_ context.Context, req *bundle.DelBundleRequest) (res *bundle.CommonResponse, err error) {
return logic.DeleteBundle(req)
}
func (b *BundleProvider) BundleList(_ context.Context, req *bundle.BundleListRequest) (res *bundle.BundleListResponse, err error) {
return logic.BundleList(req)
}
func (b *BundleProvider) BundleDetail(_ context.Context, req *bundle.BundleDetailRequest) (res *bundle.BundleDetailResponse, err error) {
return logic.BundleDetail(req)
}
// 订单相关
func (b *BundleProvider) CreateOrderRecord(_ context.Context, req *bundle.OrderRecord) (res *bundle.CommonResponse, err error) {
return logic.CreateOrderRecord(req)
}
func (b *BundleProvider) UpdateOrderRecord(_ context.Context, req *bundle.OrderRecord) (res *bundle.CommonResponse, err error) {
return logic.UpdateOrderRecord(req)
}
func (b *BundleProvider) OrderRecordsList(_ context.Context, req *bundle.OrderRecordsRequest) (res *bundle.OrderRecordsResponse, err error) {
return logic.OrderRecordsList(req)
}
func (b *BundleProvider) OrderRecordsDetail(_ context.Context, req *bundle.OrderRecordsDetailRequest) (res *bundle.OrderRecordsDetailResponse, err error) {
return logic.OrderRecordsDetail(req)
}