package service

import (
	"context"
	"voucher/internal/pkg/rdsmq"
)

func (s *VoucherService) GetWechatRetryConfig() *rdsmq.ConsumeConfig {

	return nil
	//queue := s.bc.RdsMQ.GetWechatRetry()
	//if queue == nil {
	//	return nil
	//}
	//
	//if !queue.GetIsOpen() {
	//	log.Warn(fmt.Sprintf("[%s]RdsMQ is not open", queue.Name))
	//	return nil
	//}
	//
	//return &rdsmq.ConsumeConfig{
	//	Rdb:        s.rdb.Rdb,
	//	QueueName:  queue.Name,
	//	NumWorkers: queue.NumWorkers,
	//	WaitTime:   queue.GetWaitTime().AsDuration(),
	//	RetryNum:   queue.RetryNum,
	//	Fn:         s.HandleWechatRetry,
	//	Logger:     s.logHelper,
	//}
}

func (s *VoucherService) HandleWechatRetry(ctx context.Context, batchNo string) error {

	//if batchNo == "" {
	//	s.logHelper.Errorf("RdsMQ keySend error: batchNo is empty")
	//	return nil
	//}
	//
	//if err := s.VoucherBiz.WechatRetry(ctx, batchNo); err != nil {
	//	s.logHelper.Error(err)
	//}

	return nil
}
