Selaa lähdekoodia

Merge remote-tracking branch 'origin/V0.0.2' into V0.0.2

jingyuanchao 2 vuotta sitten
vanhempi
commit
9df7956db0
27 muutettua tiedostoa jossa 1501 lisäystä ja 1 poistoa
  1. 199 0
      project_data/sql/0.0.2/soc/soc.sql
  2. 6 0
      soc-api/soc-api-system/src/main/java/com/xunmei/system/api/RemoteUserService.java
  3. 12 0
      soc-api/soc-api-system/src/main/java/com/xunmei/system/api/factory/RemoteUserFallbackFactory.java
  4. 96 0
      soc-common/soc-common-core/src/main/java/com/xunmei/common/core/domain/message/domain/CoreAnnouncementNotification.java
  5. 39 0
      soc-common/soc-common-core/src/main/java/com/xunmei/common/core/domain/message/domain/CoreAnnouncementNotificationToOrg.java
  6. 38 0
      soc-common/soc-common-core/src/main/java/com/xunmei/common/core/domain/message/domain/CoreAnnouncementNotificationToRole.java
  7. 48 0
      soc-common/soc-common-core/src/main/java/com/xunmei/common/core/domain/message/domain/CoreAnnouncementNotificationToUser.java
  8. 81 0
      soc-common/soc-common-core/src/main/java/com/xunmei/common/core/domain/message/dto/CoreAnnouncementNotificationDto.java
  9. 48 0
      soc-common/soc-common-core/src/main/java/com/xunmei/common/core/domain/message/dto/CoreAnnouncementNotificationPageDto.java
  10. 78 0
      soc-common/soc-common-core/src/main/java/com/xunmei/common/core/domain/message/vo/CoreAnnouncementNotificationPageVo.java
  11. 21 0
      soc-common/soc-common-core/src/main/java/com/xunmei/common/core/domain/weather/vo/CityInfoVo.java
  12. 23 0
      soc-common/soc-common-core/src/main/java/com/xunmei/common/core/domain/weather/vo/SelectCityInfoVo.java
  13. 103 0
      soc-modules/soc-modules-core/src/main/java/com/xunmei/core/message/controller/CoreAnnouncementNotificationController.java
  14. 82 0
      soc-modules/soc-modules-core/src/main/java/com/xunmei/core/message/mapper/CoreAnnouncementNotificationMapper.java
  15. 76 0
      soc-modules/soc-modules-core/src/main/java/com/xunmei/core/message/service/ICoreAnnouncementNotificationService.java
  16. 260 0
      soc-modules/soc-modules-core/src/main/java/com/xunmei/core/message/service/impl/CoreAnnouncementNotificationServiceImpl.java
  17. 9 1
      soc-modules/soc-modules-core/src/main/java/com/xunmei/core/weather/controller/WeatherWarningController.java
  18. 3 0
      soc-modules/soc-modules-core/src/main/java/com/xunmei/core/weather/mapper/WeatherWarningMapper.java
  19. 4 0
      soc-modules/soc-modules-core/src/main/java/com/xunmei/core/weather/service/IWeatherWarningService.java
  20. 18 0
      soc-modules/soc-modules-core/src/main/java/com/xunmei/core/weather/service/impl/WeatherWarningServiceImpl.java
  21. 221 0
      soc-modules/soc-modules-core/src/main/resources/mapper/message/CoreAnnouncementNotificationMapper.xml
  22. 3 0
      soc-modules/soc-modules-core/src/main/resources/mapper/weather/WeatherWarningMapper.xml
  23. 14 0
      soc-modules/soc-modules-system/src/main/java/com/xunmei/system/controller/SysUserController.java
  24. 3 0
      soc-modules/soc-modules-system/src/main/java/com/xunmei/system/mapper/SysUserMapper.java
  25. 3 0
      soc-modules/soc-modules-system/src/main/java/com/xunmei/system/service/ISysUserService.java
  26. 6 0
      soc-modules/soc-modules-system/src/main/java/com/xunmei/system/service/impl/SysUserServiceImpl.java
  27. 7 0
      soc-modules/soc-modules-system/src/main/resources/mapper/system/SysUserMapper.xml

+ 199 - 0
project_data/sql/0.0.2/soc/soc.sql

