123456789101112131415161718192021222324252627 |
- package admin
- import (
- "github.com/gin-gonic/gin"
- "project_management/app/e"
- "project_management/app/model"
- "project_management/unity"
- )
- // AdminApplyList 管理员获取所有应用列表
- func AdminApplyList(c *gin.Context) {
- var params unity.QueryPageParams
- if err := c.ShouldBindJSON(¶ms); err != nil {
- e.ResponseWithMsg(c, e.JSONParsingFailed, e.JSONParsingFailed.GetMsg())
- return
- }
- queryCond := "app_name like ?"
- params.Query = "%" + params.Query + "%"
- result, total, err := unity.PaginateWithCondition(params, model.Apply{}, queryCond)
- if err != nil {
- e.ResponseWithMsg(c, e.PaginationFailed, e.PaginationFailed.GetMsg())
- return
- } else {
- e.ResPonsePage(c, result, total, params)
- return
- }
- }
|