voucher/internal/biz/cmb.go

20 lines
390 B
Go

package biz
import (
"context"
"fmt"
"time"
"voucher/internal/biz/bo"
"voucher/internal/pkg/lock"
)
func (v *VoucherBiz) CmbOrder(ctx context.Context, req *bo.OrderCreateReqBo) (reps *bo.OrderCreateRepBo, err error) {
err = lock.NewMutex(v.rdb.Rdb, time.Second*30).Lock(ctx, fmt.Sprintf("cmb_order_%s", req.OutBizNo), func(ctx context.Context) error {
return nil
})
return
}