Update Voucher
This commit is contained in:
@@ -116,16 +116,24 @@ type InProgressOrderRepository interface {
|
||||
GetListByPartnerID(ctx mycontext.Context, partnerID int64, limit, offset int) ([]*entity.InProgressOrder, error)
|
||||
}
|
||||
|
||||
type VoucherUndianRepo interface {
|
||||
GetActiveUndianEvents(ctx context.Context) ([]*entity.UndianEventDB, error)
|
||||
CreateUndianVouchers(ctx context.Context, vouchers []*entity.UndianVoucherDB) error
|
||||
GetNextVoucherSequence(ctx mycontext.Context) (int64, error)
|
||||
GetNextVoucherSequenceBatch(ctx mycontext.Context, count int) (int64, error)
|
||||
}
|
||||
|
||||
type orderSvc struct {
|
||||
repo Repository
|
||||
product ProductService
|
||||
customer CustomerService
|
||||
transaction TransactionService
|
||||
crypt CryptService
|
||||
cfg Config
|
||||
notification NotificationService
|
||||
partnerSetting PartnerSettings
|
||||
inprogressOrder InProgressOrderRepository
|
||||
repo Repository
|
||||
product ProductService
|
||||
customer CustomerService
|
||||
transaction TransactionService
|
||||
crypt CryptService
|
||||
cfg Config
|
||||
notification NotificationService
|
||||
partnerSetting PartnerSettings
|
||||
inprogressOrder InProgressOrderRepository
|
||||
voucherUndianRepo VoucherUndianRepo
|
||||
}
|
||||
|
||||
func New(
|
||||
@@ -137,15 +145,17 @@ func New(
|
||||
cfg Config,
|
||||
notification NotificationService,
|
||||
partnerSetting PartnerSettings,
|
||||
voucherUndianRepo VoucherUndianRepo,
|
||||
) Service {
|
||||
return &orderSvc{
|
||||
repo: repo,
|
||||
product: product,
|
||||
customer: customer,
|
||||
transaction: transaction,
|
||||
crypt: crypt,
|
||||
cfg: cfg,
|
||||
notification: notification,
|
||||
partnerSetting: partnerSetting,
|
||||
repo: repo,
|
||||
product: product,
|
||||
customer: customer,
|
||||
transaction: transaction,
|
||||
crypt: crypt,
|
||||
cfg: cfg,
|
||||
notification: notification,
|
||||
partnerSetting: partnerSetting,
|
||||
voucherUndianRepo: voucherUndianRepo,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user