feat: 在订单提交逻辑中添加日志记录,增强错误处理和成功反馈
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user