优化线下提号利润修改

This commit is contained in:
yml2213
2026-07-25 14:53:11 +08:00
parent 7ca68e6b8b
commit 9bb57b7094
10 changed files with 404 additions and 6 deletions
@@ -64,6 +64,30 @@ func (h *Handler) Complete(c *gin.Context) {
response.OK(c, item)
}
// UpdateProfit 修改提号中的线下利润(管理员)
func (h *Handler) UpdateProfit(c *gin.Context) {
adminID, ok := currentAdminID(c)
if !ok {
response.Unauthorized(c, "缺少管理员上下文")
return
}
id, ok := parseID(c)
if !ok {
return
}
var req UpdateProfitRequest
if err := c.ShouldBindJSON(&req); err != nil {
response.BadRequest(c, "利润金额不正确")
return
}
item, err := h.service.UpdateProfit(c.Request.Context(), id, req, adminID, auditMeta(c))
if err != nil {
writePickupError(c, err)
return
}
response.OK(c, item)
}
// Cancel 取消提号(管理员)
func (h *Handler) Cancel(c *gin.Context) {
adminID, ok := currentAdminID(c)