@@ -136,3 +136,202 @@ INSERT INTO sys_dict_data ( dict_sort, dict_label, dict_value, dict_type, css_cl
 INSERT INTO sys_dict_data ( dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, update_by, update_time, remark) VALUES ( 0, '省级优秀案例', '5', 'drill_task_rec_status', null, 'default', 'N', '0', '超级管理员', now(), '', null, null);
 
 
+-- 公告通知start
+delete from sys_dict_type where dict_id in(149,150);
+INSERT INTO `sys_dict_type`(`dict_id`, `dict_name`, `dict_type`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (149, '消息类型', 'messag_type', '0', '超级管理员', '2023-09-13 17:03:11', '超级管理员', '2023-09-13 17:07:06', NULL);
+INSERT INTO `sys_dict_type`(`dict_id`, `dict_name`, `dict_type`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (150, '消息状态', 'message_status', '0', '超级管理员', '2023-09-13 17:08:11', '', NULL, NULL);
+
+delete from sys_dict_data where dict_code in(356,357,358,359);
+INSERT INTO `sys_dict_data`(`dict_code`, `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (356, 0, '公告', '0', 'messag_type', NULL, 'default', 'N', '0', '超级管理员', '2023-09-13 17:06:33', '', NULL, NULL);
+INSERT INTO `sys_dict_data`(`dict_code`, `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (357, 0, '通知', '1', 'messag_type', NULL, 'default', 'N', '0', '超级管理员', '2023-09-13 17:06:43', '', NULL, NULL);
+INSERT INTO `sys_dict_data`(`dict_code`, `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (358, 0, '待发布', '0', 'message_status', NULL, 'default', 'N', '0', '超级管理员', '2023-09-13 17:09:11', '', NULL, NULL);
+INSERT INTO `sys_dict_data`(`dict_code`, `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (359, 0, '已发布', '1', 'message_status', NULL, 'default', 'N', '0', '超级管理员', '2023-09-13 17:09:19', '', NULL, NULL);
+
+delete from sys_menu where in in(2196,2208,2209,2210,2211,2212,2213);
+INSERT INTO `sys_menu`(`id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `platform_type`, `icon`, `image_path`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (2196, '公告通知', 2168, 1, 'core/message', 'core/message/index', NULL, 1, 0, 'C', '0', '0', 'core:notification:list', '1', 'dashboard', NULL, '超级管理员', '2023-09-13 17:50:26', '超级管理员', '2023-09-15 16:47:45', '');
+INSERT INTO `sys_menu`(`id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `platform_type`, `icon`, `image_path`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (2208, '详情', 2196, 1, '', NULL, NULL, 1, 0, 'F', '0', '0', 'core:notification:query', '1', '#', NULL, '超级管理员', '2023-09-19 15:17:27', '', NULL, '');
+INSERT INTO `sys_menu`(`id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `platform_type`, `icon`, `image_path`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (2209, '编辑', 2196, 2, '', NULL, NULL, 1, 0, 'F', '0', '0', 'core:notification:edit', '1', '#', NULL, '超级管理员', '2023-09-19 15:17:56', '', NULL, '');
+INSERT INTO `sys_menu`(`id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `platform_type`, `icon`, `image_path`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (2210, '新增', 2196, 3, '', NULL, NULL, 1, 0, 'F', '0', '0', 'core:notification:add', '1', '#', NULL, '超级管理员', '2023-09-19 15:18:18', '', NULL, '');
+INSERT INTO `sys_menu`(`id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `platform_type`, `icon`, `image_path`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (2211, '删除', 2196, 4, '', NULL, NULL, 1, 0, 'F', '0', '0', 'core:notification:remove', '1', '#', NULL, '超级管理员', '2023-09-19 15:18:42', '', NULL, '');
+INSERT INTO `sys_menu`(`id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `platform_type`, `icon`, `image_path`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (2212, '发布', 2196, 5, '', NULL, NULL, 1, 0, 'F', '0', '0', 'core:notification:publish', '1', '#', NULL, '超级管理员', '2023-09-19 15:19:03', '', NULL, '');
+INSERT INTO `sys_menu`(`id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `platform_type`, `icon`, `image_path`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (2213, '取消发布', 2196, 6, '', NULL, NULL, 1, 0, 'F', '0', '0', 'core:notification:cancelPublish', '1', '#', NULL, '超级管理员', '2023-09-19 15:19:25', '', NULL, '');
+
+DROP TABLE IF EXISTS `core_announcement_notification`;
+CREATE TABLE `core_announcement_notification`  (
+   `id` bigint(0) NOT NULL,
+   `org_id` bigint(0) NULL DEFAULT NULL COMMENT '机构',
+   `org_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '机构',
+   `org_path` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '机构',
+   `title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '标题',
+   `content` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '内容',
+   `messag_type` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '消息类型0公告1通知',
+   `tag_org_type` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '机构类型',
+   `create_by` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人',
+   `create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
+   `publish_time` datetime(0) NULL DEFAULT NULL COMMENT '发布时间',
+   `messag_status` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '状态',
+   `update_by` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
+   `update_time` datetime(0) NULL DEFAULT NULL,
+   `file_list` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '文件',
+   PRIMARY KEY (`id`) USING BTREE,
+   INDEX `org_id_indx`(`org_id`) USING BTREE,
+   INDEX `org_path_index`(`org_path`) USING BTREE
+) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '公告通知' ROW_FORMAT = Dynamic;
+
+DROP TABLE IF EXISTS `core_announcement_notification_to_org`;
+CREATE TABLE `core_announcement_notification_to_org`  (
+`announcement_notification_id` bigint(0) NOT NULL,
+`org_id` bigint(0) NULL DEFAULT NULL,
+INDEX `notification_id_index`(`announcement_notification_id`) USING BTREE,
+INDEX `org_id_index`(`org_id`) USING BTREE
+) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '通知公告机构关联表' ROW_FORMAT = Dynamic;
+
+-- ----------------------------
+-- Table structure for core_announcement_notification_to_role
+-- ----------------------------
+DROP TABLE IF EXISTS `core_announcement_notification_to_role`;
+CREATE TABLE `core_announcement_notification_to_role`  (
+`announcement_notification_id` bigint(0) NOT NULL,
+`role_id` bigint(0) NULL DEFAULT NULL,
+INDEX `notification_id_index`(`announcement_notification_id`) USING BTREE,
+INDEX `role_id_index`(`role_id`) USING BTREE
+) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '公告通知角色关联表' ROW_FORMAT = Dynamic;
+
+
+
+-- 公告通知end
+delete from sys_menu where id=2166;
+INSERT INTO `sys_menu`(`id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `platform_type`, `icon`, `image_path`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (2166, '天气预警数据', 1, 100, 'core/weather', 'core/weather/index', NULL, 1, 0, 'C', '0', '0', 'core:weather:list', '1', 'color', NULL, '超级管理员', '2023-09-12 11:40:46', '超级管理员', '2023-09-12 11:43:45', '');
+
+-- 天气预警start
+DROP TABLE IF EXISTS `core_weather_warning`;
+CREATE TABLE `core_weather_warning`  (
+ `id` bigint(0) NOT NULL AUTO_INCREMENT,
+ `alarm_title` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '预警标题',
+ `alarm_content` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '预警内容',
+ `alarm_level` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '预警等级',
+ `province` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '省',
+ `city` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '市',
+ `area` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '区、县(没得区县用市)',
+ `code` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '市区县的编号',
+ `alarm_type` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '预警类型',
+ `alarm_time` datetime(0) NULL DEFAULT NULL COMMENT '预警发布时间',
+ `create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
+ PRIMARY KEY (`id`) USING BTREE,
+ INDEX `code`(`code`) USING BTREE
+) ENGINE = InnoDB AUTO_INCREMENT = 4 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '天气预警数据' ROW_FORMAT = Dynamic;
+
+DROP TABLE IF EXISTS `core_weather_city`;
+CREATE TABLE `core_weather_city`  (
+  `AREACODE` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
+  `AREAID` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
+  `NAMEEN` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
+  `NAMECN` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
+  `DISTRICTEN` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
+  `DISTRICTCN` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
+  `PROVEN` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
+  `PROVCN` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
+  `NATIONEN` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
+  `NATIONCN` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
+  `GROUPID` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL
+) ENGINE = InnoDB AUTO_INCREMENT = 97 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '预警城市列表' ROW_FORMAT = Dynamic;
+INSERT INTO `core_weather_city`(`AREACODE`, `AREAID`, `NAMEEN`, `NAMECN`, `DISTRICTEN`, `DISTRICTCN`, `PROVEN`, `PROVCN`, `NATIONEN`, `NATIONCN`, `GROUPID`) VALUES ('101231001', '101231001', 'diaoyudao', '钓鱼岛', 'diaoyudao', '钓鱼岛', 'fujian', '福建', 'china', '中国', '-1');
+INSERT INTO `core_weather_city`(`AREACODE`, `AREAID`, `NAMEEN`, `NAMECN`, `DISTRICTEN`, `DISTRICTCN`, `PROVEN`, `PROVCN`, `NATIONEN`, `NATIONCN`, `GROUPID`) VALUES ('350100', '101230101', 'fuzhou', '福州', 'fuzhou', '福州', 'fujian', '福建', 'china', '中国', '-1');
+INSERT INTO `core_weather_city`(`AREACODE`, `AREAID`, `NAMEEN`, `NAMECN`, `DISTRICTEN`, `DISTRICTCN`, `PROVEN`, `PROVCN`, `NATIONEN`, `NATIONCN`, `GROUPID`) VALUES ('350102', '101230106', 'gulou', '鼓楼', 'fuzhou', '福州', 'fujian', '福建', 'china', '中国', '101230101');
+INSERT INTO `core_weather_city`(`AREACODE`, `AREAID`, `NAMEEN`, `NAMECN`, `DISTRICTEN`, `DISTRICTCN`, `PROVEN`, `PROVCN`, `NATIONEN`, `NATIONCN`, `GROUPID`) VALUES ('350103', '101230109', 'taijiang', '台江', 'fuzhou', '福州', 'fujian', '福建', 'china', '中国', '101230101');
+INSERT INTO `core_weather_city`(`AREACODE`, `AREAID`, `NAMEEN`, `NAMECN`, `DISTRICTEN`, `DISTRICTCN`, `PROVEN`, `PROVCN`, `NATIONEN`, `NATIONCN`, `GROUPID`) VALUES ('350104', '101230112', 'cangshan', '仓山', 'fuzhou', '福州', 'fujian', '福建', 'china', '中国', '101230101');
+INSERT INTO `core_weather_city`(`AREACODE`, `AREAID`, `NAMEEN`, `NAMECN`, `DISTRICTEN`, `DISTRICTCN`, `PROVEN`, `PROVCN`, `NATIONEN`, `NATIONCN`, `GROUPID`) VALUES ('350105', '101230113', 'mawei', '马尾', 'fuzhou', '福州', 'fujian', '福建', 'china', '中国', '101230101');
+INSERT INTO `core_weather_city`(`AREACODE`, `AREAID`, `NAMEEN`, `NAMECN`, `DISTRICTEN`, `DISTRICTCN`, `PROVEN`, `PROVCN`, `NATIONEN`, `NATIONCN`, `GROUPID`) VALUES ('350111', '101230114', 'jinan', '晋安', 'fuzhou', '福州', 'fujian', '福建', 'china', '中国', '101230101');
+INSERT INTO `core_weather_city`(`AREACODE`, `AREAID`, `NAMEEN`, `NAMECN`, `DISTRICTEN`, `DISTRICTCN`, `PROVEN`, `PROVCN`, `NATIONEN`, `NATIONCN`, `GROUPID`) VALUES ('350112', '101230110', 'changle', '长乐', 'fuzhou', '福州', 'fujian', '福建', 'china', '中国', '101230101');
+INSERT INTO `core_weather_city`(`AREACODE`, `AREAID`, `NAMEEN`, `NAMECN`, `DISTRICTEN`, `DISTRICTCN`, `PROVEN`, `PROVCN`, `NATIONEN`, `NATIONCN`, `GROUPID`) VALUES ('350121', '101230103', 'minhou', '闽侯', 'fuzhou', '福州', 'fujian', '福建', 'china', '中国', '101230101');
+INSERT INTO `core_weather_city`(`AREACODE`, `AREAID`, `NAMEEN`, `NAMECN`, `DISTRICTEN`, `DISTRICTCN`, `PROVEN`, `PROVCN`, `NATIONEN`, `NATIONCN`, `GROUPID`) VALUES ('350122', '101230105', 'lianjiang', '连江', 'fuzhou', '福州', 'fujian', '福建', 'china', '中国', '101230101');
+INSERT INTO `core_weather_city`(`AREACODE`, `AREAID`, `NAMEEN`, `NAMECN`, `DISTRICTEN`, `DISTRICTCN`, `PROVEN`, `PROVCN`, `NATIONEN`, `NATIONCN`, `GROUPID`) VALUES ('350123', '101230104', 'luoyuan', '罗源', 'fuzhou', '福州', 'fujian', '福建', 'china', '中国', '101230101');
+INSERT INTO `core_weather_city`(`AREACODE`, `AREAID`, `NAMEEN`, `NAMECN`, `DISTRICTEN`, `DISTRICTCN`, `PROVEN`, `PROVCN`, `NATIONEN`, `NATIONCN`, `GROUPID`) VALUES ('350124', '101230102', 'minqing', '闽清', 'fuzhou', '福州', 'fujian', '福建', 'china', '中国', '101230101');
+INSERT INTO `core_weather_city`(`AREACODE`, `AREAID`, `NAMEEN`, `NAMECN`, `DISTRICTEN`, `DISTRICTCN`, `PROVEN`, `PROVCN`, `NATIONEN`, `NATIONCN`, `GROUPID`) VALUES ('350125', '101230107', 'yongtai', '永泰', 'fuzhou', '福州', 'fujian', '福建', 'china', '中国', '101230101');
+INSERT INTO `core_weather_city`(`AREACODE`, `AREAID`, `NAMEEN`, `NAMECN`, `DISTRICTEN`, `DISTRICTCN`, `PROVEN`, `PROVCN`, `NATIONEN`, `NATIONCN`, `GROUPID`) VALUES ('350128', '101230108', 'pingtan', '平潭', 'fuzhou', '福州', 'fujian', '福建', 'china', '中国', '101230101');
+INSERT INTO `core_weather_city`(`AREACODE`, `AREAID`, `NAMEEN`, `NAMECN`, `DISTRICTEN`, `DISTRICTCN`, `PROVEN`, `PROVCN`, `NATIONEN`, `NATIONCN`, `GROUPID`) VALUES ('350181', '101230111', 'fuqing', '福清', 'fuzhou', '福州', 'fujian', '福建', 'china', '中国', '101230101');
+INSERT INTO `core_weather_city`(`AREACODE`, `AREAID`, `NAMEEN`, `NAMECN`, `DISTRICTEN`, `DISTRICTCN`, `PROVEN`, `PROVCN`, `NATIONEN`, `NATIONCN`, `GROUPID`) VALUES ('350200', '101230201', 'xiamen', '厦门', 'xiamen', '厦门', 'fujian', '福建', 'china', '中国', '-1');
+INSERT INTO `core_weather_city`(`AREACODE`, `AREAID`, `NAMEEN`, `NAMECN`, `DISTRICTEN`, `DISTRICTCN`, `PROVEN`, `PROVCN`, `NATIONEN`, `NATIONCN`, `GROUPID`) VALUES ('350203', '101230203', 'siming', '思明', 'xiamen', '厦门', 'fujian', '福建', 'china', '中国', '101230201');
+INSERT INTO `core_weather_city`(`AREACODE`, `AREAID`, `NAMEEN`, `NAMECN`, `DISTRICTEN`, `DISTRICTCN`, `PROVEN`, `PROVCN`, `NATIONEN`, `NATIONCN`, `GROUPID`) VALUES ('350205', '101230204', 'haicang', '海沧', 'xiamen', '厦门', 'fujian', '福建', 'china', '中国', '101230201');
+INSERT INTO `core_weather_city`(`AREACODE`, `AREAID`, `NAMEEN`, `NAMECN`, `DISTRICTEN`, `DISTRICTCN`, `PROVEN`, `PROVCN`, `NATIONEN`, `NATIONCN`, `GROUPID`) VALUES ('350206', '101230205', 'huli', '湖里', 'xiamen', '厦门', 'fujian', '福建', 'china', '中国', '101230201');
+INSERT INTO `core_weather_city`(`AREACODE`, `AREAID`, `NAMEEN`, `NAMECN`, `DISTRICTEN`, `DISTRICTCN`, `PROVEN`, `PROVCN`, `NATIONEN`, `NATIONCN`, `GROUPID`) VALUES ('350211', '101230206', 'jimei', '集美', 'xiamen', '厦门', 'fujian', '福建', 'china', '中国', '101230201');
+INSERT INTO `core_weather_city`(`AREACODE`, `AREAID`, `NAMEEN`, `NAMECN`, `DISTRICTEN`, `DISTRICTCN`, `PROVEN`, `PROVCN`, `NATIONEN`, `NATIONCN`, `GROUPID`) VALUES ('350212', '101230202', 'tongan', '同安', 'xiamen', '厦门', 'fujian', '福建', 'china', '中国', '101230201');
+INSERT INTO `core_weather_city`(`AREACODE`, `AREAID`, `NAMEEN`, `NAMECN`, `DISTRICTEN`, `DISTRICTCN`, `PROVEN`, `PROVCN`, `NATIONEN`, `NATIONCN`, `GROUPID`) VALUES ('350213', '101230207', 'xiangan', '翔安', 'xiamen', '厦门', 'fujian', '福建', 'china', '中国', '101230201');
+INSERT INTO `core_weather_city`(`AREACODE`, `AREAID`, `NAMEEN`, `NAMECN`, `DISTRICTEN`, `DISTRICTCN`, `PROVEN`, `PROVCN`, `NATIONEN`, `NATIONCN`, `GROUPID`) VALUES ('350300', '101230401', 'putian', '莆田', 'putian', '莆田', 'fujian', '福建', 'china', '中国', '-1');
+INSERT INTO `core_weather_city`(`AREACODE`, `AREAID`, `NAMEEN`, `NAMECN`, `DISTRICTEN`, `DISTRICTCN`, `PROVEN`, `PROVCN`, `NATIONEN`, `NATIONCN`, `GROUPID`) VALUES ('350302', '101230407', 'chengxiang', '城厢', 'putian', '莆田', 'fujian', '福建', 'china', '中国', '101230401');
+INSERT INTO `core_weather_city`(`AREACODE`, `AREAID`, `NAMEEN`, `NAMECN`, `DISTRICTEN`, `DISTRICTCN`, `PROVEN`, `PROVCN`, `NATIONEN`, `NATIONCN`, `GROUPID`) VALUES ('350303', '101230404', 'hanjiang', '涵江', 'putian', '莆田', 'fujian', '福建', 'china', '中国', '101230401');
+INSERT INTO `core_weather_city`(`AREACODE`, `AREAID`, `NAMEEN`, `NAMECN`, `DISTRICTEN`, `DISTRICTCN`, `PROVEN`, `PROVCN`, `NATIONEN`, `NATIONCN`, `GROUPID`) VALUES ('350304', '101230406', 'licheng', '荔城', 'putian', '莆田', 'fujian', '福建', 'china', '中国', '101230401');
+INSERT INTO `core_weather_city`(`AREACODE`, `AREAID`, `NAMEEN`, `NAMECN`, `DISTRICTEN`, `DISTRICTCN`, `PROVEN`, `PROVCN`, `NATIONEN`, `NATIONCN`, `GROUPID`) VALUES ('350305', '101230405', 'xiuyu', '秀屿', 'putian', '莆田', 'fujian', '福建', 'china', '中国', '101230401');
+INSERT INTO `core_weather_city`(`AREACODE`, `AREAID`, `NAMEEN`, `NAMECN`, `DISTRICTEN`, `DISTRICTCN`, `PROVEN`, `PROVCN`, `NATIONEN`, `NATIONCN`, `GROUPID`) VALUES ('350322', '101230402', 'xianyou', '仙游', 'putian', '莆田', 'fujian', '福建', 'china', '中国', '101230401');
+INSERT INTO `core_weather_city`(`AREACODE`, `AREAID`, `NAMEEN`, `NAMECN`, `DISTRICTEN`, `DISTRICTCN`, `PROVEN`, `PROVCN`, `NATIONEN`, `NATIONCN`, `GROUPID`) VALUES ('350400', '101230801', 'sanming', '三明', 'sanming', '三明', 'fujian', '福建', 'china', '中国', '-1');
+INSERT INTO `core_weather_city`(`AREACODE`, `AREAID`, `NAMEEN`, `NAMECN`, `DISTRICTEN`, `DISTRICTCN`, `PROVEN`, `PROVCN`, `NATIONEN`, `NATIONCN`, `GROUPID`) VALUES ('350402', '101230812', 'meilie', '梅列', 'sanming', '三明', 'fujian', '福建', 'china', '中国', '101230801');
+INSERT INTO `core_weather_city`(`AREACODE`, `AREAID`, `NAMEEN`, `NAMECN`, `DISTRICTEN`, `DISTRICTCN`, `PROVEN`, `PROVCN`, `NATIONEN`, `NATIONCN`, `GROUPID`) VALUES ('350403', '101230813', 'sanyuan', '三元', 'sanming', '三明', 'fujian', '福建', 'china', '中国', '101230801');
+INSERT INTO `core_weather_city`(`AREACODE`, `AREAID`, `NAMEEN`, `NAMECN`, `DISTRICTEN`, `DISTRICTCN`, `PROVEN`, `PROVCN`, `NATIONEN`, `NATIONCN`, `GROUPID`) VALUES ('350421', '101230807', 'mingxi', '明溪', 'sanming', '三明', 'fujian', '福建', 'china', '中国', '101230801');
+INSERT INTO `core_weather_city`(`AREACODE`, `AREAID`, `NAMEEN`, `NAMECN`, `DISTRICTEN`, `DISTRICTCN`, `PROVEN`, `PROVCN`, `NATIONEN`, `NATIONCN`, `GROUPID`) VALUES ('350423', '101230803', 'qingliu', '清流', 'sanming', '三明', 'fujian', '福建', 'china', '中国', '101230801');
+INSERT INTO `core_weather_city`(`AREACODE`, `AREAID`, `NAMEEN`, `NAMECN`, `DISTRICTEN`, `DISTRICTCN`, `PROVEN`, `PROVCN`, `NATIONEN`, `NATIONCN`, `GROUPID`) VALUES ('350424', '101230802', 'ninghua', '宁化', 'sanming', '三明', 'fujian', '福建', 'china', '中国', '101230801');
+INSERT INTO `core_weather_city`(`AREACODE`, `AREAID`, `NAMEEN`, `NAMECN`, `DISTRICTEN`, `DISTRICTCN`, `PROVEN`, `PROVCN`, `NATIONEN`, `NATIONCN`, `GROUPID`) VALUES ('350425', '101230811', 'datian', '大田', 'sanming', '三明', 'fujian', '福建', 'china', '中国', '101230801');
+INSERT INTO `core_weather_city`(`AREACODE`, `AREAID`, `NAMEEN`, `NAMECN`, `DISTRICTEN`, `DISTRICTCN`, `PROVEN`, `PROVCN`, `NATIONEN`, `NATIONCN`, `GROUPID`) VALUES ('350426', '101230809', 'youxi', '尤溪', 'sanming', '三明', 'fujian', '福建', 'china', '中国', '101230801');
+INSERT INTO `core_weather_city`(`AREACODE`, `AREAID`, `NAMEEN`, `NAMECN`, `DISTRICTEN`, `DISTRICTCN`, `PROVEN`, `PROVCN`, `NATIONEN`, `NATIONCN`, `GROUPID`) VALUES ('350427', '101230808', 'shaxian', '沙县', 'sanming', '三明', 'fujian', '福建', 'china', '中国', '101230801');
+INSERT INTO `core_weather_city`(`AREACODE`, `AREAID`, `NAMEEN`, `NAMECN`, `DISTRICTEN`, `DISTRICTCN`, `PROVEN`, `PROVCN`, `NATIONEN`, `NATIONCN`, `GROUPID`) VALUES ('350428', '101230805', 'jiangle', '将乐', 'sanming', '三明', 'fujian', '福建', 'china', '中国', '101230801');
+INSERT INTO `core_weather_city`(`AREACODE`, `AREAID`, `NAMEEN`, `NAMECN`, `DISTRICTEN`, `DISTRICTCN`, `PROVEN`, `PROVCN`, `NATIONEN`, `NATIONCN`, `GROUPID`) VALUES ('350429', '101230804', 'taining', '泰宁', 'sanming', '三明', 'fujian', '福建', 'china', '中国', '101230801');
+INSERT INTO `core_weather_city`(`AREACODE`, `AREAID`, `NAMEEN`, `NAMECN`, `DISTRICTEN`, `DISTRICTCN`, `PROVEN`, `PROVCN`, `NATIONEN`, `NATIONCN`, `GROUPID`) VALUES ('350430', '101230806', 'jianning', '建宁', 'sanming', '三明', 'fujian', '福建', 'china', '中国', '101230801');
+INSERT INTO `core_weather_city`(`AREACODE`, `AREAID`, `NAMEEN`, `NAMECN`, `DISTRICTEN`, `DISTRICTCN`, `PROVEN`, `PROVCN`, `NATIONEN`, `NATIONCN`, `GROUPID`) VALUES ('350481', '101230810', 'yongan', '永安', 'sanming', '三明', 'fujian', '福建', 'china', '中国', '101230801');
+INSERT INTO `core_weather_city`(`AREACODE`, `AREAID`, `NAMEEN`, `NAMECN`, `DISTRICTEN`, `DISTRICTCN`, `PROVEN`, `PROVCN`, `NATIONEN`, `NATIONCN`, `GROUPID`) VALUES ('350500', '101230501', 'quanzhou', '泉州', 'quanzhou', '泉州', 'fujian', '福建', 'china', '中国', '-1');
+INSERT INTO `core_weather_city`(`AREACODE`, `AREAID`, `NAMEEN`, `NAMECN`, `DISTRICTEN`, `DISTRICTCN`, `PROVEN`, `PROVCN`, `NATIONEN`, `NATIONCN`, `GROUPID`) VALUES ('350502', '101230511', 'licheng', '鲤城', 'quanzhou', '泉州', 'fujian', '福建', 'china', '中国', '101230501');
+INSERT INTO `core_weather_city`(`AREACODE`, `AREAID`, `NAMEEN`, `NAMECN`, `DISTRICTEN`, `DISTRICTCN`, `PROVEN`, `PROVCN`, `NATIONEN`, `NATIONCN`, `GROUPID`) VALUES ('350503', '101230512', 'fengze', '丰泽', 'quanzhou', '泉州', 'fujian', '福建', 'china', '中国', '101230501');
+INSERT INTO `core_weather_city`(`AREACODE`, `AREAID`, `NAMEEN`, `NAMECN`, `DISTRICTEN`, `DISTRICTCN`, `PROVEN`, `PROVCN`, `NATIONEN`, `NATIONCN`, `GROUPID`) VALUES ('350504', '101230513', 'luojiang', '洛江', 'quanzhou', '泉州', 'fujian', '福建', 'china', '中国', '101230501');
+INSERT INTO `core_weather_city`(`AREACODE`, `AREAID`, `NAMEEN`, `NAMECN`, `DISTRICTEN`, `DISTRICTCN`, `PROVEN`, `PROVCN`, `NATIONEN`, `NATIONCN`, `GROUPID`) VALUES ('350505', '101230514', 'quangang', '泉港', 'quanzhou', '泉州', 'fujian', '福建', 'china', '中国', '101230501');
+INSERT INTO `core_weather_city`(`AREACODE`, `AREAID`, `NAMEEN`, `NAMECN`, `DISTRICTEN`, `DISTRICTCN`, `PROVEN`, `PROVCN`, `NATIONEN`, `NATIONCN`, `GROUPID`) VALUES ('350521', '101230508', 'huian', '惠安', 'quanzhou', '泉州', 'fujian', '福建', 'china', '中国', '101230501');
+INSERT INTO `core_weather_city`(`AREACODE`, `AREAID`, `NAMEEN`, `NAMECN`, `DISTRICTEN`, `DISTRICTCN`, `PROVEN`, `PROVCN`, `NATIONEN`, `NATIONCN`, `GROUPID`) VALUES ('3505211070', '101230507', 'chongwu', '崇武', 'quanzhou', '泉州', 'fujian', '福建', 'china', '中国', '101230501');
+INSERT INTO `core_weather_city`(`AREACODE`, `AREAID`, `NAMEEN`, `NAMECN`, `DISTRICTEN`, `DISTRICTCN`, `PROVEN`, `PROVCN`, `NATIONEN`, `NATIONCN`, `GROUPID`) VALUES ('350524', '101230502', 'anxi', '安溪', 'quanzhou', '泉州', 'fujian', '福建', 'china', '中国', '101230501');
+INSERT INTO `core_weather_city`(`AREACODE`, `AREAID`, `NAMEEN`, `NAMECN`, `DISTRICTEN`, `DISTRICTCN`, `PROVEN`, `PROVCN`, `NATIONEN`, `NATIONCN`, `GROUPID`) VALUES ('350525', '101230504', 'yongchun', '永春', 'quanzhou', '泉州', 'fujian', '福建', 'china', '中国', '101230501');
+INSERT INTO `core_weather_city`(`AREACODE`, `AREAID`, `NAMEEN`, `NAMECN`, `DISTRICTEN`, `DISTRICTCN`, `PROVEN`, `PROVCN`, `NATIONEN`, `NATIONCN`, `GROUPID`) VALUES ('350526', '101230505', 'dehua', '德化', 'quanzhou', '泉州', 'fujian', '福建', 'china', '中国', '101230501');
+INSERT INTO `core_weather_city`(`AREACODE`, `AREAID`, `NAMEEN`, `NAMECN`, `DISTRICTEN`, `DISTRICTCN`, `PROVEN`, `PROVCN`, `NATIONEN`, `NATIONCN`, `GROUPID`) VALUES ('350527', '101230503', 'jinmen', '金门', 'quanzhou', '泉州', 'fujian', '福建', 'china', '中国', '101230501');
+INSERT INTO `core_weather_city`(`AREACODE`, `AREAID`, `NAMEEN`, `NAMECN`, `DISTRICTEN`, `DISTRICTCN`, `PROVEN`, `PROVCN`, `NATIONEN`, `NATIONCN`, `GROUPID`) VALUES ('350581', '101230510', 'shishi', '石狮', 'quanzhou', '泉州', 'fujian', '福建', 'china', '中国', '101230501');
+INSERT INTO `core_weather_city`(`AREACODE`, `AREAID`, `NAMEEN`, `NAMECN`, `DISTRICTEN`, `DISTRICTCN`, `PROVEN`, `PROVCN`, `NATIONEN`, `NATIONCN`, `GROUPID`) VALUES ('350582', '101230509', 'jinjiang', '晋江', 'quanzhou', '泉州', 'fujian', '福建', 'china', '中国', '101230501');
+INSERT INTO `core_weather_city`(`AREACODE`, `AREAID`, `NAMEEN`, `NAMECN`, `DISTRICTEN`, `DISTRICTCN`, `PROVEN`, `PROVCN`, `NATIONEN`, `NATIONCN`, `GROUPID`) VALUES ('350583', '101230506', 'nanan', '南安', 'quanzhou', '泉州', 'fujian', '福建', 'china', '中国', '101230501');
+INSERT INTO `core_weather_city`(`AREACODE`, `AREAID`, `NAMEEN`, `NAMECN`, `DISTRICTEN`, `DISTRICTCN`, `PROVEN`, `PROVCN`, `NATIONEN`, `NATIONCN`, `GROUPID`) VALUES ('350600', '101230601', 'zhangzhou', '漳州', 'zhangzhou', '漳州', 'fujian', '福建', 'china', '中国', '-1');
+INSERT INTO `core_weather_city`(`AREACODE`, `AREAID`, `NAMEEN`, `NAMECN`, `DISTRICTEN`, `DISTRICTCN`, `PROVEN`, `PROVCN`, `NATIONEN`, `NATIONCN`, `GROUPID`) VALUES ('350602', '101230611', 'xiangcheng', '芗城', 'zhangzhou', '漳州', 'fujian', '福建', 'china', '中国', '101230601');
+INSERT INTO `core_weather_city`(`AREACODE`, `AREAID`, `NAMEEN`, `NAMECN`, `DISTRICTEN`, `DISTRICTCN`, `PROVEN`, `PROVCN`, `NATIONEN`, `NATIONCN`, `GROUPID`) VALUES ('350603', '101230612', 'longwen', '龙文', 'zhangzhou', '漳州', 'fujian', '福建', 'china', '中国', '101230601');
+INSERT INTO `core_weather_city`(`AREACODE`, `AREAID`, `NAMEEN`, `NAMECN`, `DISTRICTEN`, `DISTRICTCN`, `PROVEN`, `PROVCN`, `NATIONEN`, `NATIONCN`, `GROUPID`) VALUES ('350622', '101230609', 'yunxiao', '云霄', 'zhangzhou', '漳州', 'fujian', '福建', 'china', '中国', '101230601');
+INSERT INTO `core_weather_city`(`AREACODE`, `AREAID`, `NAMEEN`, `NAMECN`, `DISTRICTEN`, `DISTRICTCN`, `PROVEN`, `PROVCN`, `NATIONEN`, `NATIONCN`, `GROUPID`) VALUES ('350623', '101230606', 'zhangpu', '漳浦', 'zhangzhou', '漳州', 'fujian', '福建', 'china', '中国', '101230601');
+INSERT INTO `core_weather_city`(`AREACODE`, `AREAID`, `NAMEEN`, `NAMECN`, `DISTRICTEN`, `DISTRICTCN`, `PROVEN`, `PROVCN`, `NATIONEN`, `NATIONCN`, `GROUPID`) VALUES ('350624', '101230607', 'zhaoan', '诏安', 'zhangzhou', '漳州', 'fujian', '福建', 'china', '中国', '101230601');
+INSERT INTO `core_weather_city`(`AREACODE`, `AREAID`, `NAMEEN`, `NAMECN`, `DISTRICTEN`, `DISTRICTCN`, `PROVEN`, `PROVCN`, `NATIONEN`, `NATIONCN`, `GROUPID`) VALUES ('350625', '101230602', 'changtai', '长泰', 'zhangzhou', '漳州', 'fujian', '福建', 'china', '中国', '101230601');
+INSERT INTO `core_weather_city`(`AREACODE`, `AREAID`, `NAMEEN`, `NAMECN`, `DISTRICTEN`, `DISTRICTCN`, `PROVEN`, `PROVCN`, `NATIONEN`, `NATIONCN`, `GROUPID`) VALUES ('350626', '101230608', 'dongshan', '东山', 'zhangzhou', '漳州', 'fujian', '福建', 'china', '中国', '101230601');
+INSERT INTO `core_weather_city`(`AREACODE`, `AREAID`, `NAMEEN`, `NAMECN`, `DISTRICTEN`, `DISTRICTCN`, `PROVEN`, `PROVCN`, `NATIONEN`, `NATIONCN`, `GROUPID`) VALUES ('350627', '101230603', 'nanjing', '南靖', 'zhangzhou', '漳州', 'fujian', '福建', 'china', '中国', '101230601');
+INSERT INTO `core_weather_city`(`AREACODE`, `AREAID`, `NAMEEN`, `NAMECN`, `DISTRICTEN`, `DISTRICTCN`, `PROVEN`, `PROVCN`, `NATIONEN`, `NATIONCN`, `GROUPID`) VALUES ('350628', '101230604', 'pinghe', '平和', 'zhangzhou', '漳州', 'fujian', '福建', 'china', '中国', '101230601');
+INSERT INTO `core_weather_city`(`AREACODE`, `AREAID`, `NAMEEN`, `NAMECN`, `DISTRICTEN`, `DISTRICTCN`, `PROVEN`, `PROVCN`, `NATIONEN`, `NATIONCN`, `GROUPID`) VALUES ('350629', '101230610', 'huaan', '华安', 'zhangzhou', '漳州', 'fujian', '福建', 'china', '中国', '101230601');
+INSERT INTO `core_weather_city`(`AREACODE`, `AREAID`, `NAMEEN`, `NAMECN`, `DISTRICTEN`, `DISTRICTCN`, `PROVEN`, `PROVCN`, `NATIONEN`, `NATIONCN`, `GROUPID`) VALUES ('350681', '101230605', 'longhai', '龙海', 'zhangzhou', '漳州', 'fujian', '福建', 'china', '中国', '101230601');
+INSERT INTO `core_weather_city`(`AREACODE`, `AREAID`, `NAMEEN`, `NAMECN`, `DISTRICTEN`, `DISTRICTCN`, `PROVEN`, `PROVCN`, `NATIONEN`, `NATIONCN`, `GROUPID`) VALUES ('350700', '101230901', 'nanping', '南平', 'nanping', '南平', 'fujian', '福建', 'china', '中国', '-1');
+INSERT INTO `core_weather_city`(`AREACODE`, `AREAID`, `NAMEEN`, `NAMECN`, `DISTRICTEN`, `DISTRICTCN`, `PROVEN`, `PROVCN`, `NATIONEN`, `NATIONCN`, `GROUPID`) VALUES ('350702', '101230911', 'yanping', '延平', 'nanping', '南平', 'fujian', '福建', 'china', '中国', '101230901');
+INSERT INTO `core_weather_city`(`AREACODE`, `AREAID`, `NAMEEN`, `NAMECN`, `DISTRICTEN`, `DISTRICTCN`, `PROVEN`, `PROVCN`, `NATIONEN`, `NATIONCN`, `GROUPID`) VALUES ('350703', '101230907', 'jianyang', '建阳', 'nanping', '南平', 'fujian', '福建', 'china', '中国', '101230901');
+INSERT INTO `core_weather_city`(`AREACODE`, `AREAID`, `NAMEEN`, `NAMECN`, `DISTRICTEN`, `DISTRICTCN`, `PROVEN`, `PROVCN`, `NATIONEN`, `NATIONCN`, `GROUPID`) VALUES ('350721', '101230902', 'shunchang', '顺昌', 'nanping', '南平', 'fujian', '福建', 'china', '中国', '101230901');
+INSERT INTO `core_weather_city`(`AREACODE`, `AREAID`, `NAMEEN`, `NAMECN`, `DISTRICTEN`, `DISTRICTCN`, `PROVEN`, `PROVCN`, `NATIONEN`, `NATIONCN`, `GROUPID`) VALUES ('350722', '101230906', 'pucheng', '浦城', 'nanping', '南平', 'fujian', '福建', 'china', '中国', '101230901');
+INSERT INTO `core_weather_city`(`AREACODE`, `AREAID`, `NAMEEN`, `NAMECN`, `DISTRICTEN`, `DISTRICTCN`, `PROVEN`, `PROVCN`, `NATIONEN`, `NATIONCN`, `GROUPID`) VALUES ('350723', '101230903', 'guangze', '光泽', 'nanping', '南平', 'fujian', '福建', 'china', '中国', '101230901');
+INSERT INTO `core_weather_city`(`AREACODE`, `AREAID`, `NAMEEN`, `NAMECN`, `DISTRICTEN`, `DISTRICTCN`, `PROVEN`, `PROVCN`, `NATIONEN`, `NATIONCN`, `GROUPID`) VALUES ('350724', '101230908', 'songxi', '松溪', 'nanping', '南平', 'fujian', '福建', 'china', '中国', '101230901');
+INSERT INTO `core_weather_city`(`AREACODE`, `AREAID`, `NAMEEN`, `NAMECN`, `DISTRICTEN`, `DISTRICTCN`, `PROVEN`, `PROVCN`, `NATIONEN`, `NATIONCN`, `GROUPID`) VALUES ('350725', '101230909', 'zhenghe', '政和', 'nanping', '南平', 'fujian', '福建', 'china', '中国', '101230901');
+INSERT INTO `core_weather_city`(`AREACODE`, `AREAID`, `NAMEEN`, `NAMECN`, `DISTRICTEN`, `DISTRICTCN`, `PROVEN`, `PROVCN`, `NATIONEN`, `NATIONCN`, `GROUPID`) VALUES ('350781', '101230904', 'shaowu', '邵武', 'nanping', '南平', 'fujian', '福建', 'china', '中国', '101230901');
+INSERT INTO `core_weather_city`(`AREACODE`, `AREAID`, `NAMEEN`, `NAMECN`, `DISTRICTEN`, `DISTRICTCN`, `PROVEN`, `PROVCN`, `NATIONEN`, `NATIONCN`, `GROUPID`) VALUES ('350782', '101230905', 'wuyishan', '武夷山', 'nanping', '南平', 'fujian', '福建', 'china', '中国', '101230901');
+INSERT INTO `core_weather_city`(`AREACODE`, `AREAID`, `NAMEEN`, `NAMECN`, `DISTRICTEN`, `DISTRICTCN`, `PROVEN`, `PROVCN`, `NATIONEN`, `NATIONCN`, `GROUPID`) VALUES ('350783', '101230910', 'jianou', '建瓯', 'nanping', '南平', 'fujian', '福建', 'china', '中国', '101230901');
+INSERT INTO `core_weather_city`(`AREACODE`, `AREAID`, `NAMEEN`, `NAMECN`, `DISTRICTEN`, `DISTRICTCN`, `PROVEN`, `PROVCN`, `NATIONEN`, `NATIONCN`, `GROUPID`) VALUES ('350800', '101230701', 'longyan', '龙岩', 'longyan', '龙岩', 'fujian', '福建', 'china', '中国', '-1');
+INSERT INTO `core_weather_city`(`AREACODE`, `AREAID`, `NAMEEN`, `NAMECN`, `DISTRICTEN`, `DISTRICTCN`, `PROVEN`, `PROVCN`, `NATIONEN`, `NATIONCN`, `GROUPID`) VALUES ('350802', '101230708', 'xinluo', '新罗', 'longyan', '龙岩', 'fujian', '福建', 'china', '中国', '101230701');
+INSERT INTO `core_weather_city`(`AREACODE`, `AREAID`, `NAMEEN`, `NAMECN`, `DISTRICTEN`, `DISTRICTCN`, `PROVEN`, `PROVCN`, `NATIONEN`, `NATIONCN`, `GROUPID`) VALUES ('350803', '101230706', 'yongding', '永定', 'longyan', '龙岩', 'fujian', '福建', 'china', '中国', '101230701');
+INSERT INTO `core_weather_city`(`AREACODE`, `AREAID`, `NAMEEN`, `NAMECN`, `DISTRICTEN`, `DISTRICTCN`, `PROVEN`, `PROVCN`, `NATIONEN`, `NATIONCN`, `GROUPID`) VALUES ('350821', '101230702', 'changting', '长汀', 'longyan', '龙岩', 'fujian', '福建', 'china', '中国', '101230701');
+INSERT INTO `core_weather_city`(`AREACODE`, `AREAID`, `NAMEEN`, `NAMECN`, `DISTRICTEN`, `DISTRICTCN`, `PROVEN`, `PROVCN`, `NATIONEN`, `NATIONCN`, `GROUPID`) VALUES ('350823', '101230705', 'shanghang', '上杭', 'longyan', '龙岩', 'fujian', '福建', 'china', '中国', '101230701');
+INSERT INTO `core_weather_city`(`AREACODE`, `AREAID`, `NAMEEN`, `NAMECN`, `DISTRICTEN`, `DISTRICTCN`, `PROVEN`, `PROVCN`, `NATIONEN`, `NATIONCN`, `GROUPID`) VALUES ('350824', '101230704', 'wuping', '武平', 'longyan', '龙岩', 'fujian', '福建', 'china', '中国', '101230701');
+INSERT INTO `core_weather_city`(`AREACODE`, `AREAID`, `NAMEEN`, `NAMECN`, `DISTRICTEN`, `DISTRICTCN`, `PROVEN`, `PROVCN`, `NATIONEN`, `NATIONCN`, `GROUPID`) VALUES ('350825', '101230703', 'liancheng', '连城', 'longyan', '龙岩', 'fujian', '福建', 'china', '中国', '101230701');
+INSERT INTO `core_weather_city`(`AREACODE`, `AREAID`, `NAMEEN`, `NAMECN`, `DISTRICTEN`, `DISTRICTCN`, `PROVEN`, `PROVCN`, `NATIONEN`, `NATIONCN`, `GROUPID`) VALUES ('350881', '101230707', 'zhangping', '漳平', 'longyan', '龙岩', 'fujian', '福建', 'china', '中国', '101230701');
+INSERT INTO `core_weather_city`(`AREACODE`, `AREAID`, `NAMEEN`, `NAMECN`, `DISTRICTEN`, `DISTRICTCN`, `PROVEN`, `PROVCN`, `NATIONEN`, `NATIONCN`, `GROUPID`) VALUES ('350900', '101230301', 'ningde', '宁德', 'ningde', '宁德', 'fujian', '福建', 'china', '中国', '-1');
+INSERT INTO `core_weather_city`(`AREACODE`, `AREAID`, `NAMEEN`, `NAMECN`, `DISTRICTEN`, `DISTRICTCN`, `PROVEN`, `PROVCN`, `NATIONEN`, `NATIONCN`, `GROUPID`) VALUES ('350902', '101230310', 'jiaocheng', '蕉城', 'ningde', '宁德', 'fujian', '福建', 'china', '中国', '101230301');
+INSERT INTO `core_weather_city`(`AREACODE`, `AREAID`, `NAMEEN`, `NAMECN`, `DISTRICTEN`, `DISTRICTCN`, `PROVEN`, `PROVCN`, `NATIONEN`, `NATIONCN`, `GROUPID`) VALUES ('350921', '101230303', 'xiapu', '霞浦', 'ningde', '宁德', 'fujian', '福建', 'china', '中国', '101230301');
+INSERT INTO `core_weather_city`(`AREACODE`, `AREAID`, `NAMEEN`, `NAMECN`, `DISTRICTEN`, `DISTRICTCN`, `PROVEN`, `PROVCN`, `NATIONEN`, `NATIONCN`, `GROUPID`) VALUES ('350922', '101230302', 'gutian', '古田', 'ningde', '宁德', 'fujian', '福建', 'china', '中国', '101230301');
+INSERT INTO `core_weather_city`(`AREACODE`, `AREAID`, `NAMEEN`, `NAMECN`, `DISTRICTEN`, `DISTRICTCN`, `PROVEN`, `PROVCN`, `NATIONEN`, `NATIONCN`, `GROUPID`) VALUES ('350923', '101230309', 'pingnan', '屏南', 'ningde', '宁德', 'fujian', '福建', 'china', '中国', '101230301');
+INSERT INTO `core_weather_city`(`AREACODE`, `AREAID`, `NAMEEN`, `NAMECN`, `DISTRICTEN`, `DISTRICTCN`, `PROVEN`, `PROVCN`, `NATIONEN`, `NATIONCN`, `GROUPID`) VALUES ('350924', '101230304', 'shouning', '寿宁', 'ningde', '宁德', 'fujian', '福建', 'china', '中国', '101230301');
+INSERT INTO `core_weather_city`(`AREACODE`, `AREAID`, `NAMEEN`, `NAMECN`, `DISTRICTEN`, `DISTRICTCN`, `PROVEN`, `PROVCN`, `NATIONEN`, `NATIONCN`, `GROUPID`) VALUES ('350925', '101230305', 'zhouning', '周宁', 'ningde', '宁德', 'fujian', '福建', 'china', '中国', '101230301');
+INSERT INTO `core_weather_city`(`AREACODE`, `AREAID`, `NAMEEN`, `NAMECN`, `DISTRICTEN`, `DISTRICTCN`, `PROVEN`, `PROVCN`, `NATIONEN`, `NATIONCN`, `GROUPID`) VALUES ('350926', '101230307', 'zherong', '柘荣', 'ningde', '宁德', 'fujian', '福建', 'china', '中国', '101230301');
+INSERT INTO `core_weather_city`(`AREACODE`, `AREAID`, `NAMEEN`, `NAMECN`, `DISTRICTEN`, `DISTRICTCN`, `PROVEN`, `PROVCN`, `NATIONEN`, `NATIONCN`, `GROUPID`) VALUES ('350981', '101230306', 'fuan', '福安', 'ningde', '宁德', 'fujian', '福建', 'china', '中国', '101230301');
+INSERT INTO `core_weather_city`(`AREACODE`, `AREAID`, `NAMEEN`, `NAMECN`, `DISTRICTEN`, `DISTRICTCN`, `PROVEN`, `PROVCN`, `NATIONEN`, `NATIONCN`, `GROUPID`) VALUES ('350982', '101230308', 'fuding', '福鼎', 'ningde', '宁德', 'fujian', '福建', 'china', '中国', '101230301');
+
+
+-- 天气预警end
+

+ 6 - 0
soc-api/soc-api-system/src/main/java/com/xunmei/system/api/RemoteUserService.java

@@ -3,6 +3,7 @@ package com.xunmei.system.api;
 import com.xunmei.common.core.constant.SecurityConstants;
 import com.xunmei.common.core.constant.ServiceNameConstants;
 import com.xunmei.common.core.domain.R;
+import com.xunmei.common.core.domain.message.domain.CoreAnnouncementNotificationToRole;
 import com.xunmei.system.api.domain.SysUser;
 import com.xunmei.system.api.factory.RemoteUserFallbackFactory;
 import com.xunmei.system.api.model.LoginUser;
@@ -62,4 +63,9 @@ public interface RemoteUserService {
     @PostMapping("/user/userLoginInfo")
     R<Boolean> userLoginInfo(@RequestParam("id") Long id,@RequestParam("loginTime") Date loginTime,@RequestParam("loginIp") String loginIp,@RequestHeader(SecurityConstants.FROM_SOURCE) String source);
 
+    @GetMapping("/user/allUserList")
+    public List<SysUser> getUserAllList(@RequestHeader(SecurityConstants.FROM_SOURCE) String source);
+
+    @PostMapping("/user/userListByRole")
+    public List<SysUser>  getUserListByRole(@RequestBody List<CoreAnnouncementNotificationToRole> notificationToRoles, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
 }

+ 12 - 0
soc-api/soc-api-system/src/main/java/com/xunmei/system/api/factory/RemoteUserFallbackFactory.java

@@ -1,6 +1,7 @@
 package com.xunmei.system.api.factory;
 
 import com.xunmei.common.core.domain.R;
+import com.xunmei.common.core.domain.message.domain.CoreAnnouncementNotificationToRole;
 import com.xunmei.system.api.RemoteUserService;
 import com.xunmei.system.api.domain.SysUser;
 import com.xunmei.system.api.model.LoginUser;
@@ -9,6 +10,7 @@ import org.slf4j.LoggerFactory;
 import org.springframework.cloud.openfeign.FallbackFactory;
 import org.springframework.stereotype.Component;
 
+import java.util.ArrayList;
 import java.util.Date;
 import java.util.List;
 
@@ -54,6 +56,16 @@ public class RemoteUserFallbackFactory implements FallbackFactory<RemoteUserServ
                 return null;
             }
 
+            @Override
+            public List<SysUser> getUserAllList(String source) {
+                return new ArrayList<>();
+            }
+
+            @Override
+            public List<SysUser> getUserListByRole(List<CoreAnnouncementNotificationToRole> notificationToRoles, String source) {
+                return new ArrayList<>();
+            }
+
         };
     }
 }

+ 96 - 0
soc-common/soc-common-core/src/main/java/com/xunmei/common/core/domain/message/domain/CoreAnnouncementNotification.java

@@ -0,0 +1,96 @@
+package com.xunmei.common.core.domain.message.domain;
+
+import java.util.Date;
+
+import com.baomidou.mybatisplus.annotation.FieldStrategy;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.baomidou.mybatisplus.annotation.IdType;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+import com.xunmei.common.core.web.domain.BaseEntity;
+
+/**
+ * 公告通知对象 core_announcement_notification
+ *
+ * @author xunmei
+ * @date 2023-09-13
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+@TableName("core_announcement_notification")
+@ApiModel(value = "CoreAnnouncementNotification对象", description = "公告通知")
+public class CoreAnnouncementNotification extends BaseEntity {
+    private static final long serialVersionUID = 1L;
+
+    @JsonSerialize(using = ToStringSerializer.class)
+    /**  */
+    private Long id;
+
+    /**
+     * 机构
+     */
+    @JsonSerialize(using = ToStringSerializer.class)
+    private Long orgId;
+
+    /**
+     * 创建机构
+     */
+    @ApiModelProperty(value = "创建机构")
+    private String orgName;
+
+    /**
+     * 机构
+     */
+    private String orgPath;
+
+    /**
+     * 标题
+     */
+    private String title;
+
+    /**
+     * 内容
+     */
+    @ApiModelProperty(value = "内容")
+    private String content;
+
+    /**
+     * 消息类型
+     */
+    @ApiModelProperty(value = "消息类型")
+    private String messagType;
+
+    /**
+     * 机构类型
+     */
+    private String tagOrgType;
+
+    /**
+     * 发布时间
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    @ApiModelProperty(value = "发布时间")
+    @TableField(updateStrategy = FieldStrategy.IGNORED)
+    private Date publishTime;
+
+    /**
+     * 状态
+     */
+    @ApiModelProperty(value = "状态")
+    private String messagStatus;
+
+    @ApiModelProperty(value = "文件")
+    private String fileList;
+
+}

+ 39 - 0
soc-common/soc-common-core/src/main/java/com/xunmei/common/core/domain/message/domain/CoreAnnouncementNotificationToOrg.java

@@ -0,0 +1,39 @@
+package com.xunmei.common.core.domain.message.domain;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
+import com.xunmei.common.core.web.domain.BaseEntity;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+import java.util.Date;
+
+/**
+ * 公告通知对象 core_announcement_notification
+ *
+ * @author xunmei
+ * @date 2023-09-13
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+@TableName("core_announcement_notification_to_org")
+@ApiModel(value = "CoreAnnouncementNotificationToOrg对象" , description = "公告通知")
+public class CoreAnnouncementNotificationToOrg extends BaseEntity
+        {
+         private static final long serialVersionUID=1L;
+    @JsonSerialize(using = ToStringSerializer.class)
+
+    private Long announcementNotificationId;
+
+    /** 机构 */
+    @JsonSerialize(using = ToStringSerializer.class)
+    private Long orgId;
+
+
+   }

+ 38 - 0
soc-common/soc-common-core/src/main/java/com/xunmei/common/core/domain/message/domain/CoreAnnouncementNotificationToRole.java

@@ -0,0 +1,38 @@
+package com.xunmei.common.core.domain.message.domain;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
+import com.xunmei.common.core.web.domain.BaseEntity;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+import java.util.Date;
+
+/**
+ * 公告通知对象 core_announcement_notification
+ *
+ * @author xunmei
+ * @date 2023-09-13
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+@TableName("core_announcement_notification_to_role")
+@ApiModel(value = "CoreAnnouncementNotificationToRole对象" , description = "公告通知")
+public class CoreAnnouncementNotificationToRole extends BaseEntity
+        {
+private static final long serialVersionUID=1L;
+
+    /**  */
+    @JsonSerialize(using = ToStringSerializer.class)
+    private Long announcementNotificationId;
+    /** 机构 */
+    @JsonSerialize(using = ToStringSerializer.class)
+    private Long roleId;
+
+        }

+ 48 - 0
soc-common/soc-common-core/src/main/java/com/xunmei/common/core/domain/message/domain/CoreAnnouncementNotificationToUser.java

@@ -0,0 +1,48 @@
+package com.xunmei.common.core.domain.message.domain;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
+import com.xunmei.common.core.web.domain.BaseEntity;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+/**
+ * 公告通知对象 core_announcement_notification
+ *
+ * @author xunmei
+ * @date 2023-09-13
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+@TableName("core_announcement_notification_to_user")
+@ApiModel(value = "CoreAnnouncementNotificationToOrg对象" , description = "公告通知")
+public class CoreAnnouncementNotificationToUser extends BaseEntity
+        {
+         private static final long serialVersionUID=1L;
+    @JsonSerialize(using = ToStringSerializer.class)
+    private Long id;
+
+    @JsonSerialize(using = ToStringSerializer.class)
+    private Long announcementNotificationId;
+
+    /** 机构 */
+    @JsonSerialize(using = ToStringSerializer.class)
+    private Long orgId;
+
+    /** 角色 */
+    @JsonSerialize(using = ToStringSerializer.class)
+    private Long roleId;
+
+    /** 用户 */
+    @JsonSerialize(using = ToStringSerializer.class)
+    private Long userId;
+
+
+
+
+   }

+ 81 - 0
soc-common/soc-common-core/src/main/java/com/xunmei/common/core/domain/message/dto/CoreAnnouncementNotificationDto.java

@@ -0,0 +1,81 @@
+package com.xunmei.common.core.domain.message.dto;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
+import com.xunmei.common.core.web.domain.BaseEntity;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+
+import java.util.Date;
+import java.util.List;
+
+/**
+ * 公告通知对象 core_announcement_notification
+ *
+ * @author xunmei
+ * @date 2023-09-13
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+
+@ApiModel(value = "CoreAnnouncementNotification对象" , description = "公告通知")
+public class CoreAnnouncementNotificationDto extends BaseEntity
+        {
+private static final long serialVersionUID=1L;
+
+    /**  */
+    @JsonSerialize(using = ToStringSerializer.class)
+    private Long id;
+
+    /** 机构 */
+    @JsonSerialize(using = ToStringSerializer.class)
+    private Long orgId;
+
+    /** 创建机构 */
+            @ApiModelProperty(value = "创建机构")
+    private String orgName;
+
+    /** 机构 */
+    private String orgPath;
+
+    /** 标题 */
+    private String title;
+
+    /** 内容 */
+            @ApiModelProperty(value = "内容")
+    private String content;
+
+    /** 消息类型 */
+            @ApiModelProperty(value = "消息类型")
+    private String messagType;
+            /**
+             * 机构类型
+             */
+      private String  tagOrgType;
+    /** 目标机构 */
+    private List<Long> tagOrgIds;
+
+    /** 目标角色 */
+    private List<Long> tagRoleIds;
+
+    /** 发布时间 */
+            @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+            @ApiModelProperty(value = "发布时间")
+    private Date publishTime;
+
+    /** 状态 */
+            @ApiModelProperty(value = "状态")
+    private String messagStatus;
+
+            @ApiModelProperty(value = "附件")
+            private List<String> fileList;
+
+        }

