Browse Source

初始化

national_dev
Bill 2 years ago
parent
commit
419058c22f
  1. 30
      .gitignore
  2. 4
      code/smart-community/README.md
  3. 565
      code/smart-community/db/mysql.sql
  4. 27
      code/smart-community/epmet-admin/epmet-admin-client/pom.xml
  5. 21
      code/smart-community/epmet-admin/epmet-admin-client/src/main/java/com/epmet/dto/ComplementLogOperationDTO.java
  6. 24
      code/smart-community/epmet-admin/epmet-admin-client/src/main/java/com/epmet/dto/MenuResourceDTO.java
  7. 46
      code/smart-community/epmet-admin/epmet-admin-client/src/main/java/com/epmet/dto/NewsDTO.java
  8. 36
      code/smart-community/epmet-admin/epmet-admin-client/src/main/java/com/epmet/dto/PasswordDTO.java
  9. 97
      code/smart-community/epmet-admin/epmet-admin-client/src/main/java/com/epmet/dto/SysDeptDTO.java
  10. 57
      code/smart-community/epmet-admin/epmet-admin-client/src/main/java/com/epmet/dto/SysDictDataDTO.java
  11. 53
      code/smart-community/epmet-admin/epmet-admin-client/src/main/java/com/epmet/dto/SysDictTypeDTO.java
  12. 37
      code/smart-community/epmet-admin/epmet-admin-client/src/main/java/com/epmet/dto/SysLogErrorDTO.java
  13. 40
      code/smart-community/epmet-admin/epmet-admin-client/src/main/java/com/epmet/dto/SysLogLoginDTO.java
  14. 51
      code/smart-community/epmet-admin/epmet-admin-client/src/main/java/com/epmet/dto/SysLogOperationDTO.java
  15. 144
      code/smart-community/epmet-admin/epmet-admin-client/src/main/java/com/epmet/dto/SysMenuDTO.java
  16. 32
      code/smart-community/epmet-admin/epmet-admin-client/src/main/java/com/epmet/dto/SysMonitorLogDTO.java
  17. 51
      code/smart-community/epmet-admin/epmet-admin-client/src/main/java/com/epmet/dto/SysParamsDTO.java
  18. 51
      code/smart-community/epmet-admin/epmet-admin-client/src/main/java/com/epmet/dto/SysRegionDTO.java
  19. 50
      code/smart-community/epmet-admin/epmet-admin-client/src/main/java/com/epmet/dto/SysRoleDTO.java
  20. 80
      code/smart-community/epmet-admin/epmet-admin-client/src/main/java/com/epmet/dto/SysUserDTO.java
  21. 37
      code/smart-community/epmet-admin/epmet-admin-client/src/main/java/com/epmet/dto/form/CorsConfigFormDTO.java
  22. 38
      code/smart-community/epmet-admin/epmet-admin-client/src/main/java/com/epmet/dto/form/LogOperationListFormDTO.java
  23. 53
      code/smart-community/epmet-admin/epmet-admin-client/src/main/java/com/epmet/dto/region/LogOperationResultDTO.java
  24. 31
      code/smart-community/epmet-admin/epmet-admin-client/src/main/java/com/epmet/dto/region/Region.java
  25. 27
      code/smart-community/epmet-admin/epmet-admin-client/src/main/java/com/epmet/dto/region/RegionCity.java
  26. 27
      code/smart-community/epmet-admin/epmet-admin-client/src/main/java/com/epmet/dto/region/RegionProvince.java
  27. 27
      code/smart-community/epmet-admin/epmet-admin-client/src/main/java/com/epmet/dto/result/CorsConfigResultDTO.java
  28. 44
      code/smart-community/epmet-admin/epmet-admin-client/src/main/java/com/epmet/enums/LogOperationTypeEnum.java
  29. 36
      code/smart-community/epmet-admin/epmet-admin-client/src/main/java/com/epmet/enums/MenuFlagEnum.java
  30. 36
      code/smart-community/epmet-admin/epmet-admin-client/src/main/java/com/epmet/enums/MenuTypeEnum.java
  31. 29
      code/smart-community/epmet-admin/epmet-admin-client/src/main/java/com/epmet/enums/RegionLeafEnum.java
  32. 30
      code/smart-community/epmet-admin/epmet-admin-client/src/main/java/com/epmet/enums/RegionLevelEnum.java
  33. 30
      code/smart-community/epmet-admin/epmet-admin-client/src/main/java/com/epmet/enums/UserStatusEnum.java
  34. 117
      code/smart-community/epmet-admin/epmet-admin-client/src/main/java/com/epmet/feign/EpmetAdminOpenFeignClient.java
  35. 44
      code/smart-community/epmet-admin/epmet-admin-client/src/main/java/com/epmet/feign/ParamsFeignClient.java
  36. 80
      code/smart-community/epmet-admin/epmet-admin-client/src/main/java/com/epmet/feign/fallback/EpmetAdminOpenFeignClientFallback.java
  37. 20
      code/smart-community/epmet-admin/epmet-admin-client/src/main/java/com/epmet/feign/fallback/EpmetAdminOpenFeignClientFallbackFactory.java
  38. 32
      code/smart-community/epmet-admin/epmet-admin-client/src/main/java/com/epmet/feign/fallback/ParamsFeignClientFallback.java
  39. 57
      code/smart-community/epmet-admin/epmet-admin-client/src/main/java/com/epmet/remote/ParamsRemoteService.java
  40. 11
      code/smart-community/epmet-admin/epmet-admin-server/Dockerfile
  41. 23
      code/smart-community/epmet-admin/epmet-admin-server/deploy/docker-compose-dev.yml
  42. 23
      code/smart-community/epmet-admin/epmet-admin-server/deploy/docker-compose-prod.yml
  43. 23
      code/smart-community/epmet-admin/epmet-admin-server/deploy/docker-compose-test.yml
  44. 301
      code/smart-community/epmet-admin/epmet-admin-server/pom.xml
  45. 34
      code/smart-community/epmet-admin/epmet-admin-server/src/main/java/com/epmet/AdminApplication.java
  46. 40
      code/smart-community/epmet-admin/epmet-admin-server/src/main/java/com/epmet/aspect/RequestLogAspect.java
  47. 26
      code/smart-community/epmet-admin/epmet-admin-server/src/main/java/com/epmet/config/ModuleConfigImpl.java
  48. 161
      code/smart-community/epmet-admin/epmet-admin-server/src/main/java/com/epmet/config/NacosServiceListListenerRegisterer.java
  49. 70
      code/smart-community/epmet-admin/epmet-admin-server/src/main/java/com/epmet/controller/CorsConfigController.java
  50. 73
      code/smart-community/epmet-admin/epmet-admin-server/src/main/java/com/epmet/controller/LogOperationController.java
  51. 81
      code/smart-community/epmet-admin/epmet-admin-server/src/main/java/com/epmet/controller/NewsController.java
  52. 80
      code/smart-community/epmet-admin/epmet-admin-server/src/main/java/com/epmet/controller/SysDeptController.java
  53. 193
      code/smart-community/epmet-admin/epmet-admin-server/src/main/java/com/epmet/controller/SysDictDataController.java
  54. 89
      code/smart-community/epmet-admin/epmet-admin-server/src/main/java/com/epmet/controller/SysDictTypeController.java
  55. 54
      code/smart-community/epmet-admin/epmet-admin-server/src/main/java/com/epmet/controller/SysLogErrorController.java
  56. 54
      code/smart-community/epmet-admin/epmet-admin-server/src/main/java/com/epmet/controller/SysLogLoginController.java
  57. 54
      code/smart-community/epmet-admin/epmet-admin-server/src/main/java/com/epmet/controller/SysLogOperationController.java
  58. 116
      code/smart-community/epmet-admin/epmet-admin-server/src/main/java/com/epmet/controller/SysMenuController.java
  59. 44
      code/smart-community/epmet-admin/epmet-admin-server/src/main/java/com/epmet/controller/SysMonitorLogController.java
  60. 112
      code/smart-community/epmet-admin/epmet-admin-server/src/main/java/com/epmet/controller/SysParamsController.java
  61. 102
      code/smart-community/epmet-admin/epmet-admin-server/src/main/java/com/epmet/controller/SysRegionController.java
  62. 39
      code/smart-community/epmet-admin/epmet-admin-server/src/main/java/com/epmet/controller/SysResourceController.java
  63. 115
      code/smart-community/epmet-admin/epmet-admin-server/src/main/java/com/epmet/controller/SysRoleController.java
  64. 180
      code/smart-community/epmet-admin/epmet-admin-server/src/main/java/com/epmet/controller/SysUserController.java
  65. 33
      code/smart-community/epmet-admin/epmet-admin-server/src/main/java/com/epmet/dao/CorsConfigDao.java
  66. 50
      code/smart-community/epmet-admin/epmet-admin-server/src/main/java/com/epmet/dao/LogOperationDao.java
  67. 28
      code/smart-community/epmet-admin/epmet-admin-server/src/main/java/com/epmet/dao/NewsDao.java
  68. 41
      code/smart-community/epmet-admin/epmet-admin-server/src/main/java/com/epmet/dao/SysDeptDao.java
  69. 39
      code/smart-community/epmet-admin/epmet-admin-server/src/main/java/com/epmet/dao/SysDictDataDao.java
  70. 31
      code/smart-community/epmet-admin/epmet-admin-server/src/main/java/com/epmet/dao/SysDictTypeDao.java
  71. 27
      code/smart-community/epmet-admin/epmet-admin-server/src/main/java/com/epmet/dao/SysLanguageDao.java
  72. 24
      code/smart-community/epmet-admin/epmet-admin-server/src/main/java/com/epmet/dao/SysLogErrorDao.java
  73. 24
      code/smart-community/epmet-admin/epmet-admin-server/src/main/java/com/epmet/dao/SysLogLoginDao.java
  74. 24
      code/smart-community/epmet-admin/epmet-admin-server/src/main/java/com/epmet/dao/SysLogOperationDao.java
  75. 52
      code/smart-community/epmet-admin/epmet-admin-server/src/main/java/com/epmet/dao/SysMenuDao.java
  76. 46
      code/smart-community/epmet-admin/epmet-admin-server/src/main/java/com/epmet/dao/SysParamsDao.java
  77. 28
      code/smart-community/epmet-admin/epmet-admin-server/src/main/java/com/epmet/dao/SysRegionDao.java
  78. 48
      code/smart-community/epmet-admin/epmet-admin-server/src/main/java/com/epmet/dao/SysResourceDao.java
  79. 24
      code/smart-community/epmet-admin/epmet-admin-server/src/main/java/com/epmet/dao/SysRoleDao.java
  80. 41
      code/smart-community/epmet-admin/epmet-admin-server/src/main/java/com/epmet/dao/SysRoleDataScopeDao.java
  81. 42
      code/smart-community/epmet-admin/epmet-admin-server/src/main/java/com/epmet/dao/SysRoleMenuDao.java
  82. 45
      code/smart-community/epmet-admin/epmet-admin-server/src/main/java/com/epmet/dao/SysRoleUserDao.java
  83. 41
      code/smart-community/epmet-admin/epmet-admin-server/src/main/java/com/epmet/dao/SysUserDao.java
  84. 53
      code/smart-community/epmet-admin/epmet-admin-server/src/main/java/com/epmet/entity/CorsConfigEntity.java
  85. 25
      code/smart-community/epmet-admin/epmet-admin-server/src/main/java/com/epmet/entity/DictData.java
  86. 28
      code/smart-community/epmet-admin/epmet-admin-server/src/main/java/com/epmet/entity/DictType.java
  87. 90
      code/smart-community/epmet-admin/epmet-admin-server/src/main/java/com/epmet/entity/LogOperationEntity.java
  88. 58
      code/smart-community/epmet-admin/epmet-admin-server/src/main/java/com/epmet/entity/NewsEntity.java
  89. 70
      code/smart-community/epmet-admin/epmet-admin-server/src/main/java/com/epmet/entity/SysDeptEntity.java
  90. 54
      code/smart-community/epmet-admin/epmet-admin-server/src/main/java/com/epmet/entity/SysDictDataEntity.java
  91. 47
      code/smart-community/epmet-admin/epmet-admin-server/src/main/java/com/epmet/entity/SysDictTypeEntity.java
  92. 49
      code/smart-community/epmet-admin/epmet-admin-server/src/main/java/com/epmet/entity/SysLanguageEntity.java
  93. 71
      code/smart-community/epmet-admin/epmet-admin-server/src/main/java/com/epmet/entity/SysLogErrorEntity.java
  94. 63
      code/smart-community/epmet-admin/epmet-admin-server/src/main/java/com/epmet/entity/SysLogLoginEntity.java
  95. 82
      code/smart-community/epmet-admin/epmet-admin-server/src/main/java/com/epmet/entity/SysLogOperationEntity.java
  96. 83
      code/smart-community/epmet-admin/epmet-admin-server/src/main/java/com/epmet/entity/SysMenuEntity.java
  97. 64
      code/smart-community/epmet-admin/epmet-admin-server/src/main/java/com/epmet/entity/SysParamsEntity.java
  98. 77
      code/smart-community/epmet-admin/epmet-admin-server/src/main/java/com/epmet/entity/SysRegionEntity.java
  99. 67
      code/smart-community/epmet-admin/epmet-admin-server/src/main/java/com/epmet/entity/SysResourceEntity.java
  100. 40
      code/smart-community/epmet-admin/epmet-admin-server/src/main/java/com/epmet/entity/SysRoleDataScopeEntity.java

30
.gitignore

@ -0,0 +1,30 @@
# Created by .ignore support plugin (hsz.mobi)
### Java template
# Compiled class file
*.class
# Log file
*.log
# BlueJ files
*.ctxt
# Mobile Tools for Java (J2ME)
.mtj.tmp/
# Package Files #
*.jar
*.war
*.nar
*.ear
*.zip
*.tar.gz
*.rar
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*
.idea/
*.iml
target/
.DS_Store

4
code/smart-community/README.md

@ -0,0 +1,4 @@
## epmet-cloud
党群e事通后端服务相关代码库

565
code/smart-community/db/mysql.sql

