yinbentan
2024-08-02 3032034d254fc15f06a1d4260f35c49f0ef1e12f
extend/util/response.go
@@ -3,8 +3,8 @@
import (
   "fmt"
   "github.com/gin-gonic/gin"
   "jialian/extend/code"
   "net/http"
   "silkserver/extend/code"
)
type Response struct {
@@ -17,7 +17,7 @@
   Code     int         `json:"code"`
   Msg      string      `json:"msg"`
   Data     interface{} `json:"data"`
   Total    int         `json:"total"`
   Total    interface{} `json:"total"`
   Page     int         `json:"page"`
   PageSize int         `json:"pageSize"`
}
@@ -43,7 +43,7 @@
}
// ResponseFormatList 返回包含总数的列表
func ResponseFormatList(c *gin.Context, respStatus *code.Code, data interface{}, count int) {
func ResponseFormatList(c *gin.Context, respStatus *code.Code, data interface{}, count interface{}) {
   if respStatus == nil {
      respStatus = code.RequestParamError
   }
@@ -55,7 +55,7 @@
   })
}
func ResponseFormatListWithPage(c *gin.Context, respStatus *code.Code, data interface{}, count int, page, pageSize int) {
func ResponseFormatListWithPage(c *gin.Context, respStatus *code.Code, data interface{}, count interface{}, page, pageSize int) {
   if respStatus == nil {
      respStatus = code.RequestParamError
   }