+ 48 - 0
soc-common/soc-common-core/src/main/java/com/xunmei/common/core/domain/message/dto/CoreAnnouncementNotificationPageDto.java

@@ -0,0 +1,48 @@
+package com.xunmei.common.core.domain.message.dto;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
+import com.xunmei.common.core.web.domain.BaseEntity;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+import java.util.Date;
+import java.util.List;
+
+/**
+ * 公告通知对象 core_announcement_notification
+ *
+ * @author xunmei
+ * @date 2023-09-13
+ */
+@Data
+@ApiModel(value = "CoreAnnouncementNotification对象" , description = "公告通知")
+public class CoreAnnouncementNotificationPageDto
+        {
+            /**
+             * 页面
+             */
+            private Long pageNum;
+            /**
+             * 每页大小
+             */
+            private Long pageSize;
+            /**
+             * 是否下穿
+             */
+            @JsonSerialize(using = ToStringSerializer.class)
+            private Long orgId;
+
+            /** 调阅机构 */
+            private String orgPath;
+
+            private Boolean checkSub = false;
+            private String title;
+            private Date[] dateRange;
+            private String messagStatus;
+
+        }

+ 78 - 0
soc-common/soc-common-core/src/main/java/com/xunmei/common/core/domain/message/vo/CoreAnnouncementNotificationPageVo.java

