领取成功查询核销状态,过期不做通知
This commit is contained in:
parent
70c2f65dbf
commit
5eebfb7b91
|
|
@ -4,6 +4,7 @@ import (
|
|||
"context"
|
||||
"fmt"
|
||||
"github.com/go-kratos/kratos/v2/log"
|
||||
"time"
|
||||
"voucher/internal/pkg/rdsmq"
|
||||
)
|
||||
|
||||
|
|
@ -30,16 +31,18 @@ func (s *VoucherService) GetConfig() *rdsmq.ConsumeConfig {
|
|||
}
|
||||
}
|
||||
|
||||
func (s *VoucherService) Handle(ctx context.Context, msg string) error {
|
||||
func (s *VoucherService) Handle(ctx context.Context, batchNo string) error {
|
||||
|
||||
if msg == "" {
|
||||
if batchNo == "" {
|
||||
s.logHelper.Errorf("RdsMQ keySend error: batchNo is empty")
|
||||
return nil
|
||||
}
|
||||
|
||||
if err := s.VoucherBiz.WechatQuery(ctx, msg); err != nil {
|
||||
start := time.Now()
|
||||
if err := s.VoucherBiz.WechatQuery(ctx, batchNo); err != nil {
|
||||
s.logHelper.Error(err)
|
||||
}
|
||||
log.Warnf("处理耗时:%s,batchNo:%s", time.Now().Sub(start).String(), batchNo)
|
||||
|
||||
return nil
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue