Compare commits

...

2 Commits

Author SHA1 Message Date
7c37f8f30a update sql 2023-03-31 11:02:23 +08:00
eea5a0e1a6 新增接口 2023-03-31 11:00:34 +08:00
12 changed files with 196 additions and 53 deletions

Binary file not shown.

View File

@ -11,12 +11,6 @@
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
-- 导出 waimai_sys 的数据库结构
DROP DATABASE IF EXISTS `waimai_sys`;
CREATE DATABASE IF NOT EXISTS `waimai_sys` /*!40100 DEFAULT CHARACTER SET utf8mb4 */;
USE `waimai_sys`;
-- 导出 表 waimai_sys.address 结构 -- 导出 表 waimai_sys.address 结构
DROP TABLE IF EXISTS `address`; DROP TABLE IF EXISTS `address`;
CREATE TABLE IF NOT EXISTS `address` ( CREATE TABLE IF NOT EXISTS `address` (
@ -37,7 +31,7 @@ CREATE TABLE IF NOT EXISTS `address` (
PRIMARY KEY (`id`) PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COMMENT='收货地址'; ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COMMENT='收货地址';
-- 正在导出表 waimai_sys.address 的数据:~1 rows (大约) -- 正在导出表 waimai_sys.address 的数据:~0 rows (大约)
/*!40000 ALTER TABLE `address` DISABLE KEYS */; /*!40000 ALTER TABLE `address` DISABLE KEYS */;
INSERT INTO `address` (`id`, `uid`, `username`, `phone`, `provice`, `city`, `county`, `street`, `detail`, `is_default`, `create_time`, `update_time`, `state`, `remark`) VALUES INSERT INTO `address` (`id`, `uid`, `username`, `phone`, `provice`, `city`, `county`, `street`, `detail`, `is_default`, `create_time`, `update_time`, `state`, `remark`) VALUES
(1, 1, '测试', '10086', 1, 2, 3, 4, '测试地址', 1, '2023-03-24 10:35:34', '2023-03-24 10:36:00', 1, NULL); (1, 1, '测试', '10086', 1, 2, 3, 4, '测试地址', 1, '2023-03-24 10:35:34', '2023-03-24 10:36:00', 1, NULL);
@ -67,12 +61,13 @@ CREATE TABLE IF NOT EXISTS `food` (
`state` tinyint(2) DEFAULT '1' COMMENT '状态', `state` tinyint(2) DEFAULT '1' COMMENT '状态',
`remark` varchar(200) DEFAULT NULL COMMENT '备注', `remark` varchar(200) DEFAULT NULL COMMENT '备注',
PRIMARY KEY (`id`) PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COMMENT='食品'; ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COMMENT='食品';
-- 正在导出表 waimai_sys.food 的数据:~0 rows (大约) -- 正在导出表 waimai_sys.food 的数据:~0 rows (大约)
/*!40000 ALTER TABLE `food` DISABLE KEYS */; /*!40000 ALTER TABLE `food` DISABLE KEYS */;
INSERT INTO `food` (`id`, `cid`, `title`, `cover`, `description`, `content`, `coupon`, `coupon_start_time`, `coupon_end_time`, `price`, `sort`, `area`, `recommend`, `recommend_start_time`, `recommend_end_time`, `sale_count`, `create_time`, `update_time`, `state`, `remark`) VALUES INSERT INTO `food` (`id`, `cid`, `title`, `cover`, `description`, `content`, `coupon`, `coupon_start_time`, `coupon_end_time`, `price`, `sort`, `area`, `recommend`, `recommend_start_time`, `recommend_end_time`, `sale_count`, `create_time`, `update_time`, `state`, `remark`) VALUES
(1, 1, '鱼香肉丝', '/profile/upload/2023/03/24/2fd2b7c4e877445b0cf5c953e477805d_20230324115831A002.jpeg', '鱼香肉丝(Yuxiang shredded pork) [1] ,是四川的一道特色名菜,该菜品以泡辣椒、木耳丝,子姜、大蒜、糖和醋炒制猪里脊肉丝而成,由民国时期的一位川菜大厨所创制,相传灵感来自泡椒肉丝。 鱼香肉丝是一道著名川菜,其辣咸鲜酸甜兼备,葱姜蒜香浓郁,其鱼香味是用不含鱼的调味品调制而成,此法源出于四川民间独具特色的烹鱼调味方法,而今已广泛用于川味的熟菜中.', '<p><span style="background-color: transparent;"><img src="https://st-cn.meishij.net/rs/195/107/13526945/n13526945_155420947532999.jpg" alt="美味鱼香肉丝的步骤"></span>胡萝卜切丝,青椒洗净去蒂切丝,木耳撕成小块备用。</p><p><span style="background-color: transparent;">步骤</span></p><p><span style="background-color: transparent;">step</span></p><p class="ql-align-right">2</p><p><span style="background-color: transparent;"><img src="https://st-cn.meishij.net/rs/195/107/13526945/n13526945_155420949772878.jpg" alt="美味鱼香肉丝的步骤"></span>瘦肉洗净切丝并用盐胡椒粉料酒蛋清和淀粉上浆腌制10分钟。</p><p><span style="background-color: transparent;">步骤</span></p><p><span style="background-color: transparent;">step</span></p><p class="ql-align-right">3</p><p><span style="background-color: transparent;"><img src="https://st-cn.meishij.net/rs/195/107/13526945/n13526945_155420949932004.jpg" alt="美味鱼香肉丝的步骤"></span>豆瓣酱一勺,葱姜蒜切末。</p><p><span style="background-color: transparent;">步骤</span></p><p><span style="background-color: transparent;">step</span></p><p class="ql-align-right">4</p><p><span style="background-color: transparent;"><img src="https://st-cn.meishij.net/rs/195/107/13526945/n13526945_155420950189190.jpg" alt="美味鱼香肉丝的步骤"></span>取小碗,用白糖,香醋,料酒,盐,酱油,少量清水,水淀粉兑成一个芡汁。</p><p><span style="background-color: transparent;">步骤</span></p><p><span style="background-color: transparent;">step</span></p><p class="ql-align-right">5</p><p><span style="background-color: transparent;"><img src="https://st-cn.meishij.net/rs/195/107/13526945/n13526945_155420950355279.jpg" alt="美味鱼香肉丝的步骤"></span>坐锅倒油,把浆好的肉下锅划散,炒到肉丝变白色移至盘中待用!</p><p><span style="background-color: transparent;">步骤</span></p><p><span style="background-color: transparent;">step</span></p><p class="ql-align-right">6</p><p><span style="background-color: transparent;"><img src="https://st-cn.meishij.net/rs/195/107/13526945/n13526945_155420950615053.jpg" alt="美味鱼香肉丝的步骤"></span>锅内放少许油,胡萝卜先炒两下,再扒到一边,入豆瓣酱炒香出红油!</p><p><span style="background-color: transparent;">步骤</span></p><p><span style="background-color: transparent;">step</span></p><p class="ql-align-right">7</p><p><span style="background-color: transparent;"><img src="https://st-cn.meishij.net/rs/195/107/13526945/n13526945_155420951866293.jpg" alt="美味鱼香肉丝的步骤"></span>下葱姜蒜沫和其他配料一起炒熟。</p><p><span style="background-color: transparent;">步骤</span></p><p><span style="background-color: transparent;">step</span></p><p class="ql-align-right">8</p><p><span style="background-color: transparent;"><img src="https://st-cn.meishij.net/rs/195/107/13526945/n13526945_155420954149385.jpg" alt="美味鱼香肉丝的步骤"></span>然后再下肉丝一起翻炒均匀。</p><p><span style="background-color: transparent;">步骤</span></p><p><span style="background-color: transparent;">step</span></p><p class="ql-align-right">9</p><p><span style="background-color: transparent;"><img src="https://st-cn.meishij.net/rs/195/107/13526945/n13526945_155420954516531.jpg" alt="美味鱼香肉丝的步骤"></span></p><p>最后倒入兑好的小碗汁炒均匀,出锅,一道美味可口的鱼香肉丝就做好了,希望大家能够喜欢。你学会了吗?赶快动手试一试吧。如果大家对小编的做法有什么好的建议或者是不同的看法,欢迎大家给小编留言,谢谢大家。记得关注小编,转发小编的作品。小编将一如既往的给大家提供美食教程,你的支持将是小编创作最大的动力。</p><p><br></p>', -100, NULL, '2023-03-31 00:00:00', 1700, 0, '0', 1, '2023-04-04 00:00:00', NULL, 100, '2023-03-24 12:01:01', '2023-03-24 12:10:08', 1, NULL); (1, 1, '鱼香肉丝', 'http://localhost:8080/profile/upload/2023/03/31/推荐_20230331105443A001.png', '鱼香肉丝(Yuxiang shredded pork) [1] ,是四川的一道特色名菜,该菜品以泡辣椒、木耳丝,子姜、大蒜、糖和醋炒制猪里脊肉丝而成,由民国时期的一位川菜大厨所创制,相传灵感来自泡椒肉丝。 鱼香肉丝是一道著名川菜,其辣咸鲜酸甜兼备,葱姜蒜香浓郁,其鱼香味是用不含鱼的调味品调制而成,此法源出于四川民间独具特色的烹鱼调味方法,而今已广泛用于川味的熟菜中.', '<p><span style="background-color: transparent;"><img src="https://st-cn.meishij.net/rs/195/107/13526945/n13526945_155420947532999.jpg" alt="美味鱼香肉丝的步骤"></span>胡萝卜切丝,青椒洗净去蒂切丝,木耳撕成小块备用。</p><p><span style="background-color: transparent;">步骤</span></p><p><span style="background-color: transparent;">step</span></p><p class="ql-align-right">2</p><p><span style="background-color: transparent;"><img src="https://st-cn.meishij.net/rs/195/107/13526945/n13526945_155420949772878.jpg" alt="美味鱼香肉丝的步骤"></span>瘦肉洗净切丝并用盐胡椒粉料酒蛋清和淀粉上浆腌制10分钟。</p><p><span style="background-color: transparent;">步骤</span></p><p><span style="background-color: transparent;">step</span></p><p class="ql-align-right">3</p><p><span style="background-color: transparent;"><img src="https://st-cn.meishij.net/rs/195/107/13526945/n13526945_155420949932004.jpg" alt="美味鱼香肉丝的步骤"></span>豆瓣酱一勺,葱姜蒜切末。</p><p><span style="background-color: transparent;">步骤</span></p><p><span style="background-color: transparent;">step</span></p><p class="ql-align-right">4</p><p><span style="background-color: transparent;"><img src="https://st-cn.meishij.net/rs/195/107/13526945/n13526945_155420950189190.jpg" alt="美味鱼香肉丝的步骤"></span>取小碗,用白糖,香醋,料酒,盐,酱油,少量清水,水淀粉兑成一个芡汁。</p><p><span style="background-color: transparent;">步骤</span></p><p><span style="background-color: transparent;">step</span></p><p class="ql-align-right">5</p><p><span style="background-color: transparent;"><img src="https://st-cn.meishij.net/rs/195/107/13526945/n13526945_155420950355279.jpg" alt="美味鱼香肉丝的步骤"></span>坐锅倒油,把浆好的肉下锅划散,炒到肉丝变白色移至盘中待用!</p><p><span style="background-color: transparent;">步骤</span></p><p><span style="background-color: transparent;">step</span></p><p class="ql-align-right">6</p><p><span style="background-color: transparent;"><img src="https://st-cn.meishij.net/rs/195/107/13526945/n13526945_155420950615053.jpg" alt="美味鱼香肉丝的步骤"></span>锅内放少许油,胡萝卜先炒两下,再扒到一边,入豆瓣酱炒香出红油!</p><p><span style="background-color: transparent;">步骤</span></p><p><span style="background-color: transparent;">step</span></p><p class="ql-align-right">7</p><p><span style="background-color: transparent;"><img src="https://st-cn.meishij.net/rs/195/107/13526945/n13526945_155420951866293.jpg" alt="美味鱼香肉丝的步骤"></span>下葱姜蒜沫和其他配料一起炒熟。</p><p><span style="background-color: transparent;">步骤</span></p><p><span style="background-color: transparent;">step</span></p><p class="ql-align-right">8</p><p><span style="background-color: transparent;"><img src="https://st-cn.meishij.net/rs/195/107/13526945/n13526945_155420954149385.jpg" alt="美味鱼香肉丝的步骤"></span>然后再下肉丝一起翻炒均匀。</p><p><span style="background-color: transparent;">步骤</span></p><p><span style="background-color: transparent;">step</span></p><p class="ql-align-right">9</p><p><span style="background-color: transparent;"><img src="https://st-cn.meishij.net/rs/195/107/13526945/n13526945_155420954516531.jpg" alt="美味鱼香肉丝的步骤"></span></p><p>最后倒入兑好的小碗汁炒均匀,出锅,一道美味可口的鱼香肉丝就做好了,希望大家能够喜欢。你学会了吗?赶快动手试一试吧。如果大家对小编的做法有什么好的建议或者是不同的看法,欢迎大家给小编留言,谢谢大家。记得关注小编,转发小编的作品。小编将一如既往的给大家提供美食教程,你的支持将是小编创作最大的动力。</p><p><br></p>', -100, NULL, '2023-03-31 00:00:00', 1700, 0, '0', 1, '2023-04-04 00:00:00', NULL, 100, '2023-03-24 12:01:01', '2023-03-31 10:55:17', 1, NULL),
(2, 2, '测试', 'http://localhost:8080/profile/upload/2023/03/31/推荐_20230331105443A001.png', '123', '<p>123123123</p>', 123123, '2023-03-31 10:54:50', '2023-04-12 10:54:53', 100, 1, '0', 1, NULL, NULL, 1, '2023-03-31 10:55:04', '2023-03-31 10:55:15', 1, NULL);
/*!40000 ALTER TABLE `food` ENABLE KEYS */; /*!40000 ALTER TABLE `food` ENABLE KEYS */;
-- 导出 表 waimai_sys.food_category 结构 -- 导出 表 waimai_sys.food_category 结构
@ -81,17 +76,20 @@ CREATE TABLE IF NOT EXISTS `food_category` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '食品分类编号', `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '食品分类编号',
`title` varchar(200) DEFAULT NULL COMMENT '分类标题', `title` varchar(200) DEFAULT NULL COMMENT '分类标题',
`sort` int(3) DEFAULT '0' COMMENT '排序', `sort` int(3) DEFAULT '0' COMMENT '排序',
`cover` varchar(200) DEFAULT NULL COMMENT '分类图片',
`create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_time` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', `update_time` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
`state` tinyint(2) DEFAULT '1' COMMENT '状态', `state` tinyint(2) DEFAULT '1' COMMENT '状态',
`remark` varchar(200) DEFAULT NULL COMMENT '备注', `remark` varchar(200) DEFAULT NULL COMMENT '备注',
PRIMARY KEY (`id`) PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COMMENT='食品分类'; ) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COMMENT='食品分类';
-- 正在导出表 waimai_sys.food_category 的数据:~1 rows (大约) -- 正在导出表 waimai_sys.food_category 的数据:~0 rows (大约)
/*!40000 ALTER TABLE `food_category` DISABLE KEYS */; /*!40000 ALTER TABLE `food_category` DISABLE KEYS */;
INSERT INTO `food_category` (`id`, `title`, `sort`, `create_time`, `update_time`, `state`, `remark`) VALUES INSERT INTO `food_category` (`id`, `title`, `sort`, `cover`, `create_time`, `update_time`, `state`, `remark`) VALUES
(1, '推荐菜品', 0, '2023-03-24 11:20:42', NULL, 1, NULL); (1, '推荐菜品', 0, 'http://localhost:8080/profile/upload/2023/03/31/推荐_20230331093905A002.png', '2023-03-24 11:20:42', '2023-03-31 10:27:00', 1, NULL),
(2, '家常小菜', 1, 'http://localhost:8080/profile/upload/2023/03/31/外卖_20230331094021A003.png', '2023-03-31 09:37:23', '2023-03-31 10:26:55', 1, NULL),
(3, '汉堡快餐', 2, 'http://localhost:8080/profile/upload/2023/03/31/hb_20230331103000A001.png', '2023-03-31 10:30:03', '2023-03-31 10:30:20', 1, NULL);
/*!40000 ALTER TABLE `food_category` ENABLE KEYS */; /*!40000 ALTER TABLE `food_category` ENABLE KEYS */;
-- 导出 表 waimai_sys.gen_table 结构 -- 导出 表 waimai_sys.gen_table 结构
@ -125,7 +123,7 @@ CREATE TABLE IF NOT EXISTS `gen_table` (
INSERT INTO `gen_table` (`table_id`, `table_name`, `table_comment`, `sub_table_name`, `sub_table_fk_name`, `class_name`, `tpl_category`, `package_name`, `module_name`, `business_name`, `function_name`, `function_author`, `gen_type`, `gen_path`, `options`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES INSERT INTO `gen_table` (`table_id`, `table_name`, `table_comment`, `sub_table_name`, `sub_table_fk_name`, `class_name`, `tpl_category`, `package_name`, `module_name`, `business_name`, `function_name`, `function_author`, `gen_type`, `gen_path`, `options`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES
(1, 'address', '收货地址', NULL, NULL, 'Address', 'crud', 'com.waimai.web.admin', 'admin', 'address', '收货地址', 'callmeyan', '0', '/test', '{}', 'admin', '2023-03-24 10:03:58', '', '2023-03-24 10:15:18', NULL), (1, 'address', '收货地址', NULL, NULL, 'Address', 'crud', 'com.waimai.web.admin', 'admin', 'address', '收货地址', 'callmeyan', '0', '/test', '{}', 'admin', '2023-03-24 10:03:58', '', '2023-03-24 10:15:18', NULL),
(2, 'food', '食品', NULL, NULL, 'Food', 'crud', 'com.waimai.web.admin', 'admin', 'food', '食品', 'callmeyan', '0', '/', '{"parentMenuId":"1067"}', 'admin', '2023-03-24 10:36:54', '', '2023-03-24 11:31:58', NULL), (2, 'food', '食品', NULL, NULL, 'Food', 'crud', 'com.waimai.web.admin', 'admin', 'food', '食品', 'callmeyan', '0', '/', '{"parentMenuId":"1067"}', 'admin', '2023-03-24 10:36:54', '', '2023-03-24 11:31:58', NULL),
(3, 'food_category', '食品分类', NULL, NULL, 'FoodCategory', 'crud', 'com.waimai.web.admin', 'admin', 'category', '食品分类', 'callmeyan', '0', '/', '{"parentMenuId":"1067"}', 'admin', '2023-03-24 10:36:54', '', '2023-03-24 11:23:38', NULL), (3, 'food_category', '食品分类', NULL, NULL, 'FoodCategory', 'crud', 'com.waimai.web.admin', 'admin', 'category', '食品分类', 'callmeyan', '0', '/', '{"parentMenuId":"1067"}', 'admin', '2023-03-24 10:36:54', '', '2023-03-31 09:38:13', NULL),
(4, 'order_foods', '订单商品', NULL, NULL, 'OrderFoods', 'crud', 'com.waimai.admin', 'admin', 'orderFoods', '订单商品', 'callmeyan', '0', '/', '{"parentMenuId":1067}', 'admin', '2023-03-24 10:36:54', '', '2023-03-24 10:54:53', NULL), (4, 'order_foods', '订单商品', NULL, NULL, 'OrderFoods', 'crud', 'com.waimai.admin', 'admin', 'orderFoods', '订单商品', 'callmeyan', '0', '/', '{"parentMenuId":1067}', 'admin', '2023-03-24 10:36:54', '', '2023-03-24 10:54:53', NULL),
(5, 'orders', '订单记录', 'order_foods', 'oid', 'Orders', 'sub', 'com.waimai.web.admin', 'admin', 'orders', '订单记录', 'callmeyan', '0', '/', '{"parentMenuId":1067}', 'admin', '2023-03-24 10:36:55', '', '2023-03-24 10:55:18', NULL), (5, 'orders', '订单记录', 'order_foods', 'oid', 'Orders', 'sub', 'com.waimai.web.admin', 'admin', 'orders', '订单记录', 'callmeyan', '0', '/', '{"parentMenuId":1067}', 'admin', '2023-03-24 10:36:55', '', '2023-03-24 10:55:18', NULL),
(6, 'users', '用户表', NULL, NULL, 'Users', 'crud', 'com.waimai.admin', 'admin', 'users', '用户', 'callmeyan', '0', '/', '{"parentMenuId":1067}', 'admin', '2023-03-24 10:36:55', '', '2023-03-24 10:56:25', NULL); (6, 'users', '用户表', NULL, NULL, 'Users', 'crud', 'com.waimai.admin', 'admin', 'users', '用户', 'callmeyan', '0', '/', '{"parentMenuId":1067}', 'admin', '2023-03-24 10:36:55', '', '2023-03-24 10:56:25', NULL);
@ -157,9 +155,9 @@ CREATE TABLE IF NOT EXISTS `gen_table_column` (
`update_by` varchar(64) DEFAULT '' COMMENT '更新者', `update_by` varchar(64) DEFAULT '' COMMENT '更新者',
`update_time` datetime DEFAULT NULL COMMENT '更新时间', `update_time` datetime DEFAULT NULL COMMENT '更新时间',
PRIMARY KEY (`column_id`) PRIMARY KEY (`column_id`)
) ENGINE=InnoDB AUTO_INCREMENT=71 DEFAULT CHARSET=utf8mb4 COMMENT='代码生成业务表字段'; ) ENGINE=InnoDB AUTO_INCREMENT=72 DEFAULT CHARSET=utf8mb4 COMMENT='代码生成业务表字段';
-- 正在导出表 waimai_sys.gen_table_column 的数据:~69 rows (大约) -- 正在导出表 waimai_sys.gen_table_column 的数据:~70 rows (大约)
/*!40000 ALTER TABLE `gen_table_column` DISABLE KEYS */; /*!40000 ALTER TABLE `gen_table_column` DISABLE KEYS */;
INSERT INTO `gen_table_column` (`column_id`, `table_id`, `column_name`, `column_comment`, `column_type`, `java_type`, `java_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES INSERT INTO `gen_table_column` (`column_id`, `table_id`, `column_name`, `column_comment`, `column_type`, `java_type`, `java_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES
(1, '1', 'id', '地址编号', 'int(11)', 'Long', 'id', '1', '1', NULL, '1', NULL, NULL, NULL, 'EQ', 'input', '', 1, 'admin', '2023-03-24 10:03:58', '', '2023-03-24 10:15:18'), (1, '1', 'id', '地址编号', 'int(11)', 'Long', 'id', '1', '1', NULL, '1', NULL, NULL, NULL, 'EQ', 'input', '', 1, 'admin', '2023-03-24 10:03:58', '', '2023-03-24 10:15:18'),
@ -195,13 +193,13 @@ INSERT INTO `gen_table_column` (`column_id`, `table_id`, `column_name`, `column_
(31, '2', 'update_time', '更新时间', 'datetime', 'Date', 'updateTime', '0', '0', NULL, '0', '0', '0', NULL, 'EQ', 'datetime', '', 18, 'admin', '2023-03-24 10:36:54', '', '2023-03-24 11:31:58'), (31, '2', 'update_time', '更新时间', 'datetime', 'Date', 'updateTime', '0', '0', NULL, '0', '0', '0', NULL, 'EQ', 'datetime', '', 18, 'admin', '2023-03-24 10:36:54', '', '2023-03-24 11:31:58'),
(32, '2', 'state', '状态', 'tinyint(2)', 'Integer', 'state', '0', '0', NULL, '1', '1', '1', '1', 'EQ', 'select', 'data_state', 19, 'admin', '2023-03-24 10:36:54', '', '2023-03-24 11:31:58'), (32, '2', 'state', '状态', 'tinyint(2)', 'Integer', 'state', '0', '0', NULL, '1', '1', '1', '1', 'EQ', 'select', 'data_state', 19, 'admin', '2023-03-24 10:36:54', '', '2023-03-24 11:31:58'),
(33, '2', 'remark', '备注', 'varchar(200)', 'String', 'remark', '0', '0', NULL, '1', '1', '0', NULL, 'EQ', 'textarea', '', 20, 'admin', '2023-03-24 10:36:54', '', '2023-03-24 11:31:58'), (33, '2', 'remark', '备注', 'varchar(200)', 'String', 'remark', '0', '0', NULL, '1', '1', '0', NULL, 'EQ', 'textarea', '', 20, 'admin', '2023-03-24 10:36:54', '', '2023-03-24 11:31:58'),
(34, '3', 'id', '编号', 'int(11)', 'Long', 'id', '1', '1', NULL, '1', NULL, NULL, NULL, 'EQ', 'input', '', 1, 'admin', '2023-03-24 10:36:54', '', '2023-03-24 11:23:38'), (34, '3', 'id', '食品分类编号', 'int(11)', 'Long', 'id', '1', '1', NULL, '1', NULL, NULL, NULL, 'EQ', 'input', '', 1, 'admin', '2023-03-24 10:36:54', '', '2023-03-31 09:38:13'),
(35, '3', 'title', '分类名称', 'varchar(200)', 'String', 'title', '0', '0', NULL, '1', '1', '1', '1', 'LIKE', 'input', '', 2, 'admin', '2023-03-24 10:36:54', '', '2023-03-24 11:23:38'), (35, '3', 'title', '分类标题', 'varchar(200)', 'String', 'title', '0', '0', NULL, '1', '1', '1', '1', 'LIKE', 'input', '', 2, 'admin', '2023-03-24 10:36:54', '', '2023-03-31 09:38:13'),
(36, '3', 'sort', '排序', 'int(3)', 'Integer', 'sort', '0', '0', NULL, '1', '1', '1', '0', 'EQ', 'input', '', 3, 'admin', '2023-03-24 10:36:54', '', '2023-03-24 11:23:38'), (36, '3', 'sort', '排序', 'int(3)', 'Integer', 'sort', '0', '0', NULL, '1', '1', '1', '1', 'EQ', 'input', '', 3, 'admin', '2023-03-24 10:36:54', '', '2023-03-31 09:38:13'),
(37, '3', 'create_time', '创建时间', 'datetime', 'Date', 'createTime', '0', '0', NULL, '0', NULL, NULL, NULL, 'EQ', 'datetime', '', 4, 'admin', '2023-03-24 10:36:54', '', '2023-03-24 11:23:38'), (37, '3', 'create_time', '创建时间', 'datetime', 'Date', 'createTime', '0', '0', NULL, '0', NULL, NULL, NULL, 'EQ', 'datetime', '', 5, 'admin', '2023-03-24 10:36:54', '', '2023-03-31 09:38:13'),
(38, '3', 'update_time', '更新时间', 'datetime', 'Date', 'updateTime', '0', '0', NULL, '0', '0', NULL, NULL, 'EQ', 'datetime', '', 5, 'admin', '2023-03-24 10:36:54', '', '2023-03-24 11:23:38'), (38, '3', 'update_time', '更新时间', 'datetime', 'Date', 'updateTime', '0', '0', NULL, '0', '0', '1', NULL, 'EQ', 'datetime', '', 6, 'admin', '2023-03-24 10:36:54', '', '2023-03-31 09:38:13'),
(39, '3', 'state', '状态', 'tinyint(2)', 'Integer', 'state', '0', '0', NULL, '0', '0', '1', '0', 'EQ', 'radio', 'data_state', 6, 'admin', '2023-03-24 10:36:54', '', '2023-03-24 11:23:38'), (39, '3', 'state', '状态', 'tinyint(2)', 'Integer', 'state', '0', '0', NULL, '1', '1', '1', '1', 'EQ', 'select', 'data_state', 7, 'admin', '2023-03-24 10:36:54', '', '2023-03-31 09:38:13'),
(40, '3', 'remark', '备注', 'varchar(200)', 'String', 'remark', '0', '0', NULL, '1', '1', '1', NULL, 'EQ', 'input', '', 7, 'admin', '2023-03-24 10:36:54', '', '2023-03-24 11:23:38'), (40, '3', 'remark', '备注', 'varchar(200)', 'String', 'remark', '0', '0', NULL, '1', '1', '1', NULL, 'EQ', 'input', '', 8, 'admin', '2023-03-24 10:36:54', '', '2023-03-31 09:38:13'),
(41, '4', 'id', '编号', 'int(11)', 'Long', 'id', '1', '1', NULL, '1', NULL, NULL, NULL, 'EQ', 'input', '', 1, 'admin', '2023-03-24 10:36:54', '', '2023-03-24 10:54:53'), (41, '4', 'id', '编号', 'int(11)', 'Long', 'id', '1', '1', NULL, '1', NULL, NULL, NULL, 'EQ', 'input', '', 1, 'admin', '2023-03-24 10:36:54', '', '2023-03-24 10:54:53'),
(42, '4', 'oid', '订单编号', 'varchar(50)', 'String', 'oid', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 2, 'admin', '2023-03-24 10:36:54', '', '2023-03-24 10:54:53'), (42, '4', 'oid', '订单编号', 'varchar(50)', 'String', 'oid', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 2, 'admin', '2023-03-24 10:36:54', '', '2023-03-24 10:54:53'),
(43, '4', 'fid', '食品编号', 'int(11)', 'Long', 'fid', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 3, 'admin', '2023-03-24 10:36:54', '', '2023-03-24 10:54:53'), (43, '4', 'fid', '食品编号', 'int(11)', 'Long', 'fid', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 3, 'admin', '2023-03-24 10:36:54', '', '2023-03-24 10:54:53'),
@ -231,7 +229,8 @@ INSERT INTO `gen_table_column` (`column_id`, `table_id`, `column_name`, `column_
(67, '6', 'update_time', '更新时间', 'datetime', 'Date', 'updateTime', '0', '0', NULL, '0', '0', NULL, NULL, 'EQ', 'datetime', '', 6, 'admin', '2023-03-24 10:36:55', '', '2023-03-24 10:56:25'), (67, '6', 'update_time', '更新时间', 'datetime', 'Date', 'updateTime', '0', '0', NULL, '0', '0', NULL, NULL, 'EQ', 'datetime', '', 6, 'admin', '2023-03-24 10:36:55', '', '2023-03-24 10:56:25'),
(68, '6', 'state', '状态', 'tinyint(2)', 'Integer', 'state', '0', '0', NULL, '0', '0', '1', '1', 'EQ', 'input', 'data_state', 7, 'admin', '2023-03-24 10:36:55', '', '2023-03-24 10:56:25'), (68, '6', 'state', '状态', 'tinyint(2)', 'Integer', 'state', '0', '0', NULL, '0', '0', '1', '1', 'EQ', 'input', 'data_state', 7, 'admin', '2023-03-24 10:36:55', '', '2023-03-24 10:56:25'),
(69, '6', 'remark', '备注', 'varchar(200)', 'String', 'remark', '0', '0', NULL, '1', '1', '1', NULL, 'EQ', 'input', '', 8, 'admin', '2023-03-24 10:36:55', '', '2023-03-24 10:56:25'), (69, '6', 'remark', '备注', 'varchar(200)', 'String', 'remark', '0', '0', NULL, '1', '1', '1', NULL, 'EQ', 'input', '', 8, 'admin', '2023-03-24 10:36:55', '', '2023-03-24 10:56:25'),
(70, '2', 'cover', '商品主图', 'varchar(500)', 'String', 'cover', '0', '0', NULL, '1', '1', '1', '0', 'EQ', 'imageUpload', '', 4, '', '2023-03-24 11:27:41', '', '2023-03-24 11:31:58'); (70, '2', 'cover', '商品主图', 'varchar(500)', 'String', 'cover', '0', '0', NULL, '1', '1', '1', '0', 'EQ', 'imageUpload', '', 4, '', '2023-03-24 11:27:41', '', '2023-03-24 11:31:58'),
(71, '3', 'cover', '分类图片', 'varchar(200)', 'String', 'cover', '0', '0', NULL, '1', '1', '1', '0', 'EQ', 'imageUpload', '', 4, '', '2023-03-31 09:27:51', '', '2023-03-31 09:38:13');
/*!40000 ALTER TABLE `gen_table_column` ENABLE KEYS */; /*!40000 ALTER TABLE `gen_table_column` ENABLE KEYS */;
-- 导出 表 waimai_sys.orders 结构 -- 导出 表 waimai_sys.orders 结构
@ -686,14 +685,19 @@ CREATE TABLE IF NOT EXISTS `sys_logininfor` (
PRIMARY KEY (`info_id`), PRIMARY KEY (`info_id`),
KEY `idx_sys_logininfor_s` (`status`), KEY `idx_sys_logininfor_s` (`status`),
KEY `idx_sys_logininfor_lt` (`login_time`) KEY `idx_sys_logininfor_lt` (`login_time`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COMMENT='系统访问记录'; ) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8mb4 COMMENT='系统访问记录';
-- 正在导出表 waimai_sys.sys_logininfor 的数据:~3 rows (大约) -- 正在导出表 waimai_sys.sys_logininfor 的数据:~3 rows (大约)
/*!40000 ALTER TABLE `sys_logininfor` DISABLE KEYS */; /*!40000 ALTER TABLE `sys_logininfor` DISABLE KEYS */;
INSERT INTO `sys_logininfor` (`info_id`, `user_name`, `ipaddr`, `login_location`, `browser`, `os`, `status`, `msg`, `login_time`) VALUES INSERT INTO `sys_logininfor` (`info_id`, `user_name`, `ipaddr`, `login_location`, `browser`, `os`, `status`, `msg`, `login_time`) VALUES
(1, 'admin', '127.0.0.1', '内网IP', 'Chrome 11', 'Windows 10', '0', '登录成功', '2023-03-24 09:56:29'), (1, 'admin', '127.0.0.1', '内网IP', 'Chrome 11', 'Windows 10', '0', '登录成功', '2023-03-24 09:56:29'),
(2, 'admin', '127.0.0.1', '内网IP', 'Chrome 11', 'Windows 10', '0', '登录成功', '2023-03-24 10:03:37'), (2, 'admin', '127.0.0.1', '内网IP', 'Chrome 11', 'Windows 10', '0', '登录成功', '2023-03-24 10:03:37'),
(3, 'admin', '127.0.0.1', '内网IP', 'Chrome 11', 'Windows 10', '0', '登录成功', '2023-03-24 10:12:53'); (3, 'admin', '127.0.0.1', '内网IP', 'Chrome 11', 'Windows 10', '0', '登录成功', '2023-03-24 10:12:53'),
(4, 'admin', '127.0.0.1', '内网IP', 'Chrome 11', 'Windows 10', '0', '登录成功', '2023-03-31 09:27:31'),
(5, 'admin', '127.0.0.1', '内网IP', 'Chrome 11', 'Windows 10', '0', '登录成功', '2023-03-31 09:34:49'),
(6, 'admin', '127.0.0.1', '内网IP', 'Chrome 11', 'Windows 10', '1', '验证码错误', '2023-03-31 10:11:38'),
(7, 'admin', '127.0.0.1', '内网IP', 'Chrome 11', 'Windows 10', '1', '验证码错误', '2023-03-31 10:11:46'),
(8, 'admin', '127.0.0.1', '内网IP', 'Chrome 11', 'Windows 10', '0', '登录成功', '2023-03-31 10:11:51');
/*!40000 ALTER TABLE `sys_logininfor` ENABLE KEYS */; /*!40000 ALTER TABLE `sys_logininfor` ENABLE KEYS */;
-- 导出 表 waimai_sys.sys_menu 结构 -- 导出 表 waimai_sys.sys_menu 结构
@ -895,9 +899,9 @@ CREATE TABLE IF NOT EXISTS `sys_oper_log` (
KEY `idx_sys_oper_log_bt` (`business_type`), KEY `idx_sys_oper_log_bt` (`business_type`),
KEY `idx_sys_oper_log_s` (`status`), KEY `idx_sys_oper_log_s` (`status`),
KEY `idx_sys_oper_log_ot` (`oper_time`) KEY `idx_sys_oper_log_ot` (`oper_time`)
) ENGINE=InnoDB AUTO_INCREMENT=55 DEFAULT CHARSET=utf8mb4 COMMENT='操作日志记录'; ) ENGINE=InnoDB AUTO_INCREMENT=65 DEFAULT CHARSET=utf8mb4 COMMENT='操作日志记录';
-- 正在导出表 waimai_sys.sys_oper_log 的数据:~49 rows (大约) -- 正在导出表 waimai_sys.sys_oper_log 的数据:~54 rows (大约)
/*!40000 ALTER TABLE `sys_oper_log` DISABLE KEYS */; /*!40000 ALTER TABLE `sys_oper_log` DISABLE KEYS */;
INSERT INTO `sys_oper_log` (`oper_id`, `title`, `business_type`, `method`, `request_method`, `operator_type`, `oper_name`, `dept_name`, `oper_url`, `oper_ip`, `oper_location`, `oper_param`, `json_result`, `status`, `error_msg`, `oper_time`, `cost_time`) VALUES INSERT INTO `sys_oper_log` (`oper_id`, `title`, `business_type`, `method`, `request_method`, `operator_type`, `oper_name`, `dept_name`, `oper_url`, `oper_ip`, `oper_location`, `oper_param`, `json_result`, `status`, `error_msg`, `oper_time`, `cost_time`) VALUES
(1, '代码生成', 6, 'com.waimai.generator.controller.GenController.importTableSave()', 'POST', 1, 'admin', NULL, '/tool/gen/importTable', '127.0.0.1', '内网IP', '{"tables":"address"}', '{"msg":"操作成功","code":200}', 0, NULL, '2023-03-24 10:03:58', 181), (1, '代码生成', 6, 'com.waimai.generator.controller.GenController.importTableSave()', 'POST', 1, 'admin', NULL, '/tool/gen/importTable', '127.0.0.1', '内网IP', '{"tables":"address"}', '{"msg":"操作成功","code":200}', 0, NULL, '2023-03-24 10:03:58', 181),
@ -953,7 +957,17 @@ INSERT INTO `sys_oper_log` (`oper_id`, `title`, `business_type`, `method`, `requ
(51, '代码生成', 2, 'com.waimai.generator.controller.GenController.editSave()', 'PUT', 1, 'admin', NULL, '/tool/gen', '127.0.0.1', '内网IP', '{"businessName":"food","className":"Food","columns":[{"capJavaField":"Id","columnComment":"食品编号","columnId":15,"columnName":"id","columnType":"int(11)","createBy":"admin","createTime":"2023-03-24 10:36:54","dictType":"","edit":false,"htmlType":"input","increment":true,"insert":false,"isIncrement":"1","isInsert":"0","isPk":"1","javaField":"id","javaType":"Long","list":false,"params":{},"pk":true,"query":false,"queryType":"EQ","required":false,"sort":1,"superColumn":false,"tableId":2,"updateBy":"","updateTime":"2023-03-24 11:27:41","usableColumn":false},{"capJavaField":"Cid","columnComment":"分类编号","columnId":16,"columnName":"cid","columnType":"int(11)","createBy":"admin","createTime":"2023-03-24 10:36:54","dictType":"","edit":true,"htmlType":"select","increment":false,"insert":true,"isEdit":"1","isIncrement":"0","isInsert":"1","isList":"1","isPk":"0","isQuery":"1","javaField":"cid","javaType":"Long","list":true,"params":{},"pk":false,"query":true,"queryType":"EQ","required":false,"sort":2,"superColumn":false,"tableId":2,"updateBy":"","updateTime":"2023-03-24 11:27:41","usableColumn":false},{"capJavaField":"Title","columnComment":"食品标题","columnId":17,"columnName":"title","columnType":"varchar(500)","createBy":"admin","createTime":"2023-03-24 10:36:54","dictType":"","edit":true,"htmlType":"input","increment":false,"insert":true,"isEdit":"1","isIncrement":"0","isInsert":"1","isList":"1","isPk":"0","isQuery":"1","javaField":"title","javaType":"String","list":true,"params":{},"pk":false,"query":true,"queryType":"LIKE","required":false,"sort":3,"superColumn":false,"tableId":2,"updateBy":"","updateTime":"2023-03-24 11:27:41","usableColumn":false},{"capJavaField":"Cover","columnComment":"商品主图","columnId":70,"columnName":"cover","columnType":"varchar(500)","createBy":"","createTime":"2023-03-24 11:27:41","dictType":"","edit":true,"htmlType":"imageUpload","increment":false,"insert":true,"isEdit":"1","isIncrement":"0","isInsert":"1","isList":"1","isPk":"0","isQuery":"0","javaFie', '{"msg":"操作成功","code":200}', 0, NULL, '2023-03-24 11:31:58', 66), (51, '代码生成', 2, 'com.waimai.generator.controller.GenController.editSave()', 'PUT', 1, 'admin', NULL, '/tool/gen', '127.0.0.1', '内网IP', '{"businessName":"food","className":"Food","columns":[{"capJavaField":"Id","columnComment":"食品编号","columnId":15,"columnName":"id","columnType":"int(11)","createBy":"admin","createTime":"2023-03-24 10:36:54","dictType":"","edit":false,"htmlType":"input","increment":true,"insert":false,"isIncrement":"1","isInsert":"0","isPk":"1","javaField":"id","javaType":"Long","list":false,"params":{},"pk":true,"query":false,"queryType":"EQ","required":false,"sort":1,"superColumn":false,"tableId":2,"updateBy":"","updateTime":"2023-03-24 11:27:41","usableColumn":false},{"capJavaField":"Cid","columnComment":"分类编号","columnId":16,"columnName":"cid","columnType":"int(11)","createBy":"admin","createTime":"2023-03-24 10:36:54","dictType":"","edit":true,"htmlType":"select","increment":false,"insert":true,"isEdit":"1","isIncrement":"0","isInsert":"1","isList":"1","isPk":"0","isQuery":"1","javaField":"cid","javaType":"Long","list":true,"params":{},"pk":false,"query":true,"queryType":"EQ","required":false,"sort":2,"superColumn":false,"tableId":2,"updateBy":"","updateTime":"2023-03-24 11:27:41","usableColumn":false},{"capJavaField":"Title","columnComment":"食品标题","columnId":17,"columnName":"title","columnType":"varchar(500)","createBy":"admin","createTime":"2023-03-24 10:36:54","dictType":"","edit":true,"htmlType":"input","increment":false,"insert":true,"isEdit":"1","isIncrement":"0","isInsert":"1","isList":"1","isPk":"0","isQuery":"1","javaField":"title","javaType":"String","list":true,"params":{},"pk":false,"query":true,"queryType":"LIKE","required":false,"sort":3,"superColumn":false,"tableId":2,"updateBy":"","updateTime":"2023-03-24 11:27:41","usableColumn":false},{"capJavaField":"Cover","columnComment":"商品主图","columnId":70,"columnName":"cover","columnType":"varchar(500)","createBy":"","createTime":"2023-03-24 11:27:41","dictType":"","edit":true,"htmlType":"imageUpload","increment":false,"insert":true,"isEdit":"1","isIncrement":"0","isInsert":"1","isList":"1","isPk":"0","isQuery":"0","javaFie', '{"msg":"操作成功","code":200}', 0, NULL, '2023-03-24 11:31:58', 66),
(52, '代码生成', 8, 'com.waimai.generator.controller.GenController.batchGenCode()', 'GET', 1, 'admin', NULL, '/tool/gen/batchGenCode', '127.0.0.1', '内网IP', '{"tables":"food"}', NULL, 0, NULL, '2023-03-24 11:32:02', 558), (52, '代码生成', 8, 'com.waimai.generator.controller.GenController.batchGenCode()', 'GET', 1, 'admin', NULL, '/tool/gen/batchGenCode', '127.0.0.1', '内网IP', '{"tables":"food"}', NULL, 0, NULL, '2023-03-24 11:32:02', 558),
(53, '食品', 1, 'com.waimai.web.admin.controller.FoodController.add()', 'POST', 1, 'admin', NULL, '/admin/food', '127.0.0.1', '内网IP', '{"content":"<p><span style=\\"background-color: transparent;\\"><img src=\\"https://st-cn.meishij.net/rs/195/107/13526945/n13526945_155420947532999.jpg\\" alt=\\"美味鱼香肉丝的步骤\\"></span>胡萝卜切丝,青椒洗净去蒂切丝,木耳撕成小块备用。</p><p><span style=\\"background-color: transparent;\\">步骤</span></p><p><span style=\\"background-color: transparent;\\">step</span></p><p class=\\"ql-align-right\\">2</p><p><span style=\\"background-color: transparent;\\"><img src=\\"https://st-cn.meishij.net/rs/195/107/13526945/n13526945_155420949772878.jpg\\" alt=\\"美味鱼香肉丝的步骤\\"></span>瘦肉洗净切丝并用盐胡椒粉料酒蛋清和淀粉上浆腌制10分钟。</p><p><span style=\\"background-color: transparent;\\">步骤</span></p><p><span style=\\"background-color: transparent;\\">step</span></p><p class=\\"ql-align-right\\">3</p><p><span style=\\"background-color: transparent;\\"><img src=\\"https://st-cn.meishij.net/rs/195/107/13526945/n13526945_155420949932004.jpg\\" alt=\\"美味鱼香肉丝的步骤\\"></span>豆瓣酱一勺,葱姜蒜切末。</p><p><span style=\\"background-color: transparent;\\">步骤</span></p><p><span style=\\"background-color: transparent;\\">step</span></p><p class=\\"ql-align-right\\">4</p><p><span style=\\"background-color: transparent;\\"><img src=\\"https://st-cn.meishij.net/rs/195/107/13526945/n13526945_155420950189190.jpg\\" alt=\\"美味鱼香肉丝的步骤\\"></span>取小碗,用白糖,香醋,料酒,盐,酱油,少量清水,水淀粉兑成一个芡汁。</p><p><span style=\\"background-color: transparent;\\">步骤</span></p><p><span style=\\"background-color: transparent;\\">step</span></p><p class=\\"ql-align-right\\">5</p><p><span style=\\"background-color: transparent;\\"><img src=\\"https://st-cn.meishij.net/rs/195/107/13526945/n13526945_155420950355279.jpg\\" alt=\\"美味鱼香肉丝的步骤\\"></span>坐锅倒油,把浆好的肉下锅划散,炒到肉丝变白色移至盘中待用!</p><p><span style=\\"background-color: transparent;\\">步骤</span></p><p><span style=\\"background-color: transparent;\\">step</span></p><p class=\\"ql-align-right\\">6</p><p><span style=\\"background-color: transparent;\\"><img src=\\"https://st-cn.meishij.net/rs/195/107/13526945/n13526945_155420950615053.jpg\\" alt=\\"美味鱼香肉丝的步骤\\"></span>锅内放少许油,胡萝卜先炒两下,再扒到一边,入豆瓣酱炒香出红油!</p><p><span sty', '{"msg":"操作成功","code":200}', 0, NULL, '2023-03-24 12:01:00', 259), (53, '食品', 1, 'com.waimai.web.admin.controller.FoodController.add()', 'POST', 1, 'admin', NULL, '/admin/food', '127.0.0.1', '内网IP', '{"content":"<p><span style=\\"background-color: transparent;\\"><img src=\\"https://st-cn.meishij.net/rs/195/107/13526945/n13526945_155420947532999.jpg\\" alt=\\"美味鱼香肉丝的步骤\\"></span>胡萝卜切丝,青椒洗净去蒂切丝,木耳撕成小块备用。</p><p><span style=\\"background-color: transparent;\\">步骤</span></p><p><span style=\\"background-color: transparent;\\">step</span></p><p class=\\"ql-align-right\\">2</p><p><span style=\\"background-color: transparent;\\"><img src=\\"https://st-cn.meishij.net/rs/195/107/13526945/n13526945_155420949772878.jpg\\" alt=\\"美味鱼香肉丝的步骤\\"></span>瘦肉洗净切丝并用盐胡椒粉料酒蛋清和淀粉上浆腌制10分钟。</p><p><span style=\\"background-color: transparent;\\">步骤</span></p><p><span style=\\"background-color: transparent;\\">step</span></p><p class=\\"ql-align-right\\">3</p><p><span style=\\"background-color: transparent;\\"><img src=\\"https://st-cn.meishij.net/rs/195/107/13526945/n13526945_155420949932004.jpg\\" alt=\\"美味鱼香肉丝的步骤\\"></span>豆瓣酱一勺,葱姜蒜切末。</p><p><span style=\\"background-color: transparent;\\">步骤</span></p><p><span style=\\"background-color: transparent;\\">step</span></p><p class=\\"ql-align-right\\">4</p><p><span style=\\"background-color: transparent;\\"><img src=\\"https://st-cn.meishij.net/rs/195/107/13526945/n13526945_155420950189190.jpg\\" alt=\\"美味鱼香肉丝的步骤\\"></span>取小碗,用白糖,香醋,料酒,盐,酱油,少量清水,水淀粉兑成一个芡汁。</p><p><span style=\\"background-color: transparent;\\">步骤</span></p><p><span style=\\"background-color: transparent;\\">step</span></p><p class=\\"ql-align-right\\">5</p><p><span style=\\"background-color: transparent;\\"><img src=\\"https://st-cn.meishij.net/rs/195/107/13526945/n13526945_155420950355279.jpg\\" alt=\\"美味鱼香肉丝的步骤\\"></span>坐锅倒油,把浆好的肉下锅划散,炒到肉丝变白色移至盘中待用!</p><p><span style=\\"background-color: transparent;\\">步骤</span></p><p><span style=\\"background-color: transparent;\\">step</span></p><p class=\\"ql-align-right\\">6</p><p><span style=\\"background-color: transparent;\\"><img src=\\"https://st-cn.meishij.net/rs/195/107/13526945/n13526945_155420950615053.jpg\\" alt=\\"美味鱼香肉丝的步骤\\"></span>锅内放少许油,胡萝卜先炒两下,再扒到一边,入豆瓣酱炒香出红油!</p><p><span sty', '{"msg":"操作成功","code":200}', 0, NULL, '2023-03-24 12:01:00', 259),
(54, '食品', 2, 'com.waimai.web.admin.controller.FoodController.edit()', 'PUT', 1, 'admin', NULL, '/admin/food', '127.0.0.1', '内网IP', '{"area":"0","cid":1,"content":"<p><span style=\\"background-color: transparent;\\"><img src=\\"https://st-cn.meishij.net/rs/195/107/13526945/n13526945_155420947532999.jpg\\" alt=\\"美味鱼香肉丝的步骤\\"></span>胡萝卜切丝,青椒洗净去蒂切丝,木耳撕成小块备用。</p><p><span style=\\"background-color: transparent;\\">步骤</span></p><p><span style=\\"background-color: transparent;\\">step</span></p><p class=\\"ql-align-right\\">2</p><p><span style=\\"background-color: transparent;\\"><img src=\\"https://st-cn.meishij.net/rs/195/107/13526945/n13526945_155420949772878.jpg\\" alt=\\"美味鱼香肉丝的步骤\\"></span>瘦肉洗净切丝并用盐胡椒粉料酒蛋清和淀粉上浆腌制10分钟。</p><p><span style=\\"background-color: transparent;\\">步骤</span></p><p><span style=\\"background-color: transparent;\\">step</span></p><p class=\\"ql-align-right\\">3</p><p><span style=\\"background-color: transparent;\\"><img src=\\"https://st-cn.meishij.net/rs/195/107/13526945/n13526945_155420949932004.jpg\\" alt=\\"美味鱼香肉丝的步骤\\"></span>豆瓣酱一勺,葱姜蒜切末。</p><p><span style=\\"background-color: transparent;\\">步骤</span></p><p><span style=\\"background-color: transparent;\\">step</span></p><p class=\\"ql-align-right\\">4</p><p><span style=\\"background-color: transparent;\\"><img src=\\"https://st-cn.meishij.net/rs/195/107/13526945/n13526945_155420950189190.jpg\\" alt=\\"美味鱼香肉丝的步骤\\"></span>取小碗,用白糖,香醋,料酒,盐,酱油,少量清水,水淀粉兑成一个芡汁。</p><p><span style=\\"background-color: transparent;\\">步骤</span></p><p><span style=\\"background-color: transparent;\\">step</span></p><p class=\\"ql-align-right\\">5</p><p><span style=\\"background-color: transparent;\\"><img src=\\"https://st-cn.meishij.net/rs/195/107/13526945/n13526945_155420950355279.jpg\\" alt=\\"美味鱼香肉丝的步骤\\"></span>坐锅倒油,把浆好的肉下锅划散,炒到肉丝变白色移至盘中待用!</p><p><span style=\\"background-color: transparent;\\">步骤</span></p><p><span style=\\"background-color: transparent;\\">step</span></p><p class=\\"ql-align-right\\">6</p><p><span style=\\"background-color: transparent;\\"><img src=\\"https://st-cn.meishij.net/rs/195/107/13526945/n13526945_155420950615053.jpg\\" alt=\\"美味鱼香肉丝的步骤\\"></span>锅内放少许油,胡萝卜先炒两下,再扒到一边,入豆瓣酱炒香出', '{"msg":"操作成功","code":200}', 0, NULL, '2023-03-24 12:10:07', 10); (54, '食品', 2, 'com.waimai.web.admin.controller.FoodController.edit()', 'PUT', 1, 'admin', NULL, '/admin/food', '127.0.0.1', '内网IP', '{"area":"0","cid":1,"content":"<p><span style=\\"background-color: transparent;\\"><img src=\\"https://st-cn.meishij.net/rs/195/107/13526945/n13526945_155420947532999.jpg\\" alt=\\"美味鱼香肉丝的步骤\\"></span>胡萝卜切丝,青椒洗净去蒂切丝,木耳撕成小块备用。</p><p><span style=\\"background-color: transparent;\\">步骤</span></p><p><span style=\\"background-color: transparent;\\">step</span></p><p class=\\"ql-align-right\\">2</p><p><span style=\\"background-color: transparent;\\"><img src=\\"https://st-cn.meishij.net/rs/195/107/13526945/n13526945_155420949772878.jpg\\" alt=\\"美味鱼香肉丝的步骤\\"></span>瘦肉洗净切丝并用盐胡椒粉料酒蛋清和淀粉上浆腌制10分钟。</p><p><span style=\\"background-color: transparent;\\">步骤</span></p><p><span style=\\"background-color: transparent;\\">step</span></p><p class=\\"ql-align-right\\">3</p><p><span style=\\"background-color: transparent;\\"><img src=\\"https://st-cn.meishij.net/rs/195/107/13526945/n13526945_155420949932004.jpg\\" alt=\\"美味鱼香肉丝的步骤\\"></span>豆瓣酱一勺,葱姜蒜切末。</p><p><span style=\\"background-color: transparent;\\">步骤</span></p><p><span style=\\"background-color: transparent;\\">step</span></p><p class=\\"ql-align-right\\">4</p><p><span style=\\"background-color: transparent;\\"><img src=\\"https://st-cn.meishij.net/rs/195/107/13526945/n13526945_155420950189190.jpg\\" alt=\\"美味鱼香肉丝的步骤\\"></span>取小碗,用白糖,香醋,料酒,盐,酱油,少量清水,水淀粉兑成一个芡汁。</p><p><span style=\\"background-color: transparent;\\">步骤</span></p><p><span style=\\"background-color: transparent;\\">step</span></p><p class=\\"ql-align-right\\">5</p><p><span style=\\"background-color: transparent;\\"><img src=\\"https://st-cn.meishij.net/rs/195/107/13526945/n13526945_155420950355279.jpg\\" alt=\\"美味鱼香肉丝的步骤\\"></span>坐锅倒油,把浆好的肉下锅划散,炒到肉丝变白色移至盘中待用!</p><p><span style=\\"background-color: transparent;\\">步骤</span></p><p><span style=\\"background-color: transparent;\\">step</span></p><p class=\\"ql-align-right\\">6</p><p><span style=\\"background-color: transparent;\\"><img src=\\"https://st-cn.meishij.net/rs/195/107/13526945/n13526945_155420950615053.jpg\\" alt=\\"美味鱼香肉丝的步骤\\"></span>锅内放少许油,胡萝卜先炒两下,再扒到一边,入豆瓣酱炒香出', '{"msg":"操作成功","code":200}', 0, NULL, '2023-03-24 12:10:07', 10),
(55, '代码生成', 2, 'com.waimai.generator.controller.GenController.synchDb()', 'GET', 1, 'admin', NULL, '/tool/gen/synchDb/food_category', '127.0.0.1', '内网IP', '{}', '{"msg":"操作成功","code":200}', 0, NULL, '2023-03-31 09:27:51', 170),
(56, '代码生成', 2, 'com.waimai.generator.controller.GenController.editSave()', 'PUT', 1, 'admin', NULL, '/tool/gen', '127.0.0.1', '内网IP', '{"businessName":"category","className":"FoodCategory","columns":[{"capJavaField":"Id","columnComment":"食品分类编号","columnId":34,"columnName":"id","columnType":"int(11)","createBy":"admin","createTime":"2023-03-24 10:36:54","dictType":"","edit":false,"htmlType":"input","increment":true,"insert":true,"isIncrement":"1","isInsert":"1","isPk":"1","javaField":"id","javaType":"Long","list":false,"params":{},"pk":true,"query":false,"queryType":"EQ","required":false,"sort":1,"superColumn":false,"tableId":3,"updateBy":"","updateTime":"2023-03-31 09:27:51","usableColumn":false},{"capJavaField":"Title","columnComment":"分类标题","columnId":35,"columnName":"title","columnType":"varchar(200)","createBy":"admin","createTime":"2023-03-24 10:36:54","dictType":"","edit":true,"htmlType":"input","increment":false,"insert":true,"isEdit":"1","isIncrement":"0","isInsert":"1","isList":"1","isPk":"0","isQuery":"1","javaField":"title","javaType":"String","list":true,"params":{},"pk":false,"query":true,"queryType":"LIKE","required":false,"sort":2,"superColumn":false,"tableId":3,"updateBy":"","updateTime":"2023-03-31 09:27:51","usableColumn":false},{"capJavaField":"Sort","columnComment":"排序","columnId":36,"columnName":"sort","columnType":"int(3)","createBy":"admin","createTime":"2023-03-24 10:36:54","dictType":"","edit":true,"htmlType":"input","increment":false,"insert":true,"isEdit":"1","isIncrement":"0","isInsert":"1","isList":"1","isPk":"0","isQuery":"1","javaField":"sort","javaType":"Integer","list":true,"params":{},"pk":false,"query":true,"queryType":"EQ","required":false,"sort":3,"superColumn":false,"tableId":3,"updateBy":"","updateTime":"2023-03-31 09:27:51","usableColumn":false},{"capJavaField":"Cover","columnComment":"分类图片","columnId":71,"columnName":"cover","columnType":"varchar(200)","createBy":"","createTime":"2023-03-31 09:27:51","dictType":"","edit":true,"htmlType":"imageUpload","increment":false,"insert":true,"isEdit":"1","isIncrement":"0","isInsert":"1","isList":"1","isPk":"0","isQuer', '{"msg":"操作成功","code":200}', 0, NULL, '2023-03-31 09:28:12', 46),
(57, '代码生成', 8, 'com.waimai.generator.controller.GenController.batchGenCode()', 'GET', 1, 'admin', NULL, '/tool/gen/batchGenCode', '127.0.0.1', '内网IP', '{"tables":"food_category"}', NULL, 0, NULL, '2023-03-31 09:28:46', 65),
(58, '菜单管理', 3, 'com.waimai.web.admin.controller.system.SysMenuController.remove()', 'DELETE', 1, 'admin', NULL, '/system/menu/4', '127.0.0.1', '内网IP', '{}', '{"msg":"菜单已分配,不允许删除","code":601}', 0, NULL, '2023-03-31 09:34:59', 36),
(59, '食品分类', 1, 'com.waimai.web.admin.controller.FoodCategoryController.add()', 'POST', 1, 'admin', NULL, '/admin/category', '127.0.0.1', '内网IP', '{"cover":"/profile/upload/2023/03/31/推荐_20230331093720A001.png","createTime":"2023-03-31 09:37:22","id":2,"params":{},"sort":0,"title":"特色推荐"}', '{"msg":"操作成功","code":200}', 0, NULL, '2023-03-31 09:37:22', 44),
(60, '代码生成', 2, 'com.waimai.generator.controller.GenController.editSave()', 'PUT', 1, 'admin', NULL, '/tool/gen', '127.0.0.1', '内网IP', '{"businessName":"category","className":"FoodCategory","columns":[{"capJavaField":"Id","columnComment":"食品分类编号","columnId":34,"columnName":"id","columnType":"int(11)","createBy":"admin","createTime":"2023-03-24 10:36:54","dictType":"","edit":false,"htmlType":"input","increment":true,"insert":true,"isIncrement":"1","isInsert":"1","isPk":"1","javaField":"id","javaType":"Long","list":false,"params":{},"pk":true,"query":false,"queryType":"EQ","required":false,"sort":1,"superColumn":false,"tableId":3,"updateBy":"","updateTime":"2023-03-31 09:28:12","usableColumn":false},{"capJavaField":"Title","columnComment":"分类标题","columnId":35,"columnName":"title","columnType":"varchar(200)","createBy":"admin","createTime":"2023-03-24 10:36:54","dictType":"","edit":true,"htmlType":"input","increment":false,"insert":true,"isEdit":"1","isIncrement":"0","isInsert":"1","isList":"1","isPk":"0","isQuery":"1","javaField":"title","javaType":"String","list":true,"params":{},"pk":false,"query":true,"queryType":"LIKE","required":false,"sort":2,"superColumn":false,"tableId":3,"updateBy":"","updateTime":"2023-03-31 09:28:12","usableColumn":false},{"capJavaField":"Sort","columnComment":"排序","columnId":36,"columnName":"sort","columnType":"int(3)","createBy":"admin","createTime":"2023-03-24 10:36:54","dictType":"","edit":true,"htmlType":"input","increment":false,"insert":true,"isEdit":"1","isIncrement":"0","isInsert":"1","isList":"1","isPk":"0","isQuery":"1","javaField":"sort","javaType":"Integer","list":true,"params":{},"pk":false,"query":true,"queryType":"EQ","required":false,"sort":3,"superColumn":false,"tableId":3,"updateBy":"","updateTime":"2023-03-31 09:28:12","usableColumn":false},{"capJavaField":"Cover","columnComment":"分类图片","columnId":71,"columnName":"cover","columnType":"varchar(200)","createBy":"","createTime":"2023-03-31 09:27:51","dictType":"","edit":true,"htmlType":"imageUpload","increment":false,"insert":true,"isEdit":"1","isIncrement":"0","isInsert":"1","isList":"1","isPk":"0","isQuer', '{"msg":"操作成功","code":200}', 0, NULL, '2023-03-31 09:38:13', 86),
(61, '食品分类', 2, 'com.waimai.web.admin.controller.FoodCategoryController.edit()', 'PUT', 1, 'admin', NULL, '/admin/category', '127.0.0.1', '内网IP', '{"cover":"/profile/upload/2023/03/31/推荐_20230331093905A002.png","createTime":"2023-03-24 11:20:42","id":1,"params":{},"sort":0,"state":1,"title":"推荐菜品","updateTime":"2023-03-31 09:39:05"}', '{"msg":"操作成功","code":200}', 0, NULL, '2023-03-31 09:39:05', 6),
(62, '食品分类', 2, 'com.waimai.web.admin.controller.FoodCategoryController.edit()', 'PUT', 1, 'admin', NULL, '/admin/category', '127.0.0.1', '内网IP', '{"cover":"/profile/upload/2023/03/31/外卖_20230331094021A003.png","createTime":"2023-03-31 09:37:23","id":2,"params":{},"sort":1,"state":1,"title":"家常小菜","updateTime":"2023-03-31 09:40:42"}', '{"msg":"操作成功","code":200}', 0, NULL, '2023-03-31 09:40:42', 23),
(63, '食品分类', 1, 'com.waimai.web.admin.controller.FoodCategoryController.add()', 'POST', 1, 'admin', NULL, '/admin/category', '127.0.0.1', '内网IP', '{"cover":"/profile/upload/2023/03/31/hb_20230331103000A001.png","createTime":"2023-03-31 10:30:02","id":3,"params":{},"sort":2,"state":1,"title":"汉堡快餐"}', '{"msg":"操作成功","code":200}', 0, NULL, '2023-03-31 10:30:02', 104),
(64, '食品', 1, 'com.waimai.web.admin.controller.FoodController.add()', 'POST', 1, 'admin', NULL, '/admin/food', '127.0.0.1', '内网IP', '{"cid":2,"content":"<p>123123123</p>","coupon":123123,"couponEndTime":"2023-04-12 10:54:53","couponStartTime":"2023-03-31 10:54:50","cover":"/profile/upload/2023/03/31/推荐_20230331105443A001.png","createTime":"2023-03-31 10:55:03","description":"123","id":2,"params":{},"price":100,"recommend":1,"saleCount":1,"sort":1,"title":"测试"}', '{"msg":"操作成功","code":200}', 0, NULL, '2023-03-31 10:55:03', 79);
/*!40000 ALTER TABLE `sys_oper_log` ENABLE KEYS */; /*!40000 ALTER TABLE `sys_oper_log` ENABLE KEYS */;
-- 导出 表 waimai_sys.sys_post 结构 -- 导出 表 waimai_sys.sys_post 结构
@ -1150,7 +1164,7 @@ CREATE TABLE IF NOT EXISTS `sys_user` (
-- 正在导出表 waimai_sys.sys_user 的数据:~2 rows (大约) -- 正在导出表 waimai_sys.sys_user 的数据:~2 rows (大约)
/*!40000 ALTER TABLE `sys_user` DISABLE KEYS */; /*!40000 ALTER TABLE `sys_user` DISABLE KEYS */;
INSERT INTO `sys_user` (`user_id`, `dept_id`, `user_name`, `nick_name`, `user_type`, `email`, `phonenumber`, `sex`, `avatar`, `password`, `status`, `del_flag`, `login_ip`, `login_date`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES INSERT INTO `sys_user` (`user_id`, `dept_id`, `user_name`, `nick_name`, `user_type`, `email`, `phonenumber`, `sex`, `avatar`, `password`, `status`, `del_flag`, `login_ip`, `login_date`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES
(1, 103, 'admin', '若依', '00', 'ry@163.com', '15888888888', '1', '', '$2a$10$7JB720yubVSZvUI0rEqK/.VqGOZTH.ulu33dHOiBE8ByOhJIrdAu2', '0', '0', '127.0.0.1', '2023-03-24 10:12:53', 'admin', '2023-03-24 09:19:35', '', '2023-03-24 10:12:53', '管理员'), (1, 103, 'admin', '若依', '00', 'ry@163.com', '15888888888', '1', '', '$2a$10$7JB720yubVSZvUI0rEqK/.VqGOZTH.ulu33dHOiBE8ByOhJIrdAu2', '0', '0', '127.0.0.1', '2023-03-31 10:11:51', 'admin', '2023-03-24 09:19:35', '', '2023-03-31 10:11:51', '管理员'),
(2, 105, 'ry', '若依', '00', 'ry@qq.com', '15666666666', '1', '', '$2a$10$7JB720yubVSZvUI0rEqK/.VqGOZTH.ulu33dHOiBE8ByOhJIrdAu2', '0', '0', '127.0.0.1', '2023-03-24 09:19:35', 'admin', '2023-03-24 09:19:35', '', NULL, '测试员'); (2, 105, 'ry', '若依', '00', 'ry@qq.com', '15666666666', '1', '', '$2a$10$7JB720yubVSZvUI0rEqK/.VqGOZTH.ulu33dHOiBE8ByOhJIrdAu2', '0', '0', '127.0.0.1', '2023-03-24 09:19:35', 'admin', '2023-03-24 09:19:35', '', NULL, '测试员');
/*!40000 ALTER TABLE `sys_user` ENABLE KEYS */; /*!40000 ALTER TABLE `sys_user` ENABLE KEYS */;

View File

@ -1,14 +1,32 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="分类名称" prop="title"> <el-form-item label="分类标题" prop="title">
<el-input <el-input
v-model="queryParams.title" v-model="queryParams.title"
placeholder="请输入分类名称" placeholder="请输入分类标题"
clearable clearable
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="排序" prop="sort">
<el-input
v-model="queryParams.sort"
placeholder="请输入排序"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="状态" prop="state">
<el-select v-model="queryParams.state" placeholder="请选择状态" clearable>
<el-option
v-for="dict in dict.type.data_state"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
@ -63,14 +81,21 @@
<el-table v-loading="loading" :data="categoryList" @selection-change="handleSelectionChange"> <el-table v-loading="loading" :data="categoryList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" /> <el-table-column type="selection" width="55" align="center" />
<el-table-column label="编号" align="center" prop="id" /> <el-table-column label="食品分类编号" align="center" prop="id" />
<el-table-column label="分类名称" align="center" prop="title" /> <el-table-column label="分类标题" align="center" prop="title" />
<el-table-column label="排序" align="center" prop="sort" /> <el-table-column label="排序" align="center" prop="sort" />
<el-table-column label="分类图片" align="center" prop="cover" width="100">
<template slot-scope="scope">
<image-preview :src="scope.row.cover" :width="50" :height="50"/>
</template>
</el-table-column>
<el-table-column label="更新时间" align="center" prop="updateTime" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.updateTime, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column label="状态" align="center" prop="state"> <el-table-column label="状态" align="center" prop="state">
<template slot-scope="scope"> <template slot-scope="scope">
<!-- <el-tag>
{{ scope.row.state == 0 ?'删除':'正常' }}
</el-tag> -->
<dict-tag :options="dict.type.data_state" :value="scope.row.state"/> <dict-tag :options="dict.type.data_state" :value="scope.row.state"/>
</template> </template>
</el-table-column> </el-table-column>
@ -94,7 +119,7 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<pagination <pagination
v-show="total>0" v-show="total>0"
:total="total" :total="total"
@ -106,12 +131,25 @@
<!-- 添加或修改食品分类对话框 --> <!-- 添加或修改食品分类对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px"> <el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="分类名称" prop="title"> <el-form-item label="分类标题" prop="title">
<el-input v-model="form.title" placeholder="请输入分类名称" /> <el-input v-model="form.title" placeholder="请输入分类标题" />
</el-form-item> </el-form-item>
<el-form-item label="排序" prop="sort"> <el-form-item label="排序" prop="sort">
<el-input v-model="form.sort" placeholder="请输入排序" /> <el-input v-model="form.sort" placeholder="请输入排序" />
</el-form-item> </el-form-item>
<el-form-item label="分类图片" prop="cover">
<image-upload :limit="1" v-model="form.cover"/>
</el-form-item>
<el-form-item label="状态" prop="state">
<el-select v-model="form.state" placeholder="请选择状态">
<el-option
v-for="dict in dict.type.data_state"
:key="dict.value"
:label="dict.label"
:value="parseInt(dict.value)"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="备注" prop="remark"> <el-form-item label="备注" prop="remark">
<el-input v-model="form.remark" placeholder="请输入备注" /> <el-input v-model="form.remark" placeholder="请输入备注" />
</el-form-item> </el-form-item>
@ -129,6 +167,7 @@ import { listCategory, getCategory, delCategory, addCategory, updateCategory } f
export default { export default {
name: "Category", name: "Category",
dicts: ['data_state'],
data() { data() {
return { return {
// //
@ -154,6 +193,8 @@ export default {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
title: null, title: null,
sort: null,
state: null,
}, },
// //
form: {}, form: {},
@ -162,7 +203,6 @@ export default {
} }
}; };
}, },
dicts:['data_state'],
created() { created() {
this.getList(); this.getList();
}, },
@ -187,6 +227,7 @@ export default {
id: null, id: null,
title: null, title: null,
sort: null, sort: null,
cover: null,
createTime: null, createTime: null,
updateTime: null, updateTime: null,
state: null, state: null,

View File

@ -16,8 +16,8 @@
<el-form-item label="价格" prop="price"> <el-form-item label="价格" prop="price">
<el-input v-model="queryParams.price" placeholder="请输入价格" clearable @keyup.enter.native="handleQuery" /> <el-input v-model="queryParams.price" placeholder="请输入价格" clearable @keyup.enter.native="handleQuery" />
</el-form-item> </el-form-item>
<el-form-item label="售卖区域(匹配收货地址,null表示不限制)" prop="area"> <el-form-item label="售卖区域" prop="area">
<el-input v-model="queryParams.area" placeholder="请输入售卖区域(匹配收货地址,null表示不限制)" clearable <el-input v-model="queryParams.area" placeholder="请选择售卖区域" clearable
@keyup.enter.native="handleQuery" /> @keyup.enter.native="handleQuery" />
</el-form-item> </el-form-item>
<el-form-item label="创建时间"> <el-form-item label="创建时间">
@ -72,7 +72,8 @@
<el-table-column label="优惠" align="center" prop="coupon" /> <el-table-column label="优惠" align="center" prop="coupon" />
<el-table-column label="价格" align="center" prop="price" /> <el-table-column label="价格" align="center" prop="price" />
<el-table-column label="排序" align="center" prop="sort" /> <el-table-column label="排序" align="center" prop="sort" />
<el-table-column label="售卖区域(匹配收货地址,null表示不限制)" align="center" prop="area" /> <!-- (匹配收货地址,null表示不限制)-->
<el-table-column label="售卖区域" align="center" prop="area" />
<el-table-column label="是否推荐" align="center" prop="recommend" /> <el-table-column label="是否推荐" align="center" prop="recommend" />
<el-table-column label="已售出数量" align="center" prop="saleCount" /> <el-table-column label="已售出数量" align="center" prop="saleCount" />
<el-table-column label="创建时间" align="center" prop="createTime" width="180"> <el-table-column label="创建时间" align="center" prop="createTime" width="180">

View File

@ -0,0 +1,26 @@
package com.waimai.api;
import com.waimai.common.annotation.Anonymous;
import com.waimai.common.core.domain.R;
import com.waimai.web.admin.domain.FoodCategory;
import com.waimai.web.admin.service.IFoodCategoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
@RestController
@RequestMapping("/api/category")
@Anonymous
public class Category {
@Autowired
private IFoodCategoryService foodCategoryService;
@RequestMapping
public R<List<FoodCategory>> selectAll() {
return R.ok(
foodCategoryService.selectFoodCategoryList(new FoodCategory())
);
}
}

View File

@ -0,0 +1,40 @@
package com.waimai.api;
import com.waimai.common.annotation.Anonymous;
import com.waimai.common.core.controller.BaseController;
import com.waimai.common.core.domain.R;
import com.waimai.web.admin.domain.Food;
import com.waimai.web.admin.service.IFoodService;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
import java.util.List;
@RestController
@Anonymous
@RequestMapping("/api/food")
public class FoodsApiController {
@Resource
private IFoodService foodService;
/**
* 推荐食品
*
* @return
*/
@RequestMapping("/recommend")
public R<List<Food>> recommend() {
return R.ok(foodService.selectFoodList(new Food()));
}
@RequestMapping("/category/{cid}")
public R<List<Food>> selectByCategory(@PathVariable("cid") Long cid) {
Food food = new Food();
food.setCid(cid);
return R.ok(foodService.selectFoodList(food));
}
}

View File

@ -9,23 +9,27 @@ import com.waimai.common.core.domain.BaseEntity;
* 食品分类对象 food_category * 食品分类对象 food_category
* *
* @author callmeyan * @author callmeyan
* @date 2023-03-24 * @date 2023-03-31
*/ */
public class FoodCategory extends BaseEntity public class FoodCategory extends BaseEntity
{ {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
/** 编号 */ /** 食品分类编号 */
private Long id; private Long id;
/** 分类名称 */ /** 分类标题 */
@Excel(name = "分类名称") @Excel(name = "分类标题")
private String title; private String title;
/** 排序 */ /** 排序 */
@Excel(name = "排序") @Excel(name = "排序")
private Integer sort; private Integer sort;
/** 分类图片 */
@Excel(name = "分类图片")
private String cover;
/** 状态 */ /** 状态 */
@Excel(name = "状态") @Excel(name = "状态")
private Integer state; private Integer state;
@ -57,6 +61,15 @@ public class FoodCategory extends BaseEntity
{ {
return sort; return sort;
} }
public void setCover(String cover)
{
this.cover = cover;
}
public String getCover()
{
return cover;
}
public void setState(Integer state) public void setState(Integer state)
{ {
this.state = state; this.state = state;
@ -73,6 +86,7 @@ public class FoodCategory extends BaseEntity
.append("id", getId()) .append("id", getId())
.append("title", getTitle()) .append("title", getTitle())
.append("sort", getSort()) .append("sort", getSort())
.append("cover", getCover())
.append("createTime", getCreateTime()) .append("createTime", getCreateTime())
.append("updateTime", getUpdateTime()) .append("updateTime", getUpdateTime())
.append("state", getState()) .append("state", getState())

View File

@ -6,9 +6,9 @@ spring:
druid: druid:
# 主库数据源 # 主库数据源
master: master:
url: jdbc:mysql://localhost:3306/waimai_sys?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 url: jdbc:mysql://localhost:3307/waimai_sys?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
username: root username: root
password: root password: 123456
# 从库数据源 # 从库数据源
slave: slave:
# 从数据源开关/默认关闭 # 从数据源开关/默认关闭

View File

@ -97,7 +97,7 @@ token:
# 令牌密钥 # 令牌密钥
secret: abcdefghijklmnopqrstuvwxyz secret: abcdefghijklmnopqrstuvwxyz
# 令牌有效期默认30分钟 # 令牌有效期默认30分钟
expireTime: 30 expireTime: 300
# MyBatis配置 # MyBatis配置
mybatis: mybatis:

View File

@ -8,6 +8,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="id" column="id" /> <result property="id" column="id" />
<result property="title" column="title" /> <result property="title" column="title" />
<result property="sort" column="sort" /> <result property="sort" column="sort" />
<result property="cover" column="cover" />
<result property="createTime" column="create_time" /> <result property="createTime" column="create_time" />
<result property="updateTime" column="update_time" /> <result property="updateTime" column="update_time" />
<result property="state" column="state" /> <result property="state" column="state" />
@ -15,13 +16,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap> </resultMap>
<sql id="selectFoodCategoryVo"> <sql id="selectFoodCategoryVo">
select id, title, sort, create_time, update_time, state, remark from food_category select id, title, sort, cover, create_time, update_time, state, remark from food_category
</sql> </sql>
<select id="selectFoodCategoryList" parameterType="FoodCategory" resultMap="FoodCategoryResult"> <select id="selectFoodCategoryList" parameterType="FoodCategory" resultMap="FoodCategoryResult">
<include refid="selectFoodCategoryVo"/> <include refid="selectFoodCategoryVo"/>
<where> <where>
<if test="title != null and title != ''"> and title like concat('%', #{title}, '%')</if> <if test="title != null and title != ''"> and title like concat('%', #{title}, '%')</if>
<if test="sort != null "> and sort = #{sort}</if>
<if test="state != null "> and state = #{state}</if>
</where> </where>
</select> </select>
@ -35,6 +38,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
<if test="title != null">title,</if> <if test="title != null">title,</if>
<if test="sort != null">sort,</if> <if test="sort != null">sort,</if>
<if test="cover != null">cover,</if>
<if test="createTime != null">create_time,</if> <if test="createTime != null">create_time,</if>
<if test="updateTime != null">update_time,</if> <if test="updateTime != null">update_time,</if>
<if test="state != null">state,</if> <if test="state != null">state,</if>
@ -43,6 +47,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="title != null">#{title},</if> <if test="title != null">#{title},</if>
<if test="sort != null">#{sort},</if> <if test="sort != null">#{sort},</if>
<if test="cover != null">#{cover},</if>
<if test="createTime != null">#{createTime},</if> <if test="createTime != null">#{createTime},</if>
<if test="updateTime != null">#{updateTime},</if> <if test="updateTime != null">#{updateTime},</if>
<if test="state != null">#{state},</if> <if test="state != null">#{state},</if>
@ -55,6 +60,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<trim prefix="SET" suffixOverrides=","> <trim prefix="SET" suffixOverrides=",">
<if test="title != null">title = #{title},</if> <if test="title != null">title = #{title},</if>
<if test="sort != null">sort = #{sort},</if> <if test="sort != null">sort = #{sort},</if>
<if test="cover != null">cover = #{cover},</if>
<if test="createTime != null">create_time = #{createTime},</if> <if test="createTime != null">create_time = #{createTime},</if>
<if test="updateTime != null">update_time = #{updateTime},</if> <if test="updateTime != null">update_time = #{updateTime},</if>
<if test="state != null">state = #{state},</if> <if test="state != null">state = #{state},</if>

View File

@ -32,7 +32,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</sql> </sql>
<select id="selectFoodList" parameterType="Food" resultMap="FoodResult"> <select id="selectFoodList" parameterType="Food" resultMap="FoodResult">
<include refid="selectFoodVo"/> select id, cid, title, cover, description, coupon, coupon_start_time, coupon_end_time, price, sort, area, recommend, recommend_start_time, recommend_end_time, sale_count, create_time, update_time, state, remark from food
<where> <where>
<if test="cid != null "> and cid = #{cid}</if> <if test="cid != null "> and cid = #{cid}</if>
<if test="title != null and title != ''"> and title like concat('%', #{title}, '%')</if> <if test="title != null and title != ''"> and title like concat('%', #{title}, '%')</if>

View File

@ -112,6 +112,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter
.authorizeRequests() .authorizeRequests()
// 对于登录login 注册register 验证码captchaImage 允许匿名访问 // 对于登录login 注册register 验证码captchaImage 允许匿名访问
.antMatchers("/login", "/register", "/captchaImage").permitAll() .antMatchers("/login", "/register", "/captchaImage").permitAll()
.antMatchers("/api/**").permitAll()
// 静态资源可匿名访问 // 静态资源可匿名访问
.antMatchers(HttpMethod.GET, "/", "/*.html", "/**/*.html", "/**/*.css", "/**/*.js", "/profile/**").permitAll() .antMatchers(HttpMethod.GET, "/", "/*.html", "/**/*.html", "/**/*.css", "/**/*.js", "/profile/**").permitAll()
.antMatchers("/swagger-ui.html", "/swagger-resources/**", "/webjars/**", "/*/api-docs", "/druid/**").permitAll() .antMatchers("/swagger-ui.html", "/swagger-resources/**", "/webjars/**", "/*/api-docs", "/druid/**").permitAll()