新增查询绑定结果接口(自建发货页轮询角色信息)
- 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:
@@ -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"`
|
||||
|
||||
Reference in New Issue
Block a user