
-- ----------------------------
2023-2-21
-- ----------------------------
ALTER TABLE mortals_sys_window ADD COLUMN `duty` tinyint (1)  default 0   COMMENT '无人值守(1.是，0.否)' AFTER hongqi;
ALTER TABLE mortals_sys_window ADD COLUMN `dutyContent` varchar (256) default ""  COMMENT '显示内容' AFTER duty;
ALTER TABLE mortals_sys_window ADD COLUMN `dutyEnglish` varchar (256)  default "" COMMENT '显示英文' AFTER dutyContent;

ALTER TABLE mortals_sys_dept ADD COLUMN  `total` int(9)    DEFAULT '0' COMMENT '关联事项数量' AFTER updateTime;

INSERT INTO `mortals_xhx_task` VALUES (null, '统计站点部门事项数', 'StatSiteDeptMatterTask', 0, 'StatSiteDeptMatterTask', NULL, NULL, 1, 0, '23:21', NULL, '172.17.0.1', '2023-03-05 23:21:01', 0, NULL, NULL, NULL);


-- ----------------------------
2023-3-11
-- ----------------------------
ALTER TABLE mortals_sys_workman ADD COLUMN  `operatorId` varchar (128) default ""  COMMENT '一体化经办人id' AFTER modelIds;





-- ----------------------------
2023-3-28
-- ----------------------------
ALTER TABLE mortals_sys_app_info_field ADD COLUMN  `fieldTypeValue` varchar (255) default ""  COMMENT '字段类型值，当字段类型为多选，单选时候，预设复选值' AFTER fieldType;
ALTER TABLE mortals_sys_app_info_field ADD COLUMN  `defaultValue` varchar (255) default ""  COMMENT '字段默认值' AFTER fieldValue;

ALTER TABLE mortals_sys_app_info_templete_field ADD COLUMN  `fieldTypeValue` varchar (255) default ""  COMMENT '字段类型值，当字段类型为多选，单选时候，预设复选值' AFTER fieldType;
ALTER TABLE mortals_sys_app_info_templete_field ADD COLUMN  `defaultValue` varchar (255) default ""  COMMENT '字段默认值' AFTER fieldValue;


INSERT INTO `mortals_xhx_param` VALUES (null, '应用主题', 'App', 'appThemeName', '1', '交通出行', 1, 4, 0, '', '2023-03-24 17:16:02', 1, '系统管理员');
INSERT INTO `mortals_xhx_param` VALUES (null, '应用主题', 'App', 'appThemeName', '2', '医保社保', 1, 4, 0, 'appThemeName', '2023-03-24 17:21:43', 1, '系统管理员');
INSERT INTO `mortals_xhx_param` VALUES (null, '应用主题', 'App', 'appThemeName', '3', '生活缴费', 1, 4, 0, 'appThemeName', '2023-03-24 17:22:12', 1, '系统管理员');
INSERT INTO `mortals_xhx_param` VALUES (null, '应用主题', 'App', 'appThemeName', '4', '公共服务', 1, 4, 0, 'appThemeName', '2023-03-24 17:22:52', 1, '系统管理员');
INSERT INTO `mortals_xhx_param` VALUES (null, '应用主题	', 'App', 'appThemeName', '5', '综合政务', 1, 4, 0, '', '2023-04-12 20:15:24', 1, '系统管理员');


-- ----------------------------
2023-4-12
-- ----------------------------
ALTER TABLE mortals_sys_site_matter ADD COLUMN   `hot` tinyint(2)    DEFAULT '0'  COMMENT '热门(0.否,1.是)' AFTER eventTypeShow;
ALTER TABLE mortals_sys_site_matter ADD COLUMN   `display` tinyint(2)    DEFAULT '1'  COMMENT '显示(0.否,1.是)' AFTER hot;

