diff --git a/DB/li_notice_message.sql b/DB/li_notice_message.sql index bafd8a04..90de51ce 100644 --- a/DB/li_notice_message.sql +++ b/DB/li_notice_message.sql @@ -7,6 +7,7 @@ Source Host : 192.168.0.116:3306 Source Schema : lilishop + Target Server Type : MySQL Target Server Version : 80023 File Encoding : 65001 diff --git a/DB/version4.1to4.2.sql b/DB/version4.1to4.2.sql index a0eaa351..f81d5751 100644 --- a/DB/version4.1to4.2.sql +++ b/DB/version4.1to4.2.sql @@ -6,7 +6,7 @@ ALTER TABLE li_distribution ADD settlement_bank_branch_name varchar ( 200 ); /** 文章分类添加默认值**/ ALTER TABLE li_article_category alter column sort set default 0; /** 添加分销提现菜单**/ -INSERT INTO `lilishop`.`li_menu`(`id`, `create_by`, `create_time`, `delete_flag`, `update_by`, `update_time`, `description`, `front_route`, `icon`, `level`, `name`, `parent_id`, `path`, `sort_order`, `title`, `front_component`) VALUES (1410862675914764290, 'admin', '2021-07-02 15:27:29', b'0', 'admin', '2021-07-02 15:27:45', 'null', 'distribution/distributionCash', '', 2, 'distributionCash', '1374173575405109248', 'distributionCash', 5.00, '分销提现', 'null'); +INSERT INTO `rxshop`.`li_menu`(`id`, `create_by`, `create_time`, `delete_flag`, `update_by`, `update_time`, `description`, `front_route`, `icon`, `level`, `name`, `parent_id`, `path`, `sort_order`, `title`, `front_component`) VALUES (1410862675914764290, 'admin', '2021-07-02 15:27:29', b'0', 'admin', '2021-07-02 15:27:45', 'null', 'distribution/distributionCash', '', 2, 'distributionCash', '1374173575405109248', 'distributionCash', 5.00, '分销提现', 'null'); /** 促销商品添加商品类型**/ ALTER TABLE li_promotion_goods ADD goods_type varchar (200); @@ -16,7 +16,7 @@ update li_member_points_history set point_type = 'INCREASE' where point_type=1; update li_member_points_history set point_type = 'REDUCE' where point_type=0; /** 添加分词管理菜单*/ -INSERT INTO `lilishop`.`li_menu` (`id`, `create_by`, `create_time`, `delete_flag`, `update_by`, `update_time`, `description`, `front_route`, `icon`, `level`, `name`, `parent_id`, `path`, `sort_order`, `title`, `front_component`) VALUES (1349247640584085511, 'admin', '2021-01-13 14:51:20', b'0', 'admin', '2021-02-25 09:02:59', 'null', 'customWords/index', 'ios-american-football', 2, 'customWords', '1349237129847005184', 'customWords', 8.00, '分词管理', 'null'); +INSERT INTO `rxshop`.`li_menu` (`id`, `create_by`, `create_time`, `delete_flag`, `update_by`, `update_time`, `description`, `front_route`, `icon`, `level`, `name`, `parent_id`, `path`, `sort_order`, `title`, `front_component`) VALUES (1349247640584085511, 'admin', '2021-01-13 14:51:20', b'0', 'admin', '2021-02-25 09:02:59', 'null', 'customWords/index', 'ios-american-football', 2, 'customWords', '1349237129847005184', 'customWords', 8.00, '分词管理', 'null'); /** 修改会员评价店铺图片字段类型 **/ alter table li_member_evaluation modify column reply_image text; @@ -25,4 +25,4 @@ alter table li_member_evaluation modify column reply_image text; alter table li_after_sale modify column after_sale_image text; /** 提现申请审核sql **/ -INSERT INTO `lilishop`.`li_menu`(`id`, `create_by`, `create_time`, `delete_flag`, `update_by`, `update_time`, `description`, `front_route`, `icon`, `level`, `name`, `parent_id`, `path`, `sort_order`, `title`, `front_component`) VALUES (1367042804944994305, 'admin', '2021-03-03 09:22:58', b'0', NULL, NULL, NULL, 'member/advance/withdrawApply', 'ios-alert', 2, 'withdrawApply', '1367042490443497472', 'withdrawApply', 1.00, '提现申请', NULL); \ No newline at end of file +INSERT INTO `rxshop`.`li_menu`(`id`, `create_by`, `create_time`, `delete_flag`, `update_by`, `update_time`, `description`, `front_route`, `icon`, `level`, `name`, `parent_id`, `path`, `sort_order`, `title`, `front_component`) VALUES (1367042804944994305, 'admin', '2021-03-03 09:22:58', b'0', NULL, NULL, NULL, 'member/advance/withdrawApply', 'ios-alert', 2, 'withdrawApply', '1367042490443497472', 'withdrawApply', 1.00, '提现申请', NULL); diff --git a/DB/version4.2.4to4.2.5.sql b/DB/version4.2.4to4.2.5.sql new file mode 100644 index 00000000..875e53df --- /dev/null +++ b/DB/version4.2.4to4.2.5.sql @@ -0,0 +1,521 @@ +/**增加店铺发货信息**/ +ALTER TABLE li_store_detail ADD `sales_consignor_address_id` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '发货地址id'; +ALTER TABLE li_store_detail ADD `sales_consignor_address_path` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '发货地址名称'; +ALTER TABLE li_store_detail ADD `sales_consignor_detail` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '发货详细地址'; +ALTER TABLE li_store_detail ADD `sales_consignor_mobile` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '发货人手机'; +ALTER TABLE li_store_detail ADD `sales_consignor_name` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '发货人姓名'; + +/**增加电子面单店铺信息**/ +ALTER TABLE `li_store_logistics` ADD `customer_name` varchar(255) DEFAULT NULL COMMENT '客户代码'; +ALTER TABLE `li_store_logistics` ADD `customer_pwd` varchar(255) DEFAULT NULL COMMENT '客户密码'; +ALTER TABLE `li_store_logistics` ADD `month_code` varchar(255) DEFAULT NULL COMMENT '月结号/密钥'; +ALTER TABLE `li_store_logistics` ADD `send_site` varchar(255) DEFAULT NULL COMMENT '归属网点'; +ALTER TABLE `li_store_logistics` ADD `send_staff` varchar(255) DEFAULT NULL COMMENT '收件快递员'; +ALTER TABLE `li_store_logistics` ADD `face_sheet_flag` bit(1) DEFAULT NULL COMMENT '是否使用电子面单'; +ALTER TABLE `li_store_logistics` ADD `pay_type` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '支付方式'; +ALTER TABLE `li_store_logistics` ADD `exp_type` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '快递类型'; + +/** 店铺--默认页面是否开启**/ +ALTER TABLE li_store ADD page_show bit(1) DEFAULT NULL COMMENT '默认页面是否开启'; + +/** 创建店员表 **/ +/* + Navicat Premium Data Transfer + + Source Server : lilishop + Source Server Type : MySQL + Source Server Version : 80025 + Source Host : 192.168.0.116:3306 + Source Schema : zhimai1 + + Target Server Type : MySQL + Target Server Version : 80025 + File Encoding : 65001 + + Date: 03/03/2022 19:30:20 +*/ + +SET NAMES utf8mb4; +SET FOREIGN_KEY_CHECKS = 0; + +-- ---------------------------- +-- Table structure for li_clerk +-- ---------------------------- +DROP TABLE IF EXISTS `li_clerk`; +CREATE TABLE `li_clerk` ( + `id` bigint NOT NULL COMMENT 'ID', + `create_by` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '创建者', + `create_time` datetime(6) NULL DEFAULT NULL COMMENT '创建时间', + `delete_flag` bit(1) NULL DEFAULT NULL COMMENT '删除标志 true/false 删除/未删除', + `update_by` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '更新者', + `update_time` datetime(6) NULL DEFAULT NULL COMMENT '更新时间', + `clerk_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '店员名称', + `member_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '会员id', + `store_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '店铺id', + `department_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '部门id', + `role_ids` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '角色', + `shopkeeper` bit(1) NULL DEFAULT NULL COMMENT '是否是店主', + `is_super` bit(1) NULL DEFAULT NULL COMMENT '是否是超级管理员 超级管理员/普通管理员', + `status` bit(1) NULL DEFAULT NULL COMMENT '状态', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin ROW_FORMAT = Dynamic; + +SET FOREIGN_KEY_CHECKS = 1; + + +/** 店员角色**/ +/* + Navicat Premium Data Transfer + + Source Server : lilishop + Source Server Type : MySQL + Source Server Version : 80025 + Source Host : 192.168.0.116:3306 + Source Schema : zhimai1 + + Target Server Type : MySQL + Target Server Version : 80025 + File Encoding : 65001 + + Date: 03/03/2022 19:30:39 +*/ + +SET NAMES utf8mb4; +SET FOREIGN_KEY_CHECKS = 0; + +-- ---------------------------- +-- Table structure for li_clerk_role +-- ---------------------------- +DROP TABLE IF EXISTS `li_clerk_role`; +CREATE TABLE `li_clerk_role` ( + `id` bigint NOT NULL COMMENT 'ID', + `clerk_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '店员唯一id', + `role_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '角色唯一id', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin ROW_FORMAT = Dynamic; + +SET FOREIGN_KEY_CHECKS = 1; + + +/** 店铺部门 **/ +/* + Navicat Premium Data Transfer + + Source Server : lilishop + Source Server Type : MySQL + Source Server Version : 80025 + Source Host : 192.168.0.116:3306 + Source Schema : zhimai1 + + Target Server Type : MySQL + Target Server Version : 80025 + File Encoding : 65001 + + Date: 03/03/2022 19:31:39 +*/ + +SET NAMES utf8mb4; +SET FOREIGN_KEY_CHECKS = 0; + +-- ---------------------------- +-- Table structure for li_store_department +-- ---------------------------- +DROP TABLE IF EXISTS `li_store_department`; +CREATE TABLE `li_store_department` ( + `id` bigint NOT NULL COMMENT 'ID', + `create_by` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '创建者', + `create_time` datetime(6) NULL DEFAULT NULL COMMENT '创建时间', + `delete_flag` bit(1) NULL DEFAULT NULL COMMENT '删除标志 true/false 删除/未删除', + `update_by` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '更新者', + `update_time` datetime(6) NULL DEFAULT NULL COMMENT '更新时间', + `title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '部门名称', + `store_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '店铺id', + `parent_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '父id', + `sort_order` decimal(20, 2) NULL DEFAULT NULL COMMENT '排序值', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin ROW_FORMAT = Dynamic; + +SET FOREIGN_KEY_CHECKS = 1; + +/** 部门角色关联 **/ +/* + Navicat Premium Data Transfer + + Source Server : lilishop + Source Server Type : MySQL + Source Server Version : 80025 + Source Host : 192.168.0.116:3306 + Source Schema : zhimai1 + + Target Server Type : MySQL + Target Server Version : 80025 + File Encoding : 65001 + + Date: 03/03/2022 19:32:01 +*/ + +SET NAMES utf8mb4; +SET FOREIGN_KEY_CHECKS = 0; + +-- ---------------------------- +-- Table structure for li_store_department_role +-- ---------------------------- +DROP TABLE IF EXISTS `li_store_department_role`; +CREATE TABLE `li_store_department_role` ( + `id` bigint NOT NULL COMMENT 'ID', + `create_by` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '创建者', + `create_time` datetime(6) NULL DEFAULT NULL COMMENT '创建时间', + `delete_flag` bit(1) NULL DEFAULT NULL COMMENT '删除标志 true/false 删除/未删除', + `update_by` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '更新者', + `update_time` datetime(6) NULL DEFAULT NULL COMMENT '更新时间', + `role_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '角色id', + `department_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '部门id', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin ROW_FORMAT = Dynamic; + +SET FOREIGN_KEY_CHECKS = 1; + +/**店铺角色菜单**/ +/* + Navicat Premium Data Transfer + + Source Server : lilishop + Source Server Type : MySQL + Source Server Version : 80025 + Source Host : 192.168.0.116:3306 + Source Schema : zhimai1 + + Target Server Type : MySQL + Target Server Version : 80025 + File Encoding : 65001 + + Date: 03/03/2022 19:34:42 +*/ + +SET NAMES utf8mb4; +SET FOREIGN_KEY_CHECKS = 0; + +-- ---------------------------- +-- Table structure for li_store_menu_role +-- ---------------------------- +DROP TABLE IF EXISTS `li_store_menu_role`; +CREATE TABLE `li_store_menu_role` ( + `id` bigint NOT NULL COMMENT 'ID', + `create_by` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '创建者', + `create_time` datetime(6) NULL DEFAULT NULL COMMENT '创建时间', + `delete_flag` bit(1) NULL DEFAULT NULL COMMENT '删除标志 true/false 删除/未删除', + `update_by` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '更新者', + `update_time` datetime(6) NULL DEFAULT NULL COMMENT '更新时间', + `role_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '角色id', + `menu_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '菜单', + `store_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '店铺id', + `is_super` bit(1) NULL DEFAULT NULL COMMENT '是否拥有操作数据权限,为否则只有查看权限', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin ROW_FORMAT = Dynamic; + +SET FOREIGN_KEY_CHECKS = 1; + + +/**店铺角色**/ + /* + Navicat Premium Data Transfer + + Source Server : lilishop + Source Server Type : MySQL + Source Server Version : 80025 + Source Host : 192.168.0.116:3306 + Source Schema : zhimai1 + + Target Server Type : MySQL + Target Server Version : 80025 + File Encoding : 65001 + + Date: 03/03/2022 19:32:59 +*/ + +SET NAMES utf8mb4; +SET FOREIGN_KEY_CHECKS = 0; + +-- ---------------------------- +-- Table structure for li_store_role +-- ---------------------------- +DROP TABLE IF EXISTS `li_store_role`; +CREATE TABLE `li_store_role` ( + `id` bigint NOT NULL COMMENT 'ID', + `create_by` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '创建者', + `create_time` datetime(6) NULL DEFAULT NULL COMMENT '创建时间', + `delete_flag` bit(1) NULL DEFAULT NULL COMMENT '删除标志 true/false 删除/未删除', + `update_by` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '更新者', + `update_time` datetime(6) NULL DEFAULT NULL COMMENT '更新时间', + `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '角色名称', + `store_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '店铺id', + `default_role` bit(1) NULL DEFAULT NULL COMMENT '是否为注册默认角色', + `description` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '备注', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin ROW_FORMAT = DYNAMIC; + +SET FOREIGN_KEY_CHECKS = 1; + + + /* + Navicat Premium Data Transfer + + Source Server : lilishop + Source Server Type : MySQL + Source Server Version : 80025 + Source Host : 192.168.0.116:3306 + Source Schema : zhimai1 + + Target Server Type : MySQL + Target Server Version : 80025 + File Encoding : 65001 + + Date: 02/03/2022 09:57:49 +*/ + +SET NAMES utf8mb4; +SET FOREIGN_KEY_CHECKS = 0; + +-- ---------------------------- +-- Table structure for li_menu +-- ---------------------------- +DROP TABLE IF EXISTS `li_menu`; +CREATE TABLE `li_menu` ( + `id` bigint NOT NULL COMMENT 'ID', + `create_by` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建者', + `create_time` datetime NULL DEFAULT NULL COMMENT '创建时间', + `delete_flag` bit(1) NULL DEFAULT NULL COMMENT '删除标志 true/false 删除/未删除', + `update_by` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '更新者', + `update_time` datetime NULL DEFAULT NULL COMMENT '更新时间', + `description` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '说明备注', + `front_route` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '前端路由', + `icon` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '图标', + `level` int NULL DEFAULT NULL COMMENT '层级', + `name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '菜单/权限名称', + `parent_id` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '父id', + `path` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '赋权API地址,正则表达式', + `sort_order` decimal(10, 2) NULL DEFAULT NULL COMMENT '排序值', + `title` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '菜单标题', + `front_component` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '文件地址', + `permission` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '权限url', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Records of li_menu +-- ---------------------------- +INSERT INTO `li_menu` VALUES (1348810750596767744, 'admin', '2021-01-12 09:55:17', b'0', 'admin', '2021-01-15 09:42:50', 'null', '1', 'ios-american-football', 0, 'settings', '0', '1', 2.00, '设置', 'null', NULL); +INSERT INTO `li_menu` VALUES (1348810864748945408, 'admin', '2021-01-12 09:55:45', b'0', 'admin', '2021-03-15 20:57:12', 'null', 'null', 'ios-american-football', 0, 'log', '0', 'null', 3.00, '日志', 'null', '/manager/setting/log*'); +INSERT INTO `li_menu` VALUES (1349237129847005184, 'admin', '2021-01-13 14:09:34', b'0', 'admin', '2021-01-15 09:43:16', 'null', 'Main', 'ios-american-football', 1, 'sys', '1348810750596767744', '/sys', 1.00, '系统设置', 'null', NULL); +INSERT INTO `li_menu` VALUES (1349237207378714624, 'admin', '2021-01-13 14:09:53', b'0', 'admin', '2021-07-27 16:07:49', 'null', 'Main', 'ios-american-football', 1, 'member', '1348810750596767744', '/member', 0.00, '用户管理', 'null', '/manager/permission/department*,/manager/passport/user*,/manager/permission/role*,/manager/permission/menu*,/manager/passport/user/admin/edit*'); +INSERT INTO `li_menu` VALUES (1349237928434098176, 'admin', '2021-01-13 14:13:03', b'0', 'admin', '2021-07-27 16:09:11', 'null', 'Main', 'ios-american-football', 1, 'log', '1348810864748945408', '/log', 1.00, '系统监控', 'null', '/manager/log*'); +INSERT INTO `li_menu` VALUES (1349246048900243456, 'admin', '2021-01-13 14:45:00', b'0', 'admin', '2021-07-27 16:07:57', 'null', 'sys/setting-manage/settingManage', 'ios-american-football', 2, 'setting', '1349237129847005184', 'setting', 1.00, '系统设置', 'null', '/manager/system/setting/get*,/manager/system/setting/put*,/manager/setting/setting*'); +INSERT INTO `li_menu` VALUES (1349246347597602816, 'admin', '2021-01-13 14:46:12', b'0', 'admin', '2021-07-27 16:08:03', 'null', 'sys/oss-manage/ossManage', 'ios-american-football', 2, 'oss-manage', '1349237129847005184', 'oss-manage', 3.00, 'OSS资源', '', '/manager/common/file*'); +INSERT INTO `li_menu` VALUES (1349246468775239680, 'admin', '2021-01-13 14:46:41', b'0', 'admin', '2021-07-27 16:08:14', 'null', 'region/index', 'ios-american-football', 2, 'region', '1349237129847005184', 'region', 4.00, '行政地区', 'null', '/manager/region*'); +INSERT INTO `li_menu` VALUES (1349246671158796288, 'admin', '2021-01-13 14:47:29', b'0', 'admin', '2021-07-27 16:08:09', 'null', 'logistics/index', 'ios-american-football', 2, 'logistics', '1349237129847005184', 'logistics', 5.00, '物流公司', 'null', '/manager/other/logistics*'); +INSERT INTO `li_menu` VALUES (1349246896661356544, 'admin', '2021-01-13 14:48:23', b'0', 'admin', '2021-07-27 16:08:23', 'null', 'sys/setting-manage/settingManage', 'ios-american-football', 2, 'authLogin', '1349237129847005184', 'authLogin', 6.00, '信任登录', 'null', '/manager/system/setting/get*,/manager/system/setting/put*,/manager/setting/setting*\r\n'); +INSERT INTO `li_menu` VALUES (1349247081504333824, 'admin', '2021-01-13 14:49:07', b'0', 'admin', '2021-07-27 16:08:45', 'null', 'sys/setting-manage/settingManage', 'ios-american-football', 2, 'pay', '1349237129847005184', 'pay', 7.00, '支付设置', 'null', '/manager/system/setting/get*,/manager/system/setting/put*,/manager/system/setting*'); +INSERT INTO `li_menu` VALUES (1349247640584085504, 'admin', '2021-01-13 14:51:20', b'0', 'admin', '2021-07-27 16:08:56', 'null', 'sensitiveWords/index', 'ios-american-football', 2, 'sensitiveWords', '1349237129847005184', 'sensitiveWords', 8.00, '敏感词', 'null', '/manager/other/sensitiveWords*'); +INSERT INTO `li_menu` VALUES (1349254815809298432, 'admin', '2021-01-13 15:19:51', b'0', 'admin', '2021-01-15 11:15:40', 'null', 'sys/user-manage/userManage', 'ios-american-football', 2, 'user-manage', '1349237207378714624', 'user-manage', 1.00, '用户管理', 'null', NULL); +INSERT INTO `li_menu` VALUES (1349255214977015808, 'admin', '2021-01-13 15:21:26', b'0', 'admin', '2021-01-15 11:16:21', 'null', 'sys/department-manage/departmentManage', 'ios-american-football', 2, 'department-manage', '1349237207378714624', 'department-manage', 3.00, '部门管理', 'null', '/manager/permission/department*,/manager/permission/departmentRole*,'); +INSERT INTO `li_menu` VALUES (1349255404425338880, 'admin', '2021-01-13 15:22:11', b'0', 'admin', '2021-02-24 09:22:21', 'null', 'sys/role-manage/roleManage', 'ios-american-football', 2, 'role-manage', '1349237207378714624', 'role-manage', 4.00, '角色权限', 'null', '/manager/permission/role*,/manager/permission/roleMenu*'); +INSERT INTO `li_menu` VALUES (1349256082979840000, 'admin', '2021-01-13 15:24:53', b'0', 'admin', '2021-01-15 11:18:14', 'null', 'sys/log-manage/logManage', 'ios-american-football', 2, 'log-manage', '1349237928434098176', 'log-manage', 2.00, '日志管理', 'null', NULL); +INSERT INTO `li_menu` VALUES (1357584224760102912, 'admin', '2021-02-05 06:57:57', b'0', 'admin', '2021-07-27 16:09:02', 'null', 'sys/app-version/appVersion', 'ios-american-football', 2, 'appVersion', '1349237129847005184', 'appVersion', 9.00, 'APP版本', 'null', '/manager/other/appVersion*'); +INSERT INTO `li_menu` VALUES (1357873097859923969, 'admin', '2021-02-24 09:53:02', b'0', 'admin', '2021-02-24 09:53:12', NULL, 'sys/menu-manage/menuManage', 'ios-american-football', 2, 'menuManage', '1349237207378714624', 'menu-manage', 2.00, '菜单管理', NULL, NULL); +INSERT INTO `li_menu` VALUES (1367038467288072192, 'admin', '2021-03-03 09:05:44', b'0', 'admin', '2021-03-03 09:09:27', 'null', 'null', 'ios-person-add', 0, 'member', '0', 'null', 0.00, '会员', 'null', NULL); +INSERT INTO `li_menu` VALUES (1367039534616805376, 'admin', '2021-03-03 09:09:58', b'0', 'admin', '2021-05-18 10:51:12', 'null', 'null', 'md-reorder', 0, 'order', '0', 'null', 0.00, '订单', 'null', NULL); +INSERT INTO `li_menu` VALUES (1367039950368800768, 'admin', '2021-03-03 09:11:37', b'0', NULL, NULL, NULL, NULL, 'ios-share', 0, 'goods', '0', NULL, 0.20, '商品', NULL, NULL); +INSERT INTO `li_menu` VALUES (1367040067201138688, 'admin', '2021-03-03 09:12:05', b'0', 'admin', '2021-12-02 19:45:22', NULL, 'null', 'ios-hammer', 0, 'promotions', '0', 'null', 0.30, '促销', NULL, 'null'); +INSERT INTO `li_menu` VALUES (1367040599596728320, 'admin', '2021-03-03 09:14:12', b'0', 'admin', '2021-03-03 09:52:13', 'null', 'null', 'ios-color-palette', 0, 'operate', '0', 'null', 0.50, '运营', 'null', NULL); +INSERT INTO `li_menu` VALUES (1367040819248234496, 'admin', '2021-03-03 09:15:04', b'0', 'lili_ftyy', '2022-03-01 15:13:04', NULL, 'null', 'ios-stats', 0, 'statistics', '0', 'null', 0.70, '统计', NULL, 'null'); +INSERT INTO `li_menu` VALUES (1367041332861730816, 'admin', '2021-03-03 09:17:07', b'0', NULL, NULL, NULL, 'Main', 'ios-aperture', 1, '/', '1367038467288072192', '/', 0.00, '会员管理', NULL, NULL); +INSERT INTO `li_menu` VALUES (1367041461194850304, 'admin', '2021-03-03 09:17:37', b'0', 'admin', '2021-07-27 16:02:17', NULL, 'member/list/index', 'ios-aperture', 2, 'memberList', '1367041332861730816', 'memberList', 0.00, '会员列表', NULL, '/manager/common/file*,/manager/passport/member*'); +INSERT INTO `li_menu` VALUES (1367041575619657728, 'admin', '2021-03-03 09:18:05', b'0', 'admin', '2021-07-27 15:59:50', NULL, 'member/list/memberRecycle', 'ios-aperture', 2, 'memberRecycle', '1367041332861730816', 'memberRecycle', 1.00, '回收站', NULL, '/manager/member*'); +INSERT INTO `li_menu` VALUES (1367042490443497472, 'admin', '2021-03-03 09:21:43', b'0', NULL, NULL, NULL, 'Main', 'ios-aperture', 1, '/', '1367038467288072192', '/', 1.00, '预存款', NULL, NULL); +INSERT INTO `li_menu` VALUES (1367042664410644480, 'admin', '2021-03-03 09:22:24', b'0', 'admin', '2021-07-27 16:02:44', 'null', 'member/advance/walletLog', 'ios-aperture', 2, 'walletLog', '1367042490443497472', 'walletLog', 0.00, '会员资金', 'null', '/manager/wallet/log*'); +INSERT INTO `li_menu` VALUES (1367042804944994304, 'admin', '2021-03-03 09:22:58', b'0', 'admin', '2021-07-27 16:02:48', NULL, 'member/advance/recharge', 'ios-alert', 2, 'recharge', '1367042490443497472', 'recharge', 1.00, '充值记录', NULL, '/manager/wallet/recharge*'); +INSERT INTO `li_menu` VALUES (1367042804944994305, 'admin', '2021-03-03 09:22:58', b'0', 'admin', '2021-07-27 16:02:52', NULL, 'member/advance/withdrawApply', 'ios-alert', 2, 'withdrawApply', '1367042490443497472', 'withdrawApply', 1.00, '提现申请', NULL, '/manager/wallet/withdrawApply*'); +INSERT INTO `li_menu` VALUES (1367042917113266176, 'admin', '2021-03-03 09:23:25', b'0', NULL, NULL, NULL, 'Main', 'ios-aperture', 1, 'commont', '1367038467288072192', '/', 0.00, '评价', NULL, NULL); +INSERT INTO `li_menu` VALUES (1367043020976816128, 'admin', '2021-03-03 09:23:49', b'0', 'admin', '2021-07-27 16:02:35', NULL, 'goods/goods-review/index', 'md-aperture', 2, 'goodsReview', '1367042917113266176', 'goodsReview', 0.00, '会员评价', NULL, '/manager/memberEvaluation*'); +INSERT INTO `li_menu` VALUES (1367043443917848576, 'admin', '2021-03-03 09:25:30', b'0', 'admin', '2021-07-27 16:03:00', NULL, 'Main', 'md-aperture', 1, 'order', '1367039534616805376', '/', 0.00, '订单', NULL, '/manager/orders*'); +INSERT INTO `li_menu` VALUES (1367043505771249664, 'admin', '2021-03-03 09:25:45', b'0', NULL, NULL, NULL, 'Main', 'md-aperture', 1, 'aftersale', '1367039534616805376', '/', 0.00, '售后', NULL, NULL); +INSERT INTO `li_menu` VALUES (1367043642379730944, 'admin', '2021-03-03 09:26:17', b'0', NULL, NULL, NULL, 'order/order/orderList', 'ios-aperture', 2, 'orderList', '1367043443917848576', 'orderList', 0.00, '商品订单', NULL, '/manager/order/order*'); +INSERT INTO `li_menu` VALUES (1367043791105556480, 'admin', '2021-03-03 09:26:53', b'0', NULL, NULL, NULL, 'order/order/fictitiousOrderList', 'ios-aperture', 2, 'fictitiousOrderList', '1367043443917848576', 'fictitiousOrderList', 1.00, '虚拟订单', NULL, '/manager/order/order*'); +INSERT INTO `li_menu` VALUES (1367043980407078912, 'admin', '2021-03-03 09:27:38', b'0', 'admin', '2021-07-27 16:03:43', NULL, 'order/after-order/afterSaleOrder', 'md-alert', 2, 'afterSaleOrder', '1367043505771249664', 'afterSaleOrder', 0.00, '售后管理', NULL, '/manager/order/afterSale*'); +INSERT INTO `li_menu` VALUES (1367044121163726848, 'admin', '2021-03-03 09:28:12', b'0', 'admin', '2021-07-27 16:03:48', NULL, 'order/after-order/orderComplaint', 'md-alert', 2, 'orderComplaint', '1367043505771249664', 'orderComplaint', 2.00, '交易投诉', NULL, '/manager/order/complain*'); +INSERT INTO `li_menu` VALUES (1367044247978508288, 'admin', '2021-03-03 09:28:42', b'0', 'admin', '2021-07-27 16:03:52', NULL, 'order/after-order/afterSale', 'md-aperture', 2, 'afterSaleReason', '1367043505771249664', 'afterSaleReason', 3.00, '售后原因', NULL, '/manager/order/afterSaleReason*'); +INSERT INTO `li_menu` VALUES (1367044376391319552, 'admin', '2021-03-03 09:29:12', b'0', 'admin', '2021-07-27 16:04:08', NULL, 'Main', 'md-aperture', 1, 'goodsManager', '1367039950368800768', '/', 0.00, '商品管理', NULL, '/manager/goods*'); +INSERT INTO `li_menu` VALUES (1367044657296441344, 'admin', '2021-03-03 09:30:19', b'0', NULL, NULL, NULL, 'Main', 'ios-aperture', 1, 'association', '1367039950368800768', '/', 1.00, '关联管理', NULL, NULL); +INSERT INTO `li_menu` VALUES (1367045529720061952, 'admin', '2021-03-03 09:33:47', b'0', 'admin', '2021-07-27 15:38:46', NULL, 'goods/goods-info/goods', 'md-aperture', 2, 'managerGoods', '1367044376391319552', 'managerGoods', 0.00, '平台商品', NULL, 'null'); +INSERT INTO `li_menu` VALUES (1367045630710513664, 'admin', '2021-03-03 09:34:11', b'0', 'admin', '2021-07-27 15:38:56', NULL, 'goods/goods-info/goodsApply', 'ios-alert', 2, 'applyGoods', '1367044376391319552', 'applyGoods', 1.00, '商品审核', NULL, 'null'); +INSERT INTO `li_menu` VALUES (1367045794284175360, 'admin', '2021-03-03 09:34:50', b'0', 'admin', '2021-07-27 16:04:18', NULL, 'goods/goods-manage/category', 'md-alert', 2, 'goodsCategory', '1367044657296441344', 'goodsCategory', 0.00, '商品分类', NULL, '/manager/goods/category*,/manager/goods/brand*,/manager/goods/spec*,/manager/goods/parameters*'); +INSERT INTO `li_menu` VALUES (1367045921434501120, 'admin', '2021-03-03 09:35:21', b'0', 'admin', '2021-07-27 16:04:23', NULL, 'goods/goods-manage/brand', 'md-alert', 2, 'goodsBrand', '1367044657296441344', 'goodsBrand', 1.00, '品牌列表', NULL, '/manager/goods/brand*'); +INSERT INTO `li_menu` VALUES (1367046068369358848, 'admin', '2021-03-03 09:35:56', b'0', 'admin', '2021-07-27 16:04:27', NULL, 'goods/goods-manage/spec', 'md-aperture', 2, 'goodsSpec', '1367044657296441344', 'goodsSpec', 2.00, '规格列表', NULL, '/manager/goods/spec*'); +INSERT INTO `li_menu` VALUES (1367046266214678528, 'admin', '2021-03-03 09:36:43', b'0', 'admin', '2021-07-27 16:04:32', NULL, 'goods-unit/index', 'md-alert', 2, 'goodsUnit', '1367044657296441344', 'goodsUnit', 4.00, '计量单位', NULL, '/manager/goods/goodsUnit*'); +INSERT INTO `li_menu` VALUES (1367048084701315072, 'admin', '2021-03-03 09:43:57', b'0', 'admin', '2021-03-03 09:52:17', 'null', 'null', 'ios-pricetags', 0, 'shop', '0', 'null', 0.40, '店铺', 'null', NULL); +INSERT INTO `li_menu` VALUES (1367048684339986432, 'admin', '2021-03-03 09:46:20', b'0', NULL, NULL, NULL, 'Main', 'md-aperture', 1, 'shopManager', '1367048084701315072', '/', 0.00, '店铺管理', NULL, NULL); +INSERT INTO `li_menu` VALUES (1367048754229673984, 'admin', '2021-03-03 09:46:36', b'0', NULL, NULL, NULL, 'Main', 'md-aperture', 1, 'bill', '1367048084701315072', '/', 0.00, ' 店铺结算', NULL, NULL); +INSERT INTO `li_menu` VALUES (1367048832210173952, 'admin', '2021-03-03 09:46:55', b'0', 'admin', '2021-07-27 16:05:30', NULL, 'seller/shop/shopList', 'md-aperture', 2, 'shopList', '1367048684339986432', 'shopList', 0.00, '店铺列表', NULL, '/manager/order/order*,/manager/store*'); +INSERT INTO `li_menu` VALUES (1367048967635861504, 'admin', '2021-03-03 09:47:27', b'0', 'admin', '2021-07-27 16:05:32', NULL, 'seller/shop/shopAuditList', 'md-alert', 2, 'shopAuth', '1367048684339986432', 'shopAuth', 1.00, '店铺审核', NULL, '/manager/store*'); +INSERT INTO `li_menu` VALUES (1367049068122996736, 'admin', '2021-03-03 09:47:51', b'0', 'admin', '2021-07-27 16:05:36', NULL, 'seller/bill/bill', 'md-alert', 2, 'billList', '1367048754229673984', 'billList', 0.00, '店铺结算', NULL, '/manager/order/bill*'); +INSERT INTO `li_menu` VALUES (1367049214198022144, 'admin', '2021-03-03 09:48:26', b'0', 'admin', '2021-12-02 19:45:28', NULL, 'Main', 'md-aperture', 1, 'promotionsManager', '1367040067201138688', '/', 0.00, '促销管理', NULL, 'null'); +INSERT INTO `li_menu` VALUES (1367049384792948736, 'admin', '2021-03-03 09:49:07', b'0', 'admin', '2021-12-02 19:54:12', NULL, 'promotions/coupon/coupon', 'md-alert', 2, 'promotions/coupon', '1367049214198022144', 'promotions/coupon', 0.00, '优惠券', NULL, '/manager/promotion/coupon*'); +INSERT INTO `li_menu` VALUES (1367049500782231552, 'admin', '2021-03-03 09:49:34', b'0', 'admin', '2021-12-02 19:41:37', 'null', 'promotions/full-discount/full-discount', 'md-alert', 2, 'promotions/full-discount', '1367049214198022144', 'promotions/full-discount', 1.00, '满额活动', 'null', '/manager/promotion/fullDiscount*'); +INSERT INTO `li_menu` VALUES (1367049611578966016, 'admin', '2021-03-03 09:50:01', b'0', 'admin', '2021-12-02 20:16:10', 'null', 'promotions/seckill/seckill', 'md-alert', 2, 'promotions/seckill', '1367049214198022144', 'promotions/seckill', 2.00, '秒杀活动', 'null', '/manager/promotion/seckill*'); +INSERT INTO `li_menu` VALUES (1367049712657498112, 'admin', '2021-03-03 09:50:25', b'0', 'admin', '2021-12-02 20:22:04', 'null', 'promotions/pintuan/pintuan', 'md-alert', 2, 'promotions/pintuan', '1367049214198022144', 'promotions/pintuan', 3.00, '拼团活动', 'null', '/manager/promotion/pintuan*'); +INSERT INTO `li_menu` VALUES (1367050250249830400, 'admin', '2021-03-03 09:52:33', b'0', 'admin', '2021-03-22 20:38:14', 'null', 'Main', 'md-aperture', 1, 'document', '1367040599596728320', '/', 2.00, '文章管理', 'null', NULL); +INSERT INTO `li_menu` VALUES (1367050320584114176, 'admin', '2021-03-03 09:52:50', b'0', 'admin', '2021-07-27 16:05:49', NULL, 'Main', 'md-aperture', 1, 'floor', '1367040599596728320', '/', 0.00, '楼层装修', NULL, '/manager/pageData*,/manager/file*,/manager/article-category*,/manager/article*,/manager/promotion*,/manager/goods*,/manager/store*'); +INSERT INTO `li_menu` VALUES (1367050530030878720, 'admin', '2021-03-03 09:53:40', b'0', 'admin', '2021-03-04 01:05:57', 'null', 'page-decoration/floorList', 'md-alert', 2, 'pcFloor', '1367050320584114176', 'pcFloor', 0.00, 'PC端', 'null', '/manager/other/pageData*'); +INSERT INTO `li_menu` VALUES (1367050673312497664, 'admin', '2021-03-03 09:54:14', b'0', 'admin', '2021-03-04 01:06:04', 'null', 'page-decoration/wap/wapList', 'md-aperture', 2, 'wapList', '1367050320584114176', 'wapList', 1.00, '移动端', 'null', '/manager/other/pageData*'); +INSERT INTO `li_menu` VALUES (1367050829697122304, 'admin', '2021-03-03 09:54:51', b'0', 'admin', '2021-07-27 16:06:32', 'null', 'page/article-manage/hotWords', 'md-aperture', 2, 'hotKeyWord', '1367050250249830400', 'hotKeyWord', 0.00, '搜索热词', 'null', '/manager/hotwords*'); +INSERT INTO `li_menu` VALUES (1367050939084570624, 'admin', '2021-03-03 09:55:17', b'0', 'admin', '2021-07-27 16:06:38', NULL, 'page/article-manage/ArticleCategory', 'md-aperture', 2, 'article-category', '1367050250249830400', 'article-category', 1.00, '文章分类', NULL, '/manager/other/articleCategory*'); +INSERT INTO `li_menu` VALUES (1367051048232943616, 'admin', '2021-03-03 09:55:43', b'0', 'admin', '2021-07-27 16:06:42', NULL, 'page/article-manage/articleList', 'md-alert', 2, 'articleList', '1367050250249830400', 'articleList', 3.00, '文章管理', NULL, '/manager/other/article*,/manager/other/articleCategory*'); +INSERT INTO `li_menu` VALUES (1367052616634204160, 'admin', '2021-03-03 10:01:57', b'0', 'admin', '2021-07-27 16:07:38', NULL, 'Main', 'md-aperture', 1, 'statistics', '1367040819248234496', '/', 0.00, '统计', NULL, '/manager/store*,/manager/member*'); +INSERT INTO `li_menu` VALUES (1367052705725415424, 'admin', '2021-03-03 10:02:18', b'0', 'admin', '2021-03-11 22:11:05', 'null', 'statistics/member', 'md-alert', 2, 'memberStatistics', '1367052616634204160', 'memberStatistics', 0.00, '会员统计', 'null', NULL); +INSERT INTO `li_menu` VALUES (1367052805503713280, 'admin', '2021-03-03 10:02:42', b'0', 'admin', '2021-03-11 22:11:14', 'null', 'statistics/order', 'md-alert', 2, 'orderStatistics', '1367052616634204160', 'orderStatistics', 1.00, '订单统计', 'null', NULL); +INSERT INTO `li_menu` VALUES (1367052915314786304, 'admin', '2021-03-03 10:03:08', b'0', 'admin', '2021-03-11 22:11:23', 'null', 'statistics/goods', 'md-alert', 2, 'goodsStatistics', '1367052616634204160', 'goodsStatistics', 2.00, '商品统计', 'null', NULL); +INSERT INTO `li_menu` VALUES (1367053087121866752, 'admin', '2021-03-03 10:03:49', b'0', 'admin', '2021-03-11 22:11:34', 'null', 'statistics/traffic', 'md-alert', 2, 'trafficStatistics', '1367052616634204160', 'trafficStatistics', 4.00, '流量统计', 'null', NULL); +INSERT INTO `li_menu` VALUES (1372807928452481024, 'admin', '2021-03-19 02:11:30', b'0', NULL, NULL, NULL, 'Main', 'ios-aperture', 1, 'flow', '1367039534616805376', '/', 3.00, '流水', NULL, NULL); +INSERT INTO `li_menu` VALUES (1372808148565360640, 'admin', '2021-03-19 02:12:23', b'0', 'admin', '2021-07-27 16:03:57', NULL, 'order/flow/paymentLog', 'md-alert', 2, 'paymentLog', '1372807928452481024', 'paymentLog', 1.00, '收款记录', NULL, '/manager/order/paymentLog*'); +INSERT INTO `li_menu` VALUES (1372808352295288832, 'admin', '2021-03-19 02:13:11', b'0', 'admin', '2021-07-27 16:04:01', NULL, 'order/flow/refundLog', 'ios-aperture', 2, 'refundLog', '1372807928452481024', 'refundLog', 2.00, '退款流水', NULL, '/manager/order/refundLog*'); +INSERT INTO `li_menu` VALUES (1373166892465782784, 'admin', '2021-03-20 01:57:54', b'0', 'admin', '2021-03-22 20:13:48', 'null', 'Main', 'ios-aperture', 1, '/', '1367038467288072192', '/', 0.00, '积分', 'null', NULL); +INSERT INTO `li_menu` VALUES (1373167227385151488, 'admin', '2021-03-20 01:59:14', b'0', 'admin', '2021-07-27 16:02:40', 'null', 'member/point/point', 'ios-aperture', 2, 'point', '1373166892465782784', 'point', 0.00, '积分历史', 'null', '/manager/member/memberPointsHistory*'); +INSERT INTO `li_menu` VALUES (1373791578371391488, 'admin', '2021-03-21 19:20:11', b'0', 'admin', '2021-07-27 16:05:38', NULL, 'seller/bill/accountStatementBill', 'md-alert', 2, 'accountStatementBill', '1367048754229673984', 'accountStatementBill', 0.00, '商家对账', NULL, '/manager/order/bill*'); +INSERT INTO `li_menu` VALUES (1374154349697040384, 'admin', '2021-03-22 19:21:42', b'0', 'admin', '2021-07-27 16:06:55', 'null', 'Main', 'md-aperture', 1, 'feedback', '1367040599596728320', '/', 3.00, '意见反馈', 'null', '/manager/other/feedback*'); +INSERT INTO `li_menu` VALUES (1374155741123837952, 'admin', '2021-03-22 19:27:14', b'0', 'admin', '2021-07-27 15:41:40', 'null', 'page/feedback/feedback', 'md-aperture', 2, 'feedback', '1374154349697040384', 'feedback', 0.00, '意见反馈', 'null', 'null'); +INSERT INTO `li_menu` VALUES (1374173575405109248, 'admin', '2021-03-22 20:38:06', b'0', 'admin', '2021-03-22 20:52:58', 'null', 'Main', 'ios-analytics', 1, 'distributionManager', '1367040599596728320', '/', 1.00, '分销管理', 'null', NULL); +INSERT INTO `li_menu` VALUES (1374177618072436736, 'admin', '2021-03-22 20:54:10', b'0', 'admin', '2021-07-27 16:05:58', 'null', 'distribution/distributionSetting', 'ios-basketball', 2, 'distributionSetting', '1374173575405109248', 'distributionSetting', 0.00, '分销设置', 'null', '/manager/system/setting/put/DISTRIBUTION_SETTING*,/manager/system/setting/get/DISTRIBUTION_SETTING*'); +INSERT INTO `li_menu` VALUES (1374177789581721600, 'admin', '2021-03-22 20:54:51', b'0', 'admin', '2021-07-27 16:06:15', 'null', 'distribution/distributionGoods', 'ios-chatbubbles', 2, 'distributionGoods', '1374173575405109248', 'distributionGoods', 3.00, '分销商品', 'null', '/manager/distribution/goods*'); +INSERT INTO `li_menu` VALUES (1374177910411231232, 'admin', '2021-03-22 20:55:19', b'0', 'admin', '2021-07-27 16:06:20', 'null', 'distribution/distributionOrder', 'ios-cloudy', 2, 'distributionOrder', '1374173575405109248', 'distributionOrder', 4.00, '分销订单', 'null', '/manager/distribution/order*,/manager/store*'); +INSERT INTO `li_menu` VALUES (1374178079181635584, 'admin', '2021-03-22 20:56:00', b'0', 'admin', '2021-07-27 16:06:05', 'null', 'distribution/distributionApply', 'md-egg', 2, 'distributionApply', '1374173575405109248', 'distributionApply', 1.00, '分销申请', 'null', '/manager/distribution*'); +INSERT INTO `li_menu` VALUES (1374178303975358464, 'admin', '2021-03-22 20:56:53', b'0', 'admin', '2021-07-27 16:06:08', 'null', 'distribution/distribution', 'md-person', 2, 'distribution', '1374173575405109248', 'distribution', 2.00, '分销员', 'null', '/manager/distribution*'); +INSERT INTO `li_menu` VALUES (1374916594269945856, 'admin', '2021-03-24 21:50:35', b'0', 'admin', '2021-07-27 16:08:51', NULL, 'sys/slider/slider', 'ios-aperture', 2, 'slider', '1349237129847005184', 'slider', 7.00, '验证码', NULL, '/manager/other/verificationSource*'); +INSERT INTO `li_menu` VALUES (1376450531517530112, 'admin', '2021-03-29 03:25:55', b'0', NULL, NULL, NULL, 'Main', 'md-basketball', 1, 'notice', '1367040599596728320', '/', 5.00, '站内信', NULL, NULL); +INSERT INTO `li_menu` VALUES (1376450662098796544, 'admin', '2021-03-29 03:26:26', b'0', 'admin', '2021-07-27 16:07:23', NULL, 'sys/message/noticeMessageTemplate', 'ios-american-football', 2, 'noticeMessageTemplate', '1376450531517530112', 'noticeMessageTemplate', 1.00, '站内信', NULL, '/manager/other/message*'); +INSERT INTO `li_menu` VALUES (1376450766817984512, 'admin', '2021-03-29 03:26:51', b'0', 'admin', '2021-03-29 03:27:25', 'null', 'Main', 'md-checkmark', 1, 'sms', '1367040599596728320', '/', 6.00, '短信管理', 'null', NULL); +INSERT INTO `li_menu` VALUES (1376450876423536640, 'admin', '2021-03-29 03:27:17', b'0', 'admin', '2021-07-27 16:07:29', NULL, 'sys/message/sms', 'ios-timer', 2, 'sms', '1376450766817984512', 'sms', 1.00, '短信', NULL, '/manager/sms/sms*,/manager/passport/member*'); +INSERT INTO `li_menu` VALUES (1384035281702748160, 'admin', '2021-04-19 14:45:00', b'0', 'admin', '2021-07-27 16:08:18', 'null', 'member/message-manage/weChatMessageManager', 'md-aperture', 2, 'message-manage', '1349237129847005184', 'message-manage', 5.00, '微信消息', 'null', '/manager/wechat/wechatMessage*'); +INSERT INTO `li_menu` VALUES (1403988156444962818, 'admin', '2021-06-13 16:10:36', b'0', 'admin', '2021-12-02 19:54:37', 'null', 'promotions/coupon-activity/coupon', '', 2, 'promotions/coupon-activity', '1367049214198022144', 'promotions/coupon-activity', 0.00, '券活动', 'null', '/manager/promotion/couponActivity*'); +INSERT INTO `li_menu` VALUES (1407601962899230721, 'admin', '2021-06-23 15:30:35', b'0', 'admin', '2021-07-27 16:05:08', NULL, 'Main', '', 1, 'liveManage', '1367040067201138688', '/', 2.00, '直播管理', NULL, '/manager/broadcast*'); +INSERT INTO `li_menu` VALUES (1407602049759072258, 'admin', '2021-06-23 15:30:55', b'0', 'admin', '2021-12-07 10:54:54', NULL, 'promotions/live/live', '', 2, 'promotions/live', '1407601962899230721', 'promotions/live', 1.00, '直播管理', NULL, 'null'); +INSERT INTO `li_menu` VALUES (1407602441964244994, 'admin', '2021-06-23 15:32:29', b'0', NULL, NULL, NULL, 'Main', '', 1, 'pointManage', '1367040067201138688', '/', 3.00, '积分活动', NULL, NULL); +INSERT INTO `li_menu` VALUES (1407602516912263170, 'admin', '2021-06-23 15:32:47', b'0', 'admin', '2021-12-03 19:18:30', NULL, 'promotions/points-goods/points-goods', '', 2, 'promotions/points-goods', '1407602441964244994', 'promotions/points-goods', 1.00, '积分商品', NULL, '/manager/promotion/pointsGoods*,/manager/goods*'); +INSERT INTO `li_menu` VALUES (1407602673334636546, 'admin', '2021-06-23 15:33:24', b'0', 'admin', '2021-12-03 19:19:23', NULL, 'promotions/points-goods-category/points-goods-category', '', 2, 'promotions/points-goods-category', '1407602441964244994', 'promotions/points-goods-category', 2.00, '积分分类', NULL, '/manager/promotion/pointsGoodsCategory*'); +INSERT INTO `li_menu` VALUES (1410862675914764290, 'admin', '2021-07-02 15:27:29', b'0', 'admin', '2021-07-27 16:06:26', 'null', 'distribution/distributionCash', '', 2, 'distributionCash', '1374173575405109248', 'distributionCash', 5.00, '分销提现', 'null', '/manager/distribution/cash*'); +INSERT INTO `li_menu` VALUES (1419926569920536578, 'admin', '2021-07-27 15:44:10', b'0', 'admin', '2021-07-27 16:07:10', NULL, 'customWords/index', NULL, 2, 'customWords', '1367050250249830400', 'customWords', 4.00, 'ES分词', NULL, '/manager/other/customWords*'); +INSERT INTO `li_menu` VALUES (1430799171593535490, 'admin', '2021-08-26 15:48:00', b'0', 'admin', '2021-12-02 20:21:34', NULL, 'promotions/kanjia/kanjia-activity-goods', NULL, 2, 'promotions/kanjia', '1367049214198022144', 'promotions/kanjia', 6.00, '砍价活动', NULL, '/manager/promotion/kanJiaGoods*'); +INSERT INTO `li_menu` VALUES (1495665663207432193, 'admin', '2022-02-21 15:44:17', b'0', 'admin', '2022-02-21 15:45:44', NULL, 'distribution/distrbutionGrade', NULL, 2, 'distrbutionGrade', '1374173575405109248', 'distrbutionGrade', 0.00, '分销等级', NULL, '/manager/distrbutionGrade*'); + +SET FOREIGN_KEY_CHECKS = 1; + + + + /* + Navicat Premium Data Transfer + + Source Server : lilishop + Source Server Type : MySQL + Source Server Version : 80025 + Source Host : 192.168.0.116:3306 + Source Schema : zhimai1 + + Target Server Type : MySQL + Target Server Version : 80025 + File Encoding : 65001 + + Date: 01/03/2022 15:36:03 +*/ + +SET NAMES utf8mb4; +SET FOREIGN_KEY_CHECKS = 0; + +-- ---------------------------- +-- Table structure for li_store_menu +-- ---------------------------- +DROP TABLE IF EXISTS `li_store_menu`; +CREATE TABLE `li_store_menu` ( + `id` bigint NOT NULL COMMENT 'ID', + `create_by` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '创建者', + `create_time` datetime(6) NULL DEFAULT NULL COMMENT '创建时间', + `delete_flag` bit(1) NULL DEFAULT NULL COMMENT '删除标志 true/false 删除/未删除', + `update_by` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '更新者', + `update_time` datetime NULL DEFAULT NULL COMMENT '更新时间', + `description` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '说明备注', + `front_route` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '前端路由', + `icon` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '图标', + `level` int NULL DEFAULT NULL COMMENT '层级', + `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '菜单/权限名称', + `parent_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '父id', + `path` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '赋权API地址,正则表达式', + `sort_order` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '排序值', + `title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '菜单标题', + `permission` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '权限url', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of li_store_menu +-- ---------------------------- +INSERT INTO `li_store_menu` VALUES (1348810750596767744, NULL, '2022-01-11 22:35:33.000000', b'0', NULL, '2022-01-11 22:36:52', NULL, 'Main', 'ios-american-football', 0, 'goods', '0', '/', '1', '商品', NULL); +INSERT INTO `li_store_menu` VALUES (1348810864748945408, NULL, '2022-01-11 22:35:37.000000', b'0', NULL, '2022-01-11 22:36:55', NULL, 'Main', 'ios-american-football', 1, 'Main', '1348810750596767744', '/', '1.1', '商品管理', ''); +INSERT INTO `li_store_menu` VALUES (1349237129847005184, NULL, '2022-01-11 22:35:40.000000', b'0', NULL, '2022-01-11 22:36:59', NULL, 'goods-operation', 'ios-american-football', 2, 'goods-operation', '1348810864748945408', '/goods-operation', '1.11', '商品发布', '/store/goods/category*,/store/goods/categorySpec*,/store/goods/categoryParameters*,/store/goods/draftGoods*,/store/goods/label*,/store/goods/goods*,/store/goods/goodsUnit*,/store/goods/spec*'); +INSERT INTO `li_store_menu` VALUES (1349237207378714624, NULL, '2022-01-11 22:35:42.000000', b'0', NULL, '2022-01-11 22:37:02', NULL, 'goods/goods-seller/goods', 'ios-american-football', 2, 'goods', '1348810864748945408', 'goods', '1.12', '商品列表', NULL); +INSERT INTO `li_store_menu` VALUES (1349237928434098176, NULL, '2022-01-11 22:35:45.000000', b'0', NULL, '2022-01-11 22:37:05', NULL, 'goods/goods-seller/draftGoods', 'ios-american-football', 2, 'template-goods', '1348810864748945408', 'template-goods', '1.13', '商品模板', NULL); +INSERT INTO `li_store_menu` VALUES (1349246048900243456, NULL, '2022-01-11 22:35:48.000000', b'0', NULL, '2022-01-11 22:37:08', NULL, 'goods/goods-manage/category', 'ios-american-football', 2, 'category', '1348810864748945408', 'category', '1.14', '店铺分类', NULL); +INSERT INTO `li_store_menu` VALUES (1349246347597602816, NULL, '2022-01-11 22:35:51.000000', b'0', NULL, '2022-01-11 22:37:11', NULL, 'Main', 'ios-american-football', 0, 'order', '0', '/', '2', '订单', NULL); +INSERT INTO `li_store_menu` VALUES (1349246468775239680, NULL, '2022-01-11 22:38:28.000000', b'0', NULL, '2022-01-11 22:38:31', NULL, 'Main', 'ios-american-football', 1, 'Main', '1349246347597602816', '/', '2.1', '订单管理', NULL); +INSERT INTO `li_store_menu` VALUES (1349246671158796288, NULL, '2022-01-11 22:38:42.000000', b'0', NULL, '2022-01-11 22:38:35', NULL, 'order/order/orderList', 'ios-american-football', 2, 'orderList', '1349246468775239680', 'orderList', '2.11', '商品订单', '/store/order/order*'); +INSERT INTO `li_store_menu` VALUES (1349246896661356544, NULL, '2022-01-11 22:40:27.000000', b'0', NULL, '2022-01-11 22:40:34', NULL, 'order/order/virtualOrderList', 'ios-american-football', 2, 'virtualOrderList', '1349246468775239680', 'virtualOrderList', '2.12', '虚拟订单', '/store/order/order*'); +INSERT INTO `li_store_menu` VALUES (1349247081504333824, NULL, '2022-01-11 22:41:47.000000', b'0', NULL, '2022-01-11 22:41:50', NULL, 'Main', 'ios-american-football', 1, 'Main', '1349246347597602816', '/', '2.2', '评价管理', NULL); +INSERT INTO `li_store_menu` VALUES (1349247640584085504, NULL, '2022-01-11 22:43:29.000000', b'0', NULL, '2022-01-11 22:45:47', NULL, 'member/memberComment', 'ios-american-football', 2, 'memberComment', '1349247081504333824', 'memberComment', '2.21', '评价管理', '/store/member/evaluation*'); +INSERT INTO `li_store_menu` VALUES (1349254815809298432, NULL, '2022-01-11 22:45:35.000000', b'0', NULL, '2022-01-11 22:45:50', NULL, 'Main', 'ios-american-football', 1, 'Main', '1349246347597602816', '/', '2.3', '售后管理', NULL); +INSERT INTO `li_store_menu` VALUES (1349255214977015808, NULL, '2022-01-11 22:49:22.000000', b'0', NULL, '2022-01-11 22:49:27', NULL, 'order/after-order/returnGoodsOrder', 'ios-american-football', 2, 'returnGoodsOrder', '1349254815809298432', 'returnGoodsOrder', '2.31', '退货管理', '/store/order/afterSale*'); +INSERT INTO `li_store_menu` VALUES (1349255404425338880, NULL, '2022-01-11 22:51:20.000000', b'0', NULL, '2022-01-11 22:51:22', NULL, 'order/after-order/returnMoneyOrder', 'ios-american-football', 2, 'returnMoneyOrder', '1349254815809298432', 'returnMoneyOrder', '2.32', '退款管理', '/store/order/afterSale*'); +INSERT INTO `li_store_menu` VALUES (1349256082979840000, NULL, '2022-01-11 22:52:50.000000', b'0', NULL, '2022-01-11 22:52:55', NULL, 'order/after-order/orderComplaint', 'ios-american-football', 2, 'orderComplaint', '1349254815809298432', 'orderComplaint', '2.33', '投诉管理', '/store/order/complain*'); +INSERT INTO `li_store_menu` VALUES (1357584224760102912, NULL, '2022-01-11 23:02:20.000000', b'0', NULL, '2022-01-11 23:02:25', NULL, 'Main', 'ios-american-football', 0, 'bill', '0', '/', '3', '财务', NULL); +INSERT INTO `li_store_menu` VALUES (1357873097859923969, NULL, '2022-01-11 23:04:13.000000', b'0', NULL, '2022-01-11 23:04:17', NULL, 'Main', 'ios-american-football', 1, 'Main', '1357584224760102912', '/', '3.1', '财务管理', ''); +INSERT INTO `li_store_menu` VALUES (1367038467288072192, NULL, '2022-01-11 23:06:11.000000', b'0', NULL, '2022-01-11 23:06:16', NULL, 'shop/bill/accountStatementBill', 'ios-american-football', 2, 'accountStatementBill', '1357873097859923969', 'accountStatementBill', '3.11', '财务对账', '/store/order/bill*'); +INSERT INTO `li_store_menu` VALUES (1367039534616805376, NULL, '2022-01-11 23:07:54.000000', b'0', NULL, '2022-01-11 23:07:57', NULL, 'shop/bill/storeBill', 'ios-american-football', 2, 'storeBill', '1357873097859923969', 'storeBill', '3.12', '店铺结算', '/store/order/bill*'); +INSERT INTO `li_store_menu` VALUES (1367039950368800768, NULL, '2022-01-11 23:09:26.000000', b'0', NULL, '2022-01-11 23:09:29', NULL, 'Main', 'ios-american-football', 1, 'Main', '1357584224760102912', '/', '3.2', '发票管理', NULL); +INSERT INTO `li_store_menu` VALUES (1367040067201138688, NULL, '2022-01-11 23:11:14.000000', b'0', NULL, '2022-01-11 23:11:18', NULL, 'order/receiptManager/receipt', 'ios-american-football', 2, 'receipt', '1367039950368800768', 'receipt', '3.21', '发票管理', '/store/trade/receipt*'); +INSERT INTO `li_store_menu` VALUES (1367040599596728320, NULL, '2022-01-11 23:12:49.000000', b'0', NULL, '2022-01-11 23:12:52', NULL, 'Main', 'ios-american-football', 0, 'promotion', '0', '/', '4', '营销', NULL); +INSERT INTO `li_store_menu` VALUES (1367040819248234496, NULL, '2022-01-11 23:14:35.000000', b'0', NULL, '2022-01-11 23:14:38', NULL, 'Main', 'ios-american-football', 1, 'Main', '1367040599596728320', '/', '4.1', '平台活动', NULL); +INSERT INTO `li_store_menu` VALUES (1367041332861730816, NULL, '2022-01-11 23:15:42.000000', b'0', NULL, '2022-01-11 23:15:48', NULL, 'promotion/pintuan/pintuan', 'ios-american-football', 2, 'pintuan', '1367040819248234496', 'pintuan', '4.11', '拼团活动', '/store/promotion/pintuan*'); +INSERT INTO `li_store_menu` VALUES (1367041461194850304, NULL, '2022-01-11 23:17:32.000000', b'0', NULL, '2022-01-11 23:17:44', NULL, 'promotion/seckill/seckill', 'ios-american-football', 2, 'seckill', '1367040819248234496', 'seckill', '4.12', '秒杀活动', '/store/promotion/seckill*'); +INSERT INTO `li_store_menu` VALUES (1367041575619657728, NULL, '2022-01-11 23:20:19.000000', b'0', NULL, '2022-01-11 23:20:24', NULL, 'Main', 'ios-american-football', 1, 'Main', '1367040599596728320', '/', '4.2', '直播活动', ''); +INSERT INTO `li_store_menu` VALUES (1367042490443497472, NULL, '2022-01-11 23:21:13.000000', b'0', NULL, '2022-01-11 23:21:22', NULL, 'promotion/live/live', 'ios-american-football', 2, 'live', '1367041575619657728', 'live', '4.21', '直播管理', '/store/broadcast/studio*'); +INSERT INTO `li_store_menu` VALUES (1367042664410644480, NULL, '2022-01-11 23:22:42.000000', b'0', NULL, '2022-01-11 23:22:59', NULL, 'promotion/live/liveGoods', 'ios-american-football', 2, 'liveGoods', '1367041575619657728', 'liveGoods', '4.22', '直播商品', '/store/broadcast/commodity*'); +INSERT INTO `li_store_menu` VALUES (1367042804944994304, NULL, '2022-01-11 23:24:24.000000', b'0', NULL, '2022-01-11 23:24:38', NULL, 'Main', 'ios-american-football', 1, 'Main', '1367040599596728320', '/', '4.3', '商家活动', NULL); +INSERT INTO `li_store_menu` VALUES (1367042804944994305, NULL, '2022-01-11 23:24:29.000000', b'0', NULL, '2022-01-11 23:24:42', NULL, 'promotion/full-discount/full-discount', 'ios-american-football', 2, 'full-cut', '1367042804944994304', 'full-discount', '4.31', '满额活动', '/store/promotion/fullDiscount*'); +INSERT INTO `li_store_menu` VALUES (1367042917113266176, NULL, '2022-01-11 23:26:45.000000', b'0', NULL, '2022-01-11 23:26:50', NULL, 'promotion/coupon/coupon', 'ios-american-football', 2, 'coupon', '1367042804944994304', 'coupon', '4.32', '优惠券', '/store/promotion/coupon*'); +INSERT INTO `li_store_menu` VALUES (1367043020976816128, NULL, '2022-01-11 23:28:50.000000', b'0', NULL, '2022-01-11 23:29:02', NULL, 'Main', 'ios-american-football', 1, 'Main', '1367040599596728320', '/', '4.4', '分销管理', NULL); +INSERT INTO `li_store_menu` VALUES (1367043443917848576, NULL, '2022-01-11 23:28:53.000000', b'0', NULL, '2022-01-11 23:29:04', NULL, 'distribution/distributionGoods', 'ios-american-football', 2, 'distributionGoods', '1367043020976816128', 'distributionGoods', '4.41', '分销商品', '/store/distribution/goods*'); +INSERT INTO `li_store_menu` VALUES (1367043505771249664, NULL, '2022-01-11 23:28:56.000000', b'0', NULL, '2022-01-11 23:29:07', NULL, 'distribution/distributionOrder', 'ios-american-football', 2, 'distributionOrder', '1367043020976816128', 'distributionOrderdistributionOrder', '4.42', '分销订单', '/store/distribution/order*'); +INSERT INTO `li_store_menu` VALUES (1367044121163726848, NULL, '2022-01-12 21:47:03.000000', b'0', NULL, '2022-01-12 21:47:25', NULL, 'Main', 'ios-american-football', 0, 'statistics', '0', '/', '5', '统计', NULL); +INSERT INTO `li_store_menu` VALUES (1367044247978508288, NULL, '2022-01-12 21:47:19.000000', b'0', NULL, '2022-01-12 21:47:28', NULL, 'Main', 'ios-american-football', 1, 'Main', '1367044121163726848', '/', '5.1', '统计管理', NULL); +INSERT INTO `li_store_menu` VALUES (1367044376391319552, NULL, '2022-01-12 21:49:45.000000', b'0', NULL, '2022-01-12 21:50:01', NULL, 'statistics/goods', 'ios-american-football', 2, 'goodsStatistics', '1367044247978508288', 'goodsStatistics', '5.11', '商品统计', '/store/statistics/goods*'); +INSERT INTO `li_store_menu` VALUES (1367044657296441344, NULL, '2022-01-12 21:49:48.000000', b'0', NULL, '2022-01-12 21:49:58', NULL, 'statistics/order', 'ios-american-football', 2, 'orderStatistics', '1367044247978508288', 'orderStatistics', '5.12', '订单统计', '/store/statistics/order*,/store/statistics/order*,/store/statistics/order*,/store/statistics/order*'); +INSERT INTO `li_store_menu` VALUES (1367045529720061952, NULL, '2022-01-12 21:49:51.000000', b'0', NULL, '2022-01-12 21:50:03', NULL, 'statistics/traffic', 'ios-american-football', 2, 'trafficStatistics', '1367044247978508288', 'trafficStatistics', '5.13', '流量统计', '/store/statistics/view*'); +INSERT INTO `li_store_menu` VALUES (1367045630710513664, NULL, '2022-01-12 21:52:59.000000', b'0', NULL, '2022-01-12 21:53:09', NULL, 'Main', 'ios-american-football', 0, 'settings', '0', '/', '6', '设置', NULL); +INSERT INTO `li_store_menu` VALUES (1367045794284175360, NULL, '2022-01-12 21:53:03.000000', b'0', NULL, '2022-01-12 21:53:12', NULL, 'Main', 'ios-american-football', 1, 'Main', '1367045630710513664', '/', '6.1', '配送设置', NULL); +INSERT INTO `li_store_menu` VALUES (1367045921434501120, NULL, '2022-01-12 21:55:49.000000', b'0', NULL, '2022-01-12 21:55:52', NULL, 'shop/ship/shipTemplate', 'ios-american-football', 2, 'shipTemplate', '1367045794284175360', 'shipTemplate', '6.11', '配送模板', '/store/setting/freightTemplate*'); +INSERT INTO `li_store_menu` VALUES (1367046068369358848, NULL, '2022-01-12 21:58:05.000000', b'0', NULL, '2022-01-12 21:58:13', NULL, 'shop/ship/logistics', 'ios-american-football', 2, 'logistics', '1367045794284175360', 'logistics', '6.12', '物流公司', '/store/other/logistics*'); +INSERT INTO `li_store_menu` VALUES (1367046266214678528, NULL, '2022-01-12 21:59:07.000000', b'0', NULL, '2022-01-12 21:59:43', NULL, 'Main', 'ios-american-football', 1, 'Main', '1367045630710513664', '/', '6.2', '店铺管理', NULL); +INSERT INTO `li_store_menu` VALUES (1367048084701315072, NULL, '2022-01-12 21:59:32.000000', b'0', NULL, '2022-01-12 21:59:48', NULL, 'shop/shopSetting', 'ios-american-football', 2, 'shopSetting', '1367046266214678528', 'shopSetting', '6.21', '店铺设置', NULL); +INSERT INTO `li_store_menu` VALUES (1367048684339986432, NULL, '2022-01-12 21:59:36.000000', b'0', NULL, '2022-01-12 21:59:51', NULL, 'shop/shopAddress', 'ios-american-football', 2, 'shopAddress', '1367046266214678528', 'shopAddress', '6.22', '自提管理', '/store/member/storeAddress*'); +INSERT INTO `li_store_menu` VALUES (1367048754229673984, NULL, '2022-01-12 22:02:11.000000', b'0', NULL, '2022-01-12 22:04:36', NULL, 'Main', 'ios-american-football', 0, 'Main', '0', '/', '7', '消息', NULL); +INSERT INTO `li_store_menu` VALUES (1367048832210173952, NULL, '2022-01-12 22:02:49.000000', b'0', NULL, '2022-01-12 22:04:39', NULL, 'Main', 'ios-american-football', 1, 'Main', '1367048754229673984', '/', '7.1', '系统消息', NULL); +INSERT INTO `li_store_menu` VALUES (1367048967635861503, NULL, '2022-02-18 16:08:30.000000', b'0', NULL, '2022-02-18 16:08:36', NULL, 'Main', 'ios-american-football', 1, 'Main', '1367045630710513664', '/', '6.3', '店员设置', ''); +INSERT INTO `li_store_menu` VALUES (1367048967635861504, NULL, '2022-01-12 22:02:51.000000', b'0', NULL, '2022-01-12 22:04:45', NULL, 'message', 'ios-american-football', 2, 'message_index', '1367048832210173952', 'message', '7.11', '系统消息', '/store/message/storeMessage*'); +INSERT INTO `li_store_menu` VALUES (1367048967635861505, NULL, '2022-02-18 16:12:18.000000', b'0', NULL, '2022-02-18 16:12:21', NULL, 'shop/system/clerk/clerkManage', 'ios-american-football', 2, '\nclerkManage', '1367048967635861503', '\nclerkManage', '6.31', '店员管理', '/store/department*,/store/clerk*,/store/role*,/store/department*'); +INSERT INTO `li_store_menu` VALUES (1367048967635861506, NULL, '2022-02-18 16:25:27.000000', NULL, NULL, '2022-02-18 16:25:31', NULL, 'shop/system/department/storeDepartmentManage', 'ios-american-football', 2, 'storeDepartmentManage', '1367048967635861503', 'storeDepartmentManage', '6.32', '部门管理', '/store/department*'); +INSERT INTO `li_store_menu` VALUES (1367048967635861507, NULL, '2022-02-18 16:27:28.000000', NULL, NULL, '2022-02-18 16:27:30', NULL, 'shop/system/role/storeRoleManage', 'ios-american-football', 2, 'storeRoleManage', '1367048967635861503', 'storeRoleManage', '6.33', '角色权限', '/store/role*'); +INSERT INTO `li_store_menu` VALUES (1367048967635861510, NULL, '2022-03-07 14:45:10.000000', b'0', NULL, '2022-03-07 14:45:13', NULL, 'shop/floorList', 'ios-american-football', 2, 'floorList', '1367046266214678528', 'floorList', '6.23', 'PC端', '/store/other/pageData*'); +INSERT INTO `li_store_menu` VALUES (1367048967635861511, NULL, '2022-03-07 15:13:52.000000', b'0', NULL, '2022-03-07 15:13:55', NULL, 'shop/wap/wapList', 'ios-american-football', 2, 'wapList', '1367046266214678528', 'wapList', '6.24', '移动端', '/store/other/pageData*'); + +SET FOREIGN_KEY_CHECKS = 1; + + +insert li_clerk(id,create_by,create_time,store_id,clerk_name,member_id,shopkeeper,is_super,`status`) select id,member_name,current_date(),id,member_name,member_id ,TRUE,TRUE,TRUE from li_store + + diff --git a/DB/version4.2.4toMASTER.sql b/DB/version4.2.4toMASTER.sql index c243f814..a00128f7 100644 --- a/DB/version4.2.4toMASTER.sql +++ b/DB/version4.2.4toMASTER.sql @@ -44,3 +44,8 @@ CREATE TABLE `li_wholesale` PRIMARY KEY (`id`) ) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_bin COMMENT '批发规则表'; +ALTER TABLE li_wholesale + ADD template_id bigint DEFAULT NULL COMMENT '商品模版id'; + +/** 店铺--默认页面是否开启**/ +ALTER TABLE li_store ADD page_show bit(1) DEFAULT NULL COMMENT '默认页面是否开启'; \ No newline at end of file diff --git a/LICENSE b/LICENSE index 818433ec..dbbe3558 100644 --- a/LICENSE +++ b/LICENSE @@ -1,674 +1,661 @@ - GNU GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The GNU General Public License is a free, copyleft license for -software and other kinds of works. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -the GNU General Public License is intended to guarantee your freedom to -share and change all versions of a program--to make sure it remains free -software for all its users. We, the Free Software Foundation, use the -GNU General Public License for most of our software; it applies also to -any other work released this way by its authors. You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -them if you wish), that you receive source code or can get it if you -want it, that you can change the software or use pieces of it in new -free programs, and that you know you can do these things. - - To protect your rights, we need to prevent others from denying you -these rights or asking you to surrender the rights. Therefore, you have -certain responsibilities if you distribute copies of the software, or if -you modify it: responsibilities to respect the freedom of others. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must pass on to the recipients the same -freedoms that you received. You must make sure that they, too, receive -or can get the source code. And you must show them these terms so they -know their rights. - - Developers that use the GNU GPL protect your rights with two steps: -(1) assert copyright on the software, and (2) offer you this License -giving you legal permission to copy, distribute and/or modify it. - - For the developers' and authors' protection, the GPL clearly explains -that there is no warranty for this free software. For both users' and -authors' sake, the GPL requires that modified versions be marked as -changed, so that their problems will not be attributed erroneously to -authors of previous versions. - - Some devices are designed to deny users access to install or run -modified versions of the software inside them, although the manufacturer -can do so. This is fundamentally incompatible with the aim of -protecting users' freedom to change the software. The systematic -pattern of such abuse occurs in the area of products for individuals to -use, which is precisely where it is most unacceptable. Therefore, we -have designed this version of the GPL to prohibit the practice for those -products. If such problems arise substantially in other domains, we -stand ready to extend this provision to those domains in future versions -of the GPL, as needed to protect the freedom of users. - - Finally, every program is threatened constantly by software patents. -States should not allow patents to restrict development and use of -software on general-purpose computers, but in those that do, we wish to -avoid the special danger that patents applied to a free program could -make it effectively proprietary. To prevent this, the GPL assures that -patents cannot be used to render the program non-free. - - The precise terms and conditions for copying, distribution and -modification follow. - - TERMS AND CONDITIONS - - 0. Definitions. - - "This License" refers to version 3 of the GNU General Public License. - - "Copyright" also means copyright-like laws that apply to other kinds of -works, such as semiconductor masks. - - "The Program" refers to any copyrightable work licensed under this -License. Each licensee is addressed as "you". "Licensees" and -"recipients" may be individuals or organizations. - - To "modify" a work means to copy from or adapt all or part of the work -in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a "modified version" of the -earlier work or a work "based on" the earlier work. - - A "covered work" means either the unmodified Program or a work based -on the Program. - - To "propagate" a work means to do anything with it that, without -permission, would make you directly or secondarily liable for -infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, -distribution (with or without modification), making available to the -public, and in some countries other activities as well. - - To "convey" a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through -a computer network, with no transfer of a copy, is not conveying. - - An interactive user interface displays "Appropriate Legal Notices" -to the extent that it includes a convenient and prominently visible -feature that (1) displays an appropriate copyright notice, and (2) -tells the user that there is no warranty for the work (except to the -extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If -the interface presents a list of user commands or options, such as a -menu, a prominent item in the list meets this criterion. - - 1. Source Code. - - The "source code" for a work means the preferred form of the work -for making modifications to it. "Object code" means any non-source -form of a work. - - A "Standard Interface" means an interface that either is an official -standard defined by a recognized standards body, or, in the case of -interfaces specified for a particular programming language, one that -is widely used among developers working in that language. - - The "System Libraries" of an executable work include anything, other -than the work as a whole, that (a) is included in the normal form of -packaging a Major Component, but which is not part of that Major -Component, and (b) serves only to enable use of the work with that -Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A -"Major Component", in this context, means a major essential component -(kernel, window system, and so on) of the specific operating system -(if any) on which the executable work runs, or a compiler used to -produce the work, or an object code interpreter used to run it. - - The "Corresponding Source" for a work in object code form means all -the source code needed to generate, install, and (for an executable -work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's -System Libraries, or general-purpose tools or generally available free -programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source -includes interface definition files associated with source files for -the work, and the source code for shared libraries and dynamically -linked subprograms that the work is specifically designed to require, -such as by intimate data communication or control flow between those -subprograms and other parts of the work. - - The Corresponding Source need not include anything that users -can regenerate automatically from other parts of the Corresponding -Source. - - The Corresponding Source for a work in source code form is that -same work. - - 2. Basic Permissions. - - All rights granted under this License are granted for the term of -copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a -covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your -rights of fair use or other equivalent, as provided by copyright law. - - You may make, run and propagate covered works that you do not -convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose -of having them make modifications exclusively for you, or provide you -with facilities for running those works, provided that you comply with -the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works -for you must do so exclusively on your behalf, under your direction -and control, on terms that prohibit them from making any copies of -your copyrighted material outside their relationship with you. - - Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 -makes it unnecessary. - - 3. Protecting Users' Legal Rights From Anti-Circumvention Law. - - No covered work shall be deemed part of an effective technological -measure under any applicable law fulfilling obligations under article -11 of the WIPO copyright treaty adopted on 20 December 1996, or -similar laws prohibiting or restricting circumvention of such -measures. - - When you convey a covered work, you waive any legal power to forbid -circumvention of technological measures to the extent such circumvention -is effected by exercising rights under this License with respect to -the covered work, and you disclaim any intention to limit operation or -modification of the work as a means of enforcing, against the work's -users, your or third parties' legal rights to forbid circumvention of -technological measures. - - 4. Conveying Verbatim Copies. - - You may convey verbatim copies of the Program's source code as you -receive it, in any medium, provided that you conspicuously and -appropriately publish on each copy an appropriate copyright notice; -keep intact all notices stating that this License and any -non-permissive terms added in accord with section 7 apply to the code; -keep intact all notices of the absence of any warranty; and give all -recipients a copy of this License along with the Program. - - You may charge any price or no price for each copy that you convey, -and you may offer support or warranty protection for a fee. - - 5. Conveying Modified Source Versions. - - You may convey a work based on the Program, or the modifications to -produce it from the Program, in the form of source code under the -terms of section 4, provided that you also meet all of these conditions: - - a) The work must carry prominent notices stating that you modified - it, and giving a relevant date. - - b) The work must carry prominent notices stating that it is - released under this License and any conditions added under section - 7. This requirement modifies the requirement in section 4 to - "keep intact all notices". - - c) You must license the entire work, as a whole, under this - License to anyone who comes into possession of a copy. This - License will therefore apply, along with any applicable section 7 - additional terms, to the whole of the work, and all its parts, - regardless of how they are packaged. This License gives no - permission to license the work in any other way, but it does not - invalidate such permission if you have separately received it. - - d) If the work has interactive user interfaces, each must display - Appropriate Legal Notices; however, if the Program has interactive - interfaces that do not display Appropriate Legal Notices, your - work need not make them do so. - - A compilation of a covered work with other separate and independent -works, which are not by their nature extensions of the covered work, -and which are not combined with it such as to form a larger program, -in or on a volume of a storage or distribution medium, is called an -"aggregate" if the compilation and its resulting copyright are not -used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work -in an aggregate does not cause this License to apply to the other -parts of the aggregate. - - 6. Conveying Non-Source Forms. - - You may convey a covered work in object code form under the terms -of sections 4 and 5, provided that you also convey the -machine-readable Corresponding Source under the terms of this License, -in one of these ways: - - a) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by the - Corresponding Source fixed on a durable physical medium - customarily used for software interchange. - - b) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by a - written offer, valid for at least three years and valid for as - long as you offer spare parts or customer support for that product - model, to give anyone who possesses the object code either (1) a - copy of the Corresponding Source for all the software in the - product that is covered by this License, on a durable physical - medium customarily used for software interchange, for a price no - more than your reasonable cost of physically performing this - conveying of source, or (2) access to copy the - Corresponding Source from a network server at no charge. - - c) Convey individual copies of the object code with a copy of the - written offer to provide the Corresponding Source. This - alternative is allowed only occasionally and noncommercially, and - only if you received the object code with such an offer, in accord - with subsection 6b. - - d) Convey the object code by offering access from a designated - place (gratis or for a charge), and offer equivalent access to the - Corresponding Source in the same way through the same place at no - further charge. You need not require recipients to copy the - Corresponding Source along with the object code. If the place to - copy the object code is a network server, the Corresponding Source - may be on a different server (operated by you or a third party) - that supports equivalent copying facilities, provided you maintain - clear directions next to the object code saying where to find the - Corresponding Source. Regardless of what server hosts the - Corresponding Source, you remain obligated to ensure that it is - available for as long as needed to satisfy these requirements. - - e) Convey the object code using peer-to-peer transmission, provided - you inform other peers where the object code and Corresponding - Source of the work are being offered to the general public at no - charge under subsection 6d. - - A separable portion of the object code, whose source code is excluded -from the Corresponding Source as a System Library, need not be -included in conveying the object code work. - - A "User Product" is either (1) a "consumer product", which means any -tangible personal property which is normally used for personal, family, -or household purposes, or (2) anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular -product received by a particular user, "normally used" refers to a -typical or common use of that class of product, regardless of the status -of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product -is a consumer product regardless of whether the product has substantial -commercial, industrial or non-consumer uses, unless such uses represent -the only significant mode of use of the product. - - "Installation Information" for a User Product means any methods, -procedures, authorization keys, or other information required to install -and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must -suffice to ensure that the continued functioning of the modified object -code is in no case prevented or interfered with solely because -modification has been made. - - If you convey an object code work under this section in, or with, or -specifically for use in, a User Product, and the conveying occurs as -part of a transaction in which the right of possession and use of the -User Product is transferred to the recipient in perpetuity or for a -fixed term (regardless of how the transaction is characterized), the -Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply -if neither you nor any third party retains the ability to install -modified object code on the User Product (for example, the work has -been installed in ROM). - - The requirement to provide Installation Information does not include a -requirement to continue to provide support service, warranty, or updates -for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a -network may be denied when the modification itself materially and -adversely affects the operation of the network or violates the rules and -protocols for communication across the network. - - Corresponding Source conveyed, and Installation Information provided, -in accord with this section must be in a format that is publicly -documented (and with an implementation available to the public in -source code form), and must require no special password or key for -unpacking, reading or copying. - - 7. Additional Terms. - - "Additional permissions" are terms that supplement the terms of this -License by making exceptions from one or more of its conditions. -Additional permissions that are applicable to the entire Program shall -be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions -apply only to part of the Program, that part may be used separately -under those permissions, but the entire Program remains governed by -this License without regard to the additional permissions. - - When you convey a copy of a covered work, you may at your option -remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place -additional permissions on material, added by you to a covered work, -for which you have or can give appropriate copyright permission. - - Notwithstanding any other provision of this License, for material you -add to a covered work, you may (if authorized by the copyright holders of -that material) supplement the terms of this License with terms: - - a) Disclaiming warranty or limiting liability differently from the - terms of sections 15 and 16 of this License; or - - b) Requiring preservation of specified reasonable legal notices or - author attributions in that material or in the Appropriate Legal - Notices displayed by works containing it; or - - c) Prohibiting misrepresentation of the origin of that material, or - requiring that modified versions of such material be marked in - reasonable ways as different from the original version; or - - d) Limiting the use for publicity purposes of names of licensors or - authors of the material; or - - e) Declining to grant rights under trademark law for use of some - trade names, trademarks, or service marks; or - - f) Requiring indemnification of licensors and authors of that - material by anyone who conveys the material (or modified versions of - it) with contractual assumptions of liability to the recipient, for - any liability that these contractual assumptions directly impose on - those licensors and authors. - - All other non-permissive additional terms are considered "further -restrictions" within the meaning of section 10. If the Program as you -received it, or any part of it, contains a notice stating that it is -governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains -a further restriction but permits relicensing or conveying under this -License, you may add to a covered work material governed by the terms -of that license document, provided that the further restriction does -not survive such relicensing or conveying. - - If you add terms to a covered work in accord with this section, you -must place, in the relevant source files, a statement of the -additional terms that apply to those files, or a notice indicating -where to find the applicable terms. - - Additional terms, permissive or non-permissive, may be stated in the -form of a separately written license, or stated as exceptions; -the above requirements apply either way. - - 8. Termination. - - You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or -modify it is void, and will automatically terminate your rights under -this License (including any patent licenses granted under the third -paragraph of section 11). - - However, if you cease all violation of this License, then your -license from a particular copyright holder is reinstated (a) -provisionally, unless and until the copyright holder explicitly and -finally terminates your license, and (b) permanently, if the copyright -holder fails to notify you of the violation by some reasonable means -prior to 60 days after the cessation. - - Moreover, your license from a particular copyright holder is -reinstated permanently if the copyright holder notifies you of the -violation by some reasonable means, this is the first time you have -received notice of violation of this License (for any work) from that -copyright holder, and you cure the violation prior to 30 days after -your receipt of the notice. - - Termination of your rights under this section does not terminate the -licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently -reinstated, you do not qualify to receive new licenses for the same -material under section 10. - - 9. Acceptance Not Required for Having Copies. - - You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work -occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, -nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a -covered work, you indicate your acceptance of this License to do so. - - 10. Automatic Licensing of Downstream Recipients. - - Each time you convey a covered work, the recipient automatically -receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible -for enforcing compliance by third parties with this License. - - An "entity transaction" is a transaction transferring control of an -organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered -work results from an entity transaction, each party to that -transaction who receives a copy of the work also receives whatever -licenses to the work the party's predecessor in interest had or could -give under the previous paragraph, plus a right to possession of the -Corresponding Source of the work from the predecessor in interest, if -the predecessor has it or can get it with reasonable efforts. - - You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may -not impose a license fee, royalty, or other charge for exercise of -rights granted under this License, and you may not initiate litigation -(including a cross-claim or counterclaim in a lawsuit) alleging that -any patent claim is infringed by making, using, selling, offering for -sale, or importing the Program or any portion of it. - - 11. Patents. - - A "contributor" is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The -work thus licensed is called the contributor's "contributor version". - - A contributor's "essential patent claims" are all patent claims -owned or controlled by the contributor, whether already acquired or -hereafter acquired, that would be infringed by some manner, permitted -by this License, of making, using, or selling its contributor version, -but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For -purposes of this definition, "control" includes the right to grant -patent sublicenses in a manner consistent with the requirements of -this License. - - Each contributor grants you a non-exclusive, worldwide, royalty-free -patent license under the contributor's essential patent claims, to -make, use, sell, offer for sale, import and otherwise run, modify and -propagate the contents of its contributor version. - - In the following three paragraphs, a "patent license" is any express -agreement or commitment, however denominated, not to enforce a patent -(such as an express permission to practice a patent or covenant not to -sue for patent infringement). To "grant" such a patent license to a -party means to make such an agreement or commitment not to enforce a -patent against the party. - - If you convey a covered work, knowingly relying on a patent license, -and the Corresponding Source of the work is not available for anyone -to copy, free of charge and under the terms of this License, through a -publicly available network server or other readily accessible means, -then you must either (1) cause the Corresponding Source to be so -available, or (2) arrange to deprive yourself of the benefit of the -patent license for this particular work, or (3) arrange, in a manner -consistent with the requirements of this License, to extend the patent -license to downstream recipients. "Knowingly relying" means you have -actual knowledge that, but for the patent license, your conveying the -covered work in a country, or your recipient's use of the covered work -in a country, would infringe one or more identifiable patents in that -country that you have reason to believe are valid. - - If, pursuant to or in connection with a single transaction or -arrangement, you convey, or propagate by procuring conveyance of, a -covered work, and grant a patent license to some of the parties -receiving the covered work authorizing them to use, propagate, modify -or convey a specific copy of the covered work, then the patent license -you grant is automatically extended to all recipients of the covered -work and works based on it. - - A patent license is "discriminatory" if it does not include within -the scope of its coverage, prohibits the exercise of, or is -conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered -work if you are a party to an arrangement with a third party that is -in the business of distributing software, under which you make payment -to the third party based on the extent of your activity of conveying -the work, and under which the third party grants, to any of the -parties who would receive the covered work from you, a discriminatory -patent license (a) in connection with copies of the covered work -conveyed by you (or copies made from those copies), or (b) primarily -for and in connection with specific products or compilations that -contain the covered work, unless you entered into that arrangement, -or that patent license was granted, prior to 28 March 2007. - - Nothing in this License shall be construed as excluding or limiting -any implied license or other defenses to infringement that may -otherwise be available to you under applicable patent law. - - 12. No Surrender of Others' Freedom. - - If conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a -covered work so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you -to collect a royalty for further conveying from those to whom you convey -the Program, the only way you could satisfy both those terms and this -License would be to refrain entirely from conveying the Program. - - 13. Use with the GNU Affero General Public License. - - Notwithstanding any other provision of this License, you have -permission to link or combine any covered work with a work licensed -under version 3 of the GNU Affero General Public License into a single -combined work, and to convey the resulting work. The terms of this -License will continue to apply to the part which is the covered work, -but the special requirements of the GNU Affero General Public License, -section 13, concerning interaction through a network will apply to the -combination as such. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - - Each version is given a distinguishing version number. If the -Program specifies that a certain numbered version of the GNU General -Public License "or any later version" applies to it, you have the -option of following the terms and conditions either of that numbered -version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the -GNU General Public License, you may choose any version ever published -by the Free Software Foundation. - - If the Program specifies that a proxy can decide which future -versions of the GNU General Public License can be used, that proxy's -public statement of acceptance of a version permanently authorizes you -to choose that version for the Program. - - Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any -author or copyright holder as a result of your choosing to follow a -later version. - - 15. Disclaimer of Warranty. - - THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT -HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY -OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF -ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. Limitation of Liability. - - IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS -THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY -GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE -USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF -DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD -PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), -EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF -SUCH DAMAGES. - - 17. Interpretation of Sections 15 and 16. - - If the disclaimer of warranty and limitation of liability provided -above cannot be given local legal effect according to their terms, -reviewing courts shall apply local law that most closely approximates -an absolute waiver of all civil liability in connection with the -Program, unless a warranty or assumption of liability accompanies a -copy of the Program in return for a fee. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -state the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . - -Also add information on how to contact you by electronic and paper mail. - - If the program does terminal interaction, make it output a short -notice like this when it starts in an interactive mode: - - Copyright (C) - This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, your program's commands -might be different; for a GUI interface, you would use an "about box". - - You should also get your employer (if you work as a programmer) or school, -if any, to sign a "copyright disclaimer" for the program, if necessary. -For more information on this, and how to apply and follow the GNU GPL, see -. - - The GNU General Public License does not permit incorporating your program -into proprietary programs. If your program is a subroutine library, you -may consider it more useful to permit linking proprietary applications with -the library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. But first, please read -. + GNU AFFERO GENERAL PUBLIC LICENSE + Version 3, 19 November 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU Affero General Public License is a free, copyleft license for +software and other kinds of works, specifically designed to ensure +cooperation with the community in the case of network server software. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +our General Public Licenses are intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + Developers that use our General Public Licenses protect your rights +with two steps: (1) assert copyright on the software, and (2) offer +you this License which gives you legal permission to copy, distribute +and/or modify the software. + + A secondary benefit of defending all users' freedom is that +improvements made in alternate versions of the program, if they +receive widespread use, become available for other developers to +incorporate. Many developers of free software are heartened and +encouraged by the resulting cooperation. However, in the case of +software used on network servers, this result may fail to come about. +The GNU General Public License permits making a modified version and +letting the public access it on a server without ever releasing its +source code to the public. + + The GNU Affero General Public License is designed specifically to +ensure that, in such cases, the modified source code becomes available +to the community. It requires the operator of a network server to +provide the source code of the modified version running there to the +users of that server. Therefore, public use of a modified version, on +a publicly accessible server, gives the public access to the source +code of the modified version. + + An older license, called the Affero General Public License and +published by Affero, was designed to accomplish similar goals. This is +a different license, not a version of the Affero GPL, but Affero has +released a new version of the Affero GPL which permits relicensing under +this license. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU Affero General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Remote Network Interaction; Use with the GNU General Public License. + + Notwithstanding any other provision of this License, if you modify the +Program, your modified version must prominently offer all users +interacting with it remotely through a computer network (if your version +supports such interaction) an opportunity to receive the Corresponding +Source of your version by providing access to the Corresponding Source +from a network server at no charge, through some standard or customary +means of facilitating copying of software. This Corresponding Source +shall include the Corresponding Source for any work covered by version 3 +of the GNU General Public License that is incorporated pursuant to the +following paragraph. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the work with which it is combined will remain governed by version +3 of the GNU General Public License. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU Affero General Public License from time to time. Such new versions +will be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU Affero General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU Affero General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU Affero General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published + by the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If your software can interact with users remotely through a computer +network, you should also make sure that it provides a way for users to +get its source. For example, if your program is a web application, its +interface could display a "Source" link that leads users to an archive +of the code. There are many ways you could offer source, and different +solutions will be better for different programs; see section 13 for the +specific requirements. + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU AGPL, see +. diff --git a/README.md b/README.md index 17a91599..62fda1fb 100644 --- a/README.md +++ b/README.md @@ -2,19 +2,14 @@ #### 欢迎交流需求,交流业务,交流技术(基础问题自行解决,其他问题先看文档后提问) +#### 不用削尖脑袋往老群里加,老群活跃度较低,很多潜水党,新群相对而言活跃一些 :tw-1f606: :tw-1f606: :tw-1f606: :tw-1f606: :tw-1f606: :tw-1f606: + +#### PS: **演示站点所有环境均部署master分支。如果有演示站点问题,可以反馈,如果演示站点没问题本地运行有问题,需自行处理** ##### 交流 qq 1群 961316482(已满) -Lilishop交流群点击快捷加群 - ##### 交流 qq 2群 875294241(已满) - -Lilishop交流群2群点击快捷加群 - - -##### 交流 qq 3群 263785057 - -Lilishop交流群3群点击快捷加群 - +##### 交流 qq 3群 263785057(已满) +##### 交流 qq 4群 674617534 ##### 体验 公众号/小程序/APP 体验,扫描二维码 @@ -166,6 +161,7 @@ PS:手机验证码为 ‘111111’ ### 交流群 -##### 官方qq 1群 961316482(已满) -##### 官方qq 2群 875294241(已满) -##### 官网qq 3群 263785057 +##### 交流 qq 1群 961316482(已满) +##### 交流 qq 2群 875294241(已满) +##### 交流 qq 3群 263785057(已满) +##### 交流 qq 4群 674617534 diff --git a/admin/pom.xml b/admin/pom.xml index d14ea30b..8b4b5b9b 100644 --- a/admin/pom.xml +++ b/admin/pom.xml @@ -32,10 +32,10 @@ logstash-logback-encoder ${logstash-logback-encoder} - - - - + + + + diff --git a/admin/src/main/resources/application.properties b/admin/src/main/resources/application.properties index 8e6cdb8a..5f433f01 100644 --- a/admin/src/main/resources/application.properties +++ b/admin/src/main/resources/application.properties @@ -16,5 +16,6 @@ spring.mail.username=1814994716@qq.com spring.mail.password=abcdefg123456!@#$%^ # 日志文件路径 logging.file.path=lili-logs/admin +lili.data.logstash.server=106.124.130.167:4560 # 文件格式 logging.pattern.file=%clr(%d{yyyy-MM-dd HH:mm:ss.SSS}){faint} %clr(%5p) %clr(${PID}){magenta} %clr(---){faint} %clr([%15.15t]){faint} %clr(%-40.40logger{39}){cyan} %clr(:){faint} %m%n%wEx diff --git a/buyer-api/src/main/java/cn/lili/controller/member/MemberEvaluationBuyerController.java b/buyer-api/src/main/java/cn/lili/controller/member/MemberEvaluationBuyerController.java index e33524f8..26285f54 100644 --- a/buyer-api/src/main/java/cn/lili/controller/member/MemberEvaluationBuyerController.java +++ b/buyer-api/src/main/java/cn/lili/controller/member/MemberEvaluationBuyerController.java @@ -48,7 +48,7 @@ public class MemberEvaluationBuyerController { @ApiOperation(value = "查看会员评价详情") @ApiImplicitParam(name = "id", value = "评价ID", required = true, paramType = "path") @GetMapping(value = "/get/{id}") - public ResultMessage save(@NotNull(message = "评价ID不能为空") @PathVariable("id") String id) { + public ResultMessage get(@NotNull(message = "评价ID不能为空") @PathVariable("id") String id) { return ResultUtil.data(memberEvaluationService.queryById(id)); } diff --git a/buyer-api/src/main/java/cn/lili/controller/order/OrderComplaintBuyerController.java b/buyer-api/src/main/java/cn/lili/controller/order/OrderComplaintBuyerController.java index f348c882..1d26fef2 100644 --- a/buyer-api/src/main/java/cn/lili/controller/order/OrderComplaintBuyerController.java +++ b/buyer-api/src/main/java/cn/lili/controller/order/OrderComplaintBuyerController.java @@ -82,7 +82,7 @@ public class OrderComplaintBuyerController { @PostMapping("/communication") public ResultMessage addCommunication(@RequestParam String complainId, @RequestParam String content) { AuthUser currentUser = Objects.requireNonNull(UserContext.getCurrentUser()); - OrderComplaintCommunicationVO communicationVO = new OrderComplaintCommunicationVO(complainId, content, CommunicationOwnerEnum.BUYER.name(), currentUser.getId(), currentUser.getNickName()); + OrderComplaintCommunicationVO communicationVO = new OrderComplaintCommunicationVO(complainId, content, CommunicationOwnerEnum.BUYER.name(), currentUser.getNickName(), currentUser.getId()); orderComplaintCommunicationService.addCommunication(communicationVO); return ResultUtil.data(communicationVO); } diff --git a/buyer-api/src/main/java/cn/lili/controller/other/PageBuyerController.java b/buyer-api/src/main/java/cn/lili/controller/other/PageBuyerController.java index f7a60963..419fb77a 100644 --- a/buyer-api/src/main/java/cn/lili/controller/other/PageBuyerController.java +++ b/buyer-api/src/main/java/cn/lili/controller/other/PageBuyerController.java @@ -2,17 +2,17 @@ package cn.lili.controller.other; import cn.lili.common.enums.ResultUtil; import cn.lili.common.vo.ResultMessage; +import cn.lili.modules.page.entity.dos.PageData; import cn.lili.modules.page.entity.dto.PageDataDTO; import cn.lili.modules.page.entity.enums.PageEnum; import cn.lili.modules.page.entity.vos.PageDataVO; import cn.lili.modules.page.service.PageDataService; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestParam; -import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.bind.annotation.*; /** * 买家端,页面接口 @@ -36,12 +36,63 @@ public class PageBuyerController { public ResultMessage getIndex(@RequestParam String clientType) { PageDataDTO pageDataDTO = new PageDataDTO(PageEnum.INDEX.name()); pageDataDTO.setPageClientType(clientType); - return ResultUtil.data(pageService.getPageData(pageDataDTO)); + PageDataVO pageDataVO=pageService.getPageData(pageDataDTO); + return ResultUtil.data(pageDataVO); } @ApiOperation(value = "获取页面数据") @GetMapping public ResultMessage get(PageDataDTO pageDataDTO) { - return ResultUtil.data(pageService.getPageData(pageDataDTO)); + PageDataVO pageDataVO=pageService.getPageData(pageDataDTO); + return ResultUtil.data(pageDataVO); + } + + @ApiOperation(value = "获取店铺首页") + @GetMapping("/getStore") + public ResultMessage getShopPage(@RequestParam String clientType,String storeId) { + PageDataDTO pageDataDTO = new PageDataDTO(PageEnum.STORE.name()); + pageDataDTO.setPageClientType(clientType); + pageDataDTO.setNum(storeId); + PageDataVO pageDataVO=pageService.getPageData(pageDataDTO); + return ResultUtil.data(pageDataVO); + } + + @ApiOperation(value = "获取页面数据") + @ApiImplicitParam(name = "id", value = "id", required = true, dataType = "String", paramType = "path") + @GetMapping("/get/{id}") + public ResultMessage getPage(@PathVariable("id") String id) { + return ResultUtil.data(pageService.getSpecial(id)); + } + + @ApiOperation(value = "获取专题页面数据(根据消息内容得知)") + @GetMapping("/getSpecial") + public ResultMessage getSpecial(@RequestParam String body) { + String name = ""; + if (body.indexOf("』") >= 0 && body.indexOf("『") >= 0) { + name = body.substring(body.indexOf("『") + 1, body.lastIndexOf("』")); + } else if (body.indexOf("〉") >= 0 && body.indexOf("〈") >= 0) { + name = body.substring(body.indexOf("〈") + 1, body.lastIndexOf("〉")); + } else if (body.indexOf("」") >= 0 && body.indexOf("「") >= 0) { + name = body.substring(body.indexOf("「") + 1, body.lastIndexOf("」")); + } else if (body.indexOf("》") >= 0 && body.indexOf("《") >= 0) { + name = body.substring(body.indexOf("《") + 1, body.lastIndexOf("》")); + } else if (body.indexOf(")") >= 0 && body.indexOf("(") >= 0) { + name = body.substring(body.indexOf("(") + 1, body.lastIndexOf(")")); + } else if (body.indexOf("】") >= 0 && body.indexOf("【") >= 0) { + name = body.substring(body.indexOf("【") + 1, body.lastIndexOf("】")); + } else if (body.indexOf("}") >= 0 && body.indexOf("{") >= 0) { + name = body.substring(body.indexOf("{") + 1, body.lastIndexOf("}")); + } else if (body.indexOf("!") >= 0) { + name = body.substring(body.indexOf("!") + 1, body.lastIndexOf("!")); + } else if (body.indexOf("|") >= 0) { + name = body.substring(body.indexOf("|") + 1, body.lastIndexOf("|")); + } + + PageData pageData = pageService.getOne( + new LambdaQueryWrapper() + .eq(PageData::getPageType, PageEnum.SPECIAL.name()) + .eq(PageData::getName, name)); + return ResultUtil.data(pageData); + } } diff --git a/buyer-api/src/main/java/cn/lili/controller/passport/MemberBuyerController.java b/buyer-api/src/main/java/cn/lili/controller/passport/MemberBuyerController.java index 02dfc48a..5a9e86b5 100644 --- a/buyer-api/src/main/java/cn/lili/controller/passport/MemberBuyerController.java +++ b/buyer-api/src/main/java/cn/lili/controller/passport/MemberBuyerController.java @@ -7,6 +7,8 @@ import cn.lili.common.security.enums.UserEnums; import cn.lili.common.vo.ResultMessage; import cn.lili.modules.member.entity.dos.Member; import cn.lili.modules.member.entity.dto.MemberEditDTO; +import cn.lili.modules.member.entity.enums.QRCodeLoginSessionStatusEnum; +import cn.lili.modules.member.entity.vo.QRLoginResultVo; import cn.lili.modules.member.service.MemberService; import cn.lili.modules.sms.SmsUtil; import cn.lili.modules.verification.entity.enums.VerificationEnums; @@ -15,10 +17,18 @@ import io.swagger.annotations.Api; import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiImplicitParams; import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.*; +import org.springframework.web.context.request.async.DeferredResult; import javax.validation.constraints.NotNull; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.Executors; +import java.util.concurrent.TimeUnit; + /** * 买家端,会员接口 @@ -26,6 +36,7 @@ import javax.validation.constraints.NotNull; * @author Chopper * @since 2020/11/16 10:07 下午 */ +@Slf4j @RestController @Api(tags = "买家端,会员接口") @RequestMapping("/buyer/passport/member") @@ -39,6 +50,73 @@ public class MemberBuyerController { private VerificationService verificationService; + @ApiOperation(value = "web-获取登录二维码") + @PostMapping(value = "/pc_session", produces = "application/json;charset=UTF-8") + public ResultMessage createPcSession() { + return ResultUtil.data(memberService.createPcSession()); + } + + + /** + * 长轮询:参考nacos + * + * @param token + * @param beforeSessionStatus 上次记录的session状态 + * @return + */ + @ApiOperation(value = "web-二维码登录") + @PostMapping(value = "/session_login/{token}", produces = "application/json;charset=UTF-8") + public Object loginWithSession(@PathVariable("token") String token, Integer beforeSessionStatus) { + log.info("receive login with session key {}", token); + ResponseEntity> timeoutResponseEntity = + new ResponseEntity<>(ResultUtil.error(ResultCode.ERROR), HttpStatus.OK); + int timeoutSecond = 20; + DeferredResult> deferredResult = new DeferredResult<>(timeoutSecond * 1000L, timeoutResponseEntity); + CompletableFuture.runAsync(() -> { + try { + int i = 0; + while (i < timeoutSecond) { + QRLoginResultVo queryResult = memberService.loginWithSession(token); + int status = queryResult.getStatus(); + if (status == beforeSessionStatus + && (QRCodeLoginSessionStatusEnum.WAIT_SCANNING.getCode() == status + || QRCodeLoginSessionStatusEnum.SCANNING.getCode() == status)) { + //睡眠一秒种,继续等待结果 + TimeUnit.SECONDS.sleep(1); + } else { + deferredResult.setResult(new ResponseEntity<>(ResultUtil.data(queryResult), HttpStatus.OK)); + break; + } + i++; + } + } catch (Exception e) { + log.error("获取登录状态异常,", e); + deferredResult.setResult(new ResponseEntity<>(ResultUtil.error(ResultCode.ERROR), HttpStatus.OK)); + Thread.currentThread().interrupt(); + } + }, Executors.newCachedThreadPool()); + return deferredResult; + } + + @ApiOperation(value = "app扫码") + @PostMapping(value = "/app_scanner", produces = "application/json;charset=UTF-8") + public ResultMessage appScanner(String token) { + return ResultUtil.data(memberService.appScanner(token)); + } + + + @ApiOperation(value = "app扫码-登录确认:同意/拒绝") + @ApiImplicitParams({ + @ApiImplicitParam(name = "token", value = "sessionToken", required = true, paramType = "query"), + @ApiImplicitParam(name = "code", value = "操作:0拒绝登录,1同意登录", required = true, paramType = "query") + }) + @PostMapping(value = "/app_confirm", produces = "application/json;charset=UTF-8") + public ResultMessage appSConfirm(String token, Integer code) { + boolean flag = memberService.appSConfirm(token, code); + return flag ? ResultUtil.success() : ResultUtil.error(ResultCode.ERROR); + } + + @ApiOperation(value = "登录接口") @ApiImplicitParams({ @ApiImplicitParam(name = "username", value = "用户名", required = true, paramType = "query"), diff --git a/buyer-api/src/main/java/cn/lili/security/BuyerAuthenticationFilter.java b/buyer-api/src/main/java/cn/lili/security/BuyerAuthenticationFilter.java old mode 100755 new mode 100644 diff --git a/common-api/src/main/java/cn/lili/controller/common/LogoController.java b/common-api/src/main/java/cn/lili/controller/common/LogoController.java deleted file mode 100644 index bed5a16e..00000000 --- a/common-api/src/main/java/cn/lili/controller/common/LogoController.java +++ /dev/null @@ -1,36 +0,0 @@ -package cn.lili.controller.common; - -import cn.lili.common.enums.ResultUtil; -import cn.lili.common.vo.ResultMessage; -import cn.lili.modules.system.entity.enums.SettingEnum; -import cn.lili.modules.system.service.SettingService; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; - - -/** - * 文件管理管理接口 - * - * @author Chopper - * @since 2020/11/26 15:41 - */ -@RestController -@Api(tags = "文件管理接口") -@RequestMapping("/common/common/logo") -public class LogoController { - - @Autowired - private SettingService settingService; - - @ApiOperation(value = "获取logo") - @GetMapping - public ResultMessage getFileList() { - return ResultUtil.data(settingService.get(SettingEnum.BASE_SETTING.name())); - } - - -} diff --git a/common-api/src/main/java/cn/lili/controller/common/SiteController.java b/common-api/src/main/java/cn/lili/controller/common/SiteController.java index 70b32328..96e90a64 100644 --- a/common-api/src/main/java/cn/lili/controller/common/SiteController.java +++ b/common-api/src/main/java/cn/lili/controller/common/SiteController.java @@ -11,23 +11,25 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; /** - * 滑块验证码接口 + * 站点基础配置获取 * - * @author Chopper - * @since 2020/11/26 15:41 + * @author liushuai(liushuai711 @ gmail.com) + * @version v4.0 + * @Description: + * @since 2022/9/22 17:49 */ @Slf4j @RestController @RequestMapping("/common/common/site") -@Api(tags = "系统基础接口") +@Api(tags = "站点基础接口") public class SiteController { @Autowired private SettingService settingService; - @ApiOperation(value = "获取系统基础信息") + @ApiOperation(value = "获取站点基础信息") @GetMapping - public ResultMessage getFileList() { + public ResultMessage baseSetting() { return ResultUtil.data(settingService.get(SettingEnum.BASE_SETTING.name())); } } diff --git a/common-api/src/main/java/cn/lili/controller/common/SliderImageController.java b/common-api/src/main/java/cn/lili/controller/common/SliderImageController.java index 5eb62d1b..976fb52b 100644 --- a/common-api/src/main/java/cn/lili/controller/common/SliderImageController.java +++ b/common-api/src/main/java/cn/lili/controller/common/SliderImageController.java @@ -1,43 +1,43 @@ -package cn.lili.controller.common; - -import cn.lili.cache.limit.annotation.LimitPoint; -import cn.lili.common.enums.ResultUtil; -import cn.lili.common.vo.ResultMessage; -import cn.lili.modules.verification.entity.enums.VerificationEnums; -import cn.lili.modules.verification.service.VerificationService; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; -import lombok.extern.slf4j.Slf4j; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.*; - -/** - * 滑块验证码接口 - * - * @author Chopper - * @since 2020/11/26 15:41 - */ -@Slf4j -@RestController -@RequestMapping("/common/common/slider") -@Api(tags = "滑块验证码接口") -public class SliderImageController { - - @Autowired - private VerificationService verificationService; - - @LimitPoint(name = "slider_image", key = "verification") - @GetMapping("/{verificationEnums}") - @ApiOperation(value = "获取校验接口,一分钟同一个ip请求10次") - public ResultMessage getSliderImage(@RequestHeader String uuid, @PathVariable VerificationEnums verificationEnums) { - return ResultUtil.data(verificationService.createVerification(verificationEnums, uuid)); - - } - - @LimitPoint(name = "slider_image", key = "verification_pre_check", limit = 600) - @PostMapping("/{verificationEnums}") - @ApiOperation(value = "验证码预校验") - public ResultMessage verificationImage(Integer xPos, @RequestHeader String uuid, @PathVariable VerificationEnums verificationEnums) { - return ResultUtil.data(verificationService.preCheck(xPos, uuid, verificationEnums)); - } -} +package cn.lili.controller.common; + +import cn.lili.cache.limit.annotation.LimitPoint; +import cn.lili.common.enums.ResultUtil; +import cn.lili.common.vo.ResultMessage; +import cn.lili.modules.verification.entity.enums.VerificationEnums; +import cn.lili.modules.verification.service.VerificationService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +/** + * 滑块验证码接口 + * + * @author Chopper + * @since 2020/11/26 15:41 + */ +@Slf4j +@RestController +@RequestMapping("/common/common/slider") +@Api(tags = "滑块验证码接口") +public class SliderImageController { + + @Autowired + private VerificationService verificationService; + + @LimitPoint(name = "slider_image", key = "verification") + @GetMapping("/{verificationEnums}") + @ApiOperation(value = "获取校验接口,一分钟同一个ip请求10次") + public ResultMessage getSliderImage(@RequestHeader String uuid, @PathVariable VerificationEnums verificationEnums) { + return ResultUtil.data(verificationService.createVerification(verificationEnums, uuid)); + + } + + @LimitPoint(name = "slider_image", key = "verification_pre_check", limit = 600) + @PostMapping("/{verificationEnums}") + @ApiOperation(value = "验证码预校验") + public ResultMessage verificationImage(Integer xPos, @RequestHeader String uuid, @PathVariable VerificationEnums verificationEnums) { + return ResultUtil.data(verificationService.preCheck(xPos, uuid, verificationEnums)); + } +} diff --git a/common-api/src/main/java/cn/lili/controller/common/SmsController.java b/common-api/src/main/java/cn/lili/controller/common/SmsController.java index 3914d62c..59d1264f 100644 --- a/common-api/src/main/java/cn/lili/controller/common/SmsController.java +++ b/common-api/src/main/java/cn/lili/controller/common/SmsController.java @@ -1,48 +1,48 @@ -package cn.lili.controller.common; - -import cn.lili.cache.limit.annotation.LimitPoint; -import cn.lili.common.enums.ResultCode; -import cn.lili.common.enums.ResultUtil; -import cn.lili.common.vo.ResultMessage; -import cn.lili.modules.sms.SmsUtil; -import cn.lili.modules.verification.entity.enums.VerificationEnums; -import cn.lili.modules.verification.service.VerificationService; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiImplicitParam; -import io.swagger.annotations.ApiImplicitParams; -import io.swagger.annotations.ApiOperation; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.*; - -/** - * 短信验证码接口 - * - * @author Chopper - * @since 2020/11/26 15:41 - */ -@RestController -@Api(tags = "短信验证码接口") -@RequestMapping("/common/common/sms") -public class SmsController { - - @Autowired - private SmsUtil smsUtil; - @Autowired - private VerificationService verificationService; - - @LimitPoint(name = "sms_send", key = "sms") - @ApiImplicitParams({ - @ApiImplicitParam(paramType = "path", dataType = "String", name = "mobile", value = "手机号"), - @ApiImplicitParam(paramType = "header", dataType = "String", name = "uuid", value = "uuid"), - }) - @GetMapping("/{verificationEnums}/{mobile}") - @ApiOperation(value = "发送短信验证码,一分钟同一个ip请求1次") - public ResultMessage getSmsCode( - @RequestHeader String uuid, - @PathVariable String mobile, - @PathVariable VerificationEnums verificationEnums) { - verificationService.check(uuid, verificationEnums); - smsUtil.sendSmsCode(mobile, verificationEnums, uuid); - return ResultUtil.success(ResultCode.VERIFICATION_SEND_SUCCESS); - } -} +package cn.lili.controller.common; + +import cn.lili.cache.limit.annotation.LimitPoint; +import cn.lili.common.enums.ResultCode; +import cn.lili.common.enums.ResultUtil; +import cn.lili.common.vo.ResultMessage; +import cn.lili.modules.sms.SmsUtil; +import cn.lili.modules.verification.entity.enums.VerificationEnums; +import cn.lili.modules.verification.service.VerificationService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiImplicitParams; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +/** + * 短信验证码接口 + * + * @author Chopper + * @since 2020/11/26 15:41 + */ +@RestController +@Api(tags = "短信验证码接口") +@RequestMapping("/common/common/sms") +public class SmsController { + + @Autowired + private SmsUtil smsUtil; + @Autowired + private VerificationService verificationService; + + @LimitPoint(name = "sms_send", key = "sms") + @ApiImplicitParams({ + @ApiImplicitParam(paramType = "path", dataType = "String", name = "mobile", value = "手机号"), + @ApiImplicitParam(paramType = "header", dataType = "String", name = "uuid", value = "uuid"), + }) + @GetMapping("/{verificationEnums}/{mobile}") + @ApiOperation(value = "发送短信验证码,一分钟同一个ip请求1次") + public ResultMessage getSmsCode( + @RequestHeader String uuid, + @PathVariable String mobile, + @PathVariable VerificationEnums verificationEnums) { + verificationService.check(uuid, verificationEnums); + smsUtil.sendSmsCode(mobile, verificationEnums, uuid); + return ResultUtil.success(ResultCode.VERIFICATION_SEND_SUCCESS); + } +} diff --git a/common-api/src/main/java/cn/lili/controller/common/UploadController.java b/common-api/src/main/java/cn/lili/controller/common/UploadController.java index d97fa40c..767db2fa 100644 --- a/common-api/src/main/java/cn/lili/controller/common/UploadController.java +++ b/common-api/src/main/java/cn/lili/controller/common/UploadController.java @@ -12,7 +12,6 @@ import cn.lili.common.utils.Base64DecodeMultipartFile; import cn.lili.common.utils.CommonUtil; import cn.lili.common.vo.ResultMessage; import cn.lili.modules.file.entity.File; -import cn.lili.modules.file.plugin.FilePlugin; import cn.lili.modules.file.plugin.FilePluginFactory; import cn.lili.modules.file.service.FileService; import cn.lili.modules.system.entity.dos.Setting; @@ -64,11 +63,14 @@ public class UploadController { if (authUser == null) { throw new ServiceException(ResultCode.USER_AUTHORITY_ERROR); } + if (file == null) { + throw new ServiceException(ResultCode.FILE_NOT_EXIST_ERROR); + } Setting setting = settingService.get(SettingEnum.OSS_SETTING.name()); if (setting == null || CharSequenceUtil.isBlank(setting.getSettingValue())) { throw new ServiceException(ResultCode.OSS_NOT_EXIST); } - if (file == null || CharSequenceUtil.isEmpty(file.getContentType())) { + if (CharSequenceUtil.isEmpty(file.getContentType())) { throw new ServiceException(ResultCode.IMAGE_FILE_EXT_ERROR); } diff --git a/common-api/src/main/java/cn/lili/controller/security/CommonSecurityConfig.java b/common-api/src/main/java/cn/lili/controller/security/CommonSecurityConfig.java index 8fa1f8c2..5ad1d4a2 100644 --- a/common-api/src/main/java/cn/lili/controller/security/CommonSecurityConfig.java +++ b/common-api/src/main/java/cn/lili/controller/security/CommonSecurityConfig.java @@ -1,8 +1,5 @@ package cn.lili.controller.security; -import cn.lili.cache.Cache; -import cn.lili.common.security.CustomAccessDeniedHandler; -import cn.lili.common.properties.IgnoredUrlsProperties; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Configuration; @@ -25,19 +22,10 @@ import org.springframework.web.cors.CorsConfigurationSource; public class CommonSecurityConfig extends WebSecurityConfigurerAdapter { - /** - * 忽略验权配置 - */ - @Autowired - private IgnoredUrlsProperties ignoredUrlsProperties; /** * spring security -》 权限不足处理 */ @Autowired - private CustomAccessDeniedHandler accessDeniedHandler; - @Autowired - private Cache cache; - @Autowired private CorsConfigurationSource corsConfigurationSource; @Override diff --git a/common-api/src/main/resources/application.yml b/common-api/src/main/resources/application.yml index f139f9bd..eadf556f 100644 --- a/common-api/src/main/resources/application.yml +++ b/common-api/src/main/resources/application.yml @@ -122,6 +122,7 @@ ignored: - /common/common/slider/** - /common/common/sms/** - /common/common/logo + - /common/common/site - /druid/** - /swagger-ui.html - /doc.html diff --git a/config/application.yml b/config/application.yml index 703b96ae..201f837f 100644 --- a/config/application.yml +++ b/config/application.yml @@ -29,7 +29,7 @@ spring: type: redis # Redis redis: - host: 192.168.0.116 + host: 127.0.0.1 port: 6379 password: lilishop lettuce: @@ -60,7 +60,7 @@ spring: default-datasource: type: com.alibaba.druid.pool.DruidDataSource driverClassName: com.mysql.cj.jdbc.Driver - url: jdbc:mysql://192.168.0.116:3306/lilishop?useUnicode=true&characterEncoding=utf-8&useSSL=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai + url: jdbc:mysql://127.0.0.1:3306/lilishop?useUnicode=true&characterEncoding=utf-8&useSSL=false&rewriteBatchedStatements=true&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai username: root password: lilishop maxActive: 50 @@ -119,6 +119,7 @@ ignored: - /store/passport/login/refresh/** - /common/common/slider/** - /common/common/sms/** + - /common/common/site - /buyer/payment/cashier/** - /buyer/other/pageData/** - /buyer/other/article/** @@ -268,7 +269,7 @@ lili: data: elasticsearch: cluster-name: elasticsearch - cluster-nodes: 192.168.0.116:9200 + cluster-nodes: 127.0.0.1:9200 index: number-of-replicas: 0 number-of-shards: 3 @@ -279,7 +280,7 @@ lili: # password: LiLiShopES logstash: - server: 192.168.0.116:4560 + server: 127.0.0.1:4560 rocketmq: promotion-topic: lili_promotion_topic promotion-group: lili_promotion_group @@ -300,7 +301,7 @@ lili: after-sale-topic: lili_after_sale_topic after-sale-group: lili_after_sale_group rocketmq: - name-server: 192.168.0.116:9876 + name-server: 127.0.0.1:9876 isVIPChannel: false producer: group: lili_group @@ -309,7 +310,7 @@ rocketmq: xxl: job: admin: - addresses: http://192.168.0.116:9001/xxl-job-admin + addresses: http://127.0.0.1:9001/xxl-job-admin executor: appname: xxl-job-executor-lilishop address: diff --git a/consumer/src/main/java/cn/lili/event/impl/MemberCouponExecute.java b/consumer/src/main/java/cn/lili/event/impl/MemberCouponExecute.java new file mode 100644 index 00000000..fc567b35 --- /dev/null +++ b/consumer/src/main/java/cn/lili/event/impl/MemberCouponExecute.java @@ -0,0 +1,65 @@ +package cn.lili.event.impl; + +import cn.hutool.core.collection.ListUtil; +import cn.hutool.core.text.CharSequenceUtil; +import cn.lili.event.AfterSaleStatusChangeEvent; +import cn.lili.event.OrderStatusChangeEvent; +import cn.lili.modules.order.aftersale.entity.dos.AfterSale; +import cn.lili.modules.order.order.entity.dos.Order; +import cn.lili.modules.order.order.entity.dto.OrderMessage; +import cn.lili.modules.order.order.entity.enums.OrderStatusEnum; +import cn.lili.modules.order.order.service.OrderService; +import cn.lili.modules.order.trade.entity.enums.AfterSaleStatusEnum; +import cn.lili.modules.promotion.service.MemberCouponService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +/** + * 会员优惠券执行类 + * + * @author paulG + * @since 2022/8/12 + **/ +@Service +public class MemberCouponExecute implements OrderStatusChangeEvent, AfterSaleStatusChangeEvent { + + /** + * 订单 + */ + @Autowired + private OrderService orderService; + + @Autowired + private MemberCouponService memberCouponService; + + @Override + public void orderChange(OrderMessage orderMessage) { + // 订单取消返还优惠券 + if (orderMessage.getNewStatus() == OrderStatusEnum.CANCELLED) { + this.refundCoupon(orderMessage.getOrderSn()); + } + } + + + @Override + public void afterSaleStatusChange(AfterSale afterSale) { + // 售后完成返还优惠券 + if (afterSale.getServiceStatus().equals(AfterSaleStatusEnum.COMPLETE.name())) { + this.refundCoupon(afterSale.getOrderSn()); + } + } + + /** + * 退款返还优惠券 + * @param orderSn 订单编号 + */ + private void refundCoupon(String orderSn) { + Order order = orderService.getBySn(orderSn); + if (CharSequenceUtil.isNotEmpty(order.getUseStoreMemberCouponIds())) { + memberCouponService.recoveryMemberCoupon(ListUtil.toList(order.getUseStoreMemberCouponIds().split(","))); + } + if (CharSequenceUtil.isNotEmpty(order.getUsePlatformMemberCouponId())) { + memberCouponService.recoveryMemberCoupon(ListUtil.toList(order.getUsePlatformMemberCouponId().split(","))); + } + } +} diff --git a/consumer/src/main/java/cn/lili/event/impl/MemberPointExecute.java b/consumer/src/main/java/cn/lili/event/impl/MemberPointExecute.java index e709ed08..478cf0ac 100644 --- a/consumer/src/main/java/cn/lili/event/impl/MemberPointExecute.java +++ b/consumer/src/main/java/cn/lili/event/impl/MemberPointExecute.java @@ -1,8 +1,8 @@ package cn.lili.event.impl; +import cn.hutool.core.text.CharSequenceUtil; import cn.lili.common.utils.CurrencyUtil; -import cn.lili.common.utils.StringUtils; import cn.lili.event.AfterSaleStatusChangeEvent; import cn.lili.event.GoodsCommentCompleteEvent; import cn.lili.event.MemberRegisterEvent; @@ -104,7 +104,7 @@ public class MemberPointExecute implements MemberRegisterEvent, GoodsCommentComp case COMPLETED: { Order order = orderService.getBySn(orderMessage.getOrderSn()); //如果是积分订单 则直接返回 - if (StringUtils.isNotEmpty(order.getOrderPromotionType()) + if (CharSequenceUtil.isNotEmpty(order.getOrderPromotionType()) && order.getOrderPromotionType().equals(OrderPromotionTypeEnum.POINTS.name())) { return; } diff --git a/consumer/src/main/java/cn/lili/listener/GoodsMessageListener.java b/consumer/src/main/java/cn/lili/listener/GoodsMessageListener.java index 82df940e..1ed1c737 100644 --- a/consumer/src/main/java/cn/lili/listener/GoodsMessageListener.java +++ b/consumer/src/main/java/cn/lili/listener/GoodsMessageListener.java @@ -205,10 +205,16 @@ public class GoodsMessageListener implements RocketMQListener { for (String goodsId : JSONUtil.toList(goodsIdsJsonStr, String.class)) { goodsIndexService.deleteIndex(MapUtil.builder(new HashMap()).put("goodsId", goodsId).build()); } + + promotionService.removeByGoodsIds(goodsIdsJsonStr); } catch (Exception e) { log.error("删除商品索引事件执行异常,商品信息: " + new String(messageExt.getBody()), e); } break; + case DOWN: + String goodsIdsJsonStr = new String(messageExt.getBody()); + promotionService.removeByGoodsIds(goodsIdsJsonStr); + break; //规格删除 case SKU_DELETE: String message = new String(messageExt.getBody()); @@ -253,14 +259,17 @@ public class GoodsMessageListener implements RocketMQListener { try { log.info("更新商品索引促销信息: {}", promotionsJsonStr); JSONObject jsonObject = JSONUtil.parseObj(promotionsJsonStr); + // 转换为详细的促销信息(注:促销信息必须继承自 BasePromotions,且必须保证派生类存在与sdk包下) BasePromotions promotions = (BasePromotions) jsonObject.get("promotions", ClassLoaderUtil.loadClass(jsonObject.get("promotionsType").toString())); + // 获取促销唯一key,由 促销类型 + 促销id 组成 String esPromotionKey = jsonObject.get("esPromotionKey").toString(); if (PromotionsScopeTypeEnum.PORTION_GOODS.name().equals(promotions.getScopeType())) { PromotionGoodsSearchParams searchParams = new PromotionGoodsSearchParams(); searchParams.setPromotionId(promotions.getId()); List promotionGoodsList = this.promotionGoodsService.listFindAll(searchParams); List skuIds = promotionGoodsList.stream().map(PromotionGoods::getSkuId).collect(Collectors.toList()); + // 更新商品索引促销信息(删除原索引中相关的促销信息,更新索引中促销信息) this.goodsIndexService.deleteEsGoodsPromotionByPromotionKey(skuIds, esPromotionKey); this.goodsIndexService.updateEsGoodsIndexByList(promotionGoodsList, promotions, esPromotionKey); } else if (PromotionsScopeTypeEnum.PORTION_GOODS_CATEGORY.name().equals(promotions.getScopeType())) { @@ -268,10 +277,10 @@ public class GoodsMessageListener implements RocketMQListener { searchParams.setCategoryPath(promotions.getScopeId()); List goodsSkuByList = this.goodsSkuService.getGoodsSkuByList(searchParams); List skuIds = goodsSkuByList.stream().map(GoodsSku::getId).collect(Collectors.toList()); + // 更新商品索引促销信息(删除原索引中相关的促销信息,更新索引中促销信息) this.goodsIndexService.deleteEsGoodsPromotionByPromotionKey(skuIds, esPromotionKey); this.goodsIndexService.updateEsGoodsIndexPromotions(skuIds, promotions, esPromotionKey); } else if (PromotionsScopeTypeEnum.ALL.name().equals(promotions.getScopeType())) { - this.goodsIndexService.deleteEsGoodsPromotionByPromotionKey(esPromotionKey); this.goodsIndexService.updateEsGoodsIndexAllByList(promotions, esPromotionKey); } } catch (Exception e) { @@ -285,32 +294,9 @@ public class GoodsMessageListener implements RocketMQListener { * @param goodsList 商品列表消息 */ private void updateGoodsIndex(List goodsList) { - List goodsIndices = new ArrayList<>(); for (Goods goods : goodsList) { - //如果商品通过审核&&并且已上架 - GoodsSearchParams searchParams = new GoodsSearchParams(); - searchParams.setGoodsId(goods.getId()); - searchParams.setGeQuantity(0); - List goodsSkuList = this.goodsSkuService.getGoodsSkuByList(searchParams); - if (goods.getAuthFlag().equals(GoodsAuthEnum.PASS.name()) - && goods.getMarketEnable().equals(GoodsStatusEnum.UPPER.name()) - && Boolean.FALSE.equals(goods.getDeleteFlag())) { - goodsSkuList.forEach(goodsSku -> { - EsGoodsIndex goodsIndex = this.settingUpGoodsIndexData(goods, goodsSku); - goodsIndices.add(goodsIndex); - }); - } - //如果商品状态值不支持es搜索,那么将商品信息做下架处理 - else { - for (GoodsSku goodsSku : goodsSkuList) { - EsGoodsIndex esGoodsOld = goodsIndexService.findById(goodsSku.getId()); - if (esGoodsOld != null) { - goodsIndexService.deleteIndexById(goodsSku.getId()); - } - } - } + this.updateGoodsIndex(goods); } - goodsIndexService.updateBulkIndex(goodsIndices); } @@ -370,11 +356,8 @@ public class GoodsMessageListener implements RocketMQListener { EsGoodsIndex goodsIndex = this.settingUpGoodsIndexData(goods, goodsSku); goodsIndex.setSkuSource(skuSource--); log.info("goodsSku:{}", goodsSku); - //如果商品库存不为0,并且es中有数据 - if (goodsSku.getQuantity() > 0) { - log.info("生成商品索引 {}", goodsIndex); - esGoodsIndices.add(goodsIndex); - } + log.info("生成商品索引 {}", goodsIndex); + esGoodsIndices.add(goodsIndex); } this.goodsIndexService.deleteIndex(MapUtil.builder(new HashMap()).put("goodsId", goods.getId()).build()); this.goodsIndexService.addIndex(esGoodsIndices); diff --git a/consumer/src/main/java/cn/lili/timetask/TimedTaskJobHandler.java b/consumer/src/main/java/cn/lili/timetask/TimedTaskJobHandler.java index 3bf9d017..b8983582 100644 --- a/consumer/src/main/java/cn/lili/timetask/TimedTaskJobHandler.java +++ b/consumer/src/main/java/cn/lili/timetask/TimedTaskJobHandler.java @@ -71,7 +71,7 @@ public class TimedTaskJobHandler { try { everyHourExecutes.get(i).execute(); } catch (Exception e) { - log.error("每分钟任务异常", e); + log.error("每小时任务异常", e); } } return ReturnT.SUCCESS; @@ -94,7 +94,7 @@ public class TimedTaskJobHandler { try { everyDayExecutes.get(i).execute(); } catch (Exception e) { - log.error("每分钟任务异常", e); + log.error("每日任务异常", e); } } return ReturnT.SUCCESS; diff --git a/consumer/src/main/java/cn/lili/timetask/handler/impl/coupon/CouponExecute.java b/consumer/src/main/java/cn/lili/timetask/handler/impl/coupon/CouponExecute.java index 613380d6..acb0503c 100644 --- a/consumer/src/main/java/cn/lili/timetask/handler/impl/coupon/CouponExecute.java +++ b/consumer/src/main/java/cn/lili/timetask/handler/impl/coupon/CouponExecute.java @@ -34,7 +34,7 @@ public class CouponExecute implements EveryDayExecute { */ @Override public void execute() { - //将过期优惠券变更为过期状体 + //将过期优惠券变更为过期状态 LambdaUpdateWrapper updateWrapper = new LambdaUpdateWrapper() .eq(MemberCoupon::getMemberCouponStatus, MemberCouponStatusEnum.NEW.name()) .le(MemberCoupon::getEndTime, new Date()) diff --git a/consumer/src/main/java/cn/lili/timetask/handler/impl/promotion/PromotionEverydayExecute.java b/consumer/src/main/java/cn/lili/timetask/handler/impl/promotion/PromotionEverydayExecute.java index 98cdea1c..2e285823 100644 --- a/consumer/src/main/java/cn/lili/timetask/handler/impl/promotion/PromotionEverydayExecute.java +++ b/consumer/src/main/java/cn/lili/timetask/handler/impl/promotion/PromotionEverydayExecute.java @@ -1,14 +1,15 @@ package cn.lili.timetask.handler.impl.promotion; +import cn.lili.common.enums.PromotionTypeEnum; import cn.lili.modules.promotion.entity.dos.Seckill; import cn.lili.modules.promotion.service.SeckillService; +import cn.lili.modules.promotion.tools.PromotionTools; import cn.lili.modules.search.service.EsGoodsIndexService; import cn.lili.modules.system.entity.dos.Setting; import cn.lili.modules.system.entity.dto.SeckillSetting; import cn.lili.modules.system.entity.enums.SettingEnum; import cn.lili.modules.system.service.SettingService; import cn.lili.timetask.handler.EveryDayExecute; -import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.google.gson.Gson; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; @@ -72,10 +73,9 @@ public class PromotionEverydayExecute implements EveryDayExecute { for (int i = 1; i <= SeckillService.PRE_CREATION; i++) { Seckill seckill = new Seckill(i, seckillSetting.getHours(), seckillSetting.getSeckillRule()); - LambdaQueryWrapper lambdaQueryWrapper = new LambdaQueryWrapper<>(); - lambdaQueryWrapper.eq(Seckill::getStartTime, seckill.getStartTime()); //如果已经存在促销,则不再次保存 - if (seckillService.list(lambdaQueryWrapper).isEmpty()) { + if (seckillService.list( + PromotionTools.checkActiveTime(seckill.getStartTime(), seckill.getEndTime(), PromotionTypeEnum.SECKILL, null, seckill.getId())).isEmpty()) { boolean result = seckillService.savePromotions(seckill); log.info("生成秒杀活动参数:{},结果:{}", seckill, result); } diff --git a/consumer/src/main/resources/application.yml b/consumer/src/main/resources/application.yml index 8304cf32..ae49a9b8 100644 --- a/consumer/src/main/resources/application.yml +++ b/consumer/src/main/resources/application.yml @@ -67,7 +67,7 @@ spring: default-datasource: type: com.alibaba.druid.pool.DruidDataSource driverClassName: com.mysql.cj.jdbc.Driver - url: jdbc:mysql://127.0.0.1:3306/lilishop?useUnicode=true&characterEncoding=utf-8&useSSL=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai + url: jdbc:mysql://127.0.0.1:3306/lilishop?useUnicode=true&characterEncoding=utf-8&useSSL=false&rewriteBatchedStatements=true&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai username: root password: lilishop maxActive: 20 diff --git a/deploy-api.yml b/deploy-api.yml new file mode 100644 index 00000000..baecfc31 --- /dev/null +++ b/deploy-api.yml @@ -0,0 +1,651 @@ +apiVersion: v1 +kind: Namespace +metadata: + name: lilishop-service + +--- +apiVersion: v1 +kind: Service +metadata: + name: buyer-api-service + namespace: lilishop-service + labels: + app.kubernetes.io/name: buyer-api-service + app.kubernetes.io/instance: api + app.kubernetes.io/version: "4.2.4.1" + app.kubernetes.io/component: api + app.kubernetes.io/part-of: lilishop + tier: "api-service" +spec: + type: NodePort + ports: + - name: "8888" + nodePort: 30888 + port: 8888 + targetPort: buyer8888 + selector: + lilishop.service: buyer-api + +--- +apiVersion: v1 +kind: Service +metadata: + name: common-api-service + namespace: lilishop-service + labels: + app.kubernetes.io/name: common-api-service + app.kubernetes.io/instance: api + app.kubernetes.io/version: "4.2.4.1" + app.kubernetes.io/component: api + app.kubernetes.io/part-of: lilishop + tier: "api-service" +spec: + type: NodePort + ports: + - name: "8890" + nodePort: 30890 + port: 8890 + targetPort: common8890 + selector: + lilishop.service: common-api + +--- +apiVersion: v1 +kind: Service +metadata: + name: seller-api-service + namespace: lilishop-service + labels: + app.kubernetes.io/name: seller-api-service + app.kubernetes.io/instance: api + app.kubernetes.io/version: "4.2.4.1" + app.kubernetes.io/component: api + app.kubernetes.io/part-of: lilishop + tier: "api-service" +spec: + type: NodePort + ports: + - name: "8889" + nodePort: 30889 + port: 8889 + targetPort: seller8889 + selector: + lilishop.service: seller-api + +--- +apiVersion: v1 +kind: Service +metadata: + name: manager-api-service + namespace: lilishop-service + labels: + app.kubernetes.io/name: manager-api-service + app.kubernetes.io/instance: api + app.kubernetes.io/version: "4.2.4.1" + app.kubernetes.io/component: api + app.kubernetes.io/part-of: lilishop + tier: "api-service" +spec: + type: NodePort + ports: + - name: "8887" + nodePort: 30887 + port: 8887 + targetPort: manager8887 + selector: + lilishop.service: manager-api + +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: api-config + namespace: lilishop-service + labels: + app.kubernetes.io/name: mysql-db-config + app.kubernetes.io/instance: mysql-single + app.kubernetes.io/version: "8.0.28" + app.kubernetes.io/component: database + app.kubernetes.io/part-of: lilishop +data: + application.yml: | + server: + servlet: + context-path: / + + tomcat: + uri-encoding: UTF-8 + threads: + min-spare: 50 + max: 1000 + + # 与Spring Boot 2一样,默认情况下,大多数端点都不通过http公开,我们公开了所有端点。对于生产,您应该仔细选择要公开的端点。 + management: + # health: + # elasticsearch: + # enabled: false + # datasource: + # enabled: false + endpoints: + web: + exposure: + include: '*' + spring: + # 要在其中注册的Spring Boot Admin Server的URL。 + boot: + admin: + client: + url: http://192.168.0.116:8000 + cache: + type: redis + # Redis + redis: + host: redis-service.lilishop-middleware + port: 6379 + password: lilishop + lettuce: + pool: + # 连接池最大连接数(使用负值表示没有限制) 默认 8 + max-active: 200 + # 连接池最大阻塞等待时间(使用负值表示没有限制) 默认 -1 + max-wait: 20 + # 连接池中的最大空闲连接 默认 8 + max-idle: 10 + # 连接池中的最小空闲连接 默认 8 + min-idle: 8 + # 文件大小上传配置 + servlet: + multipart: + max-file-size: 20MB + max-request-size: 20MB + jackson: + time-zone: GMT+8 + serialization: + #关闭jackson 对json做解析 + fail-on-empty-beans: false + + shardingsphere: + datasource: + # 数据库名称,可自定义,可以为多个,以逗号隔开,每个在这里定义的库,都要在下面定义连接属性 + names: default-datasource + default-datasource: + type: com.alibaba.druid.pool.DruidDataSource + driverClassName: com.mysql.cj.jdbc.Driver + url: jdbc:mysql://mysql.lilishop-middleware:3306/lilishop?useUnicode=true&characterEncoding=utf-8&useSSL=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai + username: root + password: lilishop + maxActive: 50 + initialSize: 20 + maxWait: 60000 + minIdle: 5 + timeBetweenEvictionRunsMillis: 60000 + minEvictableIdleTimeMillis: 300000 + validationQuery: SELECT 1 FROM DUAL + testWhileIdle: true + testOnBorrow: false + testOnReturn: false + #是否缓存preparedStatement,也就是PSCache。在mysql下建议关闭。 PSCache对支持游标的数据库性能提升巨大,比如说oracle。 + poolPreparedStatements: false + #要启用PSCache,-1为关闭 必须配置大于0,当大于0时,poolPreparedStatements自动触发修改为true 可以把这个数值配置大一些,比如说100 + maxOpenPreparedStatements: -1 + #配置监控统计拦截的filters,去掉后监控界面sql无法统计,'wall'用于防火墙 + filters: stat,wall,log4j2 + #通过connectProperties属性来打开mergeSql功能;慢SQL记录 + connectionProperties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000 + #合并多个DruidDataSource的监控数据 + useGlobalDataSourceStat: true + loginUsername: druid + loginPassword: druid + # sharding: + # default-data-source-name: default-datasource + # #需要拆分的表,可以设置多个 在 li_order 级别即可 + # tables: + # #需要进行分表的逻辑表名 + # li_order: + # #实际的表结点,下面代表的是li_order_为开头的所有表,如果能确定表的范围例如按月份分表,这里的写法是data2020.li_order_$->{2020..2021}_$->{01..12} 表示例如 li_order_2020_01 li_order_2020_03 li_order_2021_01 + # actual-data-nodes: data2020.li_order_$->{2019..2021}_$->{01..12} + # table-strategy: + # # 分表策略,根据创建日期 + # standard: + # sharding-column: create_time + # #分表策略 + # precise-algorithm-class-name: cn.lili.mybatis.sharding.CreateTimeShardingTableAlgorithm + # #范围查询实现 + # range-algorithm-class-name: cn.lili.mybatis.sharding.CreateTimeShardingTableAlgorithm + props: + #是否打印逻辑SQL语句和实际SQL语句,建议调试时打印,在生产环境关闭 + sql: + show: true + + # 忽略鉴权url + ignored: + urls: + - /editor-app/** + - /actuator** + - /actuator/** + - /MP_verify_qSyvBPhDsPdxvOhC.txt + - /weixin/** + - /source/** + - /store/passport/login/** + - /store/passport/login/refresh/** + - /common/common/slider/** + - /common/common/sms/** + - /buyer/payment/cashier/** + - /buyer/other/pageData/** + - /buyer/other/article/** + - /buyer/goods/** + - /buyer/store/** + - /buyer/passport/connect/** + - /buyer/members/** + - /buyer/passport/member/** + - /buyer/passport/member/refresh/** + - /buyer/promotion/pintuan/** + - /buyer/promotion/seckill/** + - /buyer/promotion/pointsGoods/** + - /buyer/promotion/coupon + - /buyer/member/evaluation/**/goodsEvaluation + - /buyer/member/evaluation/**/evaluationNumber + - /buyer/other/appVersion/** + - /buyer/broadcast/studio/** + - /manager/passport/user/login + - /manager/passport/user/refresh/** + - /manager/other/elasticsearch + - /manager/other/customWords + - /druid/** + - /swagger-ui.html + - /doc.html + - /swagger-resources/** + - /swagger/** + - /webjars/** + - /v2/api-docs** + - /configuration/ui + - /boot-admin + - /manager/promotion/seckill/init + - /**/*.js + - /**/*.css + - /**/*.png + - /**/*.ico + + # Swagger界面内容配置 + swagger: + title: lilishop API接口文档 + description: lilishop Api Documentation + version: 4.2.2 + termsOfServiceUrl: https://pickmall.cn + contact: + name: lili + url: https://pickmall.cn + email: admin@pickmall.com + + # Mybatis-plus + mybatis-plus: + mapper-locations: classpath*:mapper/*.xml + configuration: + #缓存开启 + cache-enabled: true + #日志 + # log-impl: org.apache.ibatis.logging.stdout.StdOutImpl + + # 日志 + logging: + # 输出级别 + level: + cn.lili: info + # org.hibernate: debug + # org.springframework: debug + file: + # 指定路径 + path: logs + logback: + rollingpolicy: + # 最大保存天数 + max-history: 7 + # 每个文件最大大小 + max-file-size: 5MB + #加密参数 + jasypt: + encryptor: + password: lili + + + lili: + #验证码设置 + verification-code: + #图形验证码有效时间 秒 包含滑块验证码有效时间, 以及验证通过之后,缓存中存储的验证结果有效时间 + effectiveTime: 300 + #水印 + watermark: LILI-SHOP + #干扰项数量 最大2 默认0 + interfereNum: 1 + #允许误差像素 + faultTolerant: 3 + #短信模版配置 + sms: + #登录 + LOGIN: SMS_205755300 + #注册 + REGISTER: SMS_205755298 + #找回密码 + FIND_USER: SMS_205755301 + #设置密码 + UPDATE_PASSWORD: SMS_205755297 + #支付密码 + WALLET_PASSWORD: SMS_205755301 + system: + isDemoSite: false + isTestModel: true + # 脱敏级别: + # 0:不做脱敏处理 + # 1:管理端用户手机号等信息脱敏 + # 2:商家端信息脱敏(为2时,表示管理端,商家端同时脱敏) + sensitiveLevel: 1 + + statistics: + # 在线人数统计 X 小时。这里设置48,即统计过去48小时每小时在线人数 + onlineMember: 48 + # 当前在线人数刷新时间间隔,单位秒,设置为600,则每10分钟刷新一次 + currentOnlineUpdate: 600 + #qq lbs 申请 + lbs: + key: 4BYBZ-7MT6S-PUAOA-6BNWL-FJUD7-UUFXT + sk: zhNKVrJK6UPOhqIjn8AQvG37b9sz6 + #域名 + domain: + pc: http://192.168.0.116:8888 + wap: http://192.168.0.116:8888 + seller: http://192.168.0.116:8888 + admin: http://192.168.0.116:8888 + #api地址 + api: + buyer: http://192.168.0.116:8888 + base: http://192.168.0.116:8888 + manager: http://192.168.0.116:8888 + seller: http://192.168.0.116:8888 + + # jwt 细节设定 + jwt-setting: + # token过期时间(分钟) + tokenExpireTime: 30 + + # 使用Spring @Cacheable注解失效时间 + cache: + # 过期时间 单位秒 永久不过期设为-1 + timeout: 1500 + #多线程配置 + thread: + corePoolSize: 5 + maxPoolSize: 50 + queueCapacity: 50 + data: + elasticsearch: + cluster-name: elasticsearch + cluster-nodes: elasticsearch.lilishop-middleware:9200 + index: + number-of-replicas: 0 + number-of-shards: 3 + index-prefix: lili + schema: http + # account: + # username: elastic + # password: LiLiShopES + + logstash: + server: logstash-service.lilishop-middleware:4560 + rocketmq: + promotion-topic: lili_promotion_topic + promotion-group: lili_promotion_group + msg-ext-topic: lili_msg_topic + msg-ext-group: lili_msg_group + goods-topic: lili_goods_topic + goods-group: lili_goods_group + order-topic: lili_order_topic + order-group: lili_order_group + member-topic: lili_member_topic + member-group: lili_member_group + other-topic: lili_other_topic + other-group: lili_other_group + notice-topic: lili_notice_topic + notice-group: lili_notice_group + notice-send-topic: lili_send_notice_topic + notice-send-group: lili_send_notice_group + after-sale-topic: lili_after_sale_topic + after-sale-group: lili_after_sale_group + rocketmq: + name-server: rocketmq.lilishop-middleware:9876 + isVIPChannel: false + producer: + group: lili_group + send-message-timeout: 30000 + + xxl: + job: + admin: + addresses: http://xxl-job-service.lilishop-middleware:9001/xxl-job-admin + executor: + appname: xxl-job-executor-lilishop + address: + ip: + port: 8891 + logpath: ./xxl-job/executor + logretentiondays: 7 + +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: buyer-api + namespace: lilishop-service + labels: + app.kubernetes.io/name: buyer-api-service + app.kubernetes.io/instance: buyer-api + app.kubernetes.io/version: "4.2.4.1" + app.kubernetes.io/component: api + app.kubernetes.io/part-of: lilishop + tier: "api-service" +spec: + replicas: 1 + selector: + matchLabels: + lilishop.service: buyer-api + template: + metadata: + labels: + lilishop.service: buyer-api + spec: + containers: + - image: 192.168.0.108:31320/buyer-api:4.2.4.1 + name: buyer-api + env: + - name: TZ + value: Asia/Shanghai + - name: JAVA_OPTS + value: -XX:MetaspaceSize=64m -XX:MaxMetaspaceSize=128m -Xms128m -Xmx256m -Xmn128m -Xss256k -XX:SurvivorRatio=8 -XX:+UseConcMarkSweepGC + ports: + - name: buyer8888 + containerPort: 8888 + volumeMounts: + - mountPath: /application.yml + name: application-yml + subPath: application.yml + restartPolicy: Always + volumes: + - configMap: + name: api-config + name: application-yml + + +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: common-api + namespace: lilishop-service + labels: + app.kubernetes.io/name: common-api-service + app.kubernetes.io/instance: common-api + app.kubernetes.io/version: "4.2.4.1" + app.kubernetes.io/component: api + app.kubernetes.io/part-of: lilishop + tier: "api-service" +spec: + replicas: 1 + selector: + matchLabels: + lilishop.service: common-api + template: + metadata: + labels: + lilishop.service: common-api + spec: + containers: + - image: 192.168.0.108:31320/common-api:4.2.4.1 + name: common-api + env: + - name: TZ + value: Asia/Shanghai + - name: JAVA_OPTS + value: -XX:MetaspaceSize=64m -XX:MaxMetaspaceSize=128m -Xms128m -Xmx256m -Xmn128m -Xss256k -XX:SurvivorRatio=8 -XX:+UseConcMarkSweepGC + ports: + - name: common8890 + containerPort: 8890 + volumeMounts: + - mountPath: /application.yml + name: application-yml + subPath: application.yml + restartPolicy: Always + volumes: + - configMap: + name: api-config + name: application-yml + + +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: seller-api + namespace: lilishop-service + labels: + app.kubernetes.io/name: seller-api-service + app.kubernetes.io/instance: seller-api + app.kubernetes.io/version: "4.2.4.1" + app.kubernetes.io/component: api + app.kubernetes.io/part-of: lilishop + tier: "api-service" +spec: + replicas: 1 + selector: + matchLabels: + lilishop.service: seller-api + template: + metadata: + labels: + lilishop.service: seller-api + spec: + containers: + - image: 192.168.0.108:31320/seller-api:4.2.4.1 + name: seller-api + env: + - name: TZ + value: Asia/Shanghai + - name: JAVA_OPTS + value: -XX:MetaspaceSize=64m -XX:MaxMetaspaceSize=128m -Xms128m -Xmx256m -Xmn128m -Xss256k -XX:SurvivorRatio=8 -XX:+UseConcMarkSweepGC + ports: + - name: seller8889 + containerPort: 8889 + volumeMounts: + - mountPath: /application.yml + name: application-yml + subPath: application.yml + restartPolicy: Always + volumes: + - configMap: + name: api-config + name: application-yml + + +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: manager-api + namespace: lilishop-service + labels: + app.kubernetes.io/name: manager-api-service + app.kubernetes.io/instance: manager-api + app.kubernetes.io/version: "4.2.4.1" + app.kubernetes.io/component: api + app.kubernetes.io/part-of: lilishop + tier: "api-service" +spec: + replicas: 1 + selector: + matchLabels: + lilishop.service: manager-api + template: + metadata: + labels: + lilishop.service: manager-api + spec: + containers: + - image: 192.168.0.108:31320/manager-api:4.2.4.1 + name: manager-api + env: + - name: TZ + value: Asia/Shanghai + - name: JAVA_OPTS + value: -XX:MetaspaceSize=64m -XX:MaxMetaspaceSize=128m -Xms128m -Xmx256m -Xmn128m -Xss256k -XX:SurvivorRatio=8 -XX:+UseConcMarkSweepGC + ports: + - name: manager8887 + containerPort: 8887 + volumeMounts: + - mountPath: /application.yml + name: application-yml + subPath: application.yml + restartPolicy: Always + volumes: + - configMap: + name: api-config + name: application-yml + + +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: consumer + namespace: lilishop-service + labels: + app.kubernetes.io/name: consumer-service + app.kubernetes.io/instance: buyer-api + app.kubernetes.io/version: "4.2.4.1" + app.kubernetes.io/component: api + app.kubernetes.io/part-of: lilishop + tier: "api-service" +spec: + replicas: 1 + selector: + matchLabels: + lilishop.service: consumer + template: + metadata: + labels: + lilishop.service: consumer + spec: + containers: + - image: 192.168.0.108:31320/consumer:4.2.4.1 + name: consumer + env: + - name: TZ + value: Asia/Shanghai + - name: JAVA_OPTS + value: -XX:MetaspaceSize=64m -XX:MaxMetaspaceSize=128m -Xms128m -Xmx256m -Xmn128m -Xss256k -XX:SurvivorRatio=8 -XX:+UseConcMarkSweepGC + volumeMounts: + - mountPath: /application.yml + name: application-yml + subPath: application.yml + restartPolicy: Always + volumes: + - configMap: + name: api-config + name: application-yml \ No newline at end of file diff --git a/framework/pom.xml b/framework/pom.xml index 5974c103..da681cb3 100644 --- a/framework/pom.xml +++ b/framework/pom.xml @@ -15,6 +15,15 @@ jar + + com.qiniu + qiniu-java-sdk + + + com.qiniu + qiniu-java-sdk + 7.4.0 + org.springframework.boot spring-boot-properties-migrator diff --git a/framework/src/main/java/cn/lili/cache/Cache.java b/framework/src/main/java/cn/lili/cache/Cache.java index 0beaf69a..41d309dc 100644 --- a/framework/src/main/java/cn/lili/cache/Cache.java +++ b/framework/src/main/java/cn/lili/cache/Cache.java @@ -153,7 +153,15 @@ public interface Cache { * @param pattern 模糊key * @return 缓存中的数据 */ - List keys(String pattern); + List keys(String pattern); + + /** + * 原生阻塞keys 不推荐使用 + * + * @param pattern 模糊key + * @return 缓存中的数据 + */ + List keysBlock(String pattern); //-----------------------------------------------用于特殊场景,redis去重计数--------------------------------------------- @@ -211,11 +219,12 @@ public interface Cache { * @return 计数器结果 */ Long incr(String key, long liveTime); + /** * redis 计数器 累加 * 注:到达liveTime之后,该次增加取消,即自动-1,而不是redis值为空 * - * @param key 为累计的key,同一key每次调用则值 +1 + * @param key 为累计的key,同一key每次调用则值 +1 * @return 计数器结果 */ Long incr(String key); diff --git a/framework/src/main/java/cn/lili/cache/CachePrefix.java b/framework/src/main/java/cn/lili/cache/CachePrefix.java index 52592ba6..bfa31f49 100644 --- a/framework/src/main/java/cn/lili/cache/CachePrefix.java +++ b/framework/src/main/java/cn/lili/cache/CachePrefix.java @@ -473,13 +473,25 @@ public enum CachePrefix { * 店铺分类 */ STORE_CATEGORY, + /** + * 用户菜单 + */ + MENU_USER_ID, /** * 用户菜单 *

* 这个缓存并非永久缓存,而是300秒缓存,也就是说修改用户关联的部门,关联的角色, * 部门关联的角色,角色关联的菜单等等,最多需要5分钟才能生效 */ + STORE_MENU_USER_ID, + /** + * 用户菜单 + */ USER_MENU, + /** + * 用户菜单 + */ + STORE_USER_MENU, /** * 订单暂时缓存 */ @@ -487,7 +499,16 @@ public enum CachePrefix { /** * 敏感词 */ - SENSITIVE; + SENSITIVE, + + /** + * 扫码登录 + * @param str + * @return + */ + QR_CODE_LOGIN_SESSION + + ; public static String removePrefix(String str) { diff --git a/framework/src/main/java/cn/lili/cache/config/redis/FastJsonRedisSerializer.java b/framework/src/main/java/cn/lili/cache/config/redis/FastJsonRedisSerializer.java index d59e29cf..f0071468 100644 --- a/framework/src/main/java/cn/lili/cache/config/redis/FastJsonRedisSerializer.java +++ b/framework/src/main/java/cn/lili/cache/config/redis/FastJsonRedisSerializer.java @@ -6,6 +6,7 @@ import org.springframework.data.redis.serializer.RedisSerializer; import org.springframework.data.redis.serializer.SerializationException; import java.nio.charset.Charset; +import java.nio.charset.StandardCharsets; /** * 要实现对象的缓存,定义自己的序列化和反序列化器。使用阿里的fastjson来实现的比较多 @@ -13,8 +14,8 @@ import java.nio.charset.Charset; * @author Bulbasaur */ public class FastJsonRedisSerializer implements RedisSerializer { - private static final Charset DEFAULT_CHARSET = Charset.forName("UTF-8"); - private Class clazz; + private static final Charset DEFAULT_CHARSET = StandardCharsets.UTF_8; + private final Class clazz; public FastJsonRedisSerializer(Class clazz) { super(); @@ -26,7 +27,10 @@ public class FastJsonRedisSerializer implements RedisSerializer { if (null == t) { return new byte[0]; } - return JSON.toJSONString(t, SerializerFeature.WriteClassName).getBytes(DEFAULT_CHARSET); + return JSON.toJSONString(t, + SerializerFeature.WriteClassName, + SerializerFeature.DisableCircularReferenceDetect) + .getBytes(DEFAULT_CHARSET); } @Override diff --git a/framework/src/main/java/cn/lili/cache/impl/RedisCache.java b/framework/src/main/java/cn/lili/cache/impl/RedisCache.java index bbfb5c54..a5e8aeec 100644 --- a/framework/src/main/java/cn/lili/cache/impl/RedisCache.java +++ b/framework/src/main/java/cn/lili/cache/impl/RedisCache.java @@ -90,14 +90,13 @@ public class RedisCache implements Cache { */ @Override public void vagueDel(Object key) { - Set keys = redisTemplate.keys(key + "*"); + List keys = this.keys(key + "*"); redisTemplate.delete(keys); } @Override public void clear() { - - Set keys = redisTemplate.keys("*"); + List keys = this.keys("*"); redisTemplate.delete(keys); } @@ -133,8 +132,8 @@ public class RedisCache implements Cache { * @return 模糊匹配key */ @Override - public List keys(String pattern) { - List keys = new ArrayList<>(); + public List keys(String pattern) { + List keys = new ArrayList<>(); this.scan(pattern, item -> { //符合条件的key String key = new String(item, StandardCharsets.UTF_8); @@ -143,6 +142,13 @@ public class RedisCache implements Cache { return keys; } + @Override + public List keysBlock(String pattern) { + Set set = redisTemplate.keys(pattern); + List list = new ArrayList<>(); + list.addAll(set); + return list; + } /** * scan 实现 diff --git a/framework/src/main/java/cn/lili/cache/limit/interceptor/LimitInterceptor.java b/framework/src/main/java/cn/lili/cache/limit/interceptor/LimitInterceptor.java index 402f165d..5fbbfe27 100644 --- a/framework/src/main/java/cn/lili/cache/limit/interceptor/LimitInterceptor.java +++ b/framework/src/main/java/cn/lili/cache/limit/interceptor/LimitInterceptor.java @@ -45,24 +45,23 @@ public class LimitInterceptor { @Before("@annotation(limitPointAnnotation)") public void interceptor(LimitPoint limitPointAnnotation) { LimitTypeEnums limitTypeEnums = limitPointAnnotation.limitType(); - String name = limitPointAnnotation.name(); + String key; int limitPeriod = limitPointAnnotation.period(); int limitCount = limitPointAnnotation.limit(); - switch (limitTypeEnums) { - case CUSTOMER: - key = limitPointAnnotation.key(); - break; - default: - key = limitPointAnnotation.key() + IpUtils - .getIpAddress(((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest()); + if (limitTypeEnums == LimitTypeEnums.CUSTOMER) { + key = limitPointAnnotation.key(); + } else { + key = limitPointAnnotation.key() + IpUtils + .getIpAddress(((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest()); } ImmutableList keys = ImmutableList.of(StringUtils.join(limitPointAnnotation.prefix(), key)); try { Number count = redisTemplate.execute(limitScript, keys, limitCount, limitPeriod); + assert count != null; log.info("限制请求{}, 当前请求{},缓存key{}", limitCount, count.intValue(), key); //如果缓存里没有值,或者他的值小于限制频率 - if (count.intValue() >= limitCount) { + if (count.intValue() > limitCount) { throw new ServiceException(ResultCode.LIMIT_ERROR); } } @@ -72,6 +71,7 @@ public class LimitInterceptor { } catch (ServiceException e) { throw e; } catch (Exception e) { + log.error("限流异常", e); throw new ServiceException(ResultCode.ERROR); } } diff --git a/framework/src/main/java/cn/lili/common/aop/annotation/PreventDuplicateSubmissions.java b/framework/src/main/java/cn/lili/common/aop/annotation/PreventDuplicateSubmissions.java index ba884dfe..5ee36a05 100644 --- a/framework/src/main/java/cn/lili/common/aop/annotation/PreventDuplicateSubmissions.java +++ b/framework/src/main/java/cn/lili/common/aop/annotation/PreventDuplicateSubmissions.java @@ -18,7 +18,12 @@ public @interface PreventDuplicateSubmissions { /** - * 过期时间 + * 过期时间 默认3秒,即3秒内无法重复点击。 */ long expire() default 3; + /** + * 用户间隔离,默认false。 + * 如果为true则全局限制,为true需要用户登录状态,否则则是全局隔离 + */ + boolean userIsolation() default false; } diff --git a/framework/src/main/java/cn/lili/common/aop/interceptor/PreventDuplicateSubmissionsInterceptor.java b/framework/src/main/java/cn/lili/common/aop/interceptor/PreventDuplicateSubmissionsInterceptor.java index 8f6decfe..33e2fde7 100644 --- a/framework/src/main/java/cn/lili/common/aop/interceptor/PreventDuplicateSubmissionsInterceptor.java +++ b/framework/src/main/java/cn/lili/common/aop/interceptor/PreventDuplicateSubmissionsInterceptor.java @@ -1,9 +1,19 @@ package cn.lili.common.aop.interceptor; +/** + * 防重复提交业务 + * + * @author Chopper + * @version v1.0 + * 2022-01-25 09:20 + */ + +import cn.hutool.json.JSONUtil; import cn.lili.cache.Cache; import cn.lili.common.aop.annotation.PreventDuplicateSubmissions; import cn.lili.common.enums.ResultCode; import cn.lili.common.exception.ServiceException; +import cn.lili.common.security.AuthUser; import cn.lili.common.security.context.UserContext; import lombok.extern.slf4j.Slf4j; import org.aspectj.lang.annotation.Aspect; @@ -15,13 +25,6 @@ import org.springframework.web.context.request.ServletRequestAttributes; import javax.servlet.http.HttpServletRequest; -/** - * 防重复提交业务 - * - * @author Chopper - * @version v1.0 - * 2022-01-25 09:20 - */ @Aspect @Component @Slf4j @@ -35,9 +38,11 @@ public class PreventDuplicateSubmissionsInterceptor { public void interceptor(PreventDuplicateSubmissions preventDuplicateSubmissions) { try { - Long count = cache.incr(getParams(), preventDuplicateSubmissions.expire()); - //如果超过2或者设置的参数,则表示重复提交了 - if (count.intValue() >= 2) { + String redisKey = getParams(preventDuplicateSubmissions.userIsolation()); + Long count = cache.incr(redisKey, preventDuplicateSubmissions.expire()); + log.debug("防重复提交:params-{},value-{}", redisKey, count); + //如果超过0或者设置的参数,则表示重复提交了 + if (count.intValue() > 0) { throw new ServiceException(ResultCode.LIMIT_ERROR); } } @@ -47,6 +52,7 @@ public class PreventDuplicateSubmissionsInterceptor { } catch (ServiceException e) { throw e; } catch (Exception e) { + log.error("防重复提交拦截器异常", e); throw new ServiceException(ResultCode.ERROR); } } @@ -54,12 +60,33 @@ public class PreventDuplicateSubmissionsInterceptor { /** * 获取表单参数 * - * @return + * @param userIsolation 用户是否隔离 + * @return 计数器key */ - private String getParams() { + private String getParams(Boolean userIsolation) { HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest(); + StringBuilder stringBuilder = new StringBuilder(); + //拼接请求地址 + stringBuilder.append(request.getRequestURI()); + + //参数不为空则拼接参数 + if (!request.getParameterMap().isEmpty()) { + stringBuilder.append(JSONUtil.toJsonStr(request.getParameterMap())); + } + //用户隔离设置为开启,则选择当前用回顾 + if (userIsolation) { + AuthUser authUser = UserContext.getCurrentUser(); + //用户为空则发出警告,但不拼接,否则拼接用户id + if (authUser == null) { + log.warn("user isolation settings are on,but current user is null"); + } +// 不为空则拼接用户id + else { + stringBuilder.append(authUser.getId()); + } + } //请求地址 - return request.getRequestURI() + UserContext.getCurrentUser().getId() + UserContext.getCurrentUser().getUsername(); + return stringBuilder.toString(); } diff --git a/framework/src/main/java/cn/lili/common/enums/ResultCode.java b/framework/src/main/java/cn/lili/common/enums/ResultCode.java index e871846b..6acf99dd 100644 --- a/framework/src/main/java/cn/lili/common/enums/ResultCode.java +++ b/framework/src/main/java/cn/lili/common/enums/ResultCode.java @@ -37,6 +37,7 @@ public enum ResultCode { LIMIT_ERROR(1003, "访问过于频繁,请稍后再试"), ILLEGAL_REQUEST_ERROR(1004, "非法请求,请重新刷新页面操作"), IMAGE_FILE_EXT_ERROR(1005, "不支持图片格式"), + FILE_NOT_EXIST_ERROR(1011, "上传文件不能为空"), FILE_TYPE_NOT_SUPPORT(1010, "不支持上传的文件类型!"), PLATFORM_NOT_SUPPORTED_IM(1006, "平台未开启IM"), STORE_NOT_SUPPORTED_IM(1007, "店铺未开启IM"), @@ -79,6 +80,8 @@ public enum ResultCode { MUST_HAVE_SALES_MODEL(11022, "销售模式为批发时必须要有批发规则!"), HAVE_INVALID_SALES_MODEL(11023, "批发规则存在小于等于0的无效数据!"), + MUST_HAVE_GOODS_SKU_VALUE(11024, "规格值不能为空!"), + DO_NOT_MATCH_WHOLESALE(11025, "批发商品购买数量不能低于起拍量!"), GOODS_PARAMS_ERROR(11013, "商品参数错误,刷新后重试"), PHYSICAL_GOODS_NEED_TEMP(11014, "实物商品需选择配送模板"), @@ -137,7 +140,14 @@ public enum ResultCode { USER_CONNECT_BANDING_ERROR(20023, "当前联合登陆方式,已绑定其他账号,需进行解绑操作"), USER_CONNECT_NOT_EXIST_ERROR(20024, "暂无联合登陆信息,无法实现一键注册功能,请点击第三方登录进行授权"), USER_POINTS_ERROR(20024, "用户积分不足"), - + CLERK_SUPPER(20025, "店主无法操作"), + CLERK_SAVE_ERROR(20026, "店员保存失败"), + CLERK_NOT_FOUND_ERROR(20027, "店员不存在"), + USER_STATUS_ERROR(20028, "用户已禁用"), + CLERK_USER_ERROR(20029, "此账户已经绑定其他店铺"), + CLERK_ALREADY_EXIT_ERROR(20030, "店员已经存在"), + CLERK_DISABLED_ERROR(20031, "店员已禁用"), + CLERK_CURRENT_SUPPER(20032, "无法删除当前登录店员"), /** * 权限 */ @@ -146,6 +156,10 @@ public enum ResultCode { PERMISSION_MENU_ROLE_ERROR(21003, "菜单已绑定角色,请先删除或编辑角色"), PERMISSION_DEPARTMENT_DELETE_ERROR(21004, "部门已经绑定管理员,请先删除或编辑管理员"), PERMISSION_BEYOND_TEN(21005, "最多可以设置10个角色"), + PERMISSION_NOT_FOUND_ERROR(21006, "部门不存在"), + PERMISSION_ROLE_NOT_FOUND_ERROR(21007, "角色不存在"), + PERMISSION_CLERK_BAND_ERROR(21008, "此手机号码已绑定其他店铺 "), + /** * 分销 @@ -278,11 +292,6 @@ public enum ResultCode { COUPON_RECEIVE_ERROR(41005, "当前优惠券已经被领取完了,下次要早点来哦"), COUPON_NUM_INSUFFICIENT_ERROR(41006, "优惠券剩余领取数量不足"), COUPON_NOT_EXIST(41007, "当前优惠券不存在"), - COUPON_DO_NOT_RECEIVER(41030, "当前优惠券不允许主动领取"), - COUPON_ACTIVITY_NOT_EXIST(410022, "当前优惠券活动不存在"), - COUPON_SAVE_ERROR(41020, "保存优惠券失败"), - COUPON_ACTIVITY_SAVE_ERROR(41023, "保存优惠券活动失败"), - COUPON_DELETE_ERROR(41021, "删除优惠券失败"), COUPON_LIMIT_NUM_LESS_THAN_0(41008, "领取限制数量不能为负数"), COUPON_LIMIT_GREATER_THAN_PUBLISH(41009, "领取限制数量超出发行数量"), COUPON_DISCOUNT_ERROR(41010, "优惠券折扣必须小于10且大于0"), @@ -293,6 +302,15 @@ public enum ResultCode { COUPON_MEMBER_NOT_EXIST(41015, "没有当前会员优惠券"), COUPON_MEMBER_STATUS_ERROR(41016, "当前会员优惠券已过期/作废无法变更状态!"), + SPECIAL_CANT_USE(41019, "特殊商品不能使用优惠券,不能使用"), + + COUPON_SAVE_ERROR(41020, "保存优惠券失败"), + COUPON_DELETE_ERROR(41021, "删除优惠券失败"), + COUPON_ACTIVITY_NOT_EXIST(41022, "当前优惠券活动不存在"), + COUPON_ACTIVITY_SAVE_ERROR(41023, "保存优惠券活动失败"), + COUPON_ACTIVITY_MAX_NUM(41024, "优惠券活动赠券数量最多为3"), + + COUPON_DO_NOT_RECEIVER(41030, "当前优惠券不允许主动领取"), /** * 拼团 @@ -385,11 +403,12 @@ public enum ResultCode { STORE_NOT_EXIST(50001, "此店铺不存在"), STORE_NAME_EXIST_ERROR(50002, "店铺名称已存在!"), - STORE_APPLY_DOUBLE_ERROR(50003, "已有店铺,无需重复申请!"), + STORE_APPLY_DOUBLE_ERROR(50003, "已经拥有店铺!"), STORE_NOT_OPEN(50004, "该会员未开通店铺"), STORE_NOT_LOGIN_ERROR(50005, "未登录店铺"), STORE_CLOSE_ERROR(50006, "店铺关闭,请联系管理员"), FREIGHT_TEMPLATE_NOT_EXIST(50010, "当前模版不存在"), + STORE_STATUS_ERROR(50011, "店铺状态异常,无法申请"), /** * 结算单 diff --git a/framework/src/main/java/cn/lili/common/event/TransactionCommitSendMQEvent.java b/framework/src/main/java/cn/lili/common/event/TransactionCommitSendMQEvent.java index 9f16c1e4..7b3d2e73 100644 --- a/framework/src/main/java/cn/lili/common/event/TransactionCommitSendMQEvent.java +++ b/framework/src/main/java/cn/lili/common/event/TransactionCommitSendMQEvent.java @@ -21,9 +21,9 @@ public class TransactionCommitSendMQEvent extends ApplicationEvent { private final String tag; @Getter - private final String message; + private final Object message; - public TransactionCommitSendMQEvent(Object source, String topic, String tag, String message) { + public TransactionCommitSendMQEvent(Object source, String topic, String tag, Object message) { super(source); this.topic = topic; this.tag = tag; diff --git a/framework/src/main/java/cn/lili/common/exception/GlobalControllerExceptionHandler.java b/framework/src/main/java/cn/lili/common/exception/GlobalControllerExceptionHandler.java index bead4682..57d1a852 100644 --- a/framework/src/main/java/cn/lili/common/exception/GlobalControllerExceptionHandler.java +++ b/framework/src/main/java/cn/lili/common/exception/GlobalControllerExceptionHandler.java @@ -18,7 +18,7 @@ import javax.validation.ConstraintViolationException; import java.util.List; /** - * 全局异常异常处理 + * 异常处理 * * @author Chopper */ @@ -74,6 +74,15 @@ public class GlobalControllerExceptionHandler { } return ResultUtil.error(ResultCode.ERROR.code(), errorMsg); } +/* + @ExceptionHandler(ConstraintViolationException.class) + @ResponseStatus(value = HttpStatus.BAD_REQUEST) + public ResultMessage constraintExceptionHandler(HttpServletRequest request, final Exception e, HttpServletResponse response) { + + log.error("全局异常[RuntimeException]:", e); + + return ResultUtil.error(001, e.getMessage()); + }*/ @ExceptionHandler(RuntimeException.class) @ResponseStatus(value = HttpStatus.BAD_REQUEST) diff --git a/framework/src/main/java/cn/lili/common/properties/SmsTemplateProperties.java b/framework/src/main/java/cn/lili/common/properties/SmsTemplateProperties.java index 55dbf7ae..36cec12c 100644 --- a/framework/src/main/java/cn/lili/common/properties/SmsTemplateProperties.java +++ b/framework/src/main/java/cn/lili/common/properties/SmsTemplateProperties.java @@ -16,21 +16,21 @@ public class SmsTemplateProperties { /** * 登录 */ - private String lOGIN = "SMS_205755300"; + private String lOGIN = "SMS_185821482"; /** * 注册 */ - private String REGISTER = "SMS_205755298"; + private String REGISTER = "SMS_185821482"; /** * 找回密码 */ - private String FIND_USER = "SMS_205755301"; + private String FIND_USER = "SMS_185821482"; /** * 设置密码 */ - private String UPDATE_PASSWORD = "SMS_205755297"; + private String UPDATE_PASSWORD = "SMS_185821482"; /** * 设置支付密码 */ - private String WALLET_PASSWORD = "SMS_205755297"; + private String WALLET_PASSWORD = "SMS_185821482"; } diff --git a/framework/src/main/java/cn/lili/common/properties/VerificationCodeProperties.java b/framework/src/main/java/cn/lili/common/properties/VerificationCodeProperties.java index c61b1545..bc98712c 100644 --- a/framework/src/main/java/cn/lili/common/properties/VerificationCodeProperties.java +++ b/framework/src/main/java/cn/lili/common/properties/VerificationCodeProperties.java @@ -24,8 +24,7 @@ public class VerificationCodeProperties { /** * 水印 */ - private String watermark = "LILI-SHOP"; - + private String watermark = ""; /** * 干扰数量 最大数量 */ diff --git a/framework/src/main/java/cn/lili/common/security/AuthUser.java b/framework/src/main/java/cn/lili/common/security/AuthUser.java index eb170192..f49f2051 100644 --- a/framework/src/main/java/cn/lili/common/security/AuthUser.java +++ b/framework/src/main/java/cn/lili/common/security/AuthUser.java @@ -51,6 +51,11 @@ public class AuthUser implements Serializable { * storeId */ private String storeId; + /** + * 如果角色是商家,则存在此店铺id字段 + * clerkId + */ + private String clerkId; /** * 如果角色是商家,则存在此店铺名称字段 @@ -79,4 +84,14 @@ public class AuthUser implements Serializable { this.isSuper = isSuper; this.nickName = nickName; } + + public AuthUser(String username, String id, UserEnums manager, String nickName, Boolean isSuper, String clerkId,String face) { + this.username = username; + this.id = id; + this.role = manager; + this.isSuper = isSuper; + this.nickName = nickName; + this.clerkId = clerkId; + this.face = face; + } } diff --git a/framework/src/main/java/cn/lili/common/security/context/UserContext.java b/framework/src/main/java/cn/lili/common/security/context/UserContext.java index 311c6bcb..78d3e5a6 100644 --- a/framework/src/main/java/cn/lili/common/security/context/UserContext.java +++ b/framework/src/main/java/cn/lili/common/security/context/UserContext.java @@ -1,6 +1,7 @@ package cn.lili.common.security.context; import cn.lili.cache.Cache; +import cn.lili.cache.CachePrefix; import cn.lili.common.enums.ResultCode; import cn.lili.common.exception.ServiceException; import cn.lili.common.security.AuthUser; @@ -60,10 +61,13 @@ public class UserContext { */ public static AuthUser getAuthUser(Cache cache, String accessToken) { try { - if (cache.keys("*" + accessToken).isEmpty()) { + AuthUser authUser = getAuthUser(accessToken); + assert authUser != null; + + if (!cache.hasKey(CachePrefix.ACCESS_TOKEN.getPrefix(authUser.getRole()) + accessToken)) { throw new ServiceException(ResultCode.USER_AUTHORITY_ERROR); } - return getAuthUser(accessToken); + return authUser; } catch (Exception e) { return null; } diff --git a/framework/src/main/java/cn/lili/common/security/filter/XssHttpServletRequestWrapper.java b/framework/src/main/java/cn/lili/common/security/filter/XssHttpServletRequestWrapper.java index 74dff93a..30e76d5e 100644 --- a/framework/src/main/java/cn/lili/common/security/filter/XssHttpServletRequestWrapper.java +++ b/framework/src/main/java/cn/lili/common/security/filter/XssHttpServletRequestWrapper.java @@ -181,7 +181,7 @@ public class XssHttpServletRequestWrapper extends HttpServletRequestWrapper { //将resultMap转换为json字符串 String resultStr = JSONUtil.toJsonStr(resultMap); //将json字符串转换为字节 - final ByteArrayInputStream resultBIS = new ByteArrayInputStream(resultStr.getBytes()); + final ByteArrayInputStream resultBIS = new ByteArrayInputStream(resultStr.getBytes(StandardCharsets.UTF_8)); //实现接口 return new ServletInputStream() { diff --git a/framework/src/main/java/cn/lili/common/security/token/SecretKeyUtil.java b/framework/src/main/java/cn/lili/common/security/token/SecretKeyUtil.java index ebec6b38..e111526c 100644 --- a/framework/src/main/java/cn/lili/common/security/token/SecretKeyUtil.java +++ b/framework/src/main/java/cn/lili/common/security/token/SecretKeyUtil.java @@ -17,7 +17,7 @@ public class SecretKeyUtil { public static SecretKey generalKey() { //自定义 byte[] encodedKey = Base64.decodeBase64("cuAihCz53DZRjZwbsGcZJ2Ai6At+T142uphtJMsk7iQ="); - javax.crypto.SecretKey key = Keys.hmacShaKeyFor(encodedKey); + SecretKey key = Keys.hmacShaKeyFor(encodedKey); return key; } diff --git a/framework/src/main/java/cn/lili/common/security/token/TokenUtil.java b/framework/src/main/java/cn/lili/common/security/token/TokenUtil.java index 47bd0585..0f92dc6e 100644 --- a/framework/src/main/java/cn/lili/common/security/token/TokenUtil.java +++ b/framework/src/main/java/cn/lili/common/security/token/TokenUtil.java @@ -34,9 +34,9 @@ public class TokenUtil { /** * 构建token * - * @param username 主体 - * @param claim 私有声明 - * @param longTerm 长时间特殊token 如:移动端,微信小程序等 + * @param username 主体 + * @param claim 私有声明 + * @param longTerm 长时间特殊token 如:移动端,微信小程序等 * @param userEnums 用户枚举 * @return TOKEN */ @@ -62,7 +62,7 @@ public class TokenUtil { * 刷新token * * @param oldRefreshToken 刷新token - * @param userEnums 用户枚举 + * @param userEnums 用户枚举 * @return token */ public Token refreshToken(String oldRefreshToken, UserEnums userEnums) { diff --git a/framework/src/main/java/cn/lili/common/utils/IpUtils.java b/framework/src/main/java/cn/lili/common/utils/IpUtils.java index 2a31a4ba..5672e934 100644 --- a/framework/src/main/java/cn/lili/common/utils/IpUtils.java +++ b/framework/src/main/java/cn/lili/common/utils/IpUtils.java @@ -55,7 +55,7 @@ public class IpUtils { } } if ("0:0:0:0:0:0:0:1".equals(ip)) { - ip = "127.0.0.1"; + ip = "106.124.130.167"; } return ip; } diff --git a/framework/src/main/java/cn/lili/common/utils/RegularUtil.java b/framework/src/main/java/cn/lili/common/utils/RegularUtil.java index 3837cf24..3bbf9dba 100644 --- a/framework/src/main/java/cn/lili/common/utils/RegularUtil.java +++ b/framework/src/main/java/cn/lili/common/utils/RegularUtil.java @@ -5,6 +5,7 @@ import java.util.regex.Pattern; /** * 用户名验证工具类 + * * @author Chopper */ public class RegularUtil { @@ -20,21 +21,88 @@ public class RegularUtil { */ private static final Pattern EMAIL = Pattern.compile("^[a-zA-Z0-9_.-]+@[a-zA-Z0-9-]+(\\.[a-zA-Z0-9-]+)*\\.[a-zA-Z0-9]{2,6}$"); - public static boolean mobile(String v){ + //sql正则 + + static Pattern sqlPattern = Pattern.compile("(select|update|and|delete|insert|trancate|char|substr|ascii|declare|exec|count|master|into|drop|execute" + +// 可能涉及英文查询参数问题 +// "|in|not in exists|not exists" + +// "|between|not between" + +// "|like|not like" + +// "|is null|is not null" + + ")", Pattern.CASE_INSENSITIVE); + + //符号正则 + static Pattern symbolPattern = Pattern.compile("[\\s~·`!!@#¥$%^……&*(())\\-——\\-_=+【\\[\\]】{{}}\\|、\\\\;;::‘'“”\",,《<。.》>、/??]"); + + + /** + * 校验手机号 + * + * @param v + * @return + */ + public static boolean mobile(String v) { Matcher m = MOBILE.matcher(v); - if(m.matches()){ + if (m.matches()) { return true; } return false; } - public static boolean email(String v){ + //校验邮箱 + public static boolean email(String v) { Matcher m = EMAIL.matcher(v); - if(m.matches()){ + if (m.matches()) { return true; } return false; } + + + /** + * 搜索参数过滤 + * + * @param str 字符串 + * @return 过滤后的字符串 + */ + public static String replace(String str) { + + return symbolReplace(sqlReplace(str)); + } + + /** + * 过滤sql关键字 + * + * @param str 字符串 + * @return 过滤后的字符串 + */ + public static String sqlReplace(String str) { + if (StringUtils.isEmpty(str)) { + return ""; + } + Matcher sqlMatcher = sqlPattern.matcher(str); + return sqlMatcher.replaceAll(""); + } + + /** + * 符号过滤 + * + * @param str 字符串 + * @return 过滤后的字符串 + */ + public static String symbolReplace(String str) { + if (StringUtils.isEmpty(str)) { + return ""; + } + Matcher symbolMatcher = symbolPattern.matcher(str); + return symbolMatcher.replaceAll(""); + } + + public static void main(String[] args) { + System.out.println(replace("selectSELECTINORNOTIN123阿松大asdfa!@#$%^&&*()_+{}[]!?>?").trim()); + } + + } diff --git a/framework/src/main/java/cn/lili/elasticsearch/BaseElasticsearchService.java b/framework/src/main/java/cn/lili/elasticsearch/BaseElasticsearchService.java index fec64277..9929ff20 100644 --- a/framework/src/main/java/cn/lili/elasticsearch/BaseElasticsearchService.java +++ b/framework/src/main/java/cn/lili/elasticsearch/BaseElasticsearchService.java @@ -98,7 +98,7 @@ public abstract class BaseElasticsearchService { log.info(" whether all of the nodes have acknowledged the request : {}", createIndexResponse.isAcknowledged()); log.info(" Indicates whether the requisite number of shard copies were started for each shard in the index before timing out :{}", createIndexResponse.isShardsAcknowledged()); } catch (Exception e) { - log.error("创建索引错误",e); + log.error("创建索引错误", e); throw new ElasticsearchException("创建索引 {" + index + "} 失败:" + e.getMessage()); } } @@ -339,8 +339,7 @@ public abstract class BaseElasticsearchService { " }\n" + " }\n"; - PutMappingRequest request = new PutMappingRequest(index) - .source(source, XContentType.JSON); + PutMappingRequest request = new PutMappingRequest(index).source(source, XContentType.JSON); CountDownLatch latch = new CountDownLatch(1); client.indices().putMappingAsync( request, @@ -445,7 +444,7 @@ public abstract class BaseElasticsearchService { try { searchResponse = client.search(searchRequest, COMMON_OPTIONS); } catch (IOException e) { - log.error("es 搜索错误",e); + log.error("es 搜索错误", e); } return searchResponse; } diff --git a/framework/src/main/java/cn/lili/modules/connect/config/AuthConfig.java b/framework/src/main/java/cn/lili/modules/connect/config/AuthConfig.java index b75b1e5a..4378893c 100644 --- a/framework/src/main/java/cn/lili/modules/connect/config/AuthConfig.java +++ b/framework/src/main/java/cn/lili/modules/connect/config/AuthConfig.java @@ -77,7 +77,11 @@ public class AuthConfig { /** * 针对国外服务可以单独设置代理 * HttpConfig config = new HttpConfig(); +<<<<<<< HEAD + * config.setProxy(new Proxy(Proxy.Type.HTTP, new InetSocketAddress("106.124.130.167", 10080))); +======= * config.setProxy(new Proxy(Proxy.Type.HTTP, new InetSocketAddress("127.0.0.1", 10080))); +>>>>>>> ae0c4aea12996d3d72eca7c6ccdc97922373e4d7 * config.setTimeout(15000); * * @since 1.15.5 diff --git a/framework/src/main/java/cn/lili/modules/connect/serviceimpl/ConnectServiceImpl.java b/framework/src/main/java/cn/lili/modules/connect/serviceimpl/ConnectServiceImpl.java index e910a6c7..942bf897 100644 --- a/framework/src/main/java/cn/lili/modules/connect/serviceimpl/ConnectServiceImpl.java +++ b/framework/src/main/java/cn/lili/modules/connect/serviceimpl/ConnectServiceImpl.java @@ -8,7 +8,9 @@ import cn.lili.cache.CachePrefix; import cn.lili.common.context.ThreadContextHolder; import cn.lili.common.enums.ClientTypeEnum; import cn.lili.common.enums.ResultCode; +import cn.lili.common.event.TransactionCommitSendMQEvent; import cn.lili.common.exception.ServiceException; +import cn.lili.common.properties.RocketmqCustomProperties; import cn.lili.common.security.AuthUser; import cn.lili.common.security.context.UserContext; import cn.lili.common.security.token.Token; @@ -29,11 +31,13 @@ import cn.lili.modules.system.entity.dto.connect.WechatConnectSetting; import cn.lili.modules.system.entity.dto.connect.dto.WechatConnectSettingItem; import cn.lili.modules.system.entity.enums.SettingEnum; import cn.lili.modules.system.service.SettingService; +import cn.lili.rocketmq.tags.MemberTagsEnum; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import lombok.extern.slf4j.Slf4j; import org.bouncycastle.jce.provider.BouncyCastleProvider; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.ApplicationEventPublisher; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -66,6 +70,14 @@ public class ConnectServiceImpl extends ServiceImpl impl private MemberTokenGenerate memberTokenGenerate; @Autowired private Cache cache; + /** + * RocketMQ 配置 + */ + @Autowired + private RocketmqCustomProperties rocketmqCustomProperties; + + @Autowired + private ApplicationEventPublisher applicationEventPublisher; @Override @Transactional(rollbackFor = Exception.class) @@ -235,6 +247,8 @@ public class ConnectServiceImpl extends ServiceImpl impl memberService.save(newMember); newMember = memberService.findByUsername(newMember.getUsername()); bindMpMember(openId, unionId, newMember); + // 发送会员注册信息 + applicationEventPublisher.publishEvent(new TransactionCommitSendMQEvent("new member register", rocketmqCustomProperties.getMemberTopic(), MemberTagsEnum.MEMBER_REGISTER.name(), newMember)); return memberTokenGenerate.createToken(newMember, true); } @@ -262,9 +276,9 @@ public class ConnectServiceImpl extends ServiceImpl impl * 这样,微信小程序注册之后,其他app 公众号页面,都可以实现绑定自动登录功能 *

* - * @param openId 微信openid - * @param unionId 微信unionid - * @param member 会员 + * @param openId 微信openid + * @param unionId 微信unionid + * @param member 会员 */ private void bindMpMember(String openId, String unionId, Member member) { diff --git a/framework/src/main/java/cn/lili/modules/connect/util/AuthChecker.java b/framework/src/main/java/cn/lili/modules/connect/util/AuthChecker.java index fb23837f..23337be6 100644 --- a/framework/src/main/java/cn/lili/modules/connect/util/AuthChecker.java +++ b/framework/src/main/java/cn/lili/modules/connect/util/AuthChecker.java @@ -47,9 +47,9 @@ public class AuthChecker { if (!GlobalAuthUtils.isHttpProtocol(redirectUri) && !GlobalAuthUtils.isHttpsProtocol(redirectUri)) { throw new AuthException(AuthResponseStatus.ILLEGAL_REDIRECT_URI, connectAuth); } - //支付宝在创建回调地址时,不允许使用localhost或者127.0.0.1 + //支付宝在创建回调地址时,不允许使用localhost或者106.124.130.167 if (ConnectAuthEnum.ALIPAY == connectAuth && GlobalAuthUtils.isLocalHost(redirectUri)) { - //The redirect uri of alipay is forbidden to use localhost or 127.0.0.1 + //The redirect uri of alipay is forbidden to use localhost or 106.124.130.167 throw new AuthException(AuthResponseStatus.ILLEGAL_REDIRECT_URI, connectAuth); } } diff --git a/framework/src/main/java/cn/lili/modules/connect/util/GlobalAuthUtils.java b/framework/src/main/java/cn/lili/modules/connect/util/GlobalAuthUtils.java index 2b1868b9..2acb5c35 100644 --- a/framework/src/main/java/cn/lili/modules/connect/util/GlobalAuthUtils.java +++ b/framework/src/main/java/cn/lili/modules/connect/util/GlobalAuthUtils.java @@ -171,7 +171,7 @@ public class GlobalAuthUtils { * @return true: 本地主机(域名), false: 非本地主机(域名) */ public static boolean isLocalHost(String url) { - return StringUtils.isEmpty(url) || url.contains("127.0.0.1") || url.contains("localhost"); + return StringUtils.isEmpty(url) || url.contains("106.124.130.167") || url.contains("localhost"); } diff --git a/framework/src/main/java/cn/lili/modules/distribution/entity/dos/DistributionOrder.java b/framework/src/main/java/cn/lili/modules/distribution/entity/dos/DistributionOrder.java index 491a8faf..fc760ac4 100644 --- a/framework/src/main/java/cn/lili/modules/distribution/entity/dos/DistributionOrder.java +++ b/framework/src/main/java/cn/lili/modules/distribution/entity/dos/DistributionOrder.java @@ -50,6 +50,9 @@ public class DistributionOrder extends BaseIdEntity { private String distributionId; @ApiModelProperty(value = "分销员名称") private String distributionName; + + @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") @ApiModelProperty(value = "解冻日期") private Date settleCycle; @ApiModelProperty(value = "提成金额") diff --git a/framework/src/main/java/cn/lili/modules/distribution/mapper/DistributionOrderMapper.java b/framework/src/main/java/cn/lili/modules/distribution/mapper/DistributionOrderMapper.java index c3a64d70..79b9b9bd 100644 --- a/framework/src/main/java/cn/lili/modules/distribution/mapper/DistributionOrderMapper.java +++ b/framework/src/main/java/cn/lili/modules/distribution/mapper/DistributionOrderMapper.java @@ -20,8 +20,8 @@ public interface DistributionOrderMapper extends BaseMapper { * @param settleCycle 时间 */ @Update("UPDATE li_distribution AS d " + - "SET d.can_rebate =(d.can_rebate +(SELECT SUM( dorder.rebate ) FROM li_distribution_order AS dorder WHERE dorder.distribution_order_status = #{distributionOrderStatus} AND dorder.settle_cycle< #{settleCycle} AND dorder.distribution_id = d.id ))" + - ",d.commission_frozen =(d.commission_frozen -(SELECT SUM( dorder.rebate ) FROM li_distribution_order AS dorder WHERE dorder.distribution_order_status = #{distributionOrderStatus} AND dorder.settle_cycle< #{settleCycle} AND dorder.distribution_id = d.id ) )") + "SET d.can_rebate =(ifnull(d.can_rebate,0) +(SELECT SUM( dorder.rebate ) FROM li_distribution_order AS dorder WHERE dorder.distribution_order_status = #{distributionOrderStatus} AND dorder.settle_cycle< #{settleCycle} AND dorder.distribution_id = d.id ))" + + ",d.commission_frozen =(ifnull(d.commission_frozen,0) -(SELECT SUM( dorder.rebate ) FROM li_distribution_order AS dorder WHERE dorder.distribution_order_status = #{distributionOrderStatus} AND dorder.settle_cycle< #{settleCycle} AND dorder.distribution_id = d.id ) )") void rebate(String distributionOrderStatus, DateTime settleCycle); -} \ No newline at end of file +} diff --git a/framework/src/main/java/cn/lili/modules/distribution/serviceimpl/DistributionCashServiceImpl.java b/framework/src/main/java/cn/lili/modules/distribution/serviceimpl/DistributionCashServiceImpl.java index 805fc9db..8f3e18cc 100644 --- a/framework/src/main/java/cn/lili/modules/distribution/serviceimpl/DistributionCashServiceImpl.java +++ b/framework/src/main/java/cn/lili/modules/distribution/serviceimpl/DistributionCashServiceImpl.java @@ -73,6 +73,7 @@ public class DistributionCashServiceImpl extends ServiceImpl