From d308d56e791f541217bee5cc49305277d8a516f8 Mon Sep 17 00:00:00 2001 From: ziming Date: Fri, 27 Mar 2026 11:55:37 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=87=E6=8D=A2=E4=B8=BB=E4=BD=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/biz/multi.go | 9 ++++++++- internal/pkg/helper/utils_test.go | 16 +++++++++++++++- 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/internal/biz/multi.go b/internal/biz/multi.go index 9869e38..23d764d 100644 --- a/internal/biz/multi.go +++ b/internal/biz/multi.go @@ -228,7 +228,14 @@ func (biz *MultiBiz) nlCreate(ctx context.Context, req *bo.WechatVoucherNotifyBo b, _ := json.Marshal(request) nl.Request = string(b) - return biz.MultiNotifyLogRepo.Create(ctx, nl) + res, err := biz.MultiNotifyLogRepo.Create(ctx, nl) + if err != nil { + return nil, fmt.Errorf("创建通知日志错误 error: %v", err) + } + // 创建出来的核销时间精度有差距,重新赋值返回出去 + res.ConsumeTime = mnd.ConsumeTime + + return res, nil } func (biz *MultiBiz) bizContent(nl *bo.MultiNotifyLogBo, order *bo.OrderBo) (string, error) { diff --git a/internal/pkg/helper/utils_test.go b/internal/pkg/helper/utils_test.go index 2e963ab..42278ee 100644 --- a/internal/pkg/helper/utils_test.go +++ b/internal/pkg/helper/utils_test.go @@ -88,5 +88,19 @@ func TestLength(t *testing.T) { }` s := len(jsonStr) t.Log(s) - +} + +func Test_Time(t *testing.T) { + + strTime := "2026-03-27 10:33:20" + tt, _ := time.Parse("2006-01-02 15:04:05", strTime) + t.Log(tt.Format("2006-01-02 15:04:05.000")) + + //for i := 0; i < 20; i++ { + // formatTime := time.Now().Format("2006-01-02 15:04:05.999") + // t.Log(formatTime) + // formatTime2 := time.Now().Format("2006-01-02 15:04:05.000") + // t.Log(formatTime2) + // time.Sleep(1 * time.Second) + //} }