app-cloudep-trade-service/internal/logic/couponservice/validate_coupon_logic.go

32 lines
764 B
Go
Raw Normal View History

package couponservicelogic
import (
"context"
"app-cloudep-trade-service/gen_result/pb/trade"
"app-cloudep-trade-service/internal/svc"
"github.com/zeromicro/go-zero/core/logx"
)
type ValidateCouponLogic struct {
ctx context.Context
svcCtx *svc.ServiceContext
logx.Logger
}
func NewValidateCouponLogic(ctx context.Context, svcCtx *svc.ServiceContext) *ValidateCouponLogic {
return &ValidateCouponLogic{
ctx: ctx,
svcCtx: svcCtx,
Logger: logx.WithContext(ctx),
}
}
// ValidateCoupon 驗證優惠券 (在下單或支付時使用)
func (l *ValidateCouponLogic) ValidateCoupon(in *trade.ValidateCouponReq) (*trade.CouponValidationResp, error) {
// todo: add your logic here and delete this line
return &trade.CouponValidationResp{}, nil
}