继续补齐核心模块 Context 超时控制
This commit is contained in:
@@ -34,7 +34,7 @@ func (h *Handler) Create(c *gin.Context) {
|
||||
response.BadRequest(c, "申诉信息不完整")
|
||||
return
|
||||
}
|
||||
item, err := h.service.Create(userID, orderID, req)
|
||||
item, err := h.service.Create(c.Request.Context(), userID, orderID, req)
|
||||
if err != nil {
|
||||
writeDisputeError(c, err)
|
||||
return
|
||||
@@ -49,7 +49,7 @@ func (h *Handler) List(c *gin.Context) {
|
||||
return
|
||||
}
|
||||
page, pageSize := parsePagination(c)
|
||||
result, err := h.service.ListForUser(userID, page, pageSize)
|
||||
result, err := h.service.ListForUser(c.Request.Context(), userID, page, pageSize)
|
||||
if err != nil {
|
||||
writeDisputeError(c, err)
|
||||
return
|
||||
@@ -67,7 +67,7 @@ func (h *Handler) Detail(c *gin.Context) {
|
||||
if !ok {
|
||||
return
|
||||
}
|
||||
item, err := h.service.FindForUser(userID, id)
|
||||
item, err := h.service.FindForUser(c.Request.Context(), userID, id)
|
||||
if err != nil {
|
||||
writeDisputeError(c, err)
|
||||
return
|
||||
@@ -77,7 +77,7 @@ func (h *Handler) Detail(c *gin.Context) {
|
||||
|
||||
func (h *Handler) AdminList(c *gin.Context) {
|
||||
page, pageSize := parsePagination(c)
|
||||
result, err := h.service.ListAdmin(page, pageSize)
|
||||
result, err := h.service.ListAdmin(c.Request.Context(), page, pageSize)
|
||||
if err != nil {
|
||||
writeDisputeError(c, err)
|
||||
return
|
||||
@@ -100,7 +100,7 @@ func (h *Handler) AdminArbitrate(c *gin.Context) {
|
||||
response.BadRequest(c, "仲裁结果和备注不能为空")
|
||||
return
|
||||
}
|
||||
item, err := h.service.Arbitrate(adminID, id, req, auditMeta(c))
|
||||
item, err := h.service.Arbitrate(c.Request.Context(), adminID, id, req, auditMeta(c))
|
||||
if err != nil {
|
||||
writeDisputeError(c, err)
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user