-- ----------------------------
2023-4-23
-- ----------------------------
ALTER TABLE mortals_sys_site_theme_matter ADD COLUMN   `hot` tinyint(2)    DEFAULT '0'  COMMENT '热门(0.否,1.是)' AFTER userType;
ALTER TABLE mortals_sys_site_theme_matter ADD COLUMN   `display` tinyint(2)    DEFAULT '1'  COMMENT '显示(0.否,1.是)' AFTER hot;


-- ----------------------------
2023-4-25
-- ----------------------------
-- ----------------------------
-- 站点大厅信息表
-- ----------------------------
DROP TABLE IF EXISTS `mortals_sys_site_hall`;
CREATE TABLE mortals_sys_site_hall(
    `id` bigint(20)   AUTO_INCREMENT   COMMENT '序号，主键，自增长',
    `siteId` bigint(20)      COMMENT '站点ID',
    `siteName` varchar(255)      COMMENT '站点名称',
    `hallName` varchar(256)      COMMENT '大厅名称',
    `address` varchar(256)      COMMENT '地址',
    `floor` tinyint(2)    DEFAULT '1'  COMMENT '楼层',
    `build` tinyint(2)    DEFAULT '1'  COMMENT '楼栋',
    `remark` varchar(255)      COMMENT '备注',
    `createTime` datetime      COMMENT '创建时间',
    `createUserId` bigint(20)      COMMENT '创建用户',
    `updateUserId` bigint(20)      COMMENT '更新用户',
    `updateTime` datetime      COMMENT '修改时间',
PRIMARY KEY  (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='站点大厅信息';
-- ----------------------------
-- 大厅窗口表
-- ----------------------------
DROP TABLE IF EXISTS `mortals_sys_window_hall`;
CREATE TABLE mortals_sys_window_hall(
    `id` bigint(20)   AUTO_INCREMENT   COMMENT '序号，主键，自增长',
    `windowId` bigint(20)      COMMENT '窗口ID',
    `windowName` varchar(255)      COMMENT '窗口名称',
    `hallId` bigint(20)      COMMENT '大厅ID',
    `hallName` varchar(255)      COMMENT '大厅名称',
    `sort` int(4)    DEFAULT '0'  COMMENT '排序',
    `remark` varchar(512)      COMMENT '备注',
    `createTime` datetime      COMMENT '创建时间',
    `createUserId` bigint(20)      COMMENT '创建用户',
    `updateTime` datetime      COMMENT '修改时间',
PRIMARY KEY  (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='大厅窗口';


INSERT INTO `mortals_xhx_resource` VALUES (null, '站点大厅信息-菜单管理-查看', '/site/hall/list,/site/hall/view,/site/hall/info,/site/hall/export,/site/hall/exportExcel,/site/hall/downloadTemplate,/site/hall/download', 3, 0, NULL, NULL, NULL, 0);
INSERT INTO `mortals_xhx_resource` VALUES (null, '站点大厅信息-菜单管理-维护', '/site/hall/add,/site/hall/edit,/site/hall/delete,/site/hall/logicDelete,/site/hall/save,/site/hall/importData', 3, 0, NULL, NULL, NULL, 0);


INSERT INTO `mortals_xhx_resource` VALUES (null, '大厅窗口-菜单管理-查看', '/window/hall/list,/window/hall/view,/window/hall/info,/window/hall/export,/window/hall/exportExcel,/window/hall/downloadTemplate,/window/hall/download', 3, 0, NULL, NULL, NULL, 0);
INSERT INTO `mortals_xhx_resource` VALUES (null, '大厅窗口-菜单管理-维护', '/window/hall/add,/window/hall/edit,/window/hall/delete,/window/hall/logicDelete,/window/hall/save,/window/hall/importData', 3, 0, NULL, NULL, NULL, 0);


-- ----------------------------
2023-5-04
-- ----------------------------
ALTER TABLE mortals_sys_window ADD COLUMN `nameDesc` varchar (256)  default "" COMMENT '名称描述' AFTER englishName;
ALTER TABLE mortals_sys_window ADD COLUMN `englishNameDesc` varchar (256)  default "" COMMENT '英文名称描述' AFTER nameDesc;


-- ----------------------------
2023-5-06
-- ----------------------------
-- ----------------------------
-- 设备表
-- ----------------------------
DROP TABLE IF EXISTS `mortals_xhx_device`;
CREATE TABLE `mortals_xhx_device` (
      `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键ID，主键，自增长',
      `deviceId` bigint(20) DEFAULT NULL COMMENT '设备id',
      `deviceName` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '设备名称',
      `deviceCode` varchar(256) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '设备编码',
      `deviceMac` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '设备的MAC地址',
      `siteId` bigint(20) DEFAULT NULL COMMENT '站点Id',
      `siteCode` varchar(256) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '站点编号，来源基础服务平台',
      `siteName` varchar(256) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '站点名称',
      `productCode` varchar(256) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '产品编码',
      `productName` varchar(256) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '产品名称',
      `deviceSrc` tinyint(2) DEFAULT 2 COMMENT '设备来源(0.子设备，1.网关设备，2.直连设备)',
      `lon` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '经度',
      `lati` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '纬度',
      `leadingOfficial` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '负责人',
      `leadingOfficialTelephone` varchar(11) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '联系电话',
      `deviceStatus` tinyint(2) DEFAULT NULL COMMENT '设备状态 (0.未激活，1.离线,2.在线)',
      `deviceRemark` varchar(256) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '备注',
      `source` tinyint(2) DEFAULT 1 COMMENT '设备来源(0.旧设备，1.新设备)',
      `createUserId` bigint(20) NOT NULL COMMENT '创建用户',
      `createTime` datetime NOT NULL COMMENT '创建时间',
      `updateUserId` bigint(20) DEFAULT NULL COMMENT '更新用户',
      `updateTime` datetime DEFAULT NULL COMMENT '更新时间',
      PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COMMENT='设备';

-- ----------------------------
-- 设备应用黑名单表
-- ----------------------------
DROP TABLE IF EXISTS `mortals_xhx_device_blackapp`;
CREATE TABLE mortals_xhx_device_blackapp(
    `id` bigint(20)   AUTO_INCREMENT   COMMENT '主键，自增长',
    `siteId` bigint(20)      COMMENT '站点ID',
    `deviceId` bigint(20)      COMMENT '设备id',
    `deviceCode` varchar(255)      COMMENT '设备编码',
    `deviceName` varchar(255)      COMMENT '设备名称',
    `appId` bigint(20)      COMMENT '应用id',
    `appCode` varchar(255)      COMMENT '应用编码',
    `appName` varchar(255)      COMMENT '应用名称',
    `createTime` datetime      COMMENT '创建时间',
    `createUserId` bigint(20)      COMMENT '创建用户',
    `updateTime` datetime      COMMENT '修改时间',
PRIMARY KEY  (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='设备应用黑名单';

-- ----------------------------
2023-5-07
-- ----------------------------
ALTER TABLE mortals_sys_site ADD COLUMN `onlineTake` tinyint(2)    DEFAULT '1'  COMMENT '在线取号（0.否，1.是）' AFTER workday7;
ALTER TABLE mortals_sys_site ADD COLUMN `appointment` tinyint(2)    DEFAULT '1'  COMMENT '在线取号（0.否，1.是）' AFTER onlineTake;
ALTER TABLE mortals_sys_site ADD COLUMN `gowMap` tinyint(2)    DEFAULT '1'  COMMENT '在线取号（0.否，1.是）' AFTER appointment;


-- ----------------------------
2023-6-15
-- ----------------------------
-- ----------------------------
-- 自助终端应用分类表
-- ----------------------------
DROP TABLE IF EXISTS `mortals_sys_app_category`;
CREATE TABLE mortals_sys_app_category(
    `id` bigint(20)   AUTO_INCREMENT   COMMENT '主键ID，主键，自增长',
    `siteId` bigint(20)      COMMENT '站点Id',
    `siteName` varchar(256)      COMMENT '站点名称',
    `categoryCode` varchar(256)      COMMENT '分类编码',
    `categoryName` varchar(256)      COMMENT '分类名称',
    `sort` int(4)    DEFAULT '0'  COMMENT '排序字段',
    `createTime` datetime      COMMENT '创建时间',
    `createUserId` bigint(20)      COMMENT '创建用户',
    `updateUserId` bigint(20)      COMMENT '更新用户',
    `updateTime` datetime      COMMENT '更新时间',
PRIMARY KEY  (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='自助终端应用分类';


-- ----------------------------
2023-7-05
-- ----------------------------

ALTER TABLE mortals_sys_app_category ADD COLUMN `cover`  varchar(256)  DEFAULT ''   COMMENT '封面' AFTER sort;
ALTER TABLE mortals_sys_app_category ADD COLUMN `remark`  varchar(256)  DEFAULT ''   COMMENT '备注' AFTER cover;

-- ----------------------------
2023-08-29
-- ----------------------------
ALTER TABLE `mortals_sys_model` ADD COLUMN `type` tinyint(2)  DEFAULT '1'  COMMENT '模块分类' AFTER `sort`;


-- ----------------------------
2023-9-11
-- ----------------------------
ALTER TABLE mortals_sys_app_info_field ADD COLUMN  `serviceApi` varchar(255)   default ''   COMMENT '事件服务接口请求地址';
ALTER TABLE mortals_sys_app_info_field ADD COLUMN  `serviceApiParams` varchar(1024) default ''     COMMENT '事件服务接口请求参数';


ALTER TABLE mortals_sys_app_info_templete_field ADD COLUMN  `serviceApi` varchar(255)   default ''   COMMENT '事件服务接口请求地址';
ALTER TABLE mortals_sys_app_info_templete_field ADD COLUMN  `serviceApiParams` varchar(1024) default ''     COMMENT '事件服务接口请求参数';



-- ----------------------------
2023-10-17
-- ----------------------------

ALTER TABLE mortals_sys_window_hall ADD COLUMN  `siteId` bigint(20) default '1'     COMMENT '站点Id';


-- ----------------------------
2024-01-03
-- ----------------------------
ALTER TABLE mortals_sys_site_matter ADD COLUMN   `agent` tinyint(2)    DEFAULT '0'  COMMENT '代办帮办(0.否,1.是)';
ALTER TABLE mortals_sys_site_matter ADD COLUMN    `agentName` varchar(64)      COMMENT '代办姓名';
ALTER TABLE mortals_sys_site_matter ADD COLUMN    `agentPhone` varchar(32)      COMMENT '代办电话';
ALTER TABLE mortals_sys_site_matter ADD COLUMN   `agentPost` varchar(64)      COMMENT '职务';


-- ----------------------------
2024-02-29
-- ----------------------------

UPDATE mortals_sys_skin_base SET imageResolution="1920x1080" WHERE imageResolution="1";
UPDATE mortals_sys_skin_base SET imageResolution="1080x1920" WHERE imageResolution="2";
UPDATE mortals_sys_skin_base SET imageResolution="1280x1280" WHERE imageResolution="3";


-- ----------------------------
2024-03-08
-- ----------------------------
ALTER TABLE mortals_sys_site_matter ADD COLUMN   `hallCheckIn` tinyint(2)    DEFAULT '0'  COMMENT '大厅事项入驻(0.否,1.是)'  AFTER agentPost;



ALTER TABLE mortals_sys_dept ADD COLUMN  `inNum` int(9)    DEFAULT '0' COMMENT '入驻事项数量' AFTER updateTime;

INSERT INTO mortals_xhx_task VALUES (null, '同步全部站点事项材料附件', 'SyncMatterDaumFileTask', 0, 'SyncMatterDaumFileTask', '', '', 1, 3600, '16:05', '', '192.168.1.107', '2024-05-18 16:05:00', 0, '2024-03-01 10:59:53', 1, '系统管理员');


