新增查询绑定结果接口(自建发货页轮询角色信息)

- GET /api/client/v1/orders/{order_no}/delivery/bind-result?bind_uuid=xxx
- 返回 bound/game_account/role_name/game_channel;未绑定返回 bound=false(不报错,供轮询)
- 对接文档自建发货页模式新增该接口,注明轮询建议间隔
This commit is contained in:
yml2213
2026-08-03 17:10:50 +08:00
parent 8da9dcec43
commit 19ada1282e
4 changed files with 91 additions and 3 deletions
+16
View File
@@ -227,6 +227,22 @@ func (h *OpenV1Handler) BindDeliveryOrder(c *gin.Context) {
response.OK(c, result)
}
// GetDeliveryBindResult GET /api/client/v1/orders/:order_no/delivery/bind-result
// 查询绑定结果与角色信息(自建发货页轮询绑定状态用)。
func (h *OpenV1Handler) GetDeliveryBindResult(c *gin.Context) {
openlog.SetAction(c, openlog.ActionQuery)
orderNo := c.Param("order_no")
bindUUID := c.Query("bind_uuid")
openlog.Info(c, "delivery_bind_result start order_no=%s bind_uuid=%s", orderNo, bindUUID)
result, err := h.deliverySvc.GetBindResult(middleware.GetMerchantID(c), orderNo, bindUUID)
if err != nil {
openlog.Warn(c, "delivery_bind_result fail order_no=%s err=%v", orderNo, err)
response.BadRequest(c, err.Error())
return
}
response.OK(c, result)
}
type openDeliverySubmitReq struct {
GameAccount string `json:"game_account" binding:"required"`
BindUUID string `json:"bind_uuid" binding:"required"`