优化结构

This commit is contained in:
Yvan
2026-08-20 20:39:09 +08:00
parent b88c220e20
commit 01b5c2f78a
73 changed files with 3171 additions and 794 deletions
+14
View File
@@ -47,6 +47,20 @@ func (h *Payment) Order(c *gin.Context) {
}
httpx.OKWithData(c, order)
}
func (h *Payment) Orders(c *gin.Context) {
var req dto.PaymentOrderListRequest
if err := c.ShouldBindQuery(&req); err != nil {
httpx.Fail(c, err.Error())
return
}
items, total, page, pageSize, err := h.service.Orders(c.Request.Context(), &req)
if err != nil {
httpx.Fail(c, err.Error())
return
}
httpx.Write(c, httpx.CodeSuccess, httpx.PageResult{List: items, Total: total, Page: page, PageSize: pageSize}, "获取成功")
}
func (h *Payment) Create(c *gin.Context) {
var req dto.PaymentRequest
if err := c.ShouldBindJSON(&req); err != nil {