feat(多租户):多租户数据隔离功能实现

This commit is contained in:
2025-05-15 16:51:48 +08:00
parent 4beecb5d3d
commit d4c39ac6b5
15 changed files with 134 additions and 27 deletions
@@ -41,7 +41,7 @@ public class HomeCarousel extends SuperEntity {
private Date updateTime;
//租户ID
private Long tenantId;
private String tenantId;
private String company;
private Integer isDel;
}
@@ -43,7 +43,7 @@ public class OrderFile extends SuperEntity {
@TableField(fill = FieldFill.INSERT_UPDATE)
private Date updateTime;
//租户ID
private Long tenantId;
private String tenantId;
private Integer isDel;
}
@@ -50,7 +50,7 @@ public class QrCode extends SuperEntity {
@TableField(fill = FieldFill.INSERT_UPDATE)
private Date updateTime;
//租户ID
private Long tenantId;
private String tenantId;
private String company;
private Integer isDel;
@@ -38,9 +38,9 @@ public class Tourism extends SuperEntity {
private Date createTime;
@TableField(fill = FieldFill.INSERT_UPDATE)
private Date updateTime;
//租户ID
private Long tenantId;
private String tenantId;
private String company;
private Integer isDel;
}
@@ -37,7 +37,7 @@ public class TourismFile extends SuperEntity {
@TableField(fill = FieldFill.INSERT_UPDATE)
private Date updateTime;
//租户ID
private Long tenantId;
private String tenantId;
private String company;
private Integer isDel;
}
@@ -29,7 +29,7 @@ knife4j:
zlt:
#多租户配置
tenant:
enable: false
enable: true
ignoreTables:
- edit_task
- home_carousel
@@ -41,11 +41,15 @@ zlt:
- order_statistics
ignoreSqls:
# 查询全部列表
- com.central.order.mapper.OrderMapper.findList
# - com.central.order.mapper.OrderMapper.findList
# 获取某个订单
- com.central.order.mapper.OrderMapper.getOrderByNumber
# - com.central.order.mapper.OrderMapper.getOrderByNumber
noIgnoreSqls:
- com.central.order.mapper.OrderMapper.findList
- com.central.order.mapper.TourismMapper.findList
- com.central.order.mapper.OrderFileMapper.findList
- com.central.order.mapper.QrCodeMapper.findList
- com.central.order.mapper.QrCodeMapper.save
# 微信支付商户号
tencent:
merchantId: ${zlt.wxpay.merchantId}