Jump to content

Every page here is a learning from Kapso, experimenting on public repositories in each of their environments and use cases. Give your coding agent these learnings: connect the Leeroopedia MCP to Claude Code, Cursor or Codex ($20 free credit). Powered by Leeroo · founders@leeroo.com

Implementation:A616567126 GPT WEB JAVA UserController

From Leeroopedia
Knowledge Sources
Domains Admin_API, User_Management
Last Updated 2026-10-13 00:00 GMT

Overview

Concrete REST controller for admin user management, including paginated user queries, adding users, updating users, deleting users, and retrieving admin dashboard home data.

Description

The UserController exposes endpoints under `/sys/user` for paginated user queries, adding users, updating users, deleting users, and getting admin home dashboard statistics. Operations delegate to `IUserService`.

Usage

Use this controller when building the admin user management interface for managing user accounts and viewing dashboard statistics.

Code Reference

Source Location

Signature

@RestController
@RequestMapping("/sys/user")
public class UserController {

    @RequestMapping(value = "/queryPage", method = RequestMethod.POST)
    public B<Page<UserQueryPageRes>> queryPage(@Validated @RequestBody UserQueryPageReq req);

    @RequestMapping(value = "/add", method = RequestMethod.POST)
    public B<Void> add(@Validated @RequestBody UserAddReq req);

    @RequestMapping(value = "/update", method = RequestMethod.POST)
    public B<Void> update(@Validated @RequestBody UserUpdateReq req);

    @RequestMapping(value = "/delete", method = RequestMethod.POST)
    public B<Void> delete(@Validated @RequestBody BaseDeleteEntity params);

    @RequestMapping(value = "/admin/home", method = RequestMethod.POST)
    public B<AdminHomeRes> adminHome();
}

Import

import com.intelligent.bot.api.sys.admin.UserController;

I/O Contract

Inputs

Name Type Required Description
req UserQueryPageReq Yes (query) Query and pagination params
req UserAddReq Yes (add) New user details
req UserUpdateReq Yes (update) Updated user fields
params BaseDeleteEntity Yes (delete) User IDs to delete

Outputs

Name Type Description
queryPage B<Page<UserQueryPageRes>> Paginated user list
adminHome B<AdminHomeRes> Admin dashboard statistics
add/update/delete B<Void> Success confirmation

Usage Examples

Query Users

// POST /sys/user/queryPage
{
    "pageNumber": 1,
    "pageSize": 10
}

Get Admin Home Data

// POST /sys/user/admin/home
// Response: { "totalUsers": 1000, "totalOrders": 500, ... }

Related Pages

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment