micro-bundle/internal/controller/bundle.go

78 lines
3.0 KiB
Go
Raw Normal View History

2025-02-20 12:40:39 +00:00
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)
}
2025-02-21 13:09:54 +00:00
func (b *BundleProvider) UpdateOrderRecordByOrderNo(_ context.Context, req *bundle.OrderRecord) (res *bundle.CommonResponse, err error) {
2025-02-23 08:35:55 +00:00
return logic.UpdateOrderRecordByOrderNo(req)
2025-02-21 13:09:54 +00:00
}
2025-02-20 12:40:39 +00:00
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)
}
2025-03-25 08:30:09 +00:00
// 增值套餐相关
func (b *BundleProvider) CreateValueAddBundle(_ context.Context, req *bundle.ValueAddBundleProfile) (res *bundle.CommonResponse, err error) {
return logic.CreateValueAddBundle(req)
}
func (b *BundleProvider) UpdateValueAddBundle(_ context.Context, req *bundle.ValueAddBundleProfile) (res *bundle.CommonResponse, err error) {
return logic.UpdateValueAddBundle(req)
}
func (b *BundleProvider) DeleteValueAddBundle(_ context.Context, req *bundle.DelValueAddBundleRequest) (res *bundle.CommonResponse, err error) {
return logic.DeleteValueAddBundle(req)
}
func (b *BundleProvider) ValueAddBundleList(_ context.Context, req *bundle.ValueAddBundleListRequest) (res *bundle.ValueAddBundleListResponse, err error) {
return logic.ValueAddBundleList(req)
}
func (b *BundleProvider) ValueAddBundleDetail(_ context.Context, req *bundle.ValueAddBundleDetailRequest) (res *bundle.ValueAddBundleDetailResponse, err error) {
return logic.ValueAddBundleDetail(req)
}
func ValueAddBundleRecordDetail(req *bundle.ValueAddBundleDetailRequest) (res *bundle.ValueAddBundleDetailResponse, err error) {
return logic.ValueAddBundleRecordDetail(req)
}