f11097ab83
拆分用户中心退款日志查询: - 新增 GET /v1/public/user/commission_return_log(333/337/338) - 旧 GET /v1/public/user/withdrawal_log?biz_type=commission_refund 复用新逻辑做兼容 - 默认 withdrawal_log 行为不变(仍查 withdrawals 表) - 单测覆盖 333/337/338 happy path、坏 JSON 跳过、object_id 隔离、handler 级 HTTP 响应 父 issue: HIF-25 子 issue: HIF-26
27 lines
808 B
Go
27 lines
808 B
Go
package user
|
|
|
|
import (
|
|
"github.com/gin-gonic/gin"
|
|
"github.com/perfect-panel/server/internal/logic/public/user"
|
|
"github.com/perfect-panel/server/internal/svc"
|
|
"github.com/perfect-panel/server/internal/types"
|
|
"github.com/perfect-panel/server/pkg/result"
|
|
)
|
|
|
|
// Query Withdrawal Log (biz_type=commission_refund deprecated, use /commission_return_log)
|
|
func QueryWithdrawalLogHandler(svcCtx *svc.ServiceContext) func(c *gin.Context) {
|
|
return func(c *gin.Context) {
|
|
var req types.QueryWithdrawalLogListRequest
|
|
_ = c.ShouldBind(&req)
|
|
validateErr := svcCtx.Validate(&req)
|
|
if validateErr != nil {
|
|
result.ParamErrorResult(c, validateErr)
|
|
return
|
|
}
|
|
|
|
l := user.NewQueryWithdrawalLogLogic(c.Request.Context(), svcCtx)
|
|
resp, err := l.QueryWithdrawalLog(&req)
|
|
result.HttpResult(c, resp, err)
|
|
}
|
|
}
|