Compare commits

...

95 Commits
master ... bug

Author SHA1 Message Date
review512jwy@163.com 07761702ff retain_alert问题 4 weeks ago
review512jwy@163.com 420c1a7d1f 告警相关查询,F10兼容 2 months ago
review512jwy@163.com dc124c0412 sql兼容回滚 2 months ago
review512jwy@163.com d7da37dacb sql兼容回滚 2 months ago
review512jwy@163.com cd26cf9b02 安全报告 2 months ago
review512jwy@163.com e66145aa67 告警一览相关页面先排除F10告警 2 months ago
review512jwy@163.com ab52962e11 查询告警时,只显示1-未对应,2-对应中,去掉【自动恢复告警时保留 的】 2 months ago
review512jwy@163.com df7c73dc7f main设备和sub设备,图表数据选择 2 months ago
review512jwy@163.com e5f92f294c 层级角色和层级管理 2 months ago
review512jwy@163.com a331f189dc 新用户楼宇筛选 2 months ago
review512jwy@163.com 5e7ed5b9b0 getOwnMenuTree接口多语言 2 months ago
review512jwy@163.com a227364006 getOverallBoundLevel逻辑完善 2 months ago
review512jwy@163.com 6a85f244d5 getOverallBoundLevel的bug 2 months ago
review512jwy@163.com 89d78eeee5 adsc标识 2 months ago
review512jwy@163.com b8ebbd0a7e 完善代码 2 months ago
review512jwy@163.com 768698d2e0 TrendLog 2 months ago
review512jwy@163.com 06e0ed15cf 概览层级树 2 months ago
review512jwy@163.com 761a41a806 Merge branch 'ppt-20260120' into jwy 2 months ago
review512jwy@163.com 5a8f290586 修改权限,改为【全部 拒绝 只读】 2 months ago
review512jwy@163.com 8d578e825d 收藏分页 3 months ago
review512jwy@163.com cd3bec963b 收藏列表分页数量对不上问题 3 months ago
review512jwy@163.com 38aa47d1e6 收藏列表分页数量对不上问题 3 months ago
review512jwy@163.com 3829144317 日志改完模块名 3 months ago
review512jwy@163.com 73ea589207 收藏接口,补充分页 3 months ago
review512jwy@163.com 94f45ae874 导出excel名 3 months ago
review512jwy@163.com 6c21b23e42 Merge branch 'ppt-20260120' into jwy 3 months ago
review512jwy@163.com 23bc21c798 Merge branch 'zhc' into ppt-20260120 3 months ago
review512jwy@163.com edd1b08bf1 getTopCompanyId死循环 3 months ago
review512jwy@163.com 2f9e6e4a3b 收藏展示全部 3 months ago
review512jwy@163.com 04c65653b6 代码完善 3 months ago
zhczyx@163.com 3c030eda73 Merge branch 'ppt-20260120' into zhc 3 months ago
review512jwy@163.com d3dbe13ca0 redis取latestValueBO bug 3 months ago
zhczyx@163.com 33a65f8bfd Merge branch 'ppt-20260120' into zhc 3 months ago
review512jwy@163.com cab19659c0 分类bug 3 months ago
zhczyx@163.com 6cd62c6b94 Merge branch 'ppt-20260120' into zhc 3 months ago
zhczyx@163.com 111d6f8aff 开启楼宇列表里的无效类别判定,增加无效图片返回 3 months ago
review512jwy@163.com cc4b73de63 无效图标 3 months ago
review512jwy@163.com b0f65a9091 Merge branch 'zhc' into jwy 3 months ago
zhczyx@163.com 1f6790a49a 开启楼宇列表里的无效类别判定,增加无效图片返回 3 months ago
review512jwy@163.com 76cbfacee9 处理redisUtil的序列化问题 4 months ago
review512jwy@163.com 0df1fd0702 在redis里存状态设备上一天最后一条状态 4 months ago
review512jwy@163.com 33f97d8770 楼宇不传,返回全部 4 months ago
review512jwy@163.com a9913ba75b Merge branch 'zhc' into ppt-20260120 4 months ago
review512jwy@163.com ebc2fb5e47 导出数量抽到配置文件去 4 months ago
review512jwy@163.com f75630b639 Merge branch 'zhc' into ppt-20260120 4 months ago
review512jwy@163.com e6952289e5 导出优化 4 months ago
review512jwy@163.com 89fe8f8c85 Merge branch 'zhc' into ppt-20260120 4 months ago
review512jwy@163.com 1d7b42a42e 导出优化 4 months ago
zhczyx@163.com 3afde926fa 修改邮箱信息和模板 4 months ago
zhczyx@163.com 0d614ddcd3 修改邮箱信息和模板 4 months ago
review512jwy@163.com fcf2417662 Merge branch 'zhc' into ppt-20260120 4 months ago
review512jwy@163.com 55988a97dd 完善代码 4 months ago
review512jwy@163.com c6a7648323 Merge branch 'zhc' into ppt-20260120 4 months ago
zhczyx@163.com db1ba6a396 修改邮箱信息和模板 4 months ago
zhczyx@163.com 0cac279d0e 修改邮箱信息和模板 4 months ago
zhczyx@163.com 5e7c2710ed 修改邮箱信息和模板 4 months ago
review512jwy@163.com 608a33d218 代码完善 4 months ago
review512jwy@163.com 5a398c0ffc 代码完善 4 months ago
review512jwy@163.com 356273f74d 计测设备,增加前日、前年数据 4 months ago
review512jwy@163.com c716f5e886 修改文件名 4 months ago
review512jwy@163.com 5d4d03ba1d 导出优化 4 months ago
zhczyx@163.com 79957bb825 Merge branch 'ppt-20260120' into zhc 4 months ago
review512jwy@163.com 0760418b5f 收藏增加警报设备 4 months ago
review512jwy@163.com 8130e97089 收藏增加警报设备 4 months ago
review512jwy@163.com 32cd702112 收藏增加警报设备 4 months ago
zhczyx@163.com 96d42db08f Merge branch 'ppt-20260120' into zhc 4 months ago
review512jwy@163.com 9d4d8b4b76 警报设备增加inAlarm 4 months ago
zhczyx@163.com d297dccb07 Merge branch 'ppt-20260120' into zhc 4 months ago
review512jwy@163.com 525ab5e21a 状态设备增加inAlarm; 4 months ago
review512jwy@163.com 1a1a22fa3e 添加用户userType的bug 4 months ago
review512jwy@163.com 5a0917340e 导出日志问题修改 4 months ago
zhczyx@163.com e3553cc843 Merge branch 'ppt-20260120' into zhc 4 months ago
review512jwy@163.com a96b9af3a8 StopRun空判定 4 months ago
review512jwy@163.com 7d1ecfdfec 导出加上日期和时间戳 4 months ago
zhczyx@163.com 36184a61f5 Merge branch 'ppt-20260120' into zhc 4 months ago
review512jwy@163.com 2183211a0c 导出加上日期和时间戳 4 months ago
zhczyx@163.com 3241c29cac Merge branch 'ppt-20260120' into zhc 4 months ago
zhczyx@163.com bca3393cd2 同步 4 months ago
review512jwy@163.com 9dc8c2f52c 姓名,中间可以加两个空格 4 months ago
review512jwy@163.com a913f8cc40 首页【通知】支持显示多个 4 months ago
review512jwy@163.com 184905917e 楼宇下设备没有的监视点分类 4 months ago
review512jwy@163.com 6bd4021f39 补充日志 4 months ago
review512jwy@163.com b2e633e311 增加通知、通知分类管理 4 months ago
review512jwy@163.com 16dc1691cd 用户增加 姓、名字段 4 months ago
review512jwy@163.com 1c7b2e67f6 状态图24小时前端处理,后台取消 4 months ago
review512jwy@163.com eac52febd5 日志记录真实ip 5 months ago
review512jwy@163.com f0db8e6e43 告警设备接口增加searchType=4类型、导出表头对齐 5 months ago
review512jwy@163.com ec026e6510 状态运行图补充24小时 5 months ago
review512jwy@163.com e4f84a2239 状态迁移图 5 months ago
review512jwy@163.com c15a8c3125 dashboard告警恢复只有告警设备需要告警 5 months ago
review512jwy@163.com ecb9d4ac2b dashboard告警改为全部设备 5 months ago
review512jwy@163.com e200d1dba7 latest_是秒ts 5 months ago
review512jwy@163.com 668f26bd84 latest_是秒ts 5 months ago
review512jwy@163.com c77a58b174 合并冲突 5 months ago
review512jwy@163.com 4f6f2b1581 getOverviewInfo改为物件层级 6 months ago
  1. 7
      document/db/20260327.sql
  2. 14
      dongjian-dashboard-back-common/src/main/java/com/dongjian/dashboard/back/common/Constants.java
  3. 64
      dongjian-dashboard-back-common/src/main/java/com/dongjian/dashboard/back/common/config/DataSourceInterceptor.java
  4. 12
      dongjian-dashboard-back-common/src/main/resources/config/language/msg/msg_cn.yml
  5. 13
      dongjian-dashboard-back-common/src/main/resources/config/language/msg/msg_en.yml
  6. 83
      dongjian-dashboard-back-common/src/main/resources/config/language/msg/msg_jp.yml
  7. 154
      dongjian-dashboard-back-common/src/main/resources/config/language/msg/msg_jp_bak.yml
  8. 11
      dongjian-dashboard-back-controller/buildPush-aeon-prod.sh
  9. 10
      dongjian-dashboard-back-controller/buildPush-aeon.sh
  10. 3
      dongjian-dashboard-back-controller/dockerfile
  11. 12
      dongjian-dashboard-back-controller/src/main/java/com/dongjian/dashboard/back/configurator/aspect/OperationLogAspect.java
  12. 1
      dongjian-dashboard-back-controller/src/main/java/com/dongjian/dashboard/back/controller/BuildingController.java
  13. 98
      dongjian-dashboard-back-controller/src/main/java/com/dongjian/dashboard/back/controller/DashboardNotificationCategoryController.java
  14. 98
      dongjian-dashboard-back-controller/src/main/java/com/dongjian/dashboard/back/controller/DashboardNotificationController.java
  15. 4
      dongjian-dashboard-back-controller/src/main/java/com/dongjian/dashboard/back/controller/DeviceController.java
  16. 80
      dongjian-dashboard-back-controller/src/main/java/com/dongjian/dashboard/back/controller/DeviceDataAccumulateController.java
  17. 80
      dongjian-dashboard-back-controller/src/main/java/com/dongjian/dashboard/back/controller/DeviceDataAlarmController.java
  18. 104
      dongjian-dashboard-back-controller/src/main/java/com/dongjian/dashboard/back/controller/DeviceDataBaStatusController.java
  19. 88
      dongjian-dashboard-back-controller/src/main/java/com/dongjian/dashboard/back/controller/DeviceDataMeasureController.java
  20. 181
      dongjian-dashboard-back-controller/src/main/java/com/dongjian/dashboard/back/controller/DeviceDataTrendLogController.java
  21. 1
      dongjian-dashboard-back-controller/src/main/java/com/dongjian/dashboard/back/controller/LevelController.java
  22. 203
      dongjian-dashboard-back-controller/src/main/java/com/dongjian/dashboard/back/controller/LevelRoleController.java
  23. 15
      dongjian-dashboard-back-controller/src/main/java/com/dongjian/dashboard/back/controller/OverviewController.java
  24. 46
      dongjian-dashboard-back-controller/src/main/java/com/dongjian/dashboard/back/controller/RoleController.java
  25. 53
      dongjian-dashboard-back-controller/src/main/resources/config/application.properties
  26. 6
      dongjian-dashboard-back-controller/src/test/java/com/dongjian/dashboard/back/controller/AdminRoleControllerTest.java
  27. 96
      dongjian-dashboard-back-dao/src/main/java/com/dongjian/dashboard/back/dao/auto/BaStatusHistoryMapper.java
  28. 96
      dongjian-dashboard-back-dao/src/main/java/com/dongjian/dashboard/back/dao/auto/DashboardLevelRoleMapper.java
  29. 64
      dongjian-dashboard-back-dao/src/main/java/com/dongjian/dashboard/back/dao/auto/DashboardLevelRoleObjectMapper.java
  30. 96
      dongjian-dashboard-back-dao/src/main/java/com/dongjian/dashboard/back/dao/auto/DashboardLevelRoleUserMapper.java
  31. 96
      dongjian-dashboard-back-dao/src/main/java/com/dongjian/dashboard/back/dao/auto/DashboardNotificationCategoryMapper.java
  32. 9
      dongjian-dashboard-back-dao/src/main/java/com/dongjian/dashboard/back/dao/ex/BaStatusHistoryMapperExt.java
  33. 4
      dongjian-dashboard-back-dao/src/main/java/com/dongjian/dashboard/back/dao/ex/BasicBuildingMapperExt.java
  34. 16
      dongjian-dashboard-back-dao/src/main/java/com/dongjian/dashboard/back/dao/ex/BasicRoleMenuRelationMapperExt.java
  35. 2
      dongjian-dashboard-back-dao/src/main/java/com/dongjian/dashboard/back/dao/ex/BasicUserMapperExt.java
  36. 17
      dongjian-dashboard-back-dao/src/main/java/com/dongjian/dashboard/back/dao/ex/DashboardNotificationCategoryMapperExt.java
  37. 5
      dongjian-dashboard-back-dao/src/main/java/com/dongjian/dashboard/back/dao/ex/DashboardNotificationMapperExt.java
  38. 15
      dongjian-dashboard-back-dao/src/main/java/com/dongjian/dashboard/back/dao/ex/DeviceInfoMapperExt.java
  39. 3
      dongjian-dashboard-back-dao/src/main/java/com/dongjian/dashboard/back/dao/ex/DeviceRawdataRealtimeMapperExt.java
  40. 9
      dongjian-dashboard-back-dao/src/main/java/com/dongjian/dashboard/back/dao/ex/LevelMapperExt.java
  41. 43
      dongjian-dashboard-back-dao/src/main/java/com/dongjian/dashboard/back/dao/ex/LevelRoleMapperExt.java
  42. 9
      dongjian-dashboard-back-dao/src/main/java/com/dongjian/dashboard/back/dao/ex/LevelRoleObjectMapperExt.java
  43. 9
      dongjian-dashboard-back-dao/src/main/java/com/dongjian/dashboard/back/dao/ex/LevelRoleUserMapperExt.java
  44. 19
      dongjian-dashboard-back-dao/src/main/java/com/dongjian/dashboard/back/dao/ex/OverviewInfoMapperExt.java
  45. 257
      dongjian-dashboard-back-dao/src/main/resources/mappers/auto/BaStatusHistoryMapper.xml
  46. 57
      dongjian-dashboard-back-dao/src/main/resources/mappers/auto/BasicUserMapper.xml
  47. 334
      dongjian-dashboard-back-dao/src/main/resources/mappers/auto/DashboardLevelRoleMapper.xml
  48. 244
      dongjian-dashboard-back-dao/src/main/resources/mappers/auto/DashboardLevelRoleObjectMapper.xml
  49. 319
      dongjian-dashboard-back-dao/src/main/resources/mappers/auto/DashboardLevelRoleUserMapper.xml
  50. 334
      dongjian-dashboard-back-dao/src/main/resources/mappers/auto/DashboardNotificationCategoryMapper.xml
  51. 33
      dongjian-dashboard-back-dao/src/main/resources/mappers/auto/DashboardNotificationMapper.xml
  52. 23
      dongjian-dashboard-back-dao/src/main/resources/mappers/ex/BasicBuildingMapperExt.xml
  53. 70
      dongjian-dashboard-back-dao/src/main/resources/mappers/ex/BasicRoleMenuRelationMapperExt.xml
  54. 13
      dongjian-dashboard-back-dao/src/main/resources/mappers/ex/BasicUserMapperExt.xml
  55. 43
      dongjian-dashboard-back-dao/src/main/resources/mappers/ex/DashboardNotificationCategoryMapperExt.xml
  56. 41
      dongjian-dashboard-back-dao/src/main/resources/mappers/ex/DashboardNotificationMapperExt.xml
  57. 126
      dongjian-dashboard-back-dao/src/main/resources/mappers/ex/DeviceInfoMapperExt.xml
  58. 47
      dongjian-dashboard-back-dao/src/main/resources/mappers/ex/DeviceRawdataRealtimeMapperExt.xml
  59. 5
      dongjian-dashboard-back-dao/src/main/resources/mappers/ex/FavoritedDeviceMapperExt.xml
  60. 154
      dongjian-dashboard-back-dao/src/main/resources/mappers/ex/LevelMapperExt.xml
  61. 213
      dongjian-dashboard-back-dao/src/main/resources/mappers/ex/LevelRoleMapperExt.xml
  62. 1
      dongjian-dashboard-back-dao/src/main/resources/mappers/ex/MonitoringPointCategoryGroupMapperExt.xml
  63. 1
      dongjian-dashboard-back-dao/src/main/resources/mappers/ex/MonitoringPointCategoryMapperExt.xml
  64. 8
      dongjian-dashboard-back-dao/src/main/resources/mappers/ex/OperationLogMapperExt.xml
  65. 78
      dongjian-dashboard-back-dao/src/main/resources/mappers/ex/OverviewInfoMapperExt.xml
  66. 23
      dongjian-dashboard-back-dao/src/main/resources/mybatis-generator/generatorConfig.xml
  67. 9
      dongjian-dashboard-back-model/src/main/java/com/dongjian/dashboard/back/bo/LatestValueBO.java
  68. 25
      dongjian-dashboard-back-model/src/main/java/com/dongjian/dashboard/back/dto/dashboardnotification/DashboardNotificationCategorySearchParams.java
  69. 22
      dongjian-dashboard-back-model/src/main/java/com/dongjian/dashboard/back/dto/dashboardnotification/DashboardNotificationSearchParams.java
  70. 16
      dongjian-dashboard-back-model/src/main/java/com/dongjian/dashboard/back/dto/dashboardnotification/DeleteDashboardNotificationCategoryParams.java
  71. 16
      dongjian-dashboard-back-model/src/main/java/com/dongjian/dashboard/back/dto/dashboardnotification/DeleteDashboardNotificationParams.java
  72. 21
      dongjian-dashboard-back-model/src/main/java/com/dongjian/dashboard/back/dto/dashboardnotification/OptDashboardNotificationCategoryParams.java
  73. 26
      dongjian-dashboard-back-model/src/main/java/com/dongjian/dashboard/back/dto/dashboardnotification/OptDashboardNotificationParams.java
  74. 2
      dongjian-dashboard-back-model/src/main/java/com/dongjian/dashboard/back/dto/data/AlarmDataSearchParam.java
  75. 3
      dongjian-dashboard-back-model/src/main/java/com/dongjian/dashboard/back/dto/data/DataSearchParam.java
  76. 12
      dongjian-dashboard-back-model/src/main/java/com/dongjian/dashboard/back/dto/data/TrendLogDataSearchParam.java
  77. 3
      dongjian-dashboard-back-model/src/main/java/com/dongjian/dashboard/back/dto/device/LineDataSearchParams.java
  78. 3
      dongjian-dashboard-back-model/src/main/java/com/dongjian/dashboard/back/dto/level/OptLevelParam.java
  79. 19
      dongjian-dashboard-back-model/src/main/java/com/dongjian/dashboard/back/dto/levelrole/BindUserParam.java
  80. 13
      dongjian-dashboard-back-model/src/main/java/com/dongjian/dashboard/back/dto/levelrole/DeleteLevelRoleParam.java
  81. 31
      dongjian-dashboard-back-model/src/main/java/com/dongjian/dashboard/back/dto/levelrole/OptLevelRoleParam.java
  82. 14
      dongjian-dashboard-back-model/src/main/java/com/dongjian/dashboard/back/dto/levelrole/PageBoundRoleSearchParam.java
  83. 22
      dongjian-dashboard-back-model/src/main/java/com/dongjian/dashboard/back/dto/levelrole/PageLevelRoleSearchParam.java
  84. 16
      dongjian-dashboard-back-model/src/main/java/com/dongjian/dashboard/back/dto/levelrole/UnbindUserParam.java
  85. 6
      dongjian-dashboard-back-model/src/main/java/com/dongjian/dashboard/back/dto/role/OptRoleParam.java
  86. 10
      dongjian-dashboard-back-model/src/main/java/com/dongjian/dashboard/back/dto/role/RoleMenuPermissionDTO.java
  87. 9
      dongjian-dashboard-back-model/src/main/java/com/dongjian/dashboard/back/dto/user/OptUserParam.java
  88. 27
      dongjian-dashboard-back-model/src/main/java/com/dongjian/dashboard/back/easyexcel/ExportDeviceAccumulateDataDTO.java
  89. 19
      dongjian-dashboard-back-model/src/main/java/com/dongjian/dashboard/back/easyexcel/ExportDeviceBaStatusDataDTO.java
  90. 17
      dongjian-dashboard-back-model/src/main/java/com/dongjian/dashboard/back/easyexcel/ExportDeviceMeasureDataDTO.java
  91. 45
      dongjian-dashboard-back-model/src/main/java/com/dongjian/dashboard/back/easyexcel/ExportDeviceTrendLogDataDTO.java
  92. 2
      dongjian-dashboard-back-model/src/main/java/com/dongjian/dashboard/back/easyexcel/SecondsToHMSConverter.java
  93. 166
      dongjian-dashboard-back-model/src/main/java/com/dongjian/dashboard/back/model/BaStatusHistory.java
  94. 552
      dongjian-dashboard-back-model/src/main/java/com/dongjian/dashboard/back/model/BaStatusHistoryExample.java
  95. 102
      dongjian-dashboard-back-model/src/main/java/com/dongjian/dashboard/back/model/BasicUser.java
  96. 200
      dongjian-dashboard-back-model/src/main/java/com/dongjian/dashboard/back/model/BasicUserExample.java
  97. 336
      dongjian-dashboard-back-model/src/main/java/com/dongjian/dashboard/back/model/DashboardLevelRole.java
  98. 862
      dongjian-dashboard-back-model/src/main/java/com/dongjian/dashboard/back/model/DashboardLevelRoleExample.java
  99. 268
      dongjian-dashboard-back-model/src/main/java/com/dongjian/dashboard/back/model/DashboardLevelRoleObject.java
  100. 732
      dongjian-dashboard-back-model/src/main/java/com/dongjian/dashboard/back/model/DashboardLevelRoleObjectExample.java

7
document/db/20260327.sql

@ -0,0 +1,7 @@
CREATE TABLE basic_role_menu_relation_dashboard (
role_id BIGINT,
menu_id BIGINT,
permission_type INT COMMENT '0-拒绝 1-只读 2-全部',
creator_id BIGINT,
create_time BIGINT
);

14
dongjian-dashboard-back-common/src/main/java/com/dongjian/dashboard/back/common/Constants.java

