Files
roll-room/doc/开发标准/标准.md
2026-04-23 16:58:11 +08:00

20 lines
578 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# controller 请求参数
使用一个自定义的Request类来接收参数。
# controller 返回的类型
现状目前返回的类型有R,AjaxResult,PageDataInfo等
标准统一返回R<具体类型>类型。
# mapper
mapper继承Mybatis-Plus的BaseMapper。
```java
@Mapper
public interface AdminGameSugarUserMapper extends BaseMapper<GameSugarUser> {
}
```
单表查询时使用mybatis-plus的Lambda查询方式。
要执行复杂的查询逻辑时用Lambda查询不好实现或者很复杂时可以使用@Select注解在mapper类中写sql实现。