feat: client 增删改查

This commit is contained in:
Blizzard
2025-05-08 23:03:00 +08:00
parent 75e9157e5e
commit ab51ba91bc
41 changed files with 1093 additions and 57 deletions
+29
View File
@@ -1,4 +1,33 @@
package system
import (
"github.com/gin-gonic/gin"
"go.uber.org/zap"
"sundynix-go/global"
"sundynix-go/model/commom/response"
systemReq "sundynix-go/model/system/request"
)
type UserApi struct {
}
func (u *UserApi) GetUserList(c *gin.Context) {
var pageInfo systemReq.GetUserList
err := c.ShouldBindJSON(&pageInfo)
if err != nil {
response.FailWithMsg(err.Error(), c)
return
}
list, total, err := UserService.GetUserList(pageInfo)
if err != nil {
global.Logger.Error("获取用户列表失败!", zap.Error(err))
response.FailWithMsg(err.Error(), c)
return
}
response.OkWithData(response.PageResult{
List: list,
Total: total,
Page: pageInfo.Current,
PageSize: pageInfo.PageSize,
}, c)
}