---
name: rsf-server-maintainer
description: Maintain and extend the Java Spring Boot rsf-server module in wms-master. Use when tasks involve reading or changing API/controller logic, manager or system domain services, MyBatis mapper XML SQL, security permissions, profile configuration, or module-level build checks that include rsf-server and its sibling modules.
Rsf Server Maintainer
Overview
Use this skill to make safe, minimal, and consistent backend changes in rsf-server.
Follow the repository's existing controller -> service -> mapper -> XML flow and validate changes before finishing.
Workflow
- Identify the domain before editing.
- Use
api for external integration endpoints (erp, mes, mcp, pda, wcs).
- Use
manager for warehouse business CRUD and workflows.
- Use
system for auth, menu, role, tenant, and shared platform settings.
- Locate related files quickly.
- Run
python skills/rsf-server-maintainer/scripts/locate_module.py <keyword>.
- If needed, use
rg:
powershell rg -n "<keyword>" src/main/java/com/vincent/rsf/server rg -n "<keyword>" src/main/resources/mapper
- Apply the minimum consistent change set.
- For endpoint changes, update controller method, request/response model, and service call together.
- For data access changes, keep mapper interface method signatures and XML
namespace/id aligned.
- For entity schema changes, update entity annotations and dependent params/dto wrappers in the same pass.
- Preserve existing response style (
R.ok().add(...), R.error(...)) and method-level @PreAuthorize.
- Validate before finishing.
- Run targeted checks with
rg to confirm all required symbols and paths exist.
- Build from workspace root (
wms-master) so parent modules resolve:
powershell mvn -pl rsf-server -am -DskipTests package
- If full build is heavy, run at least:
powershell mvn -pl rsf-server -am -DskipTests compile
Repository Conventions
- Keep package boundaries stable.
- Java root is
src/main/java/com/vincent/rsf/server.
- Mapper XML root is
src/main/resources/mapper/{manager,system}.
mybatis-plus.mapper-locations uses classpath:mapper/*/*.xml.
- Follow existing layered patterns.
- Most services use
IService<T> + ServiceImpl<Mapper, Entity>.
- Many mapper interfaces extend
BaseMapper<T>.
- Controller methods often extend
BaseController helpers (buildParam, getLoginUserId).
- Respect security and tenancy behavior.
- Public endpoint whitelist lives in
common/security/SecurityConfig.java (FILTER_PATH).
- Internal auth checks use
@PreAuthorize on controller methods.
- Tenant filtering is enforced by
common/config/MybatisPlusConfig.java; avoid bypassing tenant constraints accidentally.
- Keep runtime assumptions unchanged unless requested.
- Active profile is selected in
src/main/resources/application.yml.
- Project uses a local system-scope jar at
src/main/resources/lib/RouteUtils.jar.
- Keep existing text literals and encoding style unless the task explicitly asks for normalization.
- Keep encoding and diff size stable.
- Do not change file encoding unless explicitly requested.
- Keep edited files in UTF-8.
- Prefer the smallest possible code change that satisfies the requirement.
Change Playbooks
- Add or update an endpoint.
- Locate controller by route keyword.
- Confirm service method exists; add/update in interface and impl together.
- Add authorization annotation when endpoint is not in public
FILTER_PATH.
- Add or update SQL.
- Prefer
LambdaQueryWrapper when simple CRUD is enough.
- If XML is required, update mapper interface and XML in the same edit.
- Keep XML
namespace equal to mapper interface FQCN.
- Add or update an entity field.
- Update entity with MyBatis annotations (
@TableField, @TableLogic, typeHandler) as needed.
- Update request params/dto and controller mapping logic if the field crosses API boundaries.
Resources
- Use
references/repo-map.md for fast path lookup and command snippets.
- Use
scripts/locate_module.py to locate likely controller/service/mapper/entity/XML files by keyword.
Done Criteria
- Keep code changes scoped to the requested behavior.
- Keep controller/service/mapper/XML references consistent.
- Confirm security and tenant behavior remain coherent.
- Run at least one build or compile command, or explain why it could not run.