feat: 修改订单提交接口地址并增强日志记录,包含请求参数信息

This commit is contained in:
danial
2025-05-02 16:58:16 +08:00
parent 8833909883
commit 52d5b13ef0

View File

@@ -50,7 +50,7 @@ func CreateOrder(ctx context.Context, input *order.CreatedOrder, paySecret strin
}
func SubmitOrder(ctx context.Context, input *order.SubmitOrder) (*order.SubmitOrderResponse, error) {
req := httplib.NewBeegoRequestWithCtx(ctx, fmt.Sprintf("%s/gateway/submitOrder", config.GetGatewayAddr()), "POST").
req := httplib.NewBeegoRequestWithCtx(ctx, fmt.Sprintf("%s/gateway/scan", config.GetGatewayAddr()), "POST").
SetTimeout(30*time.Second, 30*time.Second)
params := input.ToStrMap()
@@ -66,7 +66,7 @@ func SubmitOrder(ctx context.Context, input *order.SubmitOrder) (*order.SubmitOr
return nil, err
}
logs.Info("提交订单成功", response)
logs.Info("提交订单成功", fmt.Sprintf("%s/gateway/scan", config.GetGatewayAddr()), params, response)
submitOrderResponse := order.SubmitOrderResponse{}
err = json.Unmarshal([]byte(response), &submitOrderResponse)
if err != nil {