@@ -0,0 +1,78 @@
+package com.xunmei.common.core.domain.message.vo;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
+import com.xunmei.common.core.web.domain.BaseEntity;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+import java.util.Date;
+import java.util.List;
+
+/**
+ * 公告通知对象 core_announcement_notification
+ *
+ * @author xunmei
+ * @date 2023-09-13
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+
+@ApiModel(value = "CoreAnnouncementNotification对象" , description = "公告通知")
+public class CoreAnnouncementNotificationPageVo extends BaseEntity
+        {
+private static final long serialVersionUID=1L;
+
+    /**  */
+    @JsonSerialize(using = ToStringSerializer.class)
+    private Long id;
+
+    /** 机构 */
+    @JsonSerialize(using = ToStringSerializer.class)
+    private Long orgId;
+
+    /** 创建机构 */
+            @ApiModelProperty(value = "创建机构")
+    private String orgName;
+
+    /** 机构 */
+    private String orgPath;
+
+    /** 标题 */
+    private String title;
+
+    /** 内容 */
+            @ApiModelProperty(value = "内容")
+    private String content;
+
+    /** 消息类型 */
+            @ApiModelProperty(value = "消息类型")
+    private String messagType;
+            /**
+             * 机构类型
+             */
+      private String  tagOrgType;
+    /** 目标机构 */
+    private List<Long> tagOrgIds;
+
+    /** 目标角色 */
+    private List<Long> tagRoleIds;
+
+    /** 发布时间 */
+            @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+            @ApiModelProperty(value = "发布时间")
+    private Date publishTime;
+
+    /** 状态 */
+            @ApiModelProperty(value = "状态")
+    private String messagStatus;
+
+            @ApiModelProperty(value = "附件")
+            private List<String> fileList;
+
+        }

