2025-09-27 15:19:58 +08:00
|
|
|
---
|
|
|
|
|
--- Generated by EmmyLua(https://github.com/EmmyLua)
|
|
|
|
|
--- Created by admin.
|
|
|
|
|
--- DateTime: 2025/9/25 08:19
|
|
|
|
|
---
|
|
|
|
|
|
2025-10-15 17:05:35 +08:00
|
|
|
local _M = {}
|
2025-09-27 15:19:58 +08:00
|
|
|
|
2025-10-16 16:47:24 +08:00
|
|
|
local dao = require("service.system.user")
|
2025-10-16 21:02:10 +08:00
|
|
|
local resp = require("util.response")
|
2025-10-16 16:47:24 +08:00
|
|
|
|
2025-10-15 17:05:35 +08:00
|
|
|
--获取所有用户信息
|
|
|
|
|
function _M.get_allusers()
|
2025-10-16 21:32:04 +08:00
|
|
|
local ret = dao.getAllUser()
|
|
|
|
|
local result = resp:json(0, 'ok', ret)
|
|
|
|
|
resp:send(result)
|
2025-10-15 17:05:35 +08:00
|
|
|
end
|
|
|
|
|
|
2025-10-16 16:47:24 +08:00
|
|
|
--根据用户id获取用户信息
|
|
|
|
|
function _M.get_user(m)
|
|
|
|
|
local id = m.id
|
2025-10-16 21:32:04 +08:00
|
|
|
local ret = dao.getUser(id)
|
|
|
|
|
local result = resp:json(0, 'ok', ret)
|
|
|
|
|
resp:send(result)
|
2025-10-15 17:22:04 +08:00
|
|
|
end
|
|
|
|
|
|
2025-10-15 17:05:35 +08:00
|
|
|
return _M
|