切换主体

This commit is contained in:
ziming 2026-03-27 11:55:37 +08:00
parent 7e8ef4cd2b
commit d308d56e79
2 changed files with 23 additions and 2 deletions

View File

@ -228,7 +228,14 @@ func (biz *MultiBiz) nlCreate(ctx context.Context, req *bo.WechatVoucherNotifyBo
b, _ := json.Marshal(request) b, _ := json.Marshal(request)
nl.Request = string(b) 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) { func (biz *MultiBiz) bizContent(nl *bo.MultiNotifyLogBo, order *bo.OrderBo) (string, error) {

View File

@ -88,5 +88,19 @@ func TestLength(t *testing.T) {
}` }`
s := len(jsonStr) s := len(jsonStr)
t.Log(s) 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)
//}
} }