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) + //} }