20250801-节气限定.sql 3.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. -- 节气表
  2. drop table if exists `fs_package_solar_term`;
  3. create table `fs_package_solar_term` (
  4. `id` bigint not null auto_increment comment '主键ID',
  5. `name` varchar(255) not null comment '节气名称',
  6. `desc` varchar(1000) comment '简介',
  7. `start_time` datetime not null comment '开始时间',
  8. `end_time` datetime not null comment '结束时间',
  9. `sort` tinyint default null comment '排序号',
  10. `is_del` tinyint(1) default 0 comment '是否删除 0正常 1删除',
  11. `status` tinyint(1) default 1 comment '状态 1启用 0停用',
  12. `create_time` datetime comment '创建时间',
  13. `update_time` datetime comment '修改时间',
  14. primary key (`id`) using btree
  15. ) engine = Innodb comment '节气表';
  16. alter table fs_package
  17. add column solar_term bigint comment '节气';
  18. -- 字典
  19. INSERT INTO `sys_dict_type`
  20. (`dict_name`, `dict_type`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`)
  21. VALUES
  22. ('节气状态', 'solar_Term_status', '0', 'admin', '2025-08-01 17:34:31', '', NULL, NULL);
  23. INSERT INTO `sys_dict_data`
  24. (`dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`)
  25. VALUES
  26. (1, '启用', '1', 'solar_Term_status', NULL, 'default', 'N', '0', 'admin', '2025-08-01 17:35:19', '', NULL, NULL),
  27. (2, '停用', '0', 'solar_Term_status', NULL, 'default', 'N', '0', 'admin', '2025-08-01 17:35:33', '', NULL, NULL);
  28. -- 菜单
  29. INSERT INTO `sys_menu`
  30. (`menu_name`, `parent_id`, `order_num`, `path`, `component`, `query`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`)
  31. VALUES
  32. ('节气管理', 1285, 5, 'solarTerm', 'his/packageSolarTerm/index', NULL, 1, 0, 'C', '0', '0', 'his:packageSolarTerm:list', 'theme', 'admin', '2025-08-01 17:04:29', 'admin', '2025-08-01 17:04:55', '');
  33. SET @parent_id = LAST_INSERT_ID();
  34. INSERT INTO `sys_menu`
  35. (`menu_name`, `parent_id`, `order_num`, `path`, `component`, `query`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`)
  36. VALUES
  37. ('节气修改', @parent_id, 3, '', NULL, NULL, 1, 0, 'F', '0', '0', 'his:packageSolarTerm:edit', '#', 'admin', '2025-08-04 10:03:27', '', NULL, ''),
  38. ('节气添加', @parent_id, 2, '', NULL, NULL, 1, 0, 'F', '0', '0', 'his:packageSolarTerm:add', '#', 'admin', '2025-08-04 10:03:10', '', NULL, ''),
  39. ('节气查询', @parent_id, 1, '', NULL, NULL, 1, 0, 'F', '0', '0', 'his:packageSolarTerm:query', '#', 'admin', '2025-08-04 10:02:51', '', NULL, ''),
  40. ('节气删除', @parent_id, 4, '', NULL, NULL, 1, 0, 'F', '0', '0', 'his:packageSolarTerm:remove', '#', 'admin', '2025-08-04 10:03:46', '', NULL, '');