+ 21 - 0
soc-common/soc-common-core/src/main/java/com/xunmei/common/core/domain/weather/vo/CityInfoVo.java

@@ -0,0 +1,21 @@
+package com.xunmei.common.core.domain.weather.vo;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * <p>
+ * 试卷
+ * </p>
+ *
+ * @author oygj
+ * @since 2023-01-17
+ */
+@Data
+public class CityInfoVo implements Serializable {
+    private String areaId;
+    private String nameCn;
+    private String groupId;
+}

+ 23 - 0
soc-common/soc-common-core/src/main/java/com/xunmei/common/core/domain/weather/vo/SelectCityInfoVo.java

@@ -0,0 +1,23 @@
+package com.xunmei.common.core.domain.weather.vo;
+
+import lombok.Builder;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.List;
+
+/**
+ * <p>
+ * 试卷
+ * </p>
+ *
+ * @author oygj
+ * @since 2023-01-17
+ */
+@Data
+@Builder
+public class SelectCityInfoVo implements Serializable {
+    private String value;
+    private String label;
+    private List<SelectCityInfoVo> children;
+}

+ 103 - 0
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/message/controller/CoreAnnouncementNotificationController.java

@@ -0,0 +1,103 @@
+package com.xunmei.core.message.controller;
+
+import com.xunmei.common.core.domain.message.domain.CoreAnnouncementNotification;
+import com.xunmei.common.core.domain.message.dto.CoreAnnouncementNotificationDto;
+import com.xunmei.common.core.domain.message.dto.CoreAnnouncementNotificationPageDto;
+import com.xunmei.common.core.domain.message.vo.CoreAnnouncementNotificationPageVo;
+import com.xunmei.common.core.web.controller.BaseController;
+import com.xunmei.common.core.web.domain.AjaxResult;
+import com.xunmei.common.core.web.page.TableDataInfo;
+import com.xunmei.common.log.annotation.Log;
+import com.xunmei.common.log.enums.BusinessType;
+import com.xunmei.common.security.annotation.Logical;
+import com.xunmei.common.security.annotation.RequiresPermissions;
+import com.xunmei.core.message.service.ICoreAnnouncementNotificationService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+/**
+ * 公告通知Controller
+ *
+ * @author xunmei
+ * @date 2023-09-13
+ */
+@Api(tags = {"CoreAnnouncementNotification" })
+@RestController
+@RequestMapping("/notification")
+public class CoreAnnouncementNotificationController extends BaseController {
+    @Autowired
+    private ICoreAnnouncementNotificationService coreAnnouncementNotificationService;
+
+/**
+ * 查询公告通知列表
+ */
+@ApiOperation(value = "查询CoreAnnouncementNotification列表")
+@RequiresPermissions("core:notification:list")
+@GetMapping("/list")
+    public TableDataInfo<CoreAnnouncementNotificationPageVo> list(CoreAnnouncementNotificationPageDto request) {
+
+        return coreAnnouncementNotificationService.selectPage(request);
+    }
+
+
+
+    /**
+     * 获取公告通知详细信息
+     */
+    @ApiOperation(value = "获取CoreAnnouncementNotification详细信息")
+    @RequiresPermissions("core:notification:query")
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") Long id) {
+        return success(coreAnnouncementNotificationService.selectCoreAnnouncementNotificationById(id));
+    }
+
+    /**
+     * 新增公告通知
+     */
+    @ApiOperation(value = "新增CoreAnnouncementNotification")
+    @RequiresPermissions("core:notification:add")
+    @Log(title = "公告通知" , businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody CoreAnnouncementNotificationDto coreAnnouncementNotification) {
+        coreAnnouncementNotificationService.insertCoreAnnouncementNotification(coreAnnouncementNotification);
+        return success();
+    }
+
+    /**
+     * 修改公告通知
+     */
+    @ApiOperation(value = "修改CoreAnnouncementNotification")
+    @Log(title = "公告通知" , businessType = BusinessType.UPDATE)
+    @RequiresPermissions("core:notification:edit")
+    @PutMapping
+    public AjaxResult edit(@RequestBody CoreAnnouncementNotificationDto coreAnnouncementNotification) {
+        coreAnnouncementNotificationService.updateCoreAnnouncementNotification(coreAnnouncementNotification);
+        return success();
+    }
+
+    /**
+     * 删除公告通知
+     */
+    @ApiOperation(value = "删除CoreAnnouncementNotification")
+    @RequiresPermissions("core:notification:remove")
+    @Log(title = "公告通知" , businessType = BusinessType.DELETE)
+    @DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable Long[] ids) {
+        coreAnnouncementNotificationService.deleteCoreAnnouncementNotificationByIds(ids);
+        return success();
+    }
+
+    /**
+     * 发布、取消发布公告通知
+     */
+    @ApiOperation(value = "发布、取消发布公告通知")
+    @RequiresPermissions(value ={"core:notification:publish","core:notification:cancelPublish"},logical = Logical.OR)
+    @Log(title = "发布、取消发布公告通知" , businessType = BusinessType.DELETE)
+    @GetMapping("/publish/{id}")
+    public AjaxResult publish(@PathVariable Long id) {
+        coreAnnouncementNotificationService.publish(id);
+        return success();
+    }
+}

