123456789101112131415161718192021222324252627282930313233343536373839404142 |
- import { Request, Response } from 'express';
- /**
- * @author bianlanzhou
- * @since 2024-10-21
- * @desc 用户
- */
- /** 等待时间 */
- const waitTime = (time: number = 100) => {
- return new Promise((resolve) => {
- setTimeout(() => {
- resolve(true);
- }, time);
- });
- };
- /** 查询用户响应数据 */
- const queryUserRespData = {
- "success": true,
- "errCode": null,
- "errMessage": null,
- "data": [
- {
- "id": "10000",
- "deptId": "10001",
- "username": "admin",
- "status": "ok"
- }
- ]
- }
- /** 查询用户 */
- const handleQueryUser = async (req: Request, res: Response) => {
- await waitTime(2000);
- res.json(queryUserRespData);
- }
- export default {
- 'GET /system/user/list': handleQueryUser,
- };
|