feat: 在订单提交逻辑中添加日志记录,增强错误处理和成功反馈

This commit is contained in:
danial
2025-05-02 16:53:18 +08:00
parent c362c39c84
commit 8833909883

View File

@@ -62,12 +62,15 @@ func SubmitOrder(ctx context.Context, input *order.SubmitOrder) (*order.SubmitOr
response, err := req.String()
if err != nil {
logs.Error("提交订单失败", err)
return nil, err
}
logs.Info("提交订单成功", response)
submitOrderResponse := order.SubmitOrderResponse{}
err = json.Unmarshal([]byte(response), &submitOrderResponse)
if err != nil {
logs.Error("提交订单失败", err)
return nil, err
}