Skip to content

Config & Notice ​

Two small admin modules: key-value system parameters, and notices (announcements) that also appear on the C-end.

System Configuration ​

Features ​

  • Key-value parameters stored in sys_config
  • Paginated list, create, update, delete

Data Model — SysConfig (sys_config) ​

FieldTypeDescription
configIdLongPrimary key
configNameStringDisplay name
configKeyStringParameter key
configValueStringParameter value
configTypeIntegerBuilt-in or custom
remarkStringNotes

Plus the common audit fields (creatorId, createTime, updaterId, updateTime, deleted).

API Endpoints ​

ConfigController (server-admin):

MethodEndpointPermissionDescription
POST/admin/configsystem:config:listPaginated list
POST/admin/config/createsystem:config:addCreate a parameter
PUT/admin/config/updatesystem:config:editUpdate a parameter
POST/admin/config/deletesystem:config:removeDelete a parameter

Seeded Parameters ​

Flyway V2 seeds sys.index.skinName, sys.index.sideTheme and sys.user.initPassword. They are data for the admin UI and your own code — the backend does not read them on its own, and values are not cached.

Service Layer ​

SysConfigService (admin-user api): findByConfigKey(key) plus the usual CRUD; reads go straight to the database.

Notice Management ​

Features ​

  • Create and manage notices and announcements
  • Open / closed status — open notices are what the C-end shows
  • Paginated list

Data Model — SysNotice (sys_notice) ​

FieldTypeDescription
noticeIdLongPrimary key
noticeTitleStringTitle
noticeTypeInteger1 notification, 2 announcement
noticeContentStringContent
statusInteger1 open, 0 closed
remarkStringNotes

API Endpoints ​

NoticeController (server-admin):

MethodEndpointPermissionDescription
POST/admin/noticesystem:notice:listPaginated list
POST/admin/notice/createsystem:notice:addCreate a notice
PUT/admin/notice/updatesystem:notice:editUpdate a notice
POST/admin/notice/deletesystem:notice:removeDelete a notice

On the C-end, GET /web/notices returns the 20 most recent open notices (newest first).

Released under the MIT License.