diff --git a/internal/biz/vo/cache.go b/internal/biz/vo/cache.go index 6097065..9c65f27 100644 --- a/internal/biz/vo/cache.go +++ b/internal/biz/vo/cache.go @@ -39,7 +39,7 @@ var CacheKeyMap = map[CacheKey]time.Duration{ OrderConsumeFailAlarmKey: 2 * time.Hour, // 2小时 OrderConsumeFailAlarmLockKey: 60 * time.Second, NotifyRetryConsume: 60 * time.Second, - WechatNotifyRegisterTagCacheKey: 30 * 86400 * time.Second, // 5天 + WechatNotifyRegisterTagCacheKey: 30 * 86400 * time.Second, // 30天 WechatNotifyRegisterTagCacheLockKey: 60 * time.Second, WechatNotifyConsumeLockKey: 30 * time.Second, diff --git a/internal/data/wechatrepoimpl/cpn.go b/internal/data/wechatrepoimpl/cpn.go index 92faa84..c1ab450 100644 --- a/internal/data/wechatrepoimpl/cpn.go +++ b/internal/data/wechatrepoimpl/cpn.go @@ -9,6 +9,7 @@ import ( "github.com/wechatpay-apiv3/wechatpay-go/services/cashcoupons" "io" "net/http" + "time" err2 "voucher/api/err" "voucher/internal/biz/bo" "voucher/internal/biz/vo" @@ -218,6 +219,7 @@ func (c *CpnRepoImpl) RegisterNotifyTag(ctx context.Context, stockID string) err body, request.WithHeaders(h), request.WithStatusCodeFunc(isSuccess), + request.WithTimeout(time.Second*20), ) if err != nil { return err