+ 82 - 0
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/message/mapper/CoreAnnouncementNotificationMapper.java

@@ -0,0 +1,82 @@
+package com.xunmei.core.message.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.xunmei.common.core.domain.message.domain.CoreAnnouncementNotification;
+import com.xunmei.common.core.domain.message.domain.CoreAnnouncementNotificationToOrg;
+import com.xunmei.common.core.domain.message.domain.CoreAnnouncementNotificationToRole;
+import com.xunmei.common.core.domain.message.dto.CoreAnnouncementNotificationPageDto;
+import com.xunmei.common.core.domain.message.vo.CoreAnnouncementNotificationPageVo;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+/**
+ * 公告通知Mapper接口
+ *
+ * @author xunmei
+ * @date 2023-09-13
+ */
+public interface CoreAnnouncementNotificationMapper extends BaseMapper<CoreAnnouncementNotification> {
+    /**
+     * 查询公告通知
+     *
+     * @param id 公告通知主键
+     * @return 公告通知
+     */
+    CoreAnnouncementNotification selectCoreAnnouncementNotificationById(Long id);
+
+    /**
+     * 查询公告通知列表
+     *
+     * @param coreAnnouncementNotification 公告通知
+     * @return 公告通知集合
+     */
+    List<CoreAnnouncementNotification> selectCoreAnnouncementNotificationList(CoreAnnouncementNotification coreAnnouncementNotification);
+
+    /**
+     * 新增公告通知
+     *
+     * @param coreAnnouncementNotification 公告通知
+     * @return 结果
+     */
+    int insertCoreAnnouncementNotification(CoreAnnouncementNotification coreAnnouncementNotification);
+
+    /**
+     * 修改公告通知
+     *
+     * @param coreAnnouncementNotification 公告通知
+     * @return 结果
+     */
+    int updateCoreAnnouncementNotification(CoreAnnouncementNotification coreAnnouncementNotification);
+
+    /**
+     * 删除公告通知
+     *
+     * @param id 公告通知主键
+     * @return 结果
+     */
+    int deleteCoreAnnouncementNotificationById(Long id);
+
+    /**
+     * 批量删除公告通知
+     *
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    int deleteCoreAnnouncementNotificationByIds(Long[] ids);
+
+    void insertBatchToOrg(@Param("list") List<CoreAnnouncementNotificationToOrg> list);
+
+    void insertBatchToRole(@Param("list") List<CoreAnnouncementNotificationToRole> list);
+
+    Page<CoreAnnouncementNotificationPageVo> selectPageList( @Param("page") Page<CoreAnnouncementNotificationPageVo> page,  @Param("request")CoreAnnouncementNotificationPageDto request);
+
+    List<CoreAnnouncementNotificationToOrg> selectOrgIds(@Param("records") List<CoreAnnouncementNotificationPageVo> records);
+
+    List<CoreAnnouncementNotificationToRole> selectRoleIds(@Param("records") List<CoreAnnouncementNotificationPageVo> records);
+
+    void deleteRoleAndOrg(@Param("notificationId") Long notificationId);
+
+    void deleteNotificationToUsers(@Param("notificationId")  Long notificationId);
+}

+ 76 - 0
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/message/service/ICoreAnnouncementNotificationService.java

@@ -0,0 +1,76 @@
+package com.xunmei.core.message.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.xunmei.common.core.domain.message.domain.CoreAnnouncementNotification;
+import com.xunmei.common.core.domain.message.dto.CoreAnnouncementNotificationDto;
+import com.xunmei.common.core.domain.message.dto.CoreAnnouncementNotificationPageDto;
+import com.xunmei.common.core.domain.message.vo.CoreAnnouncementNotificationPageVo;
+import com.xunmei.common.core.web.page.TableDataInfo;
+
+import java.util.List;
+
+/**
+ * 公告通知Service接口
+ *
+ * @author xunmei
+ * @date 2023-09-13
+ */
+public interface ICoreAnnouncementNotificationService extends IService<CoreAnnouncementNotification> {
+    /**
+     * 查询公告通知
+     *
+     * @param id 公告通知主键
+     * @return 公告通知
+     */
+    CoreAnnouncementNotificationPageVo selectCoreAnnouncementNotificationById(Long id);
+
+    /**
+     * 查询公告通知列表
+     *
+     * @param coreAnnouncementNotification 公告通知
+     * @return 公告通知集合
+     */
+    List<CoreAnnouncementNotification> selectCoreAnnouncementNotificationList(CoreAnnouncementNotification coreAnnouncementNotification);
+
+    /**
+     * 新增公告通知
+     *
+     * @param coreAnnouncementNotification 公告通知
+     * @return 结果
+     */
+    void insertCoreAnnouncementNotification(CoreAnnouncementNotificationDto coreAnnouncementNotification);
+
+    /**
+     * 修改公告通知
+     *
+     * @param coreAnnouncementNotification 公告通知
+     * @return 结果
+     */
+    void updateCoreAnnouncementNotification(CoreAnnouncementNotificationDto coreAnnouncementNotification);
+
+    /**
+     * 批量删除公告通知
+     *
+     * @param ids 需要删除的公告通知主键集合
+     * @return 结果
+     */
+    void deleteCoreAnnouncementNotificationByIds(Long[] ids);
+
+    /**
+     * 删除公告通知信息
+     *
+     * @param id 公告通知主键
+     * @return 结果
+     */
+    int deleteCoreAnnouncementNotificationById(Long id);
+
+    /**
+     * 查询公告通知分页数据
+     *
+     * @param coreAnnouncementNotification 查询条件对象
+     * @return Page
+     */
+    TableDataInfo<CoreAnnouncementNotificationPageVo> selectPage(CoreAnnouncementNotificationPageDto request);
+
+    void publish(Long id);
+}

+ 260 - 0
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/message/service/impl/CoreAnnouncementNotificationServiceImpl.java

@@ -0,0 +1,260 @@
+package com.xunmei.core.message.service.impl;
+
+import cn.hutool.core.collection.CollectionUtil;
+import cn.hutool.core.util.ObjectUtil;
+import com.alibaba.fastjson2.JSON;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.toolkit.IdWorker;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.xunmei.common.core.constant.ErrorMsgConstants;
+import com.xunmei.common.core.constant.SecurityConstants;
+import com.xunmei.common.core.domain.message.domain.CoreAnnouncementNotification;
+import com.xunmei.common.core.domain.message.domain.CoreAnnouncementNotificationToOrg;
+import com.xunmei.common.core.domain.message.domain.CoreAnnouncementNotificationToRole;
+import com.xunmei.common.core.domain.message.domain.CoreAnnouncementNotificationToUser;
+import com.xunmei.common.core.domain.message.dto.CoreAnnouncementNotificationDto;
+import com.xunmei.common.core.domain.message.dto.CoreAnnouncementNotificationPageDto;
+import com.xunmei.common.core.domain.message.vo.CoreAnnouncementNotificationPageVo;
+import com.xunmei.common.core.util.BeanHelper;
+import com.xunmei.common.core.utils.DateUtils;
+import com.xunmei.common.core.utils.bean.BeanUtils;
+import com.xunmei.common.core.web.page.TableDataInfo;
+import com.xunmei.common.security.utils.SecurityUtils;
+import com.xunmei.core.message.mapper.CoreAnnouncementNotificationMapper;
+import com.xunmei.core.message.service.ICoreAnnouncementNotificationService;
+import com.xunmei.system.api.RemoteOrgService;
+import com.xunmei.system.api.RemoteUserService;
+import com.xunmei.system.api.domain.SysOrg;
+import com.xunmei.system.api.domain.SysUser;
+import com.xunmei.system.api.function.RemoteCallHandlerExecutor;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import javax.annotation.Resource;
+import java.util.*;
+import java.util.stream.Collectors;
+
+/**
+ * 公告通知Service业务层处理
+ *
+ * @author xunmei
+ * @date 2023-09-13
+ */
+@Service
+public class CoreAnnouncementNotificationServiceImpl extends ServiceImpl<CoreAnnouncementNotificationMapper, CoreAnnouncementNotification> implements ICoreAnnouncementNotificationService {
+    @Resource
+    private CoreAnnouncementNotificationMapper coreAnnouncementNotificationMapper;
+    @Resource
+    private RemoteOrgService orgService;
+    @Resource
+    private RemoteUserService userService;
+
+    @Override
+    public TableDataInfo<CoreAnnouncementNotificationPageVo> selectPage(CoreAnnouncementNotificationPageDto request) {
+        //未删除
+        Page<CoreAnnouncementNotificationPageVo> page;
+        //分页
+        if (request.getPageNum()!=null&&request.getPageSize()!=null)
+        {
+            page = new Page<>(request.getPageNum(), request.getPageSize());
+        }else{
+            page = new Page<>();
+        }
+        //下穿
+        if (request.getCheckSub()) {
+            SysOrg sysOrg = RemoteCallHandlerExecutor.executeRemoteCall(() -> orgService.selectSysOrgById(request.getOrgId(),SecurityConstants.INNER), ErrorMsgConstants.QUERY_ORG_DATA_ERROR);
+            request.setOrgPath(sysOrg.getPath());
+            request.setOrgId(null);
+        }
+        //获取数据
+        page = coreAnnouncementNotificationMapper.selectPageList(page, request);
+        if(page!=null&&CollectionUtil.isNotEmpty(page.getRecords())){
+            page = this.getOrgAndRoleListMap(page);
+        }
+
+        //抓换为TableDataInfo适配前端
+        return TableDataInfo.build(page);
+
+
+
+
+    }
+
+    @Override
+    @Transactional(rollbackFor =  Exception.class)
+    public void publish(Long id) {
+        CoreAnnouncementNotification coreAnnouncementNotification = coreAnnouncementNotificationMapper.selectById(id);
+        //发布
+        if(coreAnnouncementNotification.getMessagStatus().equals("0")){
+            coreAnnouncementNotification.setMessagStatus("1");
+            coreAnnouncementNotification.setPublishTime(new Date());
+        }else{//取消发布
+            coreAnnouncementNotification.setMessagStatus("0");
+            coreAnnouncementNotification.setPublishTime(null);
+            //删除查看记录
+            //todo
+            coreAnnouncementNotificationMapper.deleteNotificationToUsers(id);
+        }
+        coreAnnouncementNotificationMapper.updateById(coreAnnouncementNotification);
+    }
+
+    private Page<CoreAnnouncementNotificationPageVo> getOrgAndRoleListMap(Page<CoreAnnouncementNotificationPageVo> page) {
+        List<CoreAnnouncementNotificationPageVo> records = page.getRecords();
+        List<CoreAnnouncementNotificationToOrg> notificationToOrgs = coreAnnouncementNotificationMapper.selectOrgIds(records);
+        List<CoreAnnouncementNotificationToRole> notificationToRoles = coreAnnouncementNotificationMapper.selectRoleIds(records);
+        for(CoreAnnouncementNotificationPageVo record : records){
+            record.setTagOrgIds(notificationToOrgs.stream().filter(org -> org.getAnnouncementNotificationId().equals(record.getId())).map(CoreAnnouncementNotificationToOrg::getOrgId).collect(Collectors.toList()));
+            record.setTagRoleIds(notificationToRoles.stream().filter(role -> role.getAnnouncementNotificationId().equals(record.getId())).map(CoreAnnouncementNotificationToRole::getRoleId).collect(Collectors.toList()));
+        }
+        return page;
+    }
+
+
+    /**
+     * 查询公告通知
+     *
+     * @param id 公告通知主键
+     * @return 公告通知
+     */
+    @Override
+    public CoreAnnouncementNotificationPageVo selectCoreAnnouncementNotificationById(Long id) {
+        CoreAnnouncementNotificationPageVo vo = new CoreAnnouncementNotificationPageVo();
+        CoreAnnouncementNotification coreAnnouncementNotification = coreAnnouncementNotificationMapper.selectById(id);
+        BeanUtils.copyProperties(coreAnnouncementNotification, vo);
+        vo.setFileList(ObjectUtil.isNotEmpty(coreAnnouncementNotification.getFileList()) ? JSON.parseArray(coreAnnouncementNotification.getFileList(), String.class) : null);
+        List<CoreAnnouncementNotificationPageVo> records = new ArrayList<>();
+        records.add(vo);
+        List<CoreAnnouncementNotificationToOrg> notificationToOrgs = coreAnnouncementNotificationMapper.selectOrgIds(records);
+        List<CoreAnnouncementNotificationToRole> notificationToRoles = coreAnnouncementNotificationMapper.selectRoleIds(records);
+        vo.setTagOrgIds(notificationToOrgs.stream().filter(org -> org.getAnnouncementNotificationId().equals(vo.getId())).map(CoreAnnouncementNotificationToOrg::getOrgId).collect(Collectors.toList()));
+        vo.setTagRoleIds(notificationToRoles.stream().filter(role -> role.getAnnouncementNotificationId().equals(vo.getId())).map(CoreAnnouncementNotificationToRole::getRoleId).collect(Collectors.toList()));
+        return vo;
+    }
+
+    /**
+     * 查询公告通知列表
+     *
+     * @param coreAnnouncementNotification 公告通知
+     * @return 公告通知
+     */
+    @Override
+    public List<CoreAnnouncementNotification> selectCoreAnnouncementNotificationList(CoreAnnouncementNotification coreAnnouncementNotification) {
+        return coreAnnouncementNotificationMapper.selectList(new QueryWrapper<>(coreAnnouncementNotification));
+    }
+
+    /**
+     * 新增公告通知
+     *
+     * @param request 公告通知
+     * @return 结果
+     */
+    @Override
+   @Transactional(rollbackFor =  Exception.class)
+    public void insertCoreAnnouncementNotification(CoreAnnouncementNotificationDto request) {
+        List<Long> orgIds = request.getTagOrgIds();
+        List<Long> roleIds = request.getTagRoleIds();
+        CoreAnnouncementNotification notification = this.buildSaveObject(request);
+        if(CollectionUtil.isNotEmpty(orgIds)){
+            List<CoreAnnouncementNotificationToOrg> list = new ArrayList<>();
+            orgIds.forEach(orgId -> {
+                CoreAnnouncementNotificationToOrg toOrg = new CoreAnnouncementNotificationToOrg();
+                toOrg.setOrgId(orgId);
+                toOrg.setAnnouncementNotificationId(notification.getId());
+                list.add(toOrg);
+            });
+            coreAnnouncementNotificationMapper.insertBatchToOrg(list);
+        }
+        if(CollectionUtil.isNotEmpty(roleIds)){
+            List<CoreAnnouncementNotificationToRole> list = new ArrayList<>();
+            roleIds.forEach(roleId -> {
+                CoreAnnouncementNotificationToRole toOrg = new CoreAnnouncementNotificationToRole();
+                toOrg.setRoleId(roleId);
+                toOrg.setAnnouncementNotificationId(notification.getId());
+                list.add(toOrg);
+            });
+            coreAnnouncementNotificationMapper.insertBatchToRole(list);
+        }
+         coreAnnouncementNotificationMapper.insert(notification);
+    }
+
+    private CoreAnnouncementNotification buildSaveObject(CoreAnnouncementNotificationDto request) {
+        SysOrg sysOrg = RemoteCallHandlerExecutor.executeRemoteCall(() -> orgService.selectSysOrgById(request.getOrgId(), SecurityConstants.INNER), ErrorMsgConstants.QUERY_ORG_DATA_ERROR);
+        CoreAnnouncementNotification notification = new CoreAnnouncementNotification();
+        BeanHelper.copyProperties(notification,request);
+        notification.setFileList(ObjectUtil.isNotEmpty(request.getFileList()) ? JSON.toJSONString(request.getFileList()) : null);
+        notification.setCreateTime(DateUtils.getNowDate());
+        notification.setCreateBy(SecurityUtils.getUsername());
+        notification.setId(request.getId()==null?IdWorker.getId():request.getId());
+        notification.setOrgPath(sysOrg.getPath());
+        notification.setOrgName(sysOrg.getShortName());
+        notification.setOrgId(request.getOrgId());
+        notification.setMessagStatus("0");
+     return notification;
+    }
+    /**
+     * 修改公告通知
+     *
+     * @param request 公告通知
+     * @return 结果
+     */
+    @Transactional(rollbackFor =  Exception.class)
+    @Override
+    public void updateCoreAnnouncementNotification(CoreAnnouncementNotificationDto request) {
+        List<Long> orgIds = request.getTagOrgIds();
+        List<Long> roleIds = request.getTagRoleIds();
+        //删除公告通知与角色和机构的关系
+        coreAnnouncementNotificationMapper.deleteRoleAndOrg(request.getId());
+        CoreAnnouncementNotification notification = this.buildSaveObject(request);
+        if(CollectionUtil.isNotEmpty(orgIds)){
+            List<CoreAnnouncementNotificationToOrg> list = new ArrayList<>();
+            orgIds.forEach(orgId -> {
+                CoreAnnouncementNotificationToOrg toOrg = new CoreAnnouncementNotificationToOrg();
+                toOrg.setOrgId(orgId);
+                toOrg.setAnnouncementNotificationId(notification.getId());
+                list.add(toOrg);
+            });
+            coreAnnouncementNotificationMapper.insertBatchToOrg(list);
+        }
+        if(CollectionUtil.isNotEmpty(roleIds)){
+            List<CoreAnnouncementNotificationToRole> list = new ArrayList<>();
+            roleIds.forEach(roleId -> {
+                CoreAnnouncementNotificationToRole toOrg = new CoreAnnouncementNotificationToRole();
+                toOrg.setRoleId(roleId);
+                toOrg.setAnnouncementNotificationId(notification.getId());
+                list.add(toOrg);
+            });
+            coreAnnouncementNotificationMapper.insertBatchToRole(list);
+        }
+         coreAnnouncementNotificationMapper.updateById(notification);
+    }
+
+    /**
+     * 批量删除公告通知
+     *
+     * @param ids 需要删除的公告通知主键
+     * @return 结果
+     */
+    @Override
+    public void deleteCoreAnnouncementNotificationByIds(Long[] ids) {
+         coreAnnouncementNotificationMapper.deleteBatchIds(Arrays.asList((ids)));
+        //删除公告通知与角色和机构的关系
+        //刪除已读记录
+        for(Long id:ids){
+            coreAnnouncementNotificationMapper.deleteRoleAndOrg(id);
+            coreAnnouncementNotificationMapper.deleteNotificationToUsers(id);
+        }
+
+    }
+
+    /**
+     * 删除公告通知信息
+     *
+     * @param id 公告通知主键
+     * @return 结果
+     */
+    @Override
+    public int deleteCoreAnnouncementNotificationById(Long id) {
+        return coreAnnouncementNotificationMapper.deleteById(id);
+    }
+}

+ 9 - 1
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/weather/controller/WeatherWarningController.java

@@ -4,6 +4,8 @@ package com.xunmei.core.weather.controller;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.xunmei.common.core.domain.weather.domain.WeatherWarning;
 import com.xunmei.common.core.domain.weather.dto.WeatherWarningDto;
+import com.xunmei.common.core.domain.weather.vo.CityInfoVo;
+import com.xunmei.common.core.domain.weather.vo.SelectCityInfoVo;
 import com.xunmei.common.core.utils.KeyValue;
 import com.xunmei.common.core.web.domain.AjaxResult;
 import com.xunmei.common.core.web.page.TableDataInfo;
@@ -44,10 +46,16 @@ public class WeatherWarningController {
         return AjaxResult.success(weatherWarnings);
 
     }
+    @GetMapping(value = "/selectCityInfoVoList")
+    public AjaxResult selectCityInfoVoList(){
+        /*List<KeyValue> cityList = weatherWarningService.cityCodeList();*/
+        List<SelectCityInfoVo> cityList =  weatherWarningService.cityInfoVoList();
+    return AjaxResult.success(cityList);
+    }
     @GetMapping(value = "/cityCodeList")
     public AjaxResult cityCodeList(){
         List<KeyValue> cityList = weatherWarningService.cityCodeList();
-    return AjaxResult.success(cityList);
+        return AjaxResult.success(cityList);
     }
     @InnerAuth
     @GetMapping(value = "/getDataFromApi")

+ 3 - 0
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/weather/mapper/WeatherWarningMapper.java

@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.xunmei.common.core.domain.weather.domain.WeatherWarning;
 import com.xunmei.common.core.domain.weather.dto.WeatherWarningDto;
+import com.xunmei.common.core.domain.weather.vo.CityInfoVo;
 import com.xunmei.common.core.utils.KeyValue;
 import org.apache.ibatis.annotations.Mapper;
 import org.apache.ibatis.annotations.Param;
@@ -29,4 +30,6 @@ public interface WeatherWarningMapper extends BaseMapper<WeatherWarning> {
     List<WeatherWarning> findListAllByDate(@Param("time") DateTime time);
 
     List<KeyValue> cityCodeList();
+
+    List<CityInfoVo> cityInfoVoList();
 }

+ 4 - 0
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/weather/service/IWeatherWarningService.java

@@ -4,6 +4,8 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.IService;
 import com.xunmei.common.core.domain.weather.domain.WeatherWarning;
 import com.xunmei.common.core.domain.weather.dto.WeatherWarningDto;
+import com.xunmei.common.core.domain.weather.vo.CityInfoVo;
+import com.xunmei.common.core.domain.weather.vo.SelectCityInfoVo;
 import com.xunmei.common.core.utils.KeyValue;
 import com.xunmei.common.core.web.page.TableDataInfo;
 
@@ -26,4 +28,6 @@ public interface IWeatherWarningService extends IService<WeatherWarning> {
     List<WeatherWarning> getTheAreaWeather(Long orgId);
 
     List<KeyValue> cityCodeList();
+
+    List<SelectCityInfoVo> cityInfoVoList();
 }

+ 18 - 0
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/weather/service/impl/WeatherWarningServiceImpl.java

@@ -14,6 +14,8 @@ import com.xunmei.common.core.constant.SecurityConstants;
 import com.xunmei.common.core.domain.R;
 import com.xunmei.common.core.domain.weather.domain.WeatherWarning;
 import com.xunmei.common.core.domain.weather.dto.WeatherWarningDto;
+import com.xunmei.common.core.domain.weather.vo.CityInfoVo;
+import com.xunmei.common.core.domain.weather.vo.SelectCityInfoVo;
 import com.xunmei.common.core.utils.KeyValue;
 import com.xunmei.common.core.web.page.TableDataInfo;
 import com.xunmei.core.weather.mapper.WeatherWarningMapper;
@@ -127,6 +129,22 @@ public class WeatherWarningServiceImpl extends ServiceImpl<WeatherWarningMapper,
         return baseMapper.cityCodeList();
     }
 
