[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);
~~~
 自己去把Admin、User模型的密碼字段修改時屏蔽了,這樣修改就沒有密碼了;點擊模型生成,密碼有單獨修改表單。

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 => 所在頂級部門及以下數據權限`

## 2.2.8升級到2.2.9
升級前請先備份原項目文件,升級前請先備份原項目文件,升級前請先備份原項目文件
1、替換/woo目錄
2、替換/public/static/woo目錄
3、ThinkPHP等依賴需自行composer update升級,升級以后請參考[http://www.hmoore.net/laowu199/e_dev/1957961](http://www.hmoore.net/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`),如有更新需[http://www.hmoore.net/laowu199/e_dev/1957961](http://www.hmoore.net/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兩個字段修改下:

否則新的自定義模板中可能會報錯說屬性不存在
## 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、常規>系統配置中加一個配置項,用于高德地圖

## 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` ,如圖:

## 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);
```
插件欄目自行添加:

如果需要使用地區數據,請導入新版中的data/region.sql文件
## 2.0.1升級到2.0.2
替換/woo目錄,替換/public/woo目錄
composer依賴,請自行composer update升級
升級前做好備份
- 2.0開發手冊
- 基礎
- 簡介
- 安裝
- 目錄
- 規范(必看)
- 快速開發
- 創建模型
- 字段管理
- 無限級開發
- 模型Model
- 定義
- 方法
- 事件
- 關聯
- 關聯查詢
- 驗證
- 后臺控制器Controller
- 定義
- 列表【index】
- 新增【create】
- 修改【modify】
- 刪除【delete】
- 詳細【detail】
- 文本審核【antispam】
- 清空數據【clearData】
- 自定義頁面
- 視圖View
- 視圖使用
- 引入CSS和JS
- 基礎表單構建Form
- 布局表單構建FormPage
- 表單構建器的基礎使用
- 表單項
- 表單分組
- 表單觸發器
- 表單布局
- 數據提交驗證和入庫
- 集成tinymce編輯器
- 集成nkeditor編輯器
- 表格構建Table
- 表格構建器基礎使用
- 表格構建器列表字段相關
- 自定義列表頭部工具按鈕
- 自定義列表項工具按鈕
- 自定義搜索
- 定義列表側邊欄
- 靜態數據
- 更多屬性和回調
- 自定義模板V2.1.0
- 列表統計輸出V2.1.2
- 常見問題
- 自定義應用
- 創建新應用
- 應用開發
- API應用
- 自定義插件
- 創建新插件
- 雜項
- 認證Auth
- 權限管理
- 上傳Upload
- 批量導入
- 助手庫
- 系統配置
- 字典
- 二維碼生成
- 源碼修改
- 常見問題
- 小技巧,小細節
- 插件
- oauth
- APP一鍵登錄
- 微信小程序登錄
- 2.0CMS建站
- 基礎
- 安裝
- 建站
- Callback
- 引入CSS和JS
- 模板
- 欄目數據
- 列表頁數據
- 詳細頁數據
- 欄目封面
- 自定義表單
- 其他數據和自定義數據
- wap視圖層
- 前臺搜索
- API開發
- CMS應用日志
- CMS升級指導
- 中臺-SAAS開發
- 安裝
- 中臺日志
- 中臺升級指導
- ★★2.0視頻教程★★
- 附錄
- Admin核心更新日志
- Admin核心升級指導
- composer
- 安全