31 lines
642 B
Go
31 lines
642 B
Go
package backend
|
|
|
|
import (
|
|
"github.com/gin-gonic/gin"
|
|
"qteam/app/constants/errorcode"
|
|
"qteam/app/http/controllers"
|
|
"qteam/app/http/entities/backend"
|
|
"qteam/app/services"
|
|
)
|
|
|
|
func Login(c *gin.Context) {
|
|
|
|
}
|
|
|
|
func UserList(c *gin.Context) {
|
|
request := new(backend.UserListRequest)
|
|
err := controllers.GenRequest(c, request)
|
|
if err != nil {
|
|
controllers.Error(c, errorcode.ParamError, err.Error())
|
|
return
|
|
}
|
|
|
|
where := map[string]interface{}{
|
|
"Mobile": request.Mobile,
|
|
}
|
|
count, list, err := services.GetListByWhere(where, request.Page, request.Limit)
|
|
|
|
controllers.Success(c, gin.H{"data": list, "count": count}, "成功")
|
|
return
|
|
}
|