[TOC] ## 2.3.3升级到2.3.4 升级前请先备份原项目文件,升级前请先备份原项目文件,升级前请先备份原项目文件 1、替换/woo目录 2、替换/public/static/woo目录 3、替换/public/static/layui目录 ## 2.3.2升级到2.3.3 升级前请先备份原项目文件,升级前请先备份原项目文件,升级前请先备份原项目文件 1、替换/woo目录 2、替换/public/static/woo目录 ## 2.3.1升级到2.3.2 1、替换/public/static/layui目录 ## 2.3.0升级到2.3.1 升级前请先备份原项目文件,升级前请先备份原项目文件,升级前请先备份原项目文件 1、替换/woo目录 2、替换/public/static/woo目录 3、替换/public/static/layui目录 4、新增/public/static/files/jsoneditor目录 5、SQL更新 ~~~ INSERT INTO `woo_setting` (`id`, `title`, `setting_group_id`, `var`, `value`, `type`, `options`, `tip`, `list_order`, `admin_id`, `is_js_var`, `create_time`, `update_time`, `delete_time`) VALUES (NULL, '开启RSA自动加/解密', 5, 'do_is_rsa', '', 'checker', '', '必须开启\"openssl\"扩展', 58, 1, 0, 1676543139, 1676543153, 0), (NULL, '选项卡样式', 2, 'admin_tab_style', 'layui-tab-brief', 'select', '{\"layui-tab-brief\":\"简洁风格\",\"layui-tab-default\":\"凹型风格\",\"layui-tab-card\":\"卡片风格\"}', '', 59, 1, 0, 1679486790, 1679486815, 0); ~~~ ## 2.2.10升级到2.3.0 升级前请先备份原项目文件和整个数据库,升级前请先备份原项目文件和整个数据库,升级前请先备份原项目文件和整个数据库。 建议先看一遍升级指导,大概了解删除、大改了哪些内容,考虑自己的项目是否方便升级...... 本次升级底层改动较大,如已深入二开的项目、在建项目等自行考虑是否升级。升级前请务必看上面的第一句......,以便于升级错误可快速恢复,而且下面的sql我肯定是没有去测试升级的。 1、替换/woo目录 2、替换/public/static/woo目录 3、对比`config/woomodel.php`新增多个配置项 4、新增了几个系统设置项(表前缀woo_自行处理,后面SQL一样,不再提醒): ~~~ INSERT INTO `woo_setting` (`id`, `title`, `setting_group_id`, `var`, `value`, `type`, `options`, `tip`, `list_order`, `admin_id`, `is_js_var`, `create_time`, `update_time`, `delete_time`) VALUES (NULL, '页脚版权信息', 1, 'project_copyright', 'Copyright © 2021-2023 xxx.com', 'text', '', '', 54, 1, 0, 1647440349, 1647440349, 0), (NULL, '列表项工具按钮风格', 4, 'table_item_toolbar_style', 'text', 'select', '{\"button\":\"按钮风格(默认)\",\"text\":\"文本不带图标风格\",\"text_icon\":\"文本可带图标风格\"}', '', 55, 1, 0, 1673325163, 1673357079, 0), (NULL, '列表项文本按钮类名', 4, 'table_item_toolbar_text_class', '', 'text', '', '可通过控制类名实现按钮颜色和样式的控制;类名\"woo-theme-color\"实现按钮颜色随主题', 56, 1, 0, 1673325379, 1673339731, 0), (NULL, '表格全局默认高度', 4, 'table_default_height', '0', 'number', '', '如不设置默认高度,请填写为0', 57, 1, 0, 1675315634, 1675315655, 0); ~~~ 5、更新`AdminRule`用来替换原来的`AdminMenu`功能: 先执行完下面的sql,再模型中找到`AdminRule`点生成(或在app/common/model和app/common/model/traits下找到AdminRule对应文件复制你项目中去) ~~~ INSERT INTO `woo_model` (`id`, `model`, `cname`, `addon`, `full_table`, `order_type`, `tree_level`, `custom_data`, `list_config`, `business_list_config`, `suffix`, `pk`, `connection`, `is_import`, `is_business_import`, `parent_model`, `display`, `form_group`, `relation_link`, `admin_id`, `is_controller`, `is_business_controller`, `admin_tool_bar`, `business_tool_bar`, `admin_item_tool_bar`, `business_item_tool_bar`, `admin_siderbar`, `business_siderbar`, `admin_table_attrs`, `business_table_attrs`, `admin_item_checkbox`, `business_item_checkbox`, `admin_item_toolbar_options`, `business_item_toolbar_options`, `admin_counter`, `business_counter`, `admin_total_row`, `business_total_row`, `admin_is_remove_pk`, `business_is_remove_pk`, `admin_filter_model`, `business_filter_model`, `admin_list_with`, `business_list_with`, `admin_list_fields`, `business_list_fields`, `admin_list_filters`, `business_list_filters`, `admin_list_where`, `create_time`, `update_time`) VALUES (37, 'AdminRule', '菜单规则', '', '', 'asc', 5, '', 'create,batch_delete,modify,delete,detail', '', '', '', '', 0, 0, 'parent', 'title', '', '', 1, 1, 0, '', '', '', '', '', '', '{\"treetable\":\"true\"}', '', 'checkbox', 'checkbox', '[{\"is_show\":\"1\",\"title\":\"操作\",\"fixed\":\"right\",\"min_width\":\"0\",\"align\":\"center\",\"more\":\"\"}]', '[{\"is_show\":\"1\",\"title\":\"操作\",\"fixed\":\"right\",\"min_width\":\"0\",\"align\":\"center\"}]', '', '', '', '', 0, 0, '', '', '', '', '', '', '', '', '', 1672717814, 1672718322); INSERT INTO `woo_field` (`id`, `field`, `name`, `model_id`, `form`, `business_form`, `modify_form`, `business_modify_form`, `form_foreign`, `business_form_foreign`, `form_item_attrs`, `business_form_item_attrs`, `form_tag_attrs`, `business_form_tag_attrs`, `form_options`, `business_form_options`, `form_upload`, `business_form_upload`, `form_trigger`, `business_form_trigger`, `list`, `business_list`, `list_attrs`, `business_list_attrs`, `list_filter`, `business_list_filter`, `list_filter_attrs`, `business_list_filter_attrs`, `list_filter_tag_attrs`, `business_list_filter_tag_attrs`, `detail`, `business_detail`, `detail_attrs`, `business_detail_attrs`, `validate`, `business_validate`, `is_field`, `type`, `length`, `default`, `is_not_null`, `is_unsigned`, `is_ai`, `is_system`, `is_contribute`, `index`, `after`, `admin_id`, `list_order`, `create_time`, `update_time`) VALUES (422, 'id', 'ID', 37, 'hidden', 'hidden', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 1, 'INT', '10', 'none', 1, 1, 1, 1, 0, '', '', 1, 10208, 1672198378, 1672198378), (423, 'parent_id', '父级ID', 37, 'xmtree', 'xmtree', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '[{\"rule\":\"call\",\"args\":\"checkParent\",\"on\":\"\",\"message\":\"\"}]', '[{\"rule\":\"call\",\"args\":\"checkParent\",\"on\":\"\",\"message\":\"\"}]', 1, 'INT', '10', '0', 1, 1, 0, 1, 0, 'index', '', 1, 10209, 1672198378, 1672198378), (424, 'title', '标题', 37, 'text', 'text', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '[{\"rule\":\"require\",\"args\":\"\",\"on\":\"0\",\"message\":\"\"}]', '[{\"rule\":\"require\",\"args\":\"\",\"on\":\"0\",\"message\":\"\"}]', 1, 'VARCHAR', '128', '', 1, 0, 0, 1, 0, '', '', 1, 10210, 1672198378, 1672198378), (425, 'is_nav', '是否显示', 37, 'checker', 'checker', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'checker', 'checker', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 1, 'TINYINT', '1', '0', 1, 1, 0, 1, 0, 'index', '', 1, 10215, 1672198378, 1672206428), (426, 'list_order', '排序权重', 37, 'number', 'number', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 1, 'INT', '11', '0', 1, 0, 0, 1, 0, 'index', '', 1, 10227, 1672198378, 1672208694), (427, 'family', '家族', 37, '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '0', '0', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 1, 'VARCHAR', '256', '', 1, 0, 0, 1, 0, '', '', 1, 10211, 1672198378, 1672198378), (428, 'level', '层级', 37, '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '0', '0', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 1, 'SMALLINT', '5', '0', 1, 1, 0, 1, 0, '', '', 1, 10212, 1672198378, 1672198378), (429, 'children_count', '下级数', 37, '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '0', '0', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 1, 'SMALLINT', '5', '0', 1, 1, 0, 1, 0, '', '', 1, 10213, 1672198378, 1672198378), (430, 'create_time', '创建日期', 37, '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '{\"width\":\"146\"}', '{\"width\":\"146\"}', '', '', '', '', '', '', '', '', '', '', '', '', 1, 'INT', '10', '0', 1, 1, 0, 1, 0, '', '', 1, 10229, 1672198378, 1672208695), (431, 'update_time', '修改日期', 37, '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '{\"width\":\"146\"}', '{\"width\":\"146\"}', '', '', '', '', '', '', '', '', '', '', '', '', 1, 'INT', '10', '0', 1, 1, 0, 1, 0, '', '', 1, 10230, 1672198378, 1672198378), (432, 'type', '类型', 37, 'radio', '', '', '', '', '', '', '', '', '', '{\"directory\":\"目录\",\"menu\":\"菜单\",\"button\":\"按钮\"}', '', '', '', '{\"menu\":\"addon|controller|action|url|args|icon|open_type\",\"button\":\"addon|controller|action|url|args\",\"directory\":\"icon\"}', '', '', '', '', '', '1', '', '', '', '', '', '', '', '', '', '', '', 1, 'CHAR', '32', '', 1, 0, 0, 1, 0, '', '', 1, 10214, 1672206389, 1672208146), (433, 'icon', '图标', 37, 'icon', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'icon', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 1, 'VARCHAR', '64', '', 1, 0, 0, 1, 0, '', '', 1, 10216, 1672206528, 1672206528), (434, 'addon', '二级目录', 37, 'text', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 1, 'VARCHAR', '64', '', 1, 0, 0, 1, 0, '', '', 1, 10217, 1672206561, 1672208695), (435, 'controller', '控制器', 37, 'text', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '1', '', '', '', '', '', '', '', '', '', '[{\"rule\":\"call\",\"args\":\"checkController\",\"on\":\"\",\"message\":\"\"}]', '', 1, 'VARCHAR', '64', '', 1, 0, 0, 1, 0, '', '', 1, 10218, 1672206706, 1672208695), (436, 'action', '方法', 37, 'text', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '[{\"rule\":\"call\",\"args\":\"checkAction\",\"on\":\"\",\"message\":\"\"}]', '', 1, 'VARCHAR', '64', '', 1, 0, 0, 1, 0, '', '', 1, 10219, 1672206759, 1672208695), (437, 'url', '路由', 37, 'text', '', '', '', '', '', '{\"tip\":\"单独定义路由需要填写\"}', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 1, 'VARCHAR', '128', '', 1, 0, 0, 1, 0, '', '', 1, 10220, 1672206843, 1672208695), (438, 'args', '参数', 37, 'keyvalue', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 1, 'VARCHAR', '256', '', 1, 0, 0, 1, 0, '', '', 1, 10221, 1672206893, 1672208695), (439, 'open_type', '打开方式', 37, 'select', '', '', '', '', '', '', '', '', '', '{\"_iframe\":\"选项卡(默认)\",\"_blank\":\"新窗口\",\"_ajax\":\"Ajax请求\",\"_event\":\"JS事件回调\",\"_auto\":\"自动获取表单加载\",\"_layer\":\"嵌入弹窗\",\"_drawer\":\"嵌入抽屉\",\"_open\":\"独立窗口\"}', '', '', '', '{\"_event\":\"js_func\"}', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 1, 'VARCHAR', '64', '', 1, 0, 0, 1, 0, '', '', 1, 10222, 1672206952, 1672218088), (440, 'jianpin', '简拼', 37, 'text', '', '', '', '', '', '{\"tip\":\"如不填写,系统自动获取\"}', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 1, 'VARCHAR', '64', '', 1, 0, 0, 1, 0, '', '', 1, 10224, 1672206999, 1672208695), (441, 'pinyin', '拼音', 37, 'text', '', '', '', '', '', '{\"tip\":\"如不填写,系统自动获取\"}', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 1, 'VARCHAR', '64', '', 1, 0, 0, 1, 0, '', '', 1, 10225, 1672207015, 1672208695), (442, 'rule', '路由规则', 37, 'none', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 1, 'VARCHAR', '128', '', 1, 0, 0, 1, 0, '', '', 1, 10226, 1672207047, 1672208695), (443, 'other_name', '第三方名称', 37, 'none', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 1, 'VARCHAR', '64', '', 1, 0, 0, 1, 0, '', '', 1, 10228, 1672213641, 1672213650), (444, 'js_func', '回调事件名', 37, 'text', '', '', '', '', '', '{\"tip\":\"需自行定义该名称的全局JS函数\"}', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 1, 'VARCHAR', '64', '', 1, 0, 0, 1, 0, '', '', 1, 10223, 1672218061, 1672218353); CREATE TABLE IF NOT EXISTS `woo_admin_rule` ( `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'ID', `parent_id` int(10) UNSIGNED NOT NULL DEFAULT '0' COMMENT '父级ID', `title` varchar(128) NOT NULL DEFAULT '' COMMENT '标题', `is_nav` tinyint(1) UNSIGNED NOT NULL DEFAULT '0' COMMENT '是否显示', `list_order` int(11) NOT NULL DEFAULT '0' COMMENT '排序权重', `family` varchar(256) NOT NULL DEFAULT '' COMMENT '家族', `level` smallint(5) UNSIGNED NOT NULL DEFAULT '0' COMMENT '层级', `children_count` smallint(5) UNSIGNED NOT NULL DEFAULT '0' COMMENT '下级数', `create_time` int(10) UNSIGNED NOT NULL DEFAULT '0' COMMENT '创建日期', `update_time` int(10) UNSIGNED NOT NULL DEFAULT '0' COMMENT '修改日期', `type` char(32) NOT NULL DEFAULT '' COMMENT '类型', `icon` varchar(64) NOT NULL DEFAULT '' COMMENT '图标', `addon` varchar(64) NOT NULL DEFAULT '' COMMENT '二级目录', `controller` varchar(64) NOT NULL DEFAULT '' COMMENT '控制器', `action` varchar(64) NOT NULL DEFAULT '' COMMENT '方法', `url` varchar(128) NOT NULL DEFAULT '' COMMENT '路由', `args` varchar(256) NOT NULL DEFAULT '' COMMENT '参数', `open_type` varchar(64) NOT NULL DEFAULT '' COMMENT '打开方式', `jianpin` varchar(64) NOT NULL DEFAULT '' COMMENT '简拼', `pinyin` varchar(64) NOT NULL DEFAULT '' COMMENT '拼音', `rule` varchar(128) NOT NULL DEFAULT '' COMMENT '路由规则', `other_name` varchar(64) NOT NULL DEFAULT '' COMMENT '第三方名称', `js_func` varchar(64) NOT NULL DEFAULT '' COMMENT '回调事件名', PRIMARY KEY (`id`), KEY `parent_id` (`parent_id`), KEY `list_order` (`list_order`), KEY `is_nav` (`is_nav`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='菜单规则' AUTO_INCREMENT=1 ; INSERT INTO `woo_admin_rule` (`id`, `parent_id`, `title`, `is_nav`, `list_order`, `family`, `level`, `children_count`, `create_time`, `update_time`, `type`, `icon`, `addon`, `controller`, `action`, `url`, `args`, `open_type`, `jianpin`, `pinyin`, `rule`, `other_name`, `js_func`) VALUES (1, 0, '系统', 1, 1, ',1,', 1, 4, 1672717814, 1673489390, 'directory', 'layui-icon-app', '', '', '', '', '', '', 'xt', 'xitong', '', '', ''), (2, 1, '常规管理', 1, 2, ',1,2,', 2, 5, 1672717814, 1672717814, 'directory', 'layui-icon-console', '', '', '', '', '', '', 'cggl', 'changguiguanli', '', '', ''), (3, 1, '组织权限', 1, 3, ',1,3,', 2, 5, 1672717814, 1675253861, 'directory', 'layui-icon-auz', '', '', '', '', '', '', 'zzqx', 'zuzhiquanxian', '', '', ''), (4, 1, '系统管理', 1, 4, ',1,4,', 2, 12, 1672717814, 1672717814, 'directory', 'layui-icon-set', '', '', '', '', '', '', 'xtgl', 'xitongguanli', '', '', ''), (5, 1, '开发中心', 1, 5, ',1,5,', 2, 9, 1672717814, 1675253925, 'directory', 'layui-icon-engine', '', '', '', '', '', '', 'kfzx', 'kaifazhongxin', '', '', ''), (6, 2, '系统配置', 1, 6, ',1,2,6,', 3, 0, 1672717814, 1672717814, 'menu', '', '', 'setting', 'set', '', '', '_iframe', 'xtpz', 'xitongpeizhi', 'setting/set', '', ''), (7, 2, '附件管理', 1, 7, ',1,2,7,', 3, 0, 1672717814, 1672717814, 'menu', '', '', 'attachement', 'index', '', '', '_iframe', 'fjgl', 'fujianguanli', 'attachement/index', '', ''), (8, 2, '个人信息', 1, 8, ',1,2,8,', 3, 0, 1672717814, 1672717814, 'menu', '', '', 'admin', 'home', '', '', '_iframe', 'grxx', 'gerenxinxi', 'admin/home', '', ''), (9, 3, '用户管理', 1, 9, ',1,3,9,', 3, 0, 1672717814, 1672717814, 'menu', '', '', 'admin', 'index', '', '', '_iframe', 'yhgl', 'yonghuguanli', 'admin/index', '', ''), (10, 3, '角色管理', 1, 10, ',1,3,10,', 3, 0, 1672717814, 1672717814, 'menu', '', '', 'admin_group', 'index', '', '', '_iframe', 'jsgl', 'jiaoseguanli', 'admin_group/index', '', ''), (11, 3, '部门管理', 1, 11, ',1,3,11,', 3, 0, 1672717814, 1672717814, 'menu', '', '', 'department', 'index', '', '', '_iframe', 'bmgl', 'bumenguanli', 'department/index', '', ''), (12, 3, '菜单规则', 1, 12, ',1,3,12,', 3, 0, 1672717814, 1672717814, 'menu', '', '', 'admin_rule', 'index', '', '', '_iframe', 'qxjd', 'quanxianjiedian', 'admin_rule/index', '', ''), (13, 3, '权限管理', 1, 13, ',1,3,13,', 3, 0, 1672717814, 1675253839, 'menu', '', '', 'power', 'index', '', '', '_iframe', 'qxgl', 'quanxianguanli', 'power/index', '', ''), (14, 5, '模型管理', 1, 14, ',1,5,14,', 3, 0, 1672717814, 1672717814, 'menu', '', '', 'model', 'index', '', '', '_iframe', 'mxgl', 'moxingguanli', 'model/index', '', ''), (15, 4, '字典管理', 1, 15, ',1,4,15,', 3, 0, 1672717814, 1672717814, 'menu', '', '', 'dictionary', 'index', '', '', '_iframe', 'zdgl', 'zidianguanli', 'dictionary/index', '', ''), (16, 0, '会员', 1, 16, ',16,', 1, 3, 1672717814, 1673489411, 'directory', 'layui-icon-user', '', '', '', '', '', '', 'hy', 'huiyuan', '', '', ''), (17, 16, '会员管理', 1, 17, ',16,17,', 2, 5, 1672717814, 1672717814, 'directory', 'layui-icon-user', '', '', '', '', '', '', 'hygl', 'huiyuanguanli', '', '', ''), (18, 17, '会员分类', 1, 18, ',16,17,18,', 3, 0, 1672717814, 1672717814, 'menu', '', '', 'user_group', 'index', '', '', '_iframe', 'hyfl', 'huiyuanfenlei', 'user_group/index', '', ''), (20, 4, '登录日志', 1, 57, ',1,4,20,', 3, 0, 1672717814, 1672717814, 'menu', '', '', 'admin_login', 'index', '', '', '_iframe', 'dlrz', 'denglurizhi', 'admin_login/index', '', ''), (21, 0, '示例', 1, 21, ',21,', 1, 4, 1672717814, 1675867812, 'directory', 'woo-icon-youxi', '', '', '', '', '', '', 'sl', 'shili', '', '', ''), (22, 21, '表单示例', 1, 22, ',21,22,', 2, 5, 1672717814, 1672717814, 'directory', 'layui-icon-form', '', '', '', '', '', '', 'bdsl', 'biaodanshili', '', '', ''), (23, 22, '表单类型', 1, 23, ',21,22,23,', 3, 0, 1672717814, 1672717814, 'menu', '', '', 'demo', 'demo1', '', '', '_iframe', 'bdlx', 'biaodanleixing', 'demo/demo1', '', ''), (25, 4, '操作日志', 1, 47, ',1,4,25,', 3, 0, 1672717814, 1672717814, 'menu', '', '', 'log', 'index', '', '', '_iframe', 'czrz', 'caozuorizhi', 'log/index', '', ''), (26, 22, '表单分组', 1, 26, ',21,22,26,', 3, 0, 1672717814, 1672717814, 'menu', '', '', 'demo', 'demo2', '', '', '_iframe', 'bdfz', 'biaodanfenzu', 'demo/demo2', '', ''), (27, 17, '会员列表', 1, 27, ',16,17,27,', 3, 0, 1672717814, 1672717814, 'menu', '', '', 'user', 'index', '', '', '_iframe', 'hylb', 'huiyuanliebiao', 'user/index', '', ''), (33, 21, '表格示例', 1, 33, ',21,33,', 2, 5, 1672717814, 1672717814, 'directory', 'layui-icon-table', '', '', '', '', '', '', 'bgsl', 'biaogeshili', '', '', ''), (34, 21, '其他示例', 1, 171, ',21,34,', 2, 7, 1672717814, 1672717814, 'directory', 'layui-icon-light', '', '', '', '', '', '', 'qtsl', 'qitashili', '', '', ''), (35, 22, '表单触发', 1, 35, ',21,22,35,', 3, 0, 1672717814, 1672717814, 'menu', '', '', 'demo', 'demo3', '', '', '_iframe', 'bdcf', 'biaodanchufa', 'demo/demo3', '', ''), (36, 22, '表单布局', 1, 36, ',21,22,36,', 3, 0, 1672717814, 1672717814, 'menu', '', '', 'demo', 'demo4', '', '', '_iframe', 'bdbj', 'biaodanbuju', 'demo/demo4', '', ''), (37, 34, '自定义页', 1, 37, ',21,34,37,', 3, 0, 1672717814, 1672717814, 'menu', '', '', 'demo', 'demo5', '', '', '_iframe', 'zdyy', 'zidingyiye', 'demo/demo5', '', ''), (39, 2, '配置组管理', 0, 39, ',1,2,39,', 3, 0, 1672717814, 1672717814, 'menu', '', '', 'setting_group', 'index', '', '', '_iframe', 'pzzgl', 'peizhizuguanli', 'setting_group/index', '', ''), (40, 33, '主要功能', 1, 40, ',21,33,40,', 3, 0, 1672717814, 1672717814, 'menu', '', '', 'demo', 'demo6', '', '', '_iframe', 'zygn', 'zhuyaogongneng', 'demo/demo6', '', ''), (41, 2, '附件目录', 0, 41, ',1,2,41,', 3, 0, 1672717814, 1675271105, 'menu', '', '', 'folder', 'index', '', '', '_iframe', 'fjml', 'fujianmulu', 'folder/index', '', ''), (42, 4, '地区管理', 0, 63, ',1,4,42,', 3, 0, 1672717814, 1672717814, 'menu', '', '', 'region', 'index', '', '', '_iframe', 'dqgl', 'diquguanli', 'region/index', '', ''), (43, 4, '数据备份', 1, 25, ',1,4,43,', 3, 0, 1672717814, 1672717814, 'menu', '', '', 'database', 'index', '', '', '_iframe', 'sjbf', 'shujubeifen', 'database/index', '', ''), (44, 5, '创控制器', 1, 74, ',1,5,44,', 3, 0, 1672717814, 1672717814, 'menu', '', '', 'tool', 'makecontroller', '', '', '_iframe', 'ckzq', 'chuangkongzhiqi', 'tool/makecontroller', '', ''), (45, 33, '静态数据', 1, 71, ',21,33,45,', 3, 0, 1672717814, 1672717814, 'menu', '', '', 'demo', 'demo7', '', '', '_iframe', 'jtsj', 'jingtaishuju', 'demo/demo7', '', ''), (46, 4, '快捷方式', 0, 64, ',1,4,46,', 3, 0, 1672717814, 1672717814, 'menu', '', '', 'shortcut', 'index', '', '', '_iframe', 'kjfs', 'kuaijiefangshi', 'shortcut/index', '', ''), (47, 4, '统计图标', 0, 158, ',1,4,47,', 3, 0, 1672717814, 1672717814, 'menu', '', '', 'statistics', 'index', '', '', '_iframe', 'tjtb', 'tongjitubiao', 'statistics/index', '', ''), (48, 34, '注解功能', 1, 50, ',21,34,48,', 3, 0, 1672717814, 1672717814, 'menu', '', '', 'demo', 'demo8', '', '', '_iframe', 'zjgn', 'zhujiegongneng', 'demo/demo8', '', ''), (49, 34, '403页面', 1, 51, ',21,34,49,', 3, 0, 1672717814, 1672717814, 'menu', '', '', 'demo', 'demo9', '', '', '_iframe', '403ym', '403yemian', 'demo/demo9', '', ''), (50, 34, '404页面', 1, 175, ',21,34,50,', 3, 0, 1672717814, 1672717814, 'menu', '', '', 'demo', 'demo10', '', '', '_iframe', '404ym', '404yemian', 'demo/demo10', '', ''), (51, 34, '500页面', 1, 176, ',21,34,51,', 3, 0, 1672717814, 1672717814, 'menu', '', '', 'demo', 'demo11', '', '', '_iframe', '500ym', '500yemian', 'demo/demo11', '', ''), (52, 17, '会员等级', 1, 52, ',16,17,52,', 3, 0, 1672717814, 1672717814, 'menu', '', '', 'user_grade', 'index', '', '', '_iframe', 'hydj', 'huiyuandengji', 'user_grade/index', '', ''), (53, 55, '积分记录', 1, 53, ',16,55,53,', 3, 0, 1672717814, 1672717814, 'menu', '', '', 'user_score', 'index', '', '', '_iframe', 'jfjl', 'jifenjilu', 'user_score/index', '', ''), (54, 55, '收支记录', 1, 54, ',16,55,54,', 3, 0, 1672717814, 1672717814, 'menu', '', '', 'user_money', 'index', '', '', '_iframe', 'szjl', 'shouzhijilu', 'user_money/index', '', ''), (55, 16, '财务管理', 1, 55, ',16,55,', 2, 3, 1672717814, 1672717814, 'directory', 'layui-icon-rmb', '', '', '', '', '', '', 'cwgl', 'caiwuguanli', '', '', ''), (56, 55, '充值记录', 1, 56, ',16,55,56,', 3, 0, 1672717814, 1672717814, 'menu', '', '', 'recharge', 'index', '', '', '_iframe', 'czjl', 'chongzhijilu', 'recharge/index', '', ''), (57, 4, '数据导入', 1, 42, ',1,4,57,', 3, 0, 1672717814, 1672717814, 'menu', '', '', 'import', 'index', '', '', '_iframe', 'sjdr', 'shujudaoru', 'import/index', '', ''), (58, 5, '应用中心', 1, 58, ',1,5,58,', 3, 0, 1672717814, 1672717814, 'menu', '', '', 'application', 'index', '', '', '_iframe', 'yyzx', 'yingyongzhongxin', 'application/index', '', ''), (59, 4, '敏感词库', 1, 43, ',1,4,59,', 3, 0, 1672717814, 1672717814, 'menu', '', '', 'sensitive', 'index', '', '', '_iframe', 'mgck', 'minganciku', 'sensitive/index', '', ''), (60, 5, '插件管理', 1, 60, ',1,5,60,', 3, 0, 1672717814, 1672717814, 'menu', '', '', 'addon', 'index', '', '', '_iframe', 'cjgl', 'chajianguanli', 'addon/index', '', ''), (61, 17, '登录日志', 1, 61, ',16,17,61,', 3, 0, 1672717814, 1672717814, 'menu', '', '', 'user_login', 'index', '', '', '_iframe', 'dlrz', 'denglurizhi', 'user_login/index', '', ''), (62, 17, '实名认证', 0, 62, ',16,17,62,', 3, 0, 1672717814, 1672717814, 'menu', '', '', 'certification', 'index', '', '', '_iframe', 'smrz', 'shimingrenzheng', 'certification/index', '', ''), (63, 4, '文本审核', 1, 46, ',1,4,63,', 3, 0, 1672717814, 1672717814, 'menu', '', '', 'antispam', 'index', '', '', '_iframe', 'wbsh', 'wenbenshenhe', 'antispam/index', '', ''), (64, 4, '请求日志', 0, 59, ',1,4,64,', 3, 0, 1672717814, 1672717814, 'menu', '', '', 'request_log', 'index', '', '', '_iframe', 'qqrz', 'qingqiurizhi', 'request_log/index', '', ''), (65, 16, '其他管理', 1, 65, ',16,65,', 2, 4, 1672717814, 1672717814, 'directory', 'layui-icon-rate-half', '', '', '', '', '', '', 'qtgl', 'qitaguanli', '', '', ''), (66, 65, '会员栏目', 1, 66, ',16,65,66,', 3, 0, 1672717814, 1672717814, 'menu', '', '', 'user_menu', 'index', '', '', '_iframe', 'hylm', 'huiyuanlanmu', 'user_menu/index', '', ''), (67, 65, '会员权限', 1, 67, ',16,65,67,', 3, 0, 1672717814, 1672717814, 'menu', '', '', 'user_power', 'index', '', '', '_iframe', 'hyqx', 'huiyuanquanxian', 'user_power/index', '', ''), (68, 65, '禁止登录', 1, 68, ',16,65,68,', 3, 0, 1672717814, 1672717814, 'menu', '', '', 'denied', 'index', '', '', '_iframe', 'jzdl', 'jinzhidenglu', 'denied/index', '', ''), (69, 65, '签到记录', 1, 69, ',16,65,69,', 3, 0, 1672717814, 1672717814, 'menu', '', '', 'sign', 'index', '', '', '_iframe', 'qdjl', 'qiandaojilu', 'sign/index', '', ''), (70, 5, '后台模板', 1, 80, ',1,5,70,', 3, 0, 1672717814, 1672717814, 'menu', '', '', 'tool', 'maketemplate', '', '', '_iframe', 'htmb', 'houtaimoban', 'tool/maketemplate', '', ''), (71, 33, '订单模板', 1, 72, ',21,33,71,', 3, 0, 1672717814, 1672717814, 'menu', '', '', 'demo', 'demo61', '', '', '_iframe', 'ddmb', 'dingdanmoban', 'demo/demo61', '', ''), (72, 33, '图文模板', 1, 166, ',21,33,72,', 3, 0, 1672717814, 1672717814, 'menu', '', '', 'demo', 'demo62', '', '', '_iframe', 'twmb', 'tuwenmoban', 'demo/demo62', '', ''), (73, 22, '调拨单录入', 1, 73, ',21,22,73,', 3, 0, 1672717814, 1672717814, 'menu', '', '', 'demo', 'order', '', '', '_iframe', 'dbdlr', 'diaobodanluru', 'demo/order', '', ''), (74, 5, '更多工具', 0, 164, ',1,5,74,', 3, 0, 1672717871, 1672717871, 'menu', '', '', 'tool', 'index', '', '', '_iframe', 'gdgj', 'gengduogongju', 'tool/index', '', ''), (80, 5, '插件配置', 0, 70, ',1,5,80,', 3, 0, 1672717917, 1672717917, 'directory', '', '', '', '', '', '', '', 'cjpz', 'chajianpeizhi', '', '', ''), (81, 21, '菜单示例', 1, 34, ',21,81,', 2, 7, 1673414300, 1673415336, 'directory', 'woo-icon-fenlei', '', '', '', '', '', '_iframe', 'cdsl', 'caidanshili', '', '', ''), (82, 4, '字典项', 0, 20, ',1,4,82,', 3, 0, 1672717930, 1672717930, 'directory', '', '', '', '', '', '', '', 'zdx', 'zidianxiang', '', '', ''), (83, 5, '字段', 0, 44, ',1,5,83,', 3, 0, 1672717931, 1672718385, 'directory', '', '', '', '', '', '', '', 'zd', 'ziduan', '', '', ''), (84, 5, '表单场景', 0, 165, ',1,5,84,', 3, 0, 1673413093, 1673413161, 'menu', '', '', 'form_scene', 'index', '', '', '', 'bdcj', 'biaodanchangjing', 'form_scene/index', '', ''), (85, 33, '表格按钮', 1, 45, ',21,33,85,', 3, 0, 1673413538, 1673413538, 'menu', '', '', 'demo', 'demo63', '', '', '_iframe', 'bgan', 'biaogeanniu', 'demo/demo63', '', ''), (86, 81, '打开外链', 1, 168, ',21,81,86,', 3, 0, 1673413694, 1673414321, 'menu', '', '', '', '', 'https://www.baidu.com', '', '_blank', 'dkwl', 'dakaiwailian', '', '', ''), (87, 81, '异步请求', 1, 173, ',21,81,87,', 3, 0, 1673413767, 1673414343, 'menu', '', '', '', '', 'tool/clearCache', '', '_ajax', 'ybqq', 'yibuqingqiu', '', '', ''), (88, 81, '事件回调', 1, 174, ',21,81,88,', 3, 0, 1673414038, 1673414368, 'menu', '', '', '', '', 'event', '', '_event', 'sjhd', 'shijianhuidiao', '', '', 'testClick'), (89, 81, '独立窗口', 1, 169, ',21,81,89,', 3, 0, 1673414248, 1673423601, 'menu', '', '', '', '', 'test_product/index', '', '_open', 'dlck', 'dulichuangkou', '', '', ''), (90, 81, '默认方式', 1, 167, ',21,81,90,', 3, 0, 1673414479, 1673423579, 'menu', '', '', '', '', 'test_product/index', '', '_iframe', 'mrfs', 'morenfangshi', '', '', ''), (91, 81, '嵌入弹窗', 1, 170, ',21,81,91,', 3, 0, 1673414504, 1673423620, 'menu', '', '', '', '', 'test_product/index', '', '_layer', 'qrdc', 'qianrudanchuang', '', '', ''), (92, 81, '嵌入抽屉', 1, 172, ',21,81,92,', 3, 0, 1673414538, 1673423629, 'menu', '', '', '', '', 'test_product/index', '', '_drawer', 'qrct', 'qianruchouti', '', '', ''), (93, 34, '大屏示例', 1, 49, ',21,34,93,', 3, 0, 1675257050, 1675257080, 'menu', '', '', 'demo', 'demo12', '', '', '_blank', 'dpsl', 'dapingshili', 'demo/demo12', '', ''), (94, 34, '扩展图标', 1, 48, ',21,34,94,', 3, 0, 1675869421, 1675869421, 'menu', '', '', 'demo', 'icon', '', '', '_iframe', 'kztb', 'kuozhantubiao', 'demo/icon', '', ''); ~~~ 6、更新`Admin`模型,不要忘记去重新生成模型 ~~~ delete from `woo_field` where `id`=78; ALTER TABLE `woo_admin` DROP `admin_group_id`; ALTER TABLE `woo_admin` ADD `mobile` varchar(16) NOT NULL DEFAULT '' COMMENT '手机'; ALTER TABLE `woo_admin` ADD `sex` tinyint(4) NOT NULL DEFAULT '0' COMMENT '性别'; ALTER TABLE `woo_admin` ADD `idcard` char(32) NOT NULL DEFAULT '' COMMENT '身份证'; ALTER TABLE `woo_admin` ADD `region` varchar(64) NOT NULL DEFAULT '' COMMENT '家庭所在地'; ALTER TABLE `woo_admin` ADD `address` varchar(128) NOT NULL DEFAULT '' COMMENT '详情地址'; ALTER TABLE `woo_admin` ADD `data_allow` tinyint(4) NOT NULL DEFAULT '0' COMMENT '独立数据权限'; ALTER TABLE `woo_admin` ADD `custom_data_allow` varchar(256) NOT NULL DEFAULT '' COMMENT '自定义数据权限'; INSERT INTO `woo_field` (`id`, `field`, `name`, `model_id`, `form`, `business_form`, `modify_form`, `business_modify_form`, `form_foreign`, `business_form_foreign`, `form_item_attrs`, `business_form_item_attrs`, `form_tag_attrs`, `business_form_tag_attrs`, `form_options`, `business_form_options`, `form_upload`, `business_form_upload`, `form_trigger`, `business_form_trigger`, `list`, `business_list`, `list_attrs`, `business_list_attrs`, `list_filter`, `business_list_filter`, `list_filter_attrs`, `business_list_filter_attrs`, `list_filter_tag_attrs`, `business_list_filter_tag_attrs`, `detail`, `business_detail`, `detail_attrs`, `business_detail_attrs`, `validate`, `business_validate`, `is_field`, `type`, `length`, `default`, `is_not_null`, `is_unsigned`, `is_ai`, `is_system`, `is_contribute`, `index`, `after`, `admin_id`, `list_order`, `create_time`, `update_time`) VALUES (462, 'admin_group_id', '所属角色组', 7, 'xmtree', '', '', '', 'AdminGroup', '', '', '', '', '', '', '', '', '', '', '', 'relation', '', '{\"width\":\"180\"}', '', '', '', '', '', '', '', '', '', '', '', '[{\"rule\":\"call\",\"args\":\"checkAdminGroup\",\"on\":\"\",\"message\":\"\"}]', '', 0, 'INT', '', '0', 1, 0, 0, 1, 0, '', '', 1, 83, 1672755683, 1676130746), (486, 'mobile', '手机', 7, 'text', '', '', '', '', '', '{\"form_group\":\"admin\"}', '', '', '', '', '', '', '', '', '', '', '', '{\"width\":\"110\"}', '', '1', '', '', '', '', '', '', '', '', '', '[{\"rule\":\"mobile\",\"args\":\"\",\"on\":\"\",\"message\":\"\"},{\"rule\":\"unique\",\"args\":\"admin\",\"on\":\"\",\"message\":\"\"}]', '', 1, 'VARCHAR', '16', '', 1, 0, 0, 1, 0, 'index', '', 1, 79, 1676263773, 1676265770), (487, 'sex', '性别', 7, 'select', '', '', '', '', '', '{\"form_group\":\"admin\"}', '', '', '', '[\"未知\",\"男\",\"女\",\"保密\"]', '', '', '', '', '', 'options', '', '{\"width\":\"80\"}', '', '1', '', '', '', '', '', '', '', '', '', '', '', 1, 'TINYINT', '', '0', 1, 0, 0, 1, 0, '', '', 1, 80, 1676264542, 1676265779), (488, 'idcard', '身份证', 7, 'text', '', '', '', '', '', '{\"form_group\":\"admin\"}', '', '', '', '', '', '', '', '', '', '', '', '{\"width\":\"160\"}', '', '1', '', '', '', '', '', '', '', '', '', '[{\"rule\":\"idCard\",\"args\":\"\",\"on\":\"\",\"message\":\"\"}]', '', 1, 'CHAR', '32', '', 1, 0, 0, 1, 0, '', '', 1, 81, 1676264979, 1676265798), (489, 'region', '家庭所在地', 7, 'cascader', '', '', '', 'Region', '', '{\"form_group\":\"admin\"}', '', '{\"data-url\":\"true\"}', '', '', '', '', '', '', '', '', '', '{\"width\":\"160\"}', '', 'cascader', '', '', '', '{\"data-url\":\"true\",\"data-nostrict\":\"true\"}', '', '', '', '', '', '', '', 1, 'VARCHAR', '64', '', 1, 0, 0, 1, 0, '', '', 1, 86, 1676265305, 1676274783), (490, 'address', '详情地址', 7, 'text', '', '', '', '', '', '{\"form_group\":\"admin\"}', '', '', '', '', '', '', '', '', '', '0', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 1, 'VARCHAR', '128', '', 1, 0, 0, 1, 0, '', '', 1, 109, 1676265399, 1676265877), (491, 'data_allow', '独立数据权限', 7, 'select', '', '', '', '', '', '', '', '', '', '{\"0\":\"全部数据权限\",\"1\":\"仅本人数据权限\",\"2\":\"本部门数据权限\",\"3\":\"部门及以下数据权限\",\"4\":\"自定义数据权限\",\"5\":\"所在顶级及以下部门权限\",\"-1\":\"继承角色数据权限\"}', '', '', '', '{\"4\":\"custom_data_allow\"}', '', '', '', '{\"width\":\"160\"}', '', '1', '', '', '', '', '', '', '', '', '', '', '', 1, 'TINYINT', '', '0', 1, 0, 0, 1, 0, '', '', 1, 462, 1676267284, 1676274781), (492, 'custom_data_allow', '自定义数据权限', 7, 'xmtree', '', '', '', 'Department', '', '', '', '', '', '', '', '', '', '', '', '0', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 1, 'VARCHAR', '256', '', 1, 0, 0, 1, 0, '', '', 1, 486, 1676267492, 1676267492); delete from `woo_model` where `id`=7; INSERT INTO `woo_model` (`id`, `model`, `cname`, `addon`, `full_table`, `order_type`, `tree_level`, `custom_data`, `list_config`, `business_list_config`, `suffix`, `pk`, `connection`, `is_import`, `is_business_import`, `parent_model`, `display`, `form_group`, `relation_link`, `admin_id`, `is_controller`, `is_business_controller`, `admin_tool_bar`, `business_tool_bar`, `admin_item_tool_bar`, `business_item_tool_bar`, `admin_siderbar`, `business_siderbar`, `admin_table_attrs`, `business_table_attrs`, `admin_item_checkbox`, `business_item_checkbox`, `admin_item_toolbar_options`, `business_item_toolbar_options`, `admin_counter`, `business_counter`, `admin_total_row`, `business_total_row`, `admin_is_remove_pk`, `business_is_remove_pk`, `admin_filter_model`, `business_filter_model`, `admin_list_with`, `business_list_with`, `admin_list_fields`, `business_list_fields`, `admin_list_filters`, `business_list_filters`, `admin_list_where`, `create_time`, `update_time`) VALUES (7, 'Admin', '管理员', '', '', '', 0, '', 'create,batch_delete,modify,delete,detail,delete_index', '', '', '', '', 0, 0, '', 'username', '{\"basic\":\"账号信息\",\"admin\":\"用户资料\"}', '[{\"key\":\"AdminGroup\",\"foreign\":\"\",\"type\":\"belongsToMany\",\"foreign_key\":\"\",\"more\":\"{\\\"middle\\\":\\\"AdminUseAdminGroup\\\"}\"},{\"key\":\"Department\",\"foreign\":\"\",\"type\":\"belongsTo\",\"foreign_key\":\"\",\"more\":\"\"},{\"key\":\"AdminLogin\",\"foreign\":\"\",\"type\":\"hasMany\",\"foreign_key\":\"\",\"more\":\"\"}]', 1, 0, 0, '', NULL, '', NULL, '', NULL, '', NULL, 'checkbox', '', '[{\"is_show\":\"1\",\"title\":\"操作\",\"fixed\":\"right\",\"min_width\":\"0\",\"align\":\"center\",\"more\":\"\"}]', NULL, '[{\"field\":\"id\",\"title\":\"总人数\",\"type\":\"count\",\"where_type\":\"\",\"where\":\"\",\"callback\":\"\",\"templet\":\"\",\"more\":\"\"},{\"field\":\"id\",\"title\":\"男性人数\",\"type\":\"count\",\"where_type\":\"where\",\"where\":\"[[\\\"sex\\\",\\\"=\\\",1]]\",\"callback\":\"\",\"templet\":\"\",\"more\":\"\"},{\"field\":\"id\",\"title\":\"女性人数\",\"type\":\"count\",\"where_type\":\"where\",\"where\":\"[[\\\"sex\\\",\\\"=\\\",2]]\",\"callback\":\"\",\"templet\":\"\",\"more\":\"\"}]', NULL, '', NULL, 0, 0, '', '', '', NULL, '', NULL, '', NULL, '', 1672723186, 1676364253); ~~~ 7、更新`SettingGroup`模型,不要忘记重新生成,后面不再提醒模型文件生成 ~~~ ALTER TABLE `woo_setting_group` ADD `is_scene` tinyint(1) UNSIGNED NOT NULL DEFAULT '0' COMMENT '是否场景组'; INSERT INTO `woo_field` (`id`, `field`, `name`, `model_id`, `form`, `business_form`, `modify_form`, `business_modify_form`, `form_foreign`, `business_form_foreign`, `form_item_attrs`, `business_form_item_attrs`, `form_tag_attrs`, `business_form_tag_attrs`, `form_options`, `business_form_options`, `form_upload`, `business_form_upload`, `form_trigger`, `business_form_trigger`, `list`, `business_list`, `list_attrs`, `business_list_attrs`, `list_filter`, `business_list_filter`, `list_filter_attrs`, `business_list_filter_attrs`, `list_filter_tag_attrs`, `business_list_filter_tag_attrs`, `detail`, `business_detail`, `detail_attrs`, `business_detail_attrs`, `validate`, `business_validate`, `is_field`, `type`, `length`, `default`, `is_not_null`, `is_unsigned`, `is_ai`, `is_system`, `is_contribute`, `index`, `after`, `admin_id`, `list_order`, `create_time`, `update_time`) VALUES (493, 'is_scene', '是否场景组', 1, 'checker', '', '', '', '', '', '{\"tip\":\"选中以后,默认系统设置中将不会显示该组\"}', '', '', '', '', '', '', '', '', '', 'checker.show', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 1, 'TINYINT', '1', '0', 1, 1, 0, 1, 0, 'index', '', 1, 4, 1676274767, 1676437316); ~~~ 8、更新`Power`权限模型 ~~~ ALTER TABLE `woo_power` ADD `admin_id` int(11) NOT NULL DEFAULT '0' COMMENT '管理员ID'; INSERT INTO `woo_field` (`id`, `field`, `name`, `model_id`, `form`, `business_form`, `modify_form`, `business_modify_form`, `form_foreign`, `business_form_foreign`, `form_item_attrs`, `business_form_item_attrs`, `form_tag_attrs`, `business_form_tag_attrs`, `form_options`, `business_form_options`, `form_upload`, `business_form_upload`, `form_trigger`, `business_form_trigger`, `list`, `business_list`, `list_attrs`, `business_list_attrs`, `list_filter`, `business_list_filter`, `list_filter_attrs`, `business_list_filter_attrs`, `list_filter_tag_attrs`, `business_list_filter_tag_attrs`, `detail`, `business_detail`, `detail_attrs`, `business_detail_attrs`, `validate`, `business_validate`, `is_field`, `type`, `length`, `default`, `is_not_null`, `is_unsigned`, `is_ai`, `is_system`, `is_contribute`, `index`, `after`, `admin_id`, `list_order`, `create_time`, `update_time`) VALUES (485, 'admin_id', '管理员ID', 15, 'none', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 1, 'INT', '', '0', 1, 0, 0, 1, 0, '', '', 1, 153, 1676089869, 1676186165); ~~~ 9、更新 `Department`部门模型,重新生成模型;然后你最好清空你的woo_department表重新添加你的部门数据,不然tree统计不准。 ~~~ ALTER TABLE `woo_department` ADD `list_order` int(11) NOT NULL DEFAULT '0' COMMENT '排序权重' ; ALTER TABLE `woo_department` ADD `family` varchar(256) NOT NULL DEFAULT '' COMMENT '家族'; ALTER TABLE `woo_department` ADD `level` smallint(5) UNSIGNED NOT NULL DEFAULT '0' COMMENT '层级' ; ALTER TABLE `woo_department` ADD `children_count` smallint(5) UNSIGNED NOT NULL DEFAULT '0' COMMENT '下级数'; ALTER TABLE `woo_department` ADD `leader_ids` varchar(128) NOT NULL DEFAULT '' COMMENT '部门领导'; ALTER TABLE `woo_department` ADD `is_admin` tinyint(1) UNSIGNED NOT NULL DEFAULT '0' COMMENT '后台登录'; INSERT INTO `woo_field` (`id`, `field`, `name`, `model_id`, `form`, `business_form`, `modify_form`, `business_modify_form`, `form_foreign`, `business_form_foreign`, `form_item_attrs`, `business_form_item_attrs`, `form_tag_attrs`, `business_form_tag_attrs`, `form_options`, `business_form_options`, `form_upload`, `business_form_upload`, `form_trigger`, `business_form_trigger`, `list`, `business_list`, `list_attrs`, `business_list_attrs`, `list_filter`, `business_list_filter`, `list_filter_attrs`, `business_list_filter_attrs`, `list_filter_tag_attrs`, `business_list_filter_tag_attrs`, `detail`, `business_detail`, `detail_attrs`, `business_detail_attrs`, `validate`, `business_validate`, `is_field`, `type`, `length`, `default`, `is_not_null`, `is_unsigned`, `is_ai`, `is_system`, `is_contribute`, `index`, `after`, `admin_id`, `list_order`, `create_time`, `update_time`) VALUES (494, 'list_order', '排序权重', 6, 'number', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 1, 'INT', '', '0', 1, 0, 0, 1, 0, '', '', 1, 494, 1676280908, 1676281113), (495, 'family', '家族', 6, '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '0', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 1, 'VARCHAR', '256', '', 1, 0, 0, 1, 0, '', '', 1, 495, 1676280987, 1676281115), (496, 'level', '层级', 6, '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '0', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 1, 'SMALLINT', '5', '0', 1, 1, 0, 1, 0, '', '', 1, 496, 1676281044, 1676281101), (497, 'children_count', '下级数', 6, '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '0', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 1, 'SMALLINT', '5', '0', 1, 1, 0, 1, 0, '', '', 1, 497, 1676281095, 1676281116), (498, 'leader_ids', '部门领导', 6, 'relation', '', '', '', 'Admin', '', '', '', '{\"data-type\":\"checkbox\"}', '', '', '', '', '', '', '', 'html', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 1, 'VARCHAR', '128', '', 1, 0, 0, 1, 0, '', '', 1, 64, 1676283537, 1676284803), (499, 'is_admin', '后台登录', 6, 'checker', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'checker.show', '', '{\"width\":\"110\"}', '', '', '', '', '', '', '', '', '', '', '', '', '', 1, 'TINYINT', '1', '0', 1, 1, 0, 1, 0, '', '', 1, 65, 1676283968, 1676388338); ~~~ 10、 删除`AdminGroup` (会把你原来的woo_admin_group表删除)用户组替换为新的 `AdminGroup`角色模型 : ~~~ delete from `woo_model` where `id`=5; delete from `woo_field` where `model_id`=5; DROP TABLE IF EXISTS `woo_admin_group`; INSERT INTO `woo_model` (`id`, `model`, `cname`, `addon`, `full_table`, `order_type`, `tree_level`, `custom_data`, `list_config`, `business_list_config`, `suffix`, `pk`, `connection`, `is_import`, `is_business_import`, `parent_model`, `display`, `form_group`, `relation_link`, `admin_id`, `is_controller`, `is_business_controller`, `admin_tool_bar`, `business_tool_bar`, `admin_item_tool_bar`, `business_item_tool_bar`, `admin_siderbar`, `business_siderbar`, `admin_table_attrs`, `business_table_attrs`, `admin_item_checkbox`, `business_item_checkbox`, `admin_item_toolbar_options`, `business_item_toolbar_options`, `admin_counter`, `business_counter`, `admin_total_row`, `business_total_row`, `admin_is_remove_pk`, `business_is_remove_pk`, `admin_filter_model`, `business_filter_model`, `admin_list_with`, `business_list_with`, `admin_list_fields`, `business_list_fields`, `admin_list_filters`, `business_list_filters`, `admin_list_where`, `create_time`, `update_time`) VALUES (38, 'AdminGroup', '角色', '', '', 'asc', 3, '', 'create,batch_delete,modify,delete,detail', '', '', '', '', 0, 0, 'parent', 'title', '', '', 1, 1, 0, '', '', '', '', '', '', '{\"treetable\":\"true\"}', '', 'checkbox', 'checkbox', '[{\"is_show\":\"1\",\"title\":\"操作\",\"fixed\":\"right\",\"min_width\":\"0\",\"align\":\"center\",\"more\":\"\"}]', '[{\"is_show\":\"1\",\"title\":\"操作\",\"fixed\":\"right\",\"min_width\":\"0\",\"align\":\"center\"}]', '', '', '', '', 3, 0, '', '', '', '', '', '', '', '', '', 1672727020, 1675157786); INSERT INTO `woo_field` (`id`, `field`, `name`, `model_id`, `form`, `business_form`, `modify_form`, `business_modify_form`, `form_foreign`, `business_form_foreign`, `form_item_attrs`, `business_form_item_attrs`, `form_tag_attrs`, `business_form_tag_attrs`, `form_options`, `business_form_options`, `form_upload`, `business_form_upload`, `form_trigger`, `business_form_trigger`, `list`, `business_list`, `list_attrs`, `business_list_attrs`, `list_filter`, `business_list_filter`, `list_filter_attrs`, `business_list_filter_attrs`, `list_filter_tag_attrs`, `business_list_filter_tag_attrs`, `detail`, `business_detail`, `detail_attrs`, `business_detail_attrs`, `validate`, `business_validate`, `is_field`, `type`, `length`, `default`, `is_not_null`, `is_unsigned`, `is_ai`, `is_system`, `is_contribute`, `index`, `after`, `admin_id`, `list_order`, `create_time`, `update_time`) VALUES (445, 'id', 'ID', 38, 'hidden', 'hidden', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 1, 'INT', '10', 'none', 1, 1, 1, 1, 0, '', '', 1, 445, 1672727021, 1672727021), (446, 'parent_id', '父级ID', 38, 'xmtree', 'xmtree', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '{\"hide\":\"true\"}', '', '', '', '', '', '', '', '', '', '', '', '[{\"rule\":\"call\",\"args\":\"checkParent\",\"on\":\"0\",\"message\":\"\"}]', '[{\"rule\":\"call\",\"args\":\"checkParent\",\"on\":\"\",\"message\":\"\"}]', 1, 'INT', '10', '0', 1, 1, 0, 1, 0, 'index', '', 1, 447, 1672727021, 1672729555), (447, 'title', '角色名', 38, 'text', 'text', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '{\"width\":\"240\"}', '', '', '', '', '', '', '', '', '', '', '', '[{\"rule\":\"require\",\"args\":\"\",\"on\":\"0\",\"message\":\"\"}]', '[{\"rule\":\"require\",\"args\":\"\",\"on\":\"0\",\"message\":\"\"}]', 1, 'VARCHAR', '128', '', 1, 0, 0, 1, 0, '', '', 1, 446, 1672727021, 1676170452), (448, 'list_order', '排序权重', 38, 'number', 'number', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '{\"width\":\"120\"}', '', '', '', '', '', '', '', '', '', '', '', '', '', 1, 'INT', '11', '0', 1, 0, 0, 1, 0, 'index', '', 1, 452, 1672727021, 1672730726), (449, 'family', '家族', 38, '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '0', '0', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 1, 'VARCHAR', '256', '', 1, 0, 0, 1, 0, '', '', 1, 453, 1672727021, 1672727021), (450, 'level', '层级', 38, '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '0', '0', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 1, 'SMALLINT', '5', '0', 1, 1, 0, 1, 0, '', '', 1, 454, 1672727022, 1672727022), (451, 'children_count', '下级数', 38, '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '0', '{\"hide\":\"true\"}', '', '', '', '', '', '', '', '', '', '', '', '', '', 1, 'SMALLINT', '5', '0', 1, 1, 0, 1, 0, '', '', 1, 455, 1672727022, 1672729814), (452, 'create_time', '创建日期', 38, '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '0', '', '{\"width\":\"146\"}', '{\"width\":\"146\"}', '', '', '', '', '', '', '', '', '', '', '', '', 1, 'INT', '10', '0', 1, 1, 0, 1, 0, '', '', 1, 456, 1672727022, 1672729683), (453, 'update_time', '修改日期', 38, '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '0', '', '{\"width\":\"146\"}', '{\"width\":\"146\"}', '', '', '', '', '', '', '', '', '', '', '', '', 1, 'INT', '10', '0', 1, 1, 0, 1, 0, '', '', 1, 463, 1672727022, 1672729689), (454, 'dashboard', '主面板URL', 38, 'text', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'url', '', '{\"width\":\"200\"}', '', '', '', '', '', '', '', '', '', '', '', '', '', 1, 'VARCHAR', '64', '', 1, 0, 0, 1, 0, '', '', 1, 448, 1672727782, 1672730348), (455, 'data_allow', '数据权限', 38, 'select', '', '', '', '', '', '', '', '', '', '{\"0\":\"全部数据权限\",\"1\":\"仅本人数据权限\",\"2\":\"本部门数据权限\",\"3\":\"部门及以下数据权限\",\"4\":\"自定义数据权限\",\"5\":\"所在顶级及以下部门权限\",\"-1\":\"继承父角色权限\"}', '', '', '', '{\"4\":\"custom_data_allow\"}', '', '', '', '{\"width\":\"160\"}', '', '', '', '', '', '', '', '', '', '', '', '[{\"rule\":\"call\",\"args\":\"checkDataAllow\",\"on\":\"0\",\"message\":\"\"}]', '', 1, 'TINYINT', '', '0', 1, 0, 0, 1, 0, '', '', 1, 450, 1672728515, 1672730370), (456, 'custom_data_allow', '自定义数据权限', 38, 'xmtree', '', '', '', 'Department', '', '', '', '', '', '', '', '', '', '', '', '0', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 1, 'VARCHAR', '256', '', 1, 0, 0, 1, 0, '', '', 1, 451, 1672729268, 1672729357), (463, 'is_admin', '后台登录', 38, 'checker', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'checker.show', '', '{\"width\":\"110\"}', '', '', '', '', '', '', '', '', '', '', '', '', '', 1, 'TINYINT', '1', '0', 1, 1, 0, 1, 0, '', '', 1, 449, 1672759560, 1676388324); CREATE TABLE IF NOT EXISTS `woo_admin_group` ( `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'ID', `parent_id` int(10) UNSIGNED NOT NULL DEFAULT '0' COMMENT '父级ID', `title` varchar(128) NOT NULL DEFAULT '' COMMENT '角色名', `list_order` int(11) NOT NULL DEFAULT '0' COMMENT '排序权重', `family` varchar(256) NOT NULL DEFAULT '' COMMENT '家族', `level` smallint(5) UNSIGNED NOT NULL DEFAULT '0' COMMENT '层级', `children_count` smallint(5) UNSIGNED NOT NULL DEFAULT '0' COMMENT '下级数', `create_time` int(10) UNSIGNED NOT NULL DEFAULT '0' COMMENT '创建日期', `update_time` int(10) UNSIGNED NOT NULL DEFAULT '0' COMMENT '修改日期', `dashboard` varchar(64) NOT NULL DEFAULT '' COMMENT '主面板URL', `data_allow` tinyint(4) NOT NULL DEFAULT '0' COMMENT '数据权限', `custom_data_allow` varchar(256) NOT NULL DEFAULT '' COMMENT '自定义数据权限', `is_admin` tinyint(1) UNSIGNED NOT NULL DEFAULT '0' COMMENT '后台登录', PRIMARY KEY (`id`), KEY `parent_id` (`parent_id`), KEY `list_order` (`list_order`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='角色组' AUTO_INCREMENT=1 ; INSERT INTO `woo_admin_group` (`id`, `parent_id`, `title`, `list_order`, `family`, `level`, `children_count`, `create_time`, `update_time`, `dashboard`, `data_allow`, `custom_data_allow`, `is_admin`) VALUES (1, 0, '超级管理', 1, ',1,', 1, 0, 1672727084, 1672759579, '', 0, '', 1); ~~~ 找到模型38,点生成。 11、新增模型 ~~~ CREATE TABLE `woo_admin_use_admin_group` ( `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'ID', `admin_id` int(10) UNSIGNED NOT NULL DEFAULT '0' COMMENT '所属管理员ID', `admin_group_id` int(10) UNSIGNED NOT NULL DEFAULT '0' COMMENT '所属角色ID', `create_time` int(10) UNSIGNED NOT NULL DEFAULT '0' COMMENT '创建日期', `update_time` int(10) UNSIGNED NOT NULL DEFAULT '0' COMMENT '修改日期', PRIMARY KEY (`id`), KEY `admin_id` (`admin_id`), KEY `admin_group_id` (`admin_group_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='用户对应角色' AUTO_INCREMENT=1; INSERT INTO `woo_model` (`id`, `model`, `cname`, `addon`, `full_table`, `order_type`, `tree_level`, `custom_data`, `list_config`, `business_list_config`, `suffix`, `pk`, `connection`, `is_import`, `is_business_import`, `parent_model`, `display`, `form_group`, `relation_link`, `admin_id`, `is_controller`, `is_business_controller`, `admin_tool_bar`, `business_tool_bar`, `admin_item_tool_bar`, `business_item_tool_bar`, `admin_siderbar`, `business_siderbar`, `admin_table_attrs`, `business_table_attrs`, `admin_item_checkbox`, `business_item_checkbox`, `admin_item_toolbar_options`, `business_item_toolbar_options`, `admin_counter`, `business_counter`, `admin_total_row`, `business_total_row`, `admin_is_remove_pk`, `business_is_remove_pk`, `admin_filter_model`, `business_filter_model`, `admin_list_with`, `business_list_with`, `admin_list_fields`, `business_list_fields`, `admin_list_filters`, `business_list_filters`, `admin_list_where`, `create_time`, `update_time`) VALUES (39, 'AdminUseAdminGroup', '用户对应角色', '', '', '', 0, '', 'create,batch_delete,modify,delete,detail', '', '', '', '', 0, 0, 'AdminGroup', '', '', '[{\"key\":\"Admin\",\"foreign\":\"\",\"type\":\"belongsTo\",\"foreign_key\":\"\",\"more\":\"\"},{\"key\":\"AdminGroup\",\"foreign\":\"\",\"type\":\"belongsTo\",\"foreign_key\":\"\",\"more\":\"\"}]', 1, 1, 0, '', '', '', '', '', '', '', '', 'checkbox', 'checkbox', '[{\"is_show\":\"1\",\"title\":\"操作\",\"fixed\":\"right\",\"min_width\":\"0\",\"align\":\"center\",\"more\":\"\"}]', '[{\"is_show\":\"1\",\"title\":\"操作\",\"fixed\":\"right\",\"min_width\":\"0\",\"align\":\"center\"}]', '', '', '', '', 0, 0, '', '', '', '', '', '', '', '', '', 1672735934, 1672736263); INSERT INTO `woo_field` (`id`, `field`, `name`, `model_id`, `form`, `business_form`, `modify_form`, `business_modify_form`, `form_foreign`, `business_form_foreign`, `form_item_attrs`, `business_form_item_attrs`, `form_tag_attrs`, `business_form_tag_attrs`, `form_options`, `business_form_options`, `form_upload`, `business_form_upload`, `form_trigger`, `business_form_trigger`, `list`, `business_list`, `list_attrs`, `business_list_attrs`, `list_filter`, `business_list_filter`, `list_filter_attrs`, `business_list_filter_attrs`, `list_filter_tag_attrs`, `business_list_filter_tag_attrs`, `detail`, `business_detail`, `detail_attrs`, `business_detail_attrs`, `validate`, `business_validate`, `is_field`, `type`, `length`, `default`, `is_not_null`, `is_unsigned`, `is_ai`, `is_system`, `is_contribute`, `index`, `after`, `admin_id`, `list_order`, `create_time`, `update_time`) VALUES (457, 'id', 'ID', 39, 'hidden', 'hidden', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 1, 'INT', '10', 'none', 1, 1, 1, 1, 0, '', '', 1, 457, 1672735935, 1672735935), (458, 'admin_id', '所属管理员ID', 39, 'relation', 'relation', '', '', 'Admin', '', '', '', '', '', '', '', '', '', '', '', 'relation', '', '', '', '', '', '', '', '', '', '', '', '', '', '[{\"rule\":\"gt\",\"args\":\"0\",\"on\":\"0\",\"message\":\"\"}]', '[{\"rule\":\"gt\",\"args\":\"0\",\"on\":\"0\",\"message\":\"\"}]', 1, 'INT', '10', '0', 1, 1, 0, 1, 0, 'index', '', 1, 458, 1672735935, 1672735935), (459, 'admin_group_id', '所属角色ID', 39, 'xmtree', 'xmtree', '', '', 'AdminGroup', '', '', '', '', '', '', '', '', '', '', '', 'relation', '', '', '', '', '', '', '', '', '', '', '', '', '', '[{\"rule\":\"gt\",\"args\":\"0\",\"on\":\"0\",\"message\":\"\"}]', '[{\"rule\":\"gt\",\"args\":\"0\",\"on\":\"0\",\"message\":\"\"}]', 1, 'INT', '10', '0', 1, 1, 0, 1, 0, 'index', '', 1, 459, 1672735935, 1672735935), (460, 'create_time', '创建日期', 39, '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '{\"width\":\"146\"}', '{\"width\":\"146\"}', '', '', '', '', '', '', '', '', '', '', '', '', 1, 'INT', '10', '0', 1, 1, 0, 1, 0, '', '', 1, 460, 1672735935, 1672735935), (461, 'update_time', '修改日期', 39, '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '{\"width\":\"146\"}', '{\"width\":\"146\"}', '', '', '', '', '', '', '', '', '', '', '', '', 1, 'INT', '10', '0', 1, 1, 0, 1, 0, '', '', 1, 461, 1672735935, 1672735935); INSERT INTO `woo_admin_use_admin_group` (`id`, `admin_id`, `admin_group_id`, `create_time`, `update_time`) VALUES (1, 1, 1, 1676607235, 1676607235); ~~~ 找到模型39点生成。 12、新增模型: ~~~ CREATE TABLE `woo_form_scene` ( `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'ID', `model_id` int(10) UNSIGNED NOT NULL DEFAULT '0' COMMENT '所属模型ID', `title` varchar(128) NOT NULL DEFAULT '' COMMENT '按钮标题', `is_verify` tinyint(1) UNSIGNED NOT NULL DEFAULT '0' COMMENT '审核', `list_order` int(11) NOT NULL DEFAULT '0' COMMENT '排序权重', `create_time` int(10) UNSIGNED NOT NULL DEFAULT '0' COMMENT '创建日期', `update_time` int(10) UNSIGNED NOT NULL DEFAULT '0' COMMENT '修改日期', `icon` varchar(64) NOT NULL DEFAULT '' COMMENT '图标', `hover` varchar(64) NOT NULL DEFAULT '' COMMENT 'hover名称', `where` varchar(256) NOT NULL DEFAULT '' COMMENT '渲染条件', `action` varchar(64) NOT NULL DEFAULT '' COMMENT '独立方法', `where_type` varchar(64) NOT NULL DEFAULT '' COMMENT '条件方式', `is_btn` tinyint(1) UNSIGNED NOT NULL DEFAULT '0' COMMENT '列表按钮', `var` char(32) NOT NULL DEFAULT '' COMMENT '标识符', `fields` text NOT NULL COMMENT '表单字段', `parent` char(32) NOT NULL DEFAULT '' COMMENT '父标识', `app` varchar(64) NOT NULL DEFAULT '' COMMENT '可用应用', `attrs` varchar(512) NOT NULL DEFAULT '' COMMENT '标签属性', `class` varchar(64) NOT NULL DEFAULT '' COMMENT '类名', `page_title` varchar(64) NOT NULL DEFAULT '' COMMENT '网页标题', `success_message` varchar(64) NOT NULL DEFAULT '' COMMENT '成功提示', `page_tip` varchar(256) NOT NULL DEFAULT '' COMMENT '头部提示', PRIMARY KEY (`id`), KEY `is_verify` (`is_verify`), KEY `list_order` (`list_order`), KEY `model_id` (`model_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='表单场景' AUTO_INCREMENT=4; INSERT INTO `woo_form_scene` (`id`, `model_id`, `title`, `is_verify`, `list_order`, `create_time`, `update_time`, `icon`, `hover`, `where`, `action`, `where_type`, `is_btn`, `var`, `fields`, `parent`, `app`, `attrs`, `class`, `page_title`, `success_message`, `page_tip`) VALUES (1, 7, '', 1, 71, 1676364226, 1676380617, 'layui-icon-password', '密码', '', 'password', '', 1, 'password', '[{\"field\":\"password\",\"elem\":\"password\",\"more_attrs\":\"{\\\"tip\\\":\\\"\\\"}\",\"validate\":\"{\\\"require\\\":\\\"\\\",\\\"confirm\\\":\\\"repassword\\\"}\"},{\"field\":\"repassword\",\"elem\":\"password\",\"more_attrs\":\"{\\\"name\\\":\\\"确认密码\\\",\\\"attrs\\\":\\\"{\\\\\\\"lay-affix\\\\\\\":\\\\\\\"eye\\\\\\\"}\\\"}\",\"validate\":\"{\\\"require\\\":\\\"\\\",\\\"confirm\\\":\\\"password\\\"}\"}]', '', '[\"admin\"]', '', 'btn-37', '修改密码', '密码修改成功', ''), (2, 19, '修改密码', 1, 3, 1676379974, 1676381484, '', '', '', '', '', 1, 'password', '[{\"field\":\"password\",\"elem\":\"password\",\"more_attrs\":\"{\\\"tip\\\":\\\"\\\"}\",\"validate\":\"{\\\"require\\\":\\\"\\\",\\\"confirm\\\":\\\"repassword\\\"}\"},{\"field\":\"repassword\",\"elem\":\"password\",\"more_attrs\":\"{\\\"name\\\":\\\"确认密码\\\",\\\"attrs\\\":\\\"{\\\\\\\"lay-affix\\\\\\\":\\\\\\\"eye\\\\\\\"}\\\"}\",\"validate\":\"{\\\"require\\\":\\\"\\\",\\\"confirm\\\":\\\"password\\\"}\"}]', 'more', '[\"admin\"]', '', '', '修改密码', '密码修改成功', ''), (3, 19, '支付密码', 1, 2, 1676380297, 1676381514, '', '', '', '', '', 1, 'pay_password', '[{\"field\":\"pay_password\",\"elem\":\"password\",\"more_attrs\":\"{\\\"tip\\\":\\\"\\\"}\",\"validate\":\"{\\\"require\\\":\\\"\\\",\\\"confirm\\\":\\\"repassword\\\"}\"},{\"field\":\"repassword\",\"elem\":\"password\",\"more_attrs\":\"{\\\"name\\\":\\\"确认密码\\\",\\\"attrs\\\":\\\"{\\\\\\\"lay-affix\\\\\\\":\\\\\\\"eye\\\\\\\"}\\\"}\",\"validate\":\"{\\\"require\\\":\\\"\\\",\\\"confirm\\\":\\\"pay_password\\\"}\"}]', 'more', '[\"admin\"]', '', '', '修改支付密码', '支付密码修改成功', ''); INSERT INTO `woo_model` (`id`, `model`, `cname`, `addon`, `full_table`, `order_type`, `tree_level`, `custom_data`, `list_config`, `business_list_config`, `suffix`, `pk`, `connection`, `is_import`, `is_business_import`, `parent_model`, `display`, `form_group`, `relation_link`, `admin_id`, `is_controller`, `is_business_controller`, `admin_tool_bar`, `business_tool_bar`, `admin_item_tool_bar`, `business_item_tool_bar`, `admin_siderbar`, `business_siderbar`, `admin_table_attrs`, `business_table_attrs`, `admin_item_checkbox`, `business_item_checkbox`, `admin_item_toolbar_options`, `business_item_toolbar_options`, `admin_counter`, `business_counter`, `admin_total_row`, `business_total_row`, `admin_is_remove_pk`, `business_is_remove_pk`, `admin_filter_model`, `business_filter_model`, `admin_list_with`, `business_list_with`, `admin_list_fields`, `business_list_fields`, `admin_list_filters`, `business_list_filters`, `admin_list_where`, `create_time`, `update_time`) VALUES (40, 'FormScene', '表单场景', '', '', 'desc', 0, '', 'create,batch_delete,modify,delete,detail', '', '', '', '', 0, 0, 'Model', 'title', '{\"basic\":\"基本信息\",\"tool\":\"按钮信息\",\"page\":\"页面信息\"}', '[{\"key\":\"Model\",\"foreign\":\"\",\"type\":\"belongsTo\",\"foreign_key\":\"\",\"more\":\"\"}]', 1, 1, 0, '', '', '', '', '', '', '', '', 'checkbox', 'checkbox', '[{\"is_show\":\"1\",\"title\":\"操作\",\"fixed\":\"right\",\"min_width\":\"0\",\"align\":\"center\",\"more\":\"\"}]', '[{\"is_show\":1,\"title\":\"操作\",\"fixed\":\"right\",\"min_width\":0,\"align\":\"center\"}]', '', '', '', '', 0, 0, '', '', '', '', '', '', '', '', '', 1673413093, 1676347877); INSERT INTO `woo_field` (`id`, `field`, `name`, `model_id`, `form`, `business_form`, `modify_form`, `business_modify_form`, `form_foreign`, `business_form_foreign`, `form_item_attrs`, `business_form_item_attrs`, `form_tag_attrs`, `business_form_tag_attrs`, `form_options`, `business_form_options`, `form_upload`, `business_form_upload`, `form_trigger`, `business_form_trigger`, `list`, `business_list`, `list_attrs`, `business_list_attrs`, `list_filter`, `business_list_filter`, `list_filter_attrs`, `business_list_filter_attrs`, `list_filter_tag_attrs`, `business_list_filter_tag_attrs`, `detail`, `business_detail`, `detail_attrs`, `business_detail_attrs`, `validate`, `business_validate`, `is_field`, `type`, `length`, `default`, `is_not_null`, `is_unsigned`, `is_ai`, `is_system`, `is_contribute`, `index`, `after`, `admin_id`, `list_order`, `create_time`, `update_time`) VALUES (464, 'id', 'ID', 40, 'hidden', 'hidden', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '[{\"rule\":\"\",\"args\":\"\",\"on\":\"0\",\"message\":\"\"}]', '', 1, 'INT', '10', 'none', 1, 1, 1, 1, 0, '', '', 1, 464, 1673413094, 1675173521), (465, 'model_id', '所属模型ID', 40, 'none', 'relation', '', '', 'Model', '', '', '', '', '', '', '', '', '', '', '', 'relation', '', '{\"width\":\"180\"}', '', 'relation', '', '', '', '', '', '', '', '', '', '', '[{\"rule\":\"gt\",\"args\":0,\"on\":0,\"message\":\"\"}]', 1, 'INT', '10', '0', 1, 1, 0, 1, 0, 'index', '', 1, 466, 1673413094, 1674544883), (466, 'title', '按钮标题', 40, 'text', 'text', '', '', '', '', '{\"form_group\":\"tool\"}', '', '', '', '', '', '', '', '', '', '', '', '', '', '1', '', '', '', '', '', '', '', '', '', '', '[{\"rule\":\"require\",\"args\":\"\",\"on\":0,\"message\":\"\"}]', 1, 'VARCHAR', '128', '', 1, 0, 0, 1, 0, '', '', 1, 469, 1673413094, 1676348075), (467, 'is_verify', '审核', 40, 'checker', 'checker', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'checker', 'checker', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 1, 'TINYINT', '1', '0', 1, 1, 0, 1, 0, 'index', '', 1, 473, 1673413094, 1673502117), (468, 'list_order', '排序权重', 40, 'number', 'number', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '{\"width\":\"110\"}', '', '', '', '', '', '', '', '', '', '', '', '', '', 1, 'INT', '11', '0', 1, 0, 0, 1, 0, 'index', '', 1, 10212, 1673413094, 1674396818), (469, 'create_time', '创建日期', 40, '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '{\"width\":\"146\"}', '{\"width\":\"146\"}', '', '', '', '', '', '', '', '', '', '', '', '', 1, 'INT', '10', '0', 1, 1, 0, 1, 0, '', '', 1, 10213, 1673413094, 1673502117), (470, 'update_time', '修改日期', 40, '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '{\"width\":\"146\"}', '{\"width\":\"146\"}', '', '', '', '', '', '', '', '', '', '', '', '', 1, 'INT', '10', '0', 1, 1, 0, 1, 0, '', '', 1, 10214, 1673413094, 1673502117), (471, 'icon', '图标', 40, 'icon', '', '', '', '', '', '{\"form_group\":\"tool\"}', '', '', '', '', '', '', '', '', '', '0', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 1, 'VARCHAR', '64', '', 1, 0, 0, 1, 0, '', '', 1, 477, 1674289438, 1676347930), (472, 'hover', 'hover名称', 40, 'text', '', '', '', '', '', '{\"form_group\":\"tool\"}', '', '', '', '', '', '', '', '', '', '0', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 1, 'VARCHAR', '64', '', 1, 0, 0, 1, 0, '', '', 1, 478, 1674289528, 1676347944), (473, 'where', '渲染条件', 40, 'text', '', '', '', '', '', '{\"form_group\":\"tool\"}', '', '', '', '', '', '', '', '', '', '0', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 1, 'VARCHAR', '256', '', 1, 0, 0, 1, 0, '', '', 1, 479, 1674289553, 1676347960), (474, 'action', '独立方法', 40, 'text', '', '', '', '', '', '{\"tip\":\"独立方法需自行编码\",\"filter\":\"trim\"}', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 1, 'VARCHAR', '64', '', 1, 0, 0, 1, 0, '', '', 1, 470, 1674392091, 1676300968), (475, 'where_type', '条件方式', 40, 'select', '', '', '', '', '', '{\"form_group\":\"tool\"}', '', '', '', '{\"disabled\":\"禁用\",\"hidden\":\"隐藏\"}', '', '', '', '', '', '0', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 1, 'VARCHAR', '64', '', 1, 0, 0, 1, 0, '', '', 1, 480, 1674392254, 1676347977), (476, 'is_btn', '列表按钮', 40, 'checker', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'checker', '', '{\"width\":\"120\"}', '', '', '', '', '', '', '', '', '', '', '', '', '', 1, 'TINYINT', '1', '0', 1, 1, 0, 1, 0, '', '', 1, 474, 1674395377, 1674396694), (477, 'var', '标识符', 40, 'text', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '{\"width\":\"140\"}', '', '1', '', '', '', '', '', '', '', '', '', '[{\"rule\":\"require\",\"args\":\"\",\"on\":\"0\",\"message\":\"\"},{\"rule\":\"unique\",\"args\":\"form_scene,model_id^var\",\"on\":\"0\",\"message\":\"\"}]', '', 1, 'CHAR', '32', '', 1, 0, 0, 1, 0, '', '', 1, 465, 1674395518, 1676380503), (478, 'fields', '表单字段', 40, 'multiattrs', '', '', '', '', '', '{\"message\":\"建议字段的具体信息都在\\\"字段管理\\\"中设置,这里只选择当前场景需要的字段即可\"}', '', '', '', '', '', '', '', '', '', '0', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 1, 'TEXT', '', 'none', 1, 0, 0, 1, 0, '', '', 1, 475, 1674395850, 1676298143), (479, 'parent', '父标识', 40, 'text', '', '', '', '', '', '{\"tip\":\"列表下拉工具按钮时需要\",\"form_group\":\"tool\"}', '', '', '', '', '', '', '', '', '', '0', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 1, 'CHAR', '32', '', 1, 0, 0, 1, 0, '', '', 1, 481, 1674396185, 1676347995), (481, 'app', '可用应用', 40, 'checkbox', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '[{\"rule\":\"\",\"args\":\"\",\"on\":\"edit\",\"message\":\"\"},{\"rule\":\"\",\"args\":\"\",\"on\":\"\",\"message\":\"\"}]', '', 1, 'VARCHAR', '64', '', 1, 0, 0, 1, 0, '', '', 1, 471, 1674564737, 1674565770), (484, 'attrs', '标签属性', 40, 'keyvalue', '', '', '', '', '', '{\"form_group\":\"tool\"}', '', '', '', '', '', '', '', '', '', '0', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 1, 'VARCHAR', '512', '', 1, 0, 0, 1, 0, '', '', 1, 484, 1676020514, 1676348784), (500, 'class', '类名', 40, 'text', '', '', '', '', '', '{\"form_group\":\"tool\"}', '', '{\"placeholder\":\"标签class类名\"}', '', '', '', '', '', '', '', '0', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 1, 'VARCHAR', '64', '', 1, 0, 0, 1, 0, '', '', 1, 476, 1676301142, 1676347919), (501, 'page_title', '网页标题', 40, 'text', '', '', '', '', '', '{\"form_group\":\"page\"}', '', '', '', '', '', '', '', '', '', '', '', '{\"width\":\"150\"}', '', '1', '', '', '', '', '', '', '', '', '', '', '', 1, 'VARCHAR', '64', '', 1, 0, 0, 1, 0, '', '', 1, 467, 1676348443, 1676425685), (502, 'success_message', '成功提示', 40, 'text', '', '', '', '', '', '{\"form_group\":\"page\"}', '', '', '', '', '', '', '', '', '', '0', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 1, 'VARCHAR', '64', '', 1, 0, 0, 1, 0, '', '', 1, 468, 1676348537, 1676425687), (503, 'page_tip', '头部提示', 40, 'textarea', '', '', '', '', '', '{\"form_group\":\"page\"}', '', '', '', '', '', '', '', '', '', '0', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 1, 'VARCHAR', '256', '', 1, 0, 0, 1, 0, '', '', 1, 500, 1676349810, 1676349902); ~~~ ![](https://img.kancloud.cn/ae/9b/ae9b9f71d761b671793bc37cf84beaa2_830x383.png) 自己去把Admin、User模型的密码字段修改时屏蔽了,这样修改就没有密码了;点击模型生成,密码有单独修改表单。 ![](https://img.kancloud.cn/6e/63/6e63d49ea5450235c4d40e113199f049_1243x233.png) 13、其他应用和插件没有单独更新功能,主要是兼容php8.2的更新,cms应用栏目授权有报错,business也最好升级下;这些升级方式都是把应用或插件install下的目录替换到项目的对应目录。 14、新增public/static/charts1目录 15、替换public/staic/layui目录,layui升级到最新了 16、可删除`AdminMenu`模型(不要这个模型了)、删除所有`AdminMenu名`文件(自己搜索了,非必须操作);可删除`PowerTree`模型(不要这个模型了)、删除所有`PowerTree`文件(自己搜索了,非必须操作) 17、删除系统设置中`table_display_color`项(非必须) ## 2.2.9升级到2.2.10 升级前请先备份原项目文件,升级前请先备份原项目文件,升级前请先备份原项目文件 1、替换/woo目录 2、替换/public/static/woo目录 3、自行在模型`AdminGroup`角色模型的`data_allow`字段的下拉选项添加`5 => 所在顶级部门及以下数据权限` ![](https://img.kancloud.cn/94/3e/943e504b41f541cb0e6d12e14758a867_541x322.png) ## 2.2.8升级到2.2.9 升级前请先备份原项目文件,升级前请先备份原项目文件,升级前请先备份原项目文件 1、替换/woo目录 2、替换/public/static/woo目录 3、ThinkPHP等依赖需自行composer update升级,升级以后请参考[https://www.kancloud.cn/laowu199/e_dev/1957961](https://www.kancloud.cn/laowu199/e_dev/1957961)修改部分源码; composer update之前一定要备份原有项目,有概率因为你的镜像源问题导致升级以后出现问题。如果TP核心升级都6.1.0版本以后需单独安装`think-filesystem`不然将无法正常上传,安装命令:`composer require topthink/think-filesystem` ## 2.2.7升级到2.2.8 升级前请先备份原项目文件,升级前请先备份原项目文件,升级前请先备份原项目文件 1、替换/woo目录 2、替换/public/static/woo目录 3、替换/public/static/layui目录(升级到2.7.6) ## 2.2.6升级到2.2.7 升级前请先备份原项目文件,升级前请先备份原项目文件,升级前请先备份原项目文件 1、替换/woo目录 2、替换/public/static/layui目录(升级到2.7.5) ## 2.2.5升级到2.2.6 升级前请先备份原项目文件,升级前请先备份原项目文件,升级前请先备份原项目文件 1、替换/woo目录 2、替换/public/static/woo目录 3、thinkphp可升级到6.0.13版本(如需,自行`composer update`),如有更新需[https://www.kancloud.cn/laowu199/e_dev/1957961](https://www.kancloud.cn/laowu199/e_dev/1957961) 修改部分源码 ## 2.2.4升级到2.2.5 升级前请先备份原项目文件,升级前请先备份原项目文件,升级前请先备份原项目文件 1、替换/woo目录 2、替换/public/static/layui目录(升级到2.7.4) ## 2.2.3升级到2.2.4 升级前请先备份原项目文件,升级前请先备份原项目文件,升级前请先备份原项目文件 1、替换/woo目录 2、替换/public/static/woo目录 3、替换/public/static/layui目录(升级到2.7.3) ## 2.2.2升级到2.2.3 升级前请先备份原项目文件,升级前请先备份原项目文件,升级前请先备份原项目文件 1、替换/woo目录 2、替换/public/static/woo目录 ## 2.2.1升级到2.2.2 升级前请先备份原项目文件,升级前请先备份原项目文件,升级前请先备份原项目文件 1、替换/woo目录 2、替换/public/static/woo目录 3、替换/public/static/layui目录(升级到2.6.13) ## 2.2.0升级到2.2.1 升级前请先备份原项目文件,升级前请先备份原项目文件,升级前请先备份原项目文件 1、替换/woo目录 ## 2.1.7升级到2.2.0 升级前请先备份原项目文件,升级前请先备份原项目文件,升级前请先备份原项目文件(这个版本跨度太大,改动太多,升级请慎重,一定要备份好) 1、替换/woo目录 2、替换/public/static/woo目录 3、替换/config/wooauth.php文件 (最后一个新增一个中台菜单权限的配置,可以去看下配置注释了解情况) 4、替换/config/app.php文件 5、替换/public/static/layui目录(layui升级到2.6.10,升级有兼容问题,改了很多文件,所有升级之前一定要把原项目备份好,有些插件或应用估计我都有没有改完的地方,只有发现了再调整了) 6、替换\vendor\topthink\think-trace\src\Html.php文件 7、替换addons\ueditor目录 执行SQL: ~~~ ALTER TABLE `woo_model` ADD `business_tool_bar` TEXT NULL AFTER `admin_tool_bar`; ALTER TABLE `woo_model` ADD `business_item_tool_bar` TEXT NULL AFTER `admin_item_tool_bar`; ALTER TABLE `woo_model` ADD `business_siderbar` TEXT NULL AFTER `admin_siderbar`; ALTER TABLE `woo_model` ADD `business_table_attrs` TEXT NULL AFTER `admin_table_attrs`; ALTER TABLE `woo_model` ADD `business_item_checkbox` VARCHAR(64) NOT NULL DEFAULT '' AFTER `admin_item_checkbox`; ALTER TABLE `woo_model` ADD `business_is_remove_pk` TINYINT UNSIGNED NOT NULL DEFAULT '0' AFTER `admin_is_remove_pk`; ALTER TABLE `woo_model` ADD `business_filter_model` VARCHAR(64) NOT NULL DEFAULT '' AFTER `admin_filter_model`; ALTER TABLE `woo_model` ADD `business_item_toolbar_options` TEXT NULL AFTER `admin_item_toolbar_options`; ALTER TABLE `woo_model` ADD `business_counter` TEXT NULL AFTER `admin_counter`; ALTER TABLE `woo_model` ADD `business_total_row` TEXT NULL AFTER `admin_total_row`; ALTER TABLE `woo_model` ADD `business_list_with` TEXT NULL AFTER `admin_list_with`; ALTER TABLE `woo_model` ADD `business_list_fields` TEXT NULL AFTER `admin_list_fields`; ALTER TABLE `woo_model` ADD `business_list_filters` TEXT NULL AFTER `admin_list_filters`; ALTER TABLE `woo_model` ADD `business_list_config` VARCHAR(256) NOT NULL DEFAULT '' AFTER `list_config`; ALTER TABLE `woo_model` ADD `is_business_import` TINYINT(1) NOT NULL DEFAULT '0' AFTER `is_import`; ALTER TABLE `woo_model` ADD `is_business_controller` TINYINT(1) NOT NULL DEFAULT '0' AFTER `is_controller`; ALTER TABLE `woo_field` ADD `business_form` VARCHAR(128) NOT NULL DEFAULT '' AFTER `form`; ALTER TABLE `woo_field` ADD `business_modify_form` VARCHAR(128) NOT NULL DEFAULT '' AFTER `modify_form`; ALTER TABLE `woo_field` ADD `business_form_options` TEXT NULL AFTER `form_options`; ALTER TABLE `woo_field` ADD `business_form_foreign` VARCHAR(64) NOT NULL DEFAULT '' AFTER `form_foreign`; ALTER TABLE `woo_field` ADD `business_form_item_attrs` TEXT NULL AFTER `form_item_attrs`; ALTER TABLE `woo_field` ADD `business_form_tag_attrs` TEXT NULL AFTER `form_tag_attrs`; ALTER TABLE `woo_field` ADD `business_form_upload` TEXT NULL AFTER `form_upload`; ALTER TABLE `woo_field` ADD `business_form_trigger` TEXT NULL AFTER `form_trigger`; ALTER TABLE `woo_field` ADD `business_list` VARCHAR(128) NOT NULL DEFAULT '' AFTER `list`; ALTER TABLE `woo_field` ADD `business_list_attrs` TEXT NULL AFTER `list_attrs`; ALTER TABLE `woo_field` ADD `business_list_filter` VARCHAR(128) NOT NULL DEFAULT '' AFTER `list_filter`; ALTER TABLE `woo_field` ADD `business_list_filter_attrs` VARCHAR(512) NOT NULL DEFAULT '' AFTER `list_filter_attrs`; ALTER TABLE `woo_field` ADD `business_list_filter_tag_attrs` VARCHAR(512) NOT NULL DEFAULT '' AFTER `list_filter_tag_attrs`; ALTER TABLE `woo_field` ADD `business_detail` VARCHAR(128) NOT NULL DEFAULT '' AFTER `detail`; ALTER TABLE `woo_field` ADD `business_detail_attrs` VARCHAR(512) NOT NULL DEFAULT '' AFTER `detail_attrs`; ALTER TABLE `woo_field` ADD `business_validate` TEXT NULL AFTER `validate`; ALTER TABLE `woo_attachement` ADD `business_member_id` INT NOT NULL DEFAULT '0' AFTER `user_id`; ALTER TABLE `woo_attachement` ADD `business_id` INT UNSIGNED NOT NULL DEFAULT '0' AFTER `business_member_id`; ALTER TABLE `woo_log` ADD `business_member_id` INT UNSIGNED NOT NULL DEFAULT '0' AFTER `admin_id`; ALTER TABLE `woo_log` ADD `business_id` INT UNSIGNED NOT NULL DEFAULT '0' AFTER `business_member_id`; ALTER TABLE `woo_log` ADD `appname` CHAR(16) NOT NULL DEFAULT '' AFTER `id`; ALTER TABLE `woo_import` ADD `business_id` INT UNSIGNED NOT NULL DEFAULT '0' AFTER `admin_id`; ALTER TABLE `woo_import` ADD `business_member_id` INT UNSIGNED NOT NULL DEFAULT '0' AFTER `business_id`; ALTER TABLE `woo_antispam` ADD `business_id` INT UNSIGNED NOT NULL DEFAULT '0' AFTER `admin_id`; ALTER TABLE `woo_antispam` ADD `business_member_id` INT UNSIGNED NOT NULL DEFAULT '0' AFTER `business_id`; ALTER TABLE `woo_request_log` ADD `business_member_id` INT NOT NULL DEFAULT '0' COMMENT '商家会员ID' AFTER `user_id`; INSERT INTO `woo_field` (`id`, `field`, `name`, `model_id`, `form`, `business_form`, `modify_form`, `business_modify_form`, `form_foreign`, `business_form_foreign`, `form_item_attrs`, `business_form_item_attrs`, `form_tag_attrs`, `business_form_tag_attrs`, `form_options`, `business_form_options`, `form_upload`, `business_form_upload`, `form_trigger`, `business_form_trigger`, `list`, `business_list`, `list_attrs`, `business_list_attrs`, `list_filter`, `business_list_filter`, `list_filter_attrs`, `business_list_filter_attrs`, `list_filter_tag_attrs`, `business_list_filter_tag_attrs`, `detail`, `business_detail`, `detail_attrs`, `business_detail_attrs`, `validate`, `business_validate`, `is_field`, `type`, `length`, `default`, `is_not_null`, `is_unsigned`, `is_ai`, `is_system`, `is_contribute`, `index`, `after`, `admin_id`, `list_order`, `create_time`, `update_time`) VALUES (NULL, 'business_member_id', '商家会员ID', 13, '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '0', '0', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 1, 'INT', '11', '0', 1, 1, 0, 0, 0, '', '', 1, 129, 1652327125, 1652327737), (NULL, 'business_id', '商家ID', 13, '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '0', '0', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 1, 'INT', '10', '0', 1, 1, 0, 0, 0, '', '', 1, 128, 1652327125, 1652327749), (NULL, 'business_member_id', '商家会员ID', 9, 'none', 'none', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '0', '0', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 1, 'INT', '10', '0', 1, 1, 0, 1, 0, '', '', 1, 10138, 1652338385, 1652338914), (NULL, 'business_id', '商家ID', 9, 'none', 'none', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '0', '0', '', '', '', '', '', '', '', '', '', '0', '', '', '', '', 1, 'INT', '10', '0', 1, 1, 0, 1, 0, '', '', 1, 10139, 1652338385, 1652340465), (NULL, 'appname', '应用名', 9, 'none', 'none', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '0', '0', '', '', '', '', '', '', '', '', '', '0', '', '', '', '', 1, 'CHAR', '16', '', 1, 0, 0, 1, 0, '', '', 1, 10140, 1652338861, 1652340474), (NULL, 'business_id', '商家ID', 26, 'none', 'none', '', '', 'Business', 'Business', '', '', '', '', '', '', '', '', '', '', '0', '0', '', '', '', '', '', '', '', '', '', '0', '', '', '', '', 1, 'INT', '', '0', 1, 0, 0, 1, 0, '', '', 1, 304, 1652673222, 1652673672), (NULL, 'business_member_id', '商家会员ID', 26, 'none', 'none', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '0', '0', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 1, 'VARCHAR', '64', '', 1, 0, 0, 1, 0, '', '', 1, 305, 1652673277, 1652673340), (NULL, 'business_id', '商家ID', 31, 'none', 'none', '', '', 'Business', 'Business', '', '', '', '', '', '', '', '', '', '', '0', '0', '', '', '', '', '', '', '', '', '0', '0', '', '', '', '', 1, 'INT', '', '0', 1, 0, 0, 1, 0, '', '', 1, 10206, 1652679542, 1652679542), (NULL, 'business_member_id', '商家会员ID', 31, 'none', 'none', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '0', '0', '', '', '', '', '', '', '', '', '0', '0', '', '', '', '', 1, 'VARCHAR', '64', '', 1, 0, 0, 1, 0, '', '', 1, 10207, 1652679574, 1652679574); ~~~ ## 2.1.6升级到2.1.7 升级前请先备份原项目文件,升级前请先备份原项目文件,升级前请先备份原项目文件 1、替换/woo目录 2、替换/public/static/woo目录 3、新增/public/static/js/touch-0.2.14.min.js文件 执行SQL: ~~~ ALTER TABLE `woo_model` ADD `admin_total_row` VARCHAR(1024) NOT NULL DEFAULT '' AFTER `admin_counter`; INSERT INTO `woo_setting` (`id`, `title`, `setting_group_id`, `var`, `value`, `type`, `options`, `tip`, `list_order`, `admin_id`, `is_js_var`, `create_time`, `update_time`, `delete_time`) VALUES (NULL, '主页Tab最大数', 2, 'admin_tab_max', '20', 'number', '', '', 53, 1, 0, 1646912047, 1646912246, 0); ~~~ ## 2.1.5升级到2.1.6 升级前请先备份原项目文件,升级前请先备份原项目文件,升级前请先备份原项目文件 1、替换/woo目录 2、替换/public/static/woo目录 3、替换/config/cache.php文件(必须) 执行SQL: ~~~ ALTER TABLE `woo_model` ADD `admin_list_with` VARCHAR(512) NOT NULL DEFAULT '' AFTER `admin_filter_model`; ALTER TABLE `woo_model` ADD `admin_list_fields` VARCHAR(1024) NOT NULL DEFAULT '' AFTER `admin_list_with`; ALTER TABLE `woo_model` ADD `admin_list_filters` VARCHAR(1024) NOT NULL DEFAULT '' AFTER `admin_list_fields`; ALTER TABLE `woo_model` ADD `admin_list_where` VARCHAR(1024) NOT NULL DEFAULT '' AFTER `admin_list_filters`; ~~~ ## 2.1.4升级到2.1.5 升级前请先备份原项目文件,升级前请先备份原项目文件,升级前请先备份原项目文件 1、替换/woo目录 2、替换/public/static/woo目录 3、修改/config/trace.php文件 4、替换/vendor/topthink/think-trace/src/Html.php 在建项目:以下更新可以不更新,仅仅是增加了一张测试产品表一个菜单;你可以直接看代码或者操作官方演示。 5、手动在后台菜单中录入“调拨单录入”,控制器demo,方法order,父栏目选择“示例->表单示例” ~~~ INSERT INTO `woo_model` (`id`, `model`, `cname`, `addon`, `full_table`, `order_type`, `tree_level`, `custom_data`, `list_config`, `suffix`, `pk`, `connection`, `is_import`, `parent_model`, `display`, `form_group`, `relation_link`, `admin_id`, `is_controller`, `admin_tool_bar`, `admin_item_tool_bar`, `admin_siderbar`, `admin_table_attrs`, `admin_item_checkbox`, `admin_item_toolbar_options`, `admin_counter`, `admin_is_remove_pk`, `admin_filter_model`, `create_time`, `update_time`) VALUES (36, 'TestProduct', '测试产品', '', '', '', 0, '', 'create,batch_delete,modify,delete,detail', '', '', '', 0, '', 'title', '', '', 1, 1, '', '', '', '', 'checkbox', '[{\"is_show\":\"1\",\"title\":\"操作\",\"fixed\":\"right\",\"min_width\":\"0\",\"align\":\"center\",\"more\":\"\"}]', '', 0, '', 1638498696, 1638498696); INSERT INTO `woo_field` (`id`, `field`, `name`, `model_id`, `form`, `modify_form`, `form_foreign`, `form_item_attrs`, `form_tag_attrs`, `form_options`, `form_upload`, `form_trigger`, `list`, `list_attrs`, `list_filter`, `list_filter_attrs`, `list_filter_tag_attrs`, `detail`, `detail_attrs`, `validate`, `is_field`, `type`, `length`, `default`, `is_not_null`, `is_unsigned`, `is_ai`, `is_system`, `is_contribute`, `index`, `after`, `admin_id`, `list_order`, `create_time`, `update_time`) VALUES (404, 'id', 'ID', 36, 'hidden', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 1, 'INT', '10', 'none', 1, 1, 1, 1, 0, '', '', 1, 451, 1638498696, 1638498696), (405, 'title', '标题', 36, 'text', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '[{\"rule\":\"require\",\"args\":\"\",\"on\":\"0\",\"message\":\"\"}]', 1, 'VARCHAR', '128', '', 1, 0, 0, 1, 0, '', '', 1, 453, 1638498696, 1638498696), (406, 'is_verify', '审核', 36, 'checker', '', '', '', '', '', '', '', 'checker', '', '', '', '', '', '', '', 1, 'TINYINT', '1', '0', 1, 1, 0, 1, 0, 'index', '', 1, 457, 1638498696, 1638498696), (407, 'image', '图片', 36, 'image', '', '', '', '', '', '', '', 'file', '', '', '', '', '', '', '', 1, 'VARCHAR', '128', '', 1, 0, 0, 1, 0, '', '', 1, 458, 1638498696, 1638498696), (408, 'list_order', '排序权重', 36, 'number', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 1, 'INT', '11', '0', 1, 0, 0, 1, 0, 'index', '', 1, 459, 1638498696, 1638498696), (409, 'create_time', '创建日期', 36, '', '', '', '', '', '', '', '', '', '{\"width\":\"144\"}', '', '', '', '', '', '', 1, 'INT', '10', '0', 1, 1, 0, 1, 0, '', '', 1, 460, 1638498696, 1638498696), (410, 'update_time', '修改日期', 36, '', '', '', '', '', '', '', '', '', '{\"width\":\"144\"}', '', '', '', '', '', '', 1, 'INT', '10', '0', 1, 1, 0, 1, 0, '', '', 1, 461, 1638498696, 1638498696), (411, 'number', '产品编号', 36, 'text', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '[{\"rule\":\"require\",\"args\":\"\",\"on\":\"\",\"message\":\"\"}]', 1, 'VARCHAR', '64', '', 1, 0, 0, 0, 0, '', '', 1, 452, 1638498722, 1638498722), (412, 'price', '成本价', 36, 'text', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 1, 'DECIMAL', '10,2', '0', 1, 0, 0, 0, 0, '', '', 1, 455, 1638498772, 1638498772), (413, 'sell_price', '销售价', 36, 'text', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 1, 'DECIMAL', '10,2', '0', 1, 0, 0, 0, 0, '', '', 1, 456, 1638498801, 1638498801), (414, 'unit', '单位', 36, 'text', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 1, 'VARCHAR', '64', '', 1, 0, 0, 0, 0, '', '', 1, 454, 1638498854, 1638498854); CREATE TABLE IF NOT EXISTS `woo_test_product` ( `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'ID', `title` varchar(128) NOT NULL DEFAULT '' COMMENT '标题', `is_verify` tinyint(1) UNSIGNED NOT NULL DEFAULT '0' COMMENT '是否审核', `image` varchar(128) NOT NULL DEFAULT '' COMMENT '图片', `list_order` int(11) NOT NULL DEFAULT '0' COMMENT '排序权重', `create_time` int(10) UNSIGNED NOT NULL DEFAULT '0' COMMENT '创建日期', `update_time` int(10) UNSIGNED NOT NULL DEFAULT '0' COMMENT '修改日期', `number` varchar(64) NOT NULL DEFAULT '' COMMENT '产品编号', `price` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '成本价', `sell_price` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '销售价', `unit` varchar(64) NOT NULL DEFAULT '' COMMENT '单位', PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='测试产品' AUTO_INCREMENT=5 ; INSERT INTO `woo_test_product` (`id`, `title`, `is_verify`, `image`, `list_order`, `create_time`, `update_time`, `number`, `price`, `sell_price`, `unit`) VALUES (1, '测试产品一', 1, '', 1, 1638498920, 1638498920, '10001', '88.00', '188.00', '公斤'), (2, '测试产品二', 1, '', 2, 1638498944, 1638498944, '10002', '48.00', '88.00', '克'), (3, '测试产品三', 1, '', 3, 1638498971, 1638498971, '10003', '12.00', '28.00', '只'), (4, '测试产品四', 1, '', 4, 1638498998, 1638513715, '10004', '10.00', '18.88', '把'); ~~~ ## 2.1.3升级到 2.1.4 升级前请先备份原项目文件,升级前请先备份原项目文件,升级前请先备份原项目文件 1、替换/woo目录 2、替换/public/static/woo目录 3、新增/addons/ueditor插件,并自行在后台安装 ## 2.1.2升级到 2.1.3 升级前请先备份原项目文件,升级前请先备份原项目文件,升级前请先备份原项目文件 1、替换/woo目录 2、替换/public/static/woo目录 3、修改/config/woo.php文件 4、替换/vendor/topthink/think-trace/src/Html.php ~~~ ALTER TABLE `woo_field` ADD `modify_form` VARCHAR(128) NOT NULL DEFAULT '' AFTER `form`; INSERT INTO `woo_setting` (`id`, `title`, `setting_group_id`, `var`, `value`, `type`, `options`, `tip`, `list_order`, `admin_id`, `is_js_var`, `create_time`, `update_time`, `delete_time`) VALUES (NULL, '缓存列表页码数', 5, 'do_is_store_page', '0', 'checker', '', '当无搜索情况下才会记录', 52, 1, 1, 1635610130, 1635610795, 0); // 当前项目不安装unicms应用,就不用执行下面sql了 DROP TABLE IF EXISTS `woo_user_menu`; CREATE TABLE IF NOT EXISTS `woo_user_menu` ( `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'ID', `parent_id` int(10) UNSIGNED NOT NULL DEFAULT '0' COMMENT '父级ID', `title` varchar(128) NOT NULL DEFAULT '' COMMENT '菜单标题', `url` varchar(128) NOT NULL DEFAULT '' COMMENT '规则', `icon` varchar(32) NOT NULL DEFAULT '' COMMENT '图标', `args` varchar(512) NOT NULL DEFAULT '' COMMENT '参数', `is_nav` tinyint(1) UNSIGNED NOT NULL DEFAULT '0' COMMENT '是否菜单', `list_order` int(11) NOT NULL DEFAULT '0' COMMENT '排序权重', `remark` text NOT NULL COMMENT '备注', `admin_id` int(10) UNSIGNED NOT NULL DEFAULT '0' COMMENT '管理员ID', `family` varchar(256) NOT NULL DEFAULT '' COMMENT '家族', `level` smallint(5) UNSIGNED NOT NULL DEFAULT '0' COMMENT '层级', `children_count` smallint(5) UNSIGNED NOT NULL DEFAULT '0' COMMENT '下级数', `create_time` int(10) UNSIGNED NOT NULL DEFAULT '0' COMMENT '创建日期', `update_time` int(10) UNSIGNED NOT NULL DEFAULT '0' COMMENT '修改日期', `is_uni` tinyint(1) UNSIGNED NOT NULL DEFAULT '0' COMMENT '移动端栏目', `uni_route_type` varchar(64) NOT NULL DEFAULT '' COMMENT '跳转方式', `uni_route` varchar(64) NOT NULL DEFAULT '' COMMENT '跳转路由', `uni_icon` varchar(64) NOT NULL DEFAULT '' COMMENT '字体图标', `uni_icon_image` varchar(128) NOT NULL DEFAULT '' COMMENT '图片图标', `uni_click_func` varchar(64) NOT NULL DEFAULT '' COMMENT '点击回调', `is_uni_index` tinyint(1) UNSIGNED NOT NULL DEFAULT '0' COMMENT '快捷显示', PRIMARY KEY (`id`), KEY `parent_id` (`parent_id`), KEY `list_order` (`list_order`), KEY `admin_id` (`admin_id`), KEY `is_nav` (`is_nav`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='会员菜单' AUTO_INCREMENT=27 ; INSERT INTO `woo_user_menu` (`id`, `parent_id`, `title`, `url`, `icon`, `args`, `is_nav`, `list_order`, `remark`, `admin_id`, `family`, `level`, `children_count`, `create_time`, `update_time`, `is_uni`, `uni_route_type`, `uni_route`, `uni_icon`, `uni_icon_image`, `uni_click_func`, `is_uni_index`) VALUES (1, 0, '个人设置', '', '', '', 1, 1, '', 1, ',1,', 1, 5, 1636597233, 1636597233, 1, '', '', '', '', '', 0), (2, 1, '个人主页', 'user.index/index', 'layui-icon-home', '[]', 1, 2, '', 1, ',1,2,', 2, 0, 1636597233, 1636597233, 0, '', '', '', '/uploads/user_menu/20210716/bde0f2c55338ee7996a08c3a25ebafb5.png', '', 0), (3, 1, '个人资料', 'user.user/info', 'layui-icon-username', '', 1, 3, '', 1, ',1,3,', 2, 0, 1636597233, 1636599698, 1, 'navigateAuth', '/pages/user/info/info', 'man-add-fill', '/uploads/file/20211111/cc2ad0eefba2650480f507514289b584.png', '', 1), (4, 1, '安全中心', 'user.user/safe', 'layui-icon-auz', '', 1, 4, '', 1, ',1,4,', 2, 8, 1636597233, 1636599789, 1, 'navigateAuth', '/pages/user/safe/safe', '', '/uploads/file/20211111/eec144c1d13e34a209f022401dc4618e.png', 'safe', 1), (5, 0, '内容管理', '', '', '', 1, 5, '', 1, ',5,', 1, 4, 1636597233, 1636597233, 1, '', '', '', '', '', 0), (6, 5, '投稿管理', 'user.document/index', 'layui-icon-template-1', '', 1, 6, '', 1, ',5,6,', 2, 0, 1636597233, 1636597233, 0, '', '', '', '', '', 0), (7, 5, '我要投稿', 'user.document/create', 'layui-icon-add-circle-fine', '', 1, 7, '', 1, ',5,7,', 2, 0, 1636597233, 1636597233, 0, '', '', '', '', '', 0), (8, 5, '评论管理', 'user.comment/index', 'layui-icon-survey', '', 1, 8, '', 1, ',5,8,', 2, 0, 1636597233, 1636599651, 1, 'navigateAuth', '/pages/user/comment/comment', '', '/uploads/file/20211111/733aa95825bac85bf0e8b97726cfc6e6.png', 'comment', 1), (9, 0, '账户管理', '', '', '', 1, 9, '', 1, ',9,', 1, 3, 1636597233, 1636597233, 1, '', '', '', '', '', 0), (10, 9, '每日签到', 'user.sign/index', 'layui-icon-location', '', 1, 10, '', 1, ',9,10,', 2, 0, 1636597233, 1636599757, 1, 'navigateAuth', '/pages/user/sign/sign', '', '/uploads/file/20211111/dc854247db75a6272741003aca1b72ed.png', 'sign', 1), (11, 5, '我的关注', 'user.follow/index', 'layui-icon-heart', '', 1, 11, '', 1, ',5,11,', 2, 0, 1636597233, 1636597233, 1, 'navigateAuth', '/pages/user/follow/follow', '', '/uploads/file/20211110/d9bd2bd89c7007bc2798a84a9861aa37.png', 'follow', 1), (13, 1, '退出登录', 'user.user/logout', 'layui-icon-logout', '', 1, 23, '', 1, ',1,13,', 2, 0, 1636597233, 1636597233, 1, '', '', '', '/uploads/user_menu/20210716/5667ab69724c2543c0a563642a84d8af.png', 'logout', 0), (14, 4, '绑定手机', 'user.user/bindmobile', '', '', 0, 13, '', 1, ',1,4,14,', 3, 0, 1636597233, 1636597233, 0, '', '', '', '/uploads/user/20210715/e534f95bf5d9f3ca3b8cf57f2d59fed4.jpg', '', 0), (15, 4, '手机解绑', 'user.user/unbindmobile', '', '', 0, 14, '', 1, ',1,4,15,', 3, 0, 1636597233, 1636597233, 0, '', '', '', '', '', 0), (16, 4, '邮箱绑定', 'user.user/bindemail', '', '', 0, 15, '', 1, ',1,4,16,', 3, 0, 1636597233, 1636597233, 0, '', '', '', '', '', 0), (17, 4, '邮箱解绑', 'user.user/unbindemail', '', '', 0, 16, '', 1, ',1,4,17,', 3, 0, 1636597233, 1636597233, 0, '', '', '', '', '', 0), (18, 4, '修改密码', 'user.user/password', '', '', 0, 17, '', 1, ',1,4,18,', 3, 0, 1636597233, 1636597233, 0, '', '', '', '', '', 0), (19, 4, '支付密码', 'user.user/paypassword', '', '', 0, 18, '', 1, ',1,4,19,', 3, 0, 1636597233, 1636597233, 0, '', '', '', '', '', 0), (20, 4, '注销账号', 'user.user/cancel', '', '', 0, 19, '', 1, ',1,4,20,', 3, 0, 1636597233, 1636597233, 0, '', '', '', '', '', 0), (21, 4, '实名认证', 'user.user/cert', '', '', 0, 20, '', 1, ',1,4,21,', 3, 0, 1636597233, 1636597233, 0, '', '', '', '', '', 0), (22, 9, '登录日志', 'user.user_login/index', 'layui-icon-log', '', 1, 21, '', 1, ',9,22,', 2, 0, 1636597233, 1636597233, 1, 'navigateAuth', '/pages/user/user-login/user-login', '', '/uploads/file/20211110/82a0527f878c2e4d78d74a5c9157f4df.png', 'userlogin', 1), (23, 9, '我的积分', 'user.user_score/index', 'layui-icon-diamond', '', 1, 22, '', 1, ',9,23,', 2, 0, 1636597233, 1636599807, 1, 'navigateAuth', '/pages/user/user-score/user-score', '', '/uploads/file/20211111/734d82e2823351af28dd8abd4011e8d8.png', 'userscore', 1), (24, 1, '账号绑定', 'user.user/bind', 'layui-icon-auz', '', 1, 12, '', 1, ',1,24,', 2, 0, 1636597233, 1636597233, 0, '', '', '', '', '', 0), (26, 0, '点击测试', '', '', '', 0, 24, '', 1, ',26,', 1, 0, 1636597233, 1636597233, 0, '', '', 'thumb-up', '/uploads/file/20211110/216b9decbb882c99e6f5e6acab00d1a5.png', 'testClick', 1); ~~~ ## 2.1.1升级到 2.1.2 升级前请先备份原项目文件,升级前请先备份原项目文件,升级前请先备份原项目文件 1、替换/woo目录 2、替换/public/static/woo目录 3、替换/app/admin/view/user目录 4、修改/congig/woo.php文件,实现后台设置控制trace开关 ~~~ 'is_trace' => setting('admin_is_trace'), ~~~ 5、修改SQL ~~~ ALTER TABLE `woo_model` ADD `admin_counter` VARCHAR(1024) NOT NULL DEFAULT '' AFTER `admin_item_toolbar_options`; ALTER TABLE `woo_model` ADD `admin_is_remove_pk` TINYINT UNSIGNED NOT NULL DEFAULT '0' AFTER `admin_counter`; ALTER TABLE `woo_model` ADD `admin_filter_model` VARCHAR(64) NOT NULL DEFAULT '' AFTER `admin_is_remove_pk`; ALTER TABLE `woo_model` CHANGE `full_table` `full_table` VARCHAR(128) NOT NULL DEFAULT ''; ALTER TABLE `woo_field` ADD `list_order` INT NOT NULL DEFAULT '0' AFTER `admin_id`; UPDATE `woo_field` SET `list_order`=`id`; INSERT INTO `woo_setting` (`id`, `title`, `setting_group_id`, `var`, `value`, `type`, `options`, `tip`, `list_order`, `admin_id`, `is_js_var`, `create_time`, `update_time`, `delete_time`) VALUES (NULL, '是否关闭Trace', 2, 'admin_is_trace', '1', 'checker', '', '', 50, 1, 0, 1631712652, 1631712688, 0), (NULL, '模型是否批量设置字段', 5, 'do_is_batch_edit_fields', '', 'checker', '', '', 51, 1, 0, 1635007067, 1635007067, 0); ~~~ ## 2.1.0 升级到 2.1.1 升级前请先备份原项目文件,升级前请先备份原项目文件,升级前请先备份原项目文件 1、替换/woo目录 3、修改SQL ~~~ ALTER TABLE `woo_model` ADD `admin_item_checkbox` VARCHAR(64) NOT NULL DEFAULT '' AFTER `admin_table_attrs`; ALTER TABLE `woo_model` ADD `admin_item_toolbar_options` VARCHAR(512) NOT NULL DEFAULT '' AFTER `admin_item_checkbox`; ~~~ ## 2.0.10 升级到 2.1.0 升级前请先备份原项目文件,升级前请先备份原项目文件,升级前请先备份原项目文件 1、替换/woo目录 2、替换/public/static/woo目录 3、替换app/admin/view/user目录 3、修改SQL ~~~ ALTER TABLE `woo_model` ADD `admin_tool_bar` TEXT NULL AFTER `is_controller`, ADD `admin_item_tool_bar` TEXT NULL AFTER `admin_tool_bar`; ALTER TABLE `woo_model` ADD `admin_siderbar` VARCHAR(512) NOT NULL DEFAULT '' AFTER `admin_item_tool_bar`, ADD `admin_table_attrs` VARCHAR(2048) NOT NULL DEFAULT '' AFTER `admin_siderbar`; ~~~ 4、把User模型的 birthday,address两个字段修改下: ![](https://img.kancloud.cn/7d/e1/7de17c97523f8ce43833853a139ccf6a_524x231.png) 否则新的自定义模板中可能会报错说属性不存在 ## 2.09 升级到 2.0.10 升级前请先备份原项目文件,升级前请先备份原项目文件,升级前请先备份原项目文件 1、替换/woo目录 2、替换/public/static/woo目录 3、替换/public/static/layui目录 ## 2.08 升级到 2.0.9 1、替换/woo目录 2、替换/public/static/woo目录 ``` ALTER TABLE `woo_user` ADD `register_type` varchar(64) NOT NULL DEFAULT '' COMMENT '注册方式'; ALTER TABLE `woo_user` ADD `is_allow_reset` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否允许初始化'; ALTER TABLE `woo_user_login` ADD `type` varchar(64) NOT NULL DEFAULT '' COMMENT '登录方式'; INSERT INTO `woo_field` (`id`, `field`, `name`, `model_id`, `form`, `form_foreign`, `form_item_attrs`, `form_tag_attrs`, `form_options`, `form_upload`, `form_trigger`, `list`, `list_attrs`, `list_filter`, `list_filter_attrs`, `list_filter_tag_attrs`, `detail`, `detail_attrs`, `validate`, `is_field`, `type`, `length`, `default`, `is_not_null`, `is_unsigned`, `is_ai`, `is_system`, `is_contribute`, `index`, `after`, `admin_id`, `create_time`, `update_time`) VALUES (NULL, 'register_type', '注册方式', 19, 'none', '', '', '', '{"wxmini":"微信小程序","univerify":"APP一键登录","gitee":"码云","wechat":"公众号","wechat2":"微信","weibo":"微博","qq":"QQ","":"账号输入"}', '', '', '', '', '', '', '', '', '', '', 1, 'VARCHAR', '64', '', 1, 0, 0, 1, 0, '', 'register_ip', 1, 1622171552, 1622171552), (NULL, 'is_allow_reset', '是否允许初始化', 19, 'none', '', '', '', '', '', '', '0', '', '', '', '', '', '', '', 1, 'TINYINT', '1', '0', 1, 1, 0, 1, 1, '', 'register_type', 1, 1622600566, 1622600566), (NULL, 'type', '登录方式', 29, 'none', '', '', '', '{"wxmini":"微信小程序","univerify":"APP一键登录","gitee":"码云","wechat":"公众号","wechat2":"微信","weibo":"微博","qq":"QQ","":"账号输入"}', '', '', '', '', '', '', '', '', '', '', 1, 'VARCHAR', '64', '', 1, 0, 0, 1, 0, '', 'is_success', 1, 1622172647, 1622778082); ``` ## 2.07 升级到 2.0.8 1、替换/woo目录 2、替换/public/static/woo目录 3、替换/public/static/tinymce目录 4、常规>系统配置中加一个配置项,用于高德地图 ![](https://img.kancloud.cn/6a/6f/6a6fbb195289d292fcb77bda5a415b66_638x451.png) ## 2.06升级到2.0.7 升级前请先备份原项目文件,升级前请先备份原项目文件,升级前请先备份原项目文件 1、替换/woo目录 2、替换/public/static/woo目录 3、替换/public/static/layui目录 4、移除`topthink/think-annotation`扩展(PHP8的原因),所以也不要用TP自动的注解功能(比如:注解路由、注解中间件、注解模型等): `composer remove topthink/think-annotation` 5、安装`doctrine/annotations`扩展(topthink/think-annotation其实也是基于它的,woo内部有大量使用注解,所以它以后是必须扩展包): `composer require doctrine/annotations` 6、替换/app/service.php文件 7、SQL执行,前缀请自行修改(把`woo_`替换为你的前缀): ``` ALTER TABLE `woo_admin_login` ADD `is_success` tinyint(1) UNSIGNED NOT NULL DEFAULT '0' COMMENT '是否成功'; ALTER TABLE `woo_user_login` ADD `is_success` tinyint(1) UNSIGNED NOT NULL DEFAULT '0' COMMENT '是否成功'; ALTER TABLE `woo_admin_menu` ADD `jianpin` varchar(64) NOT NULL DEFAULT '' COMMENT '简拼'; ALTER TABLE `woo_admin_menu` ADD `pinyin` varchar(64) NOT NULL DEFAULT '' COMMENT '拼音'; INSERT INTO `woo_field` (`id`, `field`, `name`, `model_id`, `form`, `form_foreign`, `form_item_attrs`, `form_tag_attrs`, `form_options`, `form_upload`, `form_trigger`, `list`, `list_attrs`, `list_filter`, `list_filter_attrs`, `list_filter_tag_attrs`, `detail`, `detail_attrs`, `validate`, `is_field`, `type`, `length`, `default`, `is_not_null`, `is_unsigned`, `is_ai`, `is_system`, `is_contribute`, `index`, `after`, `admin_id`, `create_time`, `update_time`) VALUES (NULL, 'jianpin', '简拼', 3, 'text', '', '{\"tip\":\"\不填写,由系统自动生成\"}', '', '', '', '', '0', '', '', '', '', '', '', '', 1, 'VARCHAR', '64', '', 1, 0, 0, 1, 0, '', 'list_order', 1, 1621346783, 1621346783), (NULL, 'pinyin', '拼音', 3, 'text', '', '{\"tip\":\"不填写,由系统自动生成\"}', '', '', '', '', '0', '', '', '', '', '', '', '', 1, 'VARCHAR', '64', '', 1, 0, 0, 0, 0, '', 'jianpin', 1, 1621346840, 1621346840), (NULL, 'is_success', '是否成功', 8, 'none', '', '', '', '', '', '', '0', '', '', '', '', '', '', '', 1, 'TINYINT', '1', '0', 1, 1, 0, 1, 0, '', 'summary', 1, 1620459967, 1620459967), (NULL, 'is_success', '是否成功', 29, 'none', '', '', '', '', '', '', '0', '', '', '', '', '', '', '', 1, 'TINYINT', '1', '0', 1, 1, 0, 0, 0, '', 'summary', 1, 1620459932, 1620459932); CREATE TABLE IF NOT EXISTS `woo_user_menu` ( `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'ID', `parent_id` int(10) UNSIGNED NOT NULL DEFAULT '0' COMMENT '父级ID', `title` varchar(128) NOT NULL DEFAULT '' COMMENT '菜单标题', `url` varchar(128) NOT NULL DEFAULT '' COMMENT '规则', `icon` varchar(32) NOT NULL DEFAULT '' COMMENT '图标', `args` varchar(512) NOT NULL DEFAULT '' COMMENT '参数', `is_nav` tinyint(1) UNSIGNED NOT NULL DEFAULT '0' COMMENT '是否菜单', `is_not_power` tinyint(1) UNSIGNED NOT NULL DEFAULT '0' COMMENT '不关心权限', `list_order` int(11) NOT NULL DEFAULT '0' COMMENT '排序权重', `remark` text NOT NULL COMMENT '备注', `admin_id` int(10) UNSIGNED NOT NULL DEFAULT '0' COMMENT '管理员ID', `family` varchar(256) NOT NULL DEFAULT '' COMMENT '家族', `level` smallint(5) UNSIGNED NOT NULL DEFAULT '0' COMMENT '层级', `children_count` smallint(5) UNSIGNED NOT NULL DEFAULT '0' COMMENT '下级数', `create_time` int(10) UNSIGNED NOT NULL DEFAULT '0' COMMENT '创建日期', `update_time` int(10) UNSIGNED NOT NULL DEFAULT '0' COMMENT '修改日期', PRIMARY KEY (`id`), KEY `parent_id` (`parent_id`), KEY `list_order` (`list_order`), KEY `admin_id` (`admin_id`), KEY `is_nav` (`is_nav`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='会员菜单' AUTO_INCREMENT=27 ; INSERT INTO `woo_user_menu` (`id`, `parent_id`, `title`, `url`, `icon`, `args`, `is_nav`, `is_not_power`, `list_order`, `remark`, `admin_id`, `family`, `level`, `children_count`, `create_time`, `update_time`) VALUES (1, 0, '个人设置', '', '', '', 1, 0, 1, '', 1, ',1,', 1, 4, 1618663669, 1618670292), (2, 1, '个人主页', 'user.index/index', 'layui-icon-home', '{}', 1, 0, 2, '', 1, ',1,2,', 2, 0, 1618663805, 1618672446), (3, 1, '个人资料', 'user.user/info', 'layui-icon-username', '', 1, 0, 3, '', 1, ',1,3,', 2, 0, 1618663883, 1618668063), (4, 1, '安全中心', 'user.user/safe', 'layui-icon-auz', '', 1, 0, 4, '', 1, ',1,4,', 2, 8, 1618663973, 1618843013), (5, 0, '内容管理', '', '', '', 1, 0, 5, '', 1, ',5,', 1, 4, 1618664043, 1618664049), (6, 5, '投稿管理', 'user.document/index', 'layui-icon-template-1', '', 1, 0, 6, '', 1, ',5,6,', 2, 1, 1618664097, 1618667446), (7, 5, '我要投稿', 'user.document/create', 'layui-icon-add-circle-fine', '', 1, 0, 7, '', 1, ',5,7,', 2, 0, 1618664129, 1618667441), (8, 5, '评论管理', 'user.comment/index', 'layui-icon-survey', '', 1, 0, 8, '', 1, ',5,8,', 2, 0, 1618664348, 1621343614), (9, 0, '账户管理', '', '', '', 1, 0, 9, '', 1, ',9,', 1, 5, 1618664659, 1618670283), (10, 9, '今日签到', 'user.sign/index', 'layui-icon-location', '', 1, 0, 10, '', 1, ',9,10,', 2, 0, 1618664714, 1618664714), (11, 5, '我的关注', 'user.follow/index', 'layui-icon-heart', '', 1, 0, 11, '', 1, ',5,11,', 2, 0, 1618664764, 1621515015), (13, 1, '退出登录', 'user.user/logout', 'layui-icon-logout', '', 1, 1, 12, '', 1, ',1,13,', 2, 0, 1618670224, 1621754274), (14, 4, '绑定手机', 'user.user/bindmobile', '', '', 0, 0, 13, '', 1, ',1,4,14,', 3, 0, 1618715046, 1621175850), (15, 4, '手机解绑', 'user.user/unbindmobile', '', '', 0, 0, 14, '', 1, ',1,4,15,', 3, 0, 1618738448, 1618738448), (16, 4, '邮箱绑定', 'user.user/bindemail', '', '', 0, 0, 15, '', 1, ',1,4,16,', 3, 0, 1618751770, 1618751770), (17, 4, '邮箱解绑', 'user.user/unbindemail', '', '', 0, 0, 16, '', 1, ',1,4,17,', 3, 0, 1618751800, 1618751800), (18, 4, '修改密码', 'user.user/password', '', '', 0, 0, 17, '', 1, ',1,4,18,', 3, 0, 1618752005, 1618753877), (19, 4, '支付密码', 'user.user/paypassword', '', '', 0, 0, 18, '', 1, ',1,4,19,', 3, 0, 1618752027, 1618753893), (20, 4, '注销账号', 'user.user/cancel', '', '', 0, 0, 19, '', 1, ',1,4,20,', 3, 0, 1618752042, 1618756332), (21, 4, '实名认证', 'user.user/cert', '', '', 0, 0, 20, '', 1, ',1,4,21,', 3, 0, 1618839339, 1618839339), (22, 9, '登录日志', 'user.user_login/index', 'layui-icon-log', '', 1, 0, 21, '', 1, ',9,22,', 2, 0, 1618844825, 1620560357), (23, 9, '我的积分', 'user.user_score/index', 'layui-icon-diamond', '', 1, 0, 22, '', 1, ',9,23,', 2, 0, 1621341354, 1621341454), (24, 6, '修改文档', 'user.document/modify', '', '', 0, 0, 23, '', 1, ',5,6,24,', 3, 0, 1621740903, 1621740903), (25, 9, '充值记录', 'user.recharge/index', 'layui-icon-rmb', '', 0, 0, 24, '', 1, ',9,25,', 2, 0, 1621741013, 1621767388), (26, 9, '收支记录', 'user.user_money/index', 'layui-icon-chart-screen', '', 0, 0, 25, '', 1, ',9,26,', 2, 0, 1621741057, 1621767394); CREATE TABLE IF NOT EXISTS `woo_denied` ( `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'ID', `model` varchar(64) NOT NULL DEFAULT '' COMMENT '登录模型', `username` varchar(64) NOT NULL DEFAULT '' COMMENT '用户名', `ip` varchar(32) NOT NULL DEFAULT '' COMMENT 'IP地址', `expire` int(11) NOT NULL DEFAULT '0' COMMENT '到期时间', `is_verify` tinyint(1) UNSIGNED NOT NULL DEFAULT '0' COMMENT '是否执行', `create_time` int(10) UNSIGNED NOT NULL DEFAULT '0' COMMENT '创建日期', `update_time` int(10) UNSIGNED NOT NULL DEFAULT '0' COMMENT '修改日期', PRIMARY KEY (`id`), KEY `username` (`username`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='禁止登录' AUTO_INCREMENT=1 ; CREATE TABLE IF NOT EXISTS `woo_sign` ( `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'ID', `user_id` int(10) UNSIGNED NOT NULL DEFAULT '0' COMMENT '会员ID', `date` date NOT NULL DEFAULT '2000-01-01' COMMENT '日期', `year` int(11) NOT NULL DEFAULT '0' COMMENT '年', `month` int(11) NOT NULL DEFAULT '0' COMMENT '月', `day` int(11) NOT NULL DEFAULT '0' COMMENT '日', `score` int(11) NOT NULL DEFAULT '0' COMMENT '获得积分', `continue` int(11) NOT NULL DEFAULT '0' COMMENT '连续天数', `time` char(32) NOT NULL DEFAULT '' COMMENT '签到时间', `create_time` int(10) UNSIGNED NOT NULL DEFAULT '0' COMMENT '创建日期', `update_time` int(10) UNSIGNED NOT NULL DEFAULT '0' COMMENT '修改日期', PRIMARY KEY (`id`), KEY `user_id` (`user_id`), KEY `date` (`date`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='签到'; CREATE TABLE IF NOT EXISTS `woo_user_power` ( `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'ID', `user_group_id` int(10) UNSIGNED NOT NULL DEFAULT '0' COMMENT '所属会员组ID', `content` mediumtext NOT NULL COMMENT '内容', `create_time` int(10) UNSIGNED NOT NULL DEFAULT '0' COMMENT '创建日期', `update_time` int(10) UNSIGNED NOT NULL DEFAULT '0' COMMENT '修改日期', PRIMARY KEY (`id`), KEY `user_group_id` (`user_group_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='会员权限' AUTO_INCREMENT=1 ; // 如果你的模型数据表添加不能用32,33,34,35你要手动修改下id 且后面的`woo_field`也要手动修改下对应的模型id: INSERT INTO `woo_model` (`id`, `model`, `cname`, `addon`, `full_table`, `order_type`, `tree_level`, `custom_data`, `list_config`, `suffix`, `pk`, `connection`, `is_import`, `parent_model`, `display`, `form_group`, `relation_link`, `admin_id`, `is_controller`, `create_time`, `update_time`) VALUES (32, 'UserMenu', '会员菜单', '', '', 'asc', 3, '', 'create,batch_delete,modify,delete,detail', '', '', '', 0, 'parent', 'title', '', '', 1, 1, 1618451718, 1618451718), (33, 'Denied', '禁止登录', '', '', '', 0, '', 'create,batch_delete,modify,delete,detail', '', '', '', 0, '', 'model', '', '', 1, 1, 1620462315, 1620470449), (34, 'Sign', '签到', '', '', '', 0, '', 'create,batch_delete,modify,delete,detail', '', '', '', 0, '', 'date', '', '[{\"key\":\"User\",\"foreign\":\"\",\"type\":\"belongsTo\",\"foreign_key\":\"\",\"more\":\"\"}]', 1, 1, 1621178505, 1621178505), (35, 'UserPower', '会员权限', '', '', '', 0, '', 'create,batch_delete,modify,delete,detail', '', '', '', 0, '', '', '', '[{\"key\":\"UserGroup\",\"foreign\":\"\",\"type\":\"belongsTo\",\"foreign_key\":\"\",\"more\":\"\"}]', 1, 1, 1621752372, 1621752372); INSERT INTO `woo_field` (`id`, `field`, `name`, `model_id`, `form`, `form_foreign`, `form_item_attrs`, `form_tag_attrs`, `form_options`, `form_upload`, `form_trigger`, `list`, `list_attrs`, `list_filter`, `list_filter_attrs`, `list_filter_tag_attrs`, `detail`, `detail_attrs`, `validate`, `is_field`, `type`, `length`, `default`, `is_not_null`, `is_unsigned`, `is_ai`, `is_system`, `is_contribute`, `index`, `after`, `admin_id`, `create_time`, `update_time`) VALUES (NULL, 'id', 'ID', 32, 'hidden', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 1, 'INT', '10', 'none', 1, 1, 1, 1, 0, '', '', 0, 1618451718, 1618451718), (NULL, 'parent_id', '父级ID', 32, 'xmtree', '', '', '', '', '', '', '', '', '', '', '', '', '', '[{\"rule\":\"call\",\"args\":\"checkParent\",\"on\":\"\",\"message\":\"\"}]', 1, 'INT', '10', '0', 1, 1, 0, 1, 0, 'index', '', 0, 1618451719, 1618451719), (NULL, 'title', '菜单标题', 32, 'text', '', '', '', '', '', '', '', '', '', '', '', '', '', '[{\"rule\":\"require\",\"args\":\"\",\"on\":\"0\",\"message\":\"\"}]', 1, 'VARCHAR', '128', '', 1, 0, 0, 1, 0, '', '', 0, 1618451719, 1618706999), (NULL, 'is_nav', '是否菜单', 32, 'checker', '', '', '', '', '', '', 'checker', '', '', '', '', '', '', '', 1, 'TINYINT', '1', '0', 1, 1, 0, 1, 0, 'index', '', 0, 1618451719, 1618452293), (NULL, 'url', '规则', 32, 'text', '', '{\"tip\":\"控制器请写小写加下划线形式;如:user.ad_position/index\"}', '', '', '', '', 'show.blue', '', '', '', '', '', '', '', 1, 'VARCHAR', '128', '', 1, 0, 0, 1, 0, '', 'title', 0, 1618451719, 1618671660), (NULL, 'list_order', '排序权重', 32, 'number', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 1, 'INT', '11', '0', 1, 0, 0, 1, 0, 'index', '', 0, 1618451719, 1618451719), (NULL, 'admin_id', '管理员ID', 32, '', '', '', '', '', '', '', '0', '', '', '', '', '', '', '', 1, 'INT', '10', '0', 1, 1, 0, 1, 0, 'index', '', 0, 1618451719, 1618451719), (NULL, 'family', '家族', 32, '', '', '', '', '', '', '', '0', '', '', '', '', '', '', '', 1, 'VARCHAR', '256', '', 1, 0, 0, 1, 0, '', '', 0, 1618451719, 1618451719), (NULL, 'level', '层级', 32, '', '', '', '', '', '', '', '0', '', '', '', '', '', '', '', 1, 'SMALLINT', '5', '0', 1, 1, 0, 1, 0, '', '', 0, 1618451719, 1618451719), (NULL, 'children_count', '下级数', 32, '', '', '', '', '', '', '', '0', '', '', '', '', '', '', '', 1, 'SMALLINT', '5', '0', 1, 1, 0, 1, 0, '', '', 0, 1618451719, 1618451719), (NULL, 'remark', '备注', 32, 'textarea', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 1, 'TEXT', '', 'none', 1, 0, 0, 1, 0, '', 'list_order', 1, 1618453215, 1618453244), (NULL, 'icon', '图标', 32, 'icon', '', '', '', '', '', '', 'icon', '', '', '', '', '', '', '', 1, 'VARCHAR', '32', '', 1, 0, 0, 1, 0, '', 'url', 1, 1618663529, 1618663529), (NULL, 'args', '参数', 32, 'keyvalue', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 1, 'VARCHAR', '512', '', 1, 0, 0, 1, 0, '', 'icon', 1, 1618670880, 1618670880), (NULL, 'create_time', '创建日期', 32, '', '', '', '', '', '', '', '', '{\"width\":\"144\"}', '', '', '', '', '', '', 1, 'INT', '10', '0', 1, 1, 0, 1, 0, '', '', 0, 1618451719, 1618451719), (NULL, 'update_time', '修改日期', 32, '', '', '', '', '', '', '', '', '{\"width\":\"144\"}', '', '', '', '', '', '', 1, 'INT', '10', '0', 1, 1, 0, 1, 0, '', '', 0, 1618451719, 1618451719), (NULL, 'is_not_power', '不关心权限', 32, 'checker', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 1, 'TINYINT', '1', '0', 1, 1, 0, 1, 0, '', 'is_nav', 1, 1621754216, 1621754227), (NULL, 'id', 'ID', 33, 'hidden', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 1, 'INT', '10', 'none', 1, 1, 1, 1, 0, '', '', 0, 1620462316, 1620462316), (NULL, 'create_time', '创建日期', 33, '', '', '', '', '', '', '', '', '{\"width\":\"144\"}', '', '', '', '', '', '', 1, 'INT', '10', '0', 1, 1, 0, 1, 0, '', '', 0, 1620462316, 1620462316), (NULL, 'update_time', '修改日期', 33, '', '', '', '', '', '', '', '', '{\"width\":\"144\"}', '', '', '', '', '', '', 1, 'INT', '10', '0', 1, 1, 0, 1, 0, '', '', 0, 1620462316, 1620462316), (NULL, 'username', '用户名', 33, 'text', '', '', '', '', '', '', '', '', '1', '', '', '', '', '', 1, 'VARCHAR', '64', '', 1, 0, 0, 1, 0, '', 'model', 1, 1620463403, 1621739745), (NULL, 'ip', 'IP地址', 33, 'ip4', '', '{\"message\":\"值为空即所有IP全封\"}', '', '', '', '', '', '', '1', '', '', '', '', '', 1, 'VARCHAR', '32', '', 1, 0, 0, 1, 0, '', 'username', 1, 1620463431, 1621739708), (NULL, 'expire', '到期时间', 33, 'datetime', '', '{\"type\":\"time\",\"message\":\"为空即长时间限制登录,用户重置密码以后自动解除;也可以禁用账号来永久禁用\"}', '[]', '', '', '', 'datetime', '{\"width\":\"144\"}', '', '', '', '', '', '', 1, 'INT', '', '0', 1, 0, 0, 1, 0, '', 'ip', 1, 1620463572, 1620972238), (NULL, 'is_verify', '是否执行', 33, 'checker', '', '', '', '', '', '', 'checker', '', '', '', '', '', '', '', 1, 'TINYINT', '1', '0', 1, 1, 0, 1, 0, '', 'expire', 1, 1620463605, 1620466178), (NULL, 'model', '登录模型', 33, 'text', '', '', '', '', '', '', '', '', '1', '', '', '', '', '', 1, 'VARCHAR', '64', '', 1, 0, 0, 1, 0, '', 'id', 1, 1620465542, 1621739738), (NULL, 'id', 'ID', 34, 'hidden', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 1, 'INT', '10', 'none', 1, 1, 1, 1, 0, '', '', 0, 1621178506, 1621178506), (NULL, 'date', '日期', 34, 'date', '', '', '', '', '', '', '', '', '1', '', '', '', '', '[{\"rule\":\"require\",\"args\":\"\",\"on\":\"0\",\"message\":\"\"},{\"rule\":\"dateFormat:Y-m-d\",\"args\":\"\",\"on\":\"0\",\"message\":\"\"},{\"rule\":\"unique\",\"args\":\"sign,user_id^date\",\"on\":\"0\",\"message\":\"该日期已签到\"},{\"rule\":\"call\",\"args\":\"checkToday\",\"on\":\"\",\"message\":\"\"}]', 1, 'DATE', '', '2000-01-01', 1, 0, 0, 1, 0, 'index', 'user_id', 0, 1621178506, 1621267050), (NULL, 'user_id', '会员ID', 34, 'relation', 'User', '', '', '', '', '', 'relation', '', 'relation', '', '', '', '', '[{\"rule\":\"gt\",\"args\":\"0\",\"on\":\"0\",\"message\":\"\"}]', 1, 'INT', '10', '0', 1, 1, 0, 1, 0, 'index', 'id', 0, 1621178506, 1621224459), (NULL, 'create_time', '创建日期', 34, '', '', '', '', '', '', '', '', '{\"width\":\"144\"}', '', '', '', '', '', '', 1, 'INT', '10', '0', 1, 1, 0, 1, 0, '', '', 0, 1621178506, 1621178506), (NULL, 'update_time', '修改日期', 34, '', '', '', '', '', '', '', '', '{\"width\":\"144\"}', '', '', '', '', '', '', 1, 'INT', '10', '0', 1, 1, 0, 1, 0, '', '', 0, 1621178506, 1621178506), (NULL, 'year', '年', 34, 'none', '', '', '', '', '', '', '0', '', '', '', '', '', '', '', 1, 'INT', '', '0', 1, 0, 0, 1, 0, '', 'date', 1, 1621223521, 1621223521), (NULL, 'month', '月', 34, 'none', '', '', '', '', '', '', '0', '', '', '', '', '', '', '', 1, 'INT', '', '0', 1, 0, 0, 1, 0, '', 'year', 1, 1621223549, 1621223549), (NULL, 'day', '日', 34, 'none', '', '', '', '', '', '', '0', '', '', '', '', '', '', '', 1, 'INT', '', '0', 1, 0, 0, 1, 0, '', 'month', 1, 1621223569, 1621223569), (NULL, 'score', '获得积分', 34, 'none', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 1, 'INT', '', '0', 1, 0, 0, 1, 0, '', 'day', 1, 1621223709, 1621223866), (NULL, 'continue', '连续天数', 34, 'none', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 1, 'INT', '', '0', 1, 0, 0, 1, 0, '', 'score', 1, 1621223825, 1621223825), (NULL, 'time', '签到时间', 34, 'none', '', '', '', '', '', '', '0', '', '', '', '', '', '', '', 1, 'CHAR', '32', '', 1, 0, 0, 1, 0, '', 'continue', 1, 1621261888, 1621261888), (NULL, 'id', 'ID', 35, 'hidden', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 1, 'INT', '10', 'none', 1, 1, 1, 1, 0, '', '', 0, 1621752373, 1621752373), (NULL, 'user_group_id', '所属会员组ID', 35, 'relation', 'UserGroup', '', '', '', '', '', 'relation', '', '', '', '', '', '', '[{\"rule\":\"gt\",\"args\":\"0\",\"on\":\"0\",\"message\":\"\"}]', 1, 'INT', '10', '0', 1, 1, 0, 1, 0, 'index', '', 0, 1621752373, 1621752373), (NULL, 'content', '内容', 35, 'none', '', '', '', '', '', '', '0', '', '', '', '', '', '', '', 1, 'MEDIUMTEXT', '', 'none', 1, 0, 0, 1, 0, '', '', 0, 1621752373, 1621752665), (NULL, 'create_time', '创建日期', 35, '', '', '', '', '', '', '', '', '{\"width\":\"144\"}', '', '', '', '', '', '', 1, 'INT', '10', '0', 1, 1, 0, 1, 0, '', '', 0, 1621752373, 1621752373), (NULL, 'update_time', '修改日期', 35, '', '', '', '', '', '', '', '', '{\"width\":\"144\"}', '', '', '', '', '', '', 1, 'INT', '10', '0', 1, 1, 0, 1, 0, '', '', 0, 1621752373, 1621752373); ``` ## 2.05升级到2.0.6 替换/woo目录 替换/public/static/woo目录 替换/public/static/layui目录 模型中找到`Import`模型,把`model`字段改为`model_id int not null defualt 0` ,如图: ![](https://img.kancloud.cn/d6/7e/d67e268f2ba0e1b0943d36f5e71da132_1578x317.png) ## 2.0.4升级到2.0.5 替换/woo目录 替换/public/static/woo目录 替换/config/woo.php文件 替换/config/wooauth.php文件 新增/config/api.php 文件 SQL执行,前缀请自行修改(把`woo_`替换为你的前缀): ``` ALTER TABLE `woo_application` ADD `is_api` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否API'; ALTER TABLE `woo_user` ADD `truename` varchar(64) NOT NULL DEFAULT '' COMMENT '真实姓名'; ALTER TABLE `woo_user` ADD `pay_password` varchar(32) NOT NULL DEFAULT '' COMMENT '支付密码'; ALTER TABLE `woo_user` ADD `is_bind_mobile` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '手机绑定'; ALTER TABLE `woo_user` ADD `is_bind_email` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '邮箱绑定'; ALTER TABLE `woo_user` ADD `region` varchar(64) NOT NULL DEFAULT '' COMMENT '所在地区'; ALTER TABLE `woo_user` ADD `address` varchar(64) NOT NULL DEFAULT '' COMMENT '详细地址'; INSERT INTO `woo_field` (`id`, `field`, `name`, `model_id`, `form`, `form_foreign`, `form_item_attrs`, `form_tag_attrs`, `form_options`, `form_upload`, `form_trigger`, `list`, `list_attrs`, `list_filter`, `list_filter_attrs`, `list_filter_tag_attrs`, `detail`, `detail_attrs`, `validate`, `is_field`, `type`, `length`, `default`, `is_not_null`, `is_unsigned`, `is_ai`, `is_system`, `is_contribute`, `index`, `after`, `admin_id`, `create_time`, `update_time`) VALUES (NULL, 'is_api', '是否API', 27, 'checker', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 1, 'TINYINT', '1', '0', 1, 1, 0, 1, 0, '', 'is_verify', 1, 1617286206, 1617286206), (NULL, 'truename', '真实姓名', 19, 'text', '', '', '', '', '', '', '', '', '1', '', '', '', '', '', 1, 'VARCHAR', '64', '', 1, 0, 0, 1, 0, '', 'status', 1, 1616239865, 1616239865), (NULL, 'pay_password', '支付密码', 19, 'password', '', '{"tip":"不修改请保持为空"}', '', '', '', '', '0', '', '', '', '', '0', '', '', 1, 'VARCHAR', '32', '', 1, 0, 0, 1, 0, '', 'password', 1, 1616243950, 1616251407), (NULL, 'is_bind_email', '邮箱绑定', 19, 'checker', '', '', '', '', '', '', 'checker.show', '', '', '', '', '', '', '', 1, 'TINYINT', '1', '0', 1, 1, 0, 1, 0, '', 'email', 1, 1616248002, 1616248002), (NULL, 'is_bind_mobile', '手机绑定', 19, 'checker', '', '', '', '', '', '', 'checker.show', '', '', '', '', '', '', '', 1, 'TINYINT', '1', '0', 1, 1, 0, 1, 0, '', 'mobile', 1, 1616248041, 1616306181), (NULL, 'region', '所在地区', 19, 'cascader', 'Region', '', '{"data-url":"true"}', '', '', '', '', '', 'cascader', '{}', '{"data-url":"true"}', '', '', '', 1, 'VARCHAR', '64', '', 1, 0, 0, 1, 0, '', 'birthday', 1, 1616248210, 1616251042), (NULL, 'address', '详细地址', 19, 'text', '', '', '', '', '', '', '0', '', '', '', '', '', '', '', 1, 'VARCHAR', '64', '', 1, 0, 0, 1, 0, '', 'region', 1, 1616248240, 1616248240); CREATE TABLE IF NOT EXISTS `woo_user_login` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID', `username` varchar(64) NOT NULL DEFAULT '' COMMENT '用户名', `user_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '会员ID', `ip` varchar(32) NOT NULL DEFAULT '' COMMENT '登录IP', `user_agent` varchar(256) NOT NULL DEFAULT '' COMMENT '客户端', `region` varchar(128) NOT NULL DEFAULT '' COMMENT '登录地址', `summary` varchar(128) NOT NULL DEFAULT '' COMMENT '描述', `create_time` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '创建日期', `update_time` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '修改日期', PRIMARY KEY (`id`), KEY `user_id` (`user_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='登录日志' AUTO_INCREMENT=1; CREATE TABLE IF NOT EXISTS `woo_certification` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID', `user_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '会员ID', `truename` varchar(64) NOT NULL DEFAULT '' COMMENT '姓名', `mobile` varchar(16) NOT NULL DEFAULT '' COMMENT '手机', `id_card` varchar(32) NOT NULL DEFAULT '' COMMENT '身份证', `id_card_front` varchar(128) NOT NULL DEFAULT '' COMMENT '身份证正面', `id_card_back` varchar(128) NOT NULL DEFAULT '' COMMENT '身份证背面', `is_cert` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '通过', `create_time` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '创建日期', `update_time` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '修改日期', `delete_time` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '删除日期', PRIMARY KEY (`id`), KEY `user_id` (`user_id`), KEY `delete_time` (`delete_time`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='实名认证' AUTO_INCREMENT=1 ; CREATE TABLE IF NOT EXISTS `woo_antispam` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID', `title` varchar(128) NOT NULL DEFAULT '' COMMENT '审核模型', `foreign_id` int(11) NOT NULL DEFAULT '0' COMMENT '模型ID', `is_verify` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '审核状态', `content` mediumtext NOT NULL COMMENT '审核内容', `result` text NOT NULL COMMENT '返回结果', `msg` text NOT NULL COMMENT '内容提示', `words` text NOT NULL COMMENT '不合格字符', `admin_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '管理员ID', `create_time` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '创建日期', `update_time` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '修改日期', PRIMARY KEY (`id`), KEY `admin_id` (`admin_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='文本审核' AUTO_INCREMENT=1 ; // 如果你的模型数据表添加不能用29,30,31你要手动修改下id 且后面的`woo_field`也要手动修改下对应的模型id: INSERT INTO `woo_model` (`id`, `model`, `cname`, `addon`, `full_table`, `order_type`, `tree_level`, `custom_data`, `list_config`, `suffix`, `pk`, `connection`, `is_import`, `parent_model`, `display`, `form_group`, `relation_link`, `admin_id`, `is_controller`, `create_time`, `update_time`) VALUES (29, 'UserLogin', '登录日志', '', '', '', 0, '', 'batch_delete,delete,detail', '', '', '', 0, '', 'username', '', '[{"key":"User","foreign":"","type":"belongsTo","foreign_key":"","more":""}]', 1, 1, 1616240855, 1616336766), (30, 'Certification', '实名认证', '', '', '', 0, '', 'create,batch_delete,modify,delete,detail', '', '', '', 0, 'User', 'truename', '', '[{"key":"User","foreign":"","type":"belongsTo","foreign_key":"","more":""}]', 1, 1, 1616258937, 1616258937), (31, 'Antispam', '文本审核', '', '', '', 0, '', 'batch_delete,modify,delete,detail', '', '', '', 0, '', 'title', '', '[{"key":"Admin","foreign":"","type":"","foreign_key":"","more":""}]', 1, 1, 1618039195, 1618039195); INSERT INTO `woo_field` (`id`, `field`, `name`, `model_id`, `form`, `form_foreign`, `form_item_attrs`, `form_tag_attrs`, `form_options`, `form_upload`, `form_trigger`, `list`, `list_attrs`, `list_filter`, `list_filter_attrs`, `list_filter_tag_attrs`, `detail`, `detail_attrs`, `validate`, `is_field`, `type`, `length`, `default`, `is_not_null`, `is_unsigned`, `is_ai`, `is_system`, `is_contribute`, `index`, `after`, `admin_id`, `create_time`, `update_time`) VALUES (NULL, 'id', 'ID', 29, 'hidden', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 1, 'INT', '10', 'none', 1, 1, 1, 1, 1, '', '', 0, 1616240855, 1617776507), (NULL, 'username', '用户名', 29, 'none', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 1, 'VARCHAR', '64', '', 1, 0, 0, 1, 1, '', '', 0, 1616240855, 1617801788), (NULL, 'user_id', '会员ID', 29, 'relation', 'User', '', '', '', '', '', 'relation', '', '', '', '', '', '', '', 1, 'INT', '10', '0', 1, 1, 0, 1, 1, 'index', '', 0, 1616240855, 1617776511), (NULL, 'create_time', '创建日期', 29, '', '', '', '', '', '', '', '', '{"width":"144"}', '', '', '', '', '', '', 1, 'INT', '10', '0', 1, 1, 0, 1, 0, '', '', 0, 1616240855, 1617776534), (NULL, 'update_time', '修改日期', 29, '', '', '', '', '', '', '', '', '{"width":"144"}', '', '', '', '', '', '', 1, 'INT', '10', '0', 1, 1, 0, 1, 0, '', '', 0, 1616240855, 1616240855), (NULL, 'ip', '登录IP', 29, 'none', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 1, 'VARCHAR', '32', '', 1, 0, 0, 1, 1, '', 'user_id', 1, 1616241012, 1617776514), (NULL, 'user_agent', '客户端', 29, 'none', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 1, 'VARCHAR', '256', '', 1, 0, 0, 1, 1, '', 'ip', 1, 1616241087, 1617776516), (NULL, 'region', '登录地址', 29, 'none', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 1, 'VARCHAR', '128', '', 1, 0, 0, 1, 1, '', 'user_agent', 1, 1616241160, 1617776518), (NULL, 'summary', '描述', 29, 'none', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 1, 'VARCHAR', '128', '', 1, 0, 0, 1, 1, '', 'region', 1, 1616241220, 1617776520), (NULL, 'id', 'ID', 30, 'hidden', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 1, 'INT', '10', 'none', 1, 1, 1, 1, 0, '', '', 0, 1616258937, 1616258937), (NULL, 'user_id', '会员ID', 30, 'relation', 'User', '', '', '', '', '', 'relation', '', '', '', '', '', '', '[{"rule":"require","args":"","on":"0","message":""},{"rule":"egt","args":"1","on":"0","message":""},{"rule":"unique","args":"certification","on":"0","message":""}]', 1, 'INT', '10', '0', 1, 1, 0, 1, 0, 'index', '', 0, 1616258938, 1616259490), (NULL, 'create_time', '创建日期', 30, '', '', '', '', '', '', '', '', '{"width":"144"}', '', '', '', '', '', '', 1, 'INT', '10', '0', 1, 1, 0, 1, 0, '', '', 0, 1616258938, 1616258938), (NULL, 'update_time', '修改日期', 30, '', '', '', '', '', '', '', '', '{"width":"144"}', '', '', '', '', '', '', 1, 'INT', '10', '0', 1, 1, 0, 1, 0, '', '', 0, 1616258938, 1616258938), (NULL, 'delete_time', '删除日期', 30, '', '', '', '', '', '', '', '0', '{"width":"144"}', '', '', '', '', '', '', 1, 'INT', '10', '0', 1, 1, 0, 1, 0, 'index', '', 0, 1616258938, 1616258938), (NULL, 'truename', '姓名', 30, 'text', '', '', '', '', '', '', '', '', '1', '', '', '', '', '[{"rule":"require","args":"","on":"","message":""}]', 1, 'VARCHAR', '64', '', 1, 0, 0, 1, 0, '', 'user_id', 1, 1616259019, 1616259019), (NULL, 'mobile', '手机', 30, 'text', '', '', '', '', '', '', '', '', '1', '', '', '', '', '[{"rule":"require","args":"","on":"0","message":""},{"rule":"mobile","args":"","on":"0","message":""},{"rule":"unique","args":"certification","on":"","message":""}]', 1, 'VARCHAR', '16', '', 1, 0, 0, 1, 0, '', 'truename', 1, 1616259055, 1616335161), (NULL, 'id_card', '身份证', 30, 'text', '', '', '', '', '', '', '', '{"width":"200"}', '1', '', '', '', '', '[{"rule":"require","args":"","on":"0","message":""},{"rule":"idCard","args":"","on":"0","message":""}]', 1, 'VARCHAR', '32', '', 1, 0, 0, 1, 0, '', 'mobile', 1, 1616259104, 1616331356), (NULL, 'id_card_front', '身份证正面', 30, 'image', '', '', '', '', '', '', 'file', '', '', '', '', '', '', '', 1, 'VARCHAR', '128', '', 1, 0, 0, 1, 0, '', 'id_card', 1, 1616259199, 1616259199), (NULL, 'id_card_back', '身份证背面', 30, 'image', '', '', '', '', '', '', 'file', '', '', '', '', '', '', '', 1, 'VARCHAR', '128', '', 1, 0, 0, 1, 0, '', 'id_card_front', 1, 1616259237, 1616259237), (NULL, 'is_cert', '通过', 30, 'none', '', '', '', '', '', '', 'checker.show', '', '', '', '', '', '', '', 1, 'TINYINT', '1', '0', 1, 1, 0, 1, 0, '', 'id_card_back', 1, 1616259382, 1616331219), (NULL, 'id', 'ID', 31, 'hidden', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 1, 'INT', '10', 'none', 1, 1, 1, 1, 0, '', '', 0, 1618039195, 1618039195), (NULL, 'title', '审核模型', 31, 'text', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 1, 'VARCHAR', '128', '', 1, 0, 0, 1, 0, '', '', 0, 1618039195, 1618039214), (NULL, 'content', '审核内容', 31, 'textarea', '', '', '', '', '', '', '0', '', '', '', '', '', '', '', 1, 'MEDIUMTEXT', '', '', 1, 0, 0, 1, 0, '', 'is_verify', 0, 1618039195, 1618039296), (NULL, 'admin_id', '管理员ID', 31, '', '', '', '', '', '', '', '0', '', '', '', '', '', '', '', 1, 'INT', '10', '0', 1, 1, 0, 1, 0, 'index', '', 0, 1618039195, 1618039195), (NULL, 'create_time', '创建日期', 31, '', '', '', '', '', '', '', '', '{"width":"144"}', '', '', '', '', '', '', 1, 'INT', '10', '0', 1, 1, 0, 1, 0, '', '', 0, 1618039195, 1618039195), (NULL, 'update_time', '修改日期', 31, '', '', '', '', '', '', '', '', '{"width":"144"}', '', '', '', '', '', '', 1, 'INT', '10', '0', 1, 1, 0, 1, 0, '', '', 0, 1618039195, 1618039195), (NULL, 'foreign_id', '模型ID', 31, 'number', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 1, 'INT', '', '0', 1, 0, 0, 1, 0, '', 'title', 1, 1618039239, 1618039239), (NULL, 'is_verify', '审核状态', 31, 'checker', '', '', '', '', '', '', 'checker.show', '', '', '', '', '', '', '', 1, 'TINYINT', '1', '0', 1, 1, 0, 1, 0, '', 'foreign_id', 1, 1618039264, 1618039264), (NULL, 'msg', '内容提示', 31, 'textarea', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 1, 'TEXT', '', 'none', 1, 0, 0, 1, 0, '', 'result', 1, 1618039323, 1618039393), (NULL, 'words', '不合格字符', 31, 'textarea', '', '', '', '', '', '', '0', '', '', '', '', '', '', '', 1, 'TEXT', '', 'none', 1, 0, 0, 1, 0, '', 'msg', 1, 1618039345, 1618039345), (NULL, 'result', '返回结果', 31, 'textarea', '', '', '', '', '', '', '0', '', '', '', '', '', '', '', 1, 'TEXT', '', 'none', 1, 0, 0, 1, 0, '', 'content', 1, 1618039385, 1618039385); ~~~ ## 2.0.3升级到2.0.4 替换/woo目录 替换/public/static/woo目录 替换/config/woo.php文件(重要) 替换/config/wooauth.php文件 复制/app/common/builder目录(重要) composer依赖,请自行composer update升级 升级前做好备份 SQL执行,前缀请自行修改(把`woo_`替换为你的前缀): ``` CREATE TABLE `woo_sensitive` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID', `title` varchar(128) NOT NULL DEFAULT '' COMMENT '标题', `is_verify` tinyint(1) UNSIGNED NOT NULL DEFAULT '0' COMMENT '是否审核', `admin_id` int(10) UNSIGNED NOT NULL DEFAULT '0' COMMENT '管理员ID', `create_time` int(10) UNSIGNED NOT NULL DEFAULT '0' COMMENT '创建日期', `update_time` int(10) UNSIGNED NOT NULL DEFAULT '0' COMMENT '修改日期', `delete_time` int(10) UNSIGNED NOT NULL DEFAULT '0' COMMENT '删除日期', PRIMARY KEY (`id`), KEY `admin_id` (`admin_id`), KEY `delete_time` (`delete_time`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='敏感词' AUTO_INCREMENT=1 ; CREATE TABLE `woo_addon` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID', `name` varchar(64) NOT NULL DEFAULT '' COMMENT '插件目录', `title` varchar(128) NOT NULL DEFAULT '' COMMENT '标题', `author` varchar(64) NOT NULL DEFAULT '' COMMENT '作者', `version` varchar(64) NOT NULL DEFAULT '' COMMENT '版本', `is_verify` tinyint(1) UNSIGNED NOT NULL DEFAULT '0' COMMENT '是否审核', `is_disuninstall` tinyint(1) UNSIGNED NOT NULL DEFAULT '0' COMMENT '禁止卸载', `describe` text NOT NULL COMMENT '插件描述', `admin_id` int(10) UNSIGNED NOT NULL DEFAULT '0' COMMENT '管理员ID', `create_time` int(10) UNSIGNED NOT NULL DEFAULT '0' COMMENT '创建日期', `update_time` int(10) UNSIGNED NOT NULL DEFAULT '0' COMMENT '修改日期', PRIMARY KEY (`id`), KEY `is_verify` (`is_verify`), KEY `admin_id` (`admin_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='插件'; CREATE TABLE `woo_addon_setting` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID', `title` varchar(128) NOT NULL DEFAULT '' COMMENT '标题', `addon_id` int(11) NOT NULL DEFAULT '0' COMMENT '插件ID', `var` varchar(64) NOT NULL DEFAULT '' COMMENT '变量名', `value` text NOT NULL COMMENT '数据', `type` varchar(64) NOT NULL DEFAULT '' COMMENT '输入类型', `options` varchar(512) NOT NULL DEFAULT '' COMMENT '选项', `tip` varchar(128) NOT NULL DEFAULT '' COMMENT '提示', `list_order` int(11) NOT NULL DEFAULT '0' COMMENT '排序权重', `create_time` int(10) UNSIGNED NOT NULL DEFAULT '0' COMMENT '创建日期', `update_time` int(10) UNSIGNED NOT NULL DEFAULT '0' COMMENT '修改日期', PRIMARY KEY (`id`), KEY `list_order` (`list_order`), KEY `addon_id` (`addon_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='插件配置'; DROP TABLE `woo_region`; CREATE TABLE IF NOT EXISTS `woo_region` ( `id` int(11) NOT NULL AUTO_INCREMENT, `parent_id` int(11) NOT NULL DEFAULT '0' COMMENT '父级', `title` varchar(64) NOT NULL DEFAULT '' COMMENT '名称', `code` int(11) NOT NULL DEFAULT '0' COMMENT '代码编号', `pinyin` varchar(64) NOT NULL DEFAULT '' COMMENT '拼音', `jianpin` varchar(64) NOT NULL DEFAULT '' COMMENT '简拼', `first` char(2) NOT NULL DEFAULT '' COMMENT '首字母', `list_order` int(11) NOT NULL DEFAULT '0' COMMENT '排序权重', `children_count` smallint(5) UNSIGNED NOT NULL DEFAULT '0' COMMENT '下级数', `family` varchar(128) NOT NULL DEFAULT '' COMMENT '家族', `level` tinyint(4) NOT NULL DEFAULT '0' COMMENT '层级', `lng` decimal(9,6) NOT NULL DEFAULT '0.000000' COMMENT '经度', `lat` decimal(9,6) NOT NULL DEFAULT '0.000000' COMMENT '纬度', PRIMARY KEY (`id`), KEY `parent_id` (`parent_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='地区' AUTO_INCREMENT=1 ; CREATE TABLE IF NOT EXISTS `woo_request_log` ( `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'ID', `appname` varchar(32) NOT NULL DEFAULT '' COMMENT '应用/插件名', `admin_id` int(10) UNSIGNED NOT NULL DEFAULT '0' COMMENT '管理员ID', `user_id` int(10) UNSIGNED NOT NULL DEFAULT '0' COMMENT '会员ID', `controller` varchar(64) NOT NULL DEFAULT '' COMMENT '控制器', `action` varchar(64) NOT NULL DEFAULT '' COMMENT '方法', `url` varchar(255) NOT NULL DEFAULT '' COMMENT 'URL地址', `method` varchar(32) NOT NULL DEFAULT '' COMMENT '请求方法', `args` varchar(10240) NOT NULL DEFAULT '' COMMENT '数据', `ip` varchar(64) NOT NULL DEFAULT '' COMMENT 'IP地址', `region` varchar(128) NOT NULL DEFAULT '' COMMENT '请求地址', `isp` varchar(64) NOT NULL DEFAULT '' COMMENT '网络ISP', `user_agent` varchar(255) NOT NULL DEFAULT '' COMMENT '客户端', `referer` varchar(255) NOT NULL DEFAULT '' COMMENT '来源', `code` smallint(5) UNSIGNED NOT NULL DEFAULT 0 COMMENT '状态码', `create_time` int(10) UNSIGNED NOT NULL DEFAULT '0' COMMENT '创建日期', `update_time` int(10) UNSIGNED NOT NULL DEFAULT '0' COMMENT '修改日期', PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='请求日志' AUTO_INCREMENT=1 ; ALTER TABLE `woo_field` CHANGE `is_contribute` `is_contribute` TINYINT NOT NULL DEFAULT '0'; ALTER TABLE `woo_admin_group` ADD `dashboard` VARCHAR(128) NOT NULL DEFAULT '' COMMENT '主面板URL' AFTER `title` ; ALTER TABLE `woo_admin_group` ADD `data_allow` tinyint(4) NOT NULL DEFAULT '0' COMMENT '数据权限' AFTER `dashboard`; ALTER TABLE `woo_admin_group` ADD `custom_data_allow` varchar(128) NOT NULL DEFAULT '' COMMENT '自定义权限' AFTER `dashboard`; ALTER TABLE `woo_admin_login` ADD `region` varchar(128) NOT NULL DEFAULT '' COMMENT '登录地址'; ALTER TABLE `woo_log` ADD `region` varchar(128) NOT NULL DEFAULT '' COMMENT '操作地址'; ALTER TABLE `woo_log` ADD `isp` varchar(64) NOT NULL DEFAULT '' COMMENT '网络ISP'; INSERT INTO `woo_field` (`id`, `field`, `name`, `model_id`, `form`, `form_foreign`, `form_item_attrs`, `form_tag_attrs`, `form_options`, `form_upload`, `form_trigger`, `list`, `list_attrs`, `list_filter`, `list_filter_attrs`, `list_filter_tag_attrs`, `detail`, `detail_attrs`, `validate`, `is_field`, `type`, `length`, `default`, `is_not_null`, `is_unsigned`, `is_ai`, `is_system`, `is_contribute`, `index`, `after`, `admin_id`, `create_time`, `update_time`) VALUES (NULL, 'dashboard', '主面板URL', 5, 'text', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 1, 'VARCHAR', '128', '', 1, 0, 0, 1, 0, '', 'title', 1, 1607440781, 1607440781), (NULL, 'data_allow', '数据权限', 5, 'select', '', '', '', '{\"0\":\"全部数据权限\",\"1\":\"仅本人数据权限\",\"2\":\"本部门数据权限\",\"3\":\"部门及以下数据权限\",\"4\":\"自定义数据权限\"}', '', '{\"4\":\"custom_data_allow\"}', '', '', '', '', '', '', '', '', 1, 'TINYINT', '', '0', 1, 0, 0, 1, 0, '', 'dashboard', 1, 1607517554, 1607527051), (NULL, 'custom_data_allow', '自定义权限', 5, 'xmtree', 'Department', '', '', '', '', '', '0', '', '', '', '', '', '', '', 1, 'VARCHAR', '128', '', 1, 0, 0, 1, 0, '', 'data_allow', 1, 1607517722, 1607519501), (NULL, 'region', '登录地址', 8, 'none', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 1, 'VARCHAR', '128', '', 1, 0, 0, 1, 0, '', 'user_agent', 1, 1608974680, 1608974680), (NULL, 'region', '操作地址', 9, 'none', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 1, 'VARCHAR', '128', '', 1, 0, 0, 1, 0, '', 'ip', 1, 1608974735, 1608974735), (NULL, 'isp', '网络ISP', 9, 'none', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 1, 'VARCHAR', '64', '', 1, 0, 0, 1, 0, '', 'region', 1, 1608974827, 1608974827); ``` 插件栏目自行添加: ![](https://img.kancloud.cn/0c/a0/0ca01102a482cb66cde49c65a00b8684_921x481.png) 如果需要使用地区数据,请导入新版中的data/region.sql文件 ## 2.0.1升级到2.0.2 替换/woo目录,替换/public/woo目录 composer依赖,请自行composer update升级 升级前做好备份