chore(generator): 更新代码生成配置和文档说明

- 修改代码生成配置中的作者名称为 zch
- 更新生成包路径为 org.dromara.rfid
- 在RFID.md文档中完善了MybatisPlus连表查询的规范说明
- 明确指出MybatisPlus自带方法不支持连表查询,需要手写mapper.xml SQL语句
- 补充实体类连表字段需加@TableField(exist = false)注解的要求
main
zangch@mesnac.com 3 weeks ago
parent 88b697e00e
commit 3f65fd0e7c

@ -7,8 +7,8 @@
- **代码注意事项**
1. ** 连表查询规范**
使用 `mybatis-plus`做连表查询时:
- `MybatisPlus`自带方法不支持连表查询需要在mapper.xml中编写sql语句.
- 在实体类和 `VO` 中添加连表字段,实体类字段需加 `@TableField(exist = false)` 注解。
- `MybatisPlus`自带方法不支持连表查询需要在mapper.xml中编写sql语句
2. **types 同步维护**
连表查询得到的字段,需要同步补充到前端 `types.ts` 中,保证类型定义完整。
3. **接口前缀规范**

@ -50,6 +50,7 @@ public class DashboardVO implements Serializable {
*/
@Data
public static class RealtimeStats implements Serializable {
@Serial
private static final long serialVersionUID = 1L;
@ -62,6 +63,7 @@ public class DashboardVO implements Serializable {
*
*/
private List<AlarmStatVO> alarmStats;
}
/**
@ -69,6 +71,7 @@ public class DashboardVO implements Serializable {
*/
@Data
public static class StatisticsOverview implements Serializable {
@Serial
private static final long serialVersionUID = 1L;
@ -91,6 +94,7 @@ public class DashboardVO implements Serializable {
*
*/
private Long alarmCount;
}
/**
@ -102,6 +106,7 @@ public class DashboardVO implements Serializable {
*/
@Data
public static class LocationTreeNode implements Serializable {
@Serial
private static final long serialVersionUID = 1L;
@ -165,6 +170,7 @@ public class DashboardVO implements Serializable {
*
*/
private List<LocationTreeNode> children;
}
// ==================== 以下为已废弃的实体类,保留以备参考 ====================
@ -206,6 +212,7 @@ public class DashboardVO implements Serializable {
*/
@Data
public static class SuccessRateTrend implements Serializable {
@Serial
private static final long serialVersionUID = 1L;
@ -219,7 +226,11 @@ public class DashboardVO implements Serializable {
*/
private Double successRate;
/**
* 98.5
*/
private Double yesterdaySuccessRate;
}
/**
@ -227,6 +238,7 @@ public class DashboardVO implements Serializable {
*/
@Data
public static class AlarmStatVO implements Serializable {
@Serial
private static final long serialVersionUID = 1L;
@ -254,5 +266,6 @@ public class DashboardVO implements Serializable {
*
*/
private String alarmAction;
}
}

@ -1,9 +1,9 @@
# 代码生成
gen:
# 作者
author: Lion Li
author: zch
# 默认生成包路径 system 需改成自己的模块名称 如 system monitor tool
packageName: org.dromara.system
packageName: org.dromara.rfid
# 自动去除表前缀默认是false
autoRemovePre: false
# 表前缀(生成类名不会包含表前缀,多个用逗号分隔)

Loading…
Cancel
Save