修复仲裁退款并新增免押额度

This commit is contained in:
yml
2026-06-08 21:00:39 +08:00
parent 830cfcf33d
commit 0b419f5084
22 changed files with 559 additions and 72 deletions
@@ -82,6 +82,29 @@ func (h *Handler) Unfreeze(c *gin.Context) {
response.OK(c, item)
}
func (h *Handler) SetDepositFreeQuota(c *gin.Context) {
adminID, ok := currentAdminID(c)
if !ok {
response.Unauthorized(c, "缺少管理员上下文")
return
}
userID, ok := parseID(c)
if !ok {
return
}
var req DepositFreeQuotaRequest
if err := c.ShouldBindJSON(&req); err != nil {
response.BadRequest(c, "免押额度不正确")
return
}
item, err := h.service.SetDepositFreeQuota(adminID, userID, req, auditMeta(c))
if err != nil {
writeAdminUserError(c, err)
return
}
response.OK(c, item)
}
func currentAdminID(c *gin.Context) (uint64, bool) {
value, ok := c.Get(middleware.ContextAdminID)
if !ok {