+    @Override
+    public List<SelectCityInfoVo> cityInfoVoList() {
+        List<SelectCityInfoVo> cityInfoVoList = new ArrayList<>();
+        List<CityInfoVo> list = baseMapper.cityInfoVoList();
+        List<CityInfoVo> lista = list.stream().filter(r->r.getGroupId().equals("-1")).collect(Collectors.toList());
+        lista.forEach(r->{
+            SelectCityInfoVo selectCityInfoVo = SelectCityInfoVo.builder().value(r.getAreaId()).label(r.getNameCn()).children(new ArrayList<>()).build();
+            List<CityInfoVo> listb = list.stream().filter(s->s.getGroupId().equals(r.getAreaId())||s.getAreaId().equals(r.getAreaId())).collect(Collectors.toList());
+            listb.forEach(a->{
+                selectCityInfoVo.getChildren().add(SelectCityInfoVo.builder().value(a.getAreaId()).label(a.getNameCn()).build());
+            });
+            cityInfoVoList.add(selectCityInfoVo);
+        });
+         return cityInfoVoList;
+    }
+
     private  String getWeathDatafromApi(String areaId,String appCode){
         String host = "https://ali-weather.showapi.com";
         String path = "/area-to-weather";

+ 221 - 0
soc-modules/soc-modules-core/src/main/resources/mapper/message/CoreAnnouncementNotificationMapper.xml

@@ -0,0 +1,221 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.xunmei.core.message.mapper.CoreAnnouncementNotificationMapper">
+
+    <resultMap type="com.xunmei.common.core.domain.message.domain.CoreAnnouncementNotification" id="CoreAnnouncementNotificationResult">
+                <result property="id" column="id"/>
+                <result property="orgId" column="org_id"/>
+                <result property="orgName" column="org_name"/>
+                <result property="orgPath" column="org_path"/>
+                <result property="title" column="title"/>
+                <result property="content" column="content"/>
+                <result property="messagType" column="messag_type"/>
+                <result property="createBy" column="create_by"/>
+                <result property="createTime" column="create_time"/>
+                <result property="publishTime" column="publish_time"/>
+                <result property="messagStatus" column="messag_status"/>
+                <result property="fileList" column="file_list"/>
+
+    </resultMap>
+
+    <sql id="selectCoreAnnouncementNotificationVo">
+        select id, org_id, org_name, org_path, title, content, messag_type, tag_org_id, tag_role_id, create_by, create_time, publish_time, messag_status
+        from core_announcement_notification
+    </sql>
+
+    <select id="selectCoreAnnouncementNotificationList" parameterType="com.xunmei.common.core.domain.message.domain.CoreAnnouncementNotification"
+            resultMap="CoreAnnouncementNotificationResult">
+        <include refid="selectCoreAnnouncementNotificationVo"/>
+        <where>
+                        <if test="content != null  and content != ''">
+                            and content like concat('%', #{content}, '%')
+                        </if>
+                        <if test="publishTime != null ">
+                            and publish_time = #{publishTime}
+                        </if>
+                        <if test="messagStatus != null  and messagStatus != ''">
+                            and messag_status = #{messagStatus}
+                        </if>
+        </where>
+    </select>
+
+    <select id="selectCoreAnnouncementNotificationById" parameterType="Long"
+            resultMap="CoreAnnouncementNotificationResult">
+            <include refid="selectCoreAnnouncementNotificationVo"/>
+            where id = #{id}
+    </select>
+    <select id="selectPageList"
+            resultType="com.xunmei.common.core.domain.message.vo.CoreAnnouncementNotificationPageVo">
+         select * from core_announcement_notification a where 1=1
+        <if test="request.orgId != null ">
+            and a.org_id = #{request.orgId}
+        </if>
+        <if test="request.orgPath != null  and request.orgPath != ''">
+            and a.org_path like concat( #{request.orgPath}, '%')
+        </if>
+        <if test="request.title != null  and request.title != ''">
+            and a.title like concat('%', #{request.title}, '%')
+        </if>
+        <if test="request.dateRange != null and request.dateRange.length>0">
+            and a.publish_time >= #{request.dateRange[0]}
+            and #{request.dateRange[1]}>=a.publish_time
+        </if>
+        <if test="request.messagStatus != null  and request.messagStatus != ''">
+            and messag_status = #{request.messagStatus}
+        </if>
+    </select>
+    <select id="selectOrgIds"
+            resultType="com.xunmei.common.core.domain.message.domain.CoreAnnouncementNotificationToOrg">
+        select * from core_announcement_notification_to_org a where announcement_notification_id in
+        <foreach collection="records" item="item" open="(" close=")" separator=",">
+            #{item.id}
+        </foreach>
+    </select>
+    <select id="selectRoleIds"
+            resultType="com.xunmei.common.core.domain.message.domain.CoreAnnouncementNotificationToRole">
+        select * from core_announcement_notification_to_role where announcement_notification_id in
+        <foreach collection="records" item="item" open="(" close=")" separator=",">
+            #{item.id}
+        </foreach>
+    </select>
+
+    <insert id="insertCoreAnnouncementNotification" parameterType="com.xunmei.common.core.domain.message.domain.CoreAnnouncementNotification">
+        insert into core_announcement_notification
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+                    <if test="id != null">id,
+                    </if>
+                    <if test="orgId != null">org_id,
+                    </if>
+                    <if test="orgName != null">org_name,
+                    </if>
+                    <if test="orgPath != null">org_path,
+                    </if>
+                    <if test="title != null">title,
+                    </if>
+                    <if test="content != null">content,
+                    </if>
+                    <if test="messagType != null">messag_type,
+                    </if>
+                    <if test="tagOrgId != null">tag_org_id,
+                    </if>
+                    <if test="tagRoleId != null">tag_role_id,
+                    </if>
+                    <if test="createBy != null">create_by,
+                    </if>
+                    <if test="createTime != null">create_time,
+                    </if>
+                    <if test="publishTime != null">publish_time,
+                    </if>
+                    <if test="messagStatus != null">messag_status,
+                    </if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+                    <if test="id != null">#{id},
+                    </if>
+                    <if test="orgId != null">#{orgId},
+                    </if>
+                    <if test="orgName != null">#{orgName},
+                    </if>
+                    <if test="orgPath != null">#{orgPath},
+                    </if>
+                    <if test="title != null">#{title},
+                    </if>
+                    <if test="content != null">#{content},
+                    </if>
+                    <if test="messagType != null">#{messagType},
+                    </if>
+                    <if test="tagOrgId != null">#{tagOrgId},
+                    </if>
+                    <if test="tagRoleId != null">#{tagRoleId},
+                    </if>
+                    <if test="createBy != null">#{createBy},
+                    </if>
+                    <if test="createTime != null">#{createTime},
+                    </if>
+                    <if test="publishTime != null">#{publishTime},
+                    </if>
+                    <if test="messagStatus != null">#{messagStatus},
+                    </if>
+        </trim>
+    </insert>
+    <insert id="insertBatchToOrg">
+        insert into core_announcement_notification_to_org (announcement_notification_id, org_id) values
+        <foreach collection="list" item="item" index="index"  separator="," >
+         (#{item.announcementNotificationId},#{item.orgId})
+        </foreach>
+    </insert>
+    <insert id="insertBatchToRole">
+        insert into core_announcement_notification_to_role (announcement_notification_id, role_id)values
+        <foreach collection="list" item="item" index="index"  separator="," >
+            (#{item.announcementNotificationId},#{item.roleId})
+        </foreach>
+    </insert>
+
+    <update id="updateCoreAnnouncementNotification" parameterType="com.xunmei.common.core.domain.message.domain.CoreAnnouncementNotification">
+        update core_announcement_notification
+        <trim prefix="SET" suffixOverrides=",">
+                    <if test="orgId != null">org_id =
+                        #{orgId},
+                    </if>
+                    <if test="orgName != null">org_name =
+                        #{orgName},
+                    </if>
+                    <if test="orgPath != null">org_path =
+                        #{orgPath},
+                    </if>
+                    <if test="title != null">title =
+                        #{title},
+                    </if>
+                    <if test="content != null">content =
+                        #{content},
+                    </if>
+                    <if test="messagType != null">messag_type =
+                        #{messagType},
+                    </if>
+                    <if test="tagOrgId != null">tag_org_id =
+                        #{tagOrgId},
+                    </if>
+                    <if test="tagRoleId != null">tag_role_id =
+                        #{tagRoleId},
+                    </if>
+                    <if test="createBy != null">create_by =
+                        #{createBy},
+                    </if>
+                    <if test="createTime != null">create_time =
+                        #{createTime},
+                    </if>
+                    <if test="publishTime != null">publish_time =
+                        #{publishTime},
+                    </if>
+                    <if test="messagStatus != null">messag_status =
+                        #{messagStatus},
+                    </if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteCoreAnnouncementNotificationById" parameterType="Long">
+        delete
+        from core_announcement_notification where id = #{id}
+    </delete>
+
+    <delete id="deleteCoreAnnouncementNotificationByIds" parameterType="String">
+        delete from core_announcement_notification where id in
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+    <delete id="deleteRoleAndOrg">
+        delete a,b
+        from core_announcement_notification_to_org a join
+        core_announcement_notification_to_role b
+        on a.announcement_notification_id = b.announcement_notification_id
+        where a.announcement_notification_id =#{notificationId}
+    </delete>
+    <delete id="deleteNotificationToUsers">
+        delete from core_announcement_notification_to_user
+        where announcement_notification_id =#{notificationId}
+    </delete>
+</mapper>

+ 3 - 0
soc-modules/soc-modules-core/src/main/resources/mapper/weather/WeatherWarningMapper.xml

@@ -28,4 +28,7 @@
 <select id="cityCodeList" resultType="com.xunmei.common.core.utils.KeyValue">
     select AREAID as `key`,NAMECN as `value` from core_weather_city
     </select>
+    <select id="cityInfoVoList" resultType="com.xunmei.common.core.domain.weather.vo.CityInfoVo">
+    select   AREAID as areaId,NAMECN as nameCn,GROUPID as groupId from core_weather_city order by AREACODE asc
+    </select>
 </mapper>

+ 14 - 0
soc-modules/soc-modules-system/src/main/java/com/xunmei/system/controller/SysUserController.java

@@ -4,6 +4,7 @@ import cn.hutool.core.util.ObjectUtil;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.xunmei.common.core.domain.R;
+import com.xunmei.common.core.domain.message.domain.CoreAnnouncementNotificationToRole;
 import com.xunmei.common.core.utils.DateUtils;
 import com.xunmei.common.core.utils.StringUtils;
 import com.xunmei.common.core.web.controller.BaseController;
@@ -416,4 +417,17 @@ public class SysUserController extends BaseController {
         List<SysUserListVo> sysUsers = userService.selectUserByOrgId(orgId);
         return R.ok(sysUsers);
     }
+
+    @InnerAuth
+    @PostMapping("/allUserList")
+    public List<SysUser> allUserList() {
+        return userService.list();
+    }
+
+    @ApiOperation(value = "通过角色获取用户")
+    @InnerAuth
+    @PostMapping("/userListByRole")
+    public List<SysUser>userLoginInfo(@RequestBody List<CoreAnnouncementNotificationToRole> notificationToRoles) {
+         return userService.selectUserListByRole(notificationToRoles);
+    }
 }

+ 3 - 0
soc-modules/soc-modules-system/src/main/java/com/xunmei/system/mapper/SysUserMapper.java

@@ -2,6 +2,7 @@ package com.xunmei.system.mapper;
 
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.xunmei.common.core.domain.message.domain.CoreAnnouncementNotificationToRole;
 import com.xunmei.system.api.domain.SysOrg;
 import com.xunmei.system.api.domain.SysRole;
 import com.xunmei.system.api.domain.SysUser;
@@ -147,4 +148,6 @@ public interface SysUserMapper extends BaseMapper<SysUser>
     SysOrg selectSysByUserId(@Param("userId") Long userId);
 
     List<SysRole> selectrolesByOrgId(@Param("orgId")Long orgId);
+
+    List<SysUser> selectUserListByRole(@Param("notificationToRoles") List<CoreAnnouncementNotificationToRole> notificationToRoles);
 }

+ 3 - 0
soc-modules/soc-modules-system/src/main/java/com/xunmei/system/service/ISysUserService.java

@@ -1,6 +1,7 @@
 package com.xunmei.system.service;
 
 import com.baomidou.mybatisplus.extension.service.IService;
+import com.xunmei.common.core.domain.message.domain.CoreAnnouncementNotificationToRole;
 import com.xunmei.common.core.web.domain.AjaxResult;
 import com.xunmei.common.core.web.page.TableDataInfo;
 import com.xunmei.system.api.domain.SysRole;
@@ -217,4 +218,6 @@ public interface ISysUserService extends IService<SysUser> {
     List<SysUserListVo> selectUserByOrgId(Long orgId);
 
     List<SysRole> selectrolesByOrgId(Long orgId);
+
+    List<SysUser> selectUserListByRole(List<CoreAnnouncementNotificationToRole> notificationToRoles);
 }

+ 6 - 0
soc-modules/soc-modules-system/src/main/java/com/xunmei/system/service/impl/SysUserServiceImpl.java

@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.xunmei.common.core.constant.UserConstants;
+import com.xunmei.common.core.domain.message.domain.CoreAnnouncementNotificationToRole;
 import com.xunmei.common.core.exception.ServiceException;
 import com.xunmei.common.core.util.BeanHelper;
 import com.xunmei.common.core.utils.StringUtils;
@@ -599,4 +600,9 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
 
         return userMapper.selectrolesByOrgId(orgId);
     }
+
+    @Override
+    public List<SysUser> selectUserListByRole(List<CoreAnnouncementNotificationToRole> notificationToRoles) {
+        return userMapper.selectUserListByRole(notificationToRoles);
+    }
 }

+ 7 - 0
soc-modules/soc-modules-system/src/main/resources/mapper/system/SysUserMapper.xml

@@ -576,4 +576,11 @@
         ORDER BY u.update_time DESC
 
     </select>
+    <select id="selectUserListByRole" resultType="com.xunmei.system.api.domain.SysUser">
+           select a.* from sys_user a left join sys_user_role b on a.id = b.user_id where
+           b.role_id in
+           <foreach collection="notificationToRoles" item="role" open="(" separator="," close=")">
+               #{role.roleId}
+           </foreach>
+    </select>
 </mapper>