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 ClientController

From Leeroopedia
Knowledge Sources
Domains User_Dashboard, API
Last Updated 2026-10-13 00:00 GMT

Overview

Concrete REST controller providing client-facing dashboard endpoints for user home data, profile management, recharge, function state, log management, and gallery access.

Description

The ClientController exposes multiple endpoints under `/client` for the user-facing dashboard: `home` retrieves user info, message logs, announcements, and MJ tasks; `updateAvatar`/`updatePassword`/`updateMobile` manage profile; `recharge` returns products and orders; `getFunctionState` returns enabled AI features; `deleteLog`/`emptyLog` manage chat logs; `deleteMjTask`/`emptyMjTask` manage MJ tasks; `uploadImg` handles image uploads; `gallery` returns public gallery images.

Usage

Import this controller when building the client-side dashboard for authenticated users to view their home page, manage their profile, check enabled features, manage conversation logs, and view the gallery.

Code Reference

Source Location

Signature

@RestController
@RequestMapping("/client")
@Transactional(rollbackFor = E.class)
public class ClientController {

    @RequestMapping(value = "/home")
    public B<ClientHomeRes> home(@Validated @RequestBody ClientHomeReq req);

    @RequestMapping(value = "/updateAvatar")
    @AvoidRepeatRequest(intervalTime = 2626560, msg = "头像每个月可更换一次")
    public B<Void> updateAvatar(MultipartFile file) throws IOException;

    @RequestMapping(value = "/updatePassword")
    public B<String> updatePassword(@Validated @RequestBody ClientUpdatePasswordReq req);

    @RequestMapping(value = "/recharge")
    public B<ClientRechargeRes> recharge();

    @RequestMapping(value = "/getFunctionState")
    public B<GetFunctionState> getOpenSdState();

    @RequestMapping(value = "/gallery")
    public B<List<GalleryRes>> gallery();

    @RequestMapping(value = "/client/conf")
    public B<ClientConfRes> clientConf();

    @RequestMapping(value = "/upload/img")
    public B<String> uploadImg(MultipartFile file) throws IOException;
}

Import

import com.intelligent.bot.api.sys.ClientController;

I/O Contract

Inputs

Name Type Required Description
req ClientHomeReq Yes Contains sendType for filtering logs
file MultipartFile No Avatar or image file to upload
req ClientUpdatePasswordReq No New password
req ClientUpdateMobileReq No New mobile number
req ClientDeleteLog No Log ID to delete
req ClientEmptyLog No SendType for emptying logs

Outputs

Name Type Description
home returns B<ClientHomeRes> User info, logs, announcements, MJ tasks
recharge returns B<ClientRechargeRes> Product list, order list, pay type
getFunctionState returns B<GetFunctionState> Enabled AI feature flags
gallery returns B<List<GalleryRes>> Public MJ gallery images
clientConf returns B<ClientConfRes> Client logo and name config
uploadImg returns B<String> Uploaded image URL

Usage Examples

Get Home Data

// POST /client/home
// Authorization: Bearer <jwt-token>

{
    "sendType": 1  // 1=GPT, 4=MJ, etc.
}

// Response includes user info, message logs, announcements, MJ tasks

Update Password

// POST /client/updatePassword
{
    "password": "newPassword123"
}
// Response: { "status": 200, "message": "修改成功请重新登陆" }

Get Function State

// POST /client/getFunctionState
// Response:
{
    "isOpenSd": true,
    "isOpenMj": true,
    "isOpenGpt": true,
    "isOpenSpark": false,
    "isOpenGptVision": false
}

Related Pages

Page Connections

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