@ -1,5 +1,7 @@
package com.dongjian.dashboard.back.common;
import java.time.ZoneId;
import java.time.format.DateTimeFormatter;
import java.util.*;
/**
@ -7,6 +9,11 @@ import java.util.*;
* @time 2022年5月20日 下午2:01:41
*/
public class Constants {
public static final ZoneId ZONE_TOKYO = ZoneId.of("Asia/Tokyo");
public static final DateTimeFormatter FORMATTER_YMDHMS = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
// public static final int EXPORT_PAGE_SIZE = 600;
//这个很重要,不要随便动
public static final String DES_SALT = "ci3b512jwy199511";
@ -24,6 +31,8 @@ public class Constants {
public static final String WINDOW_ALERT_IGNORED = "alert_window_notice:ignore:%d";
public static final String REDIS_BA_STATUS_LATEST_VALUE = "ba_status_latest_value_";
public static final int AURORA_IN_BATCH_SIZE = 1000;
// 定义大类常量
@ -31,6 +40,7 @@ public class Constants {
public static final int CATEGORY_ACCUMULATE = 2;//累积
public static final int CATEGORY_MEASURE = 3;//计测
public static final int CATEGORY_STATUS= 4;//状态
public static final int CATEGORY_TRENDLOG= 5;//TrendLog
// // 所有设备类型ID的总集合
// public static final List<Integer> ALL_DEVICE_TYPE_IDS = new ArrayList<>();
@ -70,10 +80,12 @@ public class Constants {
CATEGORY_MAP.put(CATEGORY_MEASURE, new ArrayList<>(List.of(1003L)));
CATEGORY_MAP.put(CATEGORY_ACCUMULATE, new ArrayList<>(List.of(1002L,1006L)));
CATEGORY_MAP.put(CATEGORY_ACCUMULATE, new ArrayList<>(List.of(1002L)));
CATEGORY_MAP.put(CATEGORY_STATUS, new ArrayList<>(List.of(1004L)));
CATEGORY_MAP.put(CATEGORY_TRENDLOG, new ArrayList<>(List.of(1006L)));
// 收集所有的设备类型ID
for (List<Long> ids : CATEGORY_MAP.values()) {
ALL_CATEGORY_IDS.addAll(ids);

64
dongjian-dashboard-back-common/src/main/java/com/dongjian/dashboard/back/common/config/DataSourceInterceptor.java

@ -13,10 +13,7 @@ import com.dongjian.dashboard.back.common.Constants;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import java.util.*;
import java.util.concurrent.atomic.AtomicLong;
@ -56,25 +53,46 @@ public class DataSourceInterceptor implements HandlerInterceptor {
}
public long getTopCompanyId(String companyId) {
String sql="SELECT "
+ " bcom.id, bcom.parent_id parentId"
+ " FROM data_center_aeon_admin.basic_company bcom "
+ " WHERE bcom.flag != 1 and bcom.id = " + companyId;
AtomicLong parentId = new AtomicLong(0);
AtomicLong id = new AtomicLong(0);
jdbcTemplate.query(sql,rs -> {
parentId.set(rs.getLong("parentId"));
id.set(rs.getLong("id"));
});
//Recursive logic
if (1 == parentId.get() || -1 == parentId.get()) {
return id.get();
} else {
return getTopCompanyId(parentId.get()+"");
}
}
if (StringUtils.isBlank(companyId)) {
throw new IllegalArgumentException("companyId不能为空");
}
return getTopCompanyIdInternal(Long.parseLong(companyId), new HashSet<>());
}
private long getTopCompanyIdInternal(Long companyId, Set<Long> visited) {
// 防止循环引用
if (!visited.add(companyId)) {
throw new IllegalStateException("检测到公司父子结构循环,companyId=" + companyId);
}
String sql = """
SELECT id, parent_id
FROM data_center_aeon_admin.basic_company
WHERE flag != 1 AND id = ?
""";
List<Map<String, Object>> result = jdbcTemplate.queryForList(sql, companyId);
if (result.isEmpty()) {
throw new IllegalStateException("公司不存在,companyId=" + companyId);
}
Map<String, Object> row = result.get(0);
Long parentId = row.get("parent_id") == null
? null
: ((Number) row.get("parent_id")).longValue();
// 顶级企业
if (parentId == null || parentId == 1 || parentId == -1) {
return companyId;
}
return getTopCompanyIdInternal(parentId, visited);
}
/**
* 获取所有的一级企业

12
dongjian-dashboard-back-common/src/main/resources/config/language/msg/msg_cn.yml

@ -49,7 +49,7 @@ msgcn:
roleHasBinded: 角色已绑定用户,请先解绑再删除
loginNameOrEmailHasExisted: 用户名或邮箱已被使用
mailAddUserPwdSubject: 新建账号密码
mailAddUserPwdContent: '账号 <u>{0}</u> 的密码为 <span style="text-transform: none;"><u>{1}</u></span> 请妥善保管<br/><br/>登陆网址:<u>{2}</u>'
mailAddUserPwdContent: '{0}<br/><br/>このたびは、データ管理プラットフォームへのご登録、誠にありがとうございます。<br/><br/>下記の通り、アカウントが発行されましたのでご案内いたします。<br/><br/>-------------------------------------------------<br/>ユーザー名(ID):<u>{1}</u><br/>初期パスワード:<span style="text-transform: none;"><u>{2}</u></span><br/>-------------------------------------------------<br/><br/>ご不明な点がございましたら、お気軽にサポートまでお問い合わせください。<br/><br/>-------------------------------<br/>イオンディライト株式会社<br/>サポート窓口: smbil-support@ifmservice.jp<br/>-------------------------------'
mailResetUserPwdSubject: 重置账号密码
pwdFormatError: 密码组成必须包含数字、英文字母、特殊符号(~!@#$%^&*)且大于等于12位
oldPwdError: 旧密码错误
@ -78,6 +78,7 @@ msgcn:
invalidParentLevel: 无效的父级层级
levelReferencedByChildren: 已被下级层级绑定,请先解绑后再删除
elapsedTime: '{0}天{1}小时{2}分'
categoryHasExisted: 分类已存在
operationLogMap:
addRole: 新增角色
editRole: 编辑角色
@ -138,5 +139,14 @@ msgcn:
editLevel: 编辑层级
deleteLevel: 删除层级
queryLevel: 获取层级列表
addNotificationCategory: 新增通知分类
editNotificationCategory: 编辑通知分类
delNotificationCategory: 删除通知分类
addNotification: 新增通知
editNotification: 编辑通知
delNotification: 删除通知
editDeviceField: 编辑设备属性
getTrendLogDataList: 获取TrendLog数据列表
exportTrendLogData: 导出TrendLog数据

13
dongjian-dashboard-back-common/src/main/resources/config/language/msg/msg_en.yml

@ -49,7 +49,7 @@ msgen:
roleHasBinded: 角色已绑定用户,请先解绑再删除
loginNameOrEmailHasExisted: 用户名或邮箱已被使用
mailAddUserPwdSubject: 新建账号密码
mailAddUserPwdContent: '账号 <u>{0}</u> 的密码为 <span style="text-transform: none;"><u>{1}</u></span> 请妥善保管<br/><br/>登陆网址:<u>{2}</u>'
mailAddUserPwdContent: '{0}<br/><br/>このたびは、データ管理プラットフォームへのご登録、誠にありがとうございます。<br/><br/>下記の通り、アカウントが発行されましたのでご案内いたします。<br/><br/>-------------------------------------------------<br/>ユーザー名(ID):<u>{1}</u><br/>初期パスワード:<span style="text-transform: none;"><u>{2}</u></span><br/>-------------------------------------------------<br/><br/>ご不明な点がございましたら、お気軽にサポートまでお問い合わせください。<br/><br/>-------------------------------<br/>イオンディライト株式会社<br/>サポート窓口: smbil-support@ifmservice.jp<br/>-------------------------------'
mailResetUserPwdSubject: 重置账号密码
pwdFormatError: 密码组成必须包含数字、英文字母、特殊符号(~!@#$%^&*)且大于等于12位
oldPwdError: 旧密码错误
@ -78,6 +78,7 @@ msgen:
invalidParentLevel: Invalid parent level
levelReferencedByChildren: It is bound by child levels. Please unbind them before deleting.
elapsedTime: '{0}d {1}h {2}m'
categoryHasExisted: Category already exists.
operationLogMap:
addRole: Add Role
editRole: Edit Role
@ -138,6 +139,16 @@ msgen:
editLevel: Edit Level
deleteLevel: Delete Level
queryLevel: Get Level List
addNotificationCategory: Add notification category
editNotificationCategory: Edit notification category
delNotificationCategory: Delete notification category
addNotification: Add notification
editNotification: Edit notification
delNotification: Delete notification
editDeviceField: Edit device attributes
getTrendLogDataList: Get TrendLog data list
exportTrendLogData: Export TrendLog data

83
dongjian-dashboard-back-common/src/main/resources/config/language/msg/msg_jp.yml

@ -49,7 +49,7 @@ msgjp:
roleHasBinded: 役割はユーザーにバインドされている ので、削除する前にバインドを解除してください
loginNameOrEmailHasExisted: ユーザー名またはメールボックスはすでに使用されています
mailAddUserPwdSubject: 新規アカウント・パスワードの作成
mailAddUserPwdContent: 'アカウント <u>{0}</u> のパスワードは <span style="text-transform: none;"><u>{1}</u></span> お忘れにならないようにお願いします。<br/><br/>ログインWebアドレス:<u>{2}</u>'
mailAddUserPwdContent: '{0} 様<br/><br/>このたびは、データ管理プラットフォームへのご登録、誠にありがとうございます。<br/><br/>下記の通り、アカウントが発行されましたのでご案内いたします。<br/><br/>-------------------------------------------------<br/>ユーザー名(ID):<u>{1}</u><br/>初期パスワード:<span style="text-transform: none;"><u>{2}</u></span><br/>-------------------------------------------------<br/><br/>ご不明な点がございましたら、お気軽にサポートまでお問い合わせください。<br/><br/>ログインはこちらから:<br/>【AD スマビル 可視化UI URL】:https://smbil.ifmservice.jp/login<br/><br/>-------------------------------<br/>イオンディライト株式会社<br/>サポート窓口: smbil-support@ifmservice.jp<br/>-------------------------------'
mailResetUserPwdSubject: アカウント・パスワードのリセット
pwdFormatError: パスワードの構成には、数字、アルファベット、特殊文字(~!@#$%^&*) で、12桁以上
oldPwdError: 旧パスワードエラー
@ -78,19 +78,20 @@ msgjp:
invalidParentLevel: 無効な上位階層です
levelReferencedByChildren: 下位階層に紐づいています。削除する前に紐付けを解除してください。
elapsedTime: '{0}日{1}時間{2}分間'
categoryHasExisted: カテゴリは既に存在します。
operationLogMap:
addRole: ロールを追加
editRole: ロールを編集
deleteRole: ロールを削除
queryRole: ロール一覧を取得
addUser: ユーザーを追加
editUser: ユーザーを編集
deleteUser: ユーザーを削除
resetPassword: パスワードをリセット
addRole: ロール管理
editRole: ロール管理
deleteRole: ロール管理
queryRole: ロール管理
addUser: ユーザー管理
editUser: ユーザー管理
deleteUser: ユーザー管理
resetPassword: ユーザー管理
changePassword: パスワードを変更
unbindMFADevice: MFAデバイスの連携を解除
queryUser: ユーザー一覧を取得
queryOperationLog: 操作ログを照会する
queryUser: ユーザー管理
queryOperationLog: 操作ログ
getS3Credentials: S3ファイル操作トークンを取得する
addSlack: Slackを追加
editSlack: Slackを編集
@ -100,14 +101,14 @@ msgjp:
editTeams: Teamsを編集
deleteTeams: Teamsを削除
queryTeams: Teamsリストを取得
getCumulativeDataList: 積算データ一覧を取得
getCumulativeDataList: 計量
queryDeviceList: デバイス一覧を取得
addDeviceGroup: デバイスグループを追加
editDeviceGroup: デバイスグループを編集
deleteDeviceGroup: デバイスグループを削除
queryDeviceGroup: デバイスグループ一覧を取得
bindGroupForDevice: デバイスにデバイスグループを割り当てる
bindDeviceForGroup: デバイスグループに紐付けるデバイスを設定する
addDeviceGroup: パネル選択
editDeviceGroup: パネル選択
deleteDeviceGroup: パネル選択
queryDeviceGroup: パネル選択
bindGroupForDevice: パネル選択
bindDeviceForGroup: パネル選択
addMonitoringPointCategory: 監視ポイントカテゴリを追加
editMonitoringPointCategory: 監視ポイントカテゴリを編集
deleteMonitoringPointCategory: 監視ポイントカテゴリを削除
@ -118,26 +119,36 @@ msgjp:
queryMonitoringPointCategoryGroup: 監視ポイントカテゴリグループ一覧を取得
bindGroupForCategory: 監視ポイントカテゴリにグループをバインド
bindCategoryForGroup: グループに監視ポイントカテゴリをバインド
confirmAlarm: アラームを確認
handleAlarm: アラームを対応
exportCumulativeData: 積算データをエクスポート
getAlarmDataList: アラームデータ一覧を取得
exportAlarmData: アラームデータをエクスポート
getMeasureDataList: 計測データ一覧を取得
exportMeasureData: 計測データをエクスポート
getBaStatusDataList: 稼働設備一覧を取得
exportBaStatusData: 稼働設備データをエクスポート
getFavoriteList: お気に入りデバイス一覧を取得
removeFavoriteDevice: お気に入りデバイスを削除
addFavoriteDevice: お気に入りデバイスを追加
addDeviceForGroup: デバイスグループにバインドされたデバイスを設定する
delDeviceForGroup: デバイスグループにバインドされた指定されたデバイスを削除する
confirmAlarm: 警報管理
handleAlarm: 警報管理
exportCumulativeData: 計量
getAlarmDataList: 警報管理
exportAlarmData: 警報管理
getMeasureDataList: 計測
exportMeasureData: 計測
getBaStatusDataList: 運転
exportBaStatusData: 運転
getFavoriteList: お気に入り
removeFavoriteDevice: お気に入り
addFavoriteDevice: お気に入り
addDeviceForGroup: パネル選択
delDeviceForGroup: パネル選択
editBuildingField: 建物の属性を編集
setLngLat: 天気の経度と緯度を設定
addLevel: レベルを追加
editLevel: レベルを編集
deleteLevel: レベルを削除
queryLevel: レベル一覧を取得
addLevel: 支店管理
editLevel: 支店管理
deleteLevel: 支店管理
queryLevel: 支店管理
addNotificationCategory: お知らせカテゴリ管理
editNotificationCategory: お知らせカテゴリ管理
delNotificationCategory: お知らせカテゴリ管理
addNotification: お知らせ管理
editNotification: お知らせ管理
delNotification: お知らせ管理
editDeviceField: デバイス属性を編集
getTrendLogDataList: TrendLog
exportTrendLogData: TrendLog

154
dongjian-dashboard-back-common/src/main/resources/config/language/msg/msg_jp_bak.yml

@ -0,0 +1,154 @@
msgjpbak:
parameterMap:
serviceError: 内部サービスのエラー
tokenError: インターフェイスの認証に失敗
excelEmpty: フォームが空になっている
lineNum: 行{0}:
paramsFormatError: パラメータのフォーマットエラー
verifCodeExpired: 確認コード期限切れ
verifCodeError: 確認コードエラー
accountExpired: アカウントの有効期限が切れている
pwdError: パスワードエラー
userNotExist: ユーザーが存在しない
noOperationAuth: 操作権限なし
projectNameHasExisted: プロジェクト名がすでにある
projectNameDoesNotExist: プロジェクト名がない
buildingNameHasExisted: 該当ビル名がすでにある
buildingNameDoesNotExist: 該当ビル名がない
floorNameHasExisted: 該当フロア名がすでにある
floorNameDoesNotExist: 該当フロア名がない
buildingNotFound: 該当ビルがない
fbNotSameCompany: ビルと同じ会社に所属してください
spaceNameHasExisted: 該当部屋名がすでにある
floorNotFound: 該当フロア名がない
rfNotSameCompany: フロアと同じ会社に所属してください
assetNameHasExisted: 該当資産名がすでにある
assetSymbolHasExisted: 記号はすでに存在します
assetNameDoesNotExist: 該当資産名がない
assetSymbolDoesNotExist: 資産記号が存在しません
spaceNotFound: 該当部屋がない
faNotSameCompany: 部屋と同じ会社に所属してください
bindedDevice: デバイスと関連付け
deviceTypeNotExist: デバイスタイプがない
excelBuildingLineDuplicate: テーブルに同じデータがある
dbBuildingDuplicate: プラットフォームにすでに該当ビルがない
dbFloorDuplicate: プラットフォームには既にこのフロアが存在しています。
dbSpaceDuplicate: プラットフォームには既にこのスペースが存在しています。
dbAssetDuplicate: プラットフォームには既にこのアセットが存在しています。
excelCompanyNameIsNull: 会社名を入力してください
excelBuildingNameIsNull: ビルを入力してください
excelFloorNameIsNull: フロア名を入力してください。
excelSpaceNameIsNull: スペース名を入力してください。
excelSpaceOrFloorNameIsNull: フロア名とスペース名を入力してください。
excelCompanyNameNotExist: プラットフォーム上に該当会社名はない
userOrEmailNotExist: ユーザーが存在しません
companyNameHasExisted: 会社はすでにプラットフォーム上に存在する
taowaComapny: 下位の会社を親会社として利用することは不可
hasSubsidiary: 削除対象の会社には下位の会社があるので、先に下位の会社を対応してください
roleNameExist: 役割名が既に登録済み
roleHasBinded: 役割はユーザーにバインドされている ので、削除する前にバインドを解除してください
loginNameOrEmailHasExisted: ユーザー名またはメールボックスはすでに使用されています
mailAddUserPwdSubject: 新規アカウント・パスワードの作成
mailAddUserPwdContent: '{0} 様<br/><br/>このたびは、データ管理プラットフォームへのご登録、誠にありがとうございます。<br/><br/>下記の通り、アカウントが発行されましたのでご案内いたします。<br/><br/>-------------------------------------------------<br/>ユーザー名(ID):<u>{1}</u><br/>初期パスワード:<span style="text-transform: none;"><u>{2}</u></span><br/>-------------------------------------------------<br/><br/>ご不明な点がございましたら、お気軽にサポートまでお問い合わせください。<br/><br/>ログインはこちらから:<br/>【AD スマビル 可視化UI URL】:https://smbil.ifmservice.jp/login<br/><br/>-------------------------------<br/>イオンディライト株式会社<br/>サポート窓口: smbil-support@ifmservice.jp<br/>-------------------------------'
mailResetUserPwdSubject: アカウント・パスワードのリセット
pwdFormatError: パスワードの構成には、数字、アルファベット、特殊文字(~!@#$%^&*) で、12桁以上
oldPwdError: 旧パスワードエラー
newPwdSameOld: 注:旧パスワードと同じものを使用しないでください
companyLimit: 最大15のエンタープライズを作成可能
consecutiveLoginFail: ログインの失敗が多すぎます。{0}分{1}秒待ってから再度ログインしてください。
loginFailCount: ログインに{0}回失敗しました。残りの試行回数:{1}回。
deviceGroupNameHasExisted: デバイスグループ名は既に存在しています。
invalidDeviceCategory: サポートされていないデバイスタイプ。
monitoringPointCategoryNameHasExisted: この監視ポイントカテゴリ名は既に存在します
monitoringPointCategoryGroupNameHasExisted: この監視ポイントグループ名は既に存在します
alertLevel_1: 通常
alertLevel_2: 緊急故障
alertLevel_3: 深刻な故障
alertLevel_4: 中程度の故障
alertLevel_5: 軽微な故障
confirmStatus_0: 未確認
confirmStatus_1: 確認済み
handleStatus_1: 未対応
handleStatus_2: 対応中
handleStatus_3: 完了
handleStatus_4: 自動復旧
canNotProcessed: これ以上の処理はできません
processOwnRole: 自分のロールを操作することはできません
levelNameExist: 階層名は既に存在しています
invalidParentLevel: 無効な上位階層です
levelReferencedByChildren: 下位階層に紐づいています。削除する前に紐付けを解除してください。
elapsedTime: '{0}日{1}時間{2}分間'
categoryHasExisted: カテゴリは既に存在します。
operationLogMap:
addRole: ロールを追加
editRole: ロールを編集
deleteRole: ロールを削除
queryRole: ロール一覧を取得
addUser: ユーザーを追加
editUser: ユーザーを編集
deleteUser: ユーザーを削除
resetPassword: パスワードをリセット
changePassword: パスワードを変更
unbindMFADevice: MFAデバイスの連携を解除
queryUser: ユーザー一覧を取得
queryOperationLog: 操作ログを照会する
getS3Credentials: S3ファイル操作トークンを取得する
addSlack: Slackを追加
editSlack: Slackを編集
deleteSlack: Slackを削除
querySlack: Slackリストを取得
addTeams: Teamsを追加
editTeams: Teamsを編集
deleteTeams: Teamsを削除
queryTeams: Teamsリストを取得
getCumulativeDataList: 積算データ一覧を取得
queryDeviceList: デバイス一覧を取得
addDeviceGroup: デバイスグループを追加
editDeviceGroup: デバイスグループを編集
deleteDeviceGroup: デバイスグループを削除
queryDeviceGroup: デバイスグループ一覧を取得
bindGroupForDevice: デバイスにデバイスグループを割り当てる
bindDeviceForGroup: デバイスグループに紐付けるデバイスを設定する
addMonitoringPointCategory: 監視ポイントカテゴリを追加
editMonitoringPointCategory: 監視ポイントカテゴリを編集
deleteMonitoringPointCategory: 監視ポイントカテゴリを削除
queryMonitoringPointCategory: 監視ポイントカテゴリ一覧を取得
addMonitoringPointCategoryGroup: 監視ポイントカテゴリグループを追加
editMonitoringPointCategoryGroup: 監視ポイントカテゴリグループを編集
deleteMonitoringPointCategoryGroup: 監視ポイントカテゴリグループを削除
queryMonitoringPointCategoryGroup: 監視ポイントカテゴリグループ一覧を取得
bindGroupForCategory: 監視ポイントカテゴリにグループをバインド
bindCategoryForGroup: グループに監視ポイントカテゴリをバインド
confirmAlarm: アラームを確認
handleAlarm: アラームを対応
exportCumulativeData: 積算データをエクスポート
getAlarmDataList: アラームデータ一覧を取得
exportAlarmData: アラームデータをエクスポート
getMeasureDataList: 計測データ一覧を取得
exportMeasureData: 計測データをエクスポート
getBaStatusDataList: 稼働設備一覧を取得
exportBaStatusData: 稼働設備データをエクスポート
getFavoriteList: お気に入りデバイス一覧を取得
removeFavoriteDevice: お気に入りデバイスを削除
addFavoriteDevice: お気に入りデバイスを追加
addDeviceForGroup: デバイスグループにバインドされたデバイスを設定する
delDeviceForGroup: デバイスグループにバインドされた指定されたデバイスを削除する
editBuildingField: 建物の属性を編集
setLngLat: 天気の経度と緯度を設定
addLevel: レベルを追加
editLevel: レベルを編集
deleteLevel: レベルを削除
queryLevel: レベル一覧を取得
addNotificationCategory: 通知カテゴリを追加
editNotificationCategory: 通知カテゴリを編集
delNotificationCategory: 通知カテゴリを削除
addNotification: 通知を追加
editNotification: 通知を編集
delNotification: 通知を削除

11
dongjian-dashboard-back-controller/buildPush-aeon-prod.sh

@ -0,0 +1,11 @@
aws configure set aws_access_key_id AKIAR26KHSVRUEAKRBPZ
aws configure set aws_secret_access_key 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
aws configure set default.region ap-northeast-1
aws ecr get-login-password --region ap-northeast-1 | docker login --username AWS --password-stdin 126588786019.dkr.ecr.ap-northeast-1.amazonaws.com
docker build -t 126588786019.dkr.ecr.ap-northeast-1.amazonaws.com/aeon-prod/dashboard-back:latest\
--build-arg JAR_FILE=target/dongjian-dashboard-back-controller-0.0.1-SNAPSHOT.jar \
--build-arg LIB_DIR=target/lib \
--build-arg CONFIG_DIR=target/config \
.
docker push 126588786019.dkr.ecr.ap-northeast-1.amazonaws.com/aeon-prod/dashboard-back:latest

10
dongjian-dashboard-back-controller/buildPush-aeon.sh

@ -1,11 +1,11 @@
aws configure set aws_access_key_id AKIAQNYBBSGDVT3VF4ON
aws configure set aws_secret_access_key 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
aws configure set aws_access_key_id AKIAVSKFRQDPNWHJDSHL
aws configure set aws_secret_access_key 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
aws configure set default.region ap-northeast-1
aws ecr get-login-password --region ap-northeast-1 | docker login --username AWS --password-stdin 029530100103.dkr.ecr.ap-northeast-1.amazonaws.com
aws ecr get-login-password --region ap-northeast-1 | docker login --username AWS --password-stdin 382934810846.dkr.ecr.ap-northeast-1.amazonaws.com
docker build -t 029530100103.dkr.ecr.ap-northeast-1.amazonaws.com/aeon/dashboard-back:latest\
docker build -t 382934810846.dkr.ecr.ap-northeast-1.amazonaws.com/aeon/dashboard-back-stg:latest\
--build-arg JAR_FILE=target/dongjian-dashboard-back-controller-0.0.1-SNAPSHOT.jar \
--build-arg LIB_DIR=target/lib \
--build-arg CONFIG_DIR=target/config \
.
docker push 029530100103.dkr.ecr.ap-northeast-1.amazonaws.com/aeon/dashboard-back:latest
docker push 382934810846.dkr.ecr.ap-northeast-1.amazonaws.com/aeon/dashboard-back-stg:latest

3
dongjian-dashboard-back-controller/dockerfile

@ -2,7 +2,8 @@
# FROM openjdk:17-jdk
FROM amazoncorretto:17-alpine
# 安装 fontconfig 和 DejaVu 字体 (这是一个通用且免费的字体包)
RUN apk --no-cache add fontconfig ttf-dejavu
RUN apk --no-cache upgrade && \
apk --no-cache add fontconfig ttf-dejavu
ENV TZ=Asia/Tokyo
WORKDIR /home/data-center-dashboard

12
dongjian-dashboard-back-controller/src/main/java/com/dongjian/dashboard/back/configurator/aspect/OperationLogAspect.java

@ -6,7 +6,10 @@ import com.dongjian.dashboard.back.common.config.DataSourceInterceptor;
import com.dongjian.dashboard.back.dao.ex.DashboardOperationLogMapperExt;
import com.dongjian.dashboard.back.model.DashboardOperationLog;
import com.dongjian.dashboard.back.service.common.CommonOpt;
import com.dongjian.dashboard.back.util.IPUtils;
import com.fasterxml.jackson.databind.ObjectMapper;
import jakarta.servlet.ServletRequest;
import jakarta.servlet.ServletResponse;
import jakarta.servlet.http.HttpServletRequest;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
@ -69,8 +72,13 @@ public class OperationLogAspect {
logEntry.setUri(uri);
logEntry.setMethodName(method.getName());
logEntry.setClassName(signature.getDeclaringTypeName());
logEntry.setIpAddress(request.getRemoteAddr());
String paramsJson = objectMapper.writeValueAsString(joinPoint.getArgs());
logEntry.setIpAddress(IPUtils.getClientIp(request));
// String paramsJson = objectMapper.writeValueAsString(joinPoint.getArgs());
Object[] filteredArgs = Arrays.stream(joinPoint.getArgs())
.filter(arg -> !(arg instanceof ServletRequest) && !(arg instanceof ServletResponse))
.toArray();
String paramsJson = objectMapper.writeValueAsString(filteredArgs);
logEntry.setRequestParams(paramsJson);
logEntry.setExecutionTimeMs(duration);
logEntry.setCreatedAt(System.currentTimeMillis());

1
dongjian-dashboard-back-controller/src/main/java/com/dongjian/dashboard/back/controller/BuildingController.java

@ -47,7 +47,6 @@ public class BuildingController {
private BuildingService buildingService;
@Hidden
@Operation(summary = "Get a page of building list")
@RequestMapping(value = "/getListPage", method = RequestMethod.GET)
public PageResponse<PageInfo<BuildingPageVO>> getListPage(

98
dongjian-dashboard-back-controller/src/main/java/com/dongjian/dashboard/back/controller/DashboardNotificationCategoryController.java

@ -0,0 +1,98 @@
package com.dongjian.dashboard.back.controller;
import com.dongjian.dashboard.back.common.exception.BusinessException;
import com.dongjian.dashboard.back.common.response.PageInfo;
import com.dongjian.dashboard.back.common.response.PageResponse;
import com.dongjian.dashboard.back.common.response.ResponseCode;
import com.dongjian.dashboard.back.common.response.SimpleDataResponse;
import com.dongjian.dashboard.back.configurator.aspect.OperationLog;
import com.dongjian.dashboard.back.configurator.interceptor.AccessRequired;
import com.dongjian.dashboard.back.dto.dashboardnotification.DashboardNotificationCategorySearchParams;
import com.dongjian.dashboard.back.dto.dashboardnotification.DeleteDashboardNotificationCategoryParams;
import com.dongjian.dashboard.back.dto.dashboardnotification.OptDashboardNotificationCategoryParams;
import com.dongjian.dashboard.back.service.DashboardNotificationCategoryService;
import com.dongjian.dashboard.back.vo.dashboardnotification.DashboardNotificationCategoryPageVO;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@RestController
@AccessRequired
@RequestMapping("/dashboardNotificationCategory")
@Tag(name = "dashboard通知里的分类管理", description = "Data Provider manage API")
@SuppressWarnings("unchecked")
public class DashboardNotificationCategoryController {
private static Logger logger = LoggerFactory.getLogger(DashboardNotificationCategoryController.class);
@Autowired
private DashboardNotificationCategoryService dashboardNotificationCategoryService;
@OperationLog(operation = "addNotificationCategory", remark = "")
@Operation(summary = "Add category")
@RequestMapping(value = "/add", method = RequestMethod.POST)
public SimpleDataResponse add(
@RequestBody OptDashboardNotificationCategoryParams optDashboardNotificationCategoryParams,
@RequestHeader String LoginName,
@RequestHeader String AccessToken,
@RequestHeader Long UserId,
@RequestHeader(required = false) Long CompanyId,
@RequestHeader Integer LanguageType) {
return dashboardNotificationCategoryService.add(optDashboardNotificationCategoryParams, UserId, CompanyId, LanguageType);
}
@OperationLog(operation = "editNotificationCategory", remark = "")
@Operation(summary = "Edit category")
@RequestMapping(value = "/edit", method = RequestMethod.POST)
public SimpleDataResponse edit(
@RequestBody OptDashboardNotificationCategoryParams optDashboardNotificationCategoryParams,
@RequestHeader String LoginName,
@RequestHeader String AccessToken,
@RequestHeader Long UserId,
@RequestHeader(required = false) Long CompanyId,
@RequestHeader Integer LanguageType) {
return dashboardNotificationCategoryService.edit(optDashboardNotificationCategoryParams, UserId, CompanyId, LanguageType);
}
@OperationLog(operation = "delNotificationCategory", remark = "")
@Operation(summary = "Delete category")
@RequestMapping(value = "/batchDelete", method = RequestMethod.POST)
public SimpleDataResponse batchDelete(
@RequestBody DeleteDashboardNotificationCategoryParams deleteParams,
@RequestHeader String LoginName,
@RequestHeader String AccessToken,
@RequestHeader Long UserId,
@RequestHeader(required = false) Long CompanyId,
@RequestHeader Integer LanguageType) {
return dashboardNotificationCategoryService.batchDelete(deleteParams, UserId, CompanyId, LanguageType);
}
@Operation(summary = "Get category list")
@RequestMapping(value = "/getListPage", method = RequestMethod.GET)
public PageResponse<PageInfo<DashboardNotificationCategoryPageVO>> getListPage(
@RequestHeader String LoginName,
@RequestHeader String AccessToken,
@RequestHeader Long UserId,
@RequestHeader(required = false) Long CompanyId,
@RequestHeader Integer LanguageType,
@RequestHeader Integer UTCOffset,
DashboardNotificationCategorySearchParams searchParams) throws BusinessException {
searchParams.setUserId(UserId);
PageResponse<PageInfo<DashboardNotificationCategoryPageVO>> response = new PageResponse<>();
try {
response.setData(dashboardNotificationCategoryService.getListPage(searchParams, CompanyId, UserId, LanguageType, UTCOffset));
response.setCode(ResponseCode.SUCCESS);
response.setMsg("success");
} catch (Exception e) {
logger.error("Error querying list", e);
response.setCode(ResponseCode.SERVER_ERROR);
response.setMsg("service error");
}
return response;
}
}

98
dongjian-dashboard-back-controller/src/main/java/com/dongjian/dashboard/back/controller/DashboardNotificationController.java

@ -0,0 +1,98 @@
package com.dongjian.dashboard.back.controller;
import com.dongjian.dashboard.back.common.exception.BusinessException;
import com.dongjian.dashboard.back.common.response.PageInfo;
import com.dongjian.dashboard.back.common.response.PageResponse;
import com.dongjian.dashboard.back.common.response.ResponseCode;
import com.dongjian.dashboard.back.common.response.SimpleDataResponse;
import com.dongjian.dashboard.back.configurator.aspect.OperationLog;
import com.dongjian.dashboard.back.configurator.interceptor.AccessRequired;
import com.dongjian.dashboard.back.dto.dashboardnotification.DashboardNotificationSearchParams;
import com.dongjian.dashboard.back.dto.dashboardnotification.DeleteDashboardNotificationParams;
import com.dongjian.dashboard.back.dto.dashboardnotification.OptDashboardNotificationParams;
import com.dongjian.dashboard.back.service.DashboardNotificationService;
import com.dongjian.dashboard.back.vo.dashboardnotification.DashboardNotificationPageVO;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@RestController
@AccessRequired
@RequestMapping("/dashboardNotification")
@Tag(name = "dashboard通知管理", description = "Data Provider manage API")
@SuppressWarnings("unchecked")
public class DashboardNotificationController {
private static Logger logger = LoggerFactory.getLogger(DashboardNotificationController.class);
@Autowired
private DashboardNotificationService dashboardNotificationService;
@OperationLog(operation = "addNotification", remark = "")
@Operation(summary = "Add dashboard notification")
@RequestMapping(value = "/add", method = RequestMethod.POST)
public SimpleDataResponse add(
@RequestBody OptDashboardNotificationParams optDashboardNotificationParams,
@RequestHeader String LoginName,
@RequestHeader String AccessToken,
@RequestHeader Long UserId,
@RequestHeader(required = false) Long CompanyId,
@RequestHeader Integer LanguageType) {
return dashboardNotificationService.add(optDashboardNotificationParams, UserId, CompanyId, LanguageType);
}
@OperationLog(operation = "editNotification", remark = "")
@Operation(summary = "Edit dashboard notification")
@RequestMapping(value = "/edit", method = RequestMethod.POST)
public SimpleDataResponse edit(
@RequestBody OptDashboardNotificationParams optDashboardNotificationParams,
@RequestHeader String LoginName,
@RequestHeader String AccessToken,
@RequestHeader Long UserId,
@RequestHeader(required = false) Long CompanyId,
@RequestHeader Integer LanguageType) {
return dashboardNotificationService.edit(optDashboardNotificationParams, UserId, CompanyId, LanguageType);
}
@OperationLog(operation = "delNotification", remark = "")
@Operation(summary = "Delete dashboard notification")
@RequestMapping(value = "/batchDelete", method = RequestMethod.POST)
public SimpleDataResponse batchDelete(
@RequestBody DeleteDashboardNotificationParams deleteParams,
@RequestHeader String LoginName,
@RequestHeader String AccessToken,
@RequestHeader Long UserId,
@RequestHeader(required = false) Long CompanyId,
@RequestHeader Integer LanguageType) {
return dashboardNotificationService.batchDelete(deleteParams, UserId, CompanyId, LanguageType);
}
@Operation(summary = "Get dashboard notification list")
@RequestMapping(value = "/getListPage", method = RequestMethod.GET)
public PageResponse<PageInfo<DashboardNotificationPageVO>> getListPage(
@RequestHeader String LoginName,
@RequestHeader String AccessToken,
@RequestHeader Long UserId,
@RequestHeader(required = false) Long CompanyId,
@RequestHeader Integer LanguageType,
@RequestHeader Integer UTCOffset,
DashboardNotificationSearchParams searchParams) throws BusinessException {
searchParams.setUserId(UserId);
PageResponse<PageInfo<DashboardNotificationPageVO>> response = new PageResponse<>();
try {
response.setData(dashboardNotificationService.getListPage(searchParams, CompanyId, UserId, LanguageType, UTCOffset));
response.setCode(ResponseCode.SUCCESS);
response.setMsg("success");
} catch (Exception e) {
logger.error("Error querying list", e);
response.setCode(ResponseCode.SERVER_ERROR);
response.setMsg("service error");
}
return response;
}
}

4
dongjian-dashboard-back-controller/src/main/java/com/dongjian/dashboard/back/controller/DeviceController.java

@ -38,7 +38,7 @@ public class DeviceController {
@Autowired
private DeviceService deviceService;
@OperationLog(operation = "queryDeviceList", remark = "")
// @OperationLog(operation = "queryDeviceList", remark = "")
@Operation(summary = "获取设备列表")
@RequestMapping(value = "/getListPage",method = RequestMethod.GET)
public PageResponse<PageInfo<DeviceVO>> getListPage(
@ -65,7 +65,7 @@ public class DeviceController {
return pageResponse;
}
@OperationLog(operation = "editRole", remark = "")
// @OperationLog(operation = "editDeviceField", remark = "")
@Operation(summary = "编辑设备属性")
@RequestMapping(value = "/editField",method = RequestMethod.POST)
public SimpleDataResponse editField(

80
dongjian-dashboard-back-controller/src/main/java/com/dongjian/dashboard/back/controller/DeviceDataAccumulateController.java

@ -2,6 +2,10 @@ package com.dongjian.dashboard.back.controller;
import com.alibaba.excel.EasyExcel;
import com.alibaba.excel.ExcelWriter;
import com.alibaba.excel.util.StringUtils;
import com.alibaba.excel.write.metadata.WriteSheet;
import com.dongjian.dashboard.back.common.Constants;
import com.dongjian.dashboard.back.common.exception.BusinessException;
import com.dongjian.dashboard.back.common.response.PageInfo;
import com.dongjian.dashboard.back.common.response.PageResponse;
@ -14,17 +18,22 @@ import com.dongjian.dashboard.back.dto.device.LineDataSearchParams;
import com.dongjian.dashboard.back.easyexcel.ExportDeviceAccumulateDataDTO;
import com.dongjian.dashboard.back.easyexcel.LanguageDynamicHeaderAdapter;
import com.dongjian.dashboard.back.service.DeviceDataAccumulateService;
import com.dongjian.dashboard.back.service.common.CommonOpt;
import com.dongjian.dashboard.back.util.CommonUtil;
import com.dongjian.dashboard.back.vo.data.DeviceAccumulateData;
import com.dongjian.dashboard.back.vo.device.LineData;
import com.github.pagehelper.PageHelper;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.servlet.http.HttpServletResponse;
import org.apache.commons.collections4.CollectionUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.*;
import java.io.IOException;
@ -46,8 +55,13 @@ public class DeviceDataAccumulateController {
private static final Logger logger = LoggerFactory.getLogger(DeviceDataAccumulateController.class);
@Value("${export.page.size}")
private Integer EXPORT_PAGE_SIZE;
@Autowired
private DeviceDataAccumulateService deviceDataAccumulateService;
@Autowired
private CommonOpt commonOpt;
@OperationLog(operation = "getCumulativeDataList", remark = "")
@Operation(summary = "获取积算数据列表")
@ -90,25 +104,61 @@ public class DeviceDataAccumulateController {
response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
response.setCharacterEncoding("utf-8");
String fileName = URLEncoder.encode("積算データ", StandardCharsets.UTF_8).replace("+", "%20");
String fileName = URLEncoder.encode("計量"+CommonUtil.generateExcelSuffix(), StandardCharsets.UTF_8).replace("+", "%20");
response.setHeader("Content-disposition", "attachment;filename*=utf-8''" + fileName + ".xlsx");
PageInfo<DeviceAccumulateData> pageData = deviceDataAccumulateService.getDataList(pageSearchParam, CompanyId, UserId, LanguageType);
List<DeviceAccumulateData> list = pageData.getList();
List<ExportDeviceAccumulateDataDTO> exportList = list.stream().map(item -> {
ExportDeviceAccumulateDataDTO dto = new ExportDeviceAccumulateDataDTO();
BeanUtils.copyProperties(item, dto);
return dto;
}).toList();
// ===== 固定导出分页大小=====
pageSearchParam.setPageSize(EXPORT_PAGE_SIZE);
// 构造 Excel header:每列三语组合为字符串 "中文||English||日本語"
// ===== 构建 Excel =====
List<List<String>> head = LanguageDynamicHeaderAdapter.buildHead(ExportDeviceAccumulateDataDTO.class, LanguageType);
EasyExcel.write(response.getOutputStream())
.head(head)
.sheet("sheet1")
.doWrite(exportList);
ExcelWriter excelWriter = EasyExcel.write(response.getOutputStream()).head(head).build();
WriteSheet sheet = EasyExcel.writerSheet("sheet1").build();
// ===== 循环分页查询并写 Excel =====
int pageNum = 1;
try {
while (true) {
pageSearchParam.setPageNum(pageNum);
PageInfo<DeviceAccumulateData> pageData = deviceDataAccumulateService.getDataList(pageSearchParam, CompanyId, UserId, LanguageType);
List<DeviceAccumulateData> list = pageData.getList();
if (CollectionUtils.isEmpty(list)) {
break; // 没数据了,结束
}
for (DeviceAccumulateData item : list) {
ExportDeviceAccumulateDataDTO dto = new ExportDeviceAccumulateDataDTO();
BeanUtils.copyProperties(item, dto);
dto.setLastYearRatio(CommonUtil.ratio(item.getCumulativeValue(), item.getLastYearValue()));
dto.setYesterdayRatio(CommonUtil.ratio(item.getCumulativeValue(), item.getYesterdayValue()));
dto.setStatus111(commonOpt.status111Mapping(item.getStatus111()));
excelWriter.write(List.of(dto), sheet);
// 手动置空,提醒 GC 回收
dto = null;
item = null;
}
// 手动清理分页数据和缓存
list.clear();
PageHelper.clearPage();
// 最后一页判断(加这个更安全)
if (pageNum >= pageData.getPages()) {
break;
}
pageNum++;
}
} catch (Exception e) {
logger.error("export error", e);
throw e;
} finally {
excelWriter.finish();
PageHelper.clearPage();
}
}

80
dongjian-dashboard-back-controller/src/main/java/com/dongjian/dashboard/back/controller/DeviceDataAlarmController.java

@ -2,6 +2,9 @@ package com.dongjian.dashboard.back.controller;
import com.alibaba.excel.EasyExcel;
import com.alibaba.excel.ExcelWriter;
import com.alibaba.excel.write.metadata.WriteSheet;
import com.dongjian.dashboard.back.common.Constants;
import com.dongjian.dashboard.back.common.exception.BusinessException;
import com.dongjian.dashboard.back.common.response.PageInfo;
import com.dongjian.dashboard.back.common.response.PageResponse;
@ -17,18 +20,22 @@ import com.dongjian.dashboard.back.dto.device.WindowAlertQueryRequest;
import com.dongjian.dashboard.back.easyexcel.ExportDeviceAlarmDataDTO;
import com.dongjian.dashboard.back.easyexcel.LanguageDynamicHeaderAdapter;
import com.dongjian.dashboard.back.service.DeviceDataAlarmService;
import com.dongjian.dashboard.back.util.CommonUtil;
import com.dongjian.dashboard.back.vo.data.DeviceAlarmData;
import com.dongjian.dashboard.back.vo.data.HandleHistoryDataVO;
import com.dongjian.dashboard.back.vo.device.WindowAlertVO;
import com.github.pagehelper.PageHelper;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.servlet.http.HttpServletResponse;
import org.apache.commons.collections4.CollectionUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.*;
import java.io.IOException;
@ -50,6 +57,9 @@ public class DeviceDataAlarmController {
private static final Logger logger = LoggerFactory.getLogger(DeviceDataAlarmController.class);
@Value("${export.page.size}")
private Integer EXPORT_PAGE_SIZE;
@Autowired
private DeviceDataAlarmService deviceDataAlarmService;
@ -84,35 +94,65 @@ public class DeviceDataAlarmController {
@OperationLog(operation = "exportAlarmData", remark = "")
@GetMapping("/exportData")
public void exportDeviceAlarm(HttpServletResponse response,
@Parameter(name = "LoginName", description = "Login name", required = true, schema = @Schema(defaultValue = "admin")) @RequestHeader(required=true) String LoginName,
@Parameter(name = "AccessToken", description = "Authentication token", required = true) @RequestHeader(required=true) String AccessToken,
@Parameter(name = "UserId", description = "User ID", required = true, schema = @Schema(defaultValue = "1")) @RequestHeader(required=true) Long UserId,
@Parameter(name = "CompanyId", description = "ID of the company to which the user belongs", required = false, schema = @Schema(defaultValue = "1")) @RequestHeader(required=false) Long CompanyId,
@Parameter(name = "LanguageType", description = "Language type (0: Chinese, 1: English, 2: Japanese)", required = true, schema = @Schema(defaultValue = "2")) @RequestHeader(required=true) Integer LanguageType,
AlarmDataSearchParam pageSearchParam
@Parameter(name = "LoginName", description = "Login name", required = true, schema = @Schema(defaultValue = "admin")) @RequestHeader(required=true) String LoginName,
@Parameter(name = "AccessToken", description = "Authentication token", required = true) @RequestHeader(required=true) String AccessToken,
@Parameter(name = "UserId", description = "User ID", required = true, schema = @Schema(defaultValue = "1")) @RequestHeader(required=true) Long UserId,
@Parameter(name = "CompanyId", description = "ID of the company to which the user belongs", required = false, schema = @Schema(defaultValue = "1")) @RequestHeader(required=false) Long CompanyId,
@Parameter(name = "LanguageType", description = "Language type (0: Chinese, 1: English, 2: Japanese)", required = true, schema = @Schema(defaultValue = "2")) @RequestHeader(required=true) Integer LanguageType,
AlarmDataSearchParam pageSearchParam
) throws IOException {
response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
response.setCharacterEncoding("utf-8");
String fileName = URLEncoder.encode("警報データ", StandardCharsets.UTF_8).replace("+", "%20");
String fileName = URLEncoder.encode("警報データ"+ CommonUtil.generateExcelSuffix(), StandardCharsets.UTF_8).replace("+", "%20");
response.setHeader("Content-disposition", "attachment;filename*=utf-8''" + fileName + ".xlsx");
PageInfo<DeviceAlarmData> pageData = deviceDataAlarmService.getDataList(pageSearchParam, CompanyId, UserId, LanguageType);
List<DeviceAlarmData> list = pageData.getList();
List<ExportDeviceAlarmDataDTO> exportList = list.stream().map(item -> {
ExportDeviceAlarmDataDTO dto = new ExportDeviceAlarmDataDTO();
BeanUtils.copyProperties(item, dto);
return dto;
}).toList();
// ===== 固定导出分页大小 =====
pageSearchParam.setPageSize(EXPORT_PAGE_SIZE);
// 构造 Excel header:每列三语组合为字符串 "中文||English||日本語"
// ===== 构建 Excel =====
List<List<String>> head = LanguageDynamicHeaderAdapter.buildHead(ExportDeviceAlarmDataDTO.class, LanguageType);
ExcelWriter excelWriter = EasyExcel.write(response.getOutputStream()).head(head).build();
WriteSheet sheet = EasyExcel.writerSheet("sheet1").build();
EasyExcel.write(response.getOutputStream())
.head(head)
.sheet("sheet1")
.doWrite(exportList);
int pageNum = 1;
try {
while (true) {
pageSearchParam.setPageNum(pageNum);
PageInfo<DeviceAlarmData> pageData = deviceDataAlarmService.getDataList(pageSearchParam, CompanyId, UserId, LanguageType);
List<DeviceAlarmData> list = pageData.getList();
if (CollectionUtils.isEmpty(list)) {
break; // 没数据了,结束
}
for (DeviceAlarmData item : list) {
ExportDeviceAlarmDataDTO dto = new ExportDeviceAlarmDataDTO();
BeanUtils.copyProperties(item, dto);
excelWriter.write(List.of(dto), sheet);
// 手动置空,提醒 GC 回收
dto = null;
item = null;
}
// 手动清理分页数据和缓存
list.clear();
PageHelper.clearPage();
if (pageNum >= pageData.getPages()) {
break;
}
pageNum++;
}
} catch (Exception e) {
logger.error("export alarm error", e);
throw e;
} finally {
excelWriter.finish();
PageHelper.clearPage();
}
}
@OperationLog(operation = "handleAlarm", remark = "")

104
dongjian-dashboard-back-controller/src/main/java/com/dongjian/dashboard/back/controller/DeviceDataBaStatusController.java

@ -2,26 +2,37 @@ package com.dongjian.dashboard.back.controller;
import com.alibaba.excel.EasyExcel;
import com.alibaba.excel.ExcelWriter;
import com.alibaba.excel.write.metadata.WriteSheet;
import com.dongjian.dashboard.back.common.Constants;
import com.dongjian.dashboard.back.common.exception.BusinessException;
import com.dongjian.dashboard.back.common.response.PageInfo;
import com.dongjian.dashboard.back.common.response.PageResponse;
import com.dongjian.dashboard.back.common.response.ResponseCode;
import com.dongjian.dashboard.back.common.response.SimpleDataResponse;
import com.dongjian.dashboard.back.configurator.aspect.OperationLog;
import com.dongjian.dashboard.back.configurator.interceptor.AccessRequired;
import com.dongjian.dashboard.back.dto.data.BaStatusDataSearchParam;
import com.dongjian.dashboard.back.dto.device.LineDataSearchParams;
import com.dongjian.dashboard.back.easyexcel.ExportDeviceBaStatusDataDTO;
import com.dongjian.dashboard.back.easyexcel.LanguageDynamicHeaderAdapter;
import com.dongjian.dashboard.back.service.DeviceDataBaStatusService;
import com.dongjian.dashboard.back.service.common.CommonOpt;
import com.dongjian.dashboard.back.util.CommonUtil;
import com.dongjian.dashboard.back.vo.data.DeviceBaStatusData;
import com.dongjian.dashboard.back.vo.device.LineData;
import com.github.pagehelper.PageHelper;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.servlet.http.HttpServletResponse;
import org.apache.commons.collections4.CollectionUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.*;
import java.io.IOException;
@ -41,10 +52,15 @@ import java.util.List;
@SuppressWarnings("unchecked")
public class DeviceDataBaStatusController {
private static final Logger logger = LoggerFactory.getLogger(DeviceDataAccumulateController.class);
private static final Logger logger = LoggerFactory.getLogger(DeviceDataBaStatusController.class);
@Value("${export.page.size}")
private Integer EXPORT_PAGE_SIZE;
@Autowired
private DeviceDataBaStatusService deviceDataBaStatusService;
@Autowired
private CommonOpt commonOpt;
@OperationLog(operation = "getBaStatusDataList", remark = "")
@Operation(summary = "获取状态数据列表")
@ -77,35 +93,81 @@ public class DeviceDataBaStatusController {
@OperationLog(operation = "exportBaStatusData", remark = "")
@GetMapping("/exportData")
public void exportDeviceBaStatus(HttpServletResponse response,
@Parameter(name = "LoginName", description = "Login name", required = true, schema = @Schema(defaultValue = "admin")) @RequestHeader(required=true) String LoginName,
@Parameter(name = "AccessToken", description = "Authentication token", required = true) @RequestHeader(required=true) String AccessToken,
@Parameter(name = "UserId", description = "User ID", required = true, schema = @Schema(defaultValue = "1")) @RequestHeader(required=true) Long UserId,
@Parameter(name = "CompanyId", description = "ID of the company to which the user belongs", required = false, schema = @Schema(defaultValue = "1")) @RequestHeader(required=false) Long CompanyId,
@Parameter(name = "LanguageType", description = "Language type (0: Chinese, 1: English, 2: Japanese)", required = true, schema = @Schema(defaultValue = "2")) @RequestHeader(required=true) Integer LanguageType,
BaStatusDataSearchParam pageSearchParam
@Parameter(name = "LoginName", description = "Login name", required = true, schema = @Schema(defaultValue = "admin")) @RequestHeader(required=true) String LoginName,
@Parameter(name = "AccessToken", description = "Authentication token", required = true) @RequestHeader(required=true) String AccessToken,
@Parameter(name = "UserId", description = "User ID", required = true, schema = @Schema(defaultValue = "1")) @RequestHeader(required=true) Long UserId,
@Parameter(name = "CompanyId", description = "ID of the company to which the user belongs", required = false, schema = @Schema(defaultValue = "1")) @RequestHeader(required=false) Long CompanyId,
@Parameter(name = "LanguageType", description = "Language type (0: Chinese, 1: English, 2: Japanese)", required = true, schema = @Schema(defaultValue = "2")) @RequestHeader(required=true) Integer LanguageType,
BaStatusDataSearchParam pageSearchParam
) throws IOException {
response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
response.setCharacterEncoding("utf-8");
String fileName = URLEncoder.encode("稼働設備", StandardCharsets.UTF_8).replace("+", "%20");
String fileName = URLEncoder.encode("運転"+ CommonUtil.generateExcelSuffix(), StandardCharsets.UTF_8).replace("+", "%20");
response.setHeader("Content-disposition", "attachment;filename*=utf-8''" + fileName + ".xlsx");
PageInfo<DeviceBaStatusData> pageData = deviceDataBaStatusService.getDataList(pageSearchParam, CompanyId, UserId, LanguageType);
List<DeviceBaStatusData> list = pageData.getList();
List<ExportDeviceBaStatusDataDTO> exportList = list.stream().map(item -> {
ExportDeviceBaStatusDataDTO dto = new ExportDeviceBaStatusDataDTO();
BeanUtils.copyProperties(item, dto);
return dto;
}).toList();
// ===== 固定导出分页大小 =====
pageSearchParam.setPageSize(EXPORT_PAGE_SIZE);
// 构造 Excel header:每列三语组合为字符串 "中文||English||日本語"
// ===== 构建 Excel =====
List<List<String>> head = LanguageDynamicHeaderAdapter.buildHead(ExportDeviceBaStatusDataDTO.class, LanguageType);
ExcelWriter excelWriter = EasyExcel.write(response.getOutputStream()).head(head).build();
WriteSheet sheet = EasyExcel.writerSheet("sheet1").build();
int pageNum = 1;
try {
while (true) {
pageSearchParam.setPageNum(pageNum);
PageInfo<DeviceBaStatusData> pageData = deviceDataBaStatusService.getDataList(pageSearchParam, CompanyId, UserId, LanguageType);
List<DeviceBaStatusData> list = pageData.getList();
if (CollectionUtils.isEmpty(list)) {
break; // 没数据了,结束
}
for (DeviceBaStatusData item : list) {
ExportDeviceBaStatusDataDTO dto = new ExportDeviceBaStatusDataDTO();
BeanUtils.copyProperties(item, dto);
dto.setStatus111(commonOpt.status111Mapping(item.getStatus111()));
excelWriter.write(List.of(dto), sheet);
// 手动置空,提醒 GC 回收
dto = null;
item = null;
}
// 手动清理分页数据和缓存
list.clear();
PageHelper.clearPage();
if (pageNum >= pageData.getPages()) {
break;
}
pageNum++;
}
} catch (Exception e) {
logger.error("export BA status error", e);
throw e;
} finally {
excelWriter.finish();
PageHelper.clearPage();
}
}
EasyExcel.write(response.getOutputStream())
.head(head)
.sheet("sheet1")
.doWrite(exportList);
@OperationLog(operation = "getLineData", remark = "")
@Operation(summary = "获取状态迁移图")
@RequestMapping(value = "/getLineData",method = RequestMethod.POST)
public SimpleDataResponse<List<LineData>> getLineData(
@Parameter(name = "searchType", description = "1-按小时,2-全部数据", required = true) Integer searchType,
@Parameter(name = "LoginName", description = "Login name", required = true, schema = @Schema(defaultValue = "admin")) @RequestHeader(required=true) String LoginName,
@Parameter(name = "AccessToken", description = "Authentication token", required = true) @RequestHeader(required=true) String AccessToken,
@Parameter(name = "UserId", description = "User ID", required = true, schema = @Schema(defaultValue = "1")) @RequestHeader(required=true) Long UserId,
@Parameter(name = "CompanyId", description = "ID of the company to which the user belongs", required = false, schema = @Schema(defaultValue = "1")) @RequestHeader(required=false) Long CompanyId,
@Parameter(name = "LanguageType", description = "Language type (0: Chinese, 1: English, 2: Japanese)", required = true, schema = @Schema(defaultValue = "2")) @RequestHeader(required=true) Integer LanguageType,
@RequestBody LineDataSearchParams lineDataSearchParams
) throws BusinessException {
return deviceDataBaStatusService.getLineData(searchType, lineDataSearchParams, CompanyId, UserId, LanguageType);
}
}

88
dongjian-dashboard-back-controller/src/main/java/com/dongjian/dashboard/back/controller/DeviceDataMeasureController.java

@ -2,6 +2,9 @@ package com.dongjian.dashboard.back.controller;
import com.alibaba.excel.EasyExcel;
import com.alibaba.excel.ExcelWriter;
import com.alibaba.excel.write.metadata.WriteSheet;
import com.dongjian.dashboard.back.common.Constants;
import com.dongjian.dashboard.back.common.exception.BusinessException;
import com.dongjian.dashboard.back.common.response.PageInfo;
import com.dongjian.dashboard.back.common.response.PageResponse;
@ -14,17 +17,22 @@ import com.dongjian.dashboard.back.dto.device.LineDataSearchParams;
import com.dongjian.dashboard.back.easyexcel.ExportDeviceMeasureDataDTO;
import com.dongjian.dashboard.back.easyexcel.LanguageDynamicHeaderAdapter;
import com.dongjian.dashboard.back.service.DeviceDataMeasureService;
import com.dongjian.dashboard.back.service.common.CommonOpt;
import com.dongjian.dashboard.back.util.CommonUtil;
import com.dongjian.dashboard.back.vo.data.DeviceMeasureData;
import com.dongjian.dashboard.back.vo.device.LineData;
import com.github.pagehelper.PageHelper;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.servlet.http.HttpServletResponse;
import org.apache.commons.collections4.CollectionUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.*;
import java.io.IOException;
@ -44,10 +52,15 @@ import java.util.List;
@SuppressWarnings("unchecked")
public class DeviceDataMeasureController {
private static final Logger logger = LoggerFactory.getLogger(DeviceDataAccumulateController.class);
private static final Logger logger = LoggerFactory.getLogger(DeviceDataMeasureController.class);
@Value("${export.page.size}")
private Integer EXPORT_PAGE_SIZE;
@Autowired
private DeviceDataMeasureService deviceDataMeasureService;
@Autowired
private CommonOpt commonOpt;
@OperationLog(operation = "getMeasureDataList", remark = "")
@Operation(summary = "获取计测数据列表")
@ -80,35 +93,66 @@ public class DeviceDataMeasureController {
@OperationLog(operation = "exportMeasureData", remark = "")
@GetMapping("/exportData")
public void exportDeviceMeasure(HttpServletResponse response,
@Parameter(name = "LoginName", description = "Login name", required = true, schema = @Schema(defaultValue = "admin")) @RequestHeader(required=true) String LoginName,
@Parameter(name = "AccessToken", description = "Authentication token", required = true) @RequestHeader(required=true) String AccessToken,
@Parameter(name = "UserId", description = "User ID", required = true, schema = @Schema(defaultValue = "1")) @RequestHeader(required=true) Long UserId,
@Parameter(name = "CompanyId", description = "ID of the company to which the user belongs", required = false, schema = @Schema(defaultValue = "1")) @RequestHeader(required=false) Long CompanyId,
@Parameter(name = "LanguageType", description = "Language type (0: Chinese, 1: English, 2: Japanese)", required = true, schema = @Schema(defaultValue = "2")) @RequestHeader(required=true) Integer LanguageType,
MeasureDataSearchParam pageSearchParam
@Parameter(name = "LoginName", description = "Login name", required = true, schema = @Schema(defaultValue = "admin")) @RequestHeader(required=true) String LoginName,
@Parameter(name = "AccessToken", description = "Authentication token", required = true) @RequestHeader(required=true) String AccessToken,
@Parameter(name = "UserId", description = "User ID", required = true, schema = @Schema(defaultValue = "1")) @RequestHeader(required=true) Long UserId,
@Parameter(name = "CompanyId", description = "ID of the company to which the user belongs", required = false, schema = @Schema(defaultValue = "1")) @RequestHeader(required=false) Long CompanyId,
@Parameter(name = "LanguageType", description = "Language type (0: Chinese, 1: English, 2: Japanese)", required = true, schema = @Schema(defaultValue = "2")) @RequestHeader(required=true) Integer LanguageType,
MeasureDataSearchParam pageSearchParam
) throws IOException {
response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
response.setCharacterEncoding("utf-8");
String fileName = URLEncoder.encode("計測データ", StandardCharsets.UTF_8).replace("+", "%20");
String fileName = URLEncoder.encode("計測"+ CommonUtil.generateExcelSuffix(), StandardCharsets.UTF_8).replace("+", "%20");
response.setHeader("Content-disposition", "attachment;filename*=utf-8''" + fileName + ".xlsx");
PageInfo<DeviceMeasureData> pageData = deviceDataMeasureService.getDataList(pageSearchParam, CompanyId, UserId, LanguageType);
List<DeviceMeasureData> list = pageData.getList();
List<ExportDeviceMeasureDataDTO> exportList = list.stream().map(item -> {
ExportDeviceMeasureDataDTO dto = new ExportDeviceMeasureDataDTO();
BeanUtils.copyProperties(item, dto);
return dto;
}).toList();
// ===== 固定导出分页大小 =====
pageSearchParam.setPageSize(EXPORT_PAGE_SIZE);
// 构造 Excel header:每列三语组合为字符串 "中文||English||日本語"
// ===== 构建 Excel =====
List<List<String>> head = LanguageDynamicHeaderAdapter.buildHead(ExportDeviceMeasureDataDTO.class, LanguageType);
EasyExcel.write(response.getOutputStream())
.head(head)
.sheet("sheet1")
.doWrite(exportList);
ExcelWriter excelWriter = EasyExcel.write(response.getOutputStream()).head(head).build();
WriteSheet sheet = EasyExcel.writerSheet("sheet1").build();
int pageNum = 1;
try {
while (true) {
pageSearchParam.setPageNum(pageNum);
PageInfo<DeviceMeasureData> pageData = deviceDataMeasureService.getDataList(pageSearchParam, CompanyId, UserId, LanguageType);
List<DeviceMeasureData> list = pageData.getList();
if (CollectionUtils.isEmpty(list)) {
break; // 没数据了,结束
}
for (DeviceMeasureData item : list) {
ExportDeviceMeasureDataDTO dto = new ExportDeviceMeasureDataDTO();
BeanUtils.copyProperties(item, dto);
dto.setStatus111(commonOpt.status111Mapping(item.getStatus111()));
excelWriter.write(List.of(dto), sheet);
// 手动置空,提醒 GC 回收
dto = null;
item = null;
}
// 手动清理分页数据和缓存
list.clear();
PageHelper.clearPage();
if (pageNum >= pageData.getPages()) {
break;
}
pageNum++;
}
} catch (Exception e) {
logger.error("export measure data error", e);
throw e;
} finally {
excelWriter.finish();
PageHelper.clearPage();
}
}
@OperationLog(operation = "getLineData", remark = "")

181
dongjian-dashboard-back-controller/src/main/java/com/dongjian/dashboard/back/controller/DeviceDataTrendLogController.java

@ -0,0 +1,181 @@
package com.dongjian.dashboard.back.controller;
import com.alibaba.excel.EasyExcel;
import com.alibaba.excel.ExcelWriter;
import com.alibaba.excel.write.metadata.WriteSheet;
import com.dongjian.dashboard.back.common.exception.BusinessException;
import com.dongjian.dashboard.back.common.response.PageInfo;
import com.dongjian.dashboard.back.common.response.PageResponse;
import com.dongjian.dashboard.back.common.response.ResponseCode;
import com.dongjian.dashboard.back.common.response.SimpleDataResponse;
import com.dongjian.dashboard.back.configurator.aspect.OperationLog;
import com.dongjian.dashboard.back.configurator.interceptor.AccessRequired;
import com.dongjian.dashboard.back.dto.data.TrendLogDataSearchParam;
import com.dongjian.dashboard.back.dto.device.LineDataSearchParams;
import com.dongjian.dashboard.back.easyexcel.ExportDeviceTrendLogDataDTO;
import com.dongjian.dashboard.back.easyexcel.LanguageDynamicHeaderAdapter;
import com.dongjian.dashboard.back.service.DeviceDataTrendLogService;
import com.dongjian.dashboard.back.service.common.CommonOpt;
import com.dongjian.dashboard.back.util.CommonUtil;
import com.dongjian.dashboard.back.vo.data.DeviceTrendLogData;
import com.dongjian.dashboard.back.vo.device.LineData;
import com.github.pagehelper.PageHelper;
import io.swagger.v3.oas.annotations.Hidden;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.servlet.http.HttpServletResponse;
import org.apache.commons.collections4.CollectionUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.*;
import java.io.IOException;
import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
import java.util.List;
/**
*
* @author jwy-style
*
*/
@RestController//代表返回的是json格式的数据,这个注解是Spring4之后新加的注解
@AccessRequired //注解标识是否需要验证token
@RequestMapping("/deviceTrendLog") //http请求路径映射
@Tag(name = "TrendLog设备的相关接口",description = "TrendLog设备的相关接口")
@SuppressWarnings("unchecked")
public class DeviceDataTrendLogController {
private static final Logger logger = LoggerFactory.getLogger(DeviceDataTrendLogController.class);
@Value("${export.page.size}")
private Integer EXPORT_PAGE_SIZE;
@Autowired
private DeviceDataTrendLogService deviceDataTrendLogService;
@Autowired
private CommonOpt commonOpt;
@OperationLog(operation = "getTrendLogDataList", remark = "")
@Operation(summary = "获取TrendLog数据列表")
@RequestMapping(value = "/getDataList",method = RequestMethod.GET)
public PageResponse<PageInfo<DeviceTrendLogData>> getListPage(
@Parameter(name = "LoginName", description = "Login name", required = true, schema = @Schema(defaultValue = "admin")) @RequestHeader(required=true) String LoginName,
@Parameter(name = "AccessToken", description = "Authentication token", required = true) @RequestHeader(required=true) String AccessToken,
@Parameter(name = "UserId", description = "User ID", required = true, schema = @Schema(defaultValue = "1")) @RequestHeader(required=true) Long UserId,
@Parameter(name = "CompanyId", description = "ID of the company to which the user belongs", required = false, schema = @Schema(defaultValue = "1")) @RequestHeader(required=false) Long CompanyId,
@Parameter(name = "LanguageType", description = "Language type (0: Chinese, 1: English, 2: Japanese)", required = true, schema = @Schema(defaultValue = "2")) @RequestHeader(required=true) Integer LanguageType,
TrendLogDataSearchParam pageSearchParam
) throws BusinessException {
pageSearchParam.setUserId(UserId);
// pageSearchParam.setCompanyId(CompanyId);
PageResponse<PageInfo<DeviceTrendLogData>> pageResponse = new PageResponse<PageInfo<DeviceTrendLogData>>();
try{
pageResponse.setData(deviceDataTrendLogService.getDataList(pageSearchParam, CompanyId, UserId, LanguageType));
pageResponse.setCode(ResponseCode.SUCCESS);
pageResponse.setMsg("success");
}catch (Exception e){
logger.error("查询列表报错",e);
pageResponse.setCode(ResponseCode.SERVER_ERROR);
pageResponse.setMsg("service error");
}
return pageResponse;
}
@OperationLog(operation = "exportTrendLogData", remark = "")
@Operation(summary = "导出TrendLog数据列表")
@GetMapping("/exportData")
public void exportDeviceTrendLog(HttpServletResponse response,
@Parameter(name = "LoginName", description = "Login name", required = true, schema = @Schema(defaultValue = "admin")) @RequestHeader(required=true) String LoginName,
@Parameter(name = "AccessToken", description = "Authentication token", required = true) @RequestHeader(required=true) String AccessToken,
@Parameter(name = "UserId", description = "User ID", required = true, schema = @Schema(defaultValue = "1")) @RequestHeader(required=true) Long UserId,
@Parameter(name = "CompanyId", description = "ID of the company to which the user belongs", required = false, schema = @Schema(defaultValue = "1")) @RequestHeader(required=false) Long CompanyId,
@Parameter(name = "LanguageType", description = "Language type (0: Chinese, 1: English, 2: Japanese)", required = true, schema = @Schema(defaultValue = "2")) @RequestHeader(required=true) Integer LanguageType,
TrendLogDataSearchParam pageSearchParam
) throws IOException {
response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
response.setCharacterEncoding("utf-8");
String fileName = URLEncoder.encode("TrendLog"+CommonUtil.generateExcelSuffix(), StandardCharsets.UTF_8).replace("+", "%20");
response.setHeader("Content-disposition", "attachment;filename*=utf-8''" + fileName + ".xlsx");
// ===== 固定导出分页大小=====
pageSearchParam.setPageSize(EXPORT_PAGE_SIZE);
// ===== 构建 Excel =====
List<List<String>> head = LanguageDynamicHeaderAdapter.buildHead(ExportDeviceTrendLogDataDTO.class, LanguageType);
ExcelWriter excelWriter = EasyExcel.write(response.getOutputStream()).head(head).build();
WriteSheet sheet = EasyExcel.writerSheet("sheet1").build();
// ===== 循环分页查询并写 Excel =====
int pageNum = 1;
try {
while (true) {
pageSearchParam.setPageNum(pageNum);
PageInfo<DeviceTrendLogData> pageData = deviceDataTrendLogService.getDataList(pageSearchParam, CompanyId, UserId, LanguageType);
List<DeviceTrendLogData> list = pageData.getList();
if (CollectionUtils.isEmpty(list)) {
break; // 没数据了,结束
}
for (DeviceTrendLogData item : list) {
ExportDeviceTrendLogDataDTO dto = new ExportDeviceTrendLogDataDTO();
BeanUtils.copyProperties(item, dto);
// dto.setLastYearRatio(CommonUtil.ratio(item.getCumulativeValue(), item.getLastYearValue()));
// dto.setYesterdayRatio(CommonUtil.ratio(item.getCumulativeValue(), item.getYesterdayValue()));
dto.setStatus111(commonOpt.status111Mapping(item.getStatus111()));
excelWriter.write(List.of(dto), sheet);
// 手动置空,提醒 GC 回收
dto = null;
item = null;
}
// 手动清理分页数据和缓存
list.clear();
PageHelper.clearPage();
// 最后一页判断(加这个更安全)
if (pageNum >= pageData.getPages()) {
break;
}
pageNum++;
}
} catch (Exception e) {
logger.error("export error", e);
throw e;
} finally {
excelWriter.finish();
PageHelper.clearPage();
}
}
@Hidden
@OperationLog(operation = "getLineData", remark = "")
@Operation(summary = "获取7日趋势数据")
@RequestMapping(value = "/getLineData",method = RequestMethod.POST)
public SimpleDataResponse<List<LineData>> getLineData(
@Parameter(name = "searchType", description = "1-按小时,2-全部数据", required = true) Integer searchType,
@Parameter(name = "LoginName", description = "Login name", required = true, schema = @Schema(defaultValue = "admin")) @RequestHeader(required=true) String LoginName,
@Parameter(name = "AccessToken", description = "Authentication token", required = true) @RequestHeader(required=true) String AccessToken,
@Parameter(name = "UserId", description = "User ID", required = true, schema = @Schema(defaultValue = "1")) @RequestHeader(required=true) Long UserId,
@Parameter(name = "CompanyId", description = "ID of the company to which the user belongs", required = false, schema = @Schema(defaultValue = "1")) @RequestHeader(required=false) Long CompanyId,
@Parameter(name = "LanguageType", description = "Language type (0: Chinese, 1: English, 2: Japanese)", required = true, schema = @Schema(defaultValue = "2")) @RequestHeader(required=true) Integer LanguageType,
@RequestBody LineDataSearchParams lineDataSearchParams
) throws BusinessException {
return deviceDataTrendLogService.getLineData(searchType, lineDataSearchParams, CompanyId, UserId, LanguageType);
}
}

1
dongjian-dashboard-back-controller/src/main/java/com/dongjian/dashboard/back/controller/LevelController.java

@ -28,7 +28,6 @@ import org.springframework.web.bind.annotation.*;
* 物件级别管理Controller
* 实现物件级别的增删改查功能
*/
@Hidden
@RestController
@AccessRequired
@RequestMapping("/level")

203
dongjian-dashboard-back-controller/src/main/java/com/dongjian/dashboard/back/controller/LevelRoleController.java

@ -0,0 +1,203 @@
package com.dongjian.dashboard.back.controller;
import com.dongjian.dashboard.back.vo.TreeMenusDTO;
import com.dongjian.dashboard.back.common.exception.BusinessException;
import com.dongjian.dashboard.back.common.response.PageInfo;
import com.dongjian.dashboard.back.common.response.PageResponse;
import com.dongjian.dashboard.back.common.response.ResponseCode;
import com.dongjian.dashboard.back.common.response.SimpleDataResponse;
import com.dongjian.dashboard.back.configurator.interceptor.AccessRequired;
import com.dongjian.dashboard.back.dto.BaseSearchParams;
import com.dongjian.dashboard.back.dto.levelrole.*;
import com.dongjian.dashboard.back.service.LevelRoleService;
import com.dongjian.dashboard.back.vo.levelrole.LevelRolePageDTO;
import com.dongjian.dashboard.back.vo.levelrole.UserBindLevelRoleVO;
import com.dongjian.dashboard.back.vo.levelrole.UserBoundRolePageDTO;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
* 物件级别管理Controller
* 实现物件级别的增删改查功能
*/
@RestController
@AccessRequired
@RequestMapping("/levelRole")
@Tag(name = "物件角色管理的相关接口", description = "物件角色管理的相关接口")
@SuppressWarnings("unchecked")
public class LevelRoleController {
private static Logger logger = LoggerFactory.getLogger(LevelRoleController.class);
@Autowired
private LevelRoleService levelRoleService;
@Operation(summary = "添加级别角色")
@RequestMapping(value = "/add", method = RequestMethod.POST)
public SimpleDataResponse add(
@RequestBody OptLevelRoleParam optLevelRoleParam,
@Parameter(name = "LoginName", description = "Login name", required = true, schema = @Schema(defaultValue = "admin")) @RequestHeader(required = true) String LoginName,
@Parameter(name = "AccessToken", description = "Authentication token", required = true) @RequestHeader(required = true) String AccessToken,
@Parameter(name = "UserId", description = "User ID", required = true, schema = @Schema(defaultValue = "1")) @RequestHeader(required = true) Long UserId,
@Parameter(name = "CompanyId", description = "ID of the company to which the user belongs", required = false, schema = @Schema(defaultValue = "1")) @RequestHeader(required = true) Long CompanyId,
@Parameter(name = "LanguageType", description = "Language type (0: Chinese, 1: English, 2: Japanese)", required = true, schema = @Schema(defaultValue = "2")) @RequestHeader(required = true) Integer LanguageType) {
return levelRoleService.add(optLevelRoleParam, CompanyId, UserId, LanguageType);
}
@Operation(summary = "编辑级别角色")
@RequestMapping(value = "/edit", method = RequestMethod.POST)
public SimpleDataResponse edit(
@RequestBody OptLevelRoleParam optLevelRoleParam,
@Parameter(name = "LoginName", description = "Login name", required = true, schema = @Schema(defaultValue = "admin")) @RequestHeader(required = true) String LoginName,
@Parameter(name = "AccessToken", description = "Authentication token", required = true) @RequestHeader(required = true) String AccessToken,
@Parameter(name = "UserId", description = "User ID", required = true, schema = @Schema(defaultValue = "1")) @RequestHeader(required = true) Long UserId,
@Parameter(name = "CompanyId", description = "ID of the company to which the user belongs", required = false, schema = @Schema(defaultValue = "1")) @RequestHeader(required = true) Long CompanyId,
@Parameter(name = "LanguageType", description = "Language type (0: Chinese, 1: English, 2: Japanese)", required = true, schema = @Schema(defaultValue = "2")) @RequestHeader(required = true) Integer LanguageType) {
return levelRoleService.edit(optLevelRoleParam, CompanyId, UserId, LanguageType);
}
@Operation(summary = "删除级别角色")
@RequestMapping(value = "/batchDelete", method = RequestMethod.POST)
public SimpleDataResponse batchDelete(
@RequestBody DeleteLevelRoleParam deleteLevelRoleParam,
@Parameter(name = "LoginName", description = "Login name", required = true, schema = @Schema(defaultValue = "admin")) @RequestHeader(required = true) String LoginName,
@Parameter(name = "AccessToken", description = "Authentication token", required = true) @RequestHeader(required = true) String AccessToken,
@Parameter(name = "UserId", description = "User ID", required = true, schema = @Schema(defaultValue = "1")) @RequestHeader(required = true) Long UserId,
@Parameter(name = "CompanyId", description = "ID of the company to which the user belongs", required = false, schema = @Schema(defaultValue = "1")) @RequestHeader(required = true) Long CompanyId,
@Parameter(name = "LanguageType", description = "Language type (0: Chinese, 1: English, 2: Japanese)", required = true, schema = @Schema(defaultValue = "2")) @RequestHeader(required = true) Integer LanguageType) {
return levelRoleService.batchDelete(deleteLevelRoleParam, CompanyId, UserId, LanguageType);
}
@Operation(summary = "获取级别角色列表")
@RequestMapping(value = "/getListPage", method = RequestMethod.GET)
public PageResponse<PageInfo<LevelRolePageDTO>> getListPage(
@Parameter(name = "LoginName", description = "Login name", required = true, schema = @Schema(defaultValue = "admin")) @RequestHeader(required = true) String LoginName,
@Parameter(name = "AccessToken", description = "Authentication token", required = true) @RequestHeader(required = true) String AccessToken,
@Parameter(name = "UserId", description = "User ID", required = true, schema = @Schema(defaultValue = "1")) @RequestHeader(required = true) Long UserId,
@Parameter(name = "CompanyId", description = "ID of the company to which the user belongs", required = false, schema = @Schema(defaultValue = "1")) @RequestHeader(required = false) Long CompanyId,
@Parameter(name = "LanguageType", description = "Language type (0: Chinese, 1: English, 2: Japanese)", required = true, schema = @Schema(defaultValue = "2")) @RequestHeader(required = true) Integer LanguageType,
PageLevelRoleSearchParam pageLevelRoleSearchParam
) throws BusinessException {
pageLevelRoleSearchParam.setUserId(UserId);
PageResponse<PageInfo<LevelRolePageDTO>> pageResponse = new PageResponse<>();
try {
pageResponse.setData(levelRoleService.getListPage(pageLevelRoleSearchParam, CompanyId, UserId, LanguageType));
pageResponse.setCode(ResponseCode.SUCCESS);
pageResponse.setMsg("success");
} catch (Exception e) {
logger.error("查询物件级别角色列表报错", e);
pageResponse.setCode(ResponseCode.SERVER_ERROR);
pageResponse.setMsg("service error");
}
return pageResponse;
}
@Operation(summary = "获取可以绑定层级角色的用户列表")
@RequestMapping(value = "/getCanBeBoundUserPage",method = RequestMethod.GET)
public PageResponse<PageInfo<UserBindLevelRoleVO>> getCanBeBoundUserPage(
BaseSearchParams baseSearchParams,
@Parameter(name="LoginName",description ="登录名",required=true,schema = @Schema(defaultValue = "admin")) @RequestHeader(required=true) String LoginName,
@Parameter(name="AccessToken",description ="鉴权token",required=true) @RequestHeader(required=true) String AccessToken,
@Parameter(name="UserId",description ="用户ID",required=true,schema = @Schema(defaultValue = "1")) @RequestHeader(required=true) Long UserId,
@Parameter(name="CompanyId",description ="用户所属企业ID",required=false,schema = @Schema(defaultValue = "1")) @RequestHeader(required=false) Long CompanyId,
@Parameter(name="LanguageType",description ="语言类型 0:中文 1:英文 2:日文",required=true,schema = @Schema(defaultValue = "2")) @RequestHeader(required=true) Integer LanguageType,
@Parameter(name="UTCOffset",description ="格林威治时间与本地时间的差值,单位是分钟,比如东八区是 -480",required=true,schema = @Schema(defaultValue = "-480")) @RequestHeader(required=true) Integer UTCOffset
) throws BusinessException {
baseSearchParams.setUserId(UserId);
PageResponse<PageInfo<UserBindLevelRoleVO>> pageResponse = new PageResponse<>();
try {
pageResponse.setData(levelRoleService.getCanBeBoundUserPage(baseSearchParams, CompanyId, UserId, LanguageType, UTCOffset));
pageResponse.setCode(ResponseCode.SUCCESS);
pageResponse.setMsg("success");
} catch (Exception e) {
logger.error("获取用户绑定的级别角色报错", e);
pageResponse.setCode(ResponseCode.SERVER_ERROR);
pageResponse.setMsg("service error");
}
return pageResponse;
}
@Operation(summary = "用户增加绑定层级角色")
@RequestMapping(value = "/bound/bindUser", method = RequestMethod.POST)
public SimpleDataResponse bindUser(
@RequestBody BindUserParam bindUserParam,
@Parameter(name = "LoginName", description = "Login name", required = true, schema = @Schema(defaultValue = "admin")) @RequestHeader(required = true) String LoginName,
@Parameter(name = "AccessToken", description = "Authentication token", required = true) @RequestHeader(required = true) String AccessToken,
@Parameter(name = "UserId", description = "User ID", required = true, schema = @Schema(defaultValue = "1")) @RequestHeader(required = true) Long UserId,
@Parameter(name = "CompanyId", description = "ID of the company to which the user belongs", required = false, schema = @Schema(defaultValue = "1")) @RequestHeader(required = true) Long CompanyId,
@Parameter(name = "LanguageType", description = "Language type (0: Chinese, 1: English, 2: Japanese)", required = true, schema = @Schema(defaultValue = "2")) @RequestHeader(required = true) Integer LanguageType) {
return levelRoleService.bindUser(bindUserParam, CompanyId, UserId, LanguageType);
}
@Operation(summary = "解绑用户已有的层级角色关系")
@RequestMapping(value = "/bound/unbindUser", method = RequestMethod.POST)
public SimpleDataResponse unbindUser(
@RequestBody UnbindUserParam unbindUserParam,
@Parameter(name = "LoginName", description = "Login name", required = true, schema = @Schema(defaultValue = "admin")) @RequestHeader(required = true) String LoginName,
@Parameter(name = "AccessToken", description = "Authentication token", required = true) @RequestHeader(required = true) String AccessToken,
@Parameter(name = "UserId", description = "User ID", required = true, schema = @Schema(defaultValue = "1")) @RequestHeader(required = true) Long UserId,
@Parameter(name = "CompanyId", description = "ID of the company to which the user belongs", required = false, schema = @Schema(defaultValue = "1")) @RequestHeader(required = true) Long CompanyId,
@Parameter(name = "LanguageType", description = "Language type (0: Chinese, 1: English, 2: Japanese)", required = true, schema = @Schema(defaultValue = "2")) @RequestHeader(required = true) Integer LanguageType) {
return levelRoleService.unbindUser(unbindUserParam, CompanyId, UserId, LanguageType);
}
@Operation(summary = "获取用户已绑定的级别角色列表")
@RequestMapping(value = "/bound/getAlreadyBoundUserPage", method = RequestMethod.GET)
public PageResponse<PageInfo<UserBoundRolePageDTO>> getAlreadyBoundUserPage(
@Parameter(name = "LoginName", description = "Login name", required = true, schema = @Schema(defaultValue = "admin")) @RequestHeader(required = true) String LoginName,
@Parameter(name = "AccessToken", description = "Authentication token", required = true) @RequestHeader(required = true) String AccessToken,
@Parameter(name = "UserId", description = "User ID", required = true, schema = @Schema(defaultValue = "1")) @RequestHeader(required = true) Long UserId,
@Parameter(name = "CompanyId", description = "ID of the company to which the user belongs", required = false, schema = @Schema(defaultValue = "1")) @RequestHeader(required = false) Long CompanyId,
@Parameter(name = "LanguageType", description = "Language type (0: Chinese, 1: English, 2: Japanese)", required = true, schema = @Schema(defaultValue = "2")) @RequestHeader(required = true) Integer LanguageType,
PageBoundRoleSearchParam pageBoundRoleSearchParam
) throws BusinessException {
pageBoundRoleSearchParam.setUserId(UserId);
PageResponse<PageInfo<UserBoundRolePageDTO>> pageResponse = new PageResponse<>();
try {
pageResponse.setData(levelRoleService.getAlreadyBoundUserPage(pageBoundRoleSearchParam, CompanyId, UserId, LanguageType));
pageResponse.setCode(ResponseCode.SUCCESS);
pageResponse.setMsg("success");
} catch (Exception e) {
logger.error("获取用户绑定的级别角色报错", e);
pageResponse.setCode(ResponseCode.SERVER_ERROR);
pageResponse.setMsg("service error");
}
return pageResponse;
}
@Operation(summary = "根据角色ID获取对应层级ID")
@GetMapping("/bound/getBoundLevelByRole/{roleId}")
public SimpleDataResponse<List<String>> getBoundLevelByRole(
@PathVariable Long roleId,
@Parameter(name = "LoginName", description = "Login name", required = true, schema = @Schema(defaultValue = "admin")) @RequestHeader(required = true) String LoginName,
@Parameter(name = "AccessToken", description = "Authentication token", required = true) @RequestHeader(required = true) String AccessToken,
@Parameter(name = "UserId", description = "User ID", required = true, schema = @Schema(defaultValue = "1")) @RequestHeader(required = true) Long UserId,
@Parameter(name = "CompanyId", description = "ID of the company to which the user belongs", required = false, schema = @Schema(defaultValue = "1")) @RequestHeader(required = false) Long CompanyId,
@Parameter(name = "LanguageType", description = "Language type (0: Chinese, 1: English, 2: Japanese)", required = true, schema = @Schema(defaultValue = "2")) @RequestHeader(required = true) Integer LanguageType
){
return levelRoleService.getBoundLevelByRole(roleId, CompanyId, UserId, LanguageType);
}
@Operation(summary = "获取当前登录用户绑定的层级树结构", description = "用于管理设置勾选层级ID")
@GetMapping("/bound/getBoundLevel")
public SimpleDataResponse<List<TreeMenusDTO>> getBoundLevel(
@Parameter(name = "LoginName", description = "Login name", required = true, schema = @Schema(defaultValue = "admin")) @RequestHeader(required = true) String LoginName,
@Parameter(name = "AccessToken", description = "Authentication token", required = true) @RequestHeader(required = true) String AccessToken,
@Parameter(name = "UserId", description = "User ID", required = true, schema = @Schema(defaultValue = "1")) @RequestHeader(required = true) Long UserId,
@Parameter(name = "CompanyId", description = "ID of the company to which the user belongs", required = false, schema = @Schema(defaultValue = "1")) @RequestHeader(required = false) Long CompanyId,
@Parameter(name = "LanguageType", description = "Language type (0: Chinese, 1: English, 2: Japanese)", required = true, schema = @Schema(defaultValue = "2")) @RequestHeader(required = true) Integer LanguageType
){
return levelRoleService.getBoundLevel(CompanyId, UserId, LanguageType);
}
}

15
dongjian-dashboard-back-controller/src/main/java/com/dongjian/dashboard/back/controller/OverviewController.java

@ -3,6 +3,7 @@ package com.dongjian.dashboard.back.controller;
import com.dongjian.dashboard.back.common.response.SimpleDataResponse;
import com.dongjian.dashboard.back.configurator.interceptor.AccessRequired;
import com.dongjian.dashboard.back.service.OverviewService;
import com.dongjian.dashboard.back.vo.TreeMenusDTO;
import com.dongjian.dashboard.back.vo.dashboardnotification.DashboardNotificationPageVO;
import com.dongjian.dashboard.back.vo.data.OverviewVO;
import com.dongjian.dashboard.back.weather.JpMeshHourlyForecasts;
@ -57,7 +58,7 @@ public class OverviewController {
@Operation(summary = "Get notification")
@RequestMapping(value = "/getNotification", method = RequestMethod.GET)
public SimpleDataResponse<DashboardNotificationPageVO> getNotification(
public SimpleDataResponse<List<DashboardNotificationPageVO>> getNotification(
@Parameter(name = "LoginName", description = "Login name", required = true, schema = @Schema(defaultValue = "admin")) @RequestHeader(required = true) String LoginName,
@Parameter(name = "AccessToken", description = "Authentication token", required = true) @RequestHeader(required = true) String AccessToken,
@Parameter(name = "UserId", description = "User ID", required = true, schema = @Schema(defaultValue = "1")) @RequestHeader(required = true) Long UserId,
@ -66,4 +67,16 @@ public class OverviewController {
@Parameter(name = "UTCOffset", description = "Time zone offset in minutes from GMT, e.g., +480 for UTC+8", required = true, schema = @Schema(defaultValue = "-480")) @RequestHeader(required = true) Integer UTCOffset) {
return overviewService.getNotification(UserId, CompanyId, LanguageType, UTCOffset);
}
@Operation(summary = "获取当前登录用户绑定的层级树结构", description = "用于管理设置勾选层级ID")
@GetMapping("/bound/getOverallBoundLevel")
public SimpleDataResponse<List<TreeMenusDTO>> getOverallBoundLevel(
@Parameter(name = "LoginName", description = "Login name", required = true, schema = @Schema(defaultValue = "admin")) @RequestHeader(required = true) String LoginName,
@Parameter(name = "AccessToken", description = "Authentication token", required = true) @RequestHeader(required = true) String AccessToken,
@Parameter(name = "UserId", description = "User ID", required = true, schema = @Schema(defaultValue = "1")) @RequestHeader(required = true) Long UserId,
@Parameter(name = "CompanyId", description = "ID of the company to which the user belongs", required = false, schema = @Schema(defaultValue = "1")) @RequestHeader(required = false) Long CompanyId,
@Parameter(name = "LanguageType", description = "Language type (0: Chinese, 1: English, 2: Japanese)", required = true, schema = @Schema(defaultValue = "2")) @RequestHeader(required = true) Integer LanguageType
){
return overviewService.getOverallBoundLevel(CompanyId, UserId, LanguageType);
}
}

46
dongjian-dashboard-back-controller/src/main/java/com/dongjian/dashboard/back/controller/RoleController.java

@ -11,10 +11,15 @@ import com.dongjian.dashboard.back.configurator.interceptor.AccessRequired;
import com.dongjian.dashboard.back.dto.role.DeleteRoleParam;
import com.dongjian.dashboard.back.dto.role.OptRoleParam;
import com.dongjian.dashboard.back.dto.role.PageSearchParam;
import com.dongjian.dashboard.back.dto.role.RoleMenuPermissionDTO;
import com.dongjian.dashboard.back.vo.TreeMenusDTO;
import com.dongjian.dashboard.back.vo.role.DashboardTreeMenusDTO;
import com.dongjian.dashboard.back.vo.role.MenuTreeVO;
import com.dongjian.dashboard.back.vo.role.RoleMenuPermissionEntity;
import com.dongjian.dashboard.back.vo.role.RolePageDTO;
import com.dongjian.dashboard.back.service.RoleService;
import io.swagger.v3.oas.annotations.Hidden;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.v3.oas.annotations.Operation;
@ -110,7 +115,8 @@ public class RoleController {
}
return pageResponse;
}
@Hidden
@Operation(summary = "获取当前登录用户拥有的权限菜单树")
@RequestMapping(value = "/getOwnMenuIds",method = RequestMethod.GET)
public SimpleDataResponse<List<TreeMenusDTO>> getOwnMenuIds(
@ -121,7 +127,8 @@ public class RoleController {
@Parameter(name = "LanguageType", description = "Language type (0: Chinese, 1: English, 2: Japanese)", required = true, schema = @Schema(defaultValue = "2")) @RequestHeader(required=true) Integer LanguageType){
return roleService.getOwnMenuIds(CompanyId, UserId, LanguageType);
}
@Hidden
@Operation(summary = "获取对应角色拥有的权限菜单ID")
@RequestMapping(value = "/getMenuIdsByRoleId",method = RequestMethod.GET)
public SimpleDataResponse<String> getMenuIdsByRoleId(
@ -133,5 +140,40 @@ public class RoleController {
@Parameter(name = "LanguageType", description = "Language type (0: Chinese, 1: English, 2: Japanese)", required = true, schema = @Schema(defaultValue = "2")) @RequestHeader(required=true) Integer LanguageType){
return roleService.getMenuIdsByRoleId(roleId, CompanyId, UserId, LanguageType);
}
/**
* 获取菜单树 + 权限
*/
@GetMapping("/getOwnMenuTree")
public SimpleDataResponse<List<DashboardTreeMenusDTO>> getTree(
@Parameter(name = "LoginName", description = "Login name", required = true, schema = @Schema(defaultValue = "admin")) @RequestHeader(required=true) String LoginName,
@Parameter(name = "AccessToken", description = "Authentication token", required = true) @RequestHeader(required=true) String AccessToken,
@Parameter(name = "UserId", description = "User ID", required = true, schema = @Schema(defaultValue = "1")) @RequestHeader(required=true) Long UserId,
@Parameter(name = "CompanyId", description = "ID of the company to which the user belongs", required = false, schema = @Schema(defaultValue = "1")) @RequestHeader(required=true) Long CompanyId,
@Parameter(name = "LanguageType", description = "Language type (0: Chinese, 1: English, 2: Japanese)", required = true, schema = @Schema(defaultValue = "2")) @RequestHeader(required=true) Integer LanguageType){
return roleService.getOwnMenuTree(CompanyId, UserId, LanguageType);
}
@Operation(summary = "获取对应角色拥有的权限菜单ID")
@RequestMapping(value = "/getMenuIdListByRoleId",method = RequestMethod.GET)
public SimpleDataResponse<List<RoleMenuPermissionEntity>> getMenuIdListByRoleId(
@Parameter(name="roleId",description="角色ID",required=true, schema = @Schema(defaultValue = "28")) @RequestParam Long roleId,
@Parameter(name = "LoginName", description = "Login name", required = true, schema = @Schema(defaultValue = "admin")) @RequestHeader(required=true) String LoginName,
@Parameter(name = "AccessToken", description = "Authentication token", required = true) @RequestHeader(required=true) String AccessToken,
@Parameter(name = "UserId", description = "User ID", required = true, schema = @Schema(defaultValue = "1")) @RequestHeader(required=true) Long UserId,
@Parameter(name = "CompanyId", description = "ID of the company to which the user belongs", required = false, schema = @Schema(defaultValue = "1")) @RequestHeader(required=true) Long CompanyId,
@Parameter(name = "LanguageType", description = "Language type (0: Chinese, 1: English, 2: Japanese)", required = true, schema = @Schema(defaultValue = "2")) @RequestHeader(required=true) Integer LanguageType){
return roleService.getMenuIdListByRoleId(roleId, CompanyId, UserId, LanguageType);
}
/**
* 保存权限
*/
@Hidden
@PostMapping("/save")
public void save(@RequestParam Long roleId,
@RequestBody List<RoleMenuPermissionDTO> list) {
roleService.saveRolePermission(roleId, list);
}
}

53
dongjian-dashboard-back-controller/src/main/resources/config/application.properties

@ -10,7 +10,7 @@ spring.datasource.admin.name=data_center_aeon_admin
spring.datasource.admin.url=jdbc:mysql://${datasourceDNS}/data_center_aeon_admin?useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=${datasourceTimeZone}
spring.datasource.admin.username=${datasourceUsername}
spring.datasource.admin.password=${datasourcePassword}
#使用druid数据源
#使用druid数据源
spring.datasource.admin.type=com.alibaba.druid.pool.DruidDataSource
spring.datasource.admin.driverClassName=com.mysql.jdbc.Driver
spring.datasource.admin.hikari.driverClassName=com.mysql.jdbc.Driver
@ -23,7 +23,7 @@ dynamic.jdbc.url=jdbc:mysql://${datasourceDNS:rm-bp11k2zm2fr7864428o.mysql.rds.a
spring.datasource.url=jdbc:mysql://${datasourceDNS:rm-bp11k2zm2fr7864428o.mysql.rds.aliyuncs.com:3306}/data_center_aeon_admin?useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=${datasourceTimeZone}
# Aurora 数据源配置
# Aurora 数据源配置
spring.aurora.datasource.url=${auroraUrl:jdbc:mysql://rm-bp11k2zm2fr7864428o.mysql.rds.aliyuncs.com:3306/data_center_aeon_admin}
spring.aurora.datasource.username=${auroraUser:zhc}
spring.aurora.datasource.password=${auroraPass:Youqu48bnb1}
@ -33,11 +33,11 @@ spring.aurora.datasource.maximum-pool-size=${auroraMaxPool:30}
spring.aurora.datasource.connection-timeout=${auroraConnTimeout:30000}
#配置log日志
#配置log日志
logging.config=classpath:config/logback-boot.xml
logging_level=${loggingLevel}
logging_path=${loggingPath}
#部署时使用SYSLOG
#部署时使用SYSLOG
logging_appender=${loggingAppender}
logging_maxHistory=${loggingMaxHistory:7}
logging_maxFileSize=100MB
@ -45,54 +45,55 @@ mybatis_log_level=${mybatisLogLevel}
user.login.keytimeout=360000
#集群模式cluster
#集群模式cluster
spring.redis.cluster.nodes=192.168.0.30:7000,192.168.0.30:7001
#跨集群执行命令时要遵循的最大重定向数量
#跨集群执行命令时要遵循的最大重定向数量
spring.redis.cluster.max-redirects=3
#哨兵模式sentinel
#哨兵模式sentinel
spring.redis.sentinel.master=mymaster
spring.redis.sentinel.nodes=192.168.0.30:16379,192.168.0.30:16379
#单机模式standalone
#单机模式standalone
spring.redis.host=${redisHost}
spring.redis.port=6379
spring.redis.password=${redisPassword}
spring.redis.timeout=5000
#Redis数据库索引(默认为0)
#Redis数据库索引(默认为0)
spring.redis.database=0
#配置启动模式cluster、sentinel、standalone
#配置启动模式cluster、sentinel、standalone
spring.redis.mode=standalone
# Lettuce
# 连接池最大连接数(使用负值表示没有限制)
# 连接池最大连接数(使用负值表示没有限制)
spring.redis.lettuce.pool.max-active=8
# 连接池最大阻塞等待时间(使用负值表示没有限制)
# 连接池最大阻塞等待时间(使用负值表示没有限制)
spring.redis.lettuce.pool.max-wait=100
# 连接池中的最大空闲连接
# 连接池中的最大空闲连接
spring.redis.lettuce.pool.max-idle=8
# 连接池中的最 小空闲连接
# 连接池中的最 小空闲连接
spring.redis.lettuce.pool.min-idle=0
# 关闭超时时间
# 关闭超时时间
spring.redis.lettuce.shutdown-timeout=100
#邮件发送信息
#邮件发送信息
mail.smtp.host=email-smtp.ap-northeast-1.amazonaws.com
mail.smtp.port=465
mail.smtp.auth=true
mail.smtp.ssl=true
mail.sender.username=AKIAVRXFMB43Z4Q6WGZN
mail.sender.password_encrypted=true
mail.sender.password=a/52R0rao7ksRMvl1j17fVEmPCw7gC9OreHDqWOE+S7sgmoQT0YgoLRJqOlJqX7e
mail.sender.sendername=datacenter-info
mail.sender.from=alert@ttkdatatechbuild.com
#邮件通知服务开关
mail.sender.username=AKIAR26KHSVR3E7N7V3X
mail.sender.password_encrypted=false
mail.sender.password=BFe3PePmvmKJKF/cwVxKq2C3EG10IcYQ+fNq0Eccl0PU
mail.sender.sendername=smbil-support@ifmservice.jp
mail.sender.from=smbil-support@ifmservice.jp
#\u90AE\u4EF6\u901A\u77E5\u670D\u52A1\u5F00\u5173
mail.send.switch=true
Spring.mvc.hiddenmethod.filter.enabled=true
#单个文件上传发大小
#单个文件上传发大小
spring.servlet.multipart.max-file-size=20MB
#多个文件上传的共大小不得超过100M
#多个文件上传的共大小不得超过100M
spring.servlet.multipart.max-request-size=100MB
server.servlet.context-path=/api
@ -126,4 +127,6 @@ ai.api_base=${aiApiBase:https://pdf-demo-stg.ttkdatatechbuild.com/api}
oidc.issuer = ${oidcIssuer:https://dongjian.southwave.tech/api}
oidc.bimviewer-url = ${oidcBimviewerUrl:https://bimviewer-stg.ttkdatatechbuild.com/TTNB}
oidc.bimviewer-cognito-auth-host = ${oidcBimviewerCognitoAuthHost:https://bimviewer-stg.auth.ap-northeast-1.amazoncognito.com}
oidc.bimviewer-cognito-auth-host = ${oidcBimviewerCognitoAuthHost:https://bimviewer-stg.auth.ap-northeast-1.amazoncognito.com}
export.page.size = ${exportPageSize:600}

6
dongjian-dashboard-back-controller/src/test/java/com/dongjian/dashboard/back/controller/AdminRoleControllerTest.java

@ -30,6 +30,8 @@ import org.springframework.web.context.WebApplicationContext;
import jakarta.annotation.Resource;
import java.util.ArrayList;
@RunWith(SpringRunner.class)
@SpringBootTest
@ -134,7 +136,7 @@ public class AdminRoleControllerTest {
OptRoleParam param = new OptRoleParam();
param.setRoleName(ROLE_NAME);
param.setDescription("Description");
param.setMenuIds("1,2");
param.setMenuIds(new ArrayList<>());
return param;
}
@ -204,7 +206,7 @@ public class AdminRoleControllerTest {
param.setRoleId(getMockDataId());
param.setRoleName(ROLE_NAME);
param.setDescription("Description-edit");
param.setMenuIds("1,2,3");
param.setMenuIds(new ArrayList<>());
String content = (new ObjectMapper()).writeValueAsString(param);
System.out.println("testEdit params:"+content);

96
dongjian-dashboard-back-dao/src/main/java/com/dongjian/dashboard/back/dao/auto/BaStatusHistoryMapper.java

@ -0,0 +1,96 @@
package com.dongjian.dashboard.back.dao.auto;
import com.dongjian.dashboard.back.model.BaStatusHistory;
import com.dongjian.dashboard.back.model.BaStatusHistoryExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface BaStatusHistoryMapper {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table ba_status_history
*
* @mbg.generated
*/
long countByExample(BaStatusHistoryExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table ba_status_history
*
* @mbg.generated
*/
int deleteByExample(BaStatusHistoryExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table ba_status_history
*
* @mbg.generated
*/
int deleteByPrimaryKey(Long id);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table ba_status_history
*
* @mbg.generated
*/
int insert(BaStatusHistory record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table ba_status_history
*
* @mbg.generated
*/
int insertSelective(BaStatusHistory record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table ba_status_history
*
* @mbg.generated
*/
List<BaStatusHistory> selectByExample(BaStatusHistoryExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table ba_status_history
*
* @mbg.generated
*/
BaStatusHistory selectByPrimaryKey(Long id);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table ba_status_history
*
* @mbg.generated
*/
int updateByExampleSelective(@Param("record") BaStatusHistory record, @Param("example") BaStatusHistoryExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table ba_status_history
*
* @mbg.generated
*/
int updateByExample(@Param("record") BaStatusHistory record, @Param("example") BaStatusHistoryExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table ba_status_history
*
* @mbg.generated
*/
int updateByPrimaryKeySelective(BaStatusHistory record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table ba_status_history
*
* @mbg.generated
*/
int updateByPrimaryKey(BaStatusHistory record);
}

96
dongjian-dashboard-back-dao/src/main/java/com/dongjian/dashboard/back/dao/auto/DashboardLevelRoleMapper.java

@ -0,0 +1,96 @@
package com.dongjian.dashboard.back.dao.auto;
import com.dongjian.dashboard.back.model.DashboardLevelRole;
import com.dongjian.dashboard.back.model.DashboardLevelRoleExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface DashboardLevelRoleMapper {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table dashboard_level_role
*
* @mbg.generated
*/
long countByExample(DashboardLevelRoleExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table dashboard_level_role
*
* @mbg.generated
*/
int deleteByExample(DashboardLevelRoleExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table dashboard_level_role
*
* @mbg.generated
*/
int deleteByPrimaryKey(Long id);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table dashboard_level_role
*
* @mbg.generated
*/
int insert(DashboardLevelRole record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table dashboard_level_role
*
* @mbg.generated
*/
int insertSelective(DashboardLevelRole record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table dashboard_level_role
*
* @mbg.generated
*/
List<DashboardLevelRole> selectByExample(DashboardLevelRoleExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table dashboard_level_role
*
* @mbg.generated
*/
DashboardLevelRole selectByPrimaryKey(Long id);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table dashboard_level_role
*
* @mbg.generated
*/
int updateByExampleSelective(@Param("record") DashboardLevelRole record, @Param("example") DashboardLevelRoleExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table dashboard_level_role
*
* @mbg.generated
*/
int updateByExample(@Param("record") DashboardLevelRole record, @Param("example") DashboardLevelRoleExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table dashboard_level_role
*
* @mbg.generated
*/
int updateByPrimaryKeySelective(DashboardLevelRole record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table dashboard_level_role
*
* @mbg.generated
*/
int updateByPrimaryKey(DashboardLevelRole record);
}

64
dongjian-dashboard-back-dao/src/main/java/com/dongjian/dashboard/back/dao/auto/DashboardLevelRoleObjectMapper.java

@ -0,0 +1,64 @@
package com.dongjian.dashboard.back.dao.auto;
import com.dongjian.dashboard.back.model.DashboardLevelRoleObject;
import com.dongjian.dashboard.back.model.DashboardLevelRoleObjectExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface DashboardLevelRoleObjectMapper {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table dashboard_level_role_object
*
* @mbg.generated
*/
long countByExample(DashboardLevelRoleObjectExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table dashboard_level_role_object
*
* @mbg.generated
*/
int deleteByExample(DashboardLevelRoleObjectExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table dashboard_level_role_object
*
* @mbg.generated
*/
int insert(DashboardLevelRoleObject record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table dashboard_level_role_object
*
* @mbg.generated
*/
int insertSelective(DashboardLevelRoleObject record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table dashboard_level_role_object
*
* @mbg.generated
*/
List<DashboardLevelRoleObject> selectByExample(DashboardLevelRoleObjectExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table dashboard_level_role_object
*
* @mbg.generated
*/
int updateByExampleSelective(@Param("record") DashboardLevelRoleObject record, @Param("example") DashboardLevelRoleObjectExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table dashboard_level_role_object
*
* @mbg.generated
*/
int updateByExample(@Param("record") DashboardLevelRoleObject record, @Param("example") DashboardLevelRoleObjectExample example);
}

96
dongjian-dashboard-back-dao/src/main/java/com/dongjian/dashboard/back/dao/auto/DashboardLevelRoleUserMapper.java

@ -0,0 +1,96 @@
package com.dongjian.dashboard.back.dao.auto;
import com.dongjian.dashboard.back.model.DashboardLevelRoleUser;
import com.dongjian.dashboard.back.model.DashboardLevelRoleUserExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface DashboardLevelRoleUserMapper {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table dashboard_level_role_user
*
* @mbg.generated
*/
long countByExample(DashboardLevelRoleUserExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table dashboard_level_role_user
*
* @mbg.generated
*/
int deleteByExample(DashboardLevelRoleUserExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table dashboard_level_role_user
*
* @mbg.generated
*/
int deleteByPrimaryKey(Long id);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table dashboard_level_role_user
*
* @mbg.generated
*/
int insert(DashboardLevelRoleUser record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table dashboard_level_role_user
*
* @mbg.generated
*/
int insertSelective(DashboardLevelRoleUser record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table dashboard_level_role_user
*
* @mbg.generated
*/
List<DashboardLevelRoleUser> selectByExample(DashboardLevelRoleUserExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table dashboard_level_role_user
*
* @mbg.generated
*/
DashboardLevelRoleUser selectByPrimaryKey(Long id);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table dashboard_level_role_user
*
* @mbg.generated
*/
int updateByExampleSelective(@Param("record") DashboardLevelRoleUser record, @Param("example") DashboardLevelRoleUserExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table dashboard_level_role_user
*
* @mbg.generated
*/
int updateByExample(@Param("record") DashboardLevelRoleUser record, @Param("example") DashboardLevelRoleUserExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table dashboard_level_role_user
*
* @mbg.generated
*/
int updateByPrimaryKeySelective(DashboardLevelRoleUser record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table dashboard_level_role_user
*
* @mbg.generated
*/
int updateByPrimaryKey(DashboardLevelRoleUser record);
}

96
dongjian-dashboard-back-dao/src/main/java/com/dongjian/dashboard/back/dao/auto/DashboardNotificationCategoryMapper.java

@ -0,0 +1,96 @@
package com.dongjian.dashboard.back.dao.auto;
import com.dongjian.dashboard.back.model.DashboardNotificationCategory;
import com.dongjian.dashboard.back.model.DashboardNotificationCategoryExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface DashboardNotificationCategoryMapper {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table dashboard_notification_category
*
* @mbg.generated
*/
long countByExample(DashboardNotificationCategoryExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table dashboard_notification_category
*
* @mbg.generated
*/
int deleteByExample(DashboardNotificationCategoryExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table dashboard_notification_category
*
* @mbg.generated
*/
int deleteByPrimaryKey(Long id);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table dashboard_notification_category
*
* @mbg.generated
*/
int insert(DashboardNotificationCategory record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table dashboard_notification_category
*
* @mbg.generated
*/
int insertSelective(DashboardNotificationCategory record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table dashboard_notification_category
*
* @mbg.generated
*/
List<DashboardNotificationCategory> selectByExample(DashboardNotificationCategoryExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table dashboard_notification_category
*
* @mbg.generated
*/
DashboardNotificationCategory selectByPrimaryKey(Long id);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table dashboard_notification_category
*
* @mbg.generated
*/
int updateByExampleSelective(@Param("record") DashboardNotificationCategory record, @Param("example") DashboardNotificationCategoryExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table dashboard_notification_category
*
* @mbg.generated
*/
int updateByExample(@Param("record") DashboardNotificationCategory record, @Param("example") DashboardNotificationCategoryExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table dashboard_notification_category
*
* @mbg.generated
*/
int updateByPrimaryKeySelective(DashboardNotificationCategory record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table dashboard_notification_category
*
* @mbg.generated
*/
int updateByPrimaryKey(DashboardNotificationCategory record);
}

9
dongjian-dashboard-back-dao/src/main/java/com/dongjian/dashboard/back/dao/ex/BaStatusHistoryMapperExt.java

@ -0,0 +1,9 @@
package com.dongjian.dashboard.back.dao.ex;
import com.dongjian.dashboard.back.dao.auto.BaStatusHistoryMapper;
import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface BaStatusHistoryMapperExt extends BaStatusHistoryMapper {
}

4
dongjian-dashboard-back-dao/src/main/java/com/dongjian/dashboard/back/dao/ex/BasicBuildingMapperExt.java

@ -4,6 +4,7 @@ import com.dongjian.dashboard.back.dao.auto.BasicBuildingMapper;
import com.dongjian.dashboard.back.dto.building.BuildingSearchParams;
import com.dongjian.dashboard.back.vo.building.BuildingPageVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
@ -12,4 +13,7 @@ public interface BasicBuildingMapperExt extends BasicBuildingMapper {
List<BuildingPageVO> getListPage(BuildingSearchParams pageSearchParam);
List<Long> getBuildingIdListByCompanyId(@Param("companyIdList") List<Long> companyIdList);
List<BuildingPageVO> getBuildingListBySiteId(@Param("siteId") Long siteId);
}

16
dongjian-dashboard-back-dao/src/main/java/com/dongjian/dashboard/back/dao/ex/BasicRoleMenuRelationMapperExt.java

@ -1,10 +1,14 @@
package com.dongjian.dashboard.back.dao.ex;
import java.util.List;
import java.util.Map;
import com.dongjian.dashboard.back.vo.role.DashboardTreeMenusDTO;
import com.dongjian.dashboard.back.vo.role.RoleMenuPermissionEntity;
import org.apache.ibatis.annotations.Mapper;
import com.dongjian.dashboard.back.dao.auto.BasicRoleMenuRelationMapper;
import org.apache.ibatis.annotations.Param;
@Mapper
public interface BasicRoleMenuRelationMapperExt extends BasicRoleMenuRelationMapper {
@ -14,4 +18,16 @@ public interface BasicRoleMenuRelationMapperExt extends BasicRoleMenuRelationMap
String getMenuIdsByRoleId(Long roleId);
void deleteDashboardRelation(Map<String, Object> deleteMap);
List<DashboardTreeMenusDTO> selectAllMenu(Map<String, Object> allMenusParamMap);
List<RoleMenuPermissionEntity> selectByRoleId(@Param("roleId") Long roleId);
int deleteByRoleId(@Param("roleId") Long roleId);
int dashboardBatchInsert(@Param("list") List<RoleMenuPermissionEntity> list);
Long getRoleIdByUserId(@Param("userId") Long userId);
List<RoleMenuPermissionEntity> getMenuIdListByRoleId(Long roleId);
}

2
dongjian-dashboard-back-dao/src/main/java/com/dongjian/dashboard/back/dao/ex/BasicUserMapperExt.java

@ -23,4 +23,6 @@ public interface BasicUserMapperExt extends BasicUserMapper{
UserInfoVO getAccountInfo(Map<String, Object> paramMap);
Integer checkBuildingManager(Long userId);
Integer checkLevelManager(Long userId);
}

17
dongjian-dashboard-back-dao/src/main/java/com/dongjian/dashboard/back/dao/ex/DashboardNotificationCategoryMapperExt.java

@ -0,0 +1,17 @@
package com.dongjian.dashboard.back.dao.ex;
import com.dongjian.dashboard.back.dao.auto.DashboardNotificationCategoryMapper;
import com.dongjian.dashboard.back.dto.dashboardnotification.DashboardNotificationCategorySearchParams;
import com.dongjian.dashboard.back.dto.dashboardnotification.OptDashboardNotificationCategoryParams;
import com.dongjian.dashboard.back.vo.dashboardnotification.DashboardNotificationCategoryPageVO;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
@Mapper
public interface DashboardNotificationCategoryMapperExt extends DashboardNotificationCategoryMapper {
int checkExist(OptDashboardNotificationCategoryParams optDashboardNotificationCategoryParams);
List<DashboardNotificationCategoryPageVO> getListPage(DashboardNotificationCategorySearchParams pageSearchParam);
}

5
dongjian-dashboard-back-dao/src/main/java/com/dongjian/dashboard/back/dao/ex/DashboardNotificationMapperExt.java

@ -4,6 +4,7 @@ import java.util.List;
import com.dongjian.dashboard.back.dao.auto.DashboardNotificationMapper;
import com.dongjian.dashboard.back.dao.auto.UserBuildingRelationMapper;
import com.dongjian.dashboard.back.dto.dashboardnotification.DashboardNotificationSearchParams;
import com.dongjian.dashboard.back.model.UserBuildingRelation;
import com.dongjian.dashboard.back.vo.building.BindedBuildingVO;
import com.dongjian.dashboard.back.vo.dashboardnotification.DashboardNotificationPageVO;
@ -12,6 +13,8 @@ import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface DashboardNotificationMapperExt extends DashboardNotificationMapper {
DashboardNotificationPageVO getNotification(Long companyId);
List<DashboardNotificationPageVO> getNotification(Long companyId);
List<DashboardNotificationPageVO> getListPage(DashboardNotificationSearchParams pageSearchParam);
}

15
dongjian-dashboard-back-dao/src/main/java/com/dongjian/dashboard/back/dao/ex/DeviceInfoMapperExt.java

@ -2,17 +2,12 @@ package com.dongjian.dashboard.back.dao.ex;
import com.dongjian.dashboard.back.dao.auto.DeviceInfoMapper;
import com.dongjian.dashboard.back.dto.data.AccumulateDataSearchParam;
import com.dongjian.dashboard.back.dto.data.AlarmDataSearchParam;
import com.dongjian.dashboard.back.dto.data.BaStatusDataSearchParam;
import com.dongjian.dashboard.back.dto.data.MeasureDataSearchParam;
import com.dongjian.dashboard.back.dto.data.*;
import com.dongjian.dashboard.back.dto.device.DeviceSearchParams;
import com.dongjian.dashboard.back.vo.data.DeviceAccumulateData;
import com.dongjian.dashboard.back.vo.data.DeviceAlarmData;
import com.dongjian.dashboard.back.vo.data.DeviceBaStatusData;
import com.dongjian.dashboard.back.vo.data.DeviceMeasureData;
import com.dongjian.dashboard.back.vo.data.*;
import com.dongjian.dashboard.back.vo.device.DeviceVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
@ -38,4 +33,8 @@ public interface DeviceInfoMapperExt extends DeviceInfoMapper {
List<DeviceAlarmData> getDevice4AlarmData(AlarmDataSearchParam pageSearchParam);
List<DeviceAlarmData> getDevice4AlarmDataByGroup(AlarmDataSearchParam pageSearchParam);
List<DeviceTrendLogData> getDevice4TrendLogData(TrendLogDataSearchParam pageSearchParam);
List<DeviceTrendLogData> getDevice4TrendLogDataByGroup(TrendLogDataSearchParam pageSearchParam);
}

3
dongjian-dashboard-back-dao/src/main/java/com/dongjian/dashboard/back/dao/ex/DeviceRawdataRealtimeMapperExt.java

@ -11,7 +11,4 @@ import java.util.Map;
@Mapper
public interface DeviceRawdataRealtimeMapperExt extends DeviceRawdataRealtimeMapper {
List<OverviewInfo> getOverviewInfo(Map<String, Object> paramMap);
List<OverviewVO> getBuildingInfo(Map<String, Object> buildingMap);
}

9
dongjian-dashboard-back-dao/src/main/java/com/dongjian/dashboard/back/dao/ex/LevelMapperExt.java

@ -4,11 +4,14 @@ import com.dongjian.dashboard.back.dto.level.LevelEntity;
import com.dongjian.dashboard.back.dto.level.LevelRelationEntity;
import com.dongjian.dashboard.back.dto.level.OptLevelParam;
import com.dongjian.dashboard.back.dto.level.PageLevelSearchParam;
import com.dongjian.dashboard.back.vo.building.BindedBuildingVO;
import com.dongjian.dashboard.back.vo.level.BuildingPathDTO;
import com.dongjian.dashboard.back.vo.level.LevelPageDTO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.Map;
@Mapper
public interface LevelMapperExt {
@ -32,4 +35,10 @@ public interface LevelMapperExt {
void deleteLevelRelationByIdList(@Param("param") LevelRelationEntity param, @Param("idList") List<Long> idList);
List<LevelPageDTO> getListPage(PageLevelSearchParam pageSearchParam);
List<Long> getBoundBuilding(Long userId);
List<BuildingPathDTO> selectBuildingFullPath(Map<String, Object> buildingMap);
void deleteSiteBuildingRelation(Map<String, Object> delParamMap);
}

43
dongjian-dashboard-back-dao/src/main/java/com/dongjian/dashboard/back/dao/ex/LevelRoleMapperExt.java

@ -0,0 +1,43 @@
package com.dongjian.dashboard.back.dao.ex;
import com.dongjian.dashboard.back.dao.auto.DashboardLevelRoleMapper;
import com.dongjian.dashboard.back.dto.BaseSearchParams;
import com.dongjian.dashboard.back.dto.levelrole.OptLevelRoleParam;
import com.dongjian.dashboard.back.dto.levelrole.PageBoundRoleSearchParam;
import com.dongjian.dashboard.back.dto.levelrole.PageLevelRoleSearchParam;
import com.dongjian.dashboard.back.vo.levelrole.LevelRolePageDTO;
import com.dongjian.dashboard.back.vo.levelrole.RefKey;
import com.dongjian.dashboard.back.vo.levelrole.UserBindLevelRoleVO;
import com.dongjian.dashboard.back.vo.levelrole.UserBoundRolePageDTO;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
import java.util.Map;
@Mapper
public interface LevelRoleMapperExt extends DashboardLevelRoleMapper {
long checkExist(OptLevelRoleParam param);
List<LevelRolePageDTO> getListPage(PageLevelRoleSearchParam pageSearchParam);
List<RefKey> selectAllBranches(Map<String, Object> levelMap);
List<RefKey> selectAllStores(Map<String, Object> levelMap);
List<RefKey> selectAllAreas(Map<String, Object> levelMap);
List<RefKey> selectAllSites(Map<String, Object> levelMap);
List<RefKey> selectAllBuildings(Map<String, Object> levelMap);
List<RefKey> selectUserRefs(Map<String, Object> param);
List<String> getBoundLevelByRole(Long roleId);
List<UserBoundRolePageDTO> getAlreadyBoundUserPage(PageBoundRoleSearchParam pageSearchParam);
List<UserBindLevelRoleVO> getCanBeBoundUserPage(BaseSearchParams pageSearchParam);
Integer checkLevelManager(Long userId);
}

9
dongjian-dashboard-back-dao/src/main/java/com/dongjian/dashboard/back/dao/ex/LevelRoleObjectMapperExt.java

@ -0,0 +1,9 @@
package com.dongjian.dashboard.back.dao.ex;
import com.dongjian.dashboard.back.dao.auto.DashboardLevelRoleObjectMapper;
import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface LevelRoleObjectMapperExt extends DashboardLevelRoleObjectMapper {
}

9
dongjian-dashboard-back-dao/src/main/java/com/dongjian/dashboard/back/dao/ex/LevelRoleUserMapperExt.java

@ -0,0 +1,9 @@
package com.dongjian.dashboard.back.dao.ex;
import com.dongjian.dashboard.back.dao.auto.DashboardLevelRoleUserMapper;
import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface LevelRoleUserMapperExt extends DashboardLevelRoleUserMapper {
}

19
dongjian-dashboard-back-dao/src/main/java/com/dongjian/dashboard/back/dao/ex/OverviewInfoMapperExt.java

@ -0,0 +1,19 @@
package com.dongjian.dashboard.back.dao.ex;
import com.dongjian.dashboard.back.vo.data.OverviewCategoryVO;
import com.dongjian.dashboard.back.vo.data.OverviewInfo;
import com.dongjian.dashboard.back.vo.data.OverviewVO;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
import java.util.Map;
@Mapper
public interface OverviewInfoMapperExt {
List<OverviewInfo> getOverviewInfo(Map<String, Object> paramMap);
List<OverviewVO> getBuildingInfo(Map<String, Object> buildingMap);
List<OverviewCategoryVO> getExistingCategoryList(Map<String, Object> allCategoryParamMap);
}

257
dongjian-dashboard-back-dao/src/main/resources/mappers/auto/BaStatusHistoryMapper.xml

@ -0,0 +1,257 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.dongjian.dashboard.back.dao.auto.BaStatusHistoryMapper">
<resultMap id="BaseResultMap" type="com.dongjian.dashboard.back.model.BaStatusHistory">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<id column="id" jdbcType="BIGINT" property="id" />
<result column="device_info_id" jdbcType="INTEGER" property="deviceInfoId" />
<result column="is_running" jdbcType="INTEGER" property="isRunning" />
<result column="update_ts" jdbcType="VARCHAR" property="updateTs" />
</resultMap>
<sql id="Example_Where_Clause">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
id, device_info_id, is_running, update_ts
</sql>
<select id="selectByExample" parameterType="com.dongjian.dashboard.back.model.BaStatusHistoryExample" resultMap="BaseResultMap">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<if test="distinct">
distinct
</if>
'true' as QUERYID,
<include refid="Base_Column_List" />
from ba_status_history
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<include refid="Base_Column_List" />
from ba_status_history
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from ba_status_history
where id = #{id,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="com.dongjian.dashboard.back.model.BaStatusHistoryExample">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from ba_status_history
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.dongjian.dashboard.back.model.BaStatusHistory">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID()
</selectKey>
insert into ba_status_history (device_info_id, is_running, update_ts
)
values (#{deviceInfoId,jdbcType=INTEGER}, #{isRunning,jdbcType=INTEGER}, #{updateTs,jdbcType=VARCHAR}
)
</insert>
<insert id="insertSelective" parameterType="com.dongjian.dashboard.back.model.BaStatusHistory">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID()
</selectKey>
insert into ba_status_history
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="deviceInfoId != null">
device_info_id,
</if>
<if test="isRunning != null">
is_running,
</if>
<if test="updateTs != null">
update_ts,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="deviceInfoId != null">
#{deviceInfoId,jdbcType=INTEGER},
</if>
<if test="isRunning != null">
#{isRunning,jdbcType=INTEGER},
</if>
<if test="updateTs != null">
#{updateTs,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.dongjian.dashboard.back.model.BaStatusHistoryExample" resultType="java.lang.Long">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select count(*) from ba_status_history
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update ba_status_history
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.deviceInfoId != null">
device_info_id = #{record.deviceInfoId,jdbcType=INTEGER},
</if>
<if test="record.isRunning != null">
is_running = #{record.isRunning,jdbcType=INTEGER},
</if>
<if test="record.updateTs != null">
update_ts = #{record.updateTs,jdbcType=VARCHAR},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update ba_status_history
set id = #{record.id,jdbcType=BIGINT},
device_info_id = #{record.deviceInfoId,jdbcType=INTEGER},
is_running = #{record.isRunning,jdbcType=INTEGER},
update_ts = #{record.updateTs,jdbcType=VARCHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.dongjian.dashboard.back.model.BaStatusHistory">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update ba_status_history
<set>
<if test="deviceInfoId != null">
device_info_id = #{deviceInfoId,jdbcType=INTEGER},
</if>
<if test="isRunning != null">
is_running = #{isRunning,jdbcType=INTEGER},
</if>
<if test="updateTs != null">
update_ts = #{updateTs,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.dongjian.dashboard.back.model.BaStatusHistory">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update ba_status_history
set device_info_id = #{deviceInfoId,jdbcType=INTEGER},
is_running = #{isRunning,jdbcType=INTEGER},
update_ts = #{updateTs,jdbcType=VARCHAR}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>

57
dongjian-dashboard-back-dao/src/main/resources/mappers/auto/BasicUserMapper.xml

@ -26,6 +26,9 @@
<result column="modifier_id" jdbcType="BIGINT" property="modifierId" />
<result column="super_role" jdbcType="INTEGER" property="superRole" />
<result column="create_platform" jdbcType="INTEGER" property="createPlatform" />
<result column="last_name" jdbcType="VARCHAR" property="lastName" />
<result column="first_name" jdbcType="VARCHAR" property="firstName" />
<result column="adsc_flag" jdbcType="INTEGER" property="adscFlag" />
</resultMap>
<sql id="Example_Where_Clause">
<!--
@ -100,7 +103,7 @@
-->
id, user_type, company_id, username, login_name, `password`, salt, email, mfa_secret,
mfa_bind, mobile_number, last_login_time, flag, expire_time, create_time, creator_id,
modify_time, modifier_id, super_role, create_platform
modify_time, modifier_id, super_role, create_platform, last_name, first_name, adsc_flag
</sql>
<select id="selectByExample" parameterType="com.dongjian.dashboard.back.model.BasicUserExample" resultMap="BaseResultMap">
<!--
@ -163,14 +166,16 @@
mobile_number, last_login_time, flag,
expire_time, create_time, creator_id,
modify_time, modifier_id, super_role,
create_platform)
create_platform, last_name, first_name,
adsc_flag)
values (#{userType,jdbcType=INTEGER}, #{companyId,jdbcType=BIGINT}, #{username,jdbcType=VARCHAR},
#{loginName,jdbcType=VARCHAR}, #{password,jdbcType=VARCHAR}, #{salt,jdbcType=VARCHAR},
#{email,jdbcType=VARCHAR}, #{mfaSecret,jdbcType=VARCHAR}, #{mfaBind,jdbcType=INTEGER},
#{mobileNumber,jdbcType=VARCHAR}, #{lastLoginTime,jdbcType=BIGINT}, #{flag,jdbcType=INTEGER},
#{expireTime,jdbcType=BIGINT}, #{createTime,jdbcType=BIGINT}, #{creatorId,jdbcType=BIGINT},
#{modifyTime,jdbcType=BIGINT}, #{modifierId,jdbcType=BIGINT}, #{superRole,jdbcType=INTEGER},
#{createPlatform,jdbcType=INTEGER})
#{createPlatform,jdbcType=INTEGER}, #{lastName,jdbcType=VARCHAR}, #{firstName,jdbcType=VARCHAR},
#{adscFlag,jdbcType=INTEGER})
</insert>
<insert id="insertSelective" parameterType="com.dongjian.dashboard.back.model.BasicUser">
<!--
@ -239,6 +244,15 @@
<if test="createPlatform != null">
create_platform,
</if>
<if test="lastName != null">
last_name,
</if>
<if test="firstName != null">
first_name,
</if>
<if test="adscFlag != null">
adsc_flag,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="userType != null">
@ -298,6 +312,15 @@
<if test="createPlatform != null">
#{createPlatform,jdbcType=INTEGER},
</if>
<if test="lastName != null">
#{lastName,jdbcType=VARCHAR},
</if>
<if test="firstName != null">
#{firstName,jdbcType=VARCHAR},
</if>
<if test="adscFlag != null">
#{adscFlag,jdbcType=INTEGER},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.dongjian.dashboard.back.model.BasicUserExample" resultType="java.lang.Long">
@ -377,6 +400,15 @@
<if test="record.createPlatform != null">
create_platform = #{record.createPlatform,jdbcType=INTEGER},
</if>
<if test="record.lastName != null">
last_name = #{record.lastName,jdbcType=VARCHAR},
</if>
<if test="record.firstName != null">
first_name = #{record.firstName,jdbcType=VARCHAR},
</if>
<if test="record.adscFlag != null">
adsc_flag = #{record.adscFlag,jdbcType=INTEGER},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
@ -407,7 +439,10 @@
modify_time = #{record.modifyTime,jdbcType=BIGINT},
modifier_id = #{record.modifierId,jdbcType=BIGINT},
super_role = #{record.superRole,jdbcType=INTEGER},
create_platform = #{record.createPlatform,jdbcType=INTEGER}
create_platform = #{record.createPlatform,jdbcType=INTEGER},
last_name = #{record.lastName,jdbcType=VARCHAR},
first_name = #{record.firstName,jdbcType=VARCHAR},
adsc_flag = #{record.adscFlag,jdbcType=INTEGER}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
@ -476,6 +511,15 @@
<if test="createPlatform != null">
create_platform = #{createPlatform,jdbcType=INTEGER},
</if>
<if test="lastName != null">
last_name = #{lastName,jdbcType=VARCHAR},
</if>
<if test="firstName != null">
first_name = #{firstName,jdbcType=VARCHAR},
</if>
<if test="adscFlag != null">
adsc_flag = #{adscFlag,jdbcType=INTEGER},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
@ -503,7 +547,10 @@
modify_time = #{modifyTime,jdbcType=BIGINT},
modifier_id = #{modifierId,jdbcType=BIGINT},
super_role = #{superRole,jdbcType=INTEGER},
create_platform = #{createPlatform,jdbcType=INTEGER}
create_platform = #{createPlatform,jdbcType=INTEGER},
last_name = #{lastName,jdbcType=VARCHAR},
first_name = #{firstName,jdbcType=VARCHAR},
adsc_flag = #{adscFlag,jdbcType=INTEGER}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>

334
dongjian-dashboard-back-dao/src/main/resources/mappers/auto/DashboardLevelRoleMapper.xml

@ -0,0 +1,334 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.dongjian.dashboard.back.dao.auto.DashboardLevelRoleMapper">
<resultMap id="BaseResultMap" type="com.dongjian.dashboard.back.model.DashboardLevelRole">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<id column="id" jdbcType="BIGINT" property="id" />
<result column="company_id" jdbcType="BIGINT" property="companyId" />
<result column="name" jdbcType="VARCHAR" property="name" />
<result column="remark" jdbcType="VARCHAR" property="remark" />
<result column="flag" jdbcType="INTEGER" property="flag" />
<result column="created_by" jdbcType="BIGINT" property="createdBy" />
<result column="created_at" jdbcType="BIGINT" property="createdAt" />
<result column="updated_at" jdbcType="BIGINT" property="updatedAt" />
<result column="updated_by" jdbcType="BIGINT" property="updatedBy" />
</resultMap>
<sql id="Example_Where_Clause">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
id, company_id, `name`, remark, flag, created_by, created_at, updated_at, updated_by
</sql>
<select id="selectByExample" parameterType="com.dongjian.dashboard.back.model.DashboardLevelRoleExample" resultMap="BaseResultMap">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<if test="distinct">
distinct
</if>
'true' as QUERYID,
<include refid="Base_Column_List" />
from dashboard_level_role
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<include refid="Base_Column_List" />
from dashboard_level_role
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from dashboard_level_role
where id = #{id,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="com.dongjian.dashboard.back.model.DashboardLevelRoleExample">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from dashboard_level_role
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.dongjian.dashboard.back.model.DashboardLevelRole">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID()
</selectKey>
insert into dashboard_level_role (company_id, `name`, remark,
flag, created_by, created_at,
updated_at, updated_by)
values (#{companyId,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR},
#{flag,jdbcType=INTEGER}, #{createdBy,jdbcType=BIGINT}, #{createdAt,jdbcType=BIGINT},
#{updatedAt,jdbcType=BIGINT}, #{updatedBy,jdbcType=BIGINT})
</insert>
<insert id="insertSelective" parameterType="com.dongjian.dashboard.back.model.DashboardLevelRole">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID()
</selectKey>
insert into dashboard_level_role
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="companyId != null">
company_id,
</if>
<if test="name != null">
`name`,
</if>
<if test="remark != null">
remark,
</if>
<if test="flag != null">
flag,
</if>
<if test="createdBy != null">
created_by,
</if>
<if test="createdAt != null">
created_at,
</if>
<if test="updatedAt != null">
updated_at,
</if>
<if test="updatedBy != null">
updated_by,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="companyId != null">
#{companyId,jdbcType=BIGINT},
</if>
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>
<if test="remark != null">
#{remark,jdbcType=VARCHAR},
</if>
<if test="flag != null">
#{flag,jdbcType=INTEGER},
</if>
<if test="createdBy != null">
#{createdBy,jdbcType=BIGINT},
</if>
<if test="createdAt != null">
#{createdAt,jdbcType=BIGINT},
</if>
<if test="updatedAt != null">
#{updatedAt,jdbcType=BIGINT},
</if>
<if test="updatedBy != null">
#{updatedBy,jdbcType=BIGINT},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.dongjian.dashboard.back.model.DashboardLevelRoleExample" resultType="java.lang.Long">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select count(*) from dashboard_level_role
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update dashboard_level_role
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.companyId != null">
company_id = #{record.companyId,jdbcType=BIGINT},
</if>
<if test="record.name != null">
`name` = #{record.name,jdbcType=VARCHAR},
</if>
<if test="record.remark != null">
remark = #{record.remark,jdbcType=VARCHAR},
</if>
<if test="record.flag != null">
flag = #{record.flag,jdbcType=INTEGER},
</if>
<if test="record.createdBy != null">
created_by = #{record.createdBy,jdbcType=BIGINT},
</if>
<if test="record.createdAt != null">
created_at = #{record.createdAt,jdbcType=BIGINT},
</if>
<if test="record.updatedAt != null">
updated_at = #{record.updatedAt,jdbcType=BIGINT},
</if>
<if test="record.updatedBy != null">
updated_by = #{record.updatedBy,jdbcType=BIGINT},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update dashboard_level_role
set id = #{record.id,jdbcType=BIGINT},
company_id = #{record.companyId,jdbcType=BIGINT},
`name` = #{record.name,jdbcType=VARCHAR},
remark = #{record.remark,jdbcType=VARCHAR},
flag = #{record.flag,jdbcType=INTEGER},
created_by = #{record.createdBy,jdbcType=BIGINT},
created_at = #{record.createdAt,jdbcType=BIGINT},
updated_at = #{record.updatedAt,jdbcType=BIGINT},
updated_by = #{record.updatedBy,jdbcType=BIGINT}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.dongjian.dashboard.back.model.DashboardLevelRole">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update dashboard_level_role
<set>
<if test="companyId != null">
company_id = #{companyId,jdbcType=BIGINT},
</if>
<if test="name != null">
`name` = #{name,jdbcType=VARCHAR},
</if>
<if test="remark != null">
remark = #{remark,jdbcType=VARCHAR},
</if>
<if test="flag != null">
flag = #{flag,jdbcType=INTEGER},
</if>
<if test="createdBy != null">
created_by = #{createdBy,jdbcType=BIGINT},
</if>
<if test="createdAt != null">
created_at = #{createdAt,jdbcType=BIGINT},
</if>
<if test="updatedAt != null">
updated_at = #{updatedAt,jdbcType=BIGINT},
</if>
<if test="updatedBy != null">
updated_by = #{updatedBy,jdbcType=BIGINT},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.dongjian.dashboard.back.model.DashboardLevelRole">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update dashboard_level_role
set company_id = #{companyId,jdbcType=BIGINT},
`name` = #{name,jdbcType=VARCHAR},
remark = #{remark,jdbcType=VARCHAR},
flag = #{flag,jdbcType=INTEGER},
created_by = #{createdBy,jdbcType=BIGINT},
created_at = #{createdAt,jdbcType=BIGINT},
updated_at = #{updatedAt,jdbcType=BIGINT},
updated_by = #{updatedBy,jdbcType=BIGINT}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>

244
dongjian-dashboard-back-dao/src/main/resources/mappers/auto/DashboardLevelRoleObjectMapper.xml

@ -0,0 +1,244 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.dongjian.dashboard.back.dao.auto.DashboardLevelRoleObjectMapper">
<resultMap id="BaseResultMap" type="com.dongjian.dashboard.back.model.DashboardLevelRoleObject">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<result column="level_role_id" jdbcType="BIGINT" property="levelRoleId" />
<result column="ref_type" jdbcType="CHAR" property="refType" />
<result column="ref_id" jdbcType="BIGINT" property="refId" />
<result column="created_by" jdbcType="BIGINT" property="createdBy" />
<result column="created_at" jdbcType="BIGINT" property="createdAt" />
<result column="updated_at" jdbcType="BIGINT" property="updatedAt" />
<result column="updated_by" jdbcType="BIGINT" property="updatedBy" />
</resultMap>
<sql id="Example_Where_Clause">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
level_role_id, ref_type, ref_id, created_by, created_at, updated_at, updated_by
</sql>
<select id="selectByExample" parameterType="com.dongjian.dashboard.back.model.DashboardLevelRoleObjectExample" resultMap="BaseResultMap">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<if test="distinct">
distinct
</if>
'true' as QUERYID,
<include refid="Base_Column_List" />
from dashboard_level_role_object
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<delete id="deleteByExample" parameterType="com.dongjian.dashboard.back.model.DashboardLevelRoleObjectExample">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from dashboard_level_role_object
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.dongjian.dashboard.back.model.DashboardLevelRoleObject">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into dashboard_level_role_object (level_role_id, ref_type, ref_id,
created_by, created_at, updated_at,
updated_by)
values (#{levelRoleId,jdbcType=BIGINT}, #{refType,jdbcType=CHAR}, #{refId,jdbcType=BIGINT},
#{createdBy,jdbcType=BIGINT}, #{createdAt,jdbcType=BIGINT}, #{updatedAt,jdbcType=BIGINT},
#{updatedBy,jdbcType=BIGINT})
</insert>
<insert id="insertSelective" parameterType="com.dongjian.dashboard.back.model.DashboardLevelRoleObject">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into dashboard_level_role_object
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="levelRoleId != null">
level_role_id,
</if>
<if test="refType != null">
ref_type,
</if>
<if test="refId != null">
ref_id,
</if>
<if test="createdBy != null">
created_by,
</if>
<if test="createdAt != null">
created_at,
</if>
<if test="updatedAt != null">
updated_at,
</if>
<if test="updatedBy != null">
updated_by,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="levelRoleId != null">
#{levelRoleId,jdbcType=BIGINT},
</if>
<if test="refType != null">
#{refType,jdbcType=CHAR},
</if>
<if test="refId != null">
#{refId,jdbcType=BIGINT},
</if>
<if test="createdBy != null">
#{createdBy,jdbcType=BIGINT},
</if>
<if test="createdAt != null">
#{createdAt,jdbcType=BIGINT},
</if>
<if test="updatedAt != null">
#{updatedAt,jdbcType=BIGINT},
</if>
<if test="updatedBy != null">
#{updatedBy,jdbcType=BIGINT},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.dongjian.dashboard.back.model.DashboardLevelRoleObjectExample" resultType="java.lang.Long">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select count(*) from dashboard_level_role_object
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update dashboard_level_role_object
<set>
<if test="record.levelRoleId != null">
level_role_id = #{record.levelRoleId,jdbcType=BIGINT},
</if>
<if test="record.refType != null">
ref_type = #{record.refType,jdbcType=CHAR},
</if>
<if test="record.refId != null">
ref_id = #{record.refId,jdbcType=BIGINT},
</if>
<if test="record.createdBy != null">
created_by = #{record.createdBy,jdbcType=BIGINT},
</if>
<if test="record.createdAt != null">
created_at = #{record.createdAt,jdbcType=BIGINT},
</if>
<if test="record.updatedAt != null">
updated_at = #{record.updatedAt,jdbcType=BIGINT},
</if>
<if test="record.updatedBy != null">
updated_by = #{record.updatedBy,jdbcType=BIGINT},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update dashboard_level_role_object
set level_role_id = #{record.levelRoleId,jdbcType=BIGINT},
ref_type = #{record.refType,jdbcType=CHAR},
ref_id = #{record.refId,jdbcType=BIGINT},
created_by = #{record.createdBy,jdbcType=BIGINT},
created_at = #{record.createdAt,jdbcType=BIGINT},
updated_at = #{record.updatedAt,jdbcType=BIGINT},
updated_by = #{record.updatedBy,jdbcType=BIGINT}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
</mapper>

319
dongjian-dashboard-back-dao/src/main/resources/mappers/auto/DashboardLevelRoleUserMapper.xml

@ -0,0 +1,319 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.dongjian.dashboard.back.dao.auto.DashboardLevelRoleUserMapper">
<resultMap id="BaseResultMap" type="com.dongjian.dashboard.back.model.DashboardLevelRoleUser">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<id column="id" jdbcType="BIGINT" property="id" />
<result column="user_id" jdbcType="BIGINT" property="userId" />
<result column="level_role_id" jdbcType="BIGINT" property="levelRoleId" />
<result column="ref_type" jdbcType="INTEGER" property="refType" />
<result column="created_by" jdbcType="BIGINT" property="createdBy" />
<result column="created_at" jdbcType="BIGINT" property="createdAt" />
<result column="updated_at" jdbcType="BIGINT" property="updatedAt" />
<result column="updated_by" jdbcType="BIGINT" property="updatedBy" />
</resultMap>
<sql id="Example_Where_Clause">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
id, user_id, level_role_id, ref_type, created_by, created_at, updated_at, updated_by
</sql>
<select id="selectByExample" parameterType="com.dongjian.dashboard.back.model.DashboardLevelRoleUserExample" resultMap="BaseResultMap">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<if test="distinct">
distinct
</if>
'true' as QUERYID,
<include refid="Base_Column_List" />
from dashboard_level_role_user
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<include refid="Base_Column_List" />
from dashboard_level_role_user
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from dashboard_level_role_user
where id = #{id,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="com.dongjian.dashboard.back.model.DashboardLevelRoleUserExample">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from dashboard_level_role_user
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.dongjian.dashboard.back.model.DashboardLevelRoleUser">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into dashboard_level_role_user (id, user_id, level_role_id,
ref_type, created_by, created_at,
updated_at, updated_by)
values (#{id,jdbcType=BIGINT}, #{userId,jdbcType=BIGINT}, #{levelRoleId,jdbcType=BIGINT},
#{refType,jdbcType=INTEGER}, #{createdBy,jdbcType=BIGINT}, #{createdAt,jdbcType=BIGINT},
#{updatedAt,jdbcType=BIGINT}, #{updatedBy,jdbcType=BIGINT})
</insert>
<insert id="insertSelective" parameterType="com.dongjian.dashboard.back.model.DashboardLevelRoleUser">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into dashboard_level_role_user
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="userId != null">
user_id,
</if>
<if test="levelRoleId != null">
level_role_id,
</if>
<if test="refType != null">
ref_type,
</if>
<if test="createdBy != null">
created_by,
</if>
<if test="createdAt != null">
created_at,
</if>
<if test="updatedAt != null">
updated_at,
</if>
<if test="updatedBy != null">
updated_by,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=BIGINT},
</if>
<if test="userId != null">
#{userId,jdbcType=BIGINT},
</if>
<if test="levelRoleId != null">
#{levelRoleId,jdbcType=BIGINT},
</if>
<if test="refType != null">
#{refType,jdbcType=INTEGER},
</if>
<if test="createdBy != null">
#{createdBy,jdbcType=BIGINT},
</if>
<if test="createdAt != null">
#{createdAt,jdbcType=BIGINT},
</if>
<if test="updatedAt != null">
#{updatedAt,jdbcType=BIGINT},
</if>
<if test="updatedBy != null">
#{updatedBy,jdbcType=BIGINT},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.dongjian.dashboard.back.model.DashboardLevelRoleUserExample" resultType="java.lang.Long">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select count(*) from dashboard_level_role_user
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update dashboard_level_role_user
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.userId != null">
user_id = #{record.userId,jdbcType=BIGINT},
</if>
<if test="record.levelRoleId != null">
level_role_id = #{record.levelRoleId,jdbcType=BIGINT},
</if>
<if test="record.refType != null">
ref_type = #{record.refType,jdbcType=INTEGER},
</if>
<if test="record.createdBy != null">
created_by = #{record.createdBy,jdbcType=BIGINT},
</if>
<if test="record.createdAt != null">
created_at = #{record.createdAt,jdbcType=BIGINT},
</if>
<if test="record.updatedAt != null">
updated_at = #{record.updatedAt,jdbcType=BIGINT},
</if>
<if test="record.updatedBy != null">
updated_by = #{record.updatedBy,jdbcType=BIGINT},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update dashboard_level_role_user
set id = #{record.id,jdbcType=BIGINT},
user_id = #{record.userId,jdbcType=BIGINT},
level_role_id = #{record.levelRoleId,jdbcType=BIGINT},
ref_type = #{record.refType,jdbcType=INTEGER},
created_by = #{record.createdBy,jdbcType=BIGINT},
created_at = #{record.createdAt,jdbcType=BIGINT},
updated_at = #{record.updatedAt,jdbcType=BIGINT},
updated_by = #{record.updatedBy,jdbcType=BIGINT}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.dongjian.dashboard.back.model.DashboardLevelRoleUser">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update dashboard_level_role_user
<set>
<if test="userId != null">
user_id = #{userId,jdbcType=BIGINT},
</if>
<if test="levelRoleId != null">
level_role_id = #{levelRoleId,jdbcType=BIGINT},
</if>
<if test="refType != null">
ref_type = #{refType,jdbcType=INTEGER},
</if>
<if test="createdBy != null">
created_by = #{createdBy,jdbcType=BIGINT},
</if>
<if test="createdAt != null">
created_at = #{createdAt,jdbcType=BIGINT},
</if>
<if test="updatedAt != null">
updated_at = #{updatedAt,jdbcType=BIGINT},
</if>
<if test="updatedBy != null">
updated_by = #{updatedBy,jdbcType=BIGINT},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.dongjian.dashboard.back.model.DashboardLevelRoleUser">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update dashboard_level_role_user
set user_id = #{userId,jdbcType=BIGINT},
level_role_id = #{levelRoleId,jdbcType=BIGINT},
ref_type = #{refType,jdbcType=INTEGER},
created_by = #{createdBy,jdbcType=BIGINT},
created_at = #{createdAt,jdbcType=BIGINT},
updated_at = #{updatedAt,jdbcType=BIGINT},
updated_by = #{updatedBy,jdbcType=BIGINT}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>

334
dongjian-dashboard-back-dao/src/main/resources/mappers/auto/DashboardNotificationCategoryMapper.xml

@ -0,0 +1,334 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.dongjian.dashboard.back.dao.auto.DashboardNotificationCategoryMapper">
<resultMap id="BaseResultMap" type="com.dongjian.dashboard.back.model.DashboardNotificationCategory">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<id column="id" jdbcType="BIGINT" property="id" />
<result column="company_id" jdbcType="BIGINT" property="companyId" />
<result column="name" jdbcType="VARCHAR" property="name" />
<result column="remark" jdbcType="VARCHAR" property="remark" />
<result column="flag" jdbcType="INTEGER" property="flag" />
<result column="created_by" jdbcType="BIGINT" property="createdBy" />
<result column="created_at" jdbcType="BIGINT" property="createdAt" />
<result column="updated_at" jdbcType="BIGINT" property="updatedAt" />
<result column="updated_by" jdbcType="BIGINT" property="updatedBy" />
</resultMap>
<sql id="Example_Where_Clause">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
id, company_id, `name`, remark, flag, created_by, created_at, updated_at, updated_by
</sql>
<select id="selectByExample" parameterType="com.dongjian.dashboard.back.model.DashboardNotificationCategoryExample" resultMap="BaseResultMap">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<if test="distinct">
distinct
</if>
'true' as QUERYID,
<include refid="Base_Column_List" />
from dashboard_notification_category
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<include refid="Base_Column_List" />
from dashboard_notification_category
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from dashboard_notification_category
where id = #{id,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="com.dongjian.dashboard.back.model.DashboardNotificationCategoryExample">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from dashboard_notification_category
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.dongjian.dashboard.back.model.DashboardNotificationCategory">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID()
</selectKey>
insert into dashboard_notification_category (company_id, `name`, remark,
flag, created_by, created_at,
updated_at, updated_by)
values (#{companyId,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR},
#{flag,jdbcType=INTEGER}, #{createdBy,jdbcType=BIGINT}, #{createdAt,jdbcType=BIGINT},
#{updatedAt,jdbcType=BIGINT}, #{updatedBy,jdbcType=BIGINT})
</insert>
<insert id="insertSelective" parameterType="com.dongjian.dashboard.back.model.DashboardNotificationCategory">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID()
</selectKey>
insert into dashboard_notification_category
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="companyId != null">
company_id,
</if>
<if test="name != null">
`name`,
</if>
<if test="remark != null">
remark,
</if>
<if test="flag != null">
flag,
</if>
<if test="createdBy != null">
created_by,
</if>
<if test="createdAt != null">
created_at,
</if>
<if test="updatedAt != null">
updated_at,
</if>
<if test="updatedBy != null">
updated_by,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="companyId != null">
#{companyId,jdbcType=BIGINT},
</if>
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>
<if test="remark != null">
#{remark,jdbcType=VARCHAR},
</if>
<if test="flag != null">
#{flag,jdbcType=INTEGER},
</if>
<if test="createdBy != null">
#{createdBy,jdbcType=BIGINT},
</if>
<if test="createdAt != null">
#{createdAt,jdbcType=BIGINT},
</if>
<if test="updatedAt != null">
#{updatedAt,jdbcType=BIGINT},
</if>
<if test="updatedBy != null">
#{updatedBy,jdbcType=BIGINT},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.dongjian.dashboard.back.model.DashboardNotificationCategoryExample" resultType="java.lang.Long">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select count(*) from dashboard_notification_category
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update dashboard_notification_category
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.companyId != null">
company_id = #{record.companyId,jdbcType=BIGINT},
</if>
<if test="record.name != null">
`name` = #{record.name,jdbcType=VARCHAR},
</if>
<if test="record.remark != null">
remark = #{record.remark,jdbcType=VARCHAR},
</if>
<if test="record.flag != null">
flag = #{record.flag,jdbcType=INTEGER},
</if>
<if test="record.createdBy != null">
created_by = #{record.createdBy,jdbcType=BIGINT},
</if>
<if test="record.createdAt != null">
created_at = #{record.createdAt,jdbcType=BIGINT},
</if>
<if test="record.updatedAt != null">
updated_at = #{record.updatedAt,jdbcType=BIGINT},
</if>
<if test="record.updatedBy != null">
updated_by = #{record.updatedBy,jdbcType=BIGINT},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update dashboard_notification_category
set id = #{record.id,jdbcType=BIGINT},
company_id = #{record.companyId,jdbcType=BIGINT},
`name` = #{record.name,jdbcType=VARCHAR},
remark = #{record.remark,jdbcType=VARCHAR},
flag = #{record.flag,jdbcType=INTEGER},
created_by = #{record.createdBy,jdbcType=BIGINT},
created_at = #{record.createdAt,jdbcType=BIGINT},
updated_at = #{record.updatedAt,jdbcType=BIGINT},
updated_by = #{record.updatedBy,jdbcType=BIGINT}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.dongjian.dashboard.back.model.DashboardNotificationCategory">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update dashboard_notification_category
<set>
<if test="companyId != null">
company_id = #{companyId,jdbcType=BIGINT},
</if>
<if test="name != null">
`name` = #{name,jdbcType=VARCHAR},
</if>
<if test="remark != null">
remark = #{remark,jdbcType=VARCHAR},
</if>
<if test="flag != null">
flag = #{flag,jdbcType=INTEGER},
</if>
<if test="createdBy != null">
created_by = #{createdBy,jdbcType=BIGINT},
</if>
<if test="createdAt != null">
created_at = #{createdAt,jdbcType=BIGINT},
</if>
<if test="updatedAt != null">
updated_at = #{updatedAt,jdbcType=BIGINT},
</if>
<if test="updatedBy != null">
updated_by = #{updatedBy,jdbcType=BIGINT},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.dongjian.dashboard.back.model.DashboardNotificationCategory">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update dashboard_notification_category
set company_id = #{companyId,jdbcType=BIGINT},
`name` = #{name,jdbcType=VARCHAR},
remark = #{remark,jdbcType=VARCHAR},
flag = #{flag,jdbcType=INTEGER},
created_by = #{createdBy,jdbcType=BIGINT},
created_at = #{createdAt,jdbcType=BIGINT},
updated_at = #{updatedAt,jdbcType=BIGINT},
updated_by = #{updatedBy,jdbcType=BIGINT}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>

33
dongjian-dashboard-back-dao/src/main/resources/mappers/auto/DashboardNotificationMapper.xml

@ -10,6 +10,7 @@
<result column="company_id" jdbcType="BIGINT" property="companyId" />
<result column="demand_time" jdbcType="VARCHAR" property="demandTime" />
<result column="category" jdbcType="VARCHAR" property="category" />
<result column="category_id" jdbcType="BIGINT" property="categoryId" />
<result column="flag" jdbcType="INTEGER" property="flag" />
<result column="created_at" jdbcType="BIGINT" property="createdAt" />
<result column="created_by" jdbcType="BIGINT" property="createdBy" />
@ -94,8 +95,8 @@
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
id, company_id, demand_time, category, flag, created_at, created_by, updated_at,
updated_by
id, company_id, demand_time, category, category_id, flag, created_at, created_by,
updated_at, updated_by
</sql>
<sql id="Blob_Column_List">
<!--
@ -183,13 +184,13 @@
SELECT LAST_INSERT_ID()
</selectKey>
insert into dashboard_notification (company_id, demand_time, category,
flag, created_at, created_by,
updated_at, updated_by, content
)
category_id, flag, created_at,
created_by, updated_at, updated_by,
content)
values (#{companyId,jdbcType=BIGINT}, #{demandTime,jdbcType=VARCHAR}, #{category,jdbcType=VARCHAR},
#{flag,jdbcType=INTEGER}, #{createdAt,jdbcType=BIGINT}, #{createdBy,jdbcType=BIGINT},
#{updatedAt,jdbcType=BIGINT}, #{updatedBy,jdbcType=BIGINT}, #{content,jdbcType=LONGVARCHAR}
)
#{categoryId,jdbcType=BIGINT}, #{flag,jdbcType=INTEGER}, #{createdAt,jdbcType=BIGINT},
#{createdBy,jdbcType=BIGINT}, #{updatedAt,jdbcType=BIGINT}, #{updatedBy,jdbcType=BIGINT},
#{content,jdbcType=LONGVARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.dongjian.dashboard.back.model.DashboardNotification">
<!--
@ -210,6 +211,9 @@
<if test="category != null">
category,
</if>
<if test="categoryId != null">
category_id,
</if>
<if test="flag != null">
flag,
</if>
@ -239,6 +243,9 @@
<if test="category != null">
#{category,jdbcType=VARCHAR},
</if>
<if test="categoryId != null">
#{categoryId,jdbcType=BIGINT},
</if>
<if test="flag != null">
#{flag,jdbcType=INTEGER},
</if>
@ -288,6 +295,9 @@
<if test="record.category != null">
category = #{record.category,jdbcType=VARCHAR},
</if>
<if test="record.categoryId != null">
category_id = #{record.categoryId,jdbcType=BIGINT},
</if>
<if test="record.flag != null">
flag = #{record.flag,jdbcType=INTEGER},
</if>
@ -321,6 +331,7 @@
company_id = #{record.companyId,jdbcType=BIGINT},
demand_time = #{record.demandTime,jdbcType=VARCHAR},
category = #{record.category,jdbcType=VARCHAR},
category_id = #{record.categoryId,jdbcType=BIGINT},
flag = #{record.flag,jdbcType=INTEGER},
created_at = #{record.createdAt,jdbcType=BIGINT},
created_by = #{record.createdBy,jdbcType=BIGINT},
@ -341,6 +352,7 @@
company_id = #{record.companyId,jdbcType=BIGINT},
demand_time = #{record.demandTime,jdbcType=VARCHAR},
category = #{record.category,jdbcType=VARCHAR},
category_id = #{record.categoryId,jdbcType=BIGINT},
flag = #{record.flag,jdbcType=INTEGER},
created_at = #{record.createdAt,jdbcType=BIGINT},
created_by = #{record.createdBy,jdbcType=BIGINT},
@ -366,6 +378,9 @@
<if test="category != null">
category = #{category,jdbcType=VARCHAR},
</if>
<if test="categoryId != null">
category_id = #{categoryId,jdbcType=BIGINT},
</if>
<if test="flag != null">
flag = #{flag,jdbcType=INTEGER},
</if>
@ -396,6 +411,7 @@
set company_id = #{companyId,jdbcType=BIGINT},
demand_time = #{demandTime,jdbcType=VARCHAR},
category = #{category,jdbcType=VARCHAR},
category_id = #{categoryId,jdbcType=BIGINT},
flag = #{flag,jdbcType=INTEGER},
created_at = #{createdAt,jdbcType=BIGINT},
created_by = #{createdBy,jdbcType=BIGINT},
@ -413,6 +429,7 @@
set company_id = #{companyId,jdbcType=BIGINT},
demand_time = #{demandTime,jdbcType=VARCHAR},
category = #{category,jdbcType=VARCHAR},
category_id = #{categoryId,jdbcType=BIGINT},
flag = #{flag,jdbcType=INTEGER},
created_at = #{createdAt,jdbcType=BIGINT},
created_by = #{createdBy,jdbcType=BIGINT},

23
dongjian-dashboard-back-dao/src/main/resources/mappers/ex/BasicBuildingMapperExt.xml

@ -34,6 +34,29 @@
</if>
order by bbuilding.building_id desc
</select>
<select id="getBuildingIdListByCompanyId" resultType="java.lang.Long">
SELECT
building_id
FROM
basic_building
WHERE flag = 0
AND company_id IN <foreach collection="companyIdList" item="item" open="(" separator="," close=")">#{item}</foreach>
ORDER BY building_id
</select>
<select id="getBuildingListBySiteId" resultType="com.dongjian.dashboard.back.vo.building.BuildingPageVO">
SELECT
b.building_id,
b.name AS buildingName
FROM dashboard_level_relation_site_building r
LEFT JOIN basic_building b
ON r.building_id = b.building_id
WHERE r.site_id = #{siteId}
AND b.flag = 0
</select>
</mapper>

70
dongjian-dashboard-back-dao/src/main/resources/mappers/ex/BasicRoleMenuRelationMapperExt.xml

@ -30,5 +30,75 @@
r.role_id = #{roleId} AND m.used_by_dashboard = 1
</delete>
<select id="selectAllMenu" resultType="com.dongjian.dashboard.back.vo.role.DashboardTreeMenusDTO">
SELECT
bmenu.`id` AS `menuId`,
bmenu.parent_menu_id AS parentMenuId,
<choose>
<when test="languageType == 0">
bmenu.menu_name AS title,
</when>
<when test="languageType == 1">
bmenu.menu_name_en AS title,
</when>
<otherwise>
bmenu.menu_name_jp AS title,
</otherwise>
</choose>
bmenu.dashboard_lowest_node AS dashboardLowestNode
FROM
basic_menu bmenu
<if test="superRole != null and superRole == 0">
inner join basic_role_menu_relation_dashboard brmrd on bmenu.id = brmrd.menu_id and brmrd.role_id = #{roleId}
</if>
WHERE
bmenu.flag = 0 AND bmenu.used_by_dashboard = 1
</select>
<select id="selectByRoleId" resultType="com.dongjian.dashboard.back.vo.role.RoleMenuPermissionEntity">
SELECT
role_id,
menu_id,
permission_type,
create_time
FROM basic_role_menu_relation_dashboard
WHERE role_id = #{roleId}
</select>
<delete id="deleteByRoleId">
DELETE FROM basic_role_menu_relation_dashboard
WHERE role_id = #{roleId}
</delete>
<insert id="dashboardBatchInsert">
INSERT INTO basic_role_menu_relation_dashboard (role_id, menu_id, permission_type, create_time)
VALUES
<foreach collection="list" item="item" separator=",">
(#{item.roleId},
#{item.menuId},
#{item.permissionType},
#{item.createTime})
</foreach>
</insert>
<select id="getRoleIdByUserId" resultType="long">
SELECT role_id
FROM basic_role_user_relation
WHERE user_id = #{userId}
LIMIT 1
</select>
<select id="getMenuIdListByRoleId" resultType="com.dongjian.dashboard.back.vo.role.RoleMenuPermissionEntity">
SELECT
brmrd.role_id,
brmrd.menu_id,
brmrd.permission_type,
brmrd.create_time
FROM
basic_role_menu_relation_dashboard brmrd
INNER JOIN basic_menu bmenu ON bmenu.id = brmrd.menu_id
WHERE
bmenu.flag != 1 AND brmrd.role_id = #{roleId} AND bmenu.used_by_dashboard = 1
</select>
</mapper>

13
dongjian-dashboard-back-dao/src/main/resources/mappers/ex/BasicUserMapperExt.xml

@ -24,9 +24,12 @@
buser.username username,
buser.login_name loginName,
buser.email,
buser.last_name,
buser.first_name,
buser.mfa_bind,
buser.mobile_number mobileNumber,
buser.create_time createTime,
buser.adsc_flag,
any_value(brole.id) roleId,
any_value(brole.role_name) roleName
FROM
@ -112,5 +115,15 @@
INNER JOIN data_center_aeon_admin.basic_role_menu_relation rmr ON br.id = rmr.role_id
WHERE rmr.menu_id = 52 AND br.flag != 1 AND rru.user_id = #{userId}
</select>
<select id="checkLevelManager" resultType="java.lang.Integer">
SELECT
count(1)
FROM
data_center_aeon_admin.basic_role_user_relation rru
INNER JOIN data_center_aeon_admin.basic_role br ON br.id = rru.role_id
INNER JOIN data_center_aeon_admin.basic_role_menu_relation rmr ON br.id = rmr.role_id
WHERE rmr.menu_id = 88 AND br.flag != 1 AND rru.user_id = #{userId}
</select>
</mapper>

43
dongjian-dashboard-back-dao/src/main/resources/mappers/ex/DashboardNotificationCategoryMapperExt.xml

@ -0,0 +1,43 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.dongjian.dashboard.back.dao.ex.DashboardNotificationCategoryMapperExt">
<select id="checkExist" resultType="java.lang.Integer">
SELECT
COUNT(1)
FROM
dashboard_notification_category
WHERE
flag != 1 AND name = #{name}
<if test="companyId != null">
AND company_id = #{companyId}
</if>
<if test="categoryId != null">
AND id != #{categoryId}
</if>
</select>
<select id="getListPage" resultType="com.dongjian.dashboard.back.vo.dashboardnotification.DashboardNotificationCategoryPageVO">
SELECT
dn.id categoryId,
dn.company_id,
dn.`name`,
dn.remark,
dn.created_at
FROM
dashboard_notification_category dn
WHERE
dn.flag != 1
AND dn.company_id IN <foreach collection="companyIdList" item="item" open="(" separator="," close=")">#{item}</foreach>
<if test="categoryIdList != null">
AND dn.id IN <foreach collection="categoryIdList" item="item" open="(" separator="," close=")">#{item}</foreach>
</if>
<if test="name != null and name != ''">
AND dn.name LIKE CONCAT('%',#{name},'%')
</if>
ORDER BY dn.id DESC
</select>
</mapper>

41
dongjian-dashboard-back-dao/src/main/resources/mappers/ex/DashboardNotificationMapperExt.xml

@ -4,14 +4,39 @@
<select id="getNotification" resultType="com.dongjian.dashboard.back.vo.dashboardnotification.DashboardNotificationPageVO">
SELECT
id dashboardNotificationId,
demand_time,
category,
content,
created_at
FROM dashboard_notification
WHERE flag = 0 AND company_id = #{companyId}
ORDER BY id DESC limit 1
dn.id AS dashboardNotificationId,
dn.demand_time,
COALESCE(
NULLIF(dn.category, ''),
dnc.name
) AS category,
dn.content,
dn.created_at
FROM
dashboard_notification dn LEFT JOIN dashboard_notification_category dnc ON dnc.id = dn.category_id AND dnc.flag = 0
WHERE dn.flag = 0 AND dn.company_id = #{companyId}
ORDER BY dn.id DESC
</select>
<select id="getListPage" resultType="com.dongjian.dashboard.back.vo.dashboardnotification.DashboardNotificationPageVO">
SELECT
dn.id dashboardNotificationId,
dn.company_id,
dn.`demand_time`,
dnc.`name` AS category,
dnc.id AS categoryId,
dn.content,
dn.created_at
FROM
dashboard_notification dn
left join dashboard_notification_category dnc on dn.category_id = dnc.id and dnc.flag != 1
WHERE
dn.flag != 1
AND dn.company_id IN <foreach collection="companyIdList" item="item" open="(" separator="," close=")">#{item}</foreach>
<if test="dashboardNotificationIdList != null">
AND dn.id IN <foreach collection="dashboardNotificationIdList" item="item" open="(" separator="," close=")">#{item}</foreach>
</if>
ORDER BY dn.created_at DESC
</select>
</mapper>

126
dongjian-dashboard-back-dao/src/main/resources/mappers/ex/DeviceInfoMapperExt.xml

@ -6,12 +6,14 @@
<sql id="deviceDataSelect">
basic_floor.floor_id as floorId,
basic_floor.name as floorName,
basic_building.building_id,
basic_building.name as buildingName,
device_info.id,
device_info.device_id,
device_info.device_name,
device_info.device_sn,
type.device_category_id categoryId,
device_info.retain_alert,
# device_info.retain_alert,
device_info.monitoring_point_name,
basic_asset_class_big.id monitoringPointCategoryId,
basic_asset_class_big.class_name as monitoringPointCategoryName,
@ -37,6 +39,15 @@
</sql>
<sql id="deviceDataCommonWhere">
<if test="buildingId != null">
and basic_building.building_id = #{buildingId}
</if>
<if test="bindBuildingIdList != null">
and basic_building.building_id in
<foreach collection="bindBuildingIdList" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<if test="keyword != null and keyword != ''">
and device_info.monitoring_point_name LIKE CONCAT('%',#{keyword},'%')
</if>
@ -110,9 +121,6 @@
<include refid="deviceDataFromAndJoin"/>
left join device_rawdata_realtime drr on drr.device_id = device_info.device_id
<where>
<if test="buildingId != null">
and basic_building.building_id = #{buildingId}
</if>
<include refid="deviceDataCommonWhere"/>
</where>
<include refid="drrOrder"/>
@ -129,9 +137,6 @@
left join device_rawdata_realtime drr on drr.device_id = device_info.device_id
left join dashboard_device_group_relation ddgr on ddgr.device_info_id = device_info.id
<where>
<if test="buildingId != null">
and basic_building.building_id = #{buildingId}
</if>
and ddgr.device_group_id = #{deviceGroupId}
<include refid="deviceDataCommonWhere"/>
</where>
@ -147,9 +152,6 @@
<include refid="deviceDataFromAndJoin"/>
left join device_rawdata_realtime drr on drr.device_id = device_info.device_id
<where>
<if test="buildingId != null">
and basic_building.building_id = #{buildingId}
</if>
<include refid="deviceDataCommonWhere"/>
</where>
<include refid="drrOrder"/>
@ -166,9 +168,6 @@
left join device_rawdata_realtime drr on drr.device_id = device_info.device_id
left join dashboard_device_group_relation ddgr on ddgr.device_info_id = device_info.id
<where>
<if test="buildingId != null">
and basic_building.building_id = #{buildingId}
</if>
and ddgr.device_group_id = #{deviceGroupId}
<include refid="deviceDataCommonWhere"/>
</where>
@ -226,9 +225,6 @@
<include refid="deviceDataFromAndJoin"/>
left join ba_status_statistics bss on bss.device_info_id = device_info.id
<where>
<if test="buildingId != null">
and basic_building.building_id = #{buildingId}
</if>
<include refid="deviceDataCommonWhere"/>
</where>
<include refid="BaStatusOrder"/>
@ -249,9 +245,6 @@
left join dashboard_device_group_relation ddgr on ddgr.device_info_id = device_info.id
left join ba_status_statistics bss on bss.device_info_id = device_info.id
<where>
<if test="buildingId != null">
and basic_building.building_id = #{buildingId}
</if>
and ddgr.device_group_id = #{deviceGroupId}
<include refid="deviceDataCommonWhere"/>
</where>
@ -294,6 +287,12 @@
,device_info.id desc
</sql>
<sql id="Where_In_Alarm">
(alert_history.handle_status != 3 AND alert_history.handle_status != 4)
# OR
# (alert_history.handle_status = 4 AND alert_history.retain_alert = 1)
</sql>
<select id="getDevice4AlarmData" resultType="com.dongjian.dashboard.back.vo.data.DeviceAlarmData">
select
<include refid="deviceDataSelect"/>
@ -302,11 +301,28 @@
alert_history.confirm_status,
alert_history.handle_status,
alert_history.id alertHistoryId,
alert_history.retain_alert,
1 as classId,
basic_monitoring_asset.`symbol` assetSymbol
from
alert_history
left join device_info on alert_history.device_id = device_info.device_id
<choose>
<when test="searchType == 4">
device_info
left join (
SELECT
*,
ROW_NUMBER() OVER (
PARTITION BY device_id
ORDER BY receive_ts DESC
) AS rn
FROM alert_history where alert_history.source_type = 1
) alert_history on alert_history.device_id = device_info.device_id AND alert_history.rn = 1
</when>
<otherwise>
alert_history
left join device_info on alert_history.device_id = device_info.device_id and alert_history.source_type = 1
</otherwise>
</choose>
left join basic_monitoring_asset on device_info.asset_id = basic_monitoring_asset.equipment_id
left join basic_space on basic_monitoring_asset.space_id = basic_space.space_id
left join basic_floor on basic_space.floor_id = basic_floor.floor_id
@ -318,16 +334,10 @@
<where>
and device_info.flag = 0 and basic_monitoring_asset.flag != 1
and basic_space.flag != 1 and basic_floor.flag != 1 and basic_building.flag != 1
<if test="buildingId != null">
and basic_building.building_id = #{buildingId}
</if>
<include refid="deviceDataCommonWhere"/>
<choose>
<when test="searchType == 1">
AND (
(alert_history.handle_status != 3 AND alert_history.handle_status != 4)
OR (alert_history.handle_status = 4 AND alert_history.retain_alert = 1)
)
AND (<include refid="Where_In_Alarm"/>)
</when>
<when test="searchType == 2">
@ -351,11 +361,28 @@
alert_history.confirm_status,
alert_history.handle_status,
alert_history.id alertHistoryId,
alert_history.retain_alert,
1 as classId,
basic_monitoring_asset.`symbol` assetSymbol
from
alert_history
left join device_info on alert_history.device_id = device_info.device_id
<choose>
<when test="searchType == 4">
device_info
left join (
SELECT
*,
ROW_NUMBER() OVER (
PARTITION BY device_id
ORDER BY receive_ts DESC
) AS rn
FROM alert_history where alert_history.source_type = 1
) alert_history on alert_history.device_id = device_info.device_id AND alert_history.rn = 1
</when>
<otherwise>
alert_history
left join device_info on alert_history.device_id = device_info.device_id and alert_history.source_type = 1
</otherwise>
</choose>
left join basic_monitoring_asset on device_info.asset_id = basic_monitoring_asset.equipment_id
left join basic_space on basic_monitoring_asset.space_id = basic_space.space_id
left join basic_floor on basic_space.floor_id = basic_floor.floor_id
@ -368,17 +395,11 @@
<where>
and device_info.flag = 0 and basic_monitoring_asset.flag != 1
and basic_space.flag != 1 and basic_floor.flag != 1 and basic_building.flag != 1
<if test="buildingId != null">
and basic_building.building_id = #{buildingId}
</if>
and ddgr.device_group_id = #{deviceGroupId}
<include refid="deviceDataCommonWhere"/>
<choose>
<when test="searchType == 1">
AND (
(alert_history.handle_status != 3 AND alert_history.handle_status != 4)
OR (alert_history.handle_status = 4 AND alert_history.retain_alert = 1)
)
AND (<include refid="Where_In_Alarm"/>)
</when>
<when test="searchType == 2">
@ -393,6 +414,37 @@
<include refid="alertHistoryOrder"/>
</select>
<select id="getDevice4TrendLogData" resultType="com.dongjian.dashboard.back.vo.data.DeviceTrendLogData">
select
<include refid="deviceDataSelect"/>
,drr.raw_data,
drr.receive_ts uploadTimestamp,
5 as classId
<include refid="deviceDataFromAndJoin"/>
left join device_rawdata_realtime drr on drr.device_id = device_info.device_id
<where>
<include refid="deviceDataCommonWhere"/>
</where>
<include refid="drrOrder"/>
</select>
<select id="getDevice4TrendLogDataByGroup" resultType="com.dongjian.dashboard.back.vo.data.DeviceTrendLogData">
select
<include refid="deviceDataSelect"/>
,drr.raw_data,
drr.receive_ts uploadTimestamp,
5 as classId
<include refid="deviceDataFromAndJoin"/>
left join device_rawdata_realtime drr on drr.device_id = device_info.device_id
left join dashboard_device_group_relation ddgr on ddgr.device_info_id = device_info.id
<where>
and ddgr.device_group_id = #{deviceGroupId}
<include refid="deviceDataCommonWhere"/>
</where>
<include refid="drrOrder"/>
</select>
<!-- 公共字段 -->
<sql id="commonDeviceSelectFields">
device_info.id,

47
dongjian-dashboard-back-dao/src/main/resources/mappers/ex/DeviceRawdataRealtimeMapperExt.xml

@ -2,52 +2,5 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.dongjian.dashboard.back.dao.ex.DeviceRawdataRealtimeMapperExt">
<select id="getOverviewInfo" resultType="com.dongjian.dashboard.back.vo.data.OverviewInfo">
SELECT
bbuilding.building_id,
bbuilding.name AS buildingName,
ah.device_id,
ah.receive_ts,
basic_asset_class_big.id AS monitoringPointCategoryId,
basic_asset_class_big.class_name AS monitoringPointCategoryName
FROM
basic_building bbuilding
INNER JOIN basic_floor on basic_floor.building_id = bbuilding.building_id
INNER JOIN basic_space on basic_space.floor_id = basic_floor.floor_id
INNER JOIN basic_monitoring_asset on basic_monitoring_asset.space_id = basic_space.space_id
INNER JOIN device_info dinfo ON dinfo.asset_id = basic_monitoring_asset.equipment_id
INNER JOIN alert_history ah ON dinfo.device_id = ah.device_id
LEFT JOIN basic_asset_class_big on basic_asset_class_big.id = basic_monitoring_asset.class_big_id
LEFT JOIN type ty ON dinfo.type_id = ty.id
WHERE
bbuilding.company_id = #{companyId} AND bbuilding.flag = 0 AND basic_floor.flag = 0 AND basic_space.flag = 0
AND basic_monitoring_asset.flag = 0 AND dinfo.flag = 0 AND basic_asset_class_big.flag = 0
AND ah.confirm_status = 0 AND ah.handle_status = 1
AND ty.device_category_id in
<foreach collection="categoryIdList" item="categoryId" open="(" separator="," close=")">
#{categoryId}
</foreach>
</select>
<select id="getBuildingInfo" resultType="com.dongjian.dashboard.back.vo.data.OverviewVO">
SELECT
bbuilding.building_id,
bbuilding.name buildingName,
bbuilding.retain_alert,
bbuilding.latitude,
bbuilding.longitude,
bbuilding.picture_introduction,
bbuilding.udf_building_id
FROM
basic_building bbuilding
WHERE
bbuilding.flag != 1
AND bbuilding.company_id = #{companyId}
<if test="bindBuildingIdList != null">
AND bbuilding.building_id IN <foreach collection="bindBuildingIdList" item="item" open="(" separator="," close=")">#{item}</foreach>
</if>
order by bbuilding.building_id desc
</select>
</mapper>

5
dongjian-dashboard-back-dao/src/main/resources/mappers/ex/FavoritedDeviceMapperExt.xml

@ -19,8 +19,11 @@
left join type ty on ty.id = dinfo.type_id
WHERE
dinfo.flag != 1 AND basic_monitoring_asset.flag != 1
AND (dinfo.device_id LIKE '%\_85' or dinfo.device_id LIKE '%\_85_9003' or dinfo.device_id LIKE '%\_131_5')
AND basic_space.flag != 1 AND basic_floor.flag != 1 AND basic_building.flag != 1
AND basic_building.building_id = #{buildingId}
<if test="buildingId != null">
AND basic_building.building_id = #{buildingId}
</if>
AND dinfo.company_id IN <foreach collection="companyIdList" item="item" open="(" separator="," close=")">#{item}</foreach>
<if test="categoryIdList != null and categoryIdList.size() > 0">
and ty.device_category_id in

154
dongjian-dashboard-back-dao/src/main/resources/mappers/ex/LevelMapperExt.xml

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.dongjian.dashboard.back.dao.ex.LevelMapperExt">
<!-- 根据levelType选择对应的表名 -->
<sql id="selectTable">
<choose>
@ -19,7 +19,7 @@
<when test="levelType == 4">dashboard_level_area</when>
</choose>
</sql>
<!-- 检查级别名称是否存在 -->
<select id="checkExist" resultType="java.lang.Long">
SELECT
@ -120,6 +120,9 @@
<if test="parentIdList != null and parentIdList.size() > 0">
AND pa.id IN <foreach collection="parentIdList" item="item" open="(" separator="," close=")">#{item}</foreach>
</if>
<if test="companyIdList != null and companyIdList.size() > 0">
AND base.company_id IN <foreach collection="companyIdList" item="item" open="(" separator="," close=")">#{item}</foreach>
</if>
</sql>
<!-- 分页查询级别列表 -->
@ -180,4 +183,151 @@
order BY base.`id` desc
</select>
<select id="getBoundBuilding" resultType="java.lang.Long">
SELECT DISTINCT building_id
FROM (
SELECT b.building_id
FROM dashboard_level_role_user ru
JOIN dashboard_level_role_object ro
ON ru.level_role_id = ro.level_role_id
JOIN basic_building b
ON ro.ref_id = b.building_id
WHERE ru.user_id = #{userId}
AND ro.ref_type = 'BUILDING'
AND b.flag = 0
UNION ALL
SELECT b.building_id
FROM dashboard_level_role_user ru
JOIN dashboard_level_role_object ro
ON ru.level_role_id = ro.level_role_id
JOIN dashboard_level_site s
ON ro.ref_id = s.id AND s.flag = 0
JOIN dashboard_level_relation_site_building rsb
ON s.id = rsb.site_id
JOIN basic_building b
ON rsb.building_id = b.building_id AND b.flag = 0
WHERE ru.user_id = #{userId}
AND ro.ref_type = 'SITE'
UNION ALL
SELECT b.building_id
FROM dashboard_level_role_user ru
JOIN dashboard_level_role_object ro
ON ru.level_role_id = ro.level_role_id
JOIN dashboard_level_area a
ON ro.ref_id = a.id AND a.flag = 0
JOIN dashboard_level_relation_area_site ras
ON a.id = ras.area_id
JOIN dashboard_level_site s
ON ras.site_id = s.id AND s.flag = 0
JOIN dashboard_level_relation_site_building rsb
ON s.id = rsb.site_id
JOIN basic_building b
ON rsb.building_id = b.building_id AND b.flag = 0
WHERE ru.user_id = #{userId}
AND ro.ref_type = 'AREA'
UNION ALL
SELECT b.building_id
FROM dashboard_level_role_user ru
JOIN dashboard_level_role_object ro
ON ru.level_role_id = ro.level_role_id
JOIN dashboard_level_store st
ON ro.ref_id = st.id AND st.flag = 0
JOIN dashboard_level_relation_store_area rsa
ON st.id = rsa.store_id
JOIN dashboard_level_area a
ON rsa.area_id = a.id AND a.flag = 0
JOIN dashboard_level_relation_area_site ras
ON a.id = ras.area_id
JOIN dashboard_level_site s
ON ras.site_id = s.id AND s.flag = 0
JOIN dashboard_level_relation_site_building rsb
ON s.id = rsb.site_id
JOIN basic_building b
ON rsb.building_id = b.building_id AND b.flag = 0
WHERE ru.user_id = #{userId}
AND ro.ref_type = 'STORE'
UNION ALL
SELECT b.building_id
FROM dashboard_level_role_user ru
JOIN dashboard_level_role_object ro
ON ru.level_role_id = ro.level_role_id
JOIN dashboard_level_branch br
ON ro.ref_id = br.id AND br.flag = 0
JOIN dashboard_level_relation_branch_store rbs
ON br.id = rbs.branch_id
JOIN dashboard_level_store st
ON rbs.store_id = st.id AND st.flag = 0
JOIN dashboard_level_relation_store_area rsa
ON st.id = rsa.store_id
JOIN dashboard_level_area a
ON rsa.area_id = a.id AND a.flag = 0
JOIN dashboard_level_relation_area_site ras
ON a.id = ras.area_id
JOIN dashboard_level_site s
ON ras.site_id = s.id AND s.flag = 0
JOIN dashboard_level_relation_site_building rsb
ON s.id = rsb.site_id
JOIN basic_building b
ON rsb.building_id = b.building_id AND b.flag = 0
WHERE ru.user_id = #{userId}
AND ro.ref_type = 'BRANCH'
) t;
</select>
<select id="selectBuildingFullPath" resultType="com.dongjian.dashboard.back.vo.level.BuildingPathDTO">
SELECT
br.id AS branch_id,
br.name AS branch_name,
st.id AS store_id,
st.name AS store_name,
a.id AS area_id,
a.name AS area_name,
s.id AS site_id,
s.name AS site_name,
b.building_id,
b.name AS building_name
FROM basic_building b
JOIN dashboard_level_relation_site_building rsb ON b.building_id = rsb.building_id
JOIN dashboard_level_site s ON rsb.site_id = s.id AND s.flag = 0
JOIN dashboard_level_relation_area_site ras ON s.id = ras.site_id
JOIN dashboard_level_area a ON ras.area_id = a.id AND a.flag = 0
JOIN dashboard_level_relation_store_area rsa ON a.id = rsa.area_id
JOIN dashboard_level_store st ON rsa.store_id = st.id AND st.flag = 0
JOIN dashboard_level_relation_branch_store rbs ON st.id = rbs.store_id
JOIN dashboard_level_branch br ON rbs.branch_id = br.id AND br.flag = 0
WHERE b.flag = 0
AND b.company_id = #{companyId}
<if test="bindBuildingIdList != null">
AND b.building_id IN <foreach collection="bindBuildingIdList" item="item" open="(" separator="," close=")">#{item}</foreach>
</if>
</select>
<delete id="deleteSiteBuildingRelation">
delete from dashboard_level_relation_site_building WHERE site_id = #{siteId}
</delete>
</mapper>

213
dongjian-dashboard-back-dao/src/main/resources/mappers/ex/LevelRoleMapperExt.xml

@ -0,0 +1,213 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.dongjian.dashboard.back.dao.ex.LevelRoleMapperExt">
<select id="checkExist" resultType="java.lang.Long">
SELECT
COUNT(1)
FROM
dashboard_level_role
WHERE
flag != 1 AND name = #{levelRoleName}
<if test="companyId != null">
AND company_id = #{companyId}
</if>
<if test="id != null">
AND id != #{id}
</if>
</select>
<select id="getListPage" resultType="com.dongjian.dashboard.back.vo.levelrole.LevelRolePageDTO">
SELECT
dlr.id,
dlr.company_id,
dlr.name levelRoleName,
dlr.remark,
dlr.created_at
FROM
dashboard_level_role dlr
WHERE
dlr.flag != 1
AND dlr.company_id IN <foreach collection="companyIdList" item="item" open="(" separator="," close=")">#{item}</foreach>
<if test="idList != null">
AND dlr.id IN <foreach collection="idList" item="item" open="(" separator="," close=")">#{item}</foreach>
</if>
<if test="levelRoleName != null and levelRoleName != '' ">
AND dlr.name LIKE CONCAT('%',#{levelRoleName},'%')
</if>
ORDER BY dlr.id DESC
</select>
<!-- 全量查 Branch -->
<select id="selectAllBranches" resultType="com.dongjian.dashboard.back.vo.levelrole.RefKey">
SELECT
id,
name,
NULL AS parentId,
'BRANCH' AS type
FROM dashboard_level_branch
WHERE flag = 0 and company_id = #{companyId}
</select>
<!-- 全量查 Store -->
<select id="selectAllStores" resultType="com.dongjian.dashboard.back.vo.levelrole.RefKey">
SELECT s.id,
s.name,
r.branch_id AS parentId,
'STORE' AS type
FROM dashboard_level_store s
LEFT JOIN dashboard_level_relation_branch_store r
ON s.id = r.store_id
WHERE s.flag = 0 and s.company_id = #{companyId}
</select>
<!-- 全量查 Area -->
<select id="selectAllAreas" resultType="com.dongjian.dashboard.back.vo.levelrole.RefKey">
SELECT a.id,
a.name,
r.store_id AS parentId,
'AREA' AS type
FROM dashboard_level_area a
LEFT JOIN dashboard_level_relation_store_area r
ON a.id = r.area_id
WHERE a.flag = 0 and a.company_id = #{companyId}
</select>
<!-- 全量查 Site -->
<select id="selectAllSites" resultType="com.dongjian.dashboard.back.vo.levelrole.RefKey">
SELECT s.id,
s.name,
r.area_id AS parentId,
'SITE' AS type
FROM dashboard_level_site s
LEFT JOIN dashboard_level_relation_area_site r
ON s.id = r.site_id
WHERE s.flag = 0 and s.company_id = #{companyId}
</select>
<!-- 全量查 Building -->
<select id="selectAllBuildings" resultType="com.dongjian.dashboard.back.vo.levelrole.RefKey">
SELECT b.building_id AS id,
b.name,
r.site_id AS parentId,
'BUILDING' AS type
FROM basic_building b
LEFT JOIN dashboard_level_relation_site_building r
ON b.building_id = r.building_id
WHERE b.flag = 0 and b.company_id = #{companyId}
</select>
<!-- 查用户绑定节点 -->
<select id="selectUserRefs" resultType="com.dongjian.dashboard.back.vo.levelrole.RefKey">
SELECT o.ref_type AS type,
o.ref_id AS id
FROM dashboard_level_role_user u
INNER JOIN dashboard_level_role_object o
ON u.level_role_id = o.level_role_id
LEFT JOIN dashboard_level_branch b
ON o.ref_type = 'BRANCH' AND o.ref_id = b.id
LEFT JOIN dashboard_level_store s
ON o.ref_type = 'STORE' AND o.ref_id = s.id
LEFT JOIN dashboard_level_area a
ON o.ref_type = 'AREA' AND o.ref_id = a.id
LEFT JOIN dashboard_level_site si
ON o.ref_type = 'SITE' AND o.ref_id = si.id
LEFT JOIN basic_building bu
ON o.ref_type = 'BUILDING' AND o.ref_id = bu.building_id
WHERE u.user_id = #{userId}
AND CASE o.ref_type
WHEN 'BRANCH' THEN IFNULL(b.flag, 1)
WHEN 'STORE' THEN IFNULL(s.flag, 1)
WHEN 'AREA' THEN IFNULL(a.flag, 1)
WHEN 'SITE' THEN IFNULL(si.flag, 1)
WHEN 'BUILDING' THEN IFNULL(bu.flag, 1)
END = 0
</select>
<select id="getBoundLevelByRole" resultType="java.lang.String">
SELECT
CONCAT(dlro.ref_type, '-', dlro.ref_id) AS id
FROM dashboard_level_role_object dlro
INNER JOIN dashboard_level_role dlr
ON dlr.id = dlro.level_role_id
LEFT JOIN dashboard_level_branch b
ON dlro.ref_type = 'BRANCH' AND dlro.ref_id = b.id
LEFT JOIN dashboard_level_store s
ON dlro.ref_type = 'STORE' AND dlro.ref_id = s.id
LEFT JOIN dashboard_level_area a
ON dlro.ref_type = 'AREA' AND dlro.ref_id = a.id
LEFT JOIN dashboard_level_site si
ON dlro.ref_type = 'SITE' AND dlro.ref_id = si.id
LEFT JOIN basic_building bu
ON dlro.ref_type = 'BUILDING' AND dlro.ref_id = bu.building_id
WHERE dlr.flag != 1
AND dlr.id = #{roleId}
AND CASE dlro.ref_type
WHEN 'BRANCH' THEN IFNULL(b.flag, 1)
WHEN 'STORE' THEN IFNULL(s.flag, 1)
WHEN 'AREA' THEN IFNULL(a.flag, 1)
WHEN 'SITE' THEN IFNULL(si.flag, 1)
WHEN 'BUILDING' THEN IFNULL(bu.flag, 1)
END = 0
</select>
<select id="getAlreadyBoundUserPage" resultType="com.dongjian.dashboard.back.vo.levelrole.UserBoundRolePageDTO">
SELECT
dlr.id,
dlr.company_id,
dlr.name levelRoleName,
dlr.remark,
dlr.created_at,
dlru.id AS relationId,
dlru.ref_type,
buser.id AS userId,
buser.mobile_number,
buser.login_name,
buser.email
FROM
dashboard_level_role dlr
INNER JOIN dashboard_level_role_user dlru ON dlr.id = dlru.level_role_id
INNER JOIN data_center_aeon_admin.basic_user buser ON buser.id = dlru.user_id
WHERE
dlr.flag != 1
AND buser.company_id IN <foreach collection="companyIdList" item="item" open="(" separator="," close=")">#{item}</foreach>
<if test="targetUserId != null">
AND dlru.user_id = #{targetUserId}
</if>
ORDER BY dlru.created_at DESC, dlru.level_role_id DESC
</select>
<select id="getCanBeBoundUserPage" resultType="com.dongjian.dashboard.back.vo.levelrole.UserBindLevelRoleVO">
SELECT
u.id userId,
u.username,
u.email,
u.mobile_number
FROM
data_center_aeon_admin.basic_user u
WHERE u.id NOT IN (
SELECT DISTINCT
rru.user_id
FROM
data_center_aeon_admin.basic_role_user_relation rru
INNER JOIN data_center_aeon_admin.basic_role br ON br.id = rru.role_id
INNER JOIN data_center_aeon_admin.basic_role_menu_relation rmr ON br.id = rmr.role_id
WHERE rmr.menu_id = 88 AND br.flag != 1
)
AND u.flag != 1 AND u.user_type = 2
AND u.company_id IN <foreach collection="companyIdList" item="item" open="(" separator="," close=")">#{item}</foreach>
</select>
<select id="checkLevelManager" resultType="java.lang.Integer">
SELECT
count(1)
FROM
data_center_aeon_admin.basic_role_user_relation rru
INNER JOIN data_center_aeon_admin.basic_role br ON br.id = rru.role_id
INNER JOIN data_center_aeon_admin.basic_role_menu_relation rmr ON br.id = rmr.role_id
WHERE rmr.menu_id = 88 AND br.flag != 1 AND rru.user_id = #{userId}
</select>
</mapper>

1
dongjian-dashboard-back-dao/src/main/resources/mappers/ex/MonitoringPointCategoryGroupMapperExt.xml

@ -67,6 +67,7 @@
mpc.company_id,
mpc.thumbnail_normal_base64,
mpc.thumbnail_alarm_base64,
mpc.`name`,
mpc.remark
FROM

1
dongjian-dashboard-back-dao/src/main/resources/mappers/ex/MonitoringPointCategoryMapperExt.xml

@ -24,6 +24,7 @@
mpc.company_id,
mpc.thumbnail_normal_base64,
mpc.thumbnail_alarm_base64,
mpc.thumbnail_dis_base64,
mpc.class_name AS `name`
FROM
basic_asset_class_big mpc

8
dongjian-dashboard-back-dao/src/main/resources/mappers/ex/OperationLogMapperExt.xml

@ -16,7 +16,13 @@
dolog.request_params,
dolog.execution_time_ms,
dolog.created_at,
buser.login_name `user`
COALESCE(
NULLIF(
CONCAT_WS(' ', buser.last_name, buser.first_name),
''
),
buser.login_name
) AS `user`
FROM
dashboard_operation_log dolog
INNER JOIN data_center_aeon_admin.basic_user buser ON buser.id = dolog.user_id

78
dongjian-dashboard-back-dao/src/main/resources/mappers/ex/OverviewInfoMapperExt.xml

@ -0,0 +1,78 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.dongjian.dashboard.back.dao.ex.OverviewInfoMapperExt">
<select id="getOverviewInfo" resultType="com.dongjian.dashboard.back.vo.data.OverviewInfo">
SELECT
bbuilding.building_id,
bbuilding.name AS buildingName,
ah.device_id,
ah.receive_ts,
basic_asset_class_big.id AS monitoringPointCategoryId,
basic_asset_class_big.class_name AS monitoringPointCategoryName
FROM
basic_building bbuilding
INNER JOIN basic_floor on basic_floor.building_id = bbuilding.building_id
INNER JOIN basic_space on basic_space.floor_id = basic_floor.floor_id
INNER JOIN basic_monitoring_asset on basic_monitoring_asset.space_id = basic_space.space_id
INNER JOIN device_info dinfo ON dinfo.asset_id = basic_monitoring_asset.equipment_id
INNER JOIN alert_history ah ON dinfo.device_id = ah.device_id
LEFT JOIN basic_asset_class_big on basic_asset_class_big.id = basic_monitoring_asset.class_big_id
LEFT JOIN type ty ON dinfo.type_id = ty.id AND ty.flag = 0
AND ty.device_category_id in
<foreach collection="categoryIdList" item="categoryId" open="(" separator="," close=")">
#{categoryId}
</foreach>
WHERE
bbuilding.company_id = #{companyId} AND bbuilding.flag = 0 AND basic_floor.flag = 0 AND basic_space.flag = 0
AND basic_monitoring_asset.flag = 0 AND dinfo.flag = 0
AND ah.confirm_status = 0 AND ah.handle_status = 1
</select>
<select id="getBuildingInfo" resultType="com.dongjian.dashboard.back.vo.data.OverviewVO">
SELECT
bbuilding.building_id,
bbuilding.name buildingName,
bbuilding.retain_alert,
bbuilding.latitude,
bbuilding.longitude,
bbuilding.picture_introduction,
bbuilding.udf_building_id
FROM
basic_building bbuilding
WHERE
bbuilding.flag != 1
AND bbuilding.company_id = #{companyId}
<if test="bindBuildingIdList != null">
AND bbuilding.building_id IN <foreach collection="bindBuildingIdList" item="item" open="(" separator="," close=")">#{item}</foreach>
</if>
order by bbuilding.building_id desc
</select>
<select id="getExistingCategoryList" resultType="com.dongjian.dashboard.back.vo.data.OverviewCategoryVO">
SELECT
bbuilding.building_id,
bbuilding.name AS buildingName,
dinfo.device_id,
basic_asset_class_big.id AS monitoringPointCategoryId,
basic_asset_class_big.class_name AS monitoringPointCategoryName
FROM
basic_building bbuilding
INNER JOIN basic_floor on basic_floor.building_id = bbuilding.building_id
INNER JOIN basic_space on basic_space.floor_id = basic_floor.floor_id
INNER JOIN basic_monitoring_asset on basic_monitoring_asset.space_id = basic_space.space_id
INNER JOIN device_info dinfo ON dinfo.asset_id = basic_monitoring_asset.equipment_id
LEFT JOIN basic_asset_class_big on basic_asset_class_big.id = basic_monitoring_asset.class_big_id
LEFT JOIN type ty ON dinfo.type_id = ty.id AND ty.flag = 0
AND ty.device_category_id in
<foreach collection="categoryIdList" item="categoryId" open="(" separator="," close=")">
#{categoryId}
</foreach>
WHERE
bbuilding.company_id = #{companyId} AND bbuilding.flag = 0 AND basic_floor.flag = 0 AND basic_space.flag = 0
AND basic_monitoring_asset.flag = 0 AND dinfo.flag = 0 AND basic_asset_class_big.flag = 0
</select>
</mapper>

23
dongjian-dashboard-back-dao/src/main/resources/mybatis-generator/generatorConfig.xml

@ -154,5 +154,28 @@
<generatedKey column="id" sqlStatement="Mysql" identity="true" />
</table>
<table tableName="dashboard_notification_category" domainObjectName="DashboardNotificationCategory" enableCountByExample="true" enableUpdateByExample="true" enableDeleteByExample="true" enableSelectByExample="true" selectByExampleQueryId="true">
<property name="useActualColumnNames" value="false" />
<generatedKey column="id" sqlStatement="Mysql" identity="true" />
</table>
<table tableName="ba_status_history" domainObjectName="BaStatusHistory" enableCountByExample="true" enableUpdateByExample="true" enableDeleteByExample="true" enableSelectByExample="true" selectByExampleQueryId="true">
<property name="useActualColumnNames" value="false" />
<generatedKey column="id" sqlStatement="Mysql" identity="true" />
</table>
<table tableName="dashboard_level_role" domainObjectName="DashboardLevelRole" enableCountByExample="true" enableUpdateByExample="true" enableDeleteByExample="true" enableSelectByExample="true" selectByExampleQueryId="true">
<property name="useActualColumnNames" value="false" />
<generatedKey column="id" sqlStatement="Mysql" identity="true" />
</table>
<table tableName="dashboard_level_role_object" domainObjectName="DashboardLevelRoleObject" enableCountByExample="true" enableUpdateByExample="true" enableDeleteByExample="true" enableSelectByExample="true" selectByExampleQueryId="true">
<property name="useActualColumnNames" value="false" />
</table>
<table tableName="dashboard_level_role_user" domainObjectName="DashboardLevelRoleUser" enableCountByExample="true" enableUpdateByExample="true" enableDeleteByExample="true" enableSelectByExample="true" selectByExampleQueryId="true">
<property name="useActualColumnNames" value="false" />
</table>
</context>
</generatorConfiguration>

9
dongjian-dashboard-back-model/src/main/java/com/dongjian/dashboard/back/bo/LatestValueBO.java

@ -0,0 +1,9 @@
package com.dongjian.dashboard.back.bo;
import lombok.Data;
@Data
public class LatestValueBO {
private Long updateTs;
private Integer value;
}

25
dongjian-dashboard-back-model/src/main/java/com/dongjian/dashboard/back/dto/dashboardnotification/DashboardNotificationCategorySearchParams.java

@ -0,0 +1,25 @@
package com.dongjian.dashboard.back.dto.dashboardnotification;
import com.dongjian.dashboard.back.dto.BaseSearchParams;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.util.List;
/**
* @author Mr.Jiang
* @time 2022年7月21日 下午8:50:31
*/
@Data
public class DashboardNotificationCategorySearchParams extends BaseSearchParams{
@Schema(description = "IDs, comma-separated", example = "1,47")
private String categoryIds;
@Schema(description = "name", example = "name47")
private String name;
@Schema(description = "ID list", hidden = true)
private List<Long> categoryIdList;
}

22
dongjian-dashboard-back-model/src/main/java/com/dongjian/dashboard/back/dto/dashboardnotification/DashboardNotificationSearchParams.java

@ -0,0 +1,22 @@
package com.dongjian.dashboard.back.dto.dashboardnotification;
import com.dongjian.dashboard.back.dto.BaseSearchParams;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.util.List;
/**
* @author Mr.Jiang
* @time 2022年7月21日 下午8:50:31
*/
@Data
public class DashboardNotificationSearchParams extends BaseSearchParams{
@Schema(description = "DashboardNotification IDs, comma-separated", example = "1,47")
private String dashboardNotificationIds;
@Schema(description = "DashboardNotification ID list", hidden = true)
private List<Long> dashboardNotificationIdList;
}

16
dongjian-dashboard-back-model/src/main/java/com/dongjian/dashboard/back/dto/dashboardnotification/DeleteDashboardNotificationCategoryParams.java

@ -0,0 +1,16 @@
package com.dongjian.dashboard.back.dto.dashboardnotification;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
/**
* @author Mr.Jiang
* @time 2022年7月21日 下午8:50:31
*/
@Data
public class DeleteDashboardNotificationCategoryParams {
@Schema(description = "IDs, separated by commas", example = "2738967,587")
private String categoryIds;
}

16
dongjian-dashboard-back-model/src/main/java/com/dongjian/dashboard/back/dto/dashboardnotification/DeleteDashboardNotificationParams.java

@ -0,0 +1,16 @@
package com.dongjian.dashboard.back.dto.dashboardnotification;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
/**
* @author Mr.Jiang
* @time 2022年7月21日 下午8:50:31
*/
@Data
public class DeleteDashboardNotificationParams{
@Schema(description = "DashboardNotification IDs, separated by commas", example = "2738967,587")
private String dashboardNotificationIds;
}

21
dongjian-dashboard-back-model/src/main/java/com/dongjian/dashboard/back/dto/dashboardnotification/OptDashboardNotificationCategoryParams.java

@ -0,0 +1,21 @@
package com.dongjian.dashboard.back.dto.dashboardnotification;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
@Data
public class OptDashboardNotificationCategoryParams {
@Schema(description = "unique identifier ID, not required for new entries", example = "2738967")
private Long categoryId;
@Schema(description = "Company ID", example = "2738967", hidden = true)
private Long companyId;
@Schema(description = "name", example = "webhook", required = true)
private String name;
@Schema(description = "remark", example = "remark")
private String remark;
}

26
dongjian-dashboard-back-model/src/main/java/com/dongjian/dashboard/back/dto/dashboardnotification/OptDashboardNotificationParams.java

@ -0,0 +1,26 @@
package com.dongjian.dashboard.back.dto.dashboardnotification;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
@Data
public class OptDashboardNotificationParams {
@Schema(description = "Provider unique identifier ID, not required for new entries", example = "2738967")
private Long dashboardNotificationId;
@Schema(description = "Company ID", example = "2738967", hidden = true)
private Long companyId;
@Schema(description = "demand time", example = "testProvider1")
private String demandTime;
// @Schema(description = "category", example = "remark")
// private String category;
@Schema(description = "Category ID", example = "2738967")
private Long categoryId;
@Schema(description ="content", example = "2")
private String content;
}

2
dongjian-dashboard-back-model/src/main/java/com/dongjian/dashboard/back/dto/data/AlarmDataSearchParam.java

@ -8,7 +8,7 @@ import lombok.EqualsAndHashCode;
@Data
public class AlarmDataSearchParam extends DataSearchParam {
@Schema(description = "查询类型:1-告警一览,2-告警历史,3-未确认告警",example = "1")
@Schema(description = "查询类型:1-告警一览,2-告警历史,3-未确认告警,4-只查告警类型设备(不是历史)",example = "1")
private Integer searchType;
}

3
dongjian-dashboard-back-model/src/main/java/com/dongjian/dashboard/back/dto/data/DataSearchParam.java

@ -37,4 +37,7 @@ public class DataSearchParam extends BaseSearchParams {
@Schema(description = "关键词",example = "det")
private String keyword;
@Schema(description = "绑定的楼宇ID",example = "[]", hidden = true)
private List<Long> bindBuildingIdList;
}

12
dongjian-dashboard-back-model/src/main/java/com/dongjian/dashboard/back/dto/data/TrendLogDataSearchParam.java

@ -0,0 +1,12 @@
package com.dongjian.dashboard.back.dto.data;
import lombok.Data;
import lombok.EqualsAndHashCode;
@EqualsAndHashCode(callSuper = true)
@Data
public class TrendLogDataSearchParam extends DataSearchParam {
}

3
dongjian-dashboard-back-model/src/main/java/com/dongjian/dashboard/back/dto/device/LineDataSearchParams.java

@ -6,6 +6,9 @@ import lombok.Data;
@Data
public class LineDataSearchParams {
@Schema(description = "设备源,1-main,2-sub", example = "2")
private Integer deviceSource;
@Schema(description = "device ID")
private String deviceId;

3
dongjian-dashboard-back-model/src/main/java/com/dongjian/dashboard/back/dto/level/OptLevelParam.java

@ -44,6 +44,9 @@ public class OptLevelParam {
@Schema(description = "备注",example = "2")
private String remark;
@Schema(description = "楼宇ID, levelType=4时才需要传",example = "[]", required = true)
private List<Long> buildingIdList;
@Schema(description = "所属企业ID",example = "2", hidden = true)
private Long companyId;

19
dongjian-dashboard-back-model/src/main/java/com/dongjian/dashboard/back/dto/levelrole/BindUserParam.java

@ -0,0 +1,19 @@
package com.dongjian.dashboard.back.dto.levelrole;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
import java.util.List;
@Setter
@Getter
public class BindUserParam {
@Schema(description = "用户id",example = "3", required = true)
private Long userId;
@Schema(description = "层级角色ID",example = "[]", required = true)
private List<Long> levelRoleId;
}

13
dongjian-dashboard-back-model/src/main/java/com/dongjian/dashboard/back/dto/levelrole/DeleteLevelRoleParam.java

@ -0,0 +1,13 @@
package com.dongjian.dashboard.back.dto.levelrole;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
@Setter
@Getter
public class DeleteLevelRoleParam {
@Schema(description = "Id,多个使用逗号连接",example = "3,5", required = true)
private String ids;
}

31
dongjian-dashboard-back-model/src/main/java/com/dongjian/dashboard/back/dto/levelrole/OptLevelRoleParam.java

@ -0,0 +1,31 @@
package com.dongjian.dashboard.back.dto.levelrole;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
import java.util.List;
@Setter
@Getter
public class OptLevelRoleParam {
/**
* 主键ID编辑时必填
*/
@Schema(description = "物件级别id,新增时不需要)",example = "2", required = true)
private Long id;
@Schema(description = "名称)",example = "2", required = true)
private String levelRoleName;
@Schema(description = "备注",example = "2")
private String remark;
@Schema(description = "绑定的层级信息,数组格式,[BRANCH-1,STORE-2,AREA-3]",example = "[]")
private List<String> levelList;
@Schema(description = "所属企业ID",example = "2", hidden = true)
private Long companyId;
}

14
dongjian-dashboard-back-model/src/main/java/com/dongjian/dashboard/back/dto/levelrole/PageBoundRoleSearchParam.java

@ -0,0 +1,14 @@
package com.dongjian.dashboard.back.dto.levelrole;
import com.dongjian.dashboard.back.dto.BaseSearchParams;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
@Setter
@Getter
public class PageBoundRoleSearchParam extends BaseSearchParams {
@Schema(description = "需要查询的用户")
private Long targetUserId;
}

22
dongjian-dashboard-back-model/src/main/java/com/dongjian/dashboard/back/dto/levelrole/PageLevelRoleSearchParam.java

@ -0,0 +1,22 @@
package com.dongjian.dashboard.back.dto.levelrole;
import com.dongjian.dashboard.back.dto.BaseSearchParams;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
import java.util.List;
@Setter
@Getter
public class PageLevelRoleSearchParam extends BaseSearchParams {
@Schema(description = "id")
private String ids;
@Schema(description = "id", hidden = true)
private List<Long> idList;
@Schema(description = "名称",example = "jyk2")
private String levelRoleName;
}

16
dongjian-dashboard-back-model/src/main/java/com/dongjian/dashboard/back/dto/levelrole/UnbindUserParam.java

@ -0,0 +1,16 @@
package com.dongjian.dashboard.back.dto.levelrole;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
import java.util.List;
@Setter
@Getter
public class UnbindUserParam {
@Schema(description = "绑定关系id,数组格式,可以传多个",example = "[3]", required = true)
private List<Long> relationIdList;
}

6
dongjian-dashboard-back-model/src/main/java/com/dongjian/dashboard/back/dto/role/OptRoleParam.java

@ -4,6 +4,8 @@ import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
import java.util.List;
/**
* @author zhc
* @time 2022年6月14日10:56:38
@ -22,8 +24,8 @@ public class OptRoleParam {
@Schema(description = "描述",example = "这是管理员描述", required = true)
private String description;
@Schema(description = "菜单权限ID,使用逗号连接",example = "1,4,5,6", required = true)
private String menuIds;
@Schema(description = "菜单权限ID,使用逗号连接",example = "[]", required = true)
private List<RoleMenuPermissionDTO> menuIds;
@Schema(description = "所属企业ID",example = "2", hidden = true)
private Long companyId;

10
dongjian-dashboard-back-model/src/main/java/com/dongjian/dashboard/back/dto/role/RoleMenuPermissionDTO.java

@ -0,0 +1,10 @@
package com.dongjian.dashboard.back.dto.role;
import lombok.Data;
@Data
public class RoleMenuPermissionDTO {
private Long menuId;
private Integer permissionType;
}

9
dongjian-dashboard-back-model/src/main/java/com/dongjian/dashboard/back/dto/user/OptUserParam.java

@ -36,6 +36,15 @@ public class OptUserParam {
@Schema(description = "所属企业ID",example = "2", hidden = true)
private Long companyId;
@Schema(description = "姓",example = "鸠山", required = true)
private String lastName;
@Schema(description = "名",example = "由纪夫", required = true)
private String firstName;
@Schema(description = "adsc标识, 0-不是, 1-是",example = "1", required = true)
private Integer adscFlag;
}

27
dongjian-dashboard-back-model/src/main/java/com/dongjian/dashboard/back/easyexcel/ExportDeviceAccumulateDataDTO.java

@ -10,32 +10,35 @@ public class ExportDeviceAccumulateDataDTO {
@ExcelProperty(value = {"上传时间", "Upload Time", "計測日時"}, converter = TimestampConverter.class)
private Long uploadTimestamp;
@ExcelProperty({"设施名", "Facility Name", "施設名"})
private String buildingName;
@ExcelProperty({"监视点名称", "Monitoring Point Name", "監視点名称"})
private String monitoringPointName;
@ExcelProperty({"楼层名称", "Floor Name", "フロア"})
@ExcelProperty({"楼层名称", "Floor", "フロア"})
private String floorName;
@ExcelProperty({"监控点分类名称", "Monitoring Point Category Name", "分類"})
@ExcelProperty({"监控点分类名称", "Category", "分類"})
private String monitoringPointCategoryName;
@ExcelProperty({"网关信息名称", "Gateway Info Name", "接続先情報"})
private String gatewayInfoName;
// @ExcelProperty({"网关信息名称", "Gateway Info Name", "接続先情報"})
// private String gatewayInfoName;
@ExcelProperty({"数据提供方名称", "Data Provider Name", "データソース"})
private String dataProviderName;
// @ExcelProperty({"数据提供方名称", "Data Provider Name", "データソース"})
// private String dataProviderName;
@ExcelProperty({"设备状态", "Device Status", "デバイス状態"})
@ExcelProperty({"设备状态", "Device Status", "ステータスフラグ"})
private String status111;
@ExcelProperty({"积值", "Cumulative Value", "計測値"})
@ExcelProperty({"积值", "Accumulated Value", "積算値"})
private String cumulativeValue;
@ExcelProperty({"昨日值", "Yesterday's Value", "前日値"})
private String yesterdayValue;
@ExcelProperty({"前日比(%)", "Previous Day Ratio(%)", "前日比(%)"})
private String yesterdayRatio;
@ExcelProperty({"去年值", "Last Year's Value", "前年値"})
private String lastYearValue;
@ExcelProperty({"前年比(%)", "Previous Year Ratio(%)", "前年比(%)"})
private String lastYearRatio;
@ExcelProperty({"单位", "Unit", "単位"})
private String unit;

19
dongjian-dashboard-back-model/src/main/java/com/dongjian/dashboard/back/easyexcel/ExportDeviceBaStatusDataDTO.java

@ -10,6 +10,9 @@ public class ExportDeviceBaStatusDataDTO {
@ExcelProperty(value = {"上传时间", "Upload Time", "計測日時"}, converter = TimestampConverter.class)
private Long uploadTimestamp;
@ExcelProperty({"设施名", "Facility Name", "施設名"})
private String buildingName;
@ExcelProperty({"监视点名称", "Monitoring Point Name", "監視点名称"})
private String monitoringPointName;
@ -19,17 +22,17 @@ public class ExportDeviceBaStatusDataDTO {
@ExcelProperty({"监控点分类名称", "Monitoring Point Category Name", "分類"})
private String monitoringPointCategoryName;
@ExcelProperty({"网关信息名称", "Gateway Info Name", "接続先情報"})
private String gatewayInfoName;
// @ExcelProperty({"网关信息名称", "Gateway Info Name", "接続先情報"})
// private String gatewayInfoName;
@ExcelProperty({"数据提供方名称", "Data Provider Name", "データソース"})
private String dataProviderName;
// @ExcelProperty({"数据提供方名称", "Data Provider Name", "データソース"})
// private String dataProviderName;
@ExcelProperty({"设备状态", "Device Status", "デバイス状態"})
private String status111;
@ExcelProperty({"状态", "Status", "状態"})
private String runningStatus;
@ExcelProperty(value = {"运行状态", "Running status", "状態"}, converter = RunningStatusConverter.class)
private Integer runningStatus;
@ExcelProperty({"设备状态", "Device Status", "ステータスフラグ"})
private String status111;
@ExcelProperty(value = {"上次运行时间", "Last start time", "前回ON"}, converter = TimestampConverter.class)
private Long lastStartTime;

17
dongjian-dashboard-back-model/src/main/java/com/dongjian/dashboard/back/easyexcel/ExportDeviceMeasureDataDTO.java

@ -10,6 +10,9 @@ public class ExportDeviceMeasureDataDTO {
@ExcelProperty(value = {"上传时间", "Upload Time", "計測日時"}, converter = TimestampConverter.class)
private Long uploadTimestamp;
@ExcelProperty({"设施名", "Facility Name", "施設名"})
private String buildingName;
@ExcelProperty({"监视点名称", "Monitoring Point Name", "監視点名称"})
private String monitoringPointName;
@ -19,22 +22,22 @@ public class ExportDeviceMeasureDataDTO {
@ExcelProperty({"监控点分类名称", "Monitoring Point Category Name", "分類"})
private String monitoringPointCategoryName;
@ExcelProperty({"网关信息名称", "Gateway Info Name", "接続先情報"})
private String gatewayInfoName;
// @ExcelProperty({"网关信息名称", "Gateway Info Name", "接続先情報"})
// private String gatewayInfoName;
@ExcelProperty({"数据提供方名称", "Data Provider Name", "データソース"})
private String dataProviderName;
// @ExcelProperty({"数据提供方名称", "Data Provider Name", "データソース"})
// private String dataProviderName;
@ExcelProperty({"设备状态", "Device Status", "デバイス状態"})
@ExcelProperty({"设备状态", "Device Status", "ステータスフラグ"})
private String status111;
@ExcelProperty({"测量值", "Measurement value", "計測値"})
private String measurementValue;
@ExcelProperty({"最大值", "Maximum Value", "最値"})
@ExcelProperty({"最大值", "Maximum Value", "最値"})
private String maxValue;
@ExcelProperty({"最小值", "Minimum Value", "最値"})
@ExcelProperty({"最小值", "Minimum Value", "最値"})
private String minValue;
@ExcelProperty({"单位", "Unit", "単位"})

45
dongjian-dashboard-back-model/src/main/java/com/dongjian/dashboard/back/easyexcel/ExportDeviceTrendLogDataDTO.java

@ -0,0 +1,45 @@
package com.dongjian.dashboard.back.easyexcel;
import com.alibaba.excel.annotation.ExcelProperty;
import lombok.Data;
@Data
public class ExportDeviceTrendLogDataDTO {
@ExcelProperty(value = {"上传时间", "Upload Time", "計測日時"}, converter = TimestampConverter.class)
private Long uploadTimestamp;
@ExcelProperty({"设施名", "Facility Name", "施設名"})
private String buildingName;
@ExcelProperty({"监视点名称", "Monitoring Point Name", "監視点名称"})
private String monitoringPointName;
@ExcelProperty({"楼层名称", "Floor", "フロア"})
private String floorName;
@ExcelProperty({"监控点分类名称", "Category", "分類"})
private String monitoringPointCategoryName;
// @ExcelProperty({"网关信息名称", "Gateway Info Name", "接続先情報"})
// private String gatewayInfoName;
// @ExcelProperty({"数据提供方名称", "Data Provider Name", "データソース"})
// private String dataProviderName;
@ExcelProperty({"设备状态", "Device Status", "ステータスフラグ"})
private String status111;
@ExcelProperty({"积算值", "Accumulated Value", "計量・計測・運転値"})
private String cumulativeValue;
// @ExcelProperty({"前日比(%)", "Previous Day Ratio(%)", "前日比(%)"})
// private String yesterdayRatio;
//
// @ExcelProperty({"前年比(%)", "Previous Year Ratio(%)", "前年比(%)"})
// private String lastYearRatio;
@ExcelProperty({"单位", "Unit", "単位"})
private String unit;
}

2
dongjian-dashboard-back-model/src/main/java/com/dongjian/dashboard/back/easyexcel/SecondsToHMSConverter.java

@ -28,6 +28,8 @@ public class SecondsToHMSConverter implements Converter<Long> {
if (null == value) return "";
value = value / 1000;
long hours = value / 3600;
long minutes = (value % 3600) / 60;
long seconds = value % 60;

166
dongjian-dashboard-back-model/src/main/java/com/dongjian/dashboard/back/model/BaStatusHistory.java

@ -0,0 +1,166 @@
package com.dongjian.dashboard.back.model;
import java.io.Serializable;
public class BaStatusHistory implements Serializable {
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column ba_status_history.id
*
* @mbg.generated
*/
private Long id;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column ba_status_history.device_info_id
*
* @mbg.generated
*/
private Integer deviceInfoId;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column ba_status_history.is_running
*
* @mbg.generated
*/
private Integer isRunning;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column ba_status_history.update_ts
*
* @mbg.generated
*/
private String updateTs;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table ba_status_history
*
* @mbg.generated
*/
private static final long serialVersionUID = 1L;
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column ba_status_history.id
*
* @return the value of ba_status_history.id
*
* @mbg.generated
*/
public Long getId() {
return id;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column ba_status_history.id
*
* @param id the value for ba_status_history.id
*
* @mbg.generated
*/
public void setId(Long id) {
this.id = id;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column ba_status_history.device_info_id
*
* @return the value of ba_status_history.device_info_id
*
* @mbg.generated
*/
public Integer getDeviceInfoId() {
return deviceInfoId;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column ba_status_history.device_info_id
*
* @param deviceInfoId the value for ba_status_history.device_info_id
*
* @mbg.generated
*/
public void setDeviceInfoId(Integer deviceInfoId) {
this.deviceInfoId = deviceInfoId;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column ba_status_history.is_running
*
* @return the value of ba_status_history.is_running
*
* @mbg.generated
*/
public Integer getIsRunning() {
return isRunning;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column ba_status_history.is_running
*
* @param isRunning the value for ba_status_history.is_running
*
* @mbg.generated
*/
public void setIsRunning(Integer isRunning) {
this.isRunning = isRunning;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column ba_status_history.update_ts
*
* @return the value of ba_status_history.update_ts
*
* @mbg.generated
*/
public String getUpdateTs() {
return updateTs;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column ba_status_history.update_ts
*
* @param updateTs the value for ba_status_history.update_ts
*
* @mbg.generated
*/
public void setUpdateTs(String updateTs) {
this.updateTs = updateTs == null ? null : updateTs.trim();
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table ba_status_history
*
* @mbg.generated
*/
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id);
sb.append(", deviceInfoId=").append(deviceInfoId);
sb.append(", isRunning=").append(isRunning);
sb.append(", updateTs=").append(updateTs);
sb.append(", serialVersionUID=").append(serialVersionUID);
sb.append("]");
return sb.toString();
}
}

552
dongjian-dashboard-back-model/src/main/java/com/dongjian/dashboard/back/model/BaStatusHistoryExample.java

@ -0,0 +1,552 @@
package com.dongjian.dashboard.back.model;
import java.util.ArrayList;
import java.util.List;
public class BaStatusHistoryExample {
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table ba_status_history
*
* @mbg.generated
*/
protected String orderByClause;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table ba_status_history
*
* @mbg.generated
*/
protected boolean distinct;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table ba_status_history
*
* @mbg.generated
*/
protected List<Criteria> oredCriteria;
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table ba_status_history
*
* @mbg.generated
*/
public BaStatusHistoryExample() {
oredCriteria = new ArrayList<Criteria>();
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table ba_status_history
*
* @mbg.generated
*/
public void setOrderByClause(String orderByClause) {
this.orderByClause = orderByClause;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table ba_status_history
*
* @mbg.generated
*/
public String getOrderByClause() {
return orderByClause;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table ba_status_history
*
* @mbg.generated
*/
public void setDistinct(boolean distinct) {
this.distinct = distinct;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table ba_status_history
*
* @mbg.generated
*/
public boolean isDistinct() {
return distinct;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table ba_status_history
*
* @mbg.generated
*/
public List<Criteria> getOredCriteria() {
return oredCriteria;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table ba_status_history
*
* @mbg.generated
*/
public void or(Criteria criteria) {
oredCriteria.add(criteria);
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table ba_status_history
*
* @mbg.generated
*/
public Criteria or() {
Criteria criteria = createCriteriaInternal();
oredCriteria.add(criteria);
return criteria;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table ba_status_history
*
* @mbg.generated
*/
public Criteria createCriteria() {
Criteria criteria = createCriteriaInternal();
if (oredCriteria.size() == 0) {
oredCriteria.add(criteria);
}
return criteria;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table ba_status_history
*
* @mbg.generated
*/
protected Criteria createCriteriaInternal() {
Criteria criteria = new Criteria();
return criteria;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table ba_status_history
*
* @mbg.generated
*/
public void clear() {
oredCriteria.clear();
orderByClause = null;
distinct = false;
}
/**
* This class was generated by MyBatis Generator.
* This class corresponds to the database table ba_status_history
*
* @mbg.generated
*/
protected abstract static class GeneratedCriteria {
protected List<Criterion> criteria;
protected GeneratedCriteria() {
super();
criteria = new ArrayList<Criterion>();
}
public boolean isValid() {
return criteria.size() > 0;
}
public List<Criterion> getAllCriteria() {
return criteria;
}
public List<Criterion> getCriteria() {
return criteria;
}
protected void addCriterion(String condition) {
if (condition == null) {
throw new RuntimeException("Value for condition cannot be null");
}
criteria.add(new Criterion(condition));
}
protected void addCriterion(String condition, Object value, String property) {
if (value == null) {
throw new RuntimeException("Value for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value));
}
protected void addCriterion(String condition, Object value1, Object value2, String property) {
if (value1 == null || value2 == null) {
throw new RuntimeException("Between values for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value1, value2));
}
public Criteria andIdIsNull() {
addCriterion("id is null");
return (Criteria) this;
}
public Criteria andIdIsNotNull() {
addCriterion("id is not null");
return (Criteria) this;
}
public Criteria andIdEqualTo(Long value) {
addCriterion("id =", value, "id");
return (Criteria) this;
}
public Criteria andIdNotEqualTo(Long value) {
addCriterion("id <>", value, "id");
return (Criteria) this;
}
public Criteria andIdGreaterThan(Long value) {
addCriterion("id >", value, "id");
return (Criteria) this;
}
public Criteria andIdGreaterThanOrEqualTo(Long value) {
addCriterion("id >=", value, "id");
return (Criteria) this;
}
public Criteria andIdLessThan(Long value) {
addCriterion("id <", value, "id");
return (Criteria) this;
}
public Criteria andIdLessThanOrEqualTo(Long value) {
addCriterion("id <=", value, "id");
return (Criteria) this;
}
public Criteria andIdIn(List<Long> values) {
addCriterion("id in", values, "id");
return (Criteria) this;
}
public Criteria andIdNotIn(List<Long> values) {
addCriterion("id not in", values, "id");
return (Criteria) this;
}
public Criteria andIdBetween(Long value1, Long value2) {
addCriterion("id between", value1, value2, "id");
return (Criteria) this;
}
public Criteria andIdNotBetween(Long value1, Long value2) {
addCriterion("id not between", value1, value2, "id");
return (Criteria) this;
}
public Criteria andDeviceInfoIdIsNull() {
addCriterion("device_info_id is null");
return (Criteria) this;
}
public Criteria andDeviceInfoIdIsNotNull() {
addCriterion("device_info_id is not null");
return (Criteria) this;
}
public Criteria andDeviceInfoIdEqualTo(Integer value) {
addCriterion("device_info_id =", value, "deviceInfoId");
return (Criteria) this;
}
public Criteria andDeviceInfoIdNotEqualTo(Integer value) {
addCriterion("device_info_id <>", value, "deviceInfoId");
return (Criteria) this;
}
public Criteria andDeviceInfoIdGreaterThan(Integer value) {
addCriterion("device_info_id >", value, "deviceInfoId");
return (Criteria) this;
}
public Criteria andDeviceInfoIdGreaterThanOrEqualTo(Integer value) {
addCriterion("device_info_id >=", value, "deviceInfoId");
return (Criteria) this;
}
public Criteria andDeviceInfoIdLessThan(Integer value) {
addCriterion("device_info_id <", value, "deviceInfoId");
return (Criteria) this;
}
public Criteria andDeviceInfoIdLessThanOrEqualTo(Integer value) {
addCriterion("device_info_id <=", value, "deviceInfoId");
return (Criteria) this;
}
public Criteria andDeviceInfoIdIn(List<Integer> values) {
addCriterion("device_info_id in", values, "deviceInfoId");
return (Criteria) this;
}
public Criteria andDeviceInfoIdNotIn(List<Integer> values) {
addCriterion("device_info_id not in", values, "deviceInfoId");
return (Criteria) this;
}
public Criteria andDeviceInfoIdBetween(Integer value1, Integer value2) {
addCriterion("device_info_id between", value1, value2, "deviceInfoId");
return (Criteria) this;
}
public Criteria andDeviceInfoIdNotBetween(Integer value1, Integer value2) {
addCriterion("device_info_id not between", value1, value2, "deviceInfoId");
return (Criteria) this;
}
public Criteria andIsRunningIsNull() {
addCriterion("is_running is null");
return (Criteria) this;
}
public Criteria andIsRunningIsNotNull() {
addCriterion("is_running is not null");
return (Criteria) this;
}
public Criteria andIsRunningEqualTo(Integer value) {
addCriterion("is_running =", value, "isRunning");
return (Criteria) this;
}
public Criteria andIsRunningNotEqualTo(Integer value) {
addCriterion("is_running <>", value, "isRunning");
return (Criteria) this;
}
public Criteria andIsRunningGreaterThan(Integer value) {
addCriterion("is_running >", value, "isRunning");
return (Criteria) this;
}
public Criteria andIsRunningGreaterThanOrEqualTo(Integer value) {
addCriterion("is_running >=", value, "isRunning");
return (Criteria) this;
}
public Criteria andIsRunningLessThan(Integer value) {
addCriterion("is_running <", value, "isRunning");
return (Criteria) this;
}
public Criteria andIsRunningLessThanOrEqualTo(Integer value) {
addCriterion("is_running <=", value, "isRunning");
return (Criteria) this;
}
public Criteria andIsRunningIn(List<Integer> values) {
addCriterion("is_running in", values, "isRunning");
return (Criteria) this;
}
public Criteria andIsRunningNotIn(List<Integer> values) {
addCriterion("is_running not in", values, "isRunning");
return (Criteria) this;
}
public Criteria andIsRunningBetween(Integer value1, Integer value2) {
addCriterion("is_running between", value1, value2, "isRunning");
return (Criteria) this;
}
public Criteria andIsRunningNotBetween(Integer value1, Integer value2) {
addCriterion("is_running not between", value1, value2, "isRunning");
return (Criteria) this;
}
public Criteria andUpdateTsIsNull() {
addCriterion("update_ts is null");
return (Criteria) this;
}
public Criteria andUpdateTsIsNotNull() {
addCriterion("update_ts is not null");
return (Criteria) this;
}
public Criteria andUpdateTsEqualTo(String value) {
addCriterion("update_ts =", value, "updateTs");
return (Criteria) this;
}
public Criteria andUpdateTsNotEqualTo(String value) {
addCriterion("update_ts <>", value, "updateTs");
return (Criteria) this;
}
public Criteria andUpdateTsGreaterThan(String value) {
addCriterion("update_ts >", value, "updateTs");
return (Criteria) this;
}
public Criteria andUpdateTsGreaterThanOrEqualTo(String value) {
addCriterion("update_ts >=", value, "updateTs");
return (Criteria) this;
}
public Criteria andUpdateTsLessThan(String value) {
addCriterion("update_ts <", value, "updateTs");
return (Criteria) this;
}
public Criteria andUpdateTsLessThanOrEqualTo(String value) {
addCriterion("update_ts <=", value, "updateTs");
return (Criteria) this;
}
public Criteria andUpdateTsLike(String value) {
addCriterion("update_ts like", value, "updateTs");
return (Criteria) this;
}
public Criteria andUpdateTsNotLike(String value) {
addCriterion("update_ts not like", value, "updateTs");
return (Criteria) this;
}
public Criteria andUpdateTsIn(List<String> values) {
addCriterion("update_ts in", values, "updateTs");
return (Criteria) this;
}
public Criteria andUpdateTsNotIn(List<String> values) {
addCriterion("update_ts not in", values, "updateTs");
return (Criteria) this;
}
public Criteria andUpdateTsBetween(String value1, String value2) {
addCriterion("update_ts between", value1, value2, "updateTs");
return (Criteria) this;
}
public Criteria andUpdateTsNotBetween(String value1, String value2) {
addCriterion("update_ts not between", value1, value2, "updateTs");
return (Criteria) this;
}
}
/**
* This class was generated by MyBatis Generator.
* This class corresponds to the database table ba_status_history
*
* @mbg.generated do_not_delete_during_merge
*/
public static class Criteria extends GeneratedCriteria {
protected Criteria() {
super();
}
}
/**
* This class was generated by MyBatis Generator.
* This class corresponds to the database table ba_status_history
*
* @mbg.generated
*/
public static class Criterion {
private String condition;
private Object value;
private Object secondValue;
private boolean noValue;
private boolean singleValue;
private boolean betweenValue;
private boolean listValue;
private String typeHandler;
public String getCondition() {
return condition;
}
public Object getValue() {
return value;
}
public Object getSecondValue() {
return secondValue;
}
public boolean isNoValue() {
return noValue;
}
public boolean isSingleValue() {
return singleValue;
}
public boolean isBetweenValue() {
return betweenValue;
}
public boolean isListValue() {
return listValue;
}
public String getTypeHandler() {
return typeHandler;
}
protected Criterion(String condition) {
super();
this.condition = condition;
this.typeHandler = null;
this.noValue = true;
}
protected Criterion(String condition, Object value, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.typeHandler = typeHandler;
if (value instanceof List<?>) {
this.listValue = true;
} else {
this.singleValue = true;
}
}
protected Criterion(String condition, Object value) {
this(condition, value, null);
}
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.secondValue = secondValue;
this.typeHandler = typeHandler;
this.betweenValue = true;
}
protected Criterion(String condition, Object value, Object secondValue) {
this(condition, value, secondValue, null);
}
}
}

102
dongjian-dashboard-back-model/src/main/java/com/dongjian/dashboard/back/model/BasicUser.java

@ -183,6 +183,33 @@ public class BasicUser implements Serializable {
*/
private Integer createPlatform;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column basic_user.last_name
*
* @mbg.generated
*/
private String lastName;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column basic_user.first_name
*
* @mbg.generated
*/
private String firstName;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column basic_user.adsc_flag
*
* @mbg.generated
*/
private Integer adscFlag;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table basic_user
@ -671,6 +698,78 @@ public class BasicUser implements Serializable {
this.createPlatform = createPlatform;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column basic_user.last_name
*
* @return the value of basic_user.last_name
*
* @mbg.generated
*/
public String getLastName() {
return lastName;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column basic_user.last_name
*
* @param lastName the value for basic_user.last_name
*
* @mbg.generated
*/
public void setLastName(String lastName) {
this.lastName = lastName == null ? null : lastName.trim();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column basic_user.first_name
*
* @return the value of basic_user.first_name
*
* @mbg.generated
*/
public String getFirstName() {
return firstName;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column basic_user.first_name
*
* @param firstName the value for basic_user.first_name
*
* @mbg.generated
*/
public void setFirstName(String firstName) {
this.firstName = firstName == null ? null : firstName.trim();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column basic_user.adsc_flag
*
* @return the value of basic_user.adsc_flag
*
* @mbg.generated
*/
public Integer getAdscFlag() {
return adscFlag;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column basic_user.adsc_flag
*
* @param adscFlag the value for basic_user.adsc_flag
*
* @mbg.generated
*/
public void setAdscFlag(Integer adscFlag) {
this.adscFlag = adscFlag;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table basic_user
@ -703,6 +802,9 @@ public class BasicUser implements Serializable {
sb.append(", modifierId=").append(modifierId);
sb.append(", superRole=").append(superRole);
sb.append(", createPlatform=").append(createPlatform);
sb.append(", lastName=").append(lastName);
sb.append(", firstName=").append(firstName);
sb.append(", adscFlag=").append(adscFlag);
sb.append(", serialVersionUID=").append(serialVersionUID);
sb.append("]");
return sb.toString();

200
dongjian-dashboard-back-model/src/main/java/com/dongjian/dashboard/back/model/BasicUserExample.java

@ -1463,6 +1463,206 @@ public class BasicUserExample {
addCriterion("create_platform not between", value1, value2, "createPlatform");
return (Criteria) this;
}
public Criteria andLastNameIsNull() {
addCriterion("last_name is null");
return (Criteria) this;
}
public Criteria andLastNameIsNotNull() {
addCriterion("last_name is not null");
return (Criteria) this;
}
public Criteria andLastNameEqualTo(String value) {
addCriterion("last_name =", value, "lastName");
return (Criteria) this;
}
public Criteria andLastNameNotEqualTo(String value) {
addCriterion("last_name <>", value, "lastName");
return (Criteria) this;
}
public Criteria andLastNameGreaterThan(String value) {
addCriterion("last_name >", value, "lastName");
return (Criteria) this;
}
public Criteria andLastNameGreaterThanOrEqualTo(String value) {
addCriterion("last_name >=", value, "lastName");
return (Criteria) this;
}
public Criteria andLastNameLessThan(String value) {
addCriterion("last_name <", value, "lastName");
return (Criteria) this;
}
public Criteria andLastNameLessThanOrEqualTo(String value) {
addCriterion("last_name <=", value, "lastName");
return (Criteria) this;
}
public Criteria andLastNameLike(String value) {
addCriterion("last_name like", value, "lastName");
return (Criteria) this;
}
public Criteria andLastNameNotLike(String value) {
addCriterion("last_name not like", value, "lastName");
return (Criteria) this;
}
public Criteria andLastNameIn(List<String> values) {
addCriterion("last_name in", values, "lastName");
return (Criteria) this;
}
public Criteria andLastNameNotIn(List<String> values) {
addCriterion("last_name not in", values, "lastName");
return (Criteria) this;
}
public Criteria andLastNameBetween(String value1, String value2) {
addCriterion("last_name between", value1, value2, "lastName");
return (Criteria) this;
}
public Criteria andLastNameNotBetween(String value1, String value2) {
addCriterion("last_name not between", value1, value2, "lastName");
return (Criteria) this;
}
public Criteria andFirstNameIsNull() {
addCriterion("first_name is null");
return (Criteria) this;
}
public Criteria andFirstNameIsNotNull() {
addCriterion("first_name is not null");
return (Criteria) this;
}
public Criteria andFirstNameEqualTo(String value) {
addCriterion("first_name =", value, "firstName");
return (Criteria) this;
}
public Criteria andFirstNameNotEqualTo(String value) {
addCriterion("first_name <>", value, "firstName");
return (Criteria) this;
}
public Criteria andFirstNameGreaterThan(String value) {
addCriterion("first_name >", value, "firstName");
return (Criteria) this;
}
public Criteria andFirstNameGreaterThanOrEqualTo(String value) {
addCriterion("first_name >=", value, "firstName");
return (Criteria) this;
}
public Criteria andFirstNameLessThan(String value) {
addCriterion("first_name <", value, "firstName");
return (Criteria) this;
}
public Criteria andFirstNameLessThanOrEqualTo(String value) {
addCriterion("first_name <=", value, "firstName");
return (Criteria) this;
}
public Criteria andFirstNameLike(String value) {
addCriterion("first_name like", value, "firstName");
return (Criteria) this;
}
public Criteria andFirstNameNotLike(String value) {
addCriterion("first_name not like", value, "firstName");
return (Criteria) this;
}
public Criteria andFirstNameIn(List<String> values) {
addCriterion("first_name in", values, "firstName");
return (Criteria) this;
}
public Criteria andFirstNameNotIn(List<String> values) {
addCriterion("first_name not in", values, "firstName");
return (Criteria) this;
}
public Criteria andFirstNameBetween(String value1, String value2) {
addCriterion("first_name between", value1, value2, "firstName");
return (Criteria) this;
}
public Criteria andFirstNameNotBetween(String value1, String value2) {
addCriterion("first_name not between", value1, value2, "firstName");
return (Criteria) this;
}
public Criteria andAdscFlagIsNull() {
addCriterion("adsc_flag is null");
return (Criteria) this;
}
public Criteria andAdscFlagIsNotNull() {
addCriterion("adsc_flag is not null");
return (Criteria) this;
}
public Criteria andAdscFlagEqualTo(Integer value) {
addCriterion("adsc_flag =", value, "adscFlag");
return (Criteria) this;
}
public Criteria andAdscFlagNotEqualTo(Integer value) {
addCriterion("adsc_flag <>", value, "adscFlag");
return (Criteria) this;
}
public Criteria andAdscFlagGreaterThan(Integer value) {
addCriterion("adsc_flag >", value, "adscFlag");
return (Criteria) this;
}
public Criteria andAdscFlagGreaterThanOrEqualTo(Integer value) {
addCriterion("adsc_flag >=", value, "adscFlag");
return (Criteria) this;
}
public Criteria andAdscFlagLessThan(Integer value) {
addCriterion("adsc_flag <", value, "adscFlag");
return (Criteria) this;
}
public Criteria andAdscFlagLessThanOrEqualTo(Integer value) {
addCriterion("adsc_flag <=", value, "adscFlag");
return (Criteria) this;
}
public Criteria andAdscFlagIn(List<Integer> values) {
addCriterion("adsc_flag in", values, "adscFlag");
return (Criteria) this;
}
public Criteria andAdscFlagNotIn(List<Integer> values) {
addCriterion("adsc_flag not in", values, "adscFlag");
return (Criteria) this;
}
public Criteria andAdscFlagBetween(Integer value1, Integer value2) {
addCriterion("adsc_flag between", value1, value2, "adscFlag");
return (Criteria) this;
}
public Criteria andAdscFlagNotBetween(Integer value1, Integer value2) {
addCriterion("adsc_flag not between", value1, value2, "adscFlag");
return (Criteria) this;
}
}
/**

336
dongjian-dashboard-back-model/src/main/java/com/dongjian/dashboard/back/model/DashboardLevelRole.java

@ -0,0 +1,336 @@
package com.dongjian.dashboard.back.model;
import java.io.Serializable;
public class DashboardLevelRole implements Serializable {
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column dashboard_level_role.id
*
* @mbg.generated
*/
private Long id;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column dashboard_level_role.company_id
*
* @mbg.generated
*/
private Long companyId;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column dashboard_level_role.name
*
* @mbg.generated
*/
private String name;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column dashboard_level_role.remark
*
* @mbg.generated
*/
private String remark;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column dashboard_level_role.flag
*
* @mbg.generated
*/
private Integer flag;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column dashboard_level_role.created_by
*
* @mbg.generated
*/
private Long createdBy;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column dashboard_level_role.created_at
*
* @mbg.generated
*/
private Long createdAt;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column dashboard_level_role.updated_at
*
* @mbg.generated
*/
private Long updatedAt;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column dashboard_level_role.updated_by
*
* @mbg.generated
*/
private Long updatedBy;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table dashboard_level_role
*
* @mbg.generated
*/
private static final long serialVersionUID = 1L;
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column dashboard_level_role.id
*
* @return the value of dashboard_level_role.id
*
* @mbg.generated
*/
public Long getId() {
return id;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column dashboard_level_role.id
*
* @param id the value for dashboard_level_role.id
*
* @mbg.generated
*/
public void setId(Long id) {
this.id = id;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column dashboard_level_role.company_id
*
* @return the value of dashboard_level_role.company_id
*
* @mbg.generated
*/
public Long getCompanyId() {
return companyId;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column dashboard_level_role.company_id
*
* @param companyId the value for dashboard_level_role.company_id
*
* @mbg.generated
*/
public void setCompanyId(Long companyId) {
this.companyId = companyId;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column dashboard_level_role.name
*
* @return the value of dashboard_level_role.name
*
* @mbg.generated
*/
public String getName() {
return name;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column dashboard_level_role.name
*
* @param name the value for dashboard_level_role.name
*
* @mbg.generated
*/
public void setName(String name) {
this.name = name == null ? null : name.trim();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column dashboard_level_role.remark
*
* @return the value of dashboard_level_role.remark
*
* @mbg.generated
*/
public String getRemark() {
return remark;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column dashboard_level_role.remark
*
* @param remark the value for dashboard_level_role.remark
*
* @mbg.generated
*/
public void setRemark(String remark) {
this.remark = remark == null ? null : remark.trim();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column dashboard_level_role.flag
*
* @return the value of dashboard_level_role.flag
*
* @mbg.generated
*/
public Integer getFlag() {
return flag;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column dashboard_level_role.flag
*
* @param flag the value for dashboard_level_role.flag
*
* @mbg.generated
*/
public void setFlag(Integer flag) {
this.flag = flag;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column dashboard_level_role.created_by
*
* @return the value of dashboard_level_role.created_by
*
* @mbg.generated
*/
public Long getCreatedBy() {
return createdBy;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column dashboard_level_role.created_by
*
* @param createdBy the value for dashboard_level_role.created_by
*
* @mbg.generated
*/
public void setCreatedBy(Long createdBy) {
this.createdBy = createdBy;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column dashboard_level_role.created_at
*
* @return the value of dashboard_level_role.created_at
*
* @mbg.generated
*/
public Long getCreatedAt() {
return createdAt;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column dashboard_level_role.created_at
*
* @param createdAt the value for dashboard_level_role.created_at
*
* @mbg.generated
*/
public void setCreatedAt(Long createdAt) {
this.createdAt = createdAt;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column dashboard_level_role.updated_at
*
* @return the value of dashboard_level_role.updated_at
*
* @mbg.generated
*/
public Long getUpdatedAt() {
return updatedAt;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column dashboard_level_role.updated_at
*
* @param updatedAt the value for dashboard_level_role.updated_at
*
* @mbg.generated
*/
public void setUpdatedAt(Long updatedAt) {
this.updatedAt = updatedAt;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column dashboard_level_role.updated_by
*
* @return the value of dashboard_level_role.updated_by
*
* @mbg.generated
*/
public Long getUpdatedBy() {
return updatedBy;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column dashboard_level_role.updated_by
*
* @param updatedBy the value for dashboard_level_role.updated_by
*
* @mbg.generated
*/
public void setUpdatedBy(Long updatedBy) {
this.updatedBy = updatedBy;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table dashboard_level_role
*
* @mbg.generated
*/
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id);
sb.append(", companyId=").append(companyId);
sb.append(", name=").append(name);
sb.append(", remark=").append(remark);
sb.append(", flag=").append(flag);
sb.append(", createdBy=").append(createdBy);
sb.append(", createdAt=").append(createdAt);
sb.append(", updatedAt=").append(updatedAt);
sb.append(", updatedBy=").append(updatedBy);
sb.append(", serialVersionUID=").append(serialVersionUID);
sb.append("]");
return sb.toString();
}
}

862
dongjian-dashboard-back-model/src/main/java/com/dongjian/dashboard/back/model/DashboardLevelRoleExample.java

@ -0,0 +1,862 @@
package com.dongjian.dashboard.back.model;
import java.util.ArrayList;
import java.util.List;
public class DashboardLevelRoleExample {
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table dashboard_level_role
*
* @mbg.generated
*/
protected String orderByClause;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table dashboard_level_role
*
* @mbg.generated
*/
protected boolean distinct;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table dashboard_level_role
*
* @mbg.generated
*/
protected List<Criteria> oredCriteria;
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table dashboard_level_role
*
* @mbg.generated
*/
public DashboardLevelRoleExample() {
oredCriteria = new ArrayList<Criteria>();
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table dashboard_level_role
*
* @mbg.generated
*/
public void setOrderByClause(String orderByClause) {
this.orderByClause = orderByClause;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table dashboard_level_role
*
* @mbg.generated
*/
public String getOrderByClause() {
return orderByClause;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table dashboard_level_role
*
* @mbg.generated
*/
public void setDistinct(boolean distinct) {
this.distinct = distinct;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table dashboard_level_role
*
* @mbg.generated
*/
public boolean isDistinct() {
return distinct;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table dashboard_level_role
*
* @mbg.generated
*/
public List<Criteria> getOredCriteria() {
return oredCriteria;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table dashboard_level_role
*
* @mbg.generated
*/
public void or(Criteria criteria) {
oredCriteria.add(criteria);
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table dashboard_level_role
*
* @mbg.generated
*/
public Criteria or() {
Criteria criteria = createCriteriaInternal();
oredCriteria.add(criteria);
return criteria;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table dashboard_level_role
*
* @mbg.generated
*/
public Criteria createCriteria() {
Criteria criteria = createCriteriaInternal();
if (oredCriteria.size() == 0) {
oredCriteria.add(criteria);
}
return criteria;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table dashboard_level_role
*
* @mbg.generated
*/
protected Criteria createCriteriaInternal() {
Criteria criteria = new Criteria();
return criteria;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table dashboard_level_role
*
* @mbg.generated
*/
public void clear() {
oredCriteria.clear();
orderByClause = null;
distinct = false;
}
/**
* This class was generated by MyBatis Generator.
* This class corresponds to the database table dashboard_level_role
*
* @mbg.generated
*/
protected abstract static class GeneratedCriteria {
protected List<Criterion> criteria;
protected GeneratedCriteria() {
super();
criteria = new ArrayList<Criterion>();
}
public boolean isValid() {
return criteria.size() > 0;
}
public List<Criterion> getAllCriteria() {
return criteria;
}
public List<Criterion> getCriteria() {
return criteria;
}
protected void addCriterion(String condition) {
if (condition == null) {
throw new RuntimeException("Value for condition cannot be null");
}
criteria.add(new Criterion(condition));
}
protected void addCriterion(String condition, Object value, String property) {
if (value == null) {
throw new RuntimeException("Value for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value));
}
protected void addCriterion(String condition, Object value1, Object value2, String property) {
if (value1 == null || value2 == null) {
throw new RuntimeException("Between values for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value1, value2));
}
public Criteria andIdIsNull() {
addCriterion("id is null");
return (Criteria) this;
}
public Criteria andIdIsNotNull() {
addCriterion("id is not null");
return (Criteria) this;
}
public Criteria andIdEqualTo(Long value) {
addCriterion("id =", value, "id");
return (Criteria) this;
}
public Criteria andIdNotEqualTo(Long value) {
addCriterion("id <>", value, "id");
return (Criteria) this;
}
public Criteria andIdGreaterThan(Long value) {
addCriterion("id >", value, "id");
return (Criteria) this;
}
public Criteria andIdGreaterThanOrEqualTo(Long value) {
addCriterion("id >=", value, "id");
return (Criteria) this;
}
public Criteria andIdLessThan(Long value) {
addCriterion("id <", value, "id");
return (Criteria) this;
}
public Criteria andIdLessThanOrEqualTo(Long value) {
addCriterion("id <=", value, "id");
return (Criteria) this;
}
public Criteria andIdIn(List<Long> values) {
addCriterion("id in", values, "id");
return (Criteria) this;
}
public Criteria andIdNotIn(List<Long> values) {
addCriterion("id not in", values, "id");
return (Criteria) this;
}
public Criteria andIdBetween(Long value1, Long value2) {
addCriterion("id between", value1, value2, "id");
return (Criteria) this;
}
public Criteria andIdNotBetween(Long value1, Long value2) {
addCriterion("id not between", value1, value2, "id");
return (Criteria) this;
}
public Criteria andCompanyIdIsNull() {
addCriterion("company_id is null");
return (Criteria) this;
}
public Criteria andCompanyIdIsNotNull() {
addCriterion("company_id is not null");
return (Criteria) this;
}
public Criteria andCompanyIdEqualTo(Long value) {
addCriterion("company_id =", value, "companyId");
return (Criteria) this;
}
public Criteria andCompanyIdNotEqualTo(Long value) {
addCriterion("company_id <>", value, "companyId");
return (Criteria) this;
}
public Criteria andCompanyIdGreaterThan(Long value) {
addCriterion("company_id >", value, "companyId");
return (Criteria) this;
}
public Criteria andCompanyIdGreaterThanOrEqualTo(Long value) {
addCriterion("company_id >=", value, "companyId");
return (Criteria) this;
}
public Criteria andCompanyIdLessThan(Long value) {
addCriterion("company_id <", value, "companyId");
return (Criteria) this;
}
public Criteria andCompanyIdLessThanOrEqualTo(Long value) {
addCriterion("company_id <=", value, "companyId");
return (Criteria) this;
}
public Criteria andCompanyIdIn(List<Long> values) {
addCriterion("company_id in", values, "companyId");
return (Criteria) this;
}
public Criteria andCompanyIdNotIn(List<Long> values) {
addCriterion("company_id not in", values, "companyId");
return (Criteria) this;
}
public Criteria andCompanyIdBetween(Long value1, Long value2) {
addCriterion("company_id between", value1, value2, "companyId");
return (Criteria) this;
}
public Criteria andCompanyIdNotBetween(Long value1, Long value2) {
addCriterion("company_id not between", value1, value2, "companyId");
return (Criteria) this;
}
public Criteria andNameIsNull() {
addCriterion("`name` is null");
return (Criteria) this;
}
public Criteria andNameIsNotNull() {
addCriterion("`name` is not null");
return (Criteria) this;
}
public Criteria andNameEqualTo(String value) {
addCriterion("`name` =", value, "name");
return (Criteria) this;
}
public Criteria andNameNotEqualTo(String value) {
addCriterion("`name` <>", value, "name");
return (Criteria) this;
}
public Criteria andNameGreaterThan(String value) {
addCriterion("`name` >", value, "name");
return (Criteria) this;
}
public Criteria andNameGreaterThanOrEqualTo(String value) {
addCriterion("`name` >=", value, "name");
return (Criteria) this;
}
public Criteria andNameLessThan(String value) {
addCriterion("`name` <", value, "name");
return (Criteria) this;
}
public Criteria andNameLessThanOrEqualTo(String value) {
addCriterion("`name` <=", value, "name");
return (Criteria) this;
}
public Criteria andNameLike(String value) {
addCriterion("`name` like", value, "name");
return (Criteria) this;
}
public Criteria andNameNotLike(String value) {
addCriterion("`name` not like", value, "name");
return (Criteria) this;
}
public Criteria andNameIn(List<String> values) {
addCriterion("`name` in", values, "name");
return (Criteria) this;
}
public Criteria andNameNotIn(List<String> values) {
addCriterion("`name` not in", values, "name");
return (Criteria) this;
}
public Criteria andNameBetween(String value1, String value2) {
addCriterion("`name` between", value1, value2, "name");
return (Criteria) this;
}
public Criteria andNameNotBetween(String value1, String value2) {
addCriterion("`name` not between", value1, value2, "name");
return (Criteria) this;
}
public Criteria andRemarkIsNull() {
addCriterion("remark is null");
return (Criteria) this;
}
public Criteria andRemarkIsNotNull() {
addCriterion("remark is not null");
return (Criteria) this;
}
public Criteria andRemarkEqualTo(String value) {
addCriterion("remark =", value, "remark");
return (Criteria) this;
}
public Criteria andRemarkNotEqualTo(String value) {
addCriterion("remark <>", value, "remark");
return (Criteria) this;
}
public Criteria andRemarkGreaterThan(String value) {
addCriterion("remark >", value, "remark");
return (Criteria) this;
}
public Criteria andRemarkGreaterThanOrEqualTo(String value) {
addCriterion("remark >=", value, "remark");
return (Criteria) this;
}
public Criteria andRemarkLessThan(String value) {
addCriterion("remark <", value, "remark");
return (Criteria) this;
}
public Criteria andRemarkLessThanOrEqualTo(String value) {
addCriterion("remark <=", value, "remark");
return (Criteria) this;
}
public Criteria andRemarkLike(String value) {
addCriterion("remark like", value, "remark");
return (Criteria) this;
}
public Criteria andRemarkNotLike(String value) {
addCriterion("remark not like", value, "remark");
return (Criteria) this;
}
public Criteria andRemarkIn(List<String> values) {
addCriterion("remark in", values, "remark");
return (Criteria) this;
}
public Criteria andRemarkNotIn(List<String> values) {
addCriterion("remark not in", values, "remark");
return (Criteria) this;
}
public Criteria andRemarkBetween(String value1, String value2) {
addCriterion("remark between", value1, value2, "remark");
return (Criteria) this;
}
public Criteria andRemarkNotBetween(String value1, String value2) {
addCriterion("remark not between", value1, value2, "remark");
return (Criteria) this;
}
public Criteria andFlagIsNull() {
addCriterion("flag is null");
return (Criteria) this;
}
public Criteria andFlagIsNotNull() {
addCriterion("flag is not null");
return (Criteria) this;
}
public Criteria andFlagEqualTo(Integer value) {
addCriterion("flag =", value, "flag");
return (Criteria) this;
}
public Criteria andFlagNotEqualTo(Integer value) {
addCriterion("flag <>", value, "flag");
return (Criteria) this;
}
public Criteria andFlagGreaterThan(Integer value) {
addCriterion("flag >", value, "flag");
return (Criteria) this;
}
public Criteria andFlagGreaterThanOrEqualTo(Integer value) {
addCriterion("flag >=", value, "flag");
return (Criteria) this;
}
public Criteria andFlagLessThan(Integer value) {
addCriterion("flag <", value, "flag");
return (Criteria) this;
}
public Criteria andFlagLessThanOrEqualTo(Integer value) {
addCriterion("flag <=", value, "flag");
return (Criteria) this;
}
public Criteria andFlagIn(List<Integer> values) {
addCriterion("flag in", values, "flag");
return (Criteria) this;
}
public Criteria andFlagNotIn(List<Integer> values) {
addCriterion("flag not in", values, "flag");
return (Criteria) this;
}
public Criteria andFlagBetween(Integer value1, Integer value2) {
addCriterion("flag between", value1, value2, "flag");
return (Criteria) this;
}
public Criteria andFlagNotBetween(Integer value1, Integer value2) {
addCriterion("flag not between", value1, value2, "flag");
return (Criteria) this;
}
public Criteria andCreatedByIsNull() {
addCriterion("created_by is null");
return (Criteria) this;
}
public Criteria andCreatedByIsNotNull() {
addCriterion("created_by is not null");
return (Criteria) this;
}
public Criteria andCreatedByEqualTo(Long value) {
addCriterion("created_by =", value, "createdBy");
return (Criteria) this;
}
public Criteria andCreatedByNotEqualTo(Long value) {
addCriterion("created_by <>", value, "createdBy");
return (Criteria) this;
}
public Criteria andCreatedByGreaterThan(Long value) {
addCriterion("created_by >", value, "createdBy");
return (Criteria) this;
}
public Criteria andCreatedByGreaterThanOrEqualTo(Long value) {
addCriterion("created_by >=", value, "createdBy");
return (Criteria) this;
}
public Criteria andCreatedByLessThan(Long value) {
addCriterion("created_by <", value, "createdBy");
return (Criteria) this;
}
public Criteria andCreatedByLessThanOrEqualTo(Long value) {
addCriterion("created_by <=", value, "createdBy");
return (Criteria) this;
}
public Criteria andCreatedByIn(List<Long> values) {
addCriterion("created_by in", values, "createdBy");
return (Criteria) this;
}
public Criteria andCreatedByNotIn(List<Long> values) {
addCriterion("created_by not in", values, "createdBy");
return (Criteria) this;
}
public Criteria andCreatedByBetween(Long value1, Long value2) {
addCriterion("created_by between", value1, value2, "createdBy");
return (Criteria) this;
}
public Criteria andCreatedByNotBetween(Long value1, Long value2) {
addCriterion("created_by not between", value1, value2, "createdBy");
return (Criteria) this;
}
public Criteria andCreatedAtIsNull() {
addCriterion("created_at is null");
return (Criteria) this;
}
public Criteria andCreatedAtIsNotNull() {
addCriterion("created_at is not null");
return (Criteria) this;
}
public Criteria andCreatedAtEqualTo(Long value) {
addCriterion("created_at =", value, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtNotEqualTo(Long value) {
addCriterion("created_at <>", value, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtGreaterThan(Long value) {
addCriterion("created_at >", value, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtGreaterThanOrEqualTo(Long value) {
addCriterion("created_at >=", value, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtLessThan(Long value) {
addCriterion("created_at <", value, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtLessThanOrEqualTo(Long value) {
addCriterion("created_at <=", value, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtIn(List<Long> values) {
addCriterion("created_at in", values, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtNotIn(List<Long> values) {
addCriterion("created_at not in", values, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtBetween(Long value1, Long value2) {
addCriterion("created_at between", value1, value2, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtNotBetween(Long value1, Long value2) {
addCriterion("created_at not between", value1, value2, "createdAt");
return (Criteria) this;
}
public Criteria andUpdatedAtIsNull() {
addCriterion("updated_at is null");
return (Criteria) this;
}
public Criteria andUpdatedAtIsNotNull() {
addCriterion("updated_at is not null");
return (Criteria) this;
}
public Criteria andUpdatedAtEqualTo(Long value) {
addCriterion("updated_at =", value, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtNotEqualTo(Long value) {
addCriterion("updated_at <>", value, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtGreaterThan(Long value) {
addCriterion("updated_at >", value, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtGreaterThanOrEqualTo(Long value) {
addCriterion("updated_at >=", value, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtLessThan(Long value) {
addCriterion("updated_at <", value, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtLessThanOrEqualTo(Long value) {
addCriterion("updated_at <=", value, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtIn(List<Long> values) {
addCriterion("updated_at in", values, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtNotIn(List<Long> values) {
addCriterion("updated_at not in", values, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtBetween(Long value1, Long value2) {
addCriterion("updated_at between", value1, value2, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtNotBetween(Long value1, Long value2) {
addCriterion("updated_at not between", value1, value2, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedByIsNull() {
addCriterion("updated_by is null");
return (Criteria) this;
}
public Criteria andUpdatedByIsNotNull() {
addCriterion("updated_by is not null");
return (Criteria) this;
}
public Criteria andUpdatedByEqualTo(Long value) {
addCriterion("updated_by =", value, "updatedBy");
return (Criteria) this;
}
public Criteria andUpdatedByNotEqualTo(Long value) {
addCriterion("updated_by <>", value, "updatedBy");
return (Criteria) this;
}
public Criteria andUpdatedByGreaterThan(Long value) {
addCriterion("updated_by >", value, "updatedBy");
return (Criteria) this;
}
public Criteria andUpdatedByGreaterThanOrEqualTo(Long value) {
addCriterion("updated_by >=", value, "updatedBy");
return (Criteria) this;
}
public Criteria andUpdatedByLessThan(Long value) {
addCriterion("updated_by <", value, "updatedBy");
return (Criteria) this;
}
public Criteria andUpdatedByLessThanOrEqualTo(Long value) {
addCriterion("updated_by <=", value, "updatedBy");
return (Criteria) this;
}
public Criteria andUpdatedByIn(List<Long> values) {
addCriterion("updated_by in", values, "updatedBy");
return (Criteria) this;
}
public Criteria andUpdatedByNotIn(List<Long> values) {
addCriterion("updated_by not in", values, "updatedBy");
return (Criteria) this;
}
public Criteria andUpdatedByBetween(Long value1, Long value2) {
addCriterion("updated_by between", value1, value2, "updatedBy");
return (Criteria) this;
}
public Criteria andUpdatedByNotBetween(Long value1, Long value2) {
addCriterion("updated_by not between", value1, value2, "updatedBy");
return (Criteria) this;
}
}
/**
* This class was generated by MyBatis Generator.
* This class corresponds to the database table dashboard_level_role
*
* @mbg.generated do_not_delete_during_merge
*/
public static class Criteria extends GeneratedCriteria {
protected Criteria() {
super();
}
}
/**
* This class was generated by MyBatis Generator.
* This class corresponds to the database table dashboard_level_role
*
* @mbg.generated
*/
public static class Criterion {
private String condition;
private Object value;
private Object secondValue;
private boolean noValue;
private boolean singleValue;
private boolean betweenValue;
private boolean listValue;
private String typeHandler;
public String getCondition() {
return condition;
}
public Object getValue() {
return value;
}
public Object getSecondValue() {
return secondValue;
}
public boolean isNoValue() {
return noValue;
}
public boolean isSingleValue() {
return singleValue;
}
public boolean isBetweenValue() {
return betweenValue;
}
public boolean isListValue() {
return listValue;
}
public String getTypeHandler() {
return typeHandler;
}
protected Criterion(String condition) {
super();
this.condition = condition;
this.typeHandler = null;
this.noValue = true;
}
protected Criterion(String condition, Object value, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.typeHandler = typeHandler;
if (value instanceof List<?>) {
this.listValue = true;
} else {
this.singleValue = true;
}
}
protected Criterion(String condition, Object value) {
this(condition, value, null);
}
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.secondValue = secondValue;
this.typeHandler = typeHandler;
this.betweenValue = true;
}
protected Criterion(String condition, Object value, Object secondValue) {
this(condition, value, secondValue, null);
}
}
}

268
dongjian-dashboard-back-model/src/main/java/com/dongjian/dashboard/back/model/DashboardLevelRoleObject.java

@ -0,0 +1,268 @@
package com.dongjian.dashboard.back.model;
import java.io.Serializable;
public class DashboardLevelRoleObject implements Serializable {
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column dashboard_level_role_object.level_role_id
*
* @mbg.generated
*/
private Long levelRoleId;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column dashboard_level_role_object.ref_type
*
* @mbg.generated
*/
private String refType;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column dashboard_level_role_object.ref_id
*
* @mbg.generated
*/
private Long refId;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column dashboard_level_role_object.created_by
*
* @mbg.generated
*/
private Long createdBy;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column dashboard_level_role_object.created_at
*
* @mbg.generated
*/
private Long createdAt;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column dashboard_level_role_object.updated_at
*
* @mbg.generated
*/
private Long updatedAt;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column dashboard_level_role_object.updated_by
*
* @mbg.generated
*/
private Long updatedBy;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table dashboard_level_role_object
*
* @mbg.generated
*/
private static final long serialVersionUID = 1L;
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column dashboard_level_role_object.level_role_id
*
* @return the value of dashboard_level_role_object.level_role_id
*
* @mbg.generated
*/
public Long getLevelRoleId() {
return levelRoleId;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column dashboard_level_role_object.level_role_id
*
* @param levelRoleId the value for dashboard_level_role_object.level_role_id
*
* @mbg.generated
*/
public void setLevelRoleId(Long levelRoleId) {
this.levelRoleId = levelRoleId;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column dashboard_level_role_object.ref_type
*
* @return the value of dashboard_level_role_object.ref_type
*
* @mbg.generated
*/
public String getRefType() {
return refType;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column dashboard_level_role_object.ref_type
*
* @param refType the value for dashboard_level_role_object.ref_type
*
* @mbg.generated
*/
public void setRefType(String refType) {
this.refType = refType == null ? null : refType.trim();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column dashboard_level_role_object.ref_id
*
* @return the value of dashboard_level_role_object.ref_id
*
* @mbg.generated
*/
public Long getRefId() {
return refId;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column dashboard_level_role_object.ref_id
*
* @param refId the value for dashboard_level_role_object.ref_id
*
* @mbg.generated
*/
public void setRefId(Long refId) {
this.refId = refId;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column dashboard_level_role_object.created_by
*
* @return the value of dashboard_level_role_object.created_by
*
* @mbg.generated
*/
public Long getCreatedBy() {
return createdBy;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column dashboard_level_role_object.created_by
*
* @param createdBy the value for dashboard_level_role_object.created_by
*
* @mbg.generated
*/
public void setCreatedBy(Long createdBy) {
this.createdBy = createdBy;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column dashboard_level_role_object.created_at
*
* @return the value of dashboard_level_role_object.created_at
*
* @mbg.generated
*/
public Long getCreatedAt() {
return createdAt;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column dashboard_level_role_object.created_at
*
* @param createdAt the value for dashboard_level_role_object.created_at
*
* @mbg.generated
*/
public void setCreatedAt(Long createdAt) {
this.createdAt = createdAt;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column dashboard_level_role_object.updated_at
*
* @return the value of dashboard_level_role_object.updated_at
*
* @mbg.generated
*/
public Long getUpdatedAt() {
return updatedAt;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column dashboard_level_role_object.updated_at
*
* @param updatedAt the value for dashboard_level_role_object.updated_at
*
* @mbg.generated
*/
public void setUpdatedAt(Long updatedAt) {
this.updatedAt = updatedAt;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column dashboard_level_role_object.updated_by
*
* @return the value of dashboard_level_role_object.updated_by
*
* @mbg.generated
*/
public Long getUpdatedBy() {
return updatedBy;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column dashboard_level_role_object.updated_by
*
* @param updatedBy the value for dashboard_level_role_object.updated_by
*
* @mbg.generated
*/
public void setUpdatedBy(Long updatedBy) {
this.updatedBy = updatedBy;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table dashboard_level_role_object
*
* @mbg.generated
*/
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", levelRoleId=").append(levelRoleId);
sb.append(", refType=").append(refType);
sb.append(", refId=").append(refId);
sb.append(", createdBy=").append(createdBy);
sb.append(", createdAt=").append(createdAt);
sb.append(", updatedAt=").append(updatedAt);
sb.append(", updatedBy=").append(updatedBy);
sb.append(", serialVersionUID=").append(serialVersionUID);
sb.append("]");
return sb.toString();
}
}

732
dongjian-dashboard-back-model/src/main/java/com/dongjian/dashboard/back/model/DashboardLevelRoleObjectExample.java

@ -0,0 +1,732 @@
package com.dongjian.dashboard.back.model;
import java.util.ArrayList;
import java.util.List;
public class DashboardLevelRoleObjectExample {
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table dashboard_level_role_object
*
* @mbg.generated
*/
protected String orderByClause;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table dashboard_level_role_object
*
* @mbg.generated
*/
protected boolean distinct;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table dashboard_level_role_object
*
* @mbg.generated
*/
protected List<Criteria> oredCriteria;
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table dashboard_level_role_object
*
* @mbg.generated
*/
public DashboardLevelRoleObjectExample() {
oredCriteria = new ArrayList<Criteria>();
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table dashboard_level_role_object
*
* @mbg.generated
*/
public void setOrderByClause(String orderByClause) {
this.orderByClause = orderByClause;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table dashboard_level_role_object
*
* @mbg.generated
*/
public String getOrderByClause() {
return orderByClause;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table dashboard_level_role_object
*
* @mbg.generated
*/
public void setDistinct(boolean distinct) {
this.distinct = distinct;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table dashboard_level_role_object
*
* @mbg.generated
*/
public boolean isDistinct() {
return distinct;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table dashboard_level_role_object
*
* @mbg.generated
*/
public List<Criteria> getOredCriteria() {
return oredCriteria;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table dashboard_level_role_object
*
* @mbg.generated
*/
public void or(Criteria criteria) {
oredCriteria.add(criteria);
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table dashboard_level_role_object
*
* @mbg.generated
*/
public Criteria or() {
Criteria criteria = createCriteriaInternal();
oredCriteria.add(criteria);
return criteria;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table dashboard_level_role_object
*
* @mbg.generated
*/
public Criteria createCriteria() {
Criteria criteria = createCriteriaInternal();
if (oredCriteria.size() == 0) {
oredCriteria.add(criteria);
}
return criteria;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table dashboard_level_role_object
*
* @mbg.generated
*/
protected Criteria createCriteriaInternal() {
Criteria criteria = new Criteria();
return criteria;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table dashboard_level_role_object
*
* @mbg.generated
*/
public void clear() {
oredCriteria.clear();
orderByClause = null;
distinct = false;
}
/**
* This class was generated by MyBatis Generator.
* This class corresponds to the database table dashboard_level_role_object
*
* @mbg.generated
*/
protected abstract static class GeneratedCriteria {
protected List<Criterion> criteria;
protected GeneratedCriteria() {
super();
criteria = new ArrayList<Criterion>();
}
public boolean isValid() {
return criteria.size() > 0;
}
public List<Criterion> getAllCriteria() {
return criteria;
}
public List<Criterion> getCriteria() {
return criteria;
}
protected void addCriterion(String condition) {
if (condition == null) {
throw new RuntimeException("Value for condition cannot be null");
}
criteria.add(new Criterion(condition));
}
protected void addCriterion(String condition, Object value, String property) {
if (value == null) {
throw new RuntimeException("Value for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value));
}
protected void addCriterion(String condition, Object value1, Object value2, String property) {
if (value1 == null || value2 == null) {
throw new RuntimeException("Between values for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value1, value2));
}
public Criteria andLevelRoleIdIsNull() {
addCriterion("level_role_id is null");
return (Criteria) this;
}
public Criteria andLevelRoleIdIsNotNull() {
addCriterion("level_role_id is not null");
return (Criteria) this;
}
public Criteria andLevelRoleIdEqualTo(Long value) {
addCriterion("level_role_id =", value, "levelRoleId");
return (Criteria) this;
}
public Criteria andLevelRoleIdNotEqualTo(Long value) {
addCriterion("level_role_id <>", value, "levelRoleId");
return (Criteria) this;
}
public Criteria andLevelRoleIdGreaterThan(Long value) {
addCriterion("level_role_id >", value, "levelRoleId");
return (Criteria) this;
}
public Criteria andLevelRoleIdGreaterThanOrEqualTo(Long value) {
addCriterion("level_role_id >=", value, "levelRoleId");
return (Criteria) this;
}
public Criteria andLevelRoleIdLessThan(Long value) {
addCriterion("level_role_id <", value, "levelRoleId");
return (Criteria) this;
}
public Criteria andLevelRoleIdLessThanOrEqualTo(Long value) {
addCriterion("level_role_id <=", value, "levelRoleId");
return (Criteria) this;
}
public Criteria andLevelRoleIdIn(List<Long> values) {
addCriterion("level_role_id in", values, "levelRoleId");
return (Criteria) this;
}
public Criteria andLevelRoleIdNotIn(List<Long> values) {
addCriterion("level_role_id not in", values, "levelRoleId");
return (Criteria) this;
}
public Criteria andLevelRoleIdBetween(Long value1, Long value2) {
addCriterion("level_role_id between", value1, value2, "levelRoleId");
return (Criteria) this;
}
public Criteria andLevelRoleIdNotBetween(Long value1, Long value2) {
addCriterion("level_role_id not between", value1, value2, "levelRoleId");
return (Criteria) this;
}
public Criteria andRefTypeIsNull() {
addCriterion("ref_type is null");
return (Criteria) this;
}
public Criteria andRefTypeIsNotNull() {
addCriterion("ref_type is not null");
return (Criteria) this;
}
public Criteria andRefTypeEqualTo(String value) {
addCriterion("ref_type =", value, "refType");
return (Criteria) this;
}
public Criteria andRefTypeNotEqualTo(String value) {
addCriterion("ref_type <>", value, "refType");
return (Criteria) this;
}
public Criteria andRefTypeGreaterThan(String value) {
addCriterion("ref_type >", value, "refType");
return (Criteria) this;
}
public Criteria andRefTypeGreaterThanOrEqualTo(String value) {
addCriterion("ref_type >=", value, "refType");
return (Criteria) this;
}
public Criteria andRefTypeLessThan(String value) {
addCriterion("ref_type <", value, "refType");
return (Criteria) this;
}
public Criteria andRefTypeLessThanOrEqualTo(String value) {
addCriterion("ref_type <=", value, "refType");
return (Criteria) this;
}
public Criteria andRefTypeLike(String value) {
addCriterion("ref_type like", value, "refType");
return (Criteria) this;
}
public Criteria andRefTypeNotLike(String value) {
addCriterion("ref_type not like", value, "refType");
return (Criteria) this;
}
public Criteria andRefTypeIn(List<String> values) {
addCriterion("ref_type in", values, "refType");
return (Criteria) this;
}
public Criteria andRefTypeNotIn(List<String> values) {
addCriterion("ref_type not in", values, "refType");
return (Criteria) this;
}
public Criteria andRefTypeBetween(String value1, String value2) {
addCriterion("ref_type between", value1, value2, "refType");
return (Criteria) this;
}
public Criteria andRefTypeNotBetween(String value1, String value2) {
addCriterion("ref_type not between", value1, value2, "refType");
return (Criteria) this;
}
public Criteria andRefIdIsNull() {
addCriterion("ref_id is null");
return (Criteria) this;
}
public Criteria andRefIdIsNotNull() {
addCriterion("ref_id is not null");
return (Criteria) this;
}
public Criteria andRefIdEqualTo(Long value) {
addCriterion("ref_id =", value, "refId");
return (Criteria) this;
}
public Criteria andRefIdNotEqualTo(Long value) {
addCriterion("ref_id <>", value, "refId");
return (Criteria) this;
}
public Criteria andRefIdGreaterThan(Long value) {
addCriterion("ref_id >", value, "refId");
return (Criteria) this;
}
public Criteria andRefIdGreaterThanOrEqualTo(Long value) {
addCriterion("ref_id >=", value, "refId");
return (Criteria) this;
}
public Criteria andRefIdLessThan(Long value) {
addCriterion("ref_id <", value, "refId");
return (Criteria) this;
}
public Criteria andRefIdLessThanOrEqualTo(Long value) {
addCriterion("ref_id <=", value, "refId");
return (Criteria) this;
}
public Criteria andRefIdIn(List<Long> values) {
addCriterion("ref_id in", values, "refId");
return (Criteria) this;
}
public Criteria andRefIdNotIn(List<Long> values) {
addCriterion("ref_id not in", values, "refId");
return (Criteria) this;
}
public Criteria andRefIdBetween(Long value1, Long value2) {
addCriterion("ref_id between", value1, value2, "refId");
return (Criteria) this;
}
public Criteria andRefIdNotBetween(Long value1, Long value2) {
addCriterion("ref_id not between", value1, value2, "refId");
return (Criteria) this;
}
public Criteria andCreatedByIsNull() {
addCriterion("created_by is null");
return (Criteria) this;
}
public Criteria andCreatedByIsNotNull() {
addCriterion("created_by is not null");
return (Criteria) this;
}
public Criteria andCreatedByEqualTo(Long value) {
addCriterion("created_by =", value, "createdBy");
return (Criteria) this;
}
public Criteria andCreatedByNotEqualTo(Long value) {
addCriterion("created_by <>", value, "createdBy");
return (Criteria) this;
}
public Criteria andCreatedByGreaterThan(Long value) {
addCriterion("created_by >", value, "createdBy");
return (Criteria) this;
}
public Criteria andCreatedByGreaterThanOrEqualTo(Long value) {
addCriterion("created_by >=", value, "createdBy");
return (Criteria) this;
}
public Criteria andCreatedByLessThan(Long value) {
addCriterion("created_by <", value, "createdBy");
return (Criteria) this;
}
public Criteria andCreatedByLessThanOrEqualTo(Long value) {
addCriterion("created_by <=", value, "createdBy");
return (Criteria) this;
}
public Criteria andCreatedByIn(List<Long> values) {
addCriterion("created_by in", values, "createdBy");
return (Criteria) this;
}
public Criteria andCreatedByNotIn(List<Long> values) {
addCriterion("created_by not in", values, "createdBy");
return (Criteria) this;
}
public Criteria andCreatedByBetween(Long value1, Long value2) {
addCriterion("created_by between", value1, value2, "createdBy");
return (Criteria) this;
}
public Criteria andCreatedByNotBetween(Long value1, Long value2) {
addCriterion("created_by not between", value1, value2, "createdBy");
return (Criteria) this;
}
public Criteria andCreatedAtIsNull() {
addCriterion("created_at is null");
return (Criteria) this;
}
public Criteria andCreatedAtIsNotNull() {
addCriterion("created_at is not null");
return (Criteria) this;
}
public Criteria andCreatedAtEqualTo(Long value) {
addCriterion("created_at =", value, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtNotEqualTo(Long value) {
addCriterion("created_at <>", value, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtGreaterThan(Long value) {
addCriterion("created_at >", value, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtGreaterThanOrEqualTo(Long value) {
addCriterion("created_at >=", value, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtLessThan(Long value) {
addCriterion("created_at <", value, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtLessThanOrEqualTo(Long value) {
addCriterion("created_at <=", value, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtIn(List<Long> values) {
addCriterion("created_at in", values, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtNotIn(List<Long> values) {
addCriterion("created_at not in", values, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtBetween(Long value1, Long value2) {
addCriterion("created_at between", value1, value2, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtNotBetween(Long value1, Long value2) {
addCriterion("created_at not between", value1, value2, "createdAt");
return (Criteria) this;
}
public Criteria andUpdatedAtIsNull() {
addCriterion("updated_at is null");
return (Criteria) this;
}
public Criteria andUpdatedAtIsNotNull() {
addCriterion("updated_at is not null");
return (Criteria) this;
}
public Criteria andUpdatedAtEqualTo(Long value) {
addCriterion("updated_at =", value, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtNotEqualTo(Long value) {
addCriterion("updated_at <>", value, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtGreaterThan(Long value) {
addCriterion("updated_at >", value, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtGreaterThanOrEqualTo(Long value) {
addCriterion("updated_at >=", value, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtLessThan(Long value) {
addCriterion("updated_at <", value, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtLessThanOrEqualTo(Long value) {
addCriterion("updated_at <=", value, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtIn(List<Long> values) {
addCriterion("updated_at in", values, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtNotIn(List<Long> values) {
addCriterion("updated_at not in", values, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtBetween(Long value1, Long value2) {
addCriterion("updated_at between", value1, value2, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtNotBetween(Long value1, Long value2) {
addCriterion("updated_at not between", value1, value2, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedByIsNull() {
addCriterion("updated_by is null");
return (Criteria) this;
}
public Criteria andUpdatedByIsNotNull() {
addCriterion("updated_by is not null");
return (Criteria) this;
}
public Criteria andUpdatedByEqualTo(Long value) {
addCriterion("updated_by =", value, "updatedBy");
return (Criteria) this;
}
public Criteria andUpdatedByNotEqualTo(Long value) {
addCriterion("updated_by <>", value, "updatedBy");
return (Criteria) this;
}
public Criteria andUpdatedByGreaterThan(Long value) {
addCriterion("updated_by >", value, "updatedBy");
return (Criteria) this;
}
public Criteria andUpdatedByGreaterThanOrEqualTo(Long value) {
addCriterion("updated_by >=", value, "updatedBy");
return (Criteria) this;
}
public Criteria andUpdatedByLessThan(Long value) {
addCriterion("updated_by <", value, "updatedBy");
return (Criteria) this;
}
public Criteria andUpdatedByLessThanOrEqualTo(Long value) {
addCriterion("updated_by <=", value, "updatedBy");
return (Criteria) this;
}
public Criteria andUpdatedByIn(List<Long> values) {
addCriterion("updated_by in", values, "updatedBy");
return (Criteria) this;
}
public Criteria andUpdatedByNotIn(List<Long> values) {
addCriterion("updated_by not in", values, "updatedBy");
return (Criteria) this;
}
public Criteria andUpdatedByBetween(Long value1, Long value2) {
addCriterion("updated_by between", value1, value2, "updatedBy");
return (Criteria) this;
}
public Criteria andUpdatedByNotBetween(Long value1, Long value2) {
addCriterion("updated_by not between", value1, value2, "updatedBy");
return (Criteria) this;
}
}
/**
* This class was generated by MyBatis Generator.
* This class corresponds to the database table dashboard_level_role_object
*
* @mbg.generated do_not_delete_during_merge
*/
public static class Criteria extends GeneratedCriteria {
protected Criteria() {
super();
}
}
/**
* This class was generated by MyBatis Generator.
* This class corresponds to the database table dashboard_level_role_object
*
* @mbg.generated
*/
public static class Criterion {
private String condition;
private Object value;
private Object secondValue;
private boolean noValue;
private boolean singleValue;
private boolean betweenValue;
private boolean listValue;
private String typeHandler;
public String getCondition() {
return condition;
}
public Object getValue() {
return value;
}
public Object getSecondValue() {
return secondValue;
}
public boolean isNoValue() {
return noValue;
}
public boolean isSingleValue() {
return singleValue;
}
public boolean isBetweenValue() {
return betweenValue;
}
public boolean isListValue() {
return listValue;
}
public String getTypeHandler() {
return typeHandler;
}
protected Criterion(String condition) {
super();
this.condition = condition;
this.typeHandler = null;
this.noValue = true;
}
protected Criterion(String condition, Object value, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.typeHandler = typeHandler;
if (value instanceof List<?>) {
this.listValue = true;
} else {
this.singleValue = true;
}
}
protected Criterion(String condition, Object value) {
this(condition, value, null);
}
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.secondValue = secondValue;
this.typeHandler = typeHandler;
this.betweenValue = true;
}
protected Criterion(String condition, Object value, Object secondValue) {
this(condition, value, secondValue, null);
}
}
}

Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save