@ -0,0 +1,565 @@
create table sys_user
(
id bigint not null comment 'id',
username varchar(50) comment '用户名',
password varchar(100) comment '密码',
real_name varchar(50) comment '姓名',
head_url varchar(200) comment '头像',
gender tinyint(4) unsigned comment '性别 0:男 1:女 2:保密',
email varchar(100) comment '邮箱',
mobile varchar(20) comment '手机号',
dept_id bigint comment '部门ID',
super_admin tinyint unsigned comment '超级管理员 0:否 1:是',
status tinyint(4) unsigned comment '状态 0:停用 1:正常',
remark varchar(200) comment '备注',
del_flag tinyint(4) unsigned comment '删除标识 0:未删除 1:删除',
creator bigint comment '创建者',
create_date datetime comment '创建时间',
updater bigint comment '更新者',
update_date datetime comment '更新时间',
primary key (id),
unique key uk_username (username),
key idx_del_flag (del_flag),
key idx_create_date (create_date)
) ENGINE=InnoDB DEFAULT CHARACTER SET utf8mb4 COMMENT='用户管理';
create table sys_dept
(
id bigint not null comment 'id',
pid bigint comment '上级ID',
pids varchar(500) comment '所有上级ID,用逗号分开',
name varchar(50) comment '部门名称',
sort int unsigned comment '排序',
del_flag tinyint(4) unsigned comment '删除标识 0:未删除 1:删除',
creator bigint comment '创建者',
create_date datetime comment '创建时间',
updater bigint comment '更新者',
update_date datetime comment '更新时间',
primary key (id),
key idx_pid (pid),
key idx_del_flag (del_flag),
key idx_create_date (create_date)
) ENGINE=InnoDB DEFAULT CHARACTER SET utf8mb4 COMMENT='部门管理';
create table sys_menu
(
id bigint not null comment 'id',
pid bigint comment '上级ID,一级菜单为0',
url varchar(200) comment '菜单URL',
type tinyint unsigned comment '类型 0:菜单 1:按钮',
icon varchar(50) comment '菜单图标',
permissions varchar(32) comment '权限标识,如:sys:menu:save',
sort int(11) comment '排序',
del_flag tinyint(4) unsigned comment '删除标识 0:未删除 1:删除',
creator bigint comment '创建者',
create_date datetime comment '创建时间',
updater bigint comment '更新者',
update_date datetime comment '更新时间',
primary key (id),
key idx_pid (pid),
key idx_del_flag (del_flag),
key idx_create_date (create_date)
) ENGINE=InnoDB DEFAULT CHARACTER SET utf8mb4 COMMENT='菜单管理';
create table sys_resource
(
id bigint not null comment 'id',
resource_code varchar(32) comment '资源编码,如菜单ID',
resource_name varchar(32) comment '资源名称',
resource_url varchar(100) comment '资源URL',
resource_method varchar(8) comment '请求方式(如:GET、POST、PUT、DELETE)',
menu_flag tinyint unsigned comment '菜单标识 0:非菜单资源 1:菜单资源',
auth_level tinyint unsigned comment '认证等级 0:权限认证 1:登录认证 2:无需认证',
creator bigint comment '创建者',
create_date datetime comment '创建时间',
updater bigint comment '更新者',
update_date datetime comment '更新时间',
primary key (id),
key idx_resource_code (resource_code),
key idx_create_date (create_date)
) ENGINE=InnoDB DEFAULT CHARACTER SET utf8mb4 COMMENT='资源管理';
create table sys_role
(
id bigint not null comment 'id',
name varchar(32) comment '角色名称',
remark varchar(100) comment '备注',
del_flag tinyint(4) unsigned comment '删除标识 0:未删除 1:删除',
dept_id bigint comment '部门ID',
creator bigint comment '创建者',
create_date datetime comment '创建时间',
updater bigint comment '更新者',
update_date datetime comment '更新时间',
primary key (id),
key idx_dept_id (dept_id),
key idx_del_flag (del_flag),
key idx_create_date (create_date)
) ENGINE=InnoDB DEFAULT CHARACTER SET utf8mb4 COMMENT='角色管理';
create table sys_role_user
(
id bigint not null comment 'id',
role_id bigint comment '角色ID',
user_id bigint comment '用户ID',
creator bigint comment '创建者',
create_date datetime comment '创建时间',
primary key (id),
key idx_role_id (role_id),
key idx_user_id (user_id)
) ENGINE=InnoDB DEFAULT CHARACTER SET utf8mb4 COMMENT='角色用户关系';
create table sys_role_menu
(
id bigint not null comment 'id',
role_id bigint comment '角色ID',
menu_id bigint comment '菜单ID',
creator bigint comment '创建者',
create_date datetime comment '创建时间',
primary key (id),
key idx_role_id (role_id),
key idx_menu_id (menu_id)
) ENGINE=InnoDB DEFAULT CHARACTER SET utf8mb4 COMMENT='角色菜单关系';
create table sys_role_data_scope
(
id bigint not null comment 'id',
role_id bigint comment '角色ID',
dept_id bigint comment '部门ID',
creator bigint comment '创建者',
create_date datetime comment '创建时间',
primary key (id),
key idx_role_id (role_id)
) ENGINE=InnoDB DEFAULT CHARACTER SET utf8mb4 COMMENT='角色数据权限';
-- 字典类型
create table sys_dict_type
(
id bigint NOT NULL COMMENT 'id',
dict_type varchar(100) NOT NULL COMMENT '字典类型',
dict_name varchar(255) NOT NULL COMMENT '字典名称',
remark varchar(255) COMMENT '备注',
sort int unsigned COMMENT '排序',
creator bigint COMMENT '创建者',
create_date datetime COMMENT '创建时间',
updater bigint COMMENT '更新者',
update_date datetime COMMENT '更新时间',
primary key (id),
UNIQUE KEY(dict_type)
) ENGINE=InnoDB DEFAULT CHARACTER SET utf8mb4 COMMENT='字典类型';
-- 字典数据
create table sys_dict_data
(
id bigint NOT NULL COMMENT 'id',
dict_type_id bigint NOT NULL COMMENT '字典类型ID',
dict_label varchar(255) NOT NULL COMMENT '字典标签',
dict_value varchar(255) COMMENT '字典值',
remark varchar(255) COMMENT '备注',
sort int unsigned COMMENT '排序',
creator bigint COMMENT '创建者',
create_date datetime COMMENT '创建时间',
updater bigint COMMENT '更新者',
update_date datetime COMMENT '更新时间',
primary key (id),
unique key uk_dict_type_value (dict_type_id, dict_value),
key idx_sort (sort)
)ENGINE=InnoDB DEFAULT CHARACTER SET utf8mb4 COMMENT='字典数据';
-- 行政区域
CREATE TABLE sys_region (
id bigint NOT NULL COMMENT 'id',
pid bigint COMMENT '上级ID,一级为0',
name varchar(100) COMMENT '名称',
tree_level tinyint COMMENT '层级',
leaf tinyint COMMENT '是否叶子节点 0:否 1:是',
sort bigint COMMENT '排序',
creator bigint COMMENT '创建者',
create_date datetime COMMENT '创建时间',
updater bigint COMMENT '更新者',
update_date datetime COMMENT '更新时间',
PRIMARY KEY (id)
) ENGINE=InnoDB DEFAULT CHARACTER SET utf8mb4 COMMENT='行政区域';
create table sys_params
(
id bigint not null comment 'id',
param_code varchar(32) comment '参数编码',
param_value varchar(2000) comment '参数值',
param_type tinyint(4) unsigned default 1 comment '类型 0:系统参数 1:非系统参数',
remark varchar(200) comment '备注',
del_flag tinyint(4) unsigned comment '删除标识 0:未删除 1:删除',
creator bigint comment '创建者',
create_date datetime comment '创建时间',
updater bigint comment '更新者',
update_date datetime comment '更新时间',
primary key (id),
unique key uk_param_code (param_code),
key idx_del_flag (del_flag),
key idx_create_date (create_date)
) ENGINE=InnoDB DEFAULT CHARACTER SET utf8mb4 COMMENT='参数管理';
create table sys_log_login
(
id bigint not null comment 'id',
operation tinyint unsigned comment '用户操作 0:用户登录 1:用户退出',
status tinyint unsigned not null comment '状态 0:失败 1:成功 2:账号已锁定',
user_agent varchar(500) comment '用户代理',
ip varchar(160) comment '操作IP',
creator_name varchar(50) comment '用户名',
creator bigint comment '创建者',
create_date datetime comment '创建时间',
primary key (id),
key idx_status (status),
key idx_create_date (create_date)
) ENGINE=InnoDB DEFAULT CHARACTER SET utf8mb4 COMMENT='登录日志';
create table sys_log_operation
(
id bigint not null comment 'id',
module varchar(32) comment '模块名称,如:sys',
operation varchar(50) comment '用户操作',
request_uri varchar(200) comment '请求URI',
request_method varchar(20) comment '请求方式',
request_params text comment '请求参数',
request_time int unsigned not null comment '请求时长(毫秒)',
user_agent varchar(500) comment '用户代理',
ip varchar(160) comment '操作IP',
status tinyint(4) unsigned not null comment '状态 0:失败 1:成功',
creator_name varchar(50) comment '用户名',
creator bigint comment '创建者',
create_date datetime comment '创建时间',
primary key (id),
key idx_module (module),
key idx_create_date (create_date)
) ENGINE=InnoDB DEFAULT CHARACTER SET utf8mb4 COMMENT='操作日志';
create table sys_log_error
(
id bigint not null comment 'id',
module varchar(50) comment '模块名称,如:sys',
request_uri varchar(200) comment '请求URI',
request_method varchar(20) comment '请求方式',
request_params text comment '请求参数',
user_agent varchar(500) comment '用户代理',
ip varchar(160) comment '操作IP',
error_info text comment '异常信息',
creator bigint comment '创建者',
create_date datetime comment '创建时间',
primary key (id),
key idx_module (module),
key idx_create_date (create_date)
) ENGINE=InnoDB DEFAULT CHARACTER SET utf8mb4 COMMENT='异常日志';
CREATE TABLE sys_language (
table_name varchar(32) NOT NULL COMMENT '表名',
table_id bigint NOT NULL COMMENT '表主键',
field_name varchar(32) NOT NULL COMMENT '字段名',
field_value varchar(200) NOT NULL COMMENT '字段值',
language varchar(10) NOT NULL COMMENT '语言',
primary key (table_name, table_id, field_name, language),
key idx_table_id (table_id)
) ENGINE=InnoDB DEFAULT CHARACTER SET utf8mb4 COMMENT='国际化';
-- 新闻管理
CREATE TABLE tb_news (
id bigint NOT NULL COMMENT 'id',
title varchar(255) NOT NULL COMMENT '标题',
content mediumtext NOT NULL COMMENT '内容',
pub_date datetime COMMENT '发布时间',
dept_id bigint COMMENT '创建者dept_id',
creator bigint COMMENT '创建者',
create_date datetime COMMENT '创建时间',
updater bigint COMMENT '更新者',
update_date datetime COMMENT '更新时间',
PRIMARY KEY (id)
) ENGINE=InnoDB DEFAULT CHARACTER SET utf8mb4 COMMENT='新闻管理';
INSERT INTO sys_user(id, username, password, real_name, head_url, gender, email, mobile, dept_id, super_admin, status, remark, del_flag, creator, create_date, updater, update_date) VALUES (1067246875800000001, 'admin', '$2a$10$012Kx2ba5jzqr9gLlG4MX.bnQJTD9UWqF57XDo2N3.fPtLne02u/m', '超级管理员', NULL, 1, 'root@renren.io', '13512345678', NULL, 1, 1, NULL, 0, NULL, now(), NULL, now());
INSERT INTO sys_menu(id, pid, url, type, icon, permissions, sort, del_flag, creator, create_date, updater, update_date) VALUES (1067246875800000002, 0, '', 0, 'icon-lock', '', 0, 0, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_menu(id, pid, url, type, icon, permissions, sort, del_flag, creator, create_date, updater, update_date) VALUES (1067246875800000003, 1067246875800000002, 'sys/user', 0, 'icon-user', '', 0, 0, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_menu(id, pid, url, type, icon, permissions, sort, del_flag, creator, create_date, updater, update_date) VALUES (1067246875800000004, 1067246875800000003, '', 1, '', 'sys:user:view', 0, 0, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_menu(id, pid, url, type, icon, permissions, sort, del_flag, creator, create_date, updater, update_date) VALUES (1067246875800000005, 1067246875800000003, '', 1, '', 'sys:user:save', 1, 0, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_menu(id, pid, url, type, icon, permissions, sort, del_flag, creator, create_date, updater, update_date) VALUES (1067246875800000006, 1067246875800000003, '', 1, '', 'sys:user:update', 2, 0, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_menu(id, pid, url, type, icon, permissions, sort, del_flag, creator, create_date, updater, update_date) VALUES (1067246875800000007, 1067246875800000003, '', 1, '', 'sys:user:delete', 3, 0, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_menu(id, pid, url, type, icon, permissions, sort, del_flag, creator, create_date, updater, update_date) VALUES (1067246875800000008, 1067246875800000003, '', 1, '', 'sys:user:export', 4, 0, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_menu(id, pid, url, type, icon, permissions, sort, del_flag, creator, create_date, updater, update_date) VALUES (1067246875800000009, 1067246875800000002, 'sys/dept', 0, 'icon-apartment', '', 1, 0, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_menu(id, pid, url, type, icon, permissions, sort, del_flag, creator, create_date, updater, update_date) VALUES (1067246875800000010, 1067246875800000009, '', 1, '', 'sys:dept:view', 0, 0, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_menu(id, pid, url, type, icon, permissions, sort, del_flag, creator, create_date, updater, update_date) VALUES (1067246875800000011, 1067246875800000009, '', 1, '', 'sys:dept:save', 1, 0, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_menu(id, pid, url, type, icon, permissions, sort, del_flag, creator, create_date, updater, update_date) VALUES (1067246875800000012, 1067246875800000009, '', 1, '', 'sys:dept:update', 2, 0, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_menu(id, pid, url, type, icon, permissions, sort, del_flag, creator, create_date, updater, update_date) VALUES (1067246875800000013, 1067246875800000009, '', 1, '', 'sys:dept:delete', 3, 0, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_menu(id, pid, url, type, icon, permissions, sort, del_flag, creator, create_date, updater, update_date) VALUES (1067246875800000014, 1067246875800000002, 'sys/role', 0, 'icon-team', '', 2, 0, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_menu(id, pid, url, type, icon, permissions, sort, del_flag, creator, create_date, updater, update_date) VALUES (1067246875800000015, 1067246875800000014, '', 1, '', 'sys:role:view', 0, 0, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_menu(id, pid, url, type, icon, permissions, sort, del_flag, creator, create_date, updater, update_date) VALUES (1067246875800000016, 1067246875800000014, '', 1, '', 'sys:role:save', 1, 0, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_menu(id, pid, url, type, icon, permissions, sort, del_flag, creator, create_date, updater, update_date) VALUES (1067246875800000017, 1067246875800000014, '', 1, '', 'sys:role:update', 2, 0, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_menu(id, pid, url, type, icon, permissions, sort, del_flag, creator, create_date, updater, update_date) VALUES (1067246875800000018, 1067246875800000014, '', 1, '', 'sys:role:delete', 3, 0, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_menu(id, pid, url, type, icon, permissions, sort, del_flag, creator, create_date, updater, update_date) VALUES (1067246875800000019, 0, '', 0, 'icon-setting', NULL, 1, 0, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_menu(id, pid, url, type, icon, permissions, sort, del_flag, creator, create_date, updater, update_date) VALUES (1067246875800000020, 1067246875800000019, 'sys/menu', 0, 'icon-unorderedlist', NULL, 0, 0, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_menu(id, pid, url, type, icon, permissions, sort, del_flag, creator, create_date, updater, update_date) VALUES (1067246875800000021, 1067246875800000020, NULL, 1, NULL, 'sys:menu:view', 0, 0, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_menu(id, pid, url, type, icon, permissions, sort, del_flag, creator, create_date, updater, update_date) VALUES (1067246875800000022, 1067246875800000020, NULL, 1, NULL, 'sys:menu:save', 1, 0, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_menu(id, pid, url, type, icon, permissions, sort, del_flag, creator, create_date, updater, update_date) VALUES (1067246875800000023, 1067246875800000020, NULL, 1, NULL, 'sys:menu:update', 2, 0, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_menu(id, pid, url, type, icon, permissions, sort, del_flag, creator, create_date, updater, update_date) VALUES (1067246875800000024, 1067246875800000020, NULL, 1, NULL, 'sys:menu:delete', 3, 0, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_menu(id, pid, url, type, icon, permissions, sort, del_flag, creator, create_date, updater, update_date) VALUES (1067246875800000025, 1067246875800000019, 'sys/params', 0, 'icon-fileprotect', '', 1, 0, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_menu(id, pid, url, type, icon, permissions, sort, del_flag, creator, create_date, updater, update_date) VALUES (1067246875800000026, 1067246875800000025, NULL, 1, NULL, 'sys:params:view', 0, 0, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_menu(id, pid, url, type, icon, permissions, sort, del_flag, creator, create_date, updater, update_date) VALUES (1067246875800000027, 1067246875800000025, NULL, 1, NULL, 'sys:params:save', 1, 0, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_menu(id, pid, url, type, icon, permissions, sort, del_flag, creator, create_date, updater, update_date) VALUES (1067246875800000028, 1067246875800000025, NULL, 1, NULL, 'sys:params:update', 2, 0, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_menu(id, pid, url, type, icon, permissions, sort, del_flag, creator, create_date, updater, update_date) VALUES (1067246875800000029, 1067246875800000025, NULL, 1, NULL, 'sys:params:delete', 3, 0, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_menu(id, pid, url, type, icon, permissions, sort, del_flag, creator, create_date, updater, update_date) VALUES (1067246875800000030, 1067246875800000025, '', 1, NULL, 'sys:params:export', 4, 0, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_menu(id, pid, url, type, icon, permissions, sort, del_flag, creator, create_date, updater, update_date) VALUES (1067246875800000031, 1067246875800000019, 'sys/dict-type', 0, 'icon-gold', '', 2, 0, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_menu(id, pid, url, type, icon, permissions, sort, del_flag, creator, create_date, updater, update_date) VALUES (1067246875800000032, 1067246875800000031, '', 1, '', 'sys:dict:view', 0, 0, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_menu(id, pid, url, type, icon, permissions, sort, del_flag, creator, create_date, updater, update_date) VALUES (1067246875800000033, 1067246875800000031, '', 1, '', 'sys:dict:save', 1, 0, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_menu(id, pid, url, type, icon, permissions, sort, del_flag, creator, create_date, updater, update_date) VALUES (1067246875800000034, 1067246875800000031, '', 1, '', 'sys:dict:update', 2, 0, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_menu(id, pid, url, type, icon, permissions, sort, del_flag, creator, create_date, updater, update_date) VALUES (1067246875800000035, 1067246875800000031, '', 1, '', 'sys:dict:delete', 3, 0, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_menu(id, pid, url, type, icon, permissions, sort, del_flag, creator, create_date, updater, update_date) VALUES (1067246875800000036, 0, '', 0, 'icon-container', '', 4, 0, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_menu(id, pid, url, type, icon, permissions, sort, del_flag, creator, create_date, updater, update_date) VALUES (1067246875800000037, 1067246875800000036, 'sys/log-login', 0, 'icon-filedone', '', 0, 0, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_menu(id, pid, url, type, icon, permissions, sort, del_flag, creator, create_date, updater, update_date) VALUES (1067246875800000038, 1067246875800000036, 'sys/log-operation', 0, 'icon-solution', '', 1, 0, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_menu(id, pid, url, type, icon, permissions, sort, del_flag, creator, create_date, updater, update_date) VALUES (1067246875800000039, 1067246875800000036, 'sys/log-error', 0, 'icon-file-exception', '', 2, 0, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_menu(id, pid, url, type, icon, permissions, sort, del_flag, creator, create_date, updater, update_date) VALUES (1067246875800000040, 0, '', 0, 'icon-desktop', '', 5, 0, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_menu(id, pid, url, type, icon, permissions, sort, del_flag, creator, create_date, updater, update_date) VALUES (1067246875800000041, 1067246875800000040, '{{ window.SITE_CONFIG["apiURL"] }}/monitor', 0, 'icon-medicinebox', '', 0, 0, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_menu(id, pid, url, type, icon, permissions, sort, del_flag, creator, create_date, updater, update_date) VALUES (1067246875800000042, 1067246875800000040, '{{ window.SITE_CONFIG["apiURL"] }}/swagger-ui.html', 0, 'icon-file-word', '', 1, 0, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_menu(id, pid, url, type, icon, permissions, sort, del_flag, creator, create_date, updater, update_date) VALUES (1164489061834969089, 1067246875800000019, 'sys/region', 0, 'icon-location', '0', 3, 0, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_menu(id, pid, url, type, icon, permissions, sort, del_flag, creator, create_date, updater, update_date) VALUES (1164492214366130178, 1164489061834969089, '', 1, '', 'sys:region:view', 0, 0, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_menu(id, pid, url, type, icon, permissions, sort, del_flag, creator, create_date, updater, update_date) VALUES (1164492872829915138, 1164489061834969089, '', 1, '', 'sys:region:save', 1, 0, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_menu(id, pid, url, type, icon, permissions, sort, del_flag, creator, create_date, updater, update_date) VALUES (1164493252347318273, 1164489061834969089, '', 1, '', 'sys:region:update', 2, 0, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_menu(id, pid, url, type, icon, permissions, sort, del_flag, creator, create_date, updater, update_date) VALUES (1164493391254278145, 1164489061834969089, '', 1, '', 'sys:region:delete', 3, 0, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_menu(id, pid, url, type, icon, permissions, sort, del_flag, creator, create_date, updater, update_date) VALUES (1176372255559024642, 0, '', 0, 'icon-windows', '', 999, 0, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_menu(id, pid, url, type, icon, permissions, sort, del_flag, creator, create_date, updater, update_date) VALUES (1206460008292216834, 1176372255559024642, 'sys/news', 0, 'icon-file-word', '', 0, 0, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_language(table_name, table_id, field_name, field_value, language) VALUES ('sys_menu', 1067246875800000002, 'name', '权限管理', 'zh-CN');
INSERT INTO sys_language(table_name, table_id, field_name, field_value, language) VALUES ('sys_menu', 1067246875800000002, 'name', '權限管理', 'zh-TW');
INSERT INTO sys_language(table_name, table_id, field_name, field_value, language) VALUES ('sys_menu', 1067246875800000002, 'name', 'Authority Management', 'en-US');
INSERT INTO sys_language(table_name, table_id, field_name, field_value, language) VALUES ('sys_menu', 1067246875800000003, 'name', '用户管理', 'zh-CN');
INSERT INTO sys_language(table_name, table_id, field_name, field_value, language) VALUES ('sys_menu', 1067246875800000003, 'name', '用戶管理', 'zh-TW');
INSERT INTO sys_language(table_name, table_id, field_name, field_value, language) VALUES ('sys_menu', 1067246875800000003, 'name', 'User Management', 'en-US');
INSERT INTO sys_language(table_name, table_id, field_name, field_value, language) VALUES ('sys_menu', 1067246875800000004, 'name', 'View', 'en-US');
INSERT INTO sys_language(table_name, table_id, field_name, field_value, language) VALUES ('sys_menu', 1067246875800000004, 'name', '查看', 'zh-CN');
INSERT INTO sys_language(table_name, table_id, field_name, field_value, language) VALUES ('sys_menu', 1067246875800000004, 'name', '查看', 'zh-TW');
INSERT INTO sys_language(table_name, table_id, field_name, field_value, language) VALUES ('sys_menu', 1067246875800000005, 'name', 'Add', 'en-US');
INSERT INTO sys_language(table_name, table_id, field_name, field_value, language) VALUES ('sys_menu', 1067246875800000005, 'name', '新增', 'zh-CN');
INSERT INTO sys_language(table_name, table_id, field_name, field_value, language) VALUES ('sys_menu', 1067246875800000005, 'name', '新增', 'zh-TW');
INSERT INTO sys_language(table_name, table_id, field_name, field_value, language) VALUES ('sys_menu', 1067246875800000006, 'name', 'Edit', 'en-US');
INSERT INTO sys_language(table_name, table_id, field_name, field_value, language) VALUES ('sys_menu', 1067246875800000006, 'name', '修改', 'zh-CN');
INSERT INTO sys_language(table_name, table_id, field_name, field_value, language) VALUES ('sys_menu', 1067246875800000006, 'name', '修改', 'zh-TW');
INSERT INTO sys_language(table_name, table_id, field_name, field_value, language) VALUES ('sys_menu', 1067246875800000007, 'name', 'Delete', 'en-US');
INSERT INTO sys_language(table_name, table_id, field_name, field_value, language) VALUES ('sys_menu', 1067246875800000007, 'name', '删除', 'zh-CN');
INSERT INTO sys_language(table_name, table_id, field_name, field_value, language) VALUES ('sys_menu', 1067246875800000007, 'name', '刪除', 'zh-TW');
INSERT INTO sys_language(table_name, table_id, field_name, field_value, language) VALUES ('sys_menu', 1067246875800000008, 'name', 'Export', 'en-US');
INSERT INTO sys_language(table_name, table_id, field_name, field_value, language) VALUES ('sys_menu', 1067246875800000008, 'name', '导出', 'zh-CN');
INSERT INTO sys_language(table_name, table_id, field_name, field_value, language) VALUES ('sys_menu', 1067246875800000008, 'name', '導出', 'zh-TW');
INSERT INTO sys_language(table_name, table_id, field_name, field_value, language) VALUES ('sys_menu', 1067246875800000009, 'name', 'Department Management', 'en-US');
INSERT INTO sys_language(table_name, table_id, field_name, field_value, language) VALUES ('sys_menu', 1067246875800000009, 'name', '部门管理', 'zh-CN');
INSERT INTO sys_language(table_name, table_id, field_name, field_value, language) VALUES ('sys_menu', 1067246875800000009, 'name', '部門管理', 'zh-TW');
INSERT INTO sys_language(table_name, table_id, field_name, field_value, language) VALUES ('sys_menu', 1067246875800000010, 'name', 'View', 'en-US');
INSERT INTO sys_language(table_name, table_id, field_name, field_value, language) VALUES ('sys_menu', 1067246875800000010, 'name', '查看', 'zh-CN');
INSERT INTO sys_language(table_name, table_id, field_name, field_value, language) VALUES ('sys_menu', 1067246875800000010, 'name', '查看', 'zh-TW');
INSERT INTO sys_language(table_name, table_id, field_name, field_value, language) VALUES ('sys_menu', 1067246875800000011, 'name', 'Add', 'en-US');
INSERT INTO sys_language(table_name, table_id, field_name, field_value, language) VALUES ('sys_menu', 1067246875800000011, 'name', '新增', 'zh-CN');
INSERT INTO sys_language(table_name, table_id, field_name, field_value, language) VALUES ('sys_menu', 1067246875800000011, 'name', '新增', 'zh-TW');
INSERT INTO sys_language(table_name, table_id, field_name, field_value, language) VALUES ('sys_menu', 1067246875800000012, 'name', 'Edit', 'en-US');
INSERT INTO sys_language(table_name, table_id, field_name, field_value, language) VALUES ('sys_menu', 1067246875800000012, 'name', '修改', 'zh-CN');
INSERT INTO sys_language(table_name, table_id, field_name, field_value, language) VALUES ('sys_menu', 1067246875800000012, 'name', '修改', 'zh-TW');
INSERT INTO sys_language(table_name, table_id, field_name, field_value, language) VALUES ('sys_menu', 1067246875800000013, 'name', 'Delete', 'en-US');
INSERT INTO sys_language(table_name, table_id, field_name, field_value, language) VALUES ('sys_menu', 1067246875800000013, 'name', '删除', 'zh-CN');
INSERT INTO sys_language(table_name, table_id, field_name, field_value, language) VALUES ('sys_menu', 1067246875800000013, 'name', '刪除', 'zh-TW');
INSERT INTO sys_language(table_name, table_id, field_name, field_value, language) VALUES ('sys_menu', 1067246875800000014, 'name', 'Role Management', 'en-US');
INSERT INTO sys_language(table_name, table_id, field_name, field_value, language) VALUES ('sys_menu', 1067246875800000014, 'name', '角色管理', 'zh-CN');
INSERT INTO sys_language(table_name, table_id, field_name, field_value, language) VALUES ('sys_menu', 1067246875800000014, 'name', '角色管理', 'zh-TW');
INSERT INTO sys_language(table_name, table_id, field_name, field_value, language) VALUES ('sys_menu', 1067246875800000015, 'name', 'View', 'en-US');
INSERT INTO sys_language(table_name, table_id, field_name, field_value, language) VALUES ('sys_menu', 1067246875800000015, 'name', '查看', 'zh-CN');
INSERT INTO sys_language(table_name, table_id, field_name, field_value, language) VALUES ('sys_menu', 1067246875800000015, 'name', '查看', 'zh-TW');
INSERT INTO sys_language(table_name, table_id, field_name, field_value, language) VALUES ('sys_menu', 1067246875800000016, 'name', 'Add', 'en-US');
INSERT INTO sys_language(table_name, table_id, field_name, field_value, language) VALUES ('sys_menu', 1067246875800000016, 'name', '新增', 'zh-CN');
INSERT INTO sys_language(table_name, table_id, field_name, field_value, language) VALUES ('sys_menu', 1067246875800000016, 'name', '新增', 'zh-TW');
INSERT INTO sys_language(table_name, table_id, field_name, field_value, language) VALUES ('sys_menu', 1067246875800000017, 'name', 'Edit', 'en-US');
INSERT INTO sys_language(table_name, table_id, field_name, field_value, language) VALUES ('sys_menu', 1067246875800000017, 'name', '修改', 'zh-CN');
INSERT INTO sys_language(table_name, table_id, field_name, field_value, language) VALUES ('sys_menu', 1067246875800000017, 'name', '修改', 'zh-TW');
INSERT INTO sys_language(table_name, table_id, field_name, field_value, language) VALUES ('sys_menu', 1067246875800000018, 'name', 'Delete', 'en-US');
INSERT INTO sys_language(table_name, table_id, field_name, field_value, language) VALUES ('sys_menu', 1067246875800000018, 'name', '删除', 'zh-CN');
INSERT INTO sys_language(table_name, table_id, field_name, field_value, language) VALUES ('sys_menu', 1067246875800000018, 'name', '刪除', 'zh-TW');
INSERT INTO sys_language(table_name, table_id, field_name, field_value, language) VALUES ('sys_menu', 1067246875800000019, 'name', 'Setting', 'en-US');
INSERT INTO sys_language(table_name, table_id, field_name, field_value, language) VALUES ('sys_menu', 1067246875800000019, 'name', '系统设置', 'zh-CN');
INSERT INTO sys_language(table_name, table_id, field_name, field_value, language) VALUES ('sys_menu', 1067246875800000019, 'name', '系統設置', 'zh-TW');
INSERT INTO sys_language(table_name, table_id, field_name, field_value, language) VALUES ('sys_menu', 1067246875800000020, 'name', 'Menu Management', 'en-US');
INSERT INTO sys_language(table_name, table_id, field_name, field_value, language) VALUES ('sys_menu', 1067246875800000020, 'name', '菜单管理', 'zh-CN');
INSERT INTO sys_language(table_name, table_id, field_name, field_value, language) VALUES ('sys_menu', 1067246875800000020, 'name', '菜單管理', 'zh-TW');
INSERT INTO sys_language(table_name, table_id, field_name, field_value, language) VALUES ('sys_menu', 1067246875800000021, 'name', 'View', 'en-US');
INSERT INTO sys_language(table_name, table_id, field_name, field_value, language) VALUES ('sys_menu', 1067246875800000021, 'name', '查看', 'zh-CN');
INSERT INTO sys_language(table_name, table_id, field_name, field_value, language) VALUES ('sys_menu', 1067246875800000021, 'name', '查看', 'zh-TW');
INSERT INTO sys_language(table_name, table_id, field_name, field_value, language) VALUES ('sys_menu', 1067246875800000022, 'name', 'Add', 'en-US');
INSERT INTO sys_language(table_name, table_id, field_name, field_value, language) VALUES ('sys_menu', 1067246875800000022, 'name', '新增', 'zh-CN');
INSERT INTO sys_language(table_name, table_id, field_name, field_value, language) VALUES ('sys_menu', 1067246875800000022, 'name', '新增', 'zh-TW');
INSERT INTO sys_language(table_name, table_id, field_name, field_value, language) VALUES ('sys_menu', 1067246875800000023, 'name', 'Edit', 'en-US');
INSERT INTO sys_language(table_name, table_id, field_name, field_value, language) VALUES ('sys_menu', 1067246875800000023, 'name', '修改', 'zh-CN');
INSERT INTO sys_language(table_name, table_id, field_name, field_value, language) VALUES ('sys_menu', 1067246875800000023, 'name', '修改', 'zh-TW');
INSERT INTO sys_language(table_name, table_id, field_name, field_value, language) VALUES ('sys_menu', 1067246875800000024, 'name', 'Delete', 'en-US');
INSERT INTO sys_language(table_name, table_id, field_name, field_value, language) VALUES ('sys_menu', 1067246875800000024, 'name', '删除', 'zh-CN');
INSERT INTO sys_language(table_name, table_id, field_name, field_value, language) VALUES ('sys_menu', 1067246875800000024, 'name', '刪除', 'zh-TW');
INSERT INTO sys_language(table_name, table_id, field_name, field_value, language) VALUES ('sys_menu', 1067246875800000025, 'name', 'Parameter Management', 'en-US');
INSERT INTO sys_language(table_name, table_id, field_name, field_value, language) VALUES ('sys_menu', 1067246875800000025, 'name', '参数管理', 'zh-CN');
INSERT INTO sys_language(table_name, table_id, field_name, field_value, language) VALUES ('sys_menu', 1067246875800000025, 'name', '參數管理', 'zh-TW');
INSERT INTO sys_language(table_name, table_id, field_name, field_value, language) VALUES ('sys_menu', 1067246875800000026, 'name', 'View', 'en-US');
INSERT INTO sys_language(table_name, table_id, field_name, field_value, language) VALUES ('sys_menu', 1067246875800000026, 'name', '查看', 'zh-CN');
INSERT INTO sys_language(table_name, table_id, field_name, field_value, language) VALUES ('sys_menu', 1067246875800000026, 'name', '查看', 'zh-TW');
INSERT INTO sys_language(table_name, table_id, field_name, field_value, language) VALUES ('sys_menu', 1067246875800000027, 'name', 'Add', 'en-US');
INSERT INTO sys_language(table_name, table_id, field_name, field_value, language) VALUES ('sys_menu', 1067246875800000027, 'name', '新增', 'zh-CN');
INSERT INTO sys_language(table_name, table_id, field_name, field_value, language) VALUES ('sys_menu', 1067246875800000027, 'name', '新增', 'zh-TW');
INSERT INTO sys_language(table_name, table_id, field_name, field_value, language) VALUES ('sys_menu', 1067246875800000028, 'name', 'Edit', 'en-US');
INSERT INTO sys_language(table_name, table_id, field_name, field_value, language) VALUES ('sys_menu', 1067246875800000028, 'name', '修改', 'zh-CN');
INSERT INTO sys_language(table_name, table_id, field_name, field_value, language) VALUES ('sys_menu', 1067246875800000028, 'name', '修改', 'zh-TW');
INSERT INTO sys_language(table_name, table_id, field_name, field_value, language) VALUES ('sys_menu', 1067246875800000029, 'name', 'Delete', 'en-US');
INSERT INTO sys_language(table_name, table_id, field_name, field_value, language) VALUES ('sys_menu', 1067246875800000029, 'name', '删除', 'zh-CN');
INSERT INTO sys_language(table_name, table_id, field_name, field_value, language) VALUES ('sys_menu', 1067246875800000029, 'name', '刪除', 'zh-TW');
INSERT INTO sys_language(table_name, table_id, field_name, field_value, language) VALUES ('sys_menu', 1067246875800000030, 'name', 'Export', 'en-US');
INSERT INTO sys_language(table_name, table_id, field_name, field_value, language) VALUES ('sys_menu', 1067246875800000030, 'name', '导出', 'zh-CN');
INSERT INTO sys_language(table_name, table_id, field_name, field_value, language) VALUES ('sys_menu', 1067246875800000030, 'name', '導出', 'zh-TW');
INSERT INTO sys_language(table_name, table_id, field_name, field_value, language) VALUES ('sys_menu', 1067246875800000031, 'name', 'Dict Management', 'en-US');
INSERT INTO sys_language(table_name, table_id, field_name, field_value, language) VALUES ('sys_menu', 1067246875800000031, 'name', '字典管理', 'zh-CN');
INSERT INTO sys_language(table_name, table_id, field_name, field_value, language) VALUES ('sys_menu', 1067246875800000031, 'name', '字典管理', 'zh-TW');
INSERT INTO sys_language(table_name, table_id, field_name, field_value, language) VALUES ('sys_menu', 1067246875800000032, 'name', 'View', 'en-US');
INSERT INTO sys_language(table_name, table_id, field_name, field_value, language) VALUES ('sys_menu', 1067246875800000032, 'name', '查看', 'zh-CN');
INSERT INTO sys_language(table_name, table_id, field_name, field_value, language) VALUES ('sys_menu', 1067246875800000032, 'name', '查看', 'zh-TW');
INSERT INTO sys_language(table_name, table_id, field_name, field_value, language) VALUES ('sys_menu', 1067246875800000033, 'name', 'Add', 'en-US');
INSERT INTO sys_language(table_name, table_id, field_name, field_value, language) VALUES ('sys_menu', 1067246875800000033, 'name', '新增', 'zh-CN');
INSERT INTO sys_language(table_name, table_id, field_name, field_value, language) VALUES ('sys_menu', 1067246875800000033, 'name', '新增', 'zh-TW');
INSERT INTO sys_language(table_name, table_id, field_name, field_value, language) VALUES ('sys_menu', 1067246875800000034, 'name', 'Edit', 'en-US');
INSERT INTO sys_language(table_name, table_id, field_name, field_value, language) VALUES ('sys_menu', 1067246875800000034, 'name', '修改', 'zh-CN');
INSERT INTO sys_language(table_name, table_id, field_name, field_value, language) VALUES ('sys_menu', 1067246875800000034, 'name', '修改', 'zh-TW');
INSERT INTO sys_language(table_name, table_id, field_name, field_value, language) VALUES ('sys_menu', 1067246875800000035, 'name', 'Delete', 'en-US');
INSERT INTO sys_language(table_name, table_id, field_name, field_value, language) VALUES ('sys_menu', 1067246875800000035, 'name', '删除', 'zh-CN');
INSERT INTO sys_language(table_name, table_id, field_name, field_value, language) VALUES ('sys_menu', 1067246875800000035, 'name', '刪除', 'zh-TW');
INSERT INTO sys_language(table_name, table_id, field_name, field_value, language) VALUES ('sys_menu', 1067246875800000036, 'name', 'Log Management', 'en-US');
INSERT INTO sys_language(table_name, table_id, field_name, field_value, language) VALUES ('sys_menu', 1067246875800000036, 'name', '日志管理', 'zh-CN');
INSERT INTO sys_language(table_name, table_id, field_name, field_value, language) VALUES ('sys_menu', 1067246875800000036, 'name', '日誌管理', 'zh-TW');
INSERT INTO sys_language(table_name, table_id, field_name, field_value, language) VALUES ('sys_menu', 1067246875800000037, 'name', 'Login Log', 'en-US');
INSERT INTO sys_language(table_name, table_id, field_name, field_value, language) VALUES ('sys_menu', 1067246875800000037, 'name', '登录日志', 'zh-CN');
INSERT INTO sys_language(table_name, table_id, field_name, field_value, language) VALUES ('sys_menu', 1067246875800000037, 'name', '登錄日誌', 'zh-TW');
INSERT INTO sys_language(table_name, table_id, field_name, field_value, language) VALUES ('sys_menu', 1067246875800000038, 'name', 'Operation Log', 'en-US');
INSERT INTO sys_language(table_name, table_id, field_name, field_value, language) VALUES ('sys_menu', 1067246875800000038, 'name', '操作日志', 'zh-CN');
INSERT INTO sys_language(table_name, table_id, field_name, field_value, language) VALUES ('sys_menu', 1067246875800000038, 'name', '操作日誌', 'zh-TW');
INSERT INTO sys_language(table_name, table_id, field_name, field_value, language) VALUES ('sys_menu', 1067246875800000039, 'name', 'Error Log', 'en-US');
INSERT INTO sys_language(table_name, table_id, field_name, field_value, language) VALUES ('sys_menu', 1067246875800000039, 'name', '异常日志', 'zh-CN');
INSERT INTO sys_language(table_name, table_id, field_name, field_value, language) VALUES ('sys_menu', 1067246875800000039, 'name', '異常日誌', 'zh-TW');
INSERT INTO sys_language(table_name, table_id, field_name, field_value, language) VALUES ('sys_menu', 1067246875800000040, 'name', 'System Monitoring', 'en-US');
INSERT INTO sys_language(table_name, table_id, field_name, field_value, language) VALUES ('sys_menu', 1067246875800000040, 'name', '系统监控', 'zh-CN');
INSERT INTO sys_language(table_name, table_id, field_name, field_value, language) VALUES ('sys_menu', 1067246875800000040, 'name', '系統監控', 'zh-TW');
INSERT INTO sys_language(table_name, table_id, field_name, field_value, language) VALUES ('sys_menu', 1067246875800000041, 'name', 'Service Monitoring', 'en-US');
INSERT INTO sys_language(table_name, table_id, field_name, field_value, language) VALUES ('sys_menu', 1067246875800000041, 'name', '服务监控', 'zh-CN');
INSERT INTO sys_language(table_name, table_id, field_name, field_value, language) VALUES ('sys_menu', 1067246875800000041, 'name', '服務監控', 'zh-TW');
INSERT INTO sys_language(table_name, table_id, field_name, field_value, language) VALUES ('sys_menu', 1067246875800000042, 'name', 'Swagger Api', 'en-US');
INSERT INTO sys_language(table_name, table_id, field_name, field_value, language) VALUES ('sys_menu', 1067246875800000042, 'name', '接口文档', 'zh-CN');
INSERT INTO sys_language(table_name, table_id, field_name, field_value, language) VALUES ('sys_menu', 1067246875800000042, 'name', '接口文檔', 'zh-TW');
INSERT INTO sys_language(table_name, table_id, field_name, field_value, language) VALUES ('sys_menu', 1164489061834969089, 'name', 'Administrative Regions', 'en-US');
INSERT INTO sys_language(table_name, table_id, field_name, field_value, language) VALUES ('sys_menu', 1164489061834969089, 'name', '行政区域', 'zh-CN');
INSERT INTO sys_language(table_name, table_id, field_name, field_value, language) VALUES ('sys_menu', 1164489061834969089, 'name', '行政區域', 'zh-TW');
INSERT INTO sys_language(table_name, table_id, field_name, field_value, language) VALUES ('sys_menu', 1164492214366130178, 'name', 'View', 'en-US');
INSERT INTO sys_language(table_name, table_id, field_name, field_value, language) VALUES ('sys_menu', 1164492214366130178, 'name', '查看', 'zh-CN');
INSERT INTO sys_language(table_name, table_id, field_name, field_value, language) VALUES ('sys_menu', 1164492214366130178, 'name', '查看', 'zh-TW');
INSERT INTO sys_language(table_name, table_id, field_name, field_value, language) VALUES ('sys_menu', 1164492872829915138, 'name', 'Add', 'en-US');
INSERT INTO sys_language(table_name, table_id, field_name, field_value, language) VALUES ('sys_menu', 1164492872829915138, 'name', '新增', 'zh-CN');
INSERT INTO sys_language(table_name, table_id, field_name, field_value, language) VALUES ('sys_menu', 1164492872829915138, 'name', '新增', 'zh-TW');
INSERT INTO sys_language(table_name, table_id, field_name, field_value, language) VALUES ('sys_menu', 1164493252347318273, 'name', 'Edit', 'en-US');
INSERT INTO sys_language(table_name, table_id, field_name, field_value, language) VALUES ('sys_menu', 1164493252347318273, 'name', '修改', 'zh-CN');
INSERT INTO sys_language(table_name, table_id, field_name, field_value, language) VALUES ('sys_menu', 1164493252347318273, 'name', '修改', 'zh-TW');
INSERT INTO sys_language(table_name, table_id, field_name, field_value, language) VALUES ('sys_menu', 1164493391254278145, 'name', 'Delete', 'en-US');
INSERT INTO sys_language(table_name, table_id, field_name, field_value, language) VALUES ('sys_menu', 1164493391254278145, 'name', '删除', 'zh-CN');
INSERT INTO sys_language(table_name, table_id, field_name, field_value, language) VALUES ('sys_menu', 1164493391254278145, 'name', '刪除', 'zh-TW');
INSERT INTO sys_language(table_name, table_id, field_name, field_value, language) VALUES ('sys_menu', 1176372255559024642, 'name', 'Demo', 'en-US');
INSERT INTO sys_language(table_name, table_id, field_name, field_value, language) VALUES ('sys_menu', 1176372255559024642, 'name', '功能示例', 'zh-CN');
INSERT INTO sys_language(table_name, table_id, field_name, field_value, language) VALUES ('sys_menu', 1176372255559024642, 'name', '功能示例', 'zh-TW');
INSERT INTO sys_language(table_name, table_id, field_name, field_value, language) VALUES ('sys_menu', 1206460008292216834, 'name', 'News Management', 'en-US');
INSERT INTO sys_language(table_name, table_id, field_name, field_value, language) VALUES ('sys_menu', 1206460008292216834, 'name', '新闻管理', 'zh-CN');
INSERT INTO sys_language(table_name, table_id, field_name, field_value, language) VALUES ('sys_menu', 1206460008292216834, 'name', '新聞管理', 'zh-TW');
INSERT INTO sys_resource(id, resource_code, resource_name, resource_url, resource_method, menu_flag, auth_level, creator, create_date, updater, update_date) VALUES (1067246875800000073, 1067246875800000017, '修改', '/sys/menu/select', 'GET', 1, 0, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_resource(id, resource_code, resource_name, resource_url, resource_method, menu_flag, auth_level, creator, create_date, updater, update_date) VALUES (1067246875800000074, 'nav', '导航', '/sys/menu/nav', 'GET', 1, 1, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_resource(id, resource_code, resource_name, resource_url, resource_method, menu_flag, auth_level, creator, create_date, updater, update_date) VALUES (1067246875800000075, 1067246875800000037, '登录日志', '/sys/log/login/**', 'GET', 1, 0, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_resource(id, resource_code, resource_name, resource_url, resource_method, menu_flag, auth_level, creator, create_date, updater, update_date) VALUES (1067246875800000076, 1067246875800000005, '新增', '/sys/role/list', 'GET', 1, 0, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_resource(id, resource_code, resource_name, resource_url, resource_method, menu_flag, auth_level, creator, create_date, updater, update_date) VALUES (1067246875800000078, 1067246875800000026, '查看', '/sys/params/page', 'GET', 1, 0, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_resource(id, resource_code, resource_name, resource_url, resource_method, menu_flag, auth_level, creator, create_date, updater, update_date) VALUES (1067246875800000079, 1067246875800000005, '新增', '/sys/dept/list', 'GET', 1, 0, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_resource(id, resource_code, resource_name, resource_url, resource_method, menu_flag, auth_level, creator, create_date, updater, update_date) VALUES (1067246875800000080, 1067246875800000028, '修改', '/sys/params/{id}', 'GET', 1, 0, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_resource(id, resource_code, resource_name, resource_url, resource_method, menu_flag, auth_level, creator, create_date, updater, update_date) VALUES (1067246875800000081, 1067246875800000018, '删除', '/sys/role', 'DELETE', 1, 0, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_resource(id, resource_code, resource_name, resource_url, resource_method, menu_flag, auth_level, creator, create_date, updater, update_date) VALUES (1067246875800000082, 'user_info', '登录账号信息', '/sys/user/info', 'GET', 1, 1, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_resource(id, resource_code, resource_name, resource_url, resource_method, menu_flag, auth_level, creator, create_date, updater, update_date) VALUES (1067246875800000083, 1067246875800000022, '新增', '/sys/menu', 'POST', 1, 0, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_resource(id, resource_code, resource_name, resource_url, resource_method, menu_flag, auth_level, creator, create_date, updater, update_date) VALUES (1067246875800000084, 1067246875800000030, '导出', '/sys/params/export', 'GET', 1, 0, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_resource(id, resource_code, resource_name, resource_url, resource_method, menu_flag, auth_level, creator, create_date, updater, update_date) VALUES (1067246875800000085, 1067246875800000007, '删除', '/sys/user', 'DELETE', 1, 0, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_resource(id, resource_code, resource_name, resource_url, resource_method, menu_flag, auth_level, creator, create_date, updater, update_date) VALUES (1067246875800000087, 'permissions', '权限', '/sys/menu/permissions', 'GET', 1, 1, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_resource(id, resource_code, resource_name, resource_url, resource_method, menu_flag, auth_level, creator, create_date, updater, update_date) VALUES (1067246875800000088, 1067246875800000004, '查看', '/sys/user/page', 'GET', 1, 0, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_resource(id, resource_code, resource_name, resource_url, resource_method, menu_flag, auth_level, creator, create_date, updater, update_date) VALUES (1067246875800000089, 1067246875800000029, '删除', '/sys/params', 'DELETE', 1, 0, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_resource(id, resource_code, resource_name, resource_url, resource_method, menu_flag, auth_level, creator, create_date, updater, update_date) VALUES (1067246875800000090, 1067246875800000006, '修改', '/sys/user', 'PUT', 1, 0, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_resource(id, resource_code, resource_name, resource_url, resource_method, menu_flag, auth_level, creator, create_date, updater, update_date) VALUES (1067246875800000091, 1067246875800000011, '新增', '/sys/dept', 'POST', 1, 0, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_resource(id, resource_code, resource_name, resource_url, resource_method, menu_flag, auth_level, creator, create_date, updater, update_date) VALUES (1067246875800000092, 1067246875800000016, '新增', '/sys/dept/list', 'GET', 1, 0, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_resource(id, resource_code, resource_name, resource_url, resource_method, menu_flag, auth_level, creator, create_date, updater, update_date) VALUES (1067246875800000093, 1067246875800000016, '新增', '/sys/menu/select', 'GET', 1, 0, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_resource(id, resource_code, resource_name, resource_url, resource_method, menu_flag, auth_level, creator, create_date, updater, update_date) VALUES (1067246875800000094, 1067246875800000012, '修改', '/sys/dept', 'PUT', 1, 0, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_resource(id, resource_code, resource_name, resource_url, resource_method, menu_flag, auth_level, creator, create_date, updater, update_date) VALUES (1067246875800000095, 1067246875800000023, '修改', '/sys/menu', 'PUT', 1, 0, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_resource(id, resource_code, resource_name, resource_url, resource_method, menu_flag, auth_level, creator, create_date, updater, update_date) VALUES (1067246875800000097, 1067246875800000010, '查看', '/sys/dept/list', 'GET', 1, 0, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_resource(id, resource_code, resource_name, resource_url, resource_method, menu_flag, auth_level, creator, create_date, updater, update_date) VALUES (1067246875800000098, 1067246875800000006, '修改', '/sys/user/{id}', 'GET', 1, 0, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_resource(id, resource_code, resource_name, resource_url, resource_method, menu_flag, auth_level, creator, create_date, updater, update_date) VALUES (1067246875800000100, 1067246875800000005, '新增', '/sys/user', 'POST', 1, 0, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_resource(id, resource_code, resource_name, resource_url, resource_method, menu_flag, auth_level, creator, create_date, updater, update_date) VALUES (1067246875800000101, 1067246875800000017, '修改', '/sys/dept/list', 'GET', 1, 0, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_resource(id, resource_code, resource_name, resource_url, resource_method, menu_flag, auth_level, creator, create_date, updater, update_date) VALUES (1067246875800000102, 1067246875800000017, '修改', '/sys/role/{id}', 'GET', 1, 0, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_resource(id, resource_code, resource_name, resource_url, resource_method, menu_flag, auth_level, creator, create_date, updater, update_date) VALUES (1067246875800000103, 1067246875800000016, '新增', '/sys/role', 'POST', 1, 0, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_resource(id, resource_code, resource_name, resource_url, resource_method, menu_flag, auth_level, creator, create_date, updater, update_date) VALUES (1067246875800000104, 1067246875800000006, '修改', '/sys/dept/list', 'GET', 1, 0, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_resource(id, resource_code, resource_name, resource_url, resource_method, menu_flag, auth_level, creator, create_date, updater, update_date) VALUES (1067246875800000105, 1067246875800000023, '修改', '/sys/menu/{id}', 'GET', 1, 0, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_resource(id, resource_code, resource_name, resource_url, resource_method, menu_flag, auth_level, creator, create_date, updater, update_date) VALUES (1067246875800000106, 1067246875800000017, '修改', '/sys/role', 'PUT', 1, 0, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_resource(id, resource_code, resource_name, resource_url, resource_method, menu_flag, auth_level, creator, create_date, updater, update_date) VALUES (1067246875800000107, 1067246875800000021, '查看', '/sys/menu/list', 'GET', 1, 0, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_resource(id, resource_code, resource_name, resource_url, resource_method, menu_flag, auth_level, creator, create_date, updater, update_date) VALUES (1067246875800000108, 1067246875800000013, '删除', '/sys/dept/{id}', 'DELETE', 1, 0, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_resource(id, resource_code, resource_name, resource_url, resource_method, menu_flag, auth_level, creator, create_date, updater, update_date) VALUES (1067246875800000109, 1067246875800000028, '修改', '/sys/params/update', 'PUT', 1, 0, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_resource(id, resource_code, resource_name, resource_url, resource_method, menu_flag, auth_level, creator, create_date, updater, update_date) VALUES (1067246875800000111, 1067246875800000038, '操作日志', '/sys/log/operation/**', 'GET', 1, 0, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_resource(id, resource_code, resource_name, resource_url, resource_method, menu_flag, auth_level, creator, create_date, updater, update_date) VALUES (1067246875800000112, 1067246875800000008, '导出', '/sys/user/export', 'GET', 1, 0, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_resource(id, resource_code, resource_name, resource_url, resource_method, menu_flag, auth_level, creator, create_date, updater, update_date) VALUES (1067246875800000113, 1067246875800000015, '查看', '/sys/role/page', 'GET', 1, 0, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_resource(id, resource_code, resource_name, resource_url, resource_method, menu_flag, auth_level, creator, create_date, updater, update_date) VALUES (1067246875800000114, 1067246875800000024, '删除', '/sys/menu/{id}', 'DELETE', 1, 0, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_resource(id, resource_code, resource_name, resource_url, resource_method, menu_flag, auth_level, creator, create_date, updater, update_date) VALUES (1067246875800000115, 1067246875800000006, '修改', '/sys/role/list', 'GET', 1, 0, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_resource(id, resource_code, resource_name, resource_url, resource_method, menu_flag, auth_level, creator, create_date, updater, update_date) VALUES (1067246875800000116, 1067246875800000012, '修改', '/sys/dept/{id}', 'GET', 1, 0, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_resource(id, resource_code, resource_name, resource_url, resource_method, menu_flag, auth_level, creator, create_date, updater, update_date) VALUES (1067246875800000117, 1067246875800000039, '异常日志', '/sys/log/error/**', 'GET', 1, 0, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_resource(id, resource_code, resource_name, resource_url, resource_method, menu_flag, auth_level, creator, create_date, updater, update_date) VALUES (1067246875800000118, 1067246875800000027, '新增', '/sys/params', 'POST', 1, 0, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_resource(id, resource_code, resource_name, resource_url, resource_method, menu_flag, auth_level, creator, create_date, updater, update_date) VALUES (1164484970899591170, '1067246875800000032', '查看', '/sys/dict/type/list', 'GET', 1, 0, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_resource(id, resource_code, resource_name, resource_url, resource_method, menu_flag, auth_level, creator, create_date, updater, update_date) VALUES (1164484971033808897, '1067246875800000032', '查看', '/sys/dict/data/list', 'GET', 1, 0, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_resource(id, resource_code, resource_name, resource_url, resource_method, menu_flag, auth_level, creator, create_date, updater, update_date) VALUES (1164484971168026626, '1067246875800000032', '查看', '/sys/dict/type/page', 'GET', 1, 0, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_resource(id, resource_code, resource_name, resource_url, resource_method, menu_flag, auth_level, creator, create_date, updater, update_date) VALUES (1164484971306438658, '1067246875800000032', '查看', '/sys/dict/data/page', 'GET', 1, 0, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_resource(id, resource_code, resource_name, resource_url, resource_method, menu_flag, auth_level, creator, create_date, updater, update_date) VALUES (1164485074578591745, '1067246875800000033', '新增', '/sys/dict/type', 'POST', 1, 0, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_resource(id, resource_code, resource_name, resource_url, resource_method, menu_flag, auth_level, creator, create_date, updater, update_date) VALUES (1164485074884775938, '1067246875800000033', '新增', '/sys/dict/data', 'POST', 1, 0, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_resource(id, resource_code, resource_name, resource_url, resource_method, menu_flag, auth_level, creator, create_date, updater, update_date) VALUES (1164485377499615234, '1067246875800000034', '修改', '/sys/dict/type/{id}', 'GET', 1, 0, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_resource(id, resource_code, resource_name, resource_url, resource_method, menu_flag, auth_level, creator, create_date, updater, update_date) VALUES (1164485377658998785, '1067246875800000034', '修改', '/sys/dict/data/{id}', 'GET', 1, 0, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_resource(id, resource_code, resource_name, resource_url, resource_method, menu_flag, auth_level, creator, create_date, updater, update_date) VALUES (1164485377801605121, '1067246875800000034', '修改', '/sys/dict/type', 'PUT', 1, 0, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_resource(id, resource_code, resource_name, resource_url, resource_method, menu_flag, auth_level, creator, create_date, updater, update_date) VALUES (1164485377919045634, '1067246875800000034', '修改', '/sys/dict/data', 'PUT', 1, 0, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_resource(id, resource_code, resource_name, resource_url, resource_method, menu_flag, auth_level, creator, create_date, updater, update_date) VALUES (1164485451738796033, '1067246875800000035', '删除', '/sys/dict/type', 'DELETE', 1, 0, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_resource(id, resource_code, resource_name, resource_url, resource_method, menu_flag, auth_level, creator, create_date, updater, update_date) VALUES (1164485451873013762, '1067246875800000035', '删除', '/sys/dict/data', 'DELETE', 1, 0, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_resource(id, resource_code, resource_name, resource_url, resource_method, menu_flag, auth_level, creator, create_date, updater, update_date) VALUES (1164797969766023169, 'all_dict', '全部字典', '/sys/dict/type/all', 'GET', 1, 1, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_resource(id, resource_code, resource_name, resource_url, resource_method, menu_flag, auth_level, creator, create_date, updater, update_date) VALUES (1164492579039891457, '1164492214366130178', '查看', '/sys/region/list', 'GET', 1, 0, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_resource(id, resource_code, resource_name, resource_url, resource_method, menu_flag, auth_level, creator, create_date, updater, update_date) VALUES (1164492873219985409, '1164492872829915138', '新增', '/sys/region', 'POST', 1, 0, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_resource(id, resource_code, resource_name, resource_url, resource_method, menu_flag, auth_level, creator, create_date, updater, update_date) VALUES (1164493252758360066, '1164493252347318273', '修改', '/sys/region/{id}', 'GET', 1, 0, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_resource(id, resource_code, resource_name, resource_url, resource_method, menu_flag, auth_level, creator, create_date, updater, update_date) VALUES (1164493252884189186, '1164493252347318273', '修改', '/sys/region', 'PUT', 1, 0, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_resource(id, resource_code, resource_name, resource_url, resource_method, menu_flag, auth_level, creator, create_date, updater, update_date) VALUES (1164493391648542721, '1164493391254278145', '删除', '/sys/region/{id}', 'DELETE', 1, 0, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_resource(id, resource_code, resource_name, resource_url, resource_method, menu_flag, auth_level, creator, create_date, updater, update_date) VALUES (1203701983399669761, '1176372255559024642', '新闻管理', '/sys/demo', 'GET', 1, 1, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_resource(id, resource_code, resource_name, resource_url, resource_method, menu_flag, auth_level, creator, create_date, updater, update_date) VALUES (1203714104359473153, '1176372255559024642', '新闻管理', '/sys/demo/list', 'GET', 1, 0, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_resource(id, resource_code, resource_name, resource_url, resource_method, menu_flag, auth_level, creator, create_date, updater, update_date) VALUES (1203714169761177602, '1176372255559024642', '新闻管理', '/sys/demo', 'POST', 1, 0, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_resource(id, resource_code, resource_name, resource_url, resource_method, menu_flag, auth_level, creator, create_date, updater, update_date) VALUES (1203714551992320002, '1176372255559024642', '新闻管理', '/sys/demo/{id}', 'GET', 1, 0, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_resource(id, resource_code, resource_name, resource_url, resource_method, menu_flag, auth_level, creator, create_date, updater, update_date) VALUES (1203714594015051777, '1176372255559024642', '新闻管理', '/sys/demo', 'PUT', 1, 0, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_resource(id, resource_code, resource_name, resource_url, resource_method, menu_flag, auth_level, creator, create_date, updater, update_date) VALUES (1206450581342326785, '1176372255559024642', '新闻管理', '/sys/demo/{id}', 'DELETE', 1, 0, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_dept(id, pid, pids, name, sort, del_flag, creator, create_date, updater, update_date) VALUES (1067246875800000061, 1067246875800000062, '1067246875800000065,1067246875800000062', '技术部', 2, 0, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_dept(id, pid, pids, name, sort, del_flag, creator, create_date, updater, update_date) VALUES (1067246875800000062, 1067246875800000065, '1067246875800000065', '长沙分公司', 1, 0, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_dept(id, pid, pids, name, sort, del_flag, creator, create_date, updater, update_date) VALUES (1067246875800000063, 1067246875800000065, '1067246875800000065', '上海分公司', 0, 0, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_dept(id, pid, pids, name, sort, del_flag, creator, create_date, updater, update_date) VALUES (1067246875800000064, 1067246875800000063, '1067246875800000065,1067246875800000063', '市场部', 0, 0, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_dept(id, pid, pids, name, sort, del_flag, creator, create_date, updater, update_date) VALUES (1067246875800000065, 0, '0', '人人开源集团', 0, 0, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_dept(id, pid, pids, name, sort, del_flag, creator, create_date, updater, update_date) VALUES (1067246875800000066, 1067246875800000063, '1067246875800000065,1067246875800000063', '销售部', 0, 0, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_dept(id, pid, pids, name, sort, del_flag, creator, create_date, updater, update_date) VALUES (1067246875800000067, 1067246875800000062, '1067246875800000065,1067246875800000062', '产品部', 1, 0, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_dict_type(id, dict_type, dict_name, remark, sort, creator, create_date, updater, update_date) VALUES (1160061077912858625, 'gender', '性别', '', 0, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_dict_data(id, dict_type_id, dict_label, dict_value, remark, sort, creator, create_date, updater, update_date) VALUES (1160061112075464705, 1160061077912858625, '', '0', '', 0, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_dict_data(id, dict_type_id, dict_label, dict_value, remark, sort, creator, create_date, updater, update_date) VALUES (1160061146967879681, 1160061077912858625, '', '1', '', 1, 1067246875800000001, now(), 1067246875800000001, now());
INSERT INTO sys_dict_data(id, dict_type_id, dict_label, dict_value, remark, sort, creator, create_date, updater, update_date) VALUES (1160061190127267841, 1160061077912858625, '保密', '2', '', 2, 1067246875800000001, now(), 1067246875800000001, now());

27
code/smart-community/epmet-admin/epmet-admin-client/pom.xml

@ -0,0 +1,27 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.epmet</groupId>
<artifactId>epmet-admin</artifactId>
<version>2.0.0</version>
</parent>
<artifactId>epmet-admin-client</artifactId>
<packaging>jar</packaging>
<dependencies>
<dependency>
<groupId>com.epmet</groupId>
<artifactId>epmet-commons-tools</artifactId>
<version>2.0.0</version>
</dependency>
</dependencies>
<build>
<finalName>${project.artifactId}</finalName>
</build>
</project>

21
code/smart-community/epmet-admin/epmet-admin-client/src/main/java/com/epmet/dto/ComplementLogOperationDTO.java

@ -0,0 +1,21 @@
package com.epmet.dto;
import lombok.Data;
import java.io.Serializable;
/**
* @Author zxc
* @DateTime 2022/10/20 14:21
* @DESC
*/
@Data
public class ComplementLogOperationDTO implements Serializable {
private static final long serialVersionUID = 7563210356670229204L;
private String staffId;
private String orgId;
private String orgIdPath;
}

24
code/smart-community/epmet-admin/epmet-admin-client/src/main/java/com/epmet/dto/MenuResourceDTO.java

@ -0,0 +1,24 @@
/**
* Copyright (c) 2018 人人开源 All rights reserved.
*
* https://www.renren.io
*
* 版权所有侵权必究
*/
package com.epmet.dto;
import lombok.Data;
/**
* 菜单资源
*
* @author Mark sunlightcs@gmail.com
* @since 1.0.0
*/
@Data
public class MenuResourceDTO {
private String resourceUrl;
private String resourceMethod;
}

46
code/smart-community/epmet-admin/epmet-admin-client/src/main/java/com/epmet/dto/NewsDTO.java

@ -0,0 +1,46 @@
/**
* Copyright (c) 2018 人人开源 All rights reserved.
*
* https://www.renren.io
*
* 版权所有侵权必究
*/
package com.epmet.dto;
import com.epmet.commons.tools.validator.group.AddGroup;
import com.epmet.commons.tools.validator.group.DefaultGroup;
import com.epmet.commons.tools.validator.group.UpdateGroup;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Null;
import java.io.Serializable;
import java.util.Date;
/**
* 新闻管理
*
* @author Mark sunlightcs@gmail.com
*/
@Data
public class NewsDTO implements Serializable {
@Null(message="{id.null}", groups = AddGroup.class)
@NotNull(message="{id.require}", groups = UpdateGroup.class)
private Long id;
@NotBlank(message="{news.title.require}", groups = DefaultGroup.class)
private String title;
@NotBlank(message="{news.content.require}", groups = DefaultGroup.class)
private String content;
private Date pubDate;
@JsonProperty(access = JsonProperty.Access.READ_ONLY)
private Date createDate;
}

36
code/smart-community/epmet-admin/epmet-admin-client/src/main/java/com/epmet/dto/PasswordDTO.java

@ -0,0 +1,36 @@
/**
* Copyright (c) 2018 人人开源 All rights reserved.
*
* https://www.renren.io
*
* 版权所有侵权必究
*/
package com.epmet.dto;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
/**
* 修改密码
*
* @author Mark sunlightcs@gmail.com
* @since 1.0.0
*/
@Data
public class PasswordDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 旧密码
*/
private String oldPassword;
@NotBlank(message="{sysuser.password.require}")
private String password;
@NotBlank(message="{sysuser.password.require}")
private String newPassword;
}

97
code/smart-community/epmet-admin/epmet-admin-client/src/main/java/com/epmet/dto/SysDeptDTO.java

@ -0,0 +1,97 @@
/**
* Copyright (c) 2018 人人开源 All rights reserved.
*
* https://www.renren.io
*
* 版权所有侵权必究
*/
package com.epmet.dto;
import com.epmet.commons.tools.utils.TreeNode;
import com.epmet.commons.tools.validator.group.AddGroup;
import com.epmet.commons.tools.validator.group.DefaultGroup;
import com.epmet.commons.tools.validator.group.UpdateGroup;
import com.fasterxml.jackson.annotation.JsonProperty;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Null;
import java.io.Serializable;
import java.util.Date;
/**
* 部门管理
*
* @author Mark sunlightcs@gmail.com
* @since 1.0.0
*/
public class SysDeptDTO extends TreeNode implements Serializable {
private static final long serialVersionUID = 1L;
@Null(message="{id.null}", groups = AddGroup.class)
@NotNull(message="{id.require}", groups = UpdateGroup.class)
private Long id;
@NotNull(message="{sysdept.pid.require}", groups = DefaultGroup.class)
private Long pid;
@NotBlank(message="{sysdept.name.require}", groups = DefaultGroup.class)
private String name;
@Min(value = 0, message = "{sort.number}", groups = DefaultGroup.class)
private Integer sort;
@JsonProperty(access = JsonProperty.Access.READ_ONLY)
private Date createDate;
private String parentName;
public void setName(String name) {
this.name = name;
}
public String getName() {
return name;
}
public void setSort(Integer sort) {
this.sort = sort;
}
public Integer getSort() {
return sort;
}
public void setCreateDate(Date createDate) {
this.createDate = createDate;
}
public Date getCreateDate() {
return createDate;
}
public String getParentName() {
return parentName;
}
public void setParentName(String parentName) {
this.parentName = parentName;
}
@Override
public Long getId() {
return id;
}
@Override
public void setId(Long id) {
this.id = id;
}
@Override
public Long getPid() {
return pid;
}
@Override
public void setPid(Long pid) {
this.pid = pid;
}
}

57
code/smart-community/epmet-admin/epmet-admin-client/src/main/java/com/epmet/dto/SysDictDataDTO.java

@ -0,0 +1,57 @@
/**
* Copyright (c) 2018 人人开源 All rights reserved.
*
* https://www.renren.io
*
* 版权所有侵权必究
*/
package com.epmet.dto;
import com.epmet.commons.tools.validator.group.AddGroup;
import com.epmet.commons.tools.validator.group.DefaultGroup;
import com.epmet.commons.tools.validator.group.UpdateGroup;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Null;
import java.io.Serializable;
import java.util.Date;
/**
* 字典数据
*
* @author Mark sunlightcs@gmail.com
*/
@Data
public class SysDictDataDTO implements Serializable {
private static final long serialVersionUID = 1L;
@Null(message="{id.null}", groups = AddGroup.class)
@NotNull(message="{id.require}", groups = UpdateGroup.class)
private String id;
@NotNull(message="{sysdict.type.require}", groups = DefaultGroup.class)
private Long dictTypeId;
@NotBlank(message="{sysdict.label.require}", groups = DefaultGroup.class)
private String dictLabel;
private String dictValue;
private String dictPValue;
private String remark;
@Min(value = 0, message = "{sort.number}", groups = DefaultGroup.class)
private Integer sort;
@JsonProperty(access = JsonProperty.Access.READ_ONLY)
private Date createdTime;
@JsonProperty(access = JsonProperty.Access.READ_ONLY)
private Date updatedTime;
}

53
code/smart-community/epmet-admin/epmet-admin-client/src/main/java/com/epmet/dto/SysDictTypeDTO.java

@ -0,0 +1,53 @@
/**
* Copyright (c) 2018 人人开源 All rights reserved.
*
* https://www.renren.io
*
* 版权所有侵权必究
*/
package com.epmet.dto;
import com.epmet.commons.tools.validator.group.AddGroup;
import com.epmet.commons.tools.validator.group.DefaultGroup;
import com.epmet.commons.tools.validator.group.UpdateGroup;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Null;
import java.io.Serializable;
import java.util.Date;
/**
* 字典类型
*
* @author Mark sunlightcs@gmail.com
*/
@Data
public class SysDictTypeDTO implements Serializable {
private static final long serialVersionUID = 1L;
@Null(message="{id.null}", groups = AddGroup.class)
@NotNull(message="{id.require}", groups = UpdateGroup.class)
private String id;
@NotBlank(message="{sysdict.type.require}", groups = DefaultGroup.class)
private String dictType;
@NotBlank(message="{sysdict.name.require}", groups = DefaultGroup.class)
private String dictName;
private String remark;
@Min(value = 0, message = "{sort.number}", groups = DefaultGroup.class)
private Integer sort;
@JsonProperty(access = JsonProperty.Access.READ_ONLY)
private Date createdTime;
@JsonProperty(access = JsonProperty.Access.READ_ONLY)
private Date updatedTime;
}

37
code/smart-community/epmet-admin/epmet-admin-client/src/main/java/com/epmet/dto/SysLogErrorDTO.java

@ -0,0 +1,37 @@
/**
* Copyright (c) 2018 人人开源 All rights reserved.
*
* https://www.renren.io
*
* 版权所有侵权必究
*/
package com.epmet.dto;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* 异常日志
*
* @author Mark sunlightcs@gmail.com
* @since 1.0.0
*/
@Data
public class SysLogErrorDTO implements Serializable {
private static final long serialVersionUID = 1L;
private Long id;
private String module;
private String requestUri;
private String requestMethod;
private String requestParams;
private String userAgent;
private String ip;
private String errorInfo;
private Date createDate;
}

40
code/smart-community/epmet-admin/epmet-admin-client/src/main/java/com/epmet/dto/SysLogLoginDTO.java

@ -0,0 +1,40 @@
/**
* Copyright (c) 2018 人人开源 All rights reserved.
*
* https://www.renren.io
*
* 版权所有侵权必究
*/
package com.epmet.dto;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* 登录日志
*
* @author Mark sunlightcs@gmail.com
* @since 1.0.0
*/
@Data
public class SysLogLoginDTO implements Serializable {
private static final long serialVersionUID = 1L;
private Long id;
private Integer operation;
private Integer status;
private String userAgent;
private String ip;
private String creatorName;
private Date createDate;
}

51
code/smart-community/epmet-admin/epmet-admin-client/src/main/java/com/epmet/dto/SysLogOperationDTO.java

@ -0,0 +1,51 @@
/**
* Copyright (c) 2018 人人开源 All rights reserved.
*
* https://www.renren.io
*
* 版权所有侵权必究
*/
package com.epmet.dto;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* 操作日志
*
* @author Mark sunlightcs@gmail.com
* @since 1.0.0
*/
@Data
public class SysLogOperationDTO implements Serializable {
private static final long serialVersionUID = 1L;
private Long id;
private String module;
private String operation;
private String requestUri;
private String requestMethod;
private String requestParams;
private Integer requestTime;
private String userAgent;
private String ip;
private Integer status;
private String creatorName;
private Date createDate;
}

144
code/smart-community/epmet-admin/epmet-admin-client/src/main/java/com/epmet/dto/SysMenuDTO.java

@ -0,0 +1,144 @@
/**
* Copyright (c) 2018 人人开源 All rights reserved.
*
* https://www.renren.io
*
* 版权所有侵权必究
*/
package com.epmet.dto;
import com.epmet.commons.tools.utils.TreeNode;
import com.epmet.commons.tools.validator.group.AddGroup;
import com.epmet.commons.tools.validator.group.DefaultGroup;
import com.epmet.commons.tools.validator.group.UpdateGroup;
import com.fasterxml.jackson.annotation.JsonProperty;
import org.hibernate.validator.constraints.Range;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Null;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
/**
* 菜单管理
*
* @author Mark sunlightcs@gmail.com
* @since 1.0.0
*/
public class SysMenuDTO extends TreeNode<SysMenuDTO> implements Serializable {
private static final long serialVersionUID = 1L;
@Null(message="{id.null}", groups = AddGroup.class)
@NotNull(message="{id.require}", groups = UpdateGroup.class)
private Long id;
@NotNull(message="{sysmenu.pid.require}", groups = DefaultGroup.class)
private Long pid;
@NotBlank(message="{sysmenu.name.require}", groups = DefaultGroup.class)
private String name;
private String url;
@Range(min=0, max=1, message = "{sysmenu.type.range}", groups = DefaultGroup.class)
private Integer type;
private String icon;
private String permissions;
@Min(value = 0, message = "{sort.number}", groups = DefaultGroup.class)
private Integer sort;
@JsonProperty(access = JsonProperty.Access.READ_ONLY)
private Date createDate;
private List<MenuResourceDTO> resourceList;
private String parentName;
public void setName(String name) {
this.name = name;
}
public String getName() {
return name;
}
public void setUrl(String url) {
this.url = url;
}
public String getUrl() {
return url;
}
public void setType(Integer type) {
this.type = type;
}
public Integer getType() {
return type;
}
public void setIcon(String icon) {
this.icon = icon;
}
public String getIcon() {
return icon;
}
public void setSort(Integer sort) {
this.sort = sort;
}
public Integer getSort() {
return sort;
}
public void setCreateDate(Date createDate) {
this.createDate = createDate;
}
public Date getCreateDate() {
return createDate;
}
public String getPermissions() {
return permissions;
}
public void setPermissions(String permissions) {
this.permissions = permissions;
}
public List<MenuResourceDTO> getResourceList() {
return resourceList;
}
public void setResourceList(List<MenuResourceDTO> resourceList) {
this.resourceList = resourceList;
}
@Override
public Long getId() {
return id;
}
@Override
public void setId(Long id) {
this.id = id;
}
@Override
public Long getPid() {
return pid;
}
@Override
public void setPid(Long pid) {
this.pid = pid;
}
public String getParentName() {
return parentName;
}
public void setParentName(String parentName) {
this.parentName = parentName;
}
}

32
code/smart-community/epmet-admin/epmet-admin-client/src/main/java/com/epmet/dto/SysMonitorLogDTO.java

@ -0,0 +1,32 @@
/**
* Copyright (c) 2018 人人开源 All rights reserved.
*
* https://www.renren.io
*
* 版权所有侵权必究
*/
package com.epmet.dto;
import lombok.Data;
import java.io.Serializable;
/**
* 系统监控日志
*
* @author Mark sunlightcs@gmail.com
* @since 1.0.0
*/
@Data
public class SysMonitorLogDTO implements Serializable {
/**
* 访问路径
*/
private String path;
/**
* 耗时
*/
private Integer costTime;
}

51
code/smart-community/epmet-admin/epmet-admin-client/src/main/java/com/epmet/dto/SysParamsDTO.java

@ -0,0 +1,51 @@
/**
* Copyright (c) 2018 人人开源 All rights reserved.
*
* https://www.renren.io
*
* 版权所有侵权必究
*/
package com.epmet.dto;
import com.epmet.commons.tools.validator.group.AddGroup;
import com.epmet.commons.tools.validator.group.DefaultGroup;
import com.epmet.commons.tools.validator.group.UpdateGroup;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Null;
import java.io.Serializable;
import java.util.Date;
/**
* 参数管理
*
* @author Mark sunlightcs@gmail.com
* @since 1.0.0
*/
@Data
public class SysParamsDTO implements Serializable {
private static final long serialVersionUID = 1L;
@Null(message="{id.null}", groups = AddGroup.class)
@NotNull(message="{id.require}", groups = UpdateGroup.class)
private Long id;
@NotBlank(message="{sysparams.paramcode.require}", groups = DefaultGroup.class)
private String paramCode;
@NotBlank(message="{sysparams.paramvalue.require}", groups = DefaultGroup.class)
private String paramValue;
private String remark;
@JsonProperty(access = JsonProperty.Access.READ_ONLY)
private Date createDate;
@JsonProperty(access = JsonProperty.Access.READ_ONLY)
private Date updateDate;
}

51
code/smart-community/epmet-admin/epmet-admin-client/src/main/java/com/epmet/dto/SysRegionDTO.java

@ -0,0 +1,51 @@
/**
* Copyright (c) 2018 人人开源 All rights reserved.
*
* https://www.renren.io
*
* 版权所有侵权必究
*/
package com.epmet.dto;
import com.epmet.commons.tools.validator.group.DefaultGroup;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;
/**
* 行政区域
*
* @author Mark sunlightcs@gmail.com
*/
@Data
public class SysRegionDTO implements Serializable {
private static final long serialVersionUID = 1L;
@NotNull(message="{id.require}", groups = DefaultGroup.class)
private Long id;
@NotNull(message="{region.pid.require}", groups = DefaultGroup.class)
private Long pid;
@NotBlank(message="{region.name.require}", groups = DefaultGroup.class)
private String name;
@Min(value = 0, message = "{sort.number}", groups = DefaultGroup.class)
private Long sort;
private String parentName;
private Boolean hasChildren;
private Integer treeLevel;
@JsonProperty(access = JsonProperty.Access.READ_ONLY)
private Date updateDate;
}

50
code/smart-community/epmet-admin/epmet-admin-client/src/main/java/com/epmet/dto/SysRoleDTO.java

@ -0,0 +1,50 @@
/**
* Copyright (c) 2018 人人开源 All rights reserved.
*
* https://www.renren.io
*
* 版权所有侵权必究
*/
package com.epmet.dto;
import com.epmet.commons.tools.validator.group.AddGroup;
import com.epmet.commons.tools.validator.group.DefaultGroup;
import com.epmet.commons.tools.validator.group.UpdateGroup;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Null;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
/**
* 角色管理
*
* @author Mark sunlightcs@gmail.com
* @since 1.0.0
*/
@Data
public class SysRoleDTO implements Serializable {
private static final long serialVersionUID = 1L;
@Null(message="{id.null}", groups = AddGroup.class)
@NotNull(message="{id.require}", groups = UpdateGroup.class)
private Long id;
@NotBlank(message="{sysrole.name.require}", groups = DefaultGroup.class)
private String name;
private String remark;
@JsonProperty(access = JsonProperty.Access.READ_ONLY)
private Date createDate;
private List<Long> menuIdList;
private List<Long> deptIdList;
}

80
code/smart-community/epmet-admin/epmet-admin-client/src/main/java/com/epmet/dto/SysUserDTO.java

@ -0,0 +1,80 @@
/**
* Copyright (c) 2018 人人开源 All rights reserved.
*
* https://www.renren.io
*
* 版权所有侵权必究
*/
package com.epmet.dto;
import com.epmet.commons.tools.validator.group.AddGroup;
import com.epmet.commons.tools.validator.group.DefaultGroup;
import com.epmet.commons.tools.validator.group.UpdateGroup;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Range;
import javax.validation.constraints.Email;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Null;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
/**
* 用户管理
*
* @author Mark sunlightcs@gmail.com
* @since 1.0.0
*/
@Data
public class SysUserDTO implements Serializable {
private static final long serialVersionUID = 1L;
@Null(message="{id.null}", groups = AddGroup.class)
@NotNull(message="{id.require}", groups = UpdateGroup.class)
private Long id;
@NotBlank(message="{sysuser.username.require}", groups = DefaultGroup.class)
private String username;
@JsonProperty(access = JsonProperty.Access.WRITE_ONLY)
@NotBlank(message="{sysuser.password.require}", groups = AddGroup.class)
private String password;
@NotBlank(message="{sysuser.realname.require}", groups = DefaultGroup.class)
private String realName;
private String headUrl;
@Range(min=0, max=2, message = "{sysuser.gender.range}", groups = DefaultGroup.class)
private Integer gender;
@NotBlank(message="{sysuser.email.require}", groups = DefaultGroup.class)
@Email(message="{sysuser.email.error}", groups = DefaultGroup.class)
private String email;
@NotBlank(message="{sysuser.mobile.require}", groups = DefaultGroup.class)
private String mobile;
@NotNull(message="{sysuser.deptId.require}", groups = DefaultGroup.class)
private Long deptId;
@Range(min=0, max=1, message = "{sysuser.superadmin.range}", groups = DefaultGroup.class)
private Integer superAdmin;
@Range(min=0, max=1, message = "{sysuser.status.range}", groups = DefaultGroup.class)
private Integer status;
private String remark;
@JsonProperty(access = JsonProperty.Access.READ_ONLY)
private Date createDate;
private List<Long> roleIdList;
private String deptName;
}

37
code/smart-community/epmet-admin/epmet-admin-client/src/main/java/com/epmet/dto/form/CorsConfigFormDTO.java

@ -0,0 +1,37 @@
package com.epmet.dto.form;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import javax.validation.constraints.NotBlank;
@Data
@AllArgsConstructor
@NoArgsConstructor
public class CorsConfigFormDTO {
public interface Add {}
public interface Update {}
@NotBlank(message = "ID不能为空", groups = { Update.class })
private String id;
/**
* 首部type
*/
@NotBlank(message = "首部类型不能为空", groups = { Add.class, Update.class })
private String headerType;
/**
* 首部value
*/
@NotBlank(message = "首部值不能为空", groups = { Add.class, Update.class })
private String headerValue;
/**
* 备注
*/
private String comment;
}

38
code/smart-community/epmet-admin/epmet-admin-client/src/main/java/com/epmet/dto/form/LogOperationListFormDTO.java

@ -0,0 +1,38 @@
package com.epmet.dto.form;
import lombok.Data;
@Data
public class LogOperationListFormDTO {
private String condition;
private Integer pageNo = 1;
private Integer pageSize = 10;
/**
* 姓名
*/
private String operatorName;
/**
* 手机号
*/
private String operatorMobile;
/**
* yyyyMMdd
*/
private String startTime;
/**
* yyyyMMdd
*/
private String endTime;
/**
* 产品原本前端默认传data_tm
* 03.01烟台需求列表展示全部
* 项目流转project_changed
* 登录auth
* 积分point
* 查看脱敏信息data_tm
*/
private String category;
}

53
code/smart-community/epmet-admin/epmet-admin-client/src/main/java/com/epmet/dto/region/LogOperationResultDTO.java

@ -0,0 +1,53 @@
package com.epmet.dto.region;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import java.util.Date;
/**
*
*/
@Data
public class LogOperationResultDTO {
/**
* 大类别登录login项目流转project
*/
private String category;
/**
* 类型枚举,小类别登录loginlogout退出shift_project议题转项目等
*/
private String type;
/**
* 类型枚举名称
*/
private String typeDisplay;
/**
* 内容
*/
private String content;
/**
* 操作目标ID
*/
private String targetId;
/**
* 操作人ID
*/
private String customerId;
private String operatorId;
private String operatorName;
private String operatorMobile;
/**
* 操作时间,该时间不是插入数据的时间而是操作发生的真实时间
*/
private Long operatingTime;
@JsonFormat(pattern="yyyy-MM-dd HH:mm")
private Date operateTime;
}

31
code/smart-community/epmet-admin/epmet-admin-client/src/main/java/com/epmet/dto/region/Region.java

@ -0,0 +1,31 @@
/**
* Copyright (c) 2019 人人开源 All rights reserved.
* <p>
* https://www.renren.io
* <p>
* 版权所有侵权必究
*/
package com.epmet.dto.region;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Data;
import java.io.Serializable;
/**
* 地区管理
*
* @author Mark sunlightcs@gmail.com
*/
@Data
public class Region implements Serializable {
private static final long serialVersionUID = 1L;
private Long id;
@JsonIgnore
private Long pid;
private String name;
}

27
code/smart-community/epmet-admin/epmet-admin-client/src/main/java/com/epmet/dto/region/RegionCity.java

@ -0,0 +1,27 @@
/**
* Copyright (c) 2019 人人开源 All rights reserved.
* <p>
* https://www.renren.io
* <p>
* 版权所有侵权必究
*/
package com.epmet.dto.region;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.ArrayList;
import java.util.List;
/**
*
*
* @author Mark sunlightcs@gmail.com
*/
@Data
@EqualsAndHashCode(callSuper = true)
public class RegionCity extends Region {
private List<Region> counties = new ArrayList<>();
}

27
code/smart-community/epmet-admin/epmet-admin-client/src/main/java/com/epmet/dto/region/RegionProvince.java

@ -0,0 +1,27 @@
/**
* Copyright (c) 2019 人人开源 All rights reserved.
* <p>
* https://www.renren.io
* <p>
* 版权所有侵权必究
*/
package com.epmet.dto.region;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.ArrayList;
import java.util.List;
/**
*
*
* @author Mark sunlightcs@gmail.com
*/
@Data
@EqualsAndHashCode(callSuper = true)
public class RegionProvince extends Region {
private List<Region> cities = new ArrayList<>();
}

27
code/smart-community/epmet-admin/epmet-admin-client/src/main/java/com/epmet/dto/result/CorsConfigResultDTO.java

@ -0,0 +1,27 @@
package com.epmet.dto.result;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@AllArgsConstructor
@NoArgsConstructor
public class CorsConfigResultDTO {
private String id;
/**
* 首部类型
*/
private String headerType;
/**
* 首部值
*/
private String headerValue;
/**
* 首部备注
*/
private String comment;
}

44
code/smart-community/epmet-admin/epmet-admin-client/src/main/java/com/epmet/enums/LogOperationTypeEnum.java

@ -0,0 +1,44 @@
//package com.epmet.enums;
//
//import lombok.Data;
//
///**
// * 操作日志类型枚举
// */
//public enum LogOperationTypeEnum {
// LOGIN("login", "登录"),
// LOGOUT("logout", "退出登录");
//
// private String type;
// private String typeDisplay;
//
// public String getType() {
// return type;
// }
//
// public String getTypeDisplay() {
// return typeDisplay;
// }
//
// LogOperationTypeEnum(String type, String typeDisplay) {
// this.type = type;
// this.typeDisplay = typeDisplay;
// }
//
// public static LogOperationTypeEnum get(String type) {
// for (LogOperationTypeEnum t : LogOperationTypeEnum.values()) {
// if (t.type.equals(type)) {
// return t;
// }
// }
// return null;
// }
//
// public static String getDisplay(String type) {
// LogOperationTypeEnum object = get(type);
// if (object == null) {
// return null;
// }
// return object.typeDisplay;
// }
//}

36
code/smart-community/epmet-admin/epmet-admin-client/src/main/java/com/epmet/enums/MenuFlagEnum.java

@ -0,0 +1,36 @@
/**
* Copyright (c) 2018 人人开源 All rights reserved.
*
* https://www.renren.io
*
* 版权所有侵权必究
*/
package com.epmet.enums;
/**
* 菜单资源标识
*
* @author Mark sunlightcs@gmail.com
* @since 1.0.0
*/
public enum MenuFlagEnum {
/**
* 菜单资源
*/
YES(1),
/**
* 非菜单资源
*/
NO(0);
private int value;
MenuFlagEnum(int value) {
this.value = value;
}
public int value() {
return this.value;
}
}

36
code/smart-community/epmet-admin/epmet-admin-client/src/main/java/com/epmet/enums/MenuTypeEnum.java

@ -0,0 +1,36 @@
/**
* Copyright (c) 2018 人人开源 All rights reserved.
*
* https://www.renren.io
*
* 版权所有侵权必究
*/
package com.epmet.enums;
/**
* 菜单类型枚举
*
* @author Mark sunlightcs@gmail.com
* @since 1.0.0
*/
public enum MenuTypeEnum {
/**
* 菜单
*/
MENU(0),
/**
* 按钮
*/
BUTTON(1);
private int value;
MenuTypeEnum(int value) {
this.value = value;
}
public int value() {
return this.value;
}
}

29
code/smart-community/epmet-admin/epmet-admin-client/src/main/java/com/epmet/enums/RegionLeafEnum.java

@ -0,0 +1,29 @@
/**
* Copyright (c) 2019 人人开源 All rights reserved.
* <p>
* https://www.renren.io
* <p>
* 版权所有侵权必究
*/
package com.epmet.enums;
/**
* 叶子节点枚举
*
* @author Mark sunlightcs@gmail.com
*/
public enum RegionLeafEnum {
YES(1),
NO(0);
private int value;
RegionLeafEnum(int value) {
this.value = value;
}
public int value() {
return this.value;
}
}

30
code/smart-community/epmet-admin/epmet-admin-client/src/main/java/com/epmet/enums/RegionLevelEnum.java

@ -0,0 +1,30 @@
/**
* Copyright (c) 2019 人人开源 All rights reserved.
* <p>
* https://www.renren.io
* <p>
* 版权所有侵权必究
*/
package com.epmet.enums;
/**
* 行政区域 级别枚举
*
* @author Mark sunlightcs@gmail.com
*/
public enum RegionLevelEnum {
ONE(1),
TWO(2),
THREE(3);
private int value;
RegionLevelEnum(int value) {
this.value = value;
}
public int value() {
return this.value;
}
}

30
code/smart-community/epmet-admin/epmet-admin-client/src/main/java/com/epmet/enums/UserStatusEnum.java

@ -0,0 +1,30 @@
/**
* Copyright (c) 2018 人人开源 All rights reserved.
*
* https://www.renren.io
*
* 版权所有侵权必究
*/
package com.epmet.enums;
/**
* 用户状态
*
* @author Mark sunlightcs@gmail.com
* @since 1.0.0
*/
public enum UserStatusEnum {
DISABLE(0),
ENABLED(1);
private int value;
UserStatusEnum(int value) {
this.value = value;
}
public int value() {
return this.value;
}
}

117
code/smart-community/epmet-admin/epmet-admin-client/src/main/java/com/epmet/feign/EpmetAdminOpenFeignClient.java

@ -0,0 +1,117 @@
package com.epmet.feign;
import com.epmet.commons.tools.constant.ServiceConstant;
import com.epmet.commons.tools.dto.form.DictListFormDTO;
import com.epmet.commons.tools.dto.result.DictListResultDTO;
import com.epmet.commons.tools.dto.result.DictTreeResultDTO;
import com.epmet.commons.tools.dto.result.OptionResultDTO;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.SysDictDataDTO;
import com.epmet.dto.result.CorsConfigResultDTO;
import com.epmet.feign.fallback.EpmetAdminOpenFeignClientFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import java.util.List;
import java.util.Map;
@FeignClient(name = ServiceConstant.EPMET_ADMIN_SERVER, fallbackFactory = EpmetAdminOpenFeignClientFallbackFactory.class)
//@FeignClient(name = ServiceConstant.EPMET_ADMIN_SERVER, fallbackFactory = EpmetAdminOpenFeignClientFallbackFactory.class, url = "localhost:8082")
public interface EpmetAdminOpenFeignClient {
/**
* @Description 查询跨域配置列表
* @return
* @author wxz
* @date 2021.06.25 10:00
*/
@PostMapping("/sys/cors-config/list")
Result<List<CorsConfigResultDTO>> list();
/**
* @Description 文化程度
* @Param
* @Return {@link Result<List< OptionResultDTO >>}
* @Author zhaoqifeng
* @Date 2021/10/26 17:27
*/
@PostMapping("/sys/dict/data/education")
Result<List<OptionResultDTO>> getEducationOption();
/**
* @Description 住房性质
* @Param
* @Return {@link Result<List<OptionResultDTO>>}
* @Author zhaoqifeng
* @Date 2021/10/26 17:27
*/
@PostMapping("/sys/dict/data/house")
Result<List<OptionResultDTO>> getHouseOption();
/**
* @Description 民族
* @Param
* @Return {@link Result<List<OptionResultDTO>>}
* @Author zhaoqifeng
* @Date 2021/10/26 17:27
*/
@PostMapping("/sys/dict/data/nation")
Result<List<OptionResultDTO>> getNationOption();
/**
* @Description 九小场所
* @Param
* @Return {@link Result<List<OptionResultDTO>>}
* @Author zhaoqifeng
* @Date 2021/10/26 17:27
*/
@PostMapping("/sys/dict/data/ninesmallplaces")
Result<List<OptionResultDTO>> getNineSmallPlacesOption();
/**
* @Description 人员关系
* @Param
* @Return {@link Result<List<OptionResultDTO>>}
* @Author zhaoqifeng
* @Date 2021/10/26 17:27
*/
@PostMapping("/sys/dict/data/relationship")
Result<List<OptionResultDTO>> getRelationshipOption();
/**
* 字典数据查询通用接口
* @Param dictType
* @Return {@link Result< Map < String, String>>}
* @Author zhaoqifeng
* @Date 2021/11/19 17:36
*/
@PostMapping("/sys/dict/data/dictmap/{dictType}")
Result<Map<String, String>> dictMap(@PathVariable("dictType") String dictType);
/**
* 字典数据查询通用接口
* @Param dictType
* @Return {@link Result< Map < String, String>>}
* @Author zhaoqifeng
* @Date 2021/11/19 17:36
*/
@PostMapping("/sys/dict/data/dictTree/{dictType}")
Result<List<DictTreeResultDTO>> dictTree(@PathVariable("dictType") String dictType);
@PostMapping("/sys/dict/data/dictlist")
Result<List<DictListResultDTO>> dictList(@RequestBody DictListFormDTO formDTO);
@PostMapping("/sys/dict/data/dictDataList/{dictType}")
Result<List<SysDictDataDTO>> dictDataList(@PathVariable("dictType") String dictType);
/**
* 字典下拉框
* 根据dictType查询字典
* @param dictType
* @return
*/
@PostMapping("/sys/dict/data/dictOption/{dictType}")
public Result<List<OptionResultDTO>> getDictOption(@PathVariable("dictType")String dictType);
}

44
code/smart-community/epmet-admin/epmet-admin-client/src/main/java/com/epmet/feign/ParamsFeignClient.java

@ -0,0 +1,44 @@
/**
* Copyright (c) 2018 人人开源 All rights reserved.
*
* https://www.renren.io
*
* 版权所有侵权必究
*/
package com.epmet.feign;
import com.epmet.commons.tools.constant.ServiceConstant;
import com.epmet.feign.fallback.ParamsFeignClientFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestParam;
/**
* 参数接口
*
* @author Mark sunlightcs@gmail.com
* @since 1.1.0
*/
@FeignClient(name = ServiceConstant.EPMET_ADMIN_SERVER, fallback = ParamsFeignClientFallback.class)
public interface ParamsFeignClient {
/**
* 根据参数编码获取参数值
* @param paramCode 参数编码
* @return 返回参数值
*/
@GetMapping("sys/params/code/{paramCode}")
String getValue(@PathVariable("paramCode") String paramCode);
/**
* 根据参数编码更新参数值
* @param paramCode 参数编码
* @param paramValue 参数值
*/
@PutMapping("sys/params/code/{paramCode}")
void updateValueByCode(@PathVariable("paramCode") String paramCode, @RequestParam("paramValue") String paramValue);
}

80
code/smart-community/epmet-admin/epmet-admin-client/src/main/java/com/epmet/feign/fallback/EpmetAdminOpenFeignClientFallback.java

@ -0,0 +1,80 @@
package com.epmet.feign.fallback;
import com.epmet.commons.tools.constant.ServiceConstant;
import com.epmet.commons.tools.dto.form.DictListFormDTO;
import com.epmet.commons.tools.dto.result.DictListResultDTO;
import com.epmet.commons.tools.dto.result.DictTreeResultDTO;
import com.epmet.commons.tools.dto.result.OptionResultDTO;
import com.epmet.commons.tools.utils.ModuleUtils;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.SysDictDataDTO;
import com.epmet.dto.result.CorsConfigResultDTO;
import com.epmet.feign.EpmetAdminOpenFeignClient;
import java.util.List;
import java.util.Map;
//@Component
public class EpmetAdminOpenFeignClientFallback implements EpmetAdminOpenFeignClient {
@Override
public Result<List<CorsConfigResultDTO>> list() {
return ModuleUtils.feignConError(ServiceConstant.EPMET_ADMIN_SERVER, "list", null);
}
@Override
public Result<List<OptionResultDTO>> getEducationOption() {
return ModuleUtils.feignConError(ServiceConstant.EPMET_ADMIN_SERVER, "getEducationOption", null);
}
@Override
public Result<List<OptionResultDTO>> getHouseOption() {
return ModuleUtils.feignConError(ServiceConstant.EPMET_ADMIN_SERVER, "getHouseOption", null);
}
@Override
public Result<List<OptionResultDTO>> getNationOption() {
return ModuleUtils.feignConError(ServiceConstant.EPMET_ADMIN_SERVER, "getNationOption", null);
}
@Override
public Result<List<OptionResultDTO>> getNineSmallPlacesOption() {
return ModuleUtils.feignConError(ServiceConstant.EPMET_ADMIN_SERVER, "getNineSmallPlacesOption", null);
}
@Override
public Result<List<OptionResultDTO>> getRelationshipOption() {
return ModuleUtils.feignConError(ServiceConstant.EPMET_ADMIN_SERVER, "getRelationshipOption", null);
}
@Override
public Result<Map<String, String>> dictMap(String dictType) {
return ModuleUtils.feignConError(ServiceConstant.EPMET_ADMIN_SERVER, "dictMap", dictType);
}
@Override
public Result<List<DictTreeResultDTO>> dictTree(String dictType) {
return ModuleUtils.feignConError(ServiceConstant.EPMET_ADMIN_SERVER, "dictTree", dictType);
}
@Override
public Result<List<DictListResultDTO>> dictList(DictListFormDTO formDTO) {
return ModuleUtils.feignConError(ServiceConstant.EPMET_ADMIN_SERVER, "dictList", formDTO);
}
@Override
public Result<List<SysDictDataDTO>> dictDataList(String dictType) {
return ModuleUtils.feignConError(ServiceConstant.EPMET_ADMIN_SERVER, "dictDataList", dictType);
}
/**
* 字典下拉框
* 根据dictType查询字典
*
* @param dictType
* @return
*/
@Override
public Result<List<OptionResultDTO>> getDictOption(String dictType) {
return ModuleUtils.feignConError(ServiceConstant.EPMET_ADMIN_SERVER, "getDictOption", dictType);
}
}

20
code/smart-community/epmet-admin/epmet-admin-client/src/main/java/com/epmet/feign/fallback/EpmetAdminOpenFeignClientFallbackFactory.java

@ -0,0 +1,20 @@
package com.epmet.feign.fallback;
import com.epmet.commons.tools.exception.ExceptionUtils;
import com.epmet.feign.EpmetAdminOpenFeignClient;
import feign.hystrix.FallbackFactory;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
@Component
@Slf4j
public class EpmetAdminOpenFeignClientFallbackFactory implements FallbackFactory<EpmetAdminOpenFeignClient> {
private EpmetAdminOpenFeignClientFallback fallback = new EpmetAdminOpenFeignClientFallback();
@Override
public EpmetAdminOpenFeignClient create(Throwable cause) {
log.error(String.format("FeignClient调用发生异常,异常信息:%s", ExceptionUtils.getThrowableErrorStackTrace(cause)));
return fallback;
}
}

32
code/smart-community/epmet-admin/epmet-admin-client/src/main/java/com/epmet/feign/fallback/ParamsFeignClientFallback.java

@ -0,0 +1,32 @@
/**
* Copyright (c) 2018 人人开源 All rights reserved.
*
* https://www.renren.io
*
* 版权所有侵权必究
*/
package com.epmet.feign.fallback;
import com.epmet.feign.ParamsFeignClient;
import org.springframework.stereotype.Component;
/**
* 参数接口 Fallback
*
* @author Mark sunlightcs@gmail.c om
* @since 1.1.0
*/
@Component
public class ParamsFeignClientFallback implements ParamsFeignClient {
@Override
public String getValue(String paramCode) {
return null;
}
@Override
public void updateValueByCode(String paramCode, String paramValue) {
}
}

57
code/smart-community/epmet-admin/epmet-admin-client/src/main/java/com/epmet/remote/ParamsRemoteService.java

@ -0,0 +1,57 @@
/**
* Copyright (c) 2018 人人开源 All rights reserved.
* <p>
* https://www.renren.io
* <p>
* 版权所有侵权必究
*/
package com.epmet.remote;
import com.alibaba.fastjson.JSON;
import com.epmet.commons.tools.exception.ErrorCode;
import com.epmet.commons.tools.exception.RenException;
import com.epmet.feign.ParamsFeignClient;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
/**
* 参数
*
* @author Mark sunlightcs@gmail.com
* @since 1.1.0
*/
@Component
public class ParamsRemoteService {
@Autowired
private ParamsFeignClient paramsFeignClient;
/**
* 根据参数编码获取value的Object对象
* @param paramCode 参数编码
* @param clazz Object对象
*/
public <T> T getValueObject(String paramCode, Class<T> clazz) {
String paramValue = paramsFeignClient.getValue(paramCode);
if(StringUtils.isNotBlank(paramValue)){
return JSON.parseObject(paramValue, clazz);
}
try {
return clazz.newInstance();
} catch (Exception e) {
throw new RenException(ErrorCode.PARAMS_GET_ERROR);
}
}
/**
* 根据参数编码更新value
* @param paramCode 参数编码
* @param paramValue 参数值
*/
public void updateValueByCode(String paramCode, String paramValue){
paramsFeignClient.updateValueByCode(paramCode, paramValue);
}
}

11
code/smart-community/epmet-admin/epmet-admin-server/Dockerfile

@ -0,0 +1,11 @@
FROM openjdk:8-jre
RUN export LANG="zh_CN.UTF-8"
RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
RUN echo 'Asia/Shanghai' > /etc/timezone
COPY ./target/*.jar ./epmet-admin.jar
EXPOSE 8082
ENTRYPOINT ["sh", "-c", "exec $RUN_INSTRUCT"]

23
code/smart-community/epmet-admin/epmet-admin-server/deploy/docker-compose-dev.yml

@ -0,0 +1,23 @@
version: "3.7"
services:
epmet-admin-server:
container_name: epmet-admin-server-dev
image: 192.168.1.140:5000/epmet-cloud-dev/epmet-admin-server:version_placeholder
ports:
- "8082:8082"
network_mode: host # 使用现有网络
volumes:
- "/opt/epmet-cloud-logs/dev:/logs"
environment:
RUN_INSTRUCT: "java -Xms32m -Xmx200m -jar ./epmet-admin.jar"
restart: "unless-stopped"
logging:
driver: local
options:
max-size: "10m"
max-file: "2"
deploy:
resources:
limits:
cpus: '0.1'
memory: 250M

23
code/smart-community/epmet-admin/epmet-admin-server/deploy/docker-compose-prod.yml

@ -0,0 +1,23 @@
version: "3.7"
services:
epmet-admin-server:
container_name: epmet-admin-server-prod
image: epmet-cloud-master/epmet-admin-server:version_placeholder
ports:
- "8082:8082"
network_mode: host # 使用现有网络
volumes:
- "/opt/epmet-cloud-logs/prod:/logs"
environment:
RUN_INSTRUCT: "java -Xms256m -Xmx512m -jar ./epmet-admin.jar"
restart: "unless-stopped"
logging:
driver: local
options:
max-size: "10m"
max-file: "2"
deploy:
resources:
limits:
cpus: '0.1'
memory: 600M

23
code/smart-community/epmet-admin/epmet-admin-server/deploy/docker-compose-test.yml

@ -0,0 +1,23 @@
version: "3.7"
services:
epmet-admin-server:
container_name: epmet-admin-server-test
image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-release/epmet-admin-server:version_placeholder
ports:
- "8082:8082"
network_mode: host # 使用现有网络
volumes:
- "/opt/epmet-cloud-logs/test:/logs"
environment:
RUN_INSTRUCT: "java -Xms32m -Xmx200m -jar ./epmet-admin.jar"
restart: "unless-stopped"
logging:
driver: local
options:
max-size: "10m"
max-file: "2"
deploy:
resources:
limits:
cpus: '0.1'
memory: 250M

301
code/smart-community/epmet-admin/epmet-admin-server/pom.xml

@ -0,0 +1,301 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<version>0.3.35</version>
<parent>
<groupId>com.epmet</groupId>
<artifactId>epmet-admin</artifactId>
<version>2.0.0</version>
</parent>
<artifactId>epmet-admin-server</artifactId>
<packaging>jar</packaging>
<dependencies>
<dependency>
<groupId>com.epmet</groupId>
<artifactId>epmet-admin-client</artifactId>
<version>2.0.0</version>
</dependency>
<dependency>
<groupId>com.epmet</groupId>
<artifactId>epmet-commons-mybatis</artifactId>
<version>2.0.0</version>
</dependency>
<dependency>
<groupId>com.epmet</groupId>
<artifactId>epmet-commons-dynamic-datasource</artifactId>
<version>2.0.0</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context-support</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
</dependency>
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
</dependency>
<!-- 替换Feign原生httpclient -->
<dependency>
<groupId>io.github.openfeign</groupId>
<artifactId>feign-httpclient</artifactId>
<version>10.3.0</version>
</dependency>
<!--rocketmq-->
<dependency>
<groupId>com.epmet</groupId>
<artifactId>epmet-commons-rocketmq</artifactId>
<version>2.0.0</version>
</dependency>
<!--user-client-->
<dependency>
<groupId>com.epmet</groupId>
<artifactId>epmet-user-client</artifactId>
<version>2.0.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.epmet</groupId>
<artifactId>epmet-message-client</artifactId>
<version>2.0.0</version>
</dependency>
<dependency>
<groupId>com.epmet</groupId>
<artifactId>epmet-auth-client</artifactId>
<version>2.0.0</version>
</dependency>
</dependencies>
<build>
<finalName>${project.artifactId}</finalName>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<skipTests>true</skipTests>
</configuration>
</plugin>
</plugins>
<sourceDirectory>${project.basedir}/src/main/java</sourceDirectory>
<resources>
<resource>
<filtering>true</filtering>
<directory>${basedir}/src/main/resources</directory>
</resource>
</resources>
</build>
<profiles>
<profile>
<id>dev</id>
<properties>
<server.port>8082</server.port>
<spring.profiles.active>dev</spring.profiles.active>
<!-- 数据库配置-->
<spring.datasource.druid.url>
<![CDATA[jdbc:mysql://192.168.1.140:3306/epmet_admin?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai]]>
</spring.datasource.druid.url>
<spring.datasource.druid.username>root</spring.datasource.druid.username>
<spring.datasource.druid.password>Zhsq@Szrz%2023_</spring.datasource.druid.password>
<!-- redis配置 -->
<spring.redis.index>0</spring.redis.index>
<spring.redis.host>192.168.1.140</spring.redis.host>
<spring.redis.port>6379</spring.redis.port>
<spring.redis.password>123456</spring.redis.password>
<!-- nacos -->
<nacos.register-enabled>true</nacos.register-enabled>
<nacos.server-addr>192.168.1.140:8848</nacos.server-addr>
<nacos.discovery.namespace>1fecc730-5e6e-464c-aae9-7567944e7936</nacos.discovery.namespace>
<nacos.config.namespace></nacos.config.namespace>
<nacos.config.group></nacos.config.group>
<nacos.config-enabled>false</nacos.config-enabled>
<nacos.ip/>
<!--是否开启服务列表变更监听-->
<nacos.service-list-changed-listening.enable>true</nacos.service-list-changed-listening.enable>
<spring.flyway.enabled>false</spring.flyway.enabled>
<!--rocketmq-->
<rocketmq.enable>true</rocketmq.enable>
<rocketmq.nameserver>192.168.1.140:9876;192.168.1.141:9876</rocketmq.nameserver>
<rocketmq.producer.group>epmet_message</rocketmq.producer.group>
<!--线程池-->
<thread.threadPool.enable-customize>true</thread.threadPool.enable-customize>
<thread.threadPool.core-pool-size>5</thread.threadPool.core-pool-size>
<thread.threadPool.max-pool-size>8</thread.threadPool.max-pool-size>
<thread.threadPool.queue-capacity>20</thread.threadPool.queue-capacity>
<thread.threadPool.keep-alive-seconds>60</thread.threadPool.keep-alive-seconds>
<thread.threadPool.thread-name-prefix>epmet-admin</thread.threadPool.thread-name-prefix>
<thread.threadPool.rejected-execution-handler>callerRunsPolicy</thread.threadPool.rejected-execution-handler>
</properties>
</profile>
<profile>
<id>local</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<server.port>8082</server.port>
<spring.profiles.active>local</spring.profiles.active>
<!-- 数据库配置-->
<spring.datasource.druid.url>
<![CDATA[jdbc:mysql://192.168.1.140:3306/epmet_admin?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai]]>
</spring.datasource.druid.url>
<spring.datasource.druid.username>root</spring.datasource.druid.username>
<spring.datasource.druid.password>Zhsq@Szrz%2023_</spring.datasource.druid.password>
<!-- redis配置 -->
<spring.redis.index>0</spring.redis.index>
<spring.redis.host>192.168.1.140</spring.redis.host>
<spring.redis.port>6379</spring.redis.port>
<spring.redis.password>123456</spring.redis.password>
<!-- nacos -->
<nacos.register-enabled>false</nacos.register-enabled>
<nacos.server-addr>192.168.1.140:8848</nacos.server-addr>
<nacos.discovery.namespace>1fecc730-5e6e-464c-aae9-7567944e7936</nacos.discovery.namespace>
<nacos.config.namespace></nacos.config.namespace>
<nacos.config.group></nacos.config.group>
<nacos.config-enabled>false</nacos.config-enabled>
<nacos.ip/>
<!--是否开启服务列表变更监听-->
<nacos.service-list-changed-listening.enable>false</nacos.service-list-changed-listening.enable>
<spring.flyway.enabled>false</spring.flyway.enabled>
<!--rocketmq-->
<rocketmq.enable>false</rocketmq.enable>
<rocketmq.nameserver>192.168.1.140:9876;192.168.1.141:9876</rocketmq.nameserver>
<rocketmq.producer.group>epmet_message</rocketmq.producer.group>
<!--线程池-->
<thread.threadPool.enable-customize>true</thread.threadPool.enable-customize>
<thread.threadPool.core-pool-size>5</thread.threadPool.core-pool-size>
<thread.threadPool.max-pool-size>8</thread.threadPool.max-pool-size>
<thread.threadPool.queue-capacity>20</thread.threadPool.queue-capacity>
<thread.threadPool.keep-alive-seconds>60</thread.threadPool.keep-alive-seconds>
<thread.threadPool.thread-name-prefix>epmet-admin</thread.threadPool.thread-name-prefix>
<thread.threadPool.rejected-execution-handler>callerRunsPolicy</thread.threadPool.rejected-execution-handler>
</properties>
</profile>
<profile>
<id>test</id>
<properties>
<server.port>8082</server.port>
<spring.profiles.active>test</spring.profiles.active>
<!-- 数据库配置-->
<spring.datasource.druid.url>
<![CDATA[jdbc:mysql://rm-m5ef9t617j6o5eup7.mysql.rds.aliyuncs.com:3306/epmet_admin?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai]]>
</spring.datasource.druid.url>
<spring.datasource.druid.username>root</spring.datasource.druid.username>
<spring.datasource.druid.password>elink@833066</spring.datasource.druid.password>
<!-- redis配置 -->
<spring.redis.index>0</spring.redis.index>
<spring.redis.host>192.168.10.150</spring.redis.host>
<spring.redis.port>6379</spring.redis.port>
<spring.redis.password>EpmEtrEdIs!q@w</spring.redis.password>
<!-- nacos -->
<nacos.register-enabled>true</nacos.register-enabled>
<nacos.server-addr>192.168.10.150:8848</nacos.server-addr>
<nacos.discovery.namespace>67e3c350-533e-4d7c-9f8f-faf1b4aa82ae</nacos.discovery.namespace>
<nacos.config.namespace></nacos.config.namespace>
<nacos.config.group></nacos.config.group>
<nacos.config-enabled>false</nacos.config-enabled>
<nacos.ip/>
<!--是否开启服务列表变更监听-->
<nacos.service-list-changed-listening.enable>true</nacos.service-list-changed-listening.enable>
<spring.flyway.enabled>true</spring.flyway.enabled>
<!--rocketmq-->
<rocketmq.enable>true</rocketmq.enable>
<rocketmq.nameserver>192.168.10.161:9876</rocketmq.nameserver>
<rocketmq.producer.group>epmet_message</rocketmq.producer.group>
<!--线程池-->
<thread.threadPool.enable-customize>true</thread.threadPool.enable-customize>
<thread.threadPool.core-pool-size>5</thread.threadPool.core-pool-size>
<thread.threadPool.max-pool-size>8</thread.threadPool.max-pool-size>
<thread.threadPool.queue-capacity>20</thread.threadPool.queue-capacity>
<thread.threadPool.keep-alive-seconds>60</thread.threadPool.keep-alive-seconds>
<thread.threadPool.thread-name-prefix>epmet-admin</thread.threadPool.thread-name-prefix>
<thread.threadPool.rejected-execution-handler>callerRunsPolicy</thread.threadPool.rejected-execution-handler>
</properties>
</profile>
<profile>
<id>prod</id>
<properties>
<server.port>8082</server.port>
<spring.profiles.active>prod</spring.profiles.active>
<!-- 数据库配置-->
<spring.datasource.druid.url>
<![CDATA[jdbc:mysql://10.1.26.45:3306/epmet_admin?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai]]>
</spring.datasource.druid.url>
<spring.datasource.druid.username>root</spring.datasource.druid.username>
<spring.datasource.druid.password>Zhsq@Szrz%2023_</spring.datasource.druid.password>
<!-- redis配置 -->
<spring.redis.index>0</spring.redis.index>
<spring.redis.cluster.nodes>
10.1.26.45:6379
</spring.redis.cluster.nodes>
<spring.redis.host>10.1.26.45</spring.redis.host>
<!--<spring.redis.mode>cluster</spring.redis.mode>-->
<spring.redis.mode>single</spring.redis.mode>
<spring.redis.cluster.max-redirects>3</spring.redis.cluster.max-redirects>
<spring.redis.password>rEdIs@yAntAI_666</spring.redis.password>
<!-- nacos -->
<nacos.register-enabled>true</nacos.register-enabled>
<nacos.server-addr>10.1.26.46</nacos.server-addr>
<nacos.discovery.namespace>f12ffa83-730f-4814-b2ac-89e9132fbb7c</nacos.discovery.namespace>
<nacos.config.namespace></nacos.config.namespace>
<nacos.config.group></nacos.config.group>
<nacos.config-enabled>false</nacos.config-enabled>
<nacos.ip/>
<!--是否开启服务列表变更监听-->
<nacos.service-list-changed-listening.enable>true</nacos.service-list-changed-listening.enable>
<spring.flyway.enabled>false</spring.flyway.enabled>
<!--rocketmq-->
<rocketmq.enable>true</rocketmq.enable>
<rocketmq.nameserver>10.1.26.46:9876;10.1.26.48:9876</rocketmq.nameserver>
<rocketmq.producer.group>epmet_message</rocketmq.producer.group>
<!--线程池-->
<thread.threadPool.enable-customize>true</thread.threadPool.enable-customize>
<thread.threadPool.core-pool-size>5</thread.threadPool.core-pool-size>
<thread.threadPool.max-pool-size>8</thread.threadPool.max-pool-size>
<thread.threadPool.queue-capacity>20</thread.threadPool.queue-capacity>
<thread.threadPool.keep-alive-seconds>60</thread.threadPool.keep-alive-seconds>
<thread.threadPool.thread-name-prefix>epmet-admin</thread.threadPool.thread-name-prefix>
<thread.threadPool.rejected-execution-handler>callerRunsPolicy</thread.threadPool.rejected-execution-handler>
</properties>
</profile>
</profiles>
</project>

34
code/smart-community/epmet-admin/epmet-admin-server/src/main/java/com/epmet/AdminApplication.java

@ -0,0 +1,34 @@
/**
* Copyright (c) 2018 人人开源 All rights reserved.
*
* https://www.renren.io
*
* 版权所有侵权必究
*/
package com.epmet;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
/**
* 管理后台
*
* @author Mark sunlightcs@gmail.com
* @since 1.0.0
*/
@SpringBootApplication
@EnableDiscoveryClient
@EnableFeignClients
@ServletComponentScan(basePackages = "com.epmet")
public class AdminApplication {
public static void main(String[] args) {
System.setProperty("rocketmq.client.logUseSlf4j", "true");
SpringApplication.run(AdminApplication.class, args);
}
}

40
code/smart-community/epmet-admin/epmet-admin-server/src/main/java/com/epmet/aspect/RequestLogAspect.java

@ -0,0 +1,40 @@
package com.epmet.aspect;
import com.epmet.commons.tools.aspect.BaseRequestLogAspect;
import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;
import org.springframework.web.context.request.RequestAttributes;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
import javax.servlet.http.HttpServletRequest;
/**
* 日志/异常处理切面实现调用父类方法完成日志记录和异常处理
*/
@Aspect
@Component
@Order(0)
public class RequestLogAspect extends BaseRequestLogAspect {
@Override
@Around(value = "execution(* com.epmet.controller.*Controller*.*(..)) ")
public Object proceed(ProceedingJoinPoint point) throws Throwable {
return super.proceed(point, getRequest());
}
/**
* 获取Request对象
*
* @return
*/
private HttpServletRequest getRequest() {
RequestAttributes ra = RequestContextHolder.getRequestAttributes();
ServletRequestAttributes sra = (ServletRequestAttributes) ra;
return sra.getRequest();
}
}

26
code/smart-community/epmet-admin/epmet-admin-server/src/main/java/com/epmet/config/ModuleConfigImpl.java

@ -0,0 +1,26 @@
/**
* Copyright (c) 2018 人人开源 All rights reserved.
*
* https://www.renren.io
*
* 版权所有侵权必究
*/
package com.epmet.config;
import com.epmet.commons.tools.config.ModuleConfig;
import org.springframework.stereotype.Service;
/**
* 模块配置信息
*
* @author Mark sunlightcs@gmail.com
* @since 1.0.0
*/
@Service
public class ModuleConfigImpl implements ModuleConfig {
@Override
public String getName() {
return "sys";
}
}

161
code/smart-community/epmet-admin/epmet-admin-server/src/main/java/com/epmet/config/NacosServiceListListenerRegisterer.java

@ -0,0 +1,161 @@
package com.epmet.config;
import com.alibaba.cloud.nacos.NacosDiscoveryProperties;
import com.alibaba.nacos.api.exception.NacosException;
import com.alibaba.nacos.api.naming.NamingService;
import com.alibaba.nacos.api.naming.listener.Event;
import com.alibaba.nacos.api.naming.listener.EventListener;
import com.alibaba.nacos.api.naming.listener.NamingEvent;
import com.alibaba.nacos.api.naming.pojo.ListView;
import com.epmet.commons.tools.exception.ExceptionUtils;
import com.netflix.loadbalancer.DynamicServerListLoadBalancer;
import com.netflix.loadbalancer.ILoadBalancer;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.cloud.netflix.ribbon.SpringClientFactory;
import org.springframework.context.annotation.Configuration;
import javax.annotation.PostConstruct;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.*;
/**
* @author wxz
* @Description Nacos服务列表刷新监听注册器
* @date 2021.09.22 14:33:11
*/
@Slf4j
@Configuration
@ConditionalOnProperty(prefix = "spring.cloud.nacos.discovery.serviceListChangedListening", name = "enable", havingValue = "true", matchIfMissing = false)
public class NacosServiceListListenerRegisterer {
public static final String REFRESH_SERVER_LIST_METHOD_NAME = "restOfInit";
// 服务列表拉取间隔:10s
public static final long SERVICE_LIST_PULLING_DELAY_SECONDS = 10;
private NamingService namingService;
private ScheduledExecutorService executor;
@Autowired
private NacosDiscoveryProperties discoveryProperties;
@Autowired
private SpringClientFactory springClientFactory;
// 监听中的服务列表
private List<String> observingServers = new ArrayList<>(33);
@PostConstruct
public void init() {
namingService = discoveryProperties.namingServiceInstance();
// 启动监听
executor = new ScheduledThreadPoolExecutor(2, new ThreadFactory() {
@Override
public Thread newThread(Runnable r) {
Thread thread = new Thread(r);
thread.setDaemon(true);
thread.setName("NacosServiceListWatchingRegisterer");
return thread;
}
});
// 立即启动,并15s刷新一次服务列表,用于新服务列表的发现
ScheduledFuture<?> future = executor.scheduleAtFixedRate(new EpmetNacosServiceListListener(), 0, SERVICE_LIST_PULLING_DELAY_SECONDS, TimeUnit.SECONDS);
}
public class EpmetNacosServiceListListener implements Runnable {
@Override
public void run() {
doRefreshServerList();
}
/**
* @param
* @return
* @description 执行刷新
* @author wxz
* @date 2021.09.22 16:04:49
*/
private synchronized void doRefreshServerList() {
ListView<String> serviceListView = null;
try {
serviceListView = namingService.getServicesOfServer(1, 100);
//启动监听
if (serviceListView == null || serviceListView.getCount() == 0) {
// log.debug("【Nacos服务列表定时刷新】当前无任何可添加监听的服务");
return;
}
List<String> serviceList = serviceListView.getData();
// log.debug("【Nacos服务列表定时刷新】Nacos服务端服务列表: {}", serviceList);
for (String service : serviceList) {
try {
// 如果该服务已经在监听列表中存在了,则不再注册监听。注:不能取消空服务的监听,因为空服务随时可能恢复运行,需要实时监听。
if (observingServers.contains(service)) {
continue;
}
namingService.subscribe(service, new EventListener() {
@Override
public void onEvent(Event event) {
if (event instanceof NamingEvent) {
NamingEvent namingEvent = (NamingEvent) event;
log.debug("【Nacos服务列表刷新监听】收到事件:{}:[{}]", namingEvent.getServiceName(), namingEvent.getInstances());
doRefreshServerList(service);
}
}
});
// 将该服务加入到监听列表中
observingServers.add(service);
} catch (NacosException e) {
String errorStackTrace = ExceptionUtils.getErrorStackTrace(e);
log.error("【Nacos服务列表定时刷新】订阅ApplicationContext的刷新事件失败,错误信息:{}", errorStackTrace);
}
}
} catch (NacosException e) {
String errorStackTrace = ExceptionUtils.getErrorStackTrace(e);
log.error("【Nacos服务列表定时刷新】链接Nacos服务端失败,错误信息:{}", errorStackTrace);
}
}
/**
* @param serviceName
* @return
* @description 刷新ServerList
* @author wxz
* @date 2021.09.22 09:29:16
*/
private void doRefreshServerList(String serviceName) {
// 刷新方式1:反射调用DynamicServerListLoadBalancer中的restOfInit()方法。该方法原来只执行一次,此处不推荐用
//ILoadBalancer loadBalancer = springClientFactory.getLoadBalancer(serviceName);
//if (loadBalancer instanceof ZoneAwareLoadBalancer) {
// ZoneAwareLoadBalancer zaLoadBalancer = (ZoneAwareLoadBalancer) loadBalancer;
// IClientConfig clientConfig = springClientFactory.getClientConfig(serviceName);
// try {
// Method restOfInitMethod = zaLoadBalancer.getClass().getSuperclass().getDeclaredMethod(REFRESH_SERVER_LIST_METHOD_NAME, IClientConfig.class);
// restOfInitMethod.setAccessible(true);
// restOfInitMethod.invoke(zaLoadBalancer, clientConfig);
// } catch (NoSuchMethodException | IllegalAccessException | InvocationTargetException e) {
// String errorStackTrace = ExceptionUtils.getErrorStackTrace(e);
// log.error("【LoadBalancer刷新服务列表】失败:{}", errorStackTrace);
// }
//}
// 刷新方式2:DynamicServerListLoadBalancer#updateListOfServers()该方法为ribbon定时刷新服务列表的时候真正调用的方法,但是加了@VisibleForTesting
// 暂且 1 try
ILoadBalancer loadBalancer = springClientFactory.getLoadBalancer(serviceName);
if (loadBalancer instanceof DynamicServerListLoadBalancer) {
DynamicServerListLoadBalancer dslb = (DynamicServerListLoadBalancer) loadBalancer;
dslb.updateListOfServers();
}
}
}
}

70
code/smart-community/epmet-admin/epmet-admin-server/src/main/java/com/epmet/controller/CorsConfigController.java

@ -0,0 +1,70 @@
package com.epmet.controller;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.dto.form.CorsConfigFormDTO;
import com.epmet.dto.result.CorsConfigResultDTO;
import com.epmet.service.CorsConfigService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.List;
@RestController
@RequestMapping("cors-config")
public class CorsConfigController {
@Autowired
private CorsConfigService corsConfigService;
/**
* @Description 查询跨域配置列表
* @return
* @author wxz
* @date 2021.06.25 10:00
*/
@PostMapping("/list")
public Result<List<CorsConfigResultDTO>> list() {
List<CorsConfigResultDTO> list = corsConfigService.list();
return new Result<List<CorsConfigResultDTO>>().ok(list);
}
/**
* @Description 添加跨域配置
* @return
* @author wxz
* @date 2021.06.25 13:51
*/
@PostMapping("/add")
public Result<CorsConfigResultDTO> addConfig(@RequestBody CorsConfigFormDTO input) {
ValidatorUtils.validateEntity(input, CorsConfigFormDTO.Add.class);
CorsConfigResultDTO data = corsConfigService.addConfig(input.getHeaderType(), input.getHeaderValue(), input.getComment());
return new Result<CorsConfigResultDTO>().ok(data);
}
/**
* @Description 通过id删除配置
* @return
* @author wxz
* @date 2021.06.25 14:18
*/
@PostMapping("/delete/{id}")
public Result deleteConfigById(@PathVariable("id") String configId) {
corsConfigService.deleteById(configId);
return new Result<>();
}
/**
* @Description 根据id更新
* @return
* @author wxz
* @date 2021.06.25 14:23
*/
@PostMapping("/update")
public Result updateById(@RequestBody CorsConfigFormDTO input) {
ValidatorUtils.validateEntity(input, CorsConfigFormDTO.Update.class);
corsConfigService.updateById(input.getId(), input.getHeaderType(), input.getHeaderValue(), input.getComment());
return new Result<>();
}
}

73
code/smart-community/epmet-admin/epmet-admin-server/src/main/java/com/epmet/controller/LogOperationController.java

@ -0,0 +1,73 @@
package com.epmet.controller;
import com.epmet.commons.tools.annotation.LoginUser;
import com.epmet.commons.tools.annotation.RequirePermission;
import com.epmet.commons.tools.enums.RequirePermissionEnum;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.security.user.LoginUserUtil;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.dto.form.LogOperationListFormDTO;
import com.epmet.dto.region.LogOperationResultDTO;
import com.epmet.service.LogOperationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.CollectionUtils;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.servlet.http.HttpServletRequest;
import java.util.ArrayList;
import java.util.List;
@RequestMapping("log/operation")
@RestController
public class LogOperationController {
@Autowired
private LogOperationService logOperationService;
@Autowired
private LoginUserUtil loginUserUtil;
@PostMapping("/list")
@RequirePermission(requirePermission = RequirePermissionEnum.MORE_SYSTEM_LOG_LIST)
public Result<List<LogOperationResultDTO>> listLogOperations(@RequestBody LogOperationListFormDTO input, HttpServletRequest request) {
ValidatorUtils.validateEntity(input);
String condition = input.getCondition();
Integer pageNo = input.getPageNo();
Integer pageSize = input.getPageSize();
String customerId = loginUserUtil.getLoginUserCustomerId();
List<LogOperationResultDTO> resultList = logOperationService.listOperationLogs(condition, customerId, pageNo, pageSize);
if (CollectionUtils.isEmpty(resultList)) {
resultList = new ArrayList<>();
}
return new Result<List<LogOperationResultDTO>>().ok(resultList);
}
/**
* 数字社区-操作记录
* @param formDTO
* @return
*/
@PostMapping("page")
public Result<PageData<LogOperationResultDTO>> page(@RequestBody LogOperationListFormDTO formDTO, @LoginUser TokenDto tokenDto){
return new Result<PageData<LogOperationResultDTO>>().ok(logOperationService.page(loginUserUtil.getLoginUserCustomerId(),
formDTO.getStartTime(),
formDTO.getEndTime(),
formDTO.getOperatorName(),
formDTO.getOperatorMobile(),
formDTO.getPageNo(),
formDTO.getPageSize(),
formDTO.getCategory(),tokenDto));
}
@PostMapping("complementLogOperation")
public Result complementLogOperation(){
logOperationService.complementLogOperation();
return new Result();
}
}

81
code/smart-community/epmet-admin/epmet-admin-server/src/main/java/com/epmet/controller/NewsController.java

@ -0,0 +1,81 @@
/**
* Copyright (c) 2018 人人开源 All rights reserved.
*
* https://www.renren.io
*
* 版权所有侵权必究
*/
package com.epmet.controller;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.AssertUtils;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.commons.tools.validator.group.AddGroup;
import com.epmet.commons.tools.validator.group.DefaultGroup;
import com.epmet.commons.tools.validator.group.UpdateGroup;
import com.epmet.dto.NewsDTO;
import com.epmet.service.NewsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.Arrays;
import java.util.Map;
/**
* 新闻
*
* @author Mark sunlightcs@gmail.com
*/
@RestController
@RequestMapping("news")
public class NewsController {
@Autowired
private NewsService newsService;
@GetMapping("page")
public Result<PageData<NewsDTO>> page(@RequestParam Map<String, Object> params){
PageData<NewsDTO> page = newsService.page(params);
return new Result<PageData<NewsDTO>>().ok(page);
}
@GetMapping("{id}")
public Result<NewsDTO> info(@PathVariable("id") Long id){
NewsDTO news = newsService.get(id);
return new Result<NewsDTO>().ok(news);
}
@PostMapping
public Result save(NewsDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
newsService.save(dto);
return new Result();
}
@PutMapping
public Result update(NewsDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
newsService.update(dto);
return new Result();
}
@DeleteMapping
public Result delete(@RequestBody Long[] ids){
//效验数据
AssertUtils.isArrayEmpty(ids, "id");
newsService.deleteBatchIds(Arrays.asList(ids));
return new Result();
}
}

80
code/smart-community/epmet-admin/epmet-admin-server/src/main/java/com/epmet/controller/SysDeptController.java

@ -0,0 +1,80 @@
/**
* Copyright (c) 2018 人人开源 All rights reserved.
*
* https://www.renren.io
*
* 版权所有侵权必究
*/
package com.epmet.controller;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.AssertUtils;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.commons.tools.validator.group.AddGroup;
import com.epmet.commons.tools.validator.group.DefaultGroup;
import com.epmet.commons.tools.validator.group.UpdateGroup;
import com.epmet.dto.SysDeptDTO;
import com.epmet.service.SysDeptService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.HashMap;
import java.util.List;
/**
* 部门管理
*
* @author Mark sunlightcs@gmail.com
* @since 1.0.0
*/
@RestController
@RequestMapping("dept")
public class SysDeptController {
@Autowired
private SysDeptService sysDeptService;
@GetMapping("list")
public Result<List<SysDeptDTO>> list(){
List<SysDeptDTO> list = sysDeptService.list(new HashMap<>(1));
return new Result<List<SysDeptDTO>>().ok(list);
}
@GetMapping("{id}")
public Result<SysDeptDTO> get(@PathVariable("id") Long id){
SysDeptDTO data = sysDeptService.get(id);
return new Result<SysDeptDTO>().ok(data);
}
@PostMapping
public Result save(@RequestBody SysDeptDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
sysDeptService.save(dto);
return new Result();
}
@PutMapping
public Result update(@RequestBody SysDeptDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
sysDeptService.update(dto);
return new Result();
}
@DeleteMapping("{id}")
public Result delete(@PathVariable("id") Long id){
//效验数据
AssertUtils.isNull(id, "id");
sysDeptService.delete(id);
return new Result();
}
}

193
code/smart-community/epmet-admin/epmet-admin-server/src/main/java/com/epmet/controller/SysDictDataController.java

@ -0,0 +1,193 @@
/**
* Copyright (c) 2018 人人开源 All rights reserved.
*
* https://www.renren.io
*
* 版权所有侵权必究
*/
package com.epmet.controller;
import com.epmet.commons.tools.dto.form.DictListFormDTO;
import com.epmet.commons.tools.dto.result.DictListResultDTO;
import com.epmet.commons.tools.dto.result.DictTreeResultDTO;
import com.epmet.commons.tools.dto.result.OptionResultDTO;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.AssertUtils;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.commons.tools.validator.group.DefaultGroup;
import com.epmet.commons.tools.validator.group.UpdateGroup;
import com.epmet.dto.SysDictDataDTO;
import com.epmet.service.SysDictDataService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.List;
import java.util.Map;
/**
* 字典数据
*
* @author Mark sunlightcs@gmail.com
*/
@RestController
@RequestMapping("dict/data")
public class SysDictDataController {
@Autowired
private SysDictDataService sysDictDataService;
@GetMapping("page")
public Result<PageData<SysDictDataDTO>> page(@RequestParam Map<String, Object> params){
//字典类型
PageData<SysDictDataDTO> page = sysDictDataService.page(params);
return new Result<PageData<SysDictDataDTO>>().ok(page);
}
@GetMapping("{id}")
public Result<SysDictDataDTO> get(@PathVariable("id") Long id){
SysDictDataDTO data = sysDictDataService.get(id);
return new Result<SysDictDataDTO>().ok(data);
}
@PostMapping
public Result save(@RequestBody SysDictDataDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, DefaultGroup.class);
sysDictDataService.save(dto);
return new Result();
}
@PutMapping
public Result update(@RequestBody SysDictDataDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
sysDictDataService.update(dto);
return new Result();
}
@DeleteMapping
public Result delete(@RequestBody Long[] ids){
//效验数据
AssertUtils.isArrayEmpty(ids, "id");
sysDictDataService.delete(ids);
return new Result();
}
/**
* @Description 九小场所
* @Param
* @Return {@link Result<List<OptionResultDTO>>}
* @Author zhaoqifeng
* @Date 2021/10/26 17:27
*/
@PostMapping("ninesmallplaces")
public Result<List<OptionResultDTO>> getNineSmallPlacesOption() {
return new Result<List<OptionResultDTO>>().ok(sysDictDataService.getNineSmallPlacesOption());
}
/**
* @Description 文化程度
* @Param
* @Return {@link Result<List<OptionResultDTO>>}
* @Author zhaoqifeng
* @Date 2021/10/26 17:27
*/
@PostMapping("education")
public Result<List<OptionResultDTO>> getEducationOption() {
return new Result<List<OptionResultDTO>>().ok(sysDictDataService.getEducationOption());
}
/**
* @Description 民族
* @Param
* @Return {@link Result<List<OptionResultDTO>>}
* @Author zhaoqifeng
* @Date 2021/10/26 17:27
*/
@PostMapping("nation")
public Result<List<OptionResultDTO>> getNationOption() {
return new Result<List<OptionResultDTO>>().ok(sysDictDataService.getNationOption());
}
/**
* 字典下拉框接口
* @param dictType
* @return
*/
@PostMapping("dictOption/{dictType}")
public Result<List<OptionResultDTO>> getDictOption(@PathVariable("dictType")String dictType) {
if(StringUtils.isBlank(dictType)){
return new Result<>();
}
return new Result<List<OptionResultDTO>>().ok(sysDictDataService.getDictOption(dictType));
}
/**
* @Description 人员关系
* @Param
* @Return {@link Result<List<OptionResultDTO>>}
* @Author zhaoqifeng
* @Date 2021/10/26 17:27
*/
@PostMapping("relationship")
public Result<List<OptionResultDTO>> getRelationshipOption() {
return new Result<List<OptionResultDTO>>().ok(sysDictDataService.getRelationshipOption());
}
/**
* @Description 住房性质
* @Param
* @Return {@link Result<List<OptionResultDTO>>}
* @Author zhaoqifeng
* @Date 2021/10/26 17:27
*/
@PostMapping("house")
public Result<List<OptionResultDTO>> getHouseOption() {
return new Result<List<OptionResultDTO>>().ok(sysDictDataService.getHouseOption());
}
/**
* @Description 字典数据查询通用接口
* @Author sun
*/
@PostMapping("dictlist")
public Result<List<DictListResultDTO>> dictList(@RequestBody DictListFormDTO formDTO) {
return new Result<List<DictListResultDTO>>().ok(sysDictDataService.dictList(formDTO.getDictType()));
}
/**
* @Description 字典数据查询通用接口
* @Author sun
*/
@PostMapping("dictTree/{dictType}")
public Result<List<DictTreeResultDTO>> dictListTree(@PathVariable("dictType") String dictType) {
return new Result<List<DictTreeResultDTO>>().ok(sysDictDataService.dictListTree(dictType));
}
/**
* 字典数据查询通用接口
* @Param dictType
* @Return {@link Result< Map< String, String>>}
* @Author zhaoqifeng
* @Date 2021/11/19 17:36
*/
@PostMapping("dictmap/{dictType}")
public Result<Map<String, String>> dictMap(@PathVariable("dictType") String dictType) {
return new Result<Map<String, String>>().ok(sysDictDataService.dictMap(dictType));
}
@PostMapping("dictDataList/{dictType}")
public Result<List<SysDictDataDTO>> dictDataList(@PathVariable("dictType") String dictType){
List<SysDictDataDTO> list=sysDictDataService.getDictDataList(dictType);
return new Result<List<SysDictDataDTO>>().ok(list);
}
}

89
code/smart-community/epmet-admin/epmet-admin-server/src/main/java/com/epmet/controller/SysDictTypeController.java

@ -0,0 +1,89 @@
/**
* Copyright (c) 2018 人人开源 All rights reserved.
*
* https://www.renren.io
*
* 版权所有侵权必究
*/
package com.epmet.controller;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.AssertUtils;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.commons.tools.validator.group.DefaultGroup;
import com.epmet.commons.tools.validator.group.UpdateGroup;
import com.epmet.dto.SysDictTypeDTO;
import com.epmet.entity.DictType;
import com.epmet.service.SysDictTypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.List;
import java.util.Map;
/**
* 字典类型
*
* @author Mark sunlightcs@gmail.com
*/
@RestController
@RequestMapping("dict/type")
public class SysDictTypeController {
@Autowired
private SysDictTypeService sysDictTypeService;
@GetMapping("page")
public Result<PageData<SysDictTypeDTO>> page(@RequestParam Map<String, Object> params){
//字典类型
PageData<SysDictTypeDTO> page = sysDictTypeService.page(params);
return new Result<PageData<SysDictTypeDTO>>().ok(page);
}
@GetMapping("{id}")
public Result<SysDictTypeDTO> get(@PathVariable("id") Long id){
SysDictTypeDTO data = sysDictTypeService.get(id);
return new Result<SysDictTypeDTO>().ok(data);
}
@PostMapping
public Result save(@RequestBody SysDictTypeDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, DefaultGroup.class);
sysDictTypeService.save(dto);
return new Result();
}
@PutMapping
public Result update(@RequestBody SysDictTypeDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
sysDictTypeService.update(dto);
return new Result();
}
@DeleteMapping
public Result delete(@RequestBody Long[] ids){
//效验数据
AssertUtils.isArrayEmpty(ids, "id");
sysDictTypeService.delete(ids);
return new Result();
}
@GetMapping("all")
public Result<List<DictType>> all(){
List<DictType> list = sysDictTypeService.getAllList();
return new Result<List<DictType>>().ok(list);
}
}

54
code/smart-community/epmet-admin/epmet-admin-server/src/main/java/com/epmet/controller/SysLogErrorController.java

@ -0,0 +1,54 @@
/**
* Copyright (c) 2018 人人开源 All rights reserved.
*
* https://www.renren.io
*
* 版权所有侵权必究
*/
package com.epmet.controller;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.utils.ExcelUtils;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.SysLogErrorDTO;
import com.epmet.excel.SysLogErrorExcel;
import com.epmet.service.SysLogErrorService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map;
/**
* 异常日志
*
* @author Mark sunlightcs@gmail.com
* @since 1.0.0
*/
@RestController
@RequestMapping("log/error")
public class SysLogErrorController {
@Autowired
private SysLogErrorService sysLogErrorService;
@GetMapping("page")
public Result<PageData<SysLogErrorDTO>> page(@RequestParam Map<String, Object> params){
PageData<SysLogErrorDTO> page = sysLogErrorService.page(params);
return new Result<PageData<SysLogErrorDTO>>().ok(page);
}
@GetMapping("export")
public void export(@RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception {
List<SysLogErrorDTO> list = sysLogErrorService.list(params);
ExcelUtils.exportExcelToTarget(response, null, list, SysLogErrorExcel.class);
}
}

54
code/smart-community/epmet-admin/epmet-admin-server/src/main/java/com/epmet/controller/SysLogLoginController.java

@ -0,0 +1,54 @@
/**
* Copyright (c) 2018 人人开源 All rights reserved.
*
* https://www.renren.io
*
* 版权所有侵权必究
*/
package com.epmet.controller;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.utils.ExcelUtils;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.SysLogLoginDTO;
import com.epmet.excel.SysLogLoginExcel;
import com.epmet.service.SysLogLoginService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map;
/**
* 登录日志
*
* @author Mark sunlightcs@gmail.com
* @since 1.0.0
*/
@RestController
@RequestMapping("log/login")
public class SysLogLoginController {
@Autowired
private SysLogLoginService sysLogLoginService;
@GetMapping("page")
public Result<PageData<SysLogLoginDTO>> page(@RequestParam Map<String, Object> params){
PageData<SysLogLoginDTO> page = sysLogLoginService.page(params);
return new Result<PageData<SysLogLoginDTO>>().ok(page);
}
@GetMapping("export")
public void export(@RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception {
List<SysLogLoginDTO> list = sysLogLoginService.list(params);
ExcelUtils.exportExcelToTarget(response, null, list, SysLogLoginExcel.class);
}
}

54
code/smart-community/epmet-admin/epmet-admin-server/src/main/java/com/epmet/controller/SysLogOperationController.java

@ -0,0 +1,54 @@
/**
* Copyright (c) 2018 人人开源 All rights reserved.
*
* https://www.renren.io
*
* 版权所有侵权必究
*/
package com.epmet.controller;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.utils.ExcelUtils;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.SysLogOperationDTO;
import com.epmet.excel.SysLogOperationExcel;
import com.epmet.service.SysLogOperationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map;
/**
* 操作日志
*
* @author Mark sunlightcs@gmail.com
* @since 1.0.0
*/
@RestController
@RequestMapping("log/operation")
public class SysLogOperationController {
@Autowired
private SysLogOperationService sysLogOperationService;
@GetMapping("page")
public Result<PageData<SysLogOperationDTO>> page(@RequestParam Map<String, Object> params){
PageData<SysLogOperationDTO> page = sysLogOperationService.page(params);
return new Result<PageData<SysLogOperationDTO>>().ok(page);
}
@GetMapping("export")
public void export(@RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception {
List<SysLogOperationDTO> list = sysLogOperationService.list(params);
ExcelUtils.exportExcelToTarget(response, null, list, SysLogOperationExcel.class);
}
}

116
code/smart-community/epmet-admin/epmet-admin-server/src/main/java/com/epmet/controller/SysMenuController.java

@ -0,0 +1,116 @@
/**
* Copyright (c) 2018 人人开源 All rights reserved.
*
* https://www.renren.io
*
* 版权所有侵权必究
*/
package com.epmet.controller;
import com.epmet.commons.tools.exception.ErrorCode;
import com.epmet.commons.tools.security.user.UserDetail;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.AssertUtils;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.commons.tools.validator.group.DefaultGroup;
import com.epmet.dto.MenuResourceDTO;
import com.epmet.dto.SysMenuDTO;
import com.epmet.service.SysMenuService;
import com.epmet.service.SysResourceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.List;
import java.util.Set;
/**
* 菜单管理
*
* @author Mark sunlightcs@gmail.com
* @since 1.0.0
*/
@RestController
@RequestMapping("menu")
public class SysMenuController {
@Autowired
private SysMenuService sysMenuService;
@Autowired
private SysResourceService sysResourceService;
@GetMapping("nav")
public Result<List<SysMenuDTO>> nav(UserDetail userDetail){
List<SysMenuDTO> list = sysMenuService.getUserMenuNavList(userDetail);
return new Result<List<SysMenuDTO>>().ok(list);
}
@GetMapping("permissions")
public Result<Set<String>> permissions(UserDetail userDetail){
Set<String> set = sysMenuService.getUserPermissions(userDetail);
return new Result<Set<String>>().ok(set);
}
@GetMapping("list")
public Result<List<SysMenuDTO>> list(Integer type){
List<SysMenuDTO> list = sysMenuService.getMenuList(type);
return new Result<List<SysMenuDTO>>().ok(list);
}
@GetMapping("{id}")
public Result<SysMenuDTO> get(@PathVariable("id") Long id){
SysMenuDTO data = sysMenuService.get(id);
//菜单资源列表
List<MenuResourceDTO> resourceList = sysResourceService.getMenuResourceList(id);
data.setResourceList(resourceList);
return new Result<SysMenuDTO>().ok(data);
}
@PostMapping
public Result save(@RequestBody SysMenuDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, DefaultGroup.class);
sysMenuService.save(dto);
return new Result();
}
@PutMapping
public Result update(@RequestBody SysMenuDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, DefaultGroup.class);
sysMenuService.update(dto);
return new Result();
}
@DeleteMapping("{id}")
public Result delete(@PathVariable("id") Long id){
//效验数据
AssertUtils.isNull(id, "id");
//判断是否有子菜单或按钮
List<SysMenuDTO> list = sysMenuService.getListPid(id);
if(list.size() > 0){
return new Result().error(ErrorCode.SUB_MENU_EXIST);
}
sysMenuService.delete(id);
return new Result();
}
@GetMapping("select")
public Result<List<SysMenuDTO>> select(UserDetail userDetail){
List<SysMenuDTO> list = sysMenuService.getUserMenuList(userDetail, null);
return new Result<List<SysMenuDTO>>().ok(list);
}
}

44
code/smart-community/epmet-admin/epmet-admin-server/src/main/java/com/epmet/controller/SysMonitorLogController.java

@ -0,0 +1,44 @@
/**
* Copyright (c) 2018 人人开源 All rights reserved.
*
* https://www.renren.io
*
* 版权所有侵权必究
*/
package com.epmet.controller;
import com.alibaba.fastjson.JSON;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.Map;
/**
* 异常日志
*
* @author Mark sunlightcs@gmail.com
* @since 1.0.0
*/
@Slf4j
@RestController
@RequestMapping("monitorlog")
public class SysMonitorLogController {
/**
* desc: 记录监控日志
*
* @param params
* @return void
* @author LiuJanJun
* @date 2021/4/19 5:56 下午
*/
@RequestMapping("info")
public void infoLevel(@RequestBody Map<String,Object> params) {
log.info("monitor log info:{}", JSON.toJSONString(params));
}
}

112
code/smart-community/epmet-admin/epmet-admin-server/src/main/java/com/epmet/controller/SysParamsController.java

@ -0,0 +1,112 @@
/**
* Copyright (c) 2018 人人开源 All rights reserved.
*
* https://www.renren.io
*
* 版权所有侵权必究
*/
package com.epmet.controller;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.utils.ExcelUtils;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.AssertUtils;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.commons.tools.validator.group.AddGroup;
import com.epmet.commons.tools.validator.group.DefaultGroup;
import com.epmet.commons.tools.validator.group.UpdateGroup;
import com.epmet.dto.SysParamsDTO;
import com.epmet.excel.SysParamsExcel;
import com.epmet.service.SysParamsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map;
/**
* 参数管理
*
* @author Mark sunlightcs@gmail.com
* @since 1.0.0
*/
@RestController
@RequestMapping("params")
public class SysParamsController {
@Autowired
private SysParamsService sysParamsService;
@GetMapping("page")
public Result<PageData<SysParamsDTO>> page(@RequestParam Map<String, Object> params){
PageData<SysParamsDTO> page = sysParamsService.page(params);
return new Result<PageData<SysParamsDTO>>().ok(page);
}
@GetMapping("{id}")
public Result<SysParamsDTO> get(@PathVariable("id") Long id){
SysParamsDTO data = sysParamsService.get(id);
return new Result<SysParamsDTO>().ok(data);
}
@PostMapping
public Result save(@RequestBody SysParamsDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
sysParamsService.save(dto);
return new Result();
}
@PutMapping
public Result update(@RequestBody SysParamsDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
sysParamsService.update(dto);
return new Result();
}
@DeleteMapping
public Result delete(@RequestBody Long[] ids){
//效验数据
AssertUtils.isArrayEmpty(ids, "id");
sysParamsService.delete(ids);
return new Result();
}
@GetMapping("export")
public void export(@RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception {
List<SysParamsDTO> list = sysParamsService.list(params);
ExcelUtils.exportExcelToTarget(response, null, list, SysParamsExcel.class);
}
/**
* 根据参数编码获取参数值
* @param paramCode 参数编码
* @return 返回参数值
*/
@GetMapping("code/{paramCode}")
public String getValue(@PathVariable("paramCode") String paramCode){
return sysParamsService.getValue(paramCode);
}
/**
* 根据参数编码更新参数值
* @param paramCode 参数编码
* @param paramValue 参数值
*/
@PutMapping("code/{paramCode}")
public void updateValueByCode(@PathVariable("paramCode") String paramCode, @RequestParam("paramValue") String paramValue){
sysParamsService.updateValueByCode(paramCode, paramValue);
}
}

102
code/smart-community/epmet-admin/epmet-admin-server/src/main/java/com/epmet/controller/SysRegionController.java

@ -0,0 +1,102 @@
/**
* Copyright (c) 2018 人人开源 All rights reserved.
*
* https://www.renren.io
*
* 版权所有侵权必究
*/
package com.epmet.controller;
import com.epmet.commons.tools.exception.ErrorCode;
import com.epmet.commons.tools.exception.RenException;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.AssertUtils;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.commons.tools.validator.group.AddGroup;
import com.epmet.commons.tools.validator.group.DefaultGroup;
import com.epmet.commons.tools.validator.group.UpdateGroup;
import com.epmet.dto.SysRegionDTO;
import com.epmet.dto.region.RegionProvince;
import com.epmet.service.SysRegionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.List;
import java.util.Map;
/**
* 行政区域
*
* @author Mark sunlightcs@gmail.com
*/
@RestController
@RequestMapping("region")
public class SysRegionController {
@Autowired
private SysRegionService sysRegionService;
@GetMapping("list")
public Result<List<SysRegionDTO>> list(@RequestParam Map<String, Object> params){
List<SysRegionDTO> list = sysRegionService.list(params);
return new Result<List<SysRegionDTO>>().ok(list);
}
@GetMapping("tree")
public Result<List<Map<String, Object>>> tree(){
List<Map<String, Object>> list = sysRegionService.getTreeList();
return new Result<List<Map<String, Object>>>().ok(list);
}
@GetMapping("{id}")
public Result<SysRegionDTO> get(@PathVariable("id") Long id){
SysRegionDTO data = sysRegionService.get(id);
return new Result<SysRegionDTO>().ok(data);
}
@PostMapping
public Result save(@RequestBody SysRegionDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
sysRegionService.save(dto);
return new Result();
}
@PutMapping
public Result update(@RequestBody SysRegionDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
sysRegionService.update(dto);
return new Result();
}
@DeleteMapping("{id}")
public Result delete(@PathVariable("id") Long id){
//效验数据
AssertUtils.isNull(id, "id");
int count = sysRegionService.getCountByPid(id);
if(count > 0){
throw new RenException(ErrorCode.REGION_SUB_DELETE_ERROR);
}
sysRegionService.delete(id);
return new Result();
}
@GetMapping("region")
public Result<List<RegionProvince>> region(@RequestParam(value = "threeLevel", defaultValue = "true") boolean threeLevel){
List<RegionProvince> list = sysRegionService.getRegion(threeLevel);
return new Result<List<RegionProvince>>().ok(list);
}
}

39
code/smart-community/epmet-admin/epmet-admin-server/src/main/java/com/epmet/controller/SysResourceController.java

@ -0,0 +1,39 @@
/**
* Copyright (c) 2018 人人开源 All rights reserved.
*
* https://www.renren.io
*
* 版权所有侵权必究
*/
package com.epmet.controller;
import com.epmet.commons.tools.security.bo.ResourceBO;
import com.epmet.service.SysResourceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
/**
* 资源管理
*
* @author Mark sunlightcs@gmail.com
* @since 1.0.0
*/
@RestController
@RequestMapping("resource")
public class SysResourceController {
@Autowired
private SysResourceService sysResourceService;
/**
* 获取所有资源列表
*/
@GetMapping("list")
public List<ResourceBO> list(){
return sysResourceService.getResourceList();
}
}

115
code/smart-community/epmet-admin/epmet-admin-server/src/main/java/com/epmet/controller/SysRoleController.java

@ -0,0 +1,115 @@
/**
* Copyright (c) 2018 人人开源 All rights reserved.
*
* https://www.renren.io
*
* 版权所有侵权必究
*/
package com.epmet.controller;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.AssertUtils;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.commons.tools.validator.group.AddGroup;
import com.epmet.commons.tools.validator.group.DefaultGroup;
import com.epmet.commons.tools.validator.group.UpdateGroup;
import com.epmet.dto.SysRoleDTO;
import com.epmet.service.SysRoleDataScopeService;
import com.epmet.service.SysRoleMenuService;
import com.epmet.service.SysRoleService;
import com.epmet.service.SysRoleUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* 角色管理
*
* @author Mark sunlightcs@gmail.com
* @since 1.0.0
*/
@RestController
@RequestMapping("role")
public class SysRoleController {
@Autowired
private SysRoleService sysRoleService;
@Autowired
private SysRoleMenuService sysRoleMenuService;
@Autowired
private SysRoleDataScopeService sysRoleDataScopeService;
@Autowired
private SysRoleUserService sysRoleUserService;
@GetMapping("page")
public Result<PageData<SysRoleDTO>> page(@RequestParam Map<String, Object> params){
PageData<SysRoleDTO> page = sysRoleService.page(params);
return new Result<PageData<SysRoleDTO>>().ok(page);
}
@GetMapping("list")
public Result<List<SysRoleDTO>> list(){
List<SysRoleDTO> data = sysRoleService.list(new HashMap<>(1));
return new Result<List<SysRoleDTO>>().ok(data);
}
@GetMapping("{id}")
public Result<SysRoleDTO> get(@PathVariable("id") Long id){
SysRoleDTO data = sysRoleService.get(id);
//查询角色对应的菜单
List<Long> menuIdList = sysRoleMenuService.getMenuIdList(id);
data.setMenuIdList(menuIdList);
//查询角色对应的数据权限
List<Long> deptIdList = sysRoleDataScopeService.getDeptIdList(id);
data.setDeptIdList(deptIdList);
return new Result<SysRoleDTO>().ok(data);
}
@PostMapping
public Result save(@RequestBody SysRoleDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
sysRoleService.save(dto);
return new Result();
}
@PutMapping
public Result update(@RequestBody SysRoleDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
sysRoleService.update(dto);
return new Result();
}
@DeleteMapping
public Result delete(@RequestBody Long[] ids){
//效验数据
AssertUtils.isArrayEmpty(ids, "id");
sysRoleService.delete(ids);
return new Result();
}
@GetMapping("getRoleIdList")
public Result<List<Long>> getRoleIdList(Long userId){
//用户角色列表
List<Long> roleIdList = sysRoleUserService.getRoleIdList(userId);
return new Result<List<Long>>().ok(roleIdList);
}
}

180
code/smart-community/epmet-admin/epmet-admin-server/src/main/java/com/epmet/controller/SysUserController.java

@ -0,0 +1,180 @@
/**
* Copyright (c) 2018 人人开源 All rights reserved.
*
* https://www.renren.io
*
* 版权所有侵权必究
*/
package com.epmet.controller;
import com.epmet.commons.tools.exception.ErrorCode;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.security.bo.ResourceBO;
import com.epmet.commons.tools.security.password.PasswordUtils;
import com.epmet.commons.tools.security.user.SecurityUser;
import com.epmet.commons.tools.security.user.UserDetail;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.commons.tools.utils.ExcelUtils;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.AssertUtils;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.commons.tools.validator.group.AddGroup;
import com.epmet.commons.tools.validator.group.DefaultGroup;
import com.epmet.commons.tools.validator.group.UpdateGroup;
import com.epmet.dto.PasswordDTO;
import com.epmet.dto.SysUserDTO;
import com.epmet.excel.SysUserExcel;
import com.epmet.service.SysResourceService;
import com.epmet.service.SysRoleDataScopeService;
import com.epmet.service.SysRoleUserService;
import com.epmet.service.SysUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map;
/**
* 用户管理
*
* @author Mark sunlightcs@gmail.com
* @since 1.0.0
*/
@RestController
@RequestMapping("user")
public class SysUserController {
@Autowired
private SysUserService sysUserService;
@Autowired
private SysRoleUserService sysRoleUserService;
@Autowired
private SysRoleDataScopeService sysRoleDataScopeService;
@Autowired
private SysResourceService sysResourceService;
@GetMapping("page")
public Result<PageData<SysUserDTO>> page(@RequestParam Map<String, Object> params){
PageData<SysUserDTO> page = sysUserService.page(params);
return new Result<PageData<SysUserDTO>>().ok(page);
}
@GetMapping("{id}")
public Result<SysUserDTO> get(@PathVariable("id") Long id){
SysUserDTO data = sysUserService.get(id);
//用户角色列表
List<Long> roleIdList = sysRoleUserService.getRoleIdList(id);
data.setRoleIdList(roleIdList);
return new Result<SysUserDTO>().ok(data);
}
@GetMapping("info")
public Result<SysUserDTO> info(UserDetail user){
SysUserDTO data = ConvertUtils.sourceToTarget(user, SysUserDTO.class);
return new Result<SysUserDTO>().ok(data);
}
@PostMapping
public Result save(@RequestBody SysUserDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
sysUserService.save(dto);
return new Result();
}
@PutMapping
public Result update(@RequestBody SysUserDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
sysUserService.update(dto);
return new Result();
}
@PutMapping("password")
public Result password(@RequestBody PasswordDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto);
UserDetail user = SecurityUser.getUser();
//原密码不正确
if(!PasswordUtils.matches(dto.getPassword(), user.getPassword())){
return new Result().error(ErrorCode.PASSWORD_ERROR);
}
sysUserService.updatePassword(user.getId(), dto.getNewPassword());
return new Result();
}
@DeleteMapping
public Result delete(@RequestBody Long[] ids){
//效验数据
AssertUtils.isArrayEmpty(ids, "id");
sysUserService.delete(ids);
return new Result();
}
@GetMapping("export")
public void export(@RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception {
List<SysUserDTO> list = sysUserService.list(params);
ExcelUtils.exportExcelToTarget(response, null, list, SysUserExcel.class);
}
/**
* 根据用户名获取用户信息
*/
@GetMapping("getByUsername")
public Result<UserDetail> getByUsername(String username){
SysUserDTO user = sysUserService.getByUsername(username);
UserDetail userDetail = ConvertUtils.sourceToTarget(user, UserDetail.class);
//初始化用户数据
initUserData(userDetail);
return new Result<UserDetail>().ok(userDetail);
}
/**
* 根据用户ID获取用户信息
*/
@GetMapping("getById")
public Result<UserDetail> getById(Long id){
SysUserDTO user = sysUserService.get(id);
UserDetail userDetail = ConvertUtils.sourceToTarget(user, UserDetail.class);
//初始化用户数据
initUserData(userDetail);
return new Result<UserDetail>().ok(userDetail);
}
/**
* 初始化用户数据
*/
private void initUserData(UserDetail userDetail){
if(userDetail == null){
return;
}
//用户部门数据权限
List<Long> deptIdList = sysRoleDataScopeService.getDataScopeList(userDetail.getId());
userDetail.setDeptIdList(deptIdList);
//用户资源列表
List<ResourceBO> resourceList = sysResourceService.getUserResourceList(userDetail.getId());
userDetail.setResourceList(resourceList);
}
}

33
code/smart-community/epmet-admin/epmet-admin-server/src/main/java/com/epmet/dao/CorsConfigDao.java

@ -0,0 +1,33 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.entity.CorsConfigEntity;
import org.apache.ibatis.annotations.Mapper;
/**
* 跨域配置表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-06-25
*/
@Mapper
public interface CorsConfigDao extends BaseDao<CorsConfigEntity> {
}

50
code/smart-community/epmet-admin/epmet-admin-server/src/main/java/com/epmet/dao/LogOperationDao.java

@ -0,0 +1,50 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dto.ComplementLogOperationDTO;
import com.epmet.dto.region.LogOperationResultDTO;
import com.epmet.entity.LogOperationEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.Map;
/**
* 操作日指标
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-06-07
*/
@Mapper
public interface LogOperationDao extends BaseDao<LogOperationEntity> {
List<LogOperationResultDTO> pageList(@Param("customerId") String customerId,
@Param("startTime")String startTime,
@Param("endTime")String endTime,
@Param("operatorName")String operatorName,
@Param("operatorMobile")String operatorMobile,
@Param("category")String category);
List<Map<String,String>> getStaffId();
void updateBatchLog(@Param("list") List<ComplementLogOperationDTO> list);
}

28
code/smart-community/epmet-admin/epmet-admin-server/src/main/java/com/epmet/dao/NewsDao.java

@ -0,0 +1,28 @@
/**
* Copyright (c) 2018 人人开源 All rights reserved.
*
* https://www.renren.io
*
* 版权所有侵权必究
*/
package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.entity.NewsEntity;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
import java.util.Map;
/**
* 新闻
*
* @author Mark sunlightcs@gmail.com
*/
@Mapper
public interface NewsDao extends BaseDao<NewsEntity> {
List<NewsEntity> getList(Map<String, Object> params);
}

41
code/smart-community/epmet-admin/epmet-admin-server/src/main/java/com/epmet/dao/SysDeptDao.java

@ -0,0 +1,41 @@
/**
* Copyright (c) 2018 人人开源 All rights reserved.
*
* https://www.renren.io
*
* 版权所有侵权必究
*/
package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.entity.SysDeptEntity;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
import java.util.Map;
/**
* 部门管理
*
* @author Mark sunlightcs@gmail.com
* @since 1.0.0
*/
@Mapper
public interface SysDeptDao extends BaseDao<SysDeptEntity> {
List<SysDeptEntity> getList(Map<String, Object> params);
SysDeptEntity getById(Long id);
/**
* 获取所有部门的idpid列表
*/
List<SysDeptEntity> getIdAndPidList();
/**
* 根据部门ID获取所有子部门ID列表
* @param id 部门ID
*/
List<Long> getSubDeptIdList(String id);
}

39
code/smart-community/epmet-admin/epmet-admin-server/src/main/java/com/epmet/dao/SysDictDataDao.java

@ -0,0 +1,39 @@
/**
* Copyright (c) 2018 人人开源 All rights reserved.
*
* https://www.renren.io
*
* 版权所有侵权必究
*/
package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.commons.tools.dto.result.DictListResultDTO;
import com.epmet.commons.tools.dto.result.DictTreeResultDTO;
import com.epmet.dto.SysDictDataDTO;
import com.epmet.entity.DictData;
import com.epmet.entity.SysDictDataEntity;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
/**
* 字典数据
*
* @author Mark sunlightcs@gmail.com
*/
@Mapper
public interface SysDictDataDao extends BaseDao<SysDictDataEntity> {
/**
* 字典数据列表
*/
List<DictData> getDictDataList();
List<DictListResultDTO> selectDictList(String dictType);
List<DictTreeResultDTO> selectDictData(String dictType);
List<SysDictDataDTO> selectDictDataList(String dictType);
}

31
code/smart-community/epmet-admin/epmet-admin-server/src/main/java/com/epmet/dao/SysDictTypeDao.java

@ -0,0 +1,31 @@
/**
* Copyright (c) 2018 人人开源 All rights reserved.
*
* https://www.renren.io
*
* 版权所有侵权必究
*/
package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.entity.DictType;
import com.epmet.entity.SysDictTypeEntity;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
/**
* 字典类型
*
* @author Mark sunlightcs@gmail.com
*/
@Mapper
public interface SysDictTypeDao extends BaseDao<SysDictTypeEntity> {
/**
* 字典类型列表
*/
List<DictType> getDictTypeList();
}

27
code/smart-community/epmet-admin/epmet-admin-server/src/main/java/com/epmet/dao/SysLanguageDao.java

@ -0,0 +1,27 @@
/**
* Copyright (c) 2018 人人开源 All rights reserved.
*
* https://www.renren.io
*
* 版权所有侵权必究
*/
package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.entity.SysLanguageEntity;
import org.apache.ibatis.annotations.Mapper;
/**
* 国际化
*
* @author Mark sunlightcs@gmail.com
*/
@Mapper
public interface SysLanguageDao extends BaseDao<SysLanguageEntity> {
SysLanguageEntity getLanguage(SysLanguageEntity entity);
void updateLanguage(SysLanguageEntity entity);
}

24
code/smart-community/epmet-admin/epmet-admin-server/src/main/java/com/epmet/dao/SysLogErrorDao.java

@ -0,0 +1,24 @@
/**
* Copyright (c) 2018 人人开源 All rights reserved.
*
* https://www.renren.io
*
* 版权所有侵权必究
*/
package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.entity.SysLogErrorEntity;
import org.apache.ibatis.annotations.Mapper;
/**
* 异常日志
*
* @author Mark sunlightcs@gmail.com
* @since 1.0.0
*/
@Mapper
public interface SysLogErrorDao extends BaseDao<SysLogErrorEntity> {
}

24
code/smart-community/epmet-admin/epmet-admin-server/src/main/java/com/epmet/dao/SysLogLoginDao.java

@ -0,0 +1,24 @@
/**
* Copyright (c) 2018 人人开源 All rights reserved.
*
* https://www.renren.io
*
* 版权所有侵权必究
*/
package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.entity.SysLogLoginEntity;
import org.apache.ibatis.annotations.Mapper;
/**
* 登录日志
*
* @author Mark sunlightcs@gmail.com
* @since 1.0.0
*/
@Mapper
public interface SysLogLoginDao extends BaseDao<SysLogLoginEntity> {
}

24
code/smart-community/epmet-admin/epmet-admin-server/src/main/java/com/epmet/dao/SysLogOperationDao.java

@ -0,0 +1,24 @@
/**
* Copyright (c) 2018 人人开源 All rights reserved.
*
* https://www.renren.io
*
* 版权所有侵权必究
*/
package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.entity.SysLogOperationEntity;
import org.apache.ibatis.annotations.Mapper;
/**
* 操作日志
*
* @author Mark sunlightcs@gmail.com
* @since 1.0.0
*/
@Mapper
public interface SysLogOperationDao extends BaseDao<SysLogOperationEntity> {
}

52
code/smart-community/epmet-admin/epmet-admin-server/src/main/java/com/epmet/dao/SysMenuDao.java

@ -0,0 +1,52 @@
/**
* Copyright (c) 2018 人人开源 All rights reserved.
*
* https://www.renren.io
*
* 版权所有侵权必究
*/
package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.entity.SysMenuEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 菜单管理
*
* @author Mark sunlightcs@gmail.com
* @since 1.0.0
*/
@Mapper
public interface SysMenuDao extends BaseDao<SysMenuEntity> {
SysMenuEntity getById(@Param("id") Long id, @Param("language") String language);
/**
* 查询所有菜单列表
*
* @param type 菜单类型
* @param language 语言
*/
List<SysMenuEntity> getMenuList(@Param("type") Integer type, @Param("language") String language);
/**
* 查询用户菜单列表
*
* @param userId 用户ID
* @param type 菜单类型
* @param language 语言
*/
List<SysMenuEntity> getUserMenuList(@Param("userId") Long userId, @Param("type") Integer type, @Param("language") String language);
/**
* 根据父菜单查询子菜单
* @param pid 父菜单ID
*/
List<SysMenuEntity> getListPid(Long pid);
}

46
code/smart-community/epmet-admin/epmet-admin-server/src/main/java/com/epmet/dao/SysParamsDao.java

@ -0,0 +1,46 @@
/**
* Copyright (c) 2018 人人开源 All rights reserved.
*
* https://www.renren.io
*
* 版权所有侵权必究
*/
package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.entity.SysParamsEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 参数管理
*
* @author Mark sunlightcs@gmail.com
* @since 1.0.0
*/
@Mapper
public interface SysParamsDao extends BaseDao<SysParamsEntity> {
/**
* 根据参数编码查询value
* @param paramCode 参数编码
* @return 参数值
*/
String getValueByCode(String paramCode);
/**
* 获取参数编码列表
* @param ids ids
* @return 返回参数编码列表
*/
List<String> getParamCodeList(Long[] ids);
/**
* 根据参数编码更新value
* @param paramCode 参数编码
* @param paramValue 参数值
*/
int updateValueByCode(@Param("paramCode") String paramCode, @Param("paramValue") String paramValue);
}

28
code/smart-community/epmet-admin/epmet-admin-server/src/main/java/com/epmet/dao/SysRegionDao.java

@ -0,0 +1,28 @@
package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.entity.SysRegionEntity;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
import java.util.Map;
/**
* 行政区域
*
* @author Mark sunlightcs@gmail.com
*/
@Mapper
public interface SysRegionDao extends BaseDao<SysRegionEntity> {
List<SysRegionEntity> getList(Map<String, Object> params);
List<SysRegionEntity> getListByLevel(Integer treeLevel);
List<Map<String, Object>> getTreeList();
SysRegionEntity getById(Long id);
int getCountByPid(Long pid);
}

48
code/smart-community/epmet-admin/epmet-admin-server/src/main/java/com/epmet/dao/SysResourceDao.java

@ -0,0 +1,48 @@
/**
* Copyright (c) 2018 人人开源 All rights reserved.
*
* https://www.renren.io
*
* 版权所有侵权必究
*/
package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.entity.SysResourceEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 资源管理
*
* @author Mark sunlightcs@gmail.com
* @since 1.0.0
*/
@Mapper
public interface SysResourceDao extends BaseDao<SysResourceEntity> {
/**
* 根据资源编码删除对应的资源
* @param code 资源编码
*/
void deleteByCode(String code);
/**
* 获取资源列表
* @param menuId 菜单ID
*/
List<SysResourceEntity> getMenuResourceList(String menuId);
/**
* 获取所有资源列表
*/
List<SysResourceEntity> getResourceList();
/**
* 获取用户资源列表
* @param userId 用户ID
*/
List<SysResourceEntity> getUserResourceList(@Param("userId") Long userId);
}

24
code/smart-community/epmet-admin/epmet-admin-server/src/main/java/com/epmet/dao/SysRoleDao.java

@ -0,0 +1,24 @@
/**
* Copyright (c) 2018 人人开源 All rights reserved.
*
* https://www.renren.io
*
* 版权所有侵权必究
*/
package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.entity.SysRoleEntity;
import org.apache.ibatis.annotations.Mapper;
/**
* 角色管理
*
* @author Mark sunlightcs@gmail.com
* @since 1.0.0
*/
@Mapper
public interface SysRoleDao extends BaseDao<SysRoleEntity> {
}

41
code/smart-community/epmet-admin/epmet-admin-server/src/main/java/com/epmet/dao/SysRoleDataScopeDao.java

@ -0,0 +1,41 @@
/**
* Copyright (c) 2018 人人开源 All rights reserved.
*
* https://www.renren.io
*
* 版权所有侵权必究
*/
package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.entity.SysRoleDataScopeEntity;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
/**
* 角色数据权限
*
* @author Mark sunlightcs@gmail.com
* @since 1.0.0
*/
@Mapper
public interface SysRoleDataScopeDao extends BaseDao<SysRoleDataScopeEntity> {
/**
* 根据角色ID获取部门ID列表
*/
List<Long> getDeptIdList(Long roleId);
/**
* 获取用户的部门数据权限列表
*/
List<Long> getDataScopeList(Long userId);
/**
* 根据角色id删除角色数据权限关系
* @param roleId 角色id
*/
void deleteByRoleId(Long roleId);
}

42
code/smart-community/epmet-admin/epmet-admin-server/src/main/java/com/epmet/dao/SysRoleMenuDao.java

@ -0,0 +1,42 @@
/**
* Copyright (c) 2018 人人开源 All rights reserved.
*
* https://www.renren.io
*
* 版权所有侵权必究
*/
package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.entity.SysRoleMenuEntity;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
/**
* 角色菜单关系
*
* @author Mark sunlightcs@gmail.com
* @since 1.0.0
*/
@Mapper
public interface SysRoleMenuDao extends BaseDao<SysRoleMenuEntity> {
/**
* 根据角色ID获取菜单ID列表
*/
List<Long> getMenuIdList(Long roleId);
/**
* 根据角色id删除角色菜单关系
* @param roleId 角色id
*/
void deleteByRoleId(Long roleId);
/**
* 根据菜单id删除角色菜单关系
* @param menuId 菜单id
*/
void deleteByMenuId(Long menuId);
}

45
code/smart-community/epmet-admin/epmet-admin-server/src/main/java/com/epmet/dao/SysRoleUserDao.java

@ -0,0 +1,45 @@
/**
* Copyright (c) 2018 人人开源 All rights reserved.
*
* https://www.renren.io
*
* 版权所有侵权必究
*/
package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.entity.SysRoleUserEntity;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
/**
* 角色用户关系
*
* @author Mark sunlightcs@gmail.com
* @since 1.0.0
*/
@Mapper
public interface SysRoleUserDao extends BaseDao<SysRoleUserEntity> {
/**
* 根据角色ids删除角色用户关系
* @param roleIds 角色ids
*/
void deleteByRoleIds(Long[] roleIds);
/**
* 根据用户id删除角色用户关系
* @param userId 用户id
*/
void deleteByUserId(Long userId);
/**
* 角色ID列表
* @param userId 用户ID
*
* @return
*/
List<Long> getRoleIdList(Long userId);
}

41
code/smart-community/epmet-admin/epmet-admin-server/src/main/java/com/epmet/dao/SysUserDao.java

@ -0,0 +1,41 @@
/**
* Copyright (c) 2018 人人开源 All rights reserved.
*
* https://www.renren.io
*
* 版权所有侵权必究
*/
package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.entity.SysUserEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.Map;
/**
* 用户管理
*
* @author Mark sunlightcs@gmail.com
* @since 1.0.0
*/
@Mapper
public interface SysUserDao extends BaseDao<SysUserEntity> {
List<SysUserEntity> getList(Map<String, Object> params);
SysUserEntity getById(Long id);
SysUserEntity getByUsername(String username);
int updatePassword(@Param("id") Long id, @Param("newPassword") String newPassword);
/**
* 根据部门ID查询用户数
*/
int getCountByDeptId(Long deptId);
}

53
code/smart-community/epmet-admin/epmet-admin-server/src/main/java/com/epmet/entity/CorsConfigEntity.java

@ -0,0 +1,53 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.epmet.commons.mybatis.entity.BaseEpmetEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* 跨域配置表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-06-25
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("cors_config")
public class CorsConfigEntity extends BaseEpmetEntity {
private static final long serialVersionUID = 1L;
/**
* 首部类型
*/
private String headerType;
/**
* 首部值
*/
private String headerValue;
/**
* 说明
*/
private String comment;
}

25
code/smart-community/epmet-admin/epmet-admin-server/src/main/java/com/epmet/entity/DictData.java

@ -0,0 +1,25 @@
/**
* Copyright (c) 2019 人人开源 All rights reserved.
* <p>
* https://www.renren.io
* <p>
* 版权所有侵权必究
*/
package com.epmet.entity;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Data;
/**
* 字典数据
*
* @author Mark sunlightcs@gmail.com
*/
@Data
public class DictData {
@JsonIgnore
private Long dictTypeId;
private String dictLabel;
private String dictValue;
}

28
code/smart-community/epmet-admin/epmet-admin-server/src/main/java/com/epmet/entity/DictType.java

@ -0,0 +1,28 @@
/**
* Copyright (c) 2019 人人开源 All rights reserved.
* <p>
* https://www.renren.io
* <p>
* 版权所有侵权必究
*/
package com.epmet.entity;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Data;
import java.util.ArrayList;
import java.util.List;
/**
* 字典类型
*
* @author Mark sunlightcs@gmail.com
*/
@Data
public class DictType {
@JsonIgnore
private Long id;
private String dictType;
private List<DictData> dataList = new ArrayList<>();
}

90
code/smart-community/epmet-admin/epmet-admin-server/src/main/java/com/epmet/entity/LogOperationEntity.java

@ -0,0 +1,90 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.epmet.commons.mybatis.entity.BaseEpmetEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;
/**
* 操作日指标
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-06-07
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("log_operation")
public class LogOperationEntity extends BaseEpmetEntity {
private static final long serialVersionUID = 1L;
/**
* 大类别登录login项目流转project
*/
private String category;
/**
* 类型枚举,小类别登录loginlogout退出shift_project议题转项目等
*/
private String type;
private String typeDisplay;
private String ip;
private String fromApp;
private String fromClient;
/**
* 内容
*/
private String content;
/**
* 操作目标ID
*/
private String targetId;
private String customerId;
/**
* 操作人ID
*/
private String operatorId;
/**
* 操作人姓名
*/
private String operatorName;
/**
* 操作人手机号
*/
private String operatorMobile;
private String orgId;
private String orgIdPath;
/**
* 操作时间,该时间不是插入数据的时间而是操作发生的真实时间
*/
private Date operatingTime;
}

58
code/smart-community/epmet-admin/epmet-admin-server/src/main/java/com/epmet/entity/NewsEntity.java

@ -0,0 +1,58 @@
/**
* Copyright (c) 2018 人人开源 All rights reserved.
*
* https://www.renren.io
*
* 版权所有侵权必究
*/
package com.epmet.entity;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.epmet.commons.mybatis.entity.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;
/**
* 新闻
*
* @author Mark sunlightcs@gmail.com
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("tb_news")
public class NewsEntity extends BaseEntity {
private static final long serialVersionUID = 1L;
/**
* 标题
*/
private String title;
/**
* 内容
*/
private String content;
/**
* 发布时间
*/
private Date pubDate;
/**
* 创建者dept_id
*/
@TableField(fill = FieldFill.INSERT)
private Long deptId;
/**
* 更新者
*/
@TableField(fill = FieldFill.INSERT_UPDATE)
private Long updater;
/**
* 更新时间
*/
@TableField(fill = FieldFill.INSERT_UPDATE)
private Date updateDate;
}

70
code/smart-community/epmet-admin/epmet-admin-server/src/main/java/com/epmet/entity/SysDeptEntity.java

@ -0,0 +1,70 @@
/**
* Copyright (c) 2018 人人开源 All rights reserved.
*
* https://www.renren.io
*
* 版权所有侵权必究
*/
package com.epmet.entity;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.epmet.commons.mybatis.entity.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;
/**
* 部门管理
*
* @author Mark sunlightcs@gmail.com
* @since 1.0.0
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("sys_dept")
public class SysDeptEntity extends BaseEntity {
private static final long serialVersionUID = 1L;
/**
* 上级ID
*/
private Long pid;
/**
* 所有上级ID用逗号分开
*/
private String pids;
/**
* 部门名称
*/
private String name;
/**
* 排序
*/
private Integer sort;
/**
* 删除标识 0未删除 1删除
*/
@TableField(fill = FieldFill.INSERT)
private Integer delFlag;
/**
* 更新者
*/
@TableField(fill = FieldFill.INSERT_UPDATE)
private Long updater;
/**
* 更新时间
*/
@TableField(fill = FieldFill.INSERT_UPDATE)
private Date updateDate;
/**
* 上级部门名称
*/
@TableField(exist = false)
private String parentName;
}

54
code/smart-community/epmet-admin/epmet-admin-server/src/main/java/com/epmet/entity/SysDictDataEntity.java

@ -0,0 +1,54 @@
/**
* Copyright (c) 2018 人人开源 All rights reserved.
*
* https://www.renren.io
*
* 版权所有侵权必究
*/
package com.epmet.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.epmet.commons.mybatis.entity.BaseEpmetEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* 数据字典
*
* @author Mark sunlightcs@gmail.com
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("sys_dict_data")
public class SysDictDataEntity extends BaseEpmetEntity {
private static final long serialVersionUID = 1L;
@TableId(type = IdType.ID_WORKER_STR)
private String id;
/**
* 字典类型ID
*/
private Long dictTypeId;
/**
* 字典标签
*/
private String dictLabel;
/**
* 字典值
*/
private String dictValue;
/**
* 父级字典值 顶级0
*/
private String dictPValue;
/**
* 备注
*/
private String remark;
/**
* 排序
*/
private Integer sort;
}

47
code/smart-community/epmet-admin/epmet-admin-server/src/main/java/com/epmet/entity/SysDictTypeEntity.java

@ -0,0 +1,47 @@
/**
* Copyright (c) 2018 人人开源 All rights reserved.
*
* https://www.renren.io
*
* 版权所有侵权必究
*/
package com.epmet.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.epmet.commons.mybatis.entity.BaseEpmetEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* 字典类型
*
* @author Mark sunlightcs@gmail.com
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("sys_dict_type")
public class SysDictTypeEntity extends BaseEpmetEntity {
private static final long serialVersionUID = 1L;
@TableId(type = IdType.ID_WORKER_STR)
private String id;
/**
* 字典类型
*/
private String dictType;
/**
* 字典名称
*/
private String dictName;
/**
* 备注
*/
private String remark;
/**
* 排序
*/
private Integer sort;
}

49
code/smart-community/epmet-admin/epmet-admin-server/src/main/java/com/epmet/entity/SysLanguageEntity.java

@ -0,0 +1,49 @@
/**
* Copyright (c) 2018 人人开源 All rights reserved.
*
* https://www.renren.io
*
* 版权所有侵权必究
*/
package com.epmet.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serializable;
/**
* 国际化
*
* @author Mark sunlightcs@gmail.com
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("sys_language")
public class SysLanguageEntity implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 表名
*/
private String tableName;
/**
* 表主键
*/
private Long tableId;
/**
* 字段名
*/
private String fieldName;
/**
* 字段值
*/
private String fieldValue;
/**
* 语言
*/
private String language;
}

71
code/smart-community/epmet-admin/epmet-admin-server/src/main/java/com/epmet/entity/SysLogErrorEntity.java

@ -0,0 +1,71 @@
/**
* Copyright (c) 2018 人人开源 All rights reserved.
*
* https://www.renren.io
*
* 版权所有侵权必究
*/
package com.epmet.entity;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* 异常日志
*
* @author Mark sunlightcs@gmail.com
* @since 1.0.0
*/
@Data
@TableName("sys_log_error")
public class SysLogErrorEntity implements Serializable {
private static final long serialVersionUID = 1L;
/**
* id
*/
@TableId
private Long id;
/**
* 模块名称sys
*/
private String module;
/**
* 请求URI
*/
private String requestUri;
/**
* 请求方式
*/
private String requestMethod;
/**
* 请求参数
*/
private String requestParams;
/**
* 用户代理
*/
private String userAgent;
/**
* 操作IP
*/
private String ip;
/**
* 异常信息
*/
private String errorInfo;
/**
* 创建者
*/
private String creator;
/**
* 创建时间
*/
private Date createDate;
}

63
code/smart-community/epmet-admin/epmet-admin-server/src/main/java/com/epmet/entity/SysLogLoginEntity.java

@ -0,0 +1,63 @@
/**
* Copyright (c) 2018 人人开源 All rights reserved.
*
* https://www.renren.io
*
* 版权所有侵权必究
*/
package com.epmet.entity;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* 登录日志
*
* @author Mark sunlightcs@gmail.com
* @since 1.0.0
*/
@Data
@TableName("sys_log_login")
public class SysLogLoginEntity implements Serializable {
private static final long serialVersionUID = 1L;
/**
* id
*/
@TableId
private Long id;
/**
* 用户操作 0用户登录 1用户退出
*/
private Integer operation;
/**
* 状态 0失败 1成功 2账号已锁定
*/
private Integer status;
/**
* 用户代理
*/
private String userAgent;
/**
* 操作IP
*/
private String ip;
/**
* 用户名
*/
private String creatorName;
/**
* 创建者
*/
private Long creator;
/**
* 创建时间
*/
private Date createDate;
}

82
code/smart-community/epmet-admin/epmet-admin-server/src/main/java/com/epmet/entity/SysLogOperationEntity.java

@ -0,0 +1,82 @@
/**
* Copyright (c) 2018 人人开源 All rights reserved.
*
* https://www.renren.io
*
* 版权所有侵权必究
*/
package com.epmet.entity;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* 操作日志
*
* @author Mark sunlightcs@gmail.com
* @since 1.0.0
*/
@Data
@TableName("sys_log_operation")
public class SysLogOperationEntity implements Serializable {
private static final long serialVersionUID = 1L;
/**
* id
*/
@TableId
private Long id;
/**
* 模块名称sys
*/
private String module;
/**
* 用户操作
*/
private String operation;
/**
* 请求URI
*/
private String requestUri;
/**
* 请求方式
*/
private String requestMethod;
/**
* 请求参数
*/
private String requestParams;
/**
* 请求时长(毫秒)
*/
private Integer requestTime;
/**
* 用户代理
*/
private String userAgent;
/**
* 操作IP
*/
private String ip;
/**
* 状态 0失败 1成功
*/
private Integer status;
/**
* 用户名
*/
private String creatorName;
/**
* 创建者
*/
private Long creator;
/**
* 创建时间
*/
private Date createDate;
}

83
code/smart-community/epmet-admin/epmet-admin-server/src/main/java/com/epmet/entity/SysMenuEntity.java

@ -0,0 +1,83 @@
/**
* Copyright (c) 2018 人人开源 All rights reserved.
*
* https://www.renren.io
*
* 版权所有侵权必究
*/
package com.epmet.entity;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.epmet.commons.mybatis.entity.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;
/**
* 菜单管理
*
* @author Mark sunlightcs@gmail.com
* @since 1.0.0
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("sys_menu")
public class SysMenuEntity extends BaseEntity {
private static final long serialVersionUID = 1L;
/**
* 上级ID一级菜单为0
*/
private Long pid;
/**
* 菜单名称
*/
@TableField(exist = false)
private String name;
/**
* 菜单URL
*/
private String url;
/**
* 类型 0菜单 1按钮
*/
private Integer type;
/**
* 菜单图标
*/
private String icon;
/**
* 权限标识sys:menu:save
*/
private String permissions;
/**
* 排序
*/
private Integer sort;
/**
* 删除标识 0未删除 1删除
*/
@TableField(fill = FieldFill.INSERT)
private Integer delFlag;
/**
* 更新者
*/
@TableField(fill = FieldFill.INSERT_UPDATE)
private Long updater;
/**
* 更新时间
*/
@TableField(fill = FieldFill.INSERT_UPDATE)
private Date updateDate;
/**
* 上级菜单名称
*/
@TableField(exist = false)
private String parentName;
}

64
code/smart-community/epmet-admin/epmet-admin-server/src/main/java/com/epmet/entity/SysParamsEntity.java

@ -0,0 +1,64 @@
/**
* Copyright (c) 2018 人人开源 All rights reserved.
*
* https://www.renren.io
*
* 版权所有侵权必究
*/
package com.epmet.entity;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.epmet.commons.mybatis.entity.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;
/**
* 参数管理
*
* @author Mark sunlightcs@gmail.com
* @since 1.0.0
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("sys_params")
public class SysParamsEntity extends BaseEntity {
private static final long serialVersionUID = 1L;
/**
* 参数编码
*/
private String paramCode;
/**
* 参数值
*/
private String paramValue;
/**
* 类型 0系统参数 1非系统参数
*/
private Integer paramType;
/**
* 备注
*/
private String remark;
/**
* 删除标识 0未删除 1删除
*/
@TableField(fill = FieldFill.INSERT)
private Integer delFlag;
/**
* 更新者
*/
@TableField(fill = FieldFill.INSERT_UPDATE)
private Long updater;
/**
* 更新时间
*/
@TableField(fill = FieldFill.INSERT_UPDATE)
private Date updateDate;
}

77
code/smart-community/epmet-admin/epmet-admin-server/src/main/java/com/epmet/entity/SysRegionEntity.java

@ -0,0 +1,77 @@
/**
* Copyright (c) 2018 人人开源 All rights reserved.
*
* https://www.renren.io
*
* 版权所有侵权必究
*/
package com.epmet.entity;
import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* 行政区域
*
* @author Mark sunlightcs@gmail.com
*/
@Data
@TableName("sys_region")
public class SysRegionEntity implements Serializable {
private static final long serialVersionUID = 1L;
/**
* id
*/
@TableId(type = IdType.INPUT)
private Long id;
/**
* 上级ID一级为0
*/
private Long pid;
/**
* 名称
*/
private String name;
/**
* 层级
*/
private Integer treeLevel;
/**
* 排序
*/
private Long sort;
/**
* 是否叶子节点 0 1
*/
private Integer leaf;
/**
* 创建者
*/
@TableField(fill = FieldFill.INSERT)
private Long creator;
/**
* 创建时间
*/
@TableField(fill = FieldFill.INSERT)
private Date createDate;
/**
* 更新者
*/
@TableField(fill = FieldFill.INSERT_UPDATE)
private Long updater;
/**
* 更新时间
*/
@TableField(fill = FieldFill.INSERT_UPDATE)
private Date updateDate;
/**
* 上级名称
*/
@TableField(exist = false)
private String parentName;
}

67
code/smart-community/epmet-admin/epmet-admin-server/src/main/java/com/epmet/entity/SysResourceEntity.java

@ -0,0 +1,67 @@
/**
* Copyright (c) 2018 人人开源 All rights reserved.
*
* https://www.renren.io
*
* 版权所有侵权必究
*/
package com.epmet.entity;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.epmet.commons.mybatis.entity.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;
/**
* 资源管理
*
* @author Mark sunlightcs@gmail.com
* @since 1.0.0
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("sys_resource")
public class SysResourceEntity extends BaseEntity {
private static final long serialVersionUID = 1L;
/**
* 资源编码如菜单ID
*/
private String resourceCode;
/**
* 资源名称
*/
private String resourceName;
/**
* 资源URL
*/
private String resourceUrl;
/**
* 请求方式GETPOSTPUTDELETE
*/
private String resourceMethod;
/**
* 菜单标识 0非菜单资源 1菜单资源
*/
private Integer menuFlag;
/**
* 认证等级 0权限认证 1登录认证 2无需认证
*/
private Integer authLevel;
/**
* 更新者
*/
@TableField(fill = FieldFill.INSERT_UPDATE)
private Long updater;
/**
* 更新时间
*/
@TableField(fill = FieldFill.INSERT_UPDATE)
private Date updateDate;
}

40
code/smart-community/epmet-admin/epmet-admin-server/src/main/java/com/epmet/entity/SysRoleDataScopeEntity.java

@ -0,0 +1,40 @@
/**
* Copyright (c) 2018 人人开源 All rights reserved.
*
* https://www.renren.io
*
* 版权所有侵权必究
*/
package com.epmet.entity;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.epmet.commons.mybatis.entity.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* 角色数据权限
*
* @author Mark sunlightcs@gmail.com
* @since 1.0.0
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("sys_role_data_scope")
public class SysRoleDataScopeEntity extends BaseEntity {
private static final long serialVersionUID = 1L;
/**
* 角色ID
*/
private Long roleId;
/**
* 部门ID
*/
@TableField(fill = FieldFill.DEFAULT)
private Long deptId;
}

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

Loading…
Cancel
Save