Merge branch 'master' of gitee.com:beijing_hongye_huicheng/lilishop into feature/pg

This commit is contained in:
paulGao 2022-10-24 14:38:08 +08:00
commit 47734cfca6
159 changed files with 198535 additions and 1002 deletions

View File

@ -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

189783
DB/lilishop.sql Normal file

File diff suppressed because one or more lines are too long

2
DB/update.sql Normal file
View File

@ -0,0 +1,2 @@
/** 店铺--默认页面是否开启**/
ALTER TABLE li_store ADD page_show bit(1) DEFAULT NULL COMMENT '默认页面是否开启';

View File

@ -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);
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);

521
DB/version4.2.4to4.2.5.sql Normal file
View File

@ -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', 'lili-floor-renovation/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', 'lili-floor-renovation/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

677
LICENSE
View File

@ -1,3 +1,4 @@
<<<<<<< HEAD
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
@ -672,3 +673,679 @@ 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
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
=======
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
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.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
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 <http://www.gnu.org/licenses/>.
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:
<program> Copyright (C) <year> <name of author>
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
<http://www.gnu.org/licenses/>.
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
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
>>>>>>> ae0c4aea12996d3d72eca7c6ccdc97922373e4d7

View File

@ -32,10 +32,10 @@
<artifactId>logstash-logback-encoder</artifactId>
<version>${logstash-logback-encoder}</version>
</dependency>
<!-- <dependency>-->
<!-- <groupId>org.springframework.boot</groupId>-->
<!-- <artifactId>spring-boot-starter-mail</artifactId>-->
<!-- </dependency> -->
<!-- <dependency>-->
<!-- <groupId>org.springframework.boot</groupId>-->
<!-- <artifactId>spring-boot-starter-mail</artifactId>-->
<!-- </dependency> -->
</dependencies>
<build>

View File

@ -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

View File

@ -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,53 @@ public class PageBuyerController {
public ResultMessage<PageDataVO> 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<PageDataVO> get(PageDataDTO pageDataDTO) {
return ResultUtil.data(pageService.getPageData(pageDataDTO));
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<PageData> getPage(@PathVariable("id") String id) {
return ResultUtil.data(pageService.getSpecial(id));
}
@ApiOperation(value = "获取专题页面数据(根据消息内容得知)")
@GetMapping("/getSpecial")
public ResultMessage<PageData> 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<PageData>()
.eq(PageData::getPageType, PageEnum.SPECIAL.name())
.eq(PageData::getName, name));
return ResultUtil.data(pageData);
}
}

View File

@ -15,6 +15,15 @@
<packaging>jar</packaging>
<dependencies>
<dependency>
<groupId>com.qiniu</groupId>
<artifactId>qiniu-java-sdk</artifactId>
</dependency>
<dependency>
<groupId>com.qiniu</groupId>
<artifactId>qiniu-java-sdk</artifactId>
<version>7.4.0</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-properties-migrator</artifactId>

View File

@ -473,13 +473,25 @@ public enum CachePrefix {
* 店铺分类
*/
STORE_CATEGORY,
/**
* 用户菜单
*/
MENU_USER_ID,
/**
* 用户菜单
* <p>
* 这个缓存并非永久缓存而是300秒缓存也就是说修改用户关联的部门关联的角色
* 部门关联的角色角色关联的菜单等等最多需要5分钟才能生效
*/
STORE_MENU_USER_ID,
/**
* 用户菜单
*/
USER_MENU,
/**
* 用户菜单
*/
STORE_USER_MENU,
/**
* 订单暂时缓存
*/

View File

@ -138,7 +138,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, "无法删除当前登录店员"),
/**
* 权限
*/
@ -147,6 +154,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, "此手机号码已绑定其他店铺 "),
/**
* 分销
@ -390,7 +401,7 @@ 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, "店铺关闭,请联系管理员"),

View File

@ -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<Object> 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)

View File

@ -0,0 +1,30 @@
package cn.lili.common.fulu.core;
/**
* @Auther: chenYing
* @Date: 2019/8/26 0026 15:08
*/
public interface MethodConst {
//卡密下单接口method方法
String OPEN_API_CARD_ORDER_ADD = "fulu.order.card.add";
// 根据话费查询归属地和城市编码面值城市等信息
String OPEN_API_CHECK_PHONE = "fulu.mobile.info.get";
// 直充下单接口method方法
String OPEN_API_DIRECT_ORDER_ADD = "fulu.order.direct.add";
// 获取商品信息接口method方法
String OPEN_API_GOODS_GET = "fulu.goods.info.get";
// 获取商品模板信息接口method方法
String OPEN_API_GOODS_TEMPLATE_GET = "fulu.goods.template.get";
// 查单接口method方法
String OPEN_API_ORDER_GET = "fulu.order.info.get";
// 话费下单接口method方法
String OPEN_API_PHONE_ORDER_ADD = "fulu.order.mobile.add";
// 流量下单接口method方法
String OPEN_API_TRAFFIC_ORDER_ADD = "fulu.order.data.add";
// 获取用户信息接口method方法
String OPEN_API_USER_INFO_GET = "fulu.user.info.get";
//获取商品列表method方法
String OPEN_API_GOODS_LIST = "fulu.goods.list.get";
}

View File

@ -0,0 +1,58 @@
package cn.lili.common.fulu.core.http;
import cn.lili.common.fulu.core.utils.HttpUtil;
import java.util.concurrent.Callable;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.Future;
/**
* @Auther: chenYing
* @Date: 2019/8/19 0019 16:16
*/
public class FuluClient implements IFuluClient {
private static volatile ExecutorService executor;
private String url;
public FuluClient() {
this.url = "http://openapi.fulu.com/api/getway";
}
public FuluClient(String url) {
this.url = url;
}
/**
* 创建线程池
*/
private static void createThreadPool() {
if (executor == null) {
synchronized (FuluClient.class) {
if (executor == null) {
executor = Executors.newCachedThreadPool();
}
}
}
}
@Override
public String send(final String postData) {
String result = HttpUtil.sendPostJson(this.url, postData);
return result;
}
@Override
public Future<String> sendAsync(final String postData) {
createThreadPool();
return executor.submit(new Callable<String>() {
@Override
public String call() throws Exception {
String result = HttpUtil.sendPostJson(url, postData);
return result;
}
});
}
}

View File

@ -0,0 +1,27 @@
package cn.lili.common.fulu.core.http;
import java.util.concurrent.Future;
/**
* @Auther: chenYing
* @Date: 2019/8/19 0019 16:15
*/
public interface IFuluClient {
/**
* 同步请求openapi2.0
*
* @param postData
* @return String
*/
String send(final String postData);
/**
* 异步请求openapi2.0
*
* @param postData
* @return Future<String>
*/
Future<String> sendAsync(final String postData);
}

View File

@ -0,0 +1,47 @@
package cn.lili.common.fulu.core.utils;
import javax.crypto.Cipher;
import javax.crypto.spec.SecretKeySpec;
import java.security.Security;
/**
* @Auther: chenYing
* @Date: 2019/8/27 0027 17:38
*/
public class CardUtil {
private static final String ALGORITHM = "AES/ECB/PKCS7Padding";
private CardUtil() {
}
public static String cardDecode(String str, byte[] key) {
byte[] bytes = org.apache.commons.codec.binary.Base64.decodeBase64(str);
String result = null;
try {
Security.addProvider(new org.bouncycastle.jce.provider.BouncyCastleProvider());
Cipher cipher = Cipher.getInstance(ALGORITHM, "BC");
SecretKeySpec keySpec = new SecretKeySpec(key, "AES");
cipher.init(Cipher.DECRYPT_MODE, keySpec);
byte[] decoded = cipher.doFinal(bytes);
result = new String(decoded, "UTF-8");
} catch (Exception e) {
throw new RuntimeException(e.getMessage(), e);
}
return result;
}
public static String cardEncode(String str, byte[] key) {
byte[] result = null;
try {
Security.addProvider(new org.bouncycastle.jce.provider.BouncyCastleProvider());
Cipher cipher = Cipher.getInstance(ALGORITHM, "BC");
SecretKeySpec keySpec = new SecretKeySpec(key, "AES");
cipher.init(Cipher.ENCRYPT_MODE, keySpec);
result = cipher.doFinal(str.getBytes("UTF-8"));
} catch (Exception e) {
throw new RuntimeException(e.getMessage(), e);
}
return new String(org.apache.commons.codec.binary.Base64.encodeBase64(result));
}
}

View File

@ -0,0 +1,19 @@
package cn.lili.common.fulu.core.utils;
import java.text.SimpleDateFormat;
import java.util.Date;
/**
* @Auther: chenYing
* @Date: 2019/8/19 0019 15:17
*/
public class DateFormatUtil {
private static final String DATE_FORMAT = "yyyy-MM-dd HH:mm:ss";
private DateFormatUtil() {
}
public static String currentDateTime() {
return new SimpleDateFormat(DATE_FORMAT).format(new Date());
}
}

View File

@ -0,0 +1,206 @@
package cn.lili.common.fulu.core.utils;
import org.apache.http.HttpResponse;
import org.apache.http.NameValuePair;
import org.apache.http.client.HttpClient;
import org.apache.http.client.entity.UrlEncodedFormEntity;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.message.BasicNameValuePair;
import org.apache.http.protocol.HTTP;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.net.*;
import java.util.*;
/**
* @author cheny
*/
public class HttpUtil {
private static Logger log = LoggerFactory.getLogger(HttpUtil.class);
public final static int CONNECT_TIMEOUT = 10000;
public final static int READ_TIMEOUT = 10000;
private static final String ENCODING_GBK = "GBK";
/**
* POST请求json字符串形式数据
*
* @param url 请求地址
* @param param 请求的json数据
* @return response body
* @throws Exception
*/
public static String sendPostJson(String url, String param) {
return sendPostWithHeads(url, param, "application/json", null);
}
private static String sendPostWithHeads(String url, String param, String contentType, Map<String, String> heads) {
PrintWriter out = null;
BufferedReader in = null;
StringBuilder result = new StringBuilder();
HttpURLConnection conn = null;
try {
URL realUrl = new URL(url);
// 打开和URL之间的连接
conn = (HttpURLConnection) realUrl.openConnection();
// 设置通用的请求属性
conn.setRequestMethod("POST");// 提交模式
conn.setConnectTimeout(CONNECT_TIMEOUT);// 连接超时 单位毫秒
conn.setReadTimeout(READ_TIMEOUT);// 读取超时 单位毫秒
if (contentType != null && !contentType.isEmpty()) {
conn.setRequestProperty("Content-Type", contentType);
}
conn.setRequestProperty("accept", "*/*");
conn.setRequestProperty("connection", "Keep-Alive");
conn.setRequestProperty("user-agent",
"Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.181 Safari/537.36");
// 添加头信息
if (heads != null && !heads.isEmpty()) {
for (String key : heads.keySet()) {
conn.setRequestProperty(key, heads.get(key));
}
}
// 发送POST请求必须设置如下两行
conn.setDoOutput(true);
conn.setDoInput(true);
// 获取URLConnection对象对应的输出流
out = new PrintWriter(conn.getOutputStream());
// 发送请求参数
out.print(param);
// flush输出流的缓冲
out.flush();
// 定义BufferedReader输入流来读取URL的响应
in = new BufferedReader(new InputStreamReader(conn.getInputStream(), "UTF-8"));
String line;
while ((line = in.readLine()) != null) {
result.append(line);
}
} catch (Exception e) {
e.printStackTrace();
throw new RuntimeException("send POST request exception :" + e.getMessage(), e);
} finally {
try {
if (out != null) {
out.close();
}
if (in != null) {
in.close();
}
if (conn != null) {
conn.disconnect();
}
} catch (Exception e2) {
throw new RuntimeException("close Connection exception :" + e2.getMessage(), e2);
}
}
return result.toString();
}
/**
* POST请求String字符串形式数据
*
* @param url
* @param paramXmlStr
* @return
*/
public static String sendPostXmlStr(String url, String paramXmlStr) {
String tmpparamXmlStr = "";
try {
tmpparamXmlStr = URLEncoder.encode(paramXmlStr, ENCODING_GBK);
tmpparamXmlStr = sendPostWithHeads(url, tmpparamXmlStr, "application/xml", null);
tmpparamXmlStr = URLDecoder.decode(tmpparamXmlStr,ENCODING_GBK);
}catch (Exception e){
e.printStackTrace();
log.error("post请求URL数据转码报错{}", e.getMessage());
}
return tmpparamXmlStr;
}
/**
* POST请求String字符串形式数据
*
* @param url
* @param paramXmlStr
* @return
*/
public static String sendPostXmlUrlencode(String url, String paramXmlStr) {
String tmpparamXmlStr = "";
Map<String, String> rspMap = new LinkedHashMap<>();
rspMap.put("req", paramXmlStr);
try {
tmpparamXmlStr = URLEncoder.encode(paramXmlStr, ENCODING_GBK);
tmpparamXmlStr = doPostMapParams(url, rspMap);
tmpparamXmlStr = URLDecoder.decode(tmpparamXmlStr,ENCODING_GBK);
}catch (Exception e){
e.printStackTrace();
log.error("post请求URL数据转码报错{}", e.getMessage());
}
return tmpparamXmlStr;
}
/**
* 发送POST请求
* @param url String对象为 目的地址
* @param parameters 请求参数Map类型
* @return 远程响应结果
*/
public static String doPostMapParams(String url, Map<String, String> parameters) {
BufferedReader in = null;
try {
// 定义HttpClient
HttpClient client = new DefaultHttpClient();
// 实例化HTTP方法
HttpPost request = new HttpPost();
request.setURI(new URI(url));
//设置参数
List<NameValuePair> nvps = new ArrayList<NameValuePair>();
for (Iterator iter = parameters.keySet().iterator(); iter.hasNext();) {
String name = (String) iter.next();
String value = String.valueOf(parameters.get(name));
nvps.add(new BasicNameValuePair(name, value));
}
request.setEntity(new UrlEncodedFormEntity(nvps, HTTP.UTF_8));
HttpResponse response = client.execute(request);
int code = response.getStatusLine().getStatusCode();
if(code == 200){ //请求成功
in = new BufferedReader(new InputStreamReader(response.getEntity()
.getContent(),"UTF-8"));
StringBuffer sb = new StringBuffer("");
String line = "";
String NL = System.getProperty("line.separator");
while ((line = in.readLine()) != null) {
sb.append(line + NL);
}
in.close();
return sb.toString();
}else{
System.out.println("状态码:" + code);
return null;
}
}
catch(Exception e) {
e.printStackTrace();
return null;
}
}
}

View File

@ -0,0 +1,41 @@
package cn.lili.common.fulu.core.utils;
import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;
public class JSONUtil {
private static Gson gson = new Gson();
/**
* JSON 字符串转为 Java 对象
*/
public static <T> T fromJSON(String json, Class<T> type) {
T obj;
try {
obj = gson.fromJson(json, type);
} catch (Exception e) {
throw new RuntimeException(e);
}
return obj;
}
/**
* json字符串转list或者map
*/
public static <T> T fromJSON(String json, TypeToken<T> typeToken) {
return gson.fromJson(json, typeToken.getType());
}
/**
* Java 对象转为 JSON 字符串
*/
public static <T> String toJSON(T obj) {
String jsonStr;
try {
jsonStr = gson.toJson(obj);
} catch (Exception e) {
throw new RuntimeException(e);
}
return jsonStr;
}
}

View File

@ -0,0 +1,342 @@
package cn.lili.common.fulu.core.utils;
import cn.lili.common.fulu.core.MethodConst;
import cn.lili.common.fulu.model.*;
import cn.lili.common.fulu.sdk.DefaultOpenApiClient;
import cn.lili.modules.store.entity.dto.FuLuConfigureDTO;
import com.alibaba.fastjson.JSON;
import com.google.gson.reflect.TypeToken;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.*;
import java.util.concurrent.*;
public class Test {
private final static String APP_KEY = "lzHi7ewuTkplx2ePX0eQzN65TIFRk1zFClcoj1Jim/MHmu0X7ZqxMtSLENhvr1xD";
private final static Logger LOGGER = LoggerFactory.getLogger(Test.class);
private final static String SYS_SECRET = "9da68b0f8bcb470e84c3d30e343727e2";
private final static String URL = "http://openapi.fulu.com/api/getway";
// private final static String APP_KEY = "i4esv1l+76l/7NQCL3QudG90Fq+YgVfFGJAWgT+7qO1Bm9o/adG/1iwO2qXsAXNB";
// private final static Logger LOGGER = LoggerFactory.getLogger(Test.class);
// private final static String SYS_SECRET = "0a091b3aa4324435aab703142518a8f7";
// private final static String URL = "http://pre.openapi.fulu.com/api/getway";
private static String repeat(String ch, int num) {
StringBuilder str = new StringBuilder();
for (int i = 0; i < num; i++) {
str.append(ch);
}
return str.toString();
}
private static void waitFor(Future<String> future) throws Exception {
while (!future.isDone()) {
TimeUnit.MILLISECONDS.sleep(500);
}
LOGGER.info("excuteAsync\n{}", future.get());
}
/**
* 卡密下单
*
* @throws Exception
*/
public static void cardOrderAddTest(FuLuConfigureDTO fuLuConfigureDTO, Integer productId, Integer buyNum,String orderSn) throws Exception {
LOGGER.info("\n卡密下单{}", repeat("=", 100));
DefaultOpenApiClient client =
new DefaultOpenApiClient(URL, fuLuConfigureDTO.getAppMerchantKey(), fuLuConfigureDTO.getAppSecretKey(), MethodConst.OPEN_API_CARD_ORDER_ADD);
InputCardOrderDto dto = new InputCardOrderDto();
dto.setProductId(productId);
dto.setCustomerOrderNo(orderSn);
dto.setBuyNum(buyNum);
client.setBizObject(dto);
LOGGER.info("excute\n{}\n{}", client.excute(), repeat("-", 100));
dto.setCustomerOrderNo(UUID.randomUUID().toString());
waitFor(client.excuteAsync());
}
/**
* 直充下单
*
* @throws Exception
*/
public static void directOrderAddTest(FuLuConfigureDTO fuLuConfigureDTO, Integer productId, Integer buyNum,String qrCode,String orderSn) throws Exception {
LOGGER.info("\n直充下单{}", repeat("=", 100));
DefaultOpenApiClient client =
new DefaultOpenApiClient(URL, fuLuConfigureDTO.getAppMerchantKey(), fuLuConfigureDTO.getAppSecretKey(), MethodConst.OPEN_API_DIRECT_ORDER_ADD);
InputDirectOrderDto dto = new InputDirectOrderDto();
dto.setProductId(productId);
dto.setBuyNum(buyNum);
client.setBizObject(dto);
int count = 1;
for (String chargeAccount : Arrays.asList(qrCode)) {
dto.setChargeAccount(chargeAccount);
dto.setCustomerOrderNo(orderSn);
LOGGER.info("excute\n{}\n{}", client.excute(), repeat("-", 100));
if (count++ >= 3) {
waitFor(client.excuteAsync());
} else {
LOGGER.info("excuteAsync\n{}\n{}", client.excuteAsync().get(), repeat("-", 100));
}
}
}
/**
* 手机号归属地
*
* @throws Exception
*/
public void matchPhoneProducGetTest(FuLuConfigureDTO fuLuConfigureDTO) throws Exception {
LOGGER.info("\n手机号归属地{}", repeat("=", 100));
DefaultOpenApiClient client = new DefaultOpenApiClient(URL, fuLuConfigureDTO.getAppMerchantKey(), fuLuConfigureDTO.getAppSecretKey(), MethodConst.OPEN_API_CHECK_PHONE);
InputMatchPhoneProductListDto dto = new InputMatchPhoneProductListDto();
dto.setFaceValue(50D);
int count = 1;
for (String phone : Arrays.asList("15972368779", "13971553804")) {
dto.setPhone(phone);
client.setBizObject(dto);
LOGGER.info("excute\n{}\n{}", client.excute(), repeat("-", 100));
if (count++ >= 2) {
waitFor(client.excuteAsync());
} else {
LOGGER.info("excuteAsync\n{}\n{}", client.excuteAsync().get(), repeat("-", 100));
}
}
}
/**
* 订单查单
*
* @throws Exception
*/
public void orderInfoGetTest(FuLuConfigureDTO fuLuConfigureDTO) throws Exception {
LOGGER.info("\n订单查单{}", repeat("=", 100));
DefaultOpenApiClient client = new DefaultOpenApiClient(URL, fuLuConfigureDTO.getAppMerchantKey(), fuLuConfigureDTO.getAppSecretKey(), MethodConst.OPEN_API_ORDER_GET);
InputOrderGetDto dto = new InputOrderGetDto();
client.setBizObject(dto);
int count = 1;
for (String customerOrderNo : Arrays
.asList("0d19f8e4-5af3-490d-a8d8-47fd457da7de", "31b6b96b-a21e-4bc4-bc0c-6e77a2ffb698")) {
dto.setCustomerOrderNo(customerOrderNo);
LOGGER.info("excute\n{}\n{}", client.excute(), repeat("-", 100));
if (count++ >= 2) {
Future<String> future = client.excuteAsync();
waitFor(future);
Map<String, String> result = JSONUtil.fromJSON(future.get(), new TypeToken<Map>() {
});
Map<String, Object> resultMap = JSONUtil.fromJSON(result.get("result"), new TypeToken<Map<String, Object>>() {
});
List<Map<String, String>> cardList = (List<Map<String, String>>) resultMap.get("cards");
StringBuilder decodeStr = new StringBuilder();
for (Map<String, String> map : cardList) {
decodeStr.append("card_number").append(map.get("card_number")).append("desc_card_number")
.append(CardUtil.cardDecode(map.get("card_number"), SYS_SECRET.getBytes("UTF-8")));
decodeStr.append(" card_pwd").append(map.get("card_pwd")).append("card_pwd")
.append(CardUtil.cardDecode(map.get("card_pwd"), SYS_SECRET.getBytes("UTF-8")));
decodeStr.append("\n");
}
System.out.println(decodeStr.toString());
System.out.println(CardUtil.cardEncode("CD10002502019061217430016421", SYS_SECRET.getBytes("UTF-8")));
} else {
LOGGER.info("excuteAsync\n{}\n{}", client.excuteAsync().get(), repeat("-", 100));
}
}
}
/**
* 话费下单
*
* @throws Exception
*/
public void phoneOrderAddTest(FuLuConfigureDTO fuLuConfigureDTO) throws Exception {
LOGGER.info("\n话费下单{}", repeat("=", 100));
DefaultOpenApiClient client =
new DefaultOpenApiClient(URL, fuLuConfigureDTO.getAppMerchantKey(), fuLuConfigureDTO.getAppSecretKey(), MethodConst.OPEN_API_PHONE_ORDER_ADD);
InputPhoneOrderDto dto = new InputPhoneOrderDto();
dto.setChargeValue(Double.valueOf(50));
int count = 1;
for (String chargePhone : Arrays.asList("15972368779", "13971553804")) {
dto.setCustomerOrderNo(UUID.randomUUID().toString());
dto.setChargePhone(chargePhone);
client.setBizObject(dto);
LOGGER.info("excute\n{}\n{}", client.excute(), repeat("-", 100));
dto.setCustomerOrderNo(UUID.randomUUID().toString());
if (count++ >= 2) {
waitFor(client.excuteAsync());
} else {
LOGGER.info("excuteAsync\n{}\n{}", client.excuteAsync().get(), repeat("-", 100));
}
}
}
/**
* 获得商品信息
*
* @throws Exception
*/
public static Map<String, Object> productInfoGetTest(FuLuConfigureDTO fuLuConfigureDTO,String productIdS) throws Exception {
LOGGER.info("\n获得商品信息{}", repeat("=", 100));
DefaultOpenApiClient client = new DefaultOpenApiClient(URL, fuLuConfigureDTO.getAppMerchantKey(), fuLuConfigureDTO.getAppSecretKey(), MethodConst.OPEN_API_GOODS_GET);
InputProductDto dto = new InputProductDto();
int count = 1;
Map<String, Object> maps = new HashMap();
for (String productId : Arrays.asList(productIdS)) {
dto.setProductId(productId);
client.setBizObject(dto);
maps = (Map) JSON.parse(client.excute());
LOGGER.info("excute\n{}\n{}", client.excute(), repeat("-", 100));
if (count++ >= 10) {
waitFor(client.excuteAsync());
} else {
LOGGER.info("excuteAsync\n{}\n{}", client.excuteAsync().get(), repeat("-", 100));
}
}
return maps;
}
/**
* 获得商品模板信息
*
* @throws Exception
*/
public void productTemplateGetTest(FuLuConfigureDTO fuLuConfigureDTO) throws Exception {
LOGGER.info("\n获得商品模板信息{}", repeat("=", 100));
DefaultOpenApiClient client =
new DefaultOpenApiClient(URL, fuLuConfigureDTO.getAppMerchantKey(), fuLuConfigureDTO.getAppSecretKey(), MethodConst.OPEN_API_GOODS_TEMPLATE_GET);
InputProductTemplateDto dto = new InputProductTemplateDto();
dto.setTemplateId("e1dac0ea-dc86-4c9d-a778-c9e19203ecb8");
client.setBizObject(dto);
LOGGER.info("excute\n{}\n{}", client.excute(), repeat("-", 100));
waitFor(client.excuteAsync());
}
/**
* 流量下单
*
* @throws Exception
*/
public void trafficOrderAddTest(FuLuConfigureDTO fuLuConfigureDTO) throws Exception {
LOGGER.info("\n流量下单{}", repeat("=", 100));
DefaultOpenApiClient client =
new DefaultOpenApiClient(URL, fuLuConfigureDTO.getAppMerchantKey(), fuLuConfigureDTO.getAppSecretKey(), MethodConst.OPEN_API_TRAFFIC_ORDER_ADD);
InputTrafficOrderDto dto = new InputTrafficOrderDto();
dto.setChargeValue(Double.valueOf(1024));
dto.setPacketKind(4);
int count = 1;
for (String chargePhone : Arrays.asList("15972368779", "13971553804")) {
client.setBizObject(dto);
dto.setChargePhone(chargePhone);
dto.setCustomerOrderNo(UUID.randomUUID().toString());
LOGGER.info("excute\n{}\n{}", client.excute(), repeat("-", 100));
dto.setCustomerOrderNo(UUID.randomUUID().toString());
if (count++ >= 2) {
waitFor(client.excuteAsync());
} else {
LOGGER.info("excuteAsync\n{}\n{}", client.excuteAsync().get(), repeat("-", 100));
}
}
}
/**
* 用户信息
*
* @throws Exception
*/
public static void userInfoGetTest(FuLuConfigureDTO fuLuConfigureDTO) throws Exception {
LOGGER.info("\n用户信息{}", repeat("=", 100));
DefaultOpenApiClient client =
new DefaultOpenApiClient(URL, fuLuConfigureDTO.getAppMerchantKey(), fuLuConfigureDTO.getAppSecretKey(), MethodConst.OPEN_API_USER_INFO_GET);
InputUserDto dto = new InputUserDto();
client.setBizObject(dto);
LOGGER.info("excute\n{}\n{}", client.excute(), repeat("-", 100));
waitFor(client.excuteAsync());
}
/**
* 用户信息高并发场景
*
* @throws Exception
*/
public static void userInfoGetTest2(FuLuConfigureDTO fuLuConfigureDTO) throws Exception {
LOGGER.info("\n用户信息高并发场景{}", repeat("=", 100));
Executor executor = Executors.newCachedThreadPool();
final int count = 10;
final CountDownLatch downLatch = new CountDownLatch(count);
for (int i = 0; i < count; ++i) {
executor.execute(new Runnable() {
@Override
public void run() {
try {
String name = Thread.currentThread().getName();
LOGGER.info("\n线程名{}{}", name, repeat("+", 100));
DefaultOpenApiClient client =
new DefaultOpenApiClient(URL, fuLuConfigureDTO.getAppMerchantKey(), fuLuConfigureDTO.getAppSecretKey(), MethodConst.OPEN_API_USER_INFO_GET);
InputUserDto dto = new InputUserDto();
client.setBizObject(dto);
LOGGER.info("\n线程名{}\n{}\n{}", name, client.excute(), repeat("+", 100));
waitFor(client.excuteAsync());
} catch (Exception ex) {
LOGGER.error(ex.getMessage(), ex);
} finally {
downLatch.countDown();
}
}
});
}
downLatch.await();
}
/* 获得商品信息列表
*
* @throws Exception
*/
public static String getGoodsInfoList(FuLuConfigureDTO fuLuConfigureDTO) throws Exception {
LOGGER.info("\n获得商品信息{}", repeat("=", 100));
DefaultOpenApiClient client = new DefaultOpenApiClient(URL, fuLuConfigureDTO.getAppMerchantKey(), fuLuConfigureDTO.getAppSecretKey(), MethodConst.OPEN_API_GOODS_LIST);
InputProductDto dto = new InputProductDto();
client.setBizObject(dto);
return client.excute().toString();
}
public static void main(String[] args) {
try {
// productInfoGetTest();
} catch (Exception e) {
e.printStackTrace();
}
}
}

View File

@ -0,0 +1,159 @@
package cn.lili.common.fulu.model;
import cn.lili.common.fulu.core.utils.DateFormatUtil;
import cn.lili.common.fulu.core.utils.JSONUtil;
import com.google.gson.annotations.SerializedName;
import com.google.gson.reflect.TypeToken;
import java.io.Serializable;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
/**
* @Auther: chenYing
* @Date: 2019/8/19 0019 10:49
*/
public class CommonRequest implements Serializable {
private static final long serialVersionUID = 2L;
@SerializedName(value = "app_auth_token")
private String appAuthToken = "";
@SerializedName(value = "app_key")
private String appKey;
@SerializedName(value = "biz_content")
private String bizContent = "{}";
private transient Map<String, Object> bizContentMap = Collections.emptyMap();
private String charset;
private String format;
private String method;
private String sign;
@SerializedName(value = "sign_type")
private String signType;
private String timestamp;
private String version;
public CommonRequest() {
format = "json";
version = "2.0";
charset = "utf-8";
signType = "md5";
// timestamp = "2019-08-20 13:59:38";
timestamp = DateFormatUtil.currentDateTime();
}
public String getAppAuthToken() {
return appAuthToken;
}
public void setAppAuthToken(String appAuthToken) {
this.appAuthToken = appAuthToken;
}
public String getAppKey() {
return appKey;
}
public void setAppKey(String appKey) {
this.appKey = appKey;
}
public String getBizContent() {
if (!bizContentMap.isEmpty()) {
bizContent = JSONUtil.toJSON(bizContentMap);
}
return bizContent;
}
/**
* 直接将变量以json格式保存
*
* @param bizContent bizContent
*/
public void setBizContent(String bizContent) {
if (bizContent != null && !"".equals(bizContent.trim())) {
Map<String, Object> dataMap = JSONUtil.fromJSON(bizContent, new TypeToken<Map<String, Object>>() {
});
if (bizContentMap.isEmpty()) {
bizContentMap = new HashMap<String, Object>();
}
bizContentMap.putAll(dataMap);
}
}
public String getCharset() {
return charset;
}
public void setCharset(String charset) {
this.charset = charset;
}
public String getFormat() {
return format;
}
public void setFormat(String format) {
this.format = format;
}
public String getMethod() {
return method;
}
public void setMethod(String method) {
this.method = method;
}
public String getSign() {
return sign;
}
public void setSign(String sign) {
this.sign = sign;
}
public String getSignType() {
return signType;
}
public void setSignType(String signType) {
this.signType = signType;
}
public String getTimestamp() {
return timestamp;
}
public void setTimestamp(String timestamp) {
this.timestamp = timestamp;
}
public String getVersion() {
return version;
}
public void setVersion(String version) {
this.version = version;
}
/**
* 以key:value形式保存程序会转换为json格式
*
* @param key key
* @param value value
*/
public void setBizContent(String key, Object value) {
if (bizContentMap.isEmpty()) {
bizContentMap = new HashMap<String, Object>();
}
bizContentMap.put(key, value);
}
protected Object getBizContentValue(String key) {
return bizContentMap.get(key);
}
}

View File

@ -0,0 +1,56 @@
package cn.lili.common.fulu.model;
/**
* 卡密订单input dto
*
* @Auther: chenYing
* @Date: 2019/8/19 0019 15:35
*/
public class InputCardOrderDto extends CommonRequest {
public InputCardOrderDto() {
super();
setMethod("fulu.order.card.add");
}
/**
* 购买数量
*
* @return Integer
*/
public Integer getBuyNum() {
Object value = getBizContentValue("buy_num");
return value != null ? Integer.valueOf(value.toString()) : null;
}
public void setBuyNum(Integer buyNum) {
setBizContent("buy_num", buyNum);
}
/**
* 外部订单号
*
* @return String
*/
public String getCustomerOrderNo() {
Object value = getBizContentValue("customer_order_no");
return value != null ? String.valueOf(value) : null;
}
public void setCustomerOrderNo(String customerOrderNo) {
setBizContent("customer_order_no", customerOrderNo);
}
/**
* 商品编号
*
* @return Integer
*/
public Integer getProductId() {
Object value = getBizContentValue("product_id");
return value != null ? Integer.valueOf(value.toString()) : null;
}
public void setProductId(Integer productId) {
setBizContent("product_id", productId);
}
}

View File

@ -0,0 +1,213 @@
package cn.lili.common.fulu.model;
/**
* 直充商品订单input dto
*
* @Auther: chenYing
* @Date: 2019/8/19 0019 15:39
*/
public class InputDirectOrderDto extends CommonRequest {
public InputDirectOrderDto() {
super();
setMethod("fulu.order.direct.add");
}
/**
* 购买数量
*
* @return Integer
*/
public Integer getBuyNum() {
Object value = getBizContentValue("buy_num");
return value != null ? Integer.valueOf(value.toString()) : null;
}
public void setBuyNum(Integer buyNum) {
setBizContent("buy_num", buyNum);
}
/**
* 充值账号
*
* @return String
*/
public String getChargeAccount() {
Object value = getBizContentValue("charge_account");
return value != null ? String.valueOf(value) : null;
}
public void setChargeAccount(String chargeAccount) {
setBizContent("charge_account", chargeAccount);
}
/**
* 充值游戏名称
*
* @return String
*/
public String getChargeGameName() {
Object value = getBizContentValue("charge_game_name");
return value != null ? String.valueOf(value) : null;
}
public void setChargeGameName(String chargeGameName) {
setBizContent("charge_game_name", chargeGameName);
}
/**
* 充值游戏区
*
* @return String
*/
public String getChargeGameRegion() {
Object value = getBizContentValue("charge_game_region");
return value != null ? String.valueOf(value) : null;
}
public void setChargeGameRegion(String chargeGameRegion) {
setBizContent("charge_game_region", chargeGameRegion);
}
/**
* 充值游戏角色
*
* @return String
*/
public String getChargeGameRole() {
Object value = getBizContentValue("charge_game_role");
return value != null ? String.valueOf(value) : null;
}
public void setChargeGameRole(String chargeGameRole) {
setBizContent("charge_game_role", chargeGameRole);
}
/**
* 充值游戏服
*
* @return String
*/
public String getChargeGameSrv() {
Object value = getBizContentValue("charge_game_srv");
return value != null ? String.valueOf(value) : null;
}
public void setChargeGameSrv(String chargeGameSrv) {
setBizContent("charge_game_srv", chargeGameSrv);
}
/**
* 下单真实Ip区域商品要传
*
* @return String
*/
public String getChargeIp() {
Object value = getBizContentValue("charge_ip");
return value != null ? String.valueOf(value) : null;
}
public void setChargeIp(String chargeIp) {
setBizContent("charge_ip", chargeIp);
}
/**
* 充值密码部分游戏类要传
*
* @return String
*/
public String getChargePassword() {
Object value = getBizContentValue("charge_password");
return value != null ? String.valueOf(value) : null;
}
public void setChargePassword(String chargePassword) {
setBizContent("charge_password", chargePassword);
}
/**
* 充值类型
*
* @return String
*/
public String getChargeType() {
Object value = getBizContentValue("charge_type");
return value != null ? String.valueOf(value) : null;
}
public void setChargeType(String chargeType) {
setBizContent("charge_type", chargeType);
}
/**
* 联系QQ
*
* @return String
*/
public String getContactQq() {
Object value = getBizContentValue("contact_qq");
return value != null ? String.valueOf(value) : null;
}
public void setContactQq(String contactQq) {
setBizContent("contact_qq", contactQq);
}
/**
* 联系电话
*
* @return String
*/
public String getContactTel() {
Object value = getBizContentValue("contact_tel");
return value != null ? String.valueOf(value) : null;
}
public void setContactTel(String contactTel) {
setBizContent("contact_tel", contactTel);
}
/**
* 外部订单号
*
* @return String
*/
public String getCustomerOrderNo() {
Object value = getBizContentValue("customer_order_no");
return value != null ? String.valueOf(value) : null;
}
public void setCustomerOrderNo(String customerOrderNo) {
setBizContent("customer_order_no", customerOrderNo);
}
/**
* 商品编号
*
* @return Integer
*/
public Integer getProductId() {
Object value = getBizContentValue("product_id");
return value != null ? Integer.valueOf(value.toString()) : null;
}
public void setProductId(Integer productId) {
setBizContent("product_id", productId);
}
/**
* 剩余数量
*
* @return Integer
*/
public Integer getRemainingNumber() {
Object value = getBizContentValue("remaining_number");
return value != null ? Integer.valueOf(value.toString()) : null;
}
public void setRemainingNumber(Integer remainingNumber) {
setBizContent("remaining_number", remainingNumber);
}
}

View File

@ -0,0 +1,44 @@
package cn.lili.common.fulu.model;
/**
* 手机号归属地input dto
*
* @Auther: chenYing
* @Date: 2019/8/19 0019 16:08
*/
public class InputMatchPhoneProductListDto extends CommonRequest {
public InputMatchPhoneProductListDto() {
super();
setMethod("fulu.mobile.info.get");
}
/**
* 面值
*
* @return Double
*/
public Double getFaceValue() {
Object value = getBizContentValue("face_value");
return value != null ? Double.valueOf(value.toString()) : null;
}
public void setFaceValue(Double faceValue) {
setBizContent("face_value", faceValue);
}
/**
* 手机号
*
* @return String
*/
public String getPhone() {
Object value = getBizContentValue("phone");
return value != null ? String.valueOf(value) : null;
}
public void setPhone(String phone) {
setBizContent("phone", phone);
}
}

View File

@ -0,0 +1,31 @@
package cn.lili.common.fulu.model;
/**
* 订单查单input dto
*
* @Auther: chenYing
* @Date: 2019/8/19 0019 15:23
*/
public class InputOrderGetDto extends CommonRequest {
public InputOrderGetDto() {
super();
setMethod("fulu.order.info.get");
}
/**
* 外部订单号
*
* @return String
*/
public String getCustomerOrderNo() {
Object value = getBizContentValue("customer_order_no");
return value != null ? String.valueOf(value) : null;
}
public void setCustomerOrderNo(String customerOrderNo) {
setBizContent("customer_order_no", customerOrderNo);
}
}

View File

@ -0,0 +1,57 @@
package cn.lili.common.fulu.model;
/**
* 话费订单input dto
*
* @Auther: chenYing
* @Date: 2019/8/19 0019 15:31
*/
public class InputPhoneOrderDto extends CommonRequest {
public InputPhoneOrderDto() {
super();
setMethod("fulu.order.mobile.add");
}
/**
* 充值手机号
*
* @return String
*/
public String getChargePhone() {
Object value = getBizContentValue("charge_phone");
return value != null ? String.valueOf(value) : null;
}
public void setChargePhone(String chargePhone) {
setBizContent("charge_phone", chargePhone);
}
/**
* 充值数额
*
* @return Double
*/
public Double getChargeValue() {
Object value = getBizContentValue("charge_value");
return value != null ? Double.valueOf(value.toString()) : null;
}
public void setChargeValue(Double chargeValue) {
setBizContent("charge_value", chargeValue);
}
/**
* 外部订单号
*
* @return String
*/
public String getCustomerOrderNo() {
Object value = getBizContentValue("customer_order_no");
return value != null ? String.valueOf(value) : null;
}
public void setCustomerOrderNo(String customerOrderNo) {
setBizContent("customer_order_no", customerOrderNo);
}
}

View File

@ -0,0 +1,30 @@
package cn.lili.common.fulu.model;
/**
* 商品信息input dto
*
* @Auther: chenYing
* @Date: 2019/8/19 0019 16:04
*/
public class InputProductDto extends CommonRequest {
public InputProductDto() {
super();
setMethod("fulu.goods.info.get");
}
/**
* 商品编号
*
* @return String
*/
public String getProductId() {
Object value = getBizContentValue("product_id");
return value != null ? String.valueOf(value) : null;
}
public void setProductId(String productId) {
setBizContent("product_id", productId);
}
}

View File

@ -0,0 +1,29 @@
package cn.lili.common.fulu.model;
/**
* 商品模板信息input dto
*
* @Auther: chenYing
* @Date: 2019/8/19 0019 16:01
*/
public class InputProductTemplateDto extends CommonRequest {
public InputProductTemplateDto() {
super();
setMethod("fulu.goods.template.get");
}
/**
* 商品模板编号
*
* @return String
*/
public String getTemplateId() {
Object value = getBizContentValue("template_id");
return value != null ? String.valueOf(value) : null;
}
public void setTemplateId(String templateId) {
setBizContent("template_id", templateId);
}
}

View File

@ -0,0 +1,72 @@
package cn.lili.common.fulu.model;
/**
* 流量订单input dto
*
* @Auther: chenYing
* @Date: 2019/8/19 0019 13:50
*/
public class InputTrafficOrderDto extends CommonRequest {
public InputTrafficOrderDto() {
super();
setMethod("fulu.order.data.add");
}
/**
* 充值手机号
*
* @return String
*/
public String getChargePhone() {
Object value = getBizContentValue("charge_phone");
return value != null ? String.valueOf(value) : null;
}
public void setChargePhone(String chargePhone) {
setBizContent("charge_phone", chargePhone);
}
/**
* 充值数额M
*
* @return Double
*/
public Double getChargeValue() {
Object value = getBizContentValue("charge_value");
return value != null ? Double.valueOf(value.toString()) : null;
}
public void setChargeValue(Double chargeValue) {
setBizContent("charge_value", chargeValue);
}
/**
* 外部订单号
*
* @return String
*/
public String getCustomerOrderNo() {
Object value = getBizContentValue("customer_order_no");
return value != null ? String.valueOf(value) : null;
}
public void setCustomerOrderNo(String customerOrderNo) {
setBizContent("customer_order_no", customerOrderNo);
}
/**
* 流量性质 1:小时 2: 3:7天 4: 5:季度 6:半年 7:
*
* @return Integer
*/
public Integer getPacketKind() {
Object value = getBizContentValue("packet_kind");
return value != null ? Integer.valueOf(value.toString()) : null;
}
public void setPacketKind(Integer packetKind) {
setBizContent("packet_kind", packetKind);
}
}

View File

@ -0,0 +1,15 @@
package cn.lili.common.fulu.model;
/**
* 用户信息input dto
*
* @Auther: chenYing
* @Date: 2019/8/19 0019 16:06
*/
public class InputUserDto extends CommonRequest {
public InputUserDto() {
super();
setMethod("fulu.user.info.get");
}
}

View File

@ -0,0 +1,46 @@
package cn.lili.common.fulu.model.response;
/**
* 响应对象
*
* @Auther: chenYing
* @Date: 2019/8/19 0019 15:06
*/
public class DefaultClientResponse {
private String code;
private String message;
private String result;
private String sign;
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public String getMessage() {
return message;
}
public void setMessage(String message) {
this.message = message;
}
public String getResult() {
return result;
}
public void setResult(String result) {
this.result = result;
}
public String getSign() {
return sign;
}
public void setSign(String sign) {
this.sign = sign;
}
}

View File

@ -0,0 +1,129 @@
package cn.lili.common.fulu.sdk;
import cn.lili.common.fulu.core.http.FuluClient;
import cn.lili.common.fulu.core.http.IFuluClient;
import cn.lili.common.fulu.core.utils.JSONUtil;
import cn.lili.common.fulu.model.CommonRequest;
import org.apache.commons.codec.digest.DigestUtils;
import java.util.Arrays;
import java.util.concurrent.Future;
/**
* 默认OpenApi客户请求实现
*
* @Auther: chenYing
* @Date: 2019/8/19 0019 16:45
*/
public class DefaultOpenApiClient implements IDefaultOpenApiClient {
/**
* 商户AppKey
*/
private String appKey;
/**
* 业务参数
*/
private CommonRequest bizContent;
/**
* http请求
*/
private IFuluClient fuluClient;
/**
* 方法
*/
private String method;
/**
* 应用秘钥
*/
private String sysSecret;
// public DefaultOpenApiClient(String url, String appKey, String sysSecret) {
// this.appKey = appKey;
// this.sysSecret = sysSecret;
//
// if (url == null || "".equals(url.trim())) {
// this.fuluClient = new FuluClient();
// } else {
// this.fuluClient = new FuluClient(url);
// }
// }
/**
* 如果url没改变可以使用这个构造
*
* @param appKey appKey
* @param sysSecret sysSecret
*/
// public DefaultOpenApiClient(String appKey, String sysSecret) {
// this.appKey = appKey;
// this.fuluClient = new FuluClient();
// this.sysSecret = sysSecret;
// }
/**
* 使用public void setBizContent(String bizContent)此方法method不能为空必填
* 或者使用其它构造调用fulu.sup.open.api.model.CommonRequest的setMethod也可以
*
* @param url url
* @param appKey appKey
* @param sysSecret sysSecret
* @param method method
*/
public DefaultOpenApiClient(String url, String appKey, String sysSecret, String method) {
this.appKey = appKey;
this.sysSecret = sysSecret;
this.method = method;
if (url == null || "".equals(url.trim())) {
this.fuluClient = new FuluClient();
} else {
this.fuluClient = new FuluClient(url);
}
}
@Override
public String excute() {
doSign();
return fuluClient.send(JSONUtil.toJSON(this.bizContent));
}
@Override
public Future<String> excuteAsync() {
doSign();
return fuluClient.sendAsync(JSONUtil.toJSON(this.bizContent));
}
@Override
public void setBizContent(String bizContent) {
this.bizContent = new CommonRequest();
this.bizContent.setBizContent(bizContent);
this.bizContent.setAppKey(this.appKey);
this.bizContent.setMethod(this.method);
}
@Override
public void setBizObject(CommonRequest bizModel) {
this.bizContent = bizModel;
this.bizContent.setAppKey(this.appKey);
if (method != null && !"".equals(method)) {
this.bizContent.setMethod(this.method);
}
}
private void doSign() {
if (bizContent.getMethod() == null || "".equals(bizContent.getMethod().trim())) {
throw new RuntimeException("param \"method\" can not blank!");
}
this.bizContent.setSign(null);
this.bizContent.getBizContent();
String json = JSONUtil.toJSON(this.bizContent);
char[] charArray = json.toCharArray();
Arrays.sort(charArray);
String signStr = new String(charArray);
signStr = String.format("%s%s", signStr, sysSecret);
this.bizContent.setSign(DigestUtils.md5Hex(signStr));
}
}

View File

@ -0,0 +1,44 @@
package cn.lili.common.fulu.sdk;
import cn.lili.common.fulu.model.CommonRequest;
import java.util.concurrent.Future;
/**
* 默认OpenApi客户请求接口
*
* @Auther: chenYing
* @Date: 2019/8/19 0019 16:40
*/
public interface IDefaultOpenApiClient {
/**
* 执行请求同步方法
*
* @return String
*/
String excute();
/**
* 执行请求异步方法
*
* @return Future<String>
*/
Future<String> excuteAsync();
/**
* 设置业务参数
*
* @param bizContent
*/
@Deprecated
void setBizContent(String bizContent);
/**
* 设置业务参数
*/
void setBizObject(CommonRequest bizModel);
}

View File

@ -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";
}

View File

@ -24,8 +24,7 @@ public class VerificationCodeProperties {
/**
* 水印
*/
private String watermark = "LILI-SHOP";
private String watermark = "";
/**
* 干扰数量 最大数量
*/

View File

@ -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;
}
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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

View File

@ -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);
}
}

View File

@ -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");
}

View File

@ -0,0 +1,34 @@
package cn.lili.modules.file.plugin;
import java.io.InputStream;
import java.util.List;
public interface QiNiuManagerPlugin {
/**
* 文件流上传
*
* @param inputStream
* @param key
* @return
*/
String inputStreamUpload(InputStream inputStream, String key);
/**
* 删除文件
*
* @param key
*/
void deleteFile(List<String> key);
/**
* 根据原图生成规定尺寸的图片
*
* @param url 连接
* @param width
* @param height
* @return
*/
String getUrl(String url, Integer width, Integer height);
}

View File

@ -0,0 +1,143 @@
package cn.lili.modules.file.plugin.impl;
import cn.hutool.core.util.StrUtil;
import cn.lili.common.enums.ResultCode;
import cn.lili.common.exception.ServiceException;
import cn.lili.modules.file.plugin.QiNiuManagerPlugin;
import cn.lili.modules.system.entity.dos.Setting;
import cn.lili.modules.system.entity.dto.OssSetting;
import cn.lili.modules.system.entity.enums.SettingEnum;
import cn.lili.modules.system.service.SettingService;
import com.aliyun.oss.ClientException;
import com.aliyun.oss.OSS;
import com.aliyun.oss.OSSClientBuilder;
import com.aliyun.oss.OSSException;
import com.aliyun.oss.model.DeleteObjectsRequest;
import com.google.gson.Gson;
import com.qiniu.common.QiniuException;
import com.qiniu.http.Response;
import com.qiniu.storage.BucketManager;
import com.qiniu.storage.Configuration;
import com.qiniu.storage.UploadManager;
import com.qiniu.util.Auth;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import java.io.File;
import java.io.InputStream;
import java.util.List;
/**
* 阿里oss 文件操作
*
* @author Chopper
*/
@Component
@Slf4j
public class QiNiuFileManagerPlugin implements QiNiuManagerPlugin {
@Autowired
private SettingService settingService;
/**
* 下一个初始化配置参数的时间
* 这里为了防止多次调用redis减少与redis的交互时间
*/
private static Long nextInitSetting;
/**
* 暂时设定3分账请求一次设置
*/
private static final Long INTERVAL = 60 * 3 * 1000L;
/**
* 静态设置最快三分钟更新一次
*/
private static OssSetting ossSetting;
private Auth auth;
private UploadManager uploadManager;
private BucketManager bucketManager;
/**
* 获取oss client
*
* @return
*/
private OSS getQiNiuOssClient() {
OssSetting ossSetting = getSetting();
return new OSSClientBuilder().build(
ossSetting.getEndPoint(),
ossSetting.getAccessKeyId(),
ossSetting.getAccessKeySecret());
}
/**
* 获取配置
*
* @return
*/
private OssSetting getSetting() {
//如果没有配置或者没有下次刷新时间或者下次刷新时间小于当前时间则从redis 更新一次
if (ossSetting == null || nextInitSetting == null || nextInitSetting < System.currentTimeMillis()) {
Setting setting = settingService.get(SettingEnum.OSS_SETTING.name());
if (setting == null || StrUtil.isBlank(setting.getSettingValue())) {
throw new ServiceException(ResultCode.OSS_NOT_EXIST);
}
nextInitSetting = System.currentTimeMillis() + INTERVAL;
ossSetting = new Gson().fromJson(setting.getSettingValue(), OssSetting.class);
return ossSetting;
}
return ossSetting;
}
@Override
public String inputStreamUpload(InputStream inputStream, String key) {
OssSetting ossSetting = getSetting();
auth = Auth.create(ossSetting.getAccessKeyId(), ossSetting.getAccessKeySecret());
uploadManager = new UploadManager(new Configuration());
String upToken = auth.uploadToken(ossSetting.getBucketName());
try {
Response response = uploadManager.put(inputStream, ossSetting.getPicLocation() +"/"+ key, upToken, null, "image/jpg");
if (response.statusCode == 200) {
return ossSetting.getEndPoint() + "/"+ ossSetting.getPicLocation() + "/" + key;
}
} catch (QiniuException e) {
e.printStackTrace();
}
return "";
}
@Override
public void deleteFile(List<String> key) {
OssSetting ossSetting = getSetting();
if (bucketManager == null) {
if (auth == null) {
auth = Auth.create(ossSetting.getAccessKeyId(), ossSetting.getAccessKeySecret());
}
bucketManager = new BucketManager(auth, new Configuration());
}
//
// for (int i = 0; 0 < key.size(); i++) {
// try {
// bucketManager.delete(ossSetting.getBucketName()+ "/"+ ossSetting.getPicLocation(), key.get(i));
// } catch (Exception e) {
// e.printStackTrace();
// }
// }
}
@Override
public String getUrl(String url, Integer width, Integer height) {
//缩略图全路径
//返回缩略图全路径
return url + "?x-oss-process=style/" + width + "X" + height;
}
}

View File

@ -4,6 +4,7 @@ import cn.hutool.core.text.CharSequenceUtil;
import cn.lili.common.enums.ResultCode;
import cn.lili.common.exception.ServiceException;
import cn.lili.common.security.AuthUser;
import cn.lili.mybatis.util.PageUtil;
import cn.lili.common.vo.PageVO;
import cn.lili.common.vo.SearchVO;
import cn.lili.modules.file.entity.File;
@ -12,7 +13,6 @@ import cn.lili.modules.file.mapper.FileMapper;
import cn.lili.modules.file.plugin.FilePlugin;
import cn.lili.modules.file.plugin.FilePluginFactory;
import cn.lili.modules.file.service.FileService;
import cn.lili.mybatis.util.PageUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

View File

@ -8,6 +8,7 @@ import cn.lili.common.enums.ResultCode;
import cn.lili.common.exception.ServiceException;
import cn.lili.modules.goods.entity.dto.DraftGoodsDTO;
import cn.lili.modules.goods.entity.dto.GoodsOperationDTO;
import cn.lili.modules.goods.entity.dto.GoodsOperationFuLuDTO;
import cn.lili.modules.goods.entity.enums.GoodsAuthEnum;
import cn.lili.modules.goods.entity.enums.GoodsSalesModeEnum;
import cn.lili.modules.goods.entity.enums.GoodsStatusEnum;

View File

@ -0,0 +1,67 @@
package cn.lili.modules.goods.entity.dto;
import cn.lili.modules.goods.entity.dos.Category;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.List;
import java.util.Map;
/**
* 商品导入DTO
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
public class GoodsImportDTO {
@ApiModelProperty(value = "商品名称")
private String goodsName;
@ApiModelProperty(value = "商品卖点")
private String sellingPoint;
@ApiModelProperty(value = "商品分类")
private Category category;
@ApiModelProperty(value = "运费模板")
private String template;
@ApiModelProperty(value = "计量单位")
private String goodsUnit;
@ApiModelProperty(value = "发布状态")
private Boolean release;
@ApiModelProperty(value = "商品图片")
private List<Map<String, String>> images;
private List<String> goodsGalleryList;
@ApiModelProperty(value = "成本价")
private Double cost;
@ApiModelProperty(value = "销售价")
private Double price;
@ApiModelProperty(value = "库存")
private Integer quantity;
@ApiModelProperty(value = "重量")
private Double weight;
@ApiModelProperty(value = "货号")
private String sn;
@ApiModelProperty(value = "详情")
private String intro;
@ApiModelProperty(value = "规格项")
private String skuKey;
@ApiModelProperty(value = "规格值")
private String skuValue;
}

View File

@ -1,6 +1,9 @@
package cn.lili.modules.goods.entity.dto;
import cn.lili.common.validation.EnumValue;
import cn.lili.modules.goods.entity.enums.GoodsSalesModeEnum;
import cn.lili.modules.goods.entity.enums.GoodsStatusEnum;
import cn.lili.modules.goods.entity.enums.GoodsTypeEnum;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import org.hibernate.validator.constraints.Length;
@ -8,6 +11,8 @@ import org.hibernate.validator.constraints.Length;
import javax.validation.Valid;
import javax.validation.constraints.*;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@ -126,9 +131,49 @@ public class GoodsOperationDTO implements Serializable {
@ApiModelProperty(value = "批发商品规则")
private List<WholesaleDTO> wholesaleList;
@ApiModelProperty(value = "注意事项")
private String needingAttention;
@ApiModelProperty(value = "是否为年度会员专属")
private Boolean annualFeeExclusive;
@ApiModelProperty(value = "浏览权限")
private String browsePermissions;
public String getGoodsName() {
//对商品对名称做一个极限处理这里没有用xss过滤是因为xss过滤为全局过滤影响很大
// 业务中全局代码中只有商品名称不能拥有英文逗号是由于商品名称存在一个数据库联合查询结果要根据逗号分组
return goodsName.replace(",", "");
}
public GoodsOperationDTO(GoodsImportDTO goodsImportDTO) {
this.price = goodsImportDTO.getPrice();
this.goodsName = goodsImportDTO.getGoodsName();
this.intro = goodsImportDTO.getIntro();
this.mobileIntro = goodsImportDTO.getIntro();
this.quantity = goodsImportDTO.getQuantity();
this.goodsGalleryList = goodsImportDTO.getGoodsGalleryList();
this.templateId = goodsImportDTO.getTemplate();
this.sellingPoint = goodsImportDTO.getSellingPoint();
this.salesModel = GoodsSalesModeEnum.RETAIL.name();
this.goodsUnit = goodsImportDTO.getGoodsUnit();
this.goodsType = GoodsTypeEnum.PHYSICAL_GOODS.name();
this.release = goodsImportDTO.getRelease();
this.recommend=false;
Map<String, Object> map = new HashMap<>();
map.put("sn", goodsImportDTO.getSn());
map.put("price", goodsImportDTO.getPrice());
map.put("cost", goodsImportDTO.getCost());
map.put("weight", goodsImportDTO.getWeight());
map.put("quantity", goodsImportDTO.getQuantity());
map.put(goodsImportDTO.getSkuKey(), goodsImportDTO.getSkuValue());
map.put("images", goodsImportDTO.getImages());
List<Map<String, Object>> skuList = new ArrayList<>();
skuList.add(map);
this.skuList = skuList;
}
}

View File

@ -0,0 +1,137 @@
package cn.lili.modules.goods.entity.dto;
import cn.lili.common.validation.EnumValue;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.ToString;
import org.hibernate.validator.constraints.Length;
import javax.validation.Valid;
import javax.validation.constraints.*;
import java.io.Serializable;
import java.util.List;
import java.util.Map;
/**
* 商品编辑DTO
*
* @author pikachu
* @since 2020-02-24 19:27:20
*/
@Data
@ToString
public class GoodsOperationFuLuDTO implements Serializable {
private static final long serialVersionUID = -509667581371776913L;
@ApiModelProperty(hidden = true)
private String goodsId;
@ApiModelProperty(value = "商品价格", required = true)
@NotNull(message = "商品价格不能为空")
@Min(value = 0, message = "商品价格不能为负数")
@Max(value = 99999999, message = "商品价格不能超过99999999")
private Double price;
@ApiModelProperty(value = "分类path")
private String categoryPath;
@ApiModelProperty(value = "店铺分类id", required = true)
@Size(max = 200, message = "选择了太多店铺分类")
private String storeCategoryPath;
@ApiModelProperty(value = "品牌id")
@Min(value = 0, message = "品牌值不正确")
private String brandId;
@ApiModelProperty(value = "商品名称", required = true)
@NotEmpty(message = "商品名称不能为空")
@Length(max = 50, message = "商品名称不能超过50个字符")
private String goodsName;
@ApiModelProperty(value = "详情")
private String intro;
@ApiModelProperty(value = "商品移动端详情")
private String mobileIntro;
@ApiModelProperty(value = "库存")
@Min(value = 0, message = "库存不能为负数")
@Max(value = 99999999, message = "库存不能超过99999999")
private Integer quantity;
@ApiModelProperty(value = "是否立即发布")
private Boolean release;
@ApiModelProperty(value = "是否是推荐商品")
private Boolean recommend;
@ApiModelProperty(value = "商品参数")
private List<GoodsParamsDTO> goodsParamsDTOList;
@ApiModelProperty(value = "商品图片")
private List<String> goodsGalleryList;
@ApiModelProperty(value = "运费模板id,不需要运费模板时值是0", required = true)
@NotNull(message = "运费模板不能为空没有运费模板时传值0")
@Min(value = 0, message = "运费模板值不正确")
private String templateId;
@ApiModelProperty(value = "sku列表")
@Valid
private List<Map<String, Object>> skuList;
@ApiModelProperty(value = "卖点")
private String sellingPoint;
@ApiModelProperty(value = "销售模式", required = true)
private String salesModel;
@ApiModelProperty(value = "是否有规格", hidden = true)
private String haveSpec;
@ApiModelProperty(value = "销售模式", required = true)
private String goodsUnit;
@ApiModelProperty(value = "商品描述")
private String info;
@ApiModelProperty(value = "是否重新生成sku数据")
private Boolean regeneratorSkuFlag = true;
/**
* @see cn.lili.modules.goods.entity.enums.GoodsTypeEnum
*/
@ApiModelProperty(value = "商品类型")
@EnumValue(strValues = {"PHYSICAL_GOODS", "VIRTUAL_GOODS", "E_COUPON"}, message = "商品类型参数值错误")
private String goodsType;
/**
* 商品视频
*/
@ApiModelProperty(value = "商品视频")
private String goodsVideo;
public String getGoodsName() {
//对商品对名称做一个极限处理这里没有用xss过滤是因为xss过滤为全局过滤影响很大
// 业务中全局代码中只有商品名称不能拥有英文逗号是由于商品名称存在一个数据库联合查询结果要根据逗号分组
return goodsName.replace(",", "");
}
//福禄所需参数
@ApiModelProperty(value = "商品编号", required = true)
@Length(max = 30, message = "商品编号太长不能超过30个字符")
private String sn;
@ApiModelProperty(value = "市场价格", required = true)
@NotNull(message = "市场价格不能为空")
private Double cost;
@ApiModelProperty(value = "重量", required = true)
@NotNull(message = "商品重量不能为空")
@Min(value = 0, message = "重量不能为负数")
@Max(value = 99999999, message = "重量不能超过99999999")
private Double weight;
}

View File

@ -0,0 +1,20 @@
package cn.lili.modules.goods.service;
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletResponse;
public interface GoodsImportService {
/**
* 下载导入列表
* @param response
*/
void download(HttpServletResponse response);
/**
* 导入商品
*/
void importExcel(MultipartFile files) throws Exception;
}

View File

@ -2,6 +2,7 @@ package cn.lili.modules.goods.service;
import cn.lili.modules.goods.entity.dos.Goods;
import cn.lili.modules.goods.entity.dto.GoodsOperationDTO;
import cn.lili.modules.goods.entity.dto.GoodsOperationFuLuDTO;
import cn.lili.modules.goods.entity.dto.GoodsSearchParams;
import cn.lili.modules.goods.entity.enums.GoodsAuthEnum;
import cn.lili.modules.goods.entity.enums.GoodsStatusEnum;

View File

@ -0,0 +1,281 @@
package cn.lili.modules.goods.serviceimpl;
import cn.hutool.core.convert.Convert;
import cn.hutool.poi.excel.ExcelReader;
import cn.hutool.poi.excel.ExcelUtil;
import cn.lili.common.exception.ServiceException;
import cn.lili.modules.goods.entity.dos.Category;
import cn.lili.modules.goods.entity.dos.GoodsUnit;
import cn.lili.modules.goods.entity.dto.GoodsImportDTO;
import cn.lili.modules.goods.entity.dto.GoodsOperationDTO;
import cn.lili.modules.goods.entity.vos.CategoryVO;
import cn.lili.modules.goods.service.CategoryService;
import cn.lili.modules.goods.service.GoodsService;
import cn.lili.modules.goods.service.GoodsUnitService;
import cn.lili.modules.goods.service.GoodsImportService;
import cn.lili.modules.store.entity.vos.FreightTemplateVO;
import cn.lili.modules.store.service.FreightTemplateService;
import cn.lili.modules.store.service.StoreDetailService;
import lombok.extern.slf4j.Slf4j;
import org.apache.poi.hssf.usermodel.DVConstraint;
import org.apache.poi.hssf.usermodel.HSSFDataValidation;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.apache.poi.ss.usermodel.*;
import org.apache.poi.ss.util.CellRangeAddressList;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.InputStream;
import java.net.URLEncoder;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@Slf4j
@Service
public class GoodsImportServiceImpl implements GoodsImportService {
@Autowired
private FreightTemplateService freightTemplateService;
@Autowired
private StoreDetailService storeDetailService;
@Autowired
private CategoryService categoryService;
@Autowired
private GoodsUnitService goodsUnitService;
@Autowired
private GoodsService goodsService;
@Override
public void download(HttpServletResponse response) {
String storeId = "1376369067769724928";
// //Objects.requireNonNull(UserContext.getCurrentUser()).getStoreId();
//创建Excel工作薄对象
Workbook workbook = new HSSFWorkbook();
//生成一个表格 设置页签
Sheet sheet = workbook.createSheet("导入模板");
//创建第1行
Row row0 = sheet.createRow(0);
row0.createCell(0).setCellValue("商品名称");
row0.createCell(1).setCellValue("商品卖点");
row0.createCell(2).setCellValue("商品分类");
row0.createCell(3).setCellValue("运费模板");
row0.createCell(4).setCellValue("计量单位");
row0.createCell(5).setCellValue("发布状态");
row0.createCell(6).setCellValue("商品图片");
row0.createCell(7).setCellValue("成本价");
row0.createCell(8).setCellValue("销售价");
row0.createCell(9).setCellValue("库存");
row0.createCell(10).setCellValue("重量");
row0.createCell(11).setCellValue("货号");
row0.createCell(12).setCellValue("详情");
row0.createCell(13).setCellValue("规格项");
row0.createCell(14).setCellValue("规格值");
sheet.setColumnWidth(0, 7000);
sheet.setColumnWidth(1, 7000);
sheet.setColumnWidth(2, 7000);
sheet.setColumnWidth(3, 7000);
sheet.setColumnWidth(4, 7000);
sheet.setColumnWidth(5, 3000);
sheet.setColumnWidth(6, 7000);
sheet.setColumnWidth(7, 3000);
sheet.setColumnWidth(8, 3000);
sheet.setColumnWidth(9, 3000);
sheet.setColumnWidth(10, 3000);
sheet.setColumnWidth(11, 7000);
sheet.setColumnWidth(12, 7000);
sheet.setColumnWidth(13, 3000);
sheet.setColumnWidth(14, 3000);
String goodsManagementCategory = storeDetailService.getStoreDetail(storeId).getGoodsManagementCategory();
List<CategoryVO> categoryVOList = this.categoryService.getStoreCategory(goodsManagementCategory.split(","));
List<String> categoryNameList = new ArrayList<>();
//先简单写后期优化
//循环三次添加值
//循环列表存放ID-分类名称
for (CategoryVO categoryVO1 : categoryVOList) {
for (CategoryVO categoryVO2 : categoryVO1.getChildren()) {
for (CategoryVO categoryVO3 : categoryVO2.getChildren()) {
categoryNameList.add(categoryVO3.getId() + "-" + categoryVO3.getName());
}
}
}
List<String> freightTemplateNameList = new ArrayList<>();
//循环列表存放ID-运费模板名称
for (FreightTemplateVO freightTemplateVO : freightTemplateService.getFreightTemplateList(storeId)) {
freightTemplateNameList.add(freightTemplateVO.getId() + "-" + freightTemplateVO.getName());
}
//获取计量单位
List<String> goodsUnitList = new ArrayList<>();
List<GoodsUnit> goodsUnitListVO = goodsUnitService.list();
for (GoodsUnit goodsUnit : goodsUnitListVO) {
goodsUnitList.add(goodsUnit.getId() + "-" + goodsUnit.getName());
}
//添加分类
this.excelTo255(workbook, "hiddenCategoryVO", 1, categoryNameList.toArray(new String[]{}), 1, 5000, 2, 2);
//添加运费模板
this.excelTo255(workbook, "hiddenFreightTemplateVO", 2, freightTemplateNameList.toArray(new String[]{}), 1, 5000, 3, 3);
//添加计量单位
this.excelTo255(workbook, "hiddenGoodsUnit", 3, goodsUnitList.toArray(new String[]{}), 1, 5000, 4, 4);
//添加计量单位
this.excelTo255(workbook, "hiddenRelease", 4, new String[]{"上架", "仓库中"}, 1, 5000, 5, 5);
ServletOutputStream out = null;
try {
//设置公共属性列表名称
response.setContentType("application/vnd.ms-excel;charset=utf-8");
response.setHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode("下载商品导入模板", "UTF8") + ".xls");
out = response.getOutputStream();
workbook.write(out);
} catch (Exception e) {
log.error("下载商品导入模板错误", e);
} finally {
try {
out.close();
} catch (IOException e) {
e.printStackTrace();
}
}
}
@Override
public void importExcel(MultipartFile files) throws Exception {
InputStream inputStream;
List<GoodsImportDTO> goodsImportDTOList = new ArrayList<>();
inputStream = files.getInputStream();
ExcelReader excelReader = ExcelUtil.getReader(inputStream);
// 读取列表
// 检测数据-查看分类模板计量单位是否存在
List<List<Object>> read = excelReader.read(1, excelReader.getRowCount());
for (List<Object> objects : read) {
GoodsImportDTO goodsImportDTO = new GoodsImportDTO();
String categoryId = objects.get(2).toString().substring(0, objects.get(2).toString().indexOf("-"));
Category category = categoryService.getCategoryById(categoryId);
if (category == null) {
throw new ServiceException("商品分类不存在:" + objects.get(2).toString().substring(objects.get(2).toString().indexOf("-")));
}
String templateId = objects.get(3).toString().substring(0, objects.get(3).toString().indexOf("-"));
FreightTemplateVO freightTemplateVO = freightTemplateService.getFreightTemplate(templateId);
if (freightTemplateVO == null) {
throw new ServiceException("配送模板不存在:" + objects.get(3).toString().substring(objects.get(3).toString().indexOf("-")));
}
goodsImportDTO.setGoodsName(objects.get(0).toString());
goodsImportDTO.setSellingPoint(objects.get(1).toString());
goodsImportDTO.setCategory(category);
goodsImportDTO.setTemplate(templateId);
goodsImportDTO.setGoodsUnit(objects.get(4).toString().substring(objects.get(4).toString().indexOf("-") + 1));
goodsImportDTO.setRelease(objects.get(5).toString().equals("上架") ? true : false);
List<Map<String, String>> images = new ArrayList<>();
List<String> goodsGalleryList = new ArrayList<>();
Map<String, String> map = new HashMap<>();
map.put("url", objects.get(6).toString());
images.add(map);
goodsGalleryList.add(objects.get(6).toString());
goodsImportDTO.setImages(images);
goodsImportDTO.setGoodsGalleryList(goodsGalleryList);
goodsImportDTO.setCost(Convert.toDouble(objects.get(7)));
goodsImportDTO.setPrice(Convert.toDouble(objects.get(8)));
goodsImportDTO.setQuantity(Convert.toInt(objects.get(9)));
goodsImportDTO.setWeight(Convert.toDouble(objects.get(10)));
goodsImportDTO.setSn(objects.get(11).toString());
goodsImportDTO.setIntro("<p>" + objects.get(12).toString() + "</p>");
goodsImportDTO.setSkuKey(objects.get(13).toString());
goodsImportDTO.setSkuValue(objects.get(14).toString());
goodsImportDTOList.add(goodsImportDTO);
}
//添加商品
addGoodsList(goodsImportDTOList);
}
/**
* 添加商品
*
* @param goodsImportDTOList
*/
private void addGoodsList(List<GoodsImportDTO> goodsImportDTOList) {
for (GoodsImportDTO goodsImportDTO : goodsImportDTOList) {
GoodsOperationDTO goodsOperationDTO = new GoodsOperationDTO(goodsImportDTO);
//获取父
Category parentCategory = categoryService.getCategoryById(goodsImportDTO.getCategory().getParentId());
goodsOperationDTO.setCategoryPath(parentCategory.getParentId() + "," + parentCategory.getId() + "," + goodsImportDTO.getCategory().getParentId());
//添加商品
goodsService.addGoods(goodsOperationDTO);
}
}
/**
* 表格
*
* @param workbook 表格
* @param sheetName sheet名称
* @param sheetNameIndex 开始
* @param sheetData 数据
* @param firstRow 开始行
* @param lastRow 结束行
* @param firstCol 开始列
* @param lastCol 结束列
*/
private void excelTo255(Workbook workbook, String sheetName, int sheetNameIndex, String[] sheetData,
int firstRow, int lastRow, int firstCol, int lastCol) {
//将下拉框数据放到新的sheet里然后excle通过新的sheet数据加载下拉框数据
Sheet hidden = workbook.createSheet(sheetName);
//创建单元格对象
Cell cell = null;
//遍历我们上面的数组将数据取出来放到新sheet的单元格中
for (int i = 0, length = sheetData.length; i < length; i++) {
//取出数组中的每个元素
String name = sheetData[i];
//根据i创建相应的行对象说明我们将会把每个元素单独放一行
Row row = hidden.createRow(i);
//创建每一行中的第一个单元格
cell = row.createCell(0);
//然后将数组中的元素赋值给这个单元格
cell.setCellValue(name);
}
// 创建名称可被其他单元格引用
Name namedCell = workbook.createName();
namedCell.setNameName(sheetName);
// 设置名称引用的公式
namedCell.setRefersToFormula(sheetName + "!$A$1:$A$" + sheetData.length);
//加载数据,将名称为hidden的sheet中的数据转换为List形式
DVConstraint constraint = DVConstraint.createFormulaListConstraint(sheetName);
// 设置第一列的3-65534行为下拉列表
// (3, 65534, 2, 2) ====> (起始行,结束行,起始列,结束列)
CellRangeAddressList regions = new CellRangeAddressList(firstRow, lastRow, firstCol, lastCol);
// 将设置下拉选的位置和数据的对应关系 绑定到一起
DataValidation dataValidation = new HSSFDataValidation(regions, constraint);
//将第二个sheet设置为隐藏
workbook.setSheetHidden(sheetNameIndex, true);
//将数据赋给下拉列表
workbook.getSheetAt(0).addValidationData(dataValidation);
}
}

View File

@ -18,6 +18,7 @@ import cn.lili.modules.goods.entity.dos.Goods;
import cn.lili.modules.goods.entity.dos.GoodsGallery;
import cn.lili.modules.goods.entity.dos.Wholesale;
import cn.lili.modules.goods.entity.dto.GoodsOperationDTO;
import cn.lili.modules.goods.entity.dto.GoodsOperationFuLuDTO;
import cn.lili.modules.goods.entity.dto.GoodsParamsDTO;
import cn.lili.modules.goods.entity.dto.GoodsSearchParams;
import cn.lili.modules.goods.entity.enums.GoodsAuthEnum;
@ -170,7 +171,9 @@ public class GoodsServiceImpl extends ServiceImpl<GoodsMapper, Goods> implements
//检查商品
this.checkGoods(goods);
//向goods加入图片
if (goodsOperationDTO.getGoodsGalleryList().size() > 0 ) {
this.setGoodsGalleryParam(goodsOperationDTO.getGoodsGalleryList().get(0), goods);
}
//添加商品参数
if (goodsOperationDTO.getGoodsParamsDTOList() != null && !goodsOperationDTO.getGoodsParamsDTOList().isEmpty()) {
//给商品参数填充值
@ -188,6 +191,7 @@ public class GoodsServiceImpl extends ServiceImpl<GoodsMapper, Goods> implements
}
@Override
@Transactional(rollbackFor = Exception.class)
public void editGoods(GoodsOperationDTO goodsOperationDTO, String goodsId) {
@ -216,6 +220,7 @@ public class GoodsServiceImpl extends ServiceImpl<GoodsMapper, Goods> implements
this.generateEs(goods);
}
@Override
public GoodsVO getGoodsVO(String goodsId) {
//缓存获取如果没有则读取缓存

View File

@ -0,0 +1,17 @@
package cn.lili.modules.kdBrid.service;
/**
* 快递鸟电子面单业务层实现
*
* @author chc
* @since 2022-4-12 10:12:43
*/
public interface KdNiaoService {
/**
* 生成电子面单
* @param orderSn 订单编号
* @param logisticsId 物流公司
* @return 电子面单模板
*/
String createElectronicsFaceSheet(String orderSn, String logisticsId) throws Exception;
}

View File

@ -0,0 +1,383 @@
package cn.lili.modules.kdBrid.serviceImpl;
import cn.hutool.core.text.CharSequenceUtil;
import cn.lili.common.enums.ResultCode;
import cn.lili.common.exception.ServiceException;
import cn.lili.common.security.OperationalJudgment;
import cn.lili.modules.kdBrid.service.KdNiaoService;
import cn.lili.modules.member.service.StoreLogisticsService;
import cn.lili.modules.order.order.aop.OrderLogPoint;
import cn.lili.modules.order.order.entity.dos.Order;
import cn.lili.modules.order.order.entity.dos.OrderItem;
import cn.lili.modules.order.order.entity.enums.DeliverStatusEnum;
import cn.lili.modules.order.order.entity.enums.OrderStatusEnum;
import cn.lili.modules.order.order.service.OrderItemService;
import cn.lili.modules.order.order.service.OrderService;
import cn.lili.modules.store.entity.dos.StoreLogistics;
import cn.lili.modules.store.entity.dto.StoreDeliverGoodsAddressDTO;
import cn.lili.modules.store.service.StoreDetailService;
import cn.lili.modules.system.entity.dos.Logistics;
import cn.lili.modules.system.entity.dos.Setting;
import cn.lili.modules.system.entity.dto.KuaidiSetting;
import cn.lili.modules.system.entity.enums.SettingEnum;
import cn.lili.modules.system.service.LogisticsService;
import cn.lili.modules.system.service.SettingService;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.google.gson.Gson;
import groovy.util.logging.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.io.*;
import java.net.HttpURLConnection;
import java.net.URL;
import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
import java.security.MessageDigest;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* 快递鸟电子面单业务层实现
*
* @author chc
* @since 2022-4-12 10:12:43
*/
@Service
@Slf4j
public class KdNiaoServiceImpl implements KdNiaoService {
/**
* 订单货物
*/
@Autowired
OrderItemService orderItemService;
/**
* 订单
*/
@Autowired
OrderService orderService;
/**
* 物流公司
*/
@Autowired
LogisticsService logisticsService;
/**
* 商家店铺
*/
@Autowired
StoreDetailService storeDetailService;
/**
* 配置
*/
@Autowired
SettingService settingService;
/**
* 店铺-物流
*/
@Autowired
StoreLogisticsService storeLogisticsService;
@Override
@OrderLogPoint(description = "'订单['+#orderSn+']发货,发货单号['+#logisticsNo+'],已打印电子面单'", orderSn = "#orderSn")
@Transactional(rollbackFor = Exception.class)
public String createElectronicsFaceSheet(String orderSn, String logisticsId) throws Exception {
//电子面单模板
String printTemplate = null;
//获取订单及子订单
Order order = OperationalJudgment.judgment(orderService.getBySn(orderSn));
List<OrderItem> orderItems = orderItemService.getByOrderSn(orderSn);
Setting setting = settingService.get(SettingEnum.KUAIDI_SETTING.name());
if (CharSequenceUtil.isBlank(setting.getSettingValue())) {
throw new ServiceException(ResultCode.LOGISTICS_NOT_SETTING);
}
KuaidiSetting kuaidiSetting = new Gson().fromJson(setting.getSettingValue(), KuaidiSetting.class);
//ID
String EBusinessID = kuaidiSetting.getEbusinessID();
//KEY
String AppKey = kuaidiSetting.getAppKey();
//请求url
String ReqURL = kuaidiSetting.getSheetReqURL();
//如果订单未发货并且订单状态值等于待发货
if (order.getDeliverStatus().equals(DeliverStatusEnum.UNDELIVERED.name()) && order.getOrderStatus().equals(OrderStatusEnum.UNDELIVERED.name())) {
//获取对应物流
Logistics logistics = logisticsService.getById(logisticsId);
//物流为空,抛出异常
if (logistics == null) {
throw new ServiceException(ResultCode.ORDER_LOGISTICS_ERROR);
}
//获取店家的物流信息
LambdaQueryWrapper<StoreLogistics> lambdaQueryWrapper = Wrappers.lambdaQuery();
lambdaQueryWrapper.eq(StoreLogistics::getLogisticsId, logisticsId);
lambdaQueryWrapper.eq(StoreLogistics::getStoreId, order.getStoreId());
StoreLogistics storeLogistics = storeLogisticsService.getOne(lambdaQueryWrapper);
//获取店家信息
StoreDeliverGoodsAddressDTO storeDeliverGoodsAddressDTO = storeDetailService.getStoreDeliverGoodsAddressDto(order.getStoreId());
//收件人地址
String[] ConsigneeAddress = order.getConsigneeAddressPath().split(",");
//发件人地址
String[] consignorAddress = storeDeliverGoodsAddressDTO.getSalesConsignorAddressPath().split(",");
//组装快递鸟应用级参数
String resultDate = "{" +
"'OrderCode': '" + orderSn + "'," + //订单编码
"'ShipperCode': '" + logistics.getCode() + "'," + //快递公司编码
"'CustomerName': '"+storeLogistics.getCustomerName()+"'," +//客户编码
"'CustomerPwd': '"+storeLogistics.getCustomerPwd()+"'," + //客户密码
"'MonthCode': '"+storeLogistics.getMonthCode()+"'," + //密钥
"'SendSite': '"+storeLogistics.getSendSite()+"'," + //归属网点
"'SendStaff': '"+storeLogistics.getSendStaff()+"'," + //收件快递员
"'PayType': "+storeLogistics.getPayType()+"," +
"'ExpType': "+storeLogistics.getExpType()+"," +
//发件人信息
"'Sender': {" +
"'Name': '" + storeDeliverGoodsAddressDTO.getSalesConsignorName() + "'," +
"'Mobile': '" + storeDeliverGoodsAddressDTO.getSalesConsignorMobile() + "'," +
"'ProvinceName': '" + consignorAddress[0] + "'," + //
"'CityName': '" + consignorAddress[1] + "'," + //
"'ExpAreaName': '" + consignorAddress[2] + "'," + //
"'Address': '" + storeDeliverGoodsAddressDTO.getSalesConsignorDetail() + "'" + //发件人详细地址
"}," +
//收件人信息
"'Receiver': {" +
"'Name': '" + order.getConsigneeName() + "'," +
"'Mobile': '" + order.getConsigneeMobile() + "'," +
"'ProvinceName': '" + ConsigneeAddress[0] + "'," + //
"'CityName': '" + ConsigneeAddress[1] + "'," + //
"'ExpAreaName': '" + ConsigneeAddress[2] + "'," + //
"'Address': '" + order.getConsigneeDetail() + "'" + //收件人详细地址
"}," +
//商品信息
"'Commodity': [";
//子订单信息
for (OrderItem orderItem : orderItems) {
resultDate = resultDate + "{" +
"'GoodsName': '" + orderItem.getGoodsName() + "'," +
"'Goodsquantity': '" + orderItem.getNum() + "'" +
"},";
}
resultDate = resultDate + "]," +
"'Quantity': "+orderItems.size()+"," + //包裹数
"'IsReturnPrintTemplate':1,"+ //生成电子面单模板
"'Remark': '" + order.getRemark() + "'"+//商家备注
"}";
//组织系统级参数
Map<String, String> params = new HashMap<>();
//进行格式加密
params.put("RequestData", urlEncoder(resultDate, "UTF-8"));
params.put("EBusinessID", EBusinessID);
params.put("RequestType", "1007");
String dataSign = encrypt(resultDate, AppKey, "UTF-8");
params.put("DataSign", dataSign);
params.put("DataType", "2");
// 以form表单形式提交post请求post请求体中包含了应用级参数和系统级参数
String result = sendPost(ReqURL, params);
//根据公司业务处理返回的信息......
JSONObject obj = JSONObject.parseObject(result);
if(!"100".equals(obj.getString("ResultCode"))){
return obj.getString("Reason");
}
JSONObject orderJson = JSONObject.parseObject(obj.getString("Order"));
//电子面单模板
printTemplate = obj.getString("PrintTemplate");
//进行发货
orderService.delivery(orderSn, orderJson.getString("LogisticCode"), logisticsId);
}
return printTemplate;
}
/**
* MD5加密
*
* @param str 内容
* @param charset 编码方式
* @throws Exception
*/
@SuppressWarnings("unused")
private String MD5(String str, String charset) throws Exception {
MessageDigest md = MessageDigest.getInstance("MD5");
md.update(str.getBytes(charset));
byte[] result = md.digest();
StringBuffer sb = new StringBuffer(32);
for (int i = 0; i < result.length; i++) {
int val = result[i] & 0xff;
if (val <= 0xf) {
sb.append("0");
}
sb.append(Integer.toHexString(val));
}
return sb.toString().toLowerCase();
}
/**
* base64编码
*
* @param str 内容
* @param charset 编码方式di
* @throws UnsupportedEncodingException
*/
private String base64(String str, String charset) throws UnsupportedEncodingException {
return base64Encode(str.getBytes(charset));
}
@SuppressWarnings("unused")
private String urlEncoder(String str, String charset) throws UnsupportedEncodingException {
return URLEncoder.encode(str, charset);
}
/**
* 电商Sign签名生成
*
* @param content 内容
* @param keyValue Appkey
* @param charset 编码方式
* @return DataSign签名
* @throws UnsupportedEncodingException ,Exception
*/
@SuppressWarnings("unused")
private String encrypt(String content, String keyValue, String charset) throws Exception {
if (keyValue != null) {
return base64(MD5(content + keyValue, charset), charset);
}
return base64(MD5(content, charset), charset);
}
/**
* 向指定 URL 发送POST方法的请求
*
* @param url 发送请求的 URL
* @param params 请求的参数集合
* @return 远程资源的响应结果
*/
@SuppressWarnings("unused")
private String sendPost(String url, Map<String, String> params) {
OutputStreamWriter out = null;
BufferedReader in = null;
StringBuilder result = new StringBuilder();
try {
URL realUrl = new URL(url);
HttpURLConnection conn = (HttpURLConnection) realUrl.openConnection();
//发送POST请求必须设置如下两行
conn.setDoOutput(true);
conn.setDoInput(true);
//POST方法
conn.setRequestMethod("POST");
//设置通用的请求属性
conn.setRequestProperty("accept", "*/*");
conn.setRequestProperty("connection", "Keep-Alive");
conn.setRequestProperty("user-agent",
"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1;SV1)");
conn.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
conn.connect();
//获取URLConnection对象对应的输出流
out = new OutputStreamWriter(conn.getOutputStream(), StandardCharsets.UTF_8);
//发送请求参数
if (params != null) {
StringBuilder param = new StringBuilder();
for (Map.Entry<String, String> entry : params.entrySet()) {
if (param.length() > 0) {
param.append("&");
}
param.append(entry.getKey());
param.append("=");
param.append(entry.getValue());
}
out.write(param.toString());
}
//flush输出流的缓冲
out.flush();
//定义BufferedReader输入流来读取URL的响应
in = new BufferedReader(
new InputStreamReader(conn.getInputStream(), StandardCharsets.UTF_8));
String line;
while ((line = in.readLine()) != null) {
result.append(line);
}
} catch (Exception e) {
e.printStackTrace();
}
//使用finally块来关闭输出流输入流
finally {
try {
if (out != null) {
out.close();
}
if (in != null) {
in.close();
}
} catch (IOException ex) {
ex.printStackTrace();
}
}
return result.toString();
}
private static final char[] BASE64_ENCODE_CHARS = new char[]{
'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H',
'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P',
'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X',
'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f',
'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n',
'o', 'p', 'q', 'r', 's', 't', 'u', 'v',
'w', 'x', 'y', 'z', '0', '1', '2', '3',
'4', '5', '6', '7', '8', '9', '+', '/'};
public static String base64Encode(byte[] data) {
StringBuffer sb = new StringBuffer();
int len = data.length;
int i = 0;
int b1, b2, b3;
while (i < len) {
b1 = data[i++] & 0xff;
if (i == len) {
sb.append(BASE64_ENCODE_CHARS[b1 >>> 2]);
sb.append(BASE64_ENCODE_CHARS[(b1 & 0x3) << 4]);
sb.append("==");
break;
}
b2 = data[i++] & 0xff;
if (i == len) {
sb.append(BASE64_ENCODE_CHARS[b1 >>> 2]);
sb.append(BASE64_ENCODE_CHARS[((b1 & 0x03) << 4) | ((b2 & 0xf0) >>> 4)]);
sb.append(BASE64_ENCODE_CHARS[(b2 & 0x0f) << 2]);
sb.append("=");
break;
}
b3 = data[i++] & 0xff;
sb.append(BASE64_ENCODE_CHARS[b1 >>> 2]);
sb.append(BASE64_ENCODE_CHARS[((b1 & 0x03) << 4) | ((b2 & 0xf0) >>> 4)]);
sb.append(BASE64_ENCODE_CHARS[((b2 & 0x0f) << 2) | ((b3 & 0xc0) >>> 6)]);
sb.append(BASE64_ENCODE_CHARS[b3 & 0x3f]);
}
return sb.toString();
}
}

View File

@ -0,0 +1,81 @@
package cn.lili.modules.member.entity.dos;
import cn.hutool.core.text.CharSequenceUtil;
import cn.lili.modules.member.entity.dto.ClerkAddDTO;
import cn.lili.modules.store.entity.dos.Store;
import cn.lili.mybatis.BaseEntity;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* 店员Model
*
* @author wget
* @title: Clerk
* @projectName lilishop
* @date 2021/12/28 7:39 下午
*/
@Data
@TableName("li_clerk")
@ApiModel(value = "店员")
@NoArgsConstructor
@AllArgsConstructor
public class Clerk extends BaseEntity {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "店员名称")
private String clerkName;
@ApiModelProperty(value = "会员ID")
private String memberId;
@ApiModelProperty(value = "店铺ID")
private String storeId;
@ApiModelProperty(value = "所属部门id")
private String departmentId;
@ApiModelProperty(value = "角色id集合")
private String roleIds;
@ApiModelProperty(value = "是否是店主", hidden = true)
private Boolean shopkeeper = false;
@ApiModelProperty(value = "是否是超级管理员 超级管理员/普通管理员")
private Boolean isSuper = false;
@ApiModelProperty(value = "状态 默认true正常 false禁用")
private Boolean status = true;
/**
* 构建店员
*
* @param clerkAddDTO
*/
public Clerk(ClerkAddDTO clerkAddDTO) {
if (clerkAddDTO.getRoles()!=null && !clerkAddDTO.getRoles().isEmpty()) {
this.roleIds = CharSequenceUtil.join(",", clerkAddDTO.getRoles());
}
this.memberId = clerkAddDTO.getMemberId();
this.departmentId = clerkAddDTO.getDepartmentId();
this.storeId = clerkAddDTO.getStoreId();
this.clerkName = clerkAddDTO.getUsername();
}
public Clerk(Store store){
this.memberId = store.getMemberId();
this.storeId = store.getId();
this.clerkName = store.getMemberName();
this.setShopkeeper(true);
this.setIsSuper(true);
this.setStatus(true);
}
}

View File

@ -0,0 +1,36 @@
package cn.lili.modules.member.entity.dos;
import cn.lili.mybatis.BaseIdEntity;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* 用户角色
*
* @author Chopper
* @since 2020/11/19 12:18
*/
@Data
@TableName("li_clerk_role")
@ApiModel(value = "用户角色")
@Builder
@NoArgsConstructor
public class StoreClerkRole extends BaseIdEntity {
@ApiModelProperty(value = "店员唯一id")
private String clerkId;
@ApiModelProperty(value = "角色唯一id")
private String roleId;
public StoreClerkRole(String clerkId, String roleId) {
this.clerkId = clerkId;
this.roleId = roleId;
}
}

View File

@ -0,0 +1,37 @@
package cn.lili.modules.member.entity.dos;
import cn.lili.mybatis.BaseEntity;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotEmpty;
/**
* 部门
*
* @author Chopper
* @since 2020/11/19 11:57
*/
@Data
@TableName("li_store_department")
@ApiModel(value = "店铺部门")
public class StoreDepartment extends BaseEntity {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "店铺id", hidden = true)
private String storeId;
@ApiModelProperty(value = "部门名称")
@NotEmpty(message = "部门名称不能为空")
private String title;
@ApiModelProperty(value = "父id")
@NotEmpty(message = "父id不能为空")
private String parentId;
@ApiModelProperty(value = "排序值")
private Double sortOrder;
}

View File

@ -0,0 +1,34 @@
package cn.lili.modules.member.entity.dos;
import cn.lili.mybatis.BaseEntity;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* 角色部门绑定关系
*
* @author Chopper
* @since 2020/11/19 12:18
*/
@Data
@TableName("li_store_department_role")
@ApiModel(value = "店铺角色部门")
@NoArgsConstructor
@AllArgsConstructor
public class StoreDepartmentRole extends BaseEntity {
private static final long serialVersionUID = 2342812932116647050L;
@ApiModelProperty(value = "角色id")
private String roleId;
@ApiModelProperty(value = "部门id")
private String departmentId;
}

View File

@ -0,0 +1,48 @@
package cn.lili.modules.member.entity.dos;
import cn.lili.mybatis.BaseEntity;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* 菜单权限
*
* @author Chopper
* @since 2020/11/19 12:12
*/
@Data
@TableName("li_store_menu")
@ApiModel(value = "店铺菜单权限")
public class StoreMenu extends BaseEntity {
private static final long serialVersionUID = 7050744476203495207L;
@ApiModelProperty(value = "菜单标题")
private String title;
@ApiModelProperty(value = "路由名称")
private String name;
@ApiModelProperty(value = "路径")
private String path;
@ApiModelProperty(value = "菜单层级")
private Integer level;
@ApiModelProperty(value = "前端目录文件")
private String frontRoute;
@ApiModelProperty(value = "父id")
private String parentId = "0";
@ApiModelProperty(value = "排序值")
private Double sortOrder;
@ApiModelProperty(value = "权限URL*号模糊匹配,逗号分割")
private String permission;
}

View File

@ -0,0 +1,35 @@
package cn.lili.modules.member.entity.dos;
import cn.lili.mybatis.BaseEntity;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* 角色权限绑定关系
*
* @author Chopper
* @since 2020/11/19 12:18
*/
@Data
@TableName("li_store_menu_role")
@ApiModel(value = "店铺角色权限")
public class StoreMenuRole extends BaseEntity {
private static final long serialVersionUID = -4680260092546996026L;
@ApiModelProperty(value = "角色id")
private String roleId;
@ApiModelProperty(value = "菜单")
private String menuId;
@ApiModelProperty(value = "店铺id")
private String storeId;
@ApiModelProperty(value = "是否拥有操作数据权限,为否则只有查看权限")
private Boolean isSuper;
}

View File

@ -0,0 +1,36 @@
package cn.lili.modules.member.entity.dos;
import cn.lili.mybatis.BaseEntity;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
/**
* 部门
*
* @author Chopper
* @since 2020/11/19 11:57
*/
@Data
@TableName("li_store_role")
@ApiModel(value = "店铺角色")
public class StoreRole extends BaseEntity {
@ApiModelProperty(value = "角色名")
@NotEmpty(message = "角色名称必填")
private String name;
@ApiModelProperty(value = "店铺id", hidden = true)
private String storeId;
@ApiModelProperty(value = "是否为注册默认角色")
private Boolean defaultRole = false;
@ApiModelProperty(value = "备注")
private String description;
}

View File

@ -0,0 +1,64 @@
package cn.lili.modules.member.entity.dto;
import cn.lili.common.security.sensitive.Sensitive;
import cn.lili.common.security.sensitive.enums.SensitiveStrategy;
import cn.lili.mybatis.BaseEntity;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Size;
import java.util.List;
/**
* 店员dto
*
* @author wget
* @title: Clerk
* @projectName lilishop
* @date 2021/12/28 7:39 下午
*/
@Data
@NoArgsConstructor
public class ClerkAddDTO {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "会员用户名")
@NotEmpty(message = "会员用户名不能为空")
@Length(max = 30, message = "会员用户名不能超过20个字符")
private String username;
@ApiModelProperty(value = "会员密码")
@NotEmpty(message = "会员密码不能为空")
private String password;
@NotEmpty(message = "手机号码不能为空")
@ApiModelProperty(value = "手机号码", required = true)
@Sensitive(strategy = SensitiveStrategy.PHONE)
private String mobile;
@ApiModelProperty(value = "所属部门id")
private String departmentId;
@ApiModelProperty(value = "是否是超级管理员 超级管理员/普通管理员")
private Boolean isSuper = false;
@ApiModelProperty(value = "角色")
private List<String> roles;
@ApiModelProperty(value = "会员id", required = true)
private String memberId;
@ApiModelProperty(value = "是否是店主", hidden = true)
private Boolean shopkeeper = false;
@ApiModelProperty(value = "店铺id", hidden = true)
private String storeId;
}

View File

@ -0,0 +1,46 @@
package cn.lili.modules.member.entity.dto;
import cn.lili.common.security.sensitive.Sensitive;
import cn.lili.common.security.sensitive.enums.SensitiveStrategy;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.NotEmpty;
import java.util.List;
/**
* 店员dto
*
* @author wget
* @title: Clerk
* @projectName lilishop
* @date 2021/12/28 7:39 下午
*/
@Data
@NoArgsConstructor
public class ClerkEditDTO {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "店员id", hidden = true)
private String id;
@ApiModelProperty(value = "会员密码")
private String password;
@ApiModelProperty(value = "状态")
private Boolean status;
@ApiModelProperty(value = "所属部门id")
private String departmentId;
@ApiModelProperty(value = "是否是超级管理员 超级管理员/普通管理员")
private Boolean isSuper = false;
@ApiModelProperty(value = "角色")
private List<String> roles;
}

View File

@ -0,0 +1,48 @@
package cn.lili.modules.member.entity.dto;
import cn.lili.mybatis.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
/**
* 管理员入库dto
*
* @author Chopper
* @since 2020/11/16 19:55
*/
@Data
@ApiModel(value = "店员操作dto")
public class ClerkOperationDTO extends BaseEntity {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "用户名")
@Length(max = 20,message = "用户名长度不能超过20个字符")
private String username;
@ApiModelProperty(value = "密码")
private String password;
@ApiModelProperty(value = "昵称")
@Length(max = 10,message = "昵称长度不能超过10个字符")
private String nickName;
@ApiModelProperty(value = "手机")
@Length(max = 11,message = "手机号长度不能超过11")
private String mobile;
@ApiModelProperty(value = "头像")
private String avatar;
@ApiModelProperty(value = "描述/详情/备注")
private String description;
@ApiModelProperty(value = "所属部门id")
private String departmentId;
@ApiModelProperty(value = "是否为超级管理员")
private Boolean isSuper;
}

View File

@ -0,0 +1,41 @@
package cn.lili.modules.member.entity.dto;
import cn.lili.mybatis.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
/**
* 店员查询
*
* @author Chopper
* @since 2020/11/16 19:55
*/
@Data
@ApiModel(value = "店员查询")
public class ClerkQueryDTO extends BaseEntity {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "店员名称")
@Length(max = 20, message = "用户名长度不能超过20个字符")
private String clerkName;
@ApiModelProperty(value = "手机")
@Length(max = 11, message = "手机号长度不能超过11")
private String mobile;
@ApiModelProperty(value = "所属部门id")
private String departmentId;
@ApiModelProperty(value = "是否为超级管理员")
private Boolean isSuper;
@ApiModelProperty(value = "状态")
private Boolean status;
@ApiModelProperty(value = "店铺id", hidden = true)
private String storeId;
}

View File

@ -24,6 +24,10 @@ public class ManagerMemberEditDTO {
@NotNull(message = "用户ID不能为空")
private String id;
@ApiModelProperty(value = "会员用户名,用户名不能进行修改", required = true)
@NotNull(message = "会员用户名不能为空")
private String username;
@ApiModelProperty(value = "会员密码")
private String password;

View File

@ -0,0 +1,44 @@
package cn.lili.modules.member.entity.vo;
import cn.lili.common.utils.BeanUtil;
import cn.lili.modules.member.entity.dos.Clerk;
import cn.lili.modules.member.entity.dos.StoreMenu;
import cn.lili.modules.member.entity.dos.StoreRole;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.List;
/**
* 管理员VO
*
* @author Chopper
* @since 2020-11-22 09:17
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
public class ClerkVO extends Clerk {
private static final long serialVersionUID = -2378384199695839312L;
@ApiModelProperty(value = "手机号")
private String mobile;
@ApiModelProperty(value = "所属部门名称")
private String departmentTitle;
@ApiModelProperty(value = "用户拥有角色")
private List<StoreRole> roles;
@ApiModelProperty(value = "用户拥有的权限")
private List<StoreMenu> menus;
public ClerkVO(Clerk clerk) {
BeanUtil.copyProperties(clerk, this);
}
}

View File

@ -28,11 +28,11 @@ public class MemberVO implements Serializable {
private String id;
@ApiModelProperty(value = "会员用户名")
@Sensitive(strategy = SensitiveStrategy.PHONE)
@Sensitive(strategy = SensitiveStrategy.USERNAME)
private String username;
@ApiModelProperty(value = "昵称")
@Sensitive(strategy = SensitiveStrategy.PHONE)
private String nickName;
@ApiModelProperty(value = "会员性别,1为男0为女")

View File

@ -0,0 +1,28 @@
package cn.lili.modules.member.entity.vo;
import cn.lili.common.utils.BeanUtil;
import cn.lili.modules.member.entity.dos.StoreDepartment;
import cn.lili.modules.permission.entity.dos.Department;
import lombok.Data;
import java.util.ArrayList;
import java.util.List;
/**
* 部门VO
*
* @author Chopper
* @since 2020-11-23 18:48
*/
@Data
public class StoreDepartmentVO extends StoreDepartment {
private List<StoreDepartmentVO> children = new ArrayList<>();
public StoreDepartmentVO() {
}
public StoreDepartmentVO(StoreDepartment storeDepartment) {
BeanUtil.copyProperties(storeDepartment, this);
}
}

View File

@ -0,0 +1,45 @@
package cn.lili.modules.member.entity.vo;
import cn.lili.common.utils.BeanUtil;
import cn.lili.modules.member.entity.dos.StoreMenu;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.ArrayList;
import java.util.Comparator;
import java.util.List;
/**
* 菜单VO 展示模型
*
* @author Chopper
* @since 2020/11/20 15:38
*/
@Data
public class StoreMenuVO extends StoreMenu {
@ApiModelProperty(value = "子菜单")
private List<StoreMenuVO> children = new ArrayList<>();
public StoreMenuVO() {
}
public StoreMenuVO(StoreMenu storeMenu) {
BeanUtil.copyProperties(storeMenu, this);
}
public List<StoreMenuVO> getChildren() {
if (children != null) {
children.sort(new Comparator<StoreMenuVO>() {
@Override
public int compare(StoreMenuVO o1, StoreMenuVO o2) {
return o1.getSortOrder().compareTo(o2.getSortOrder());
}
});
return children;
}
return null;
}
}

View File

@ -0,0 +1,29 @@
package cn.lili.modules.member.entity.vo;
import cn.lili.modules.member.entity.dos.StoreMenu;
import cn.lili.modules.permission.entity.dos.Menu;
import lombok.Data;
/**
* RoleMenuVO
*
* @author Chopper
* @since 2020-11-24 11:45
*/
@Data
public class StoreUserMenuVO extends StoreMenu {
private static final long serialVersionUID = -7478870595109016162L;
/**
* 是否是超级管理员
*/
private Boolean isSuper;
public Boolean getSuper() {
if (this.isSuper == null) {
return false;
}
return isSuper;
}
}

View File

@ -0,0 +1,34 @@
package cn.lili.modules.member.mapper;
import cn.lili.modules.member.entity.dos.Clerk;
import cn.lili.modules.member.entity.vo.ClerkVO;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
/**
* 店员数据处理层
*
* @author wget
* @title: ClerkMapper
* @projectName lilishop
* @date 2021/12/28 7:39 下午
*/
public interface ClerkMapper extends BaseMapper<Clerk> {
/**
* 查询店员分页数据
* @param page 分页信息
* @param ew 店铺ID
* @return
*/
@Select("select li_clerk.*,m.id,m.mobile as mobile from li_clerk inner join li_member as m on li_clerk.member_id = m.id ${ew.customSqlSegment}")
IPage<ClerkVO> selectClerkPage(Page page, @Param(Constants.WRAPPER) QueryWrapper ew);
}

View File

@ -23,7 +23,8 @@ public interface FootprintMapper extends BaseMapper<FootPrint> {
*
* @param memberId 会员ID
*/
@Delete("DELETE FROM li_foot_print l1 WHERE l1.id IN (" +
@Delete("DELETE FROM li_foot_print WHERE id IN ("+
"SELECT l2.id FROM (" +
"SELECT l3.id FROM li_foot_print l3 WHERE l3.member_id=${memberId} ORDER BY id DESC LIMIT 100,100) l2)")
void deleteLastFootPrint(String memberId);

View File

@ -0,0 +1,13 @@
package cn.lili.modules.member.mapper;
import cn.lili.modules.member.entity.dos.StoreClerkRole;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* 角色权限数据处理层
* @author Chopper
* @since 2020-11-22 09:17
*/
public interface StoreClerkRoleMapper extends BaseMapper<StoreClerkRole> {
}

View File

@ -0,0 +1,14 @@
package cn.lili.modules.member.mapper;
import cn.lili.modules.member.entity.dos.StoreDepartment;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* 部门数据处理层
*
* @author Chopper
* @since 2020-11-22 09:17
*/
public interface StoreDepartmentMapper extends BaseMapper<StoreDepartment> {
}

View File

@ -0,0 +1,14 @@
package cn.lili.modules.member.mapper;
import cn.lili.modules.member.entity.dos.StoreDepartmentRole;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* 店铺部门角色数据处理层
*
* @author Chopper
* @since 2020-11-22 09:17
*/
public interface StoreDepartmentRoleMapper extends BaseMapper<StoreDepartmentRole> {
}

View File

@ -21,7 +21,7 @@ public interface StoreLogisticsMapper extends BaseMapper<StoreLogistics> {
* @param storeId 店铺ID
* @return 物流公司列表
*/
@Select("SELECT l.* FROM li_logistics l RIGHT JOIN li_store_logistics sl ON l.id=sl.logistics_id WHERE sl.store_id=#{storeId} AND l.disabled='OPEN'")
@Select("SELECT l.id as logistics_id,l.name FROM li_logistics l RIGHT JOIN li_store_logistics sl ON l.id=sl.logistics_id WHERE sl.store_id=#{storeId} AND l.disabled='OPEN'")
List<StoreLogisticsVO> getSelectedStoreLogistics(String storeId);
/**
@ -39,7 +39,35 @@ public interface StoreLogisticsMapper extends BaseMapper<StoreLogistics> {
* @param storeId 店铺列表
* @return 店铺地址VO列表
*/
@Select("SELECT *, ( SELECT sl.id FROM li_store_logistics sl WHERE l.id = sl.logistics_id AND sl.store_id=#{storeId} ) AS selected FROM li_logistics l WHERE l.disabled='OPEN';")
@Select("SELECT id as logistics_id , `name` , ( SELECT sl.id FROM li_store_logistics sl WHERE l.id = sl.logistics_id AND sl.store_id=#{storeId} ) AS selected,(SELECT sl.face_sheet_flag FROM li_store_logistics sl WHERE l.id = sl.logistics_id AND sl.store_id = #{storeId}) as face_sheet_flag FROM li_logistics l WHERE l.disabled='OPEN';")
//@Select("SELECT *, ( SELECT sl.id FROM li_store_logistics sl WHERE l.id = sl.logistics_id AND sl.store_id=#{storeId} ) AS selected FROM li_logistics l WHERE l.disabled='OPEN';")
List<StoreLogisticsVO> getStoreLogistics(String storeId);
/**
* 店铺已选择的物流公司
* @param storeId 店铺Id
* @return 物流公司列表
*/
@Select("SELECT sl.logistics_id,l.name,sl.face_sheet_flag FROM li_logistics l INNER JOIN li_store_logistics sl on sl.logistics_id=l.id WHERE l.disabled = 'OPEN' AND store_id=#{storeId};")
List<StoreLogisticsVO> getOpenStoreLogistics(String storeId);
/**
* 店铺未选择的物流公司
* @param storeId 店铺Id
* @return 物流公司列表
*/
@Select("SELECT id as logistics_id,name FROM li_logistics WHERE id not in(SELECT logistics_id FROM li_store_logistics WHERE store_id=#{storeId}) AND disabled = 'OPEN'")
List<StoreLogisticsVO> getCloseStroreLogistics(String storeId);
/**
* 获取店铺选择的物流公司并使用了电子面单
*
* @param storeId 店铺ID
* @return 物流公司列表
*/
@Select("SELECT id as logistics_id , `name` FROM li_logistics WHERE disabled='OPEN'" +
"AND id in(SELECT logistics_id FROM li_store_logistics WHERE store_id=#{storeId} and face_sheet_flag=1)")
List<StoreLogisticsVO> getSelectedStoreLogisticsUseFaceSheet(String storeId);
}

View File

@ -0,0 +1,44 @@
package cn.lili.modules.member.mapper;
import cn.lili.modules.member.entity.dos.StoreMenu;
import cn.lili.modules.member.entity.vo.StoreUserMenuVO;
import cn.lili.modules.permission.entity.dos.Menu;
import cn.lili.modules.permission.entity.vo.UserMenuVO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;
import java.util.List;
/**
* 菜单数据处理层
*
* @author Chopper
* @since 2020-11-22 09:17
*/
public interface StoreMenuMapper extends BaseMapper<StoreMenu> {
/**
* 根据用户获取菜单列表
*
* @param userId 用户ID
* @return 菜单列表
*/
@Select("SELECT menu.* FROM li_store_menu AS menu WHERE menu.id IN (" +
"SELECT rm.menu_id FROM li_store_menu_role AS rm WHERE rm.role_id IN (" +
"SELECT ur.role_id FROM li_clerk_role AS ur WHERE ur.clerk_id=#{userId}) OR rm.role_id IN (" +
"SELECT dr.role_id FROM li_store_department_role AS dr WHERE dr.department_id=(" +
"SELECT department_id FROM li_clerk AS au WHERE au.id = #{userId})))")
List<StoreMenu> findByUserId(String userId);
/**
* 根据用户获取菜单权限
*
* @param userId 用户ID
* @return 用户菜单VO列表
*/
@Select("SELECT rm.is_super as is_super,m.*FROM li_store_menu AS m INNER JOIN li_store_menu_role AS rm ON rm.menu_id=m.id WHERE rm.role_id IN (" +
"SELECT ur.role_id FROM li_clerk_role AS ur WHERE ur.clerk_id=#{userId}) OR rm.role_id IN (" +
"SELECT dr.role_id FROM li_store_department_role AS dr INNER JOIN li_clerk AS au ON au.department_id=dr.department_id " +
"WHERE au.id=#{userId}) GROUP BY m.id,rm.is_super ORDER BY rm.is_super desc")
List<StoreUserMenuVO> getUserRoleMenu(String userId);
}

View File

@ -0,0 +1,14 @@
package cn.lili.modules.member.mapper;
import cn.lili.modules.member.entity.dos.StoreMenuRole;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* 角色菜单数据处理层
*
* @author Chopper
* @since 2020-11-22 09:17
*/
public interface StoreMenuRoleMapper extends BaseMapper<StoreMenuRole> {
}

View File

@ -0,0 +1,15 @@
package cn.lili.modules.member.mapper;
import cn.lili.modules.member.entity.dos.StoreRole;
import cn.lili.modules.permission.entity.dos.Role;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* 店铺角色数据处理层
*
* @author Chopper
* @since 2020-11-22 09:17
*/
public interface StoreRoleMapper extends BaseMapper<StoreRole> {
}

View File

@ -0,0 +1,99 @@
package cn.lili.modules.member.service;
import cn.lili.common.vo.PageVO;
import cn.lili.modules.member.entity.dos.Clerk;
import cn.lili.modules.member.entity.dos.Member;
import cn.lili.modules.member.entity.dto.ClerkAddDTO;
import cn.lili.modules.member.entity.dto.ClerkEditDTO;
import cn.lili.modules.member.entity.dto.ClerkQueryDTO;
import cn.lili.modules.member.entity.vo.ClerkVO;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import java.util.List;
/**
* 店员业务层
*
* @author wget
* @title: ClerkService
* @projectName lilishop
* @date 2021/12/28 7:42 下午
*/
public interface ClerkService extends IService<Clerk> {
/**
* 店员查询
*
* @param page
* @param clerkQueryDTO
* @return
*/
IPage<ClerkVO> clerkForPage(PageVO page, ClerkQueryDTO clerkQueryDTO);
/**
* 查询店员详细
*
* @param id 店员id
* @return
*/
ClerkVO get(String id);
/**
* 修改店员信息
*
* @param clerkEditDTO 店员
* @return
*/
Clerk updateClerk(ClerkEditDTO clerkEditDTO);
/**
* 保存店员
*
* @param clerkAddDTO 店员
* @return
*/
Clerk saveClerk(ClerkAddDTO clerkAddDTO);
/**
* 根据会员id获取店员信息
*
* @param memberId 会员id
* @return
*/
Clerk getClerkByMemberId(String memberId);
/**
* 重置店员密码
*
* @param ids 店员ids
*/
void resetPassword(List<String> ids);
/**
* 删除店员
*
* @param ids 店员ids
*/
void deleteClerk(List<String> ids);
/**
* 检测会员有效性
*
* @param mobile 手机号码
* @return
*/
Member checkClerk(String mobile);
/**
* 店员状态操作
*
* @param id 店员id
* @param status 状态
*/
void disable(String id, Boolean status);
}

View File

@ -26,7 +26,6 @@ import java.util.Map;
* @since 2020-02-25 14:10:16
*/
public interface MemberService extends IService<Member> {
/**
* 默认密码
*/
@ -40,12 +39,13 @@ public interface MemberService extends IService<Member> {
Member getUserInfo();
/**
* 是否可以通过手机获取用户
* 通过手机获取用户
*
* @param uuid UUID
* @param mobile 手机号
* @return 操作状态
*/
Member findByMobile(String mobile);
boolean findByMobile(String uuid, String mobile);
/**
@ -99,6 +99,16 @@ public interface MemberService extends IService<Member> {
*/
Member modifyPass(String oldPassword, String newPassword);
/**
* 注册会员
*
* @param userName 会员
* @param password 密码
* @param mobilePhone mobilePhone
* @return 处理结果
*/
Token register(String userName, String password, String mobilePhone);
/**
* 是否可以初始化密码
*
@ -121,17 +131,6 @@ public interface MemberService extends IService<Member> {
* @return 操作结果
*/
void cancellation(String password);
/**
* 注册会员
*
* @param userName 会员
* @param password 密码
* @param mobilePhone mobilePhone
* @return 处理结果
*/
Token register(String userName, String password, String mobilePhone);
/**
* 修改当前会员的手机号
*
@ -252,6 +251,24 @@ public interface MemberService extends IService<Member> {
*/
void logout(UserEnums userEnums);
/**
* <<<<<<< HEAD
* 修改会员是否拥有店铺
*
* @param haveStore 是否拥有店铺
* @param storeId 店铺id
* @param memberIds 会员id
* @return
*/
void updateHaveShop(Boolean haveStore, String storeId, List<String> memberIds);
/**
* 重置会员密码为123456
*
* @param ids 会员id
*/
void resetPassword(List<String> ids);
/**
* 获取所有会员的手机号
*
@ -269,7 +286,6 @@ public interface MemberService extends IService<Member> {
/**
* 获取用户VO
*
* @param id 会员id
* @return 用户VO
*/

View File

@ -0,0 +1,41 @@
package cn.lili.modules.member.service;
import cn.lili.modules.member.entity.dos.StoreClerkRole;
import com.baomidou.mybatisplus.extension.service.IService;
import java.util.List;
/**
* 店铺店员角色业务层
*
* @author Chopper
* @since 2020/11/17 3:46 下午
*/
public interface StoreClerkRoleService extends IService<StoreClerkRole> {
/**
* 根据用户查看拥有的角色
*
* @param clerkId 店员id
* @return
*/
List<StoreClerkRole> listByUserId(String clerkId);
/**
* 根据店员id查看角色
*
* @param clerkId 店员id
* @return
*/
List<String> listId(String clerkId);
/**
* 更新用户拥有的角色
*
* @param clerkId 店员id
* @param storeClerkRoles 角色权限
*/
void updateClerkRole(String clerkId, List<StoreClerkRole> storeClerkRoles);
}

View File

@ -0,0 +1,38 @@
package cn.lili.modules.member.service;
import cn.lili.modules.member.entity.dos.StoreDepartmentRole;
import com.baomidou.mybatisplus.extension.service.IService;
import java.util.List;
/**
* 部门角色业务层
*
* @author Chopper
* @since 2020/11/22 12:08
*/
public interface StoreDepartmentRoleService extends IService<StoreDepartmentRole> {
/**
* 根据部门获取角色集合
*
* @param storeDepartmentId 店铺部门id
* @return
*/
List<StoreDepartmentRole> listByDepartmentId(String storeDepartmentId);
/**
* 更新部门角色关联
*
* @param storeDepartmentId 店铺部门id
* @param storeDepartmentRoles 店铺部门角色
*/
void updateByDepartmentId(String storeDepartmentId, List<StoreDepartmentRole> storeDepartmentRoles);
/**
* 根据部门id删除部门与角色关联
*
* @param ids id集合
*/
void deleteByDepartment(List<String> ids);
}

View File

@ -0,0 +1,40 @@
package cn.lili.modules.member.service;
import cn.lili.modules.member.entity.dos.StoreDepartment;
import cn.lili.modules.member.entity.vo.StoreDepartmentVO;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.IService;
import java.util.List;
/**
* 店铺部门业务层
*
* @author Chopper
* @since 2020/11/17 3:43 下午
*/
public interface StoreDepartmentService extends IService<StoreDepartment> {
/**
* 获取部门树
*
* @param initWrapper
* @return
*/
List<StoreDepartmentVO> tree(QueryWrapper<StoreDepartment> initWrapper);
/**
* 删除部门
*
* @param ids
*/
void deleteByIds(List<String> ids);
/**
* 更新店铺部门
*
* @param storeDepartment 店铺部门
* @return
*/
Boolean update(StoreDepartment storeDepartment);
}

View File

@ -1,6 +1,7 @@
package cn.lili.modules.member.service;
import cn.lili.modules.store.entity.dos.StoreLogistics;
import cn.lili.modules.store.entity.dto.StoreLogisticsCustomerDTO;
import cn.lili.modules.system.entity.vo.StoreLogisticsVO;
import com.baomidou.mybatisplus.extension.service.IService;
@ -45,7 +46,48 @@ public interface StoreLogisticsService extends IService<StoreLogistics> {
* @param storeId 店铺id
* @return 店铺物流公司
*/
StoreLogistics add(String logisticsId, String storeId);
StoreLogistics add(String logisticsId, String storeId, StoreLogisticsCustomerDTO storeLogisticsCustomerDTO);
/**
* 获取当前店铺已选择的物流公司并使用电子面单列表
*
* @param storeId 店铺id
* @return 物流公司列表
*/
List<StoreLogisticsVO> getStoreSelectedLogisticsUseFaceSheet(String storeId);
/**
* 修改店铺-物流公司电子面单参数
* @param logisticsId 物流公司设置id
* @param storeId 店铺id
* @return 店铺物流公司
*/
StoreLogistics update(String logisticsId, String storeId, StoreLogisticsCustomerDTO storeLogisticsCustomerDTO);
/**
* 获取店铺物流信息回填
* @param logisticsId 物流id
* @return 店铺物流信息
*/
StoreLogistics getStoreLogisticsInfo(String logisticsId);
/**
* 获取当前店铺已开启的物流公司列表
*
* @param storeId 店铺id
* @return 物流公司列表
*/
List<StoreLogisticsVO> getOpenStoreLogistics(String storeId);
/**
* 获取当前店铺未开启的物流公司列表
*
* @param storeId 店铺id
* @return 物流公司列表
*/
List<StoreLogisticsVO> getCloseStoreLogistics(String storeId);
}

View File

@ -0,0 +1,57 @@
package cn.lili.modules.member.service;
import cn.lili.modules.member.entity.dos.StoreMenuRole;
import cn.lili.modules.member.entity.vo.StoreUserMenuVO;
import com.baomidou.mybatisplus.extension.service.IService;
import java.util.List;
/**
* 角色菜单接口
*
* @author Chopper
* @since 2020/11/22 11:43
*/
public interface StoreMenuRoleService extends IService<StoreMenuRole> {
/**
* 通过角色获取菜单权限列表
*
* @param roleId
* @return
*/
List<StoreMenuRole> findByRoleId(String roleId);
/**
* 根据角色集合获取拥有的菜单具体权限
*
* @param clerkId
* @return
*/
List<StoreUserMenuVO> findAllMenu(String clerkId,String memberId);
/**
* 更新某角色拥有到菜单
*
* @param roleId 角色id
* @param roleMenus
*/
void updateRoleMenu(String roleId, List<StoreMenuRole> roleMenus);
/**
* 根据角色id 删除数据
*
* @param roleId
*/
void delete(String roleId);
/**
* 根据角色id 删除数据
*
* @param roleId
*/
void delete(List<String> roleId);
}

View File

@ -0,0 +1,74 @@
package cn.lili.modules.member.service;
import cn.lili.modules.member.entity.dos.StoreMenu;
import cn.lili.modules.member.entity.vo.StoreMenuVO;
import cn.lili.modules.permission.entity.dto.MenuSearchParams;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springframework.cache.annotation.CacheConfig;
import java.util.List;
/**
* 店铺菜单权限业务层
*
* @author Chopper
* @since 2020/11/17 3:45 下午
*/
@CacheConfig(cacheNames = "{store_menu}")
public interface StoreMenuService extends IService<StoreMenu> {
/**
* 通过用户的菜单权限
*
* @return
*/
List<StoreMenuVO> findUserTree();
/**
* 通过用户id获取
*
* @param userId
* @return
*/
List<StoreMenu> findUserList(String userId);
/**
* 根据角色id获取菜单集合
*
* @param roleIds
* @return
*/
List<StoreMenu> findByRoleIds(String roleIds);
/**
* 树形结构
*
* @return
*/
List<StoreMenuVO> tree();
/**
* 查询列表
*
* @param menuSearchParams
* @return
*/
List<StoreMenu> searchList(MenuSearchParams menuSearchParams);
/**
* 批量删除
*
* @param ids
*/
void deleteIds(List<String> ids);
/**
* 添加更新菜单
*
* @param storeMenu 菜单数据
* @return 是否成功
*/
boolean saveOrUpdateMenu(StoreMenu storeMenu);
}

View File

@ -0,0 +1,56 @@
package cn.lili.modules.member.service;
import cn.lili.modules.member.entity.dos.StoreRole;
import com.baomidou.mybatisplus.extension.service.IService;
import java.util.List;
/**
* 角色业务层
*
* @author Chopper
* @since 2020/11/17 3:45 下午
*/
public interface StoreRoleService extends IService<StoreRole> {
/**
* 获取默认角色
*
* @param defaultRole
* @return
*/
List<StoreRole> findByDefaultRole(Boolean defaultRole);
/**
* 批量删除角色
*
* @param roleIds
*/
void deleteRoles(List<String> roleIds);
/**
* 修改角色
*
* @param storeRole 店铺角色
* @return
*/
Boolean update(StoreRole storeRole);
/**
* 保存店铺角色
*
* @param storeRole 店铺角色
* @return
*/
Boolean saveStoreRole(StoreRole storeRole);
/**
* 当前店铺 根据角色id查询角色
*
* @param ids 角色id
* @return
*/
List<StoreRole> list(List<String> ids);
}

View File

@ -0,0 +1,323 @@
package cn.lili.modules.member.serviceimpl;
import cn.hutool.core.text.CharSequenceUtil;
import cn.lili.common.enums.ResultCode;
import cn.lili.common.exception.ServiceException;
import cn.lili.common.security.context.UserContext;
import cn.lili.common.utils.BeanUtil;
import cn.lili.common.utils.StringUtils;
import cn.lili.common.vo.PageVO;
import cn.lili.modules.member.entity.dos.Clerk;
import cn.lili.modules.member.entity.dos.Member;
import cn.lili.modules.member.entity.dos.StoreClerkRole;
import cn.lili.modules.member.entity.dos.StoreRole;
import cn.lili.modules.member.entity.dto.ClerkAddDTO;
import cn.lili.modules.member.entity.dto.ClerkEditDTO;
import cn.lili.modules.member.entity.dto.ClerkQueryDTO;
import cn.lili.modules.member.entity.vo.ClerkVO;
import cn.lili.modules.member.mapper.ClerkMapper;
import cn.lili.modules.member.service.*;
import cn.lili.mybatis.util.PageUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;
/**
* 店员业务实现
*
* @author wget
* @title: ClerkServiceImpl
* @projectName lilishop
* @date 2021/12/28 8:13 下午
*/
@Service
@Transactional(rollbackFor = Exception.class)
public class ClerkServiceImpl extends ServiceImpl<ClerkMapper, Clerk> implements ClerkService {
@Autowired
private StoreRoleService storeRoleService;
@Autowired
private StoreDepartmentService storeDepartmentService;
@Autowired
private MemberService memberService;
@Autowired
private StoreClerkRoleService storeClerkRoleService;
@Override
public IPage<ClerkVO> clerkForPage(PageVO page, ClerkQueryDTO clerkQueryDTO) {
QueryWrapper<ClerkVO> clerkVOQueryWrapper = new QueryWrapper<>();
clerkVOQueryWrapper.eq("li_clerk.store_id", UserContext.getCurrentUser().getStoreId());
clerkVOQueryWrapper.eq(StringUtils.isNotEmpty(clerkQueryDTO.getDepartmentId()), "li_clerk.department_id", clerkQueryDTO.getDepartmentId());
clerkVOQueryWrapper.like(StringUtils.isNotEmpty(clerkQueryDTO.getClerkName()), "li_clerk.clerk_name", clerkQueryDTO.getClerkName());
clerkVOQueryWrapper.like(StringUtils.isNotEmpty(clerkQueryDTO.getMobile()), "m.mobile", clerkQueryDTO.getMobile());
IPage<ClerkVO> clerkPage = this.baseMapper.selectClerkPage(PageUtil.initPage(page), clerkVOQueryWrapper);
return clerkPage;
/*Page<Clerk> clerkPage = page(initPage, initWrapper);
if (clerkPage.getRecords().size() > 0) {
List<StoreRole> roles = storeRoleService.list(new QueryWrapper<StoreRole>()
.eq("store_id", UserContext.getCurrentUser().getStoreId()));
List<StoreDepartment> departments = storeDepartmentService.list(new QueryWrapper<StoreDepartment>()
.eq("store_id", UserContext.getCurrentUser().getStoreId()));
List<String> memberIds = new ArrayList<>();
clerkPage.getRecords().forEach(clerk -> {
memberIds.add(clerk.getMemberId());
});
List<Member> members = memberService.list(new QueryWrapper<Member>().in("id", memberIds));
List<ClerkVO> result = new ArrayList<>();
clerkPage.getRecords().forEach(clerk -> {
ClerkVO clerkVO = new ClerkVO(clerk);
if (!CharSequenceUtil.isEmpty(clerk.getDepartmentId())) {
try {
clerkVO.setDepartmentTitle(
departments.stream().filter
(department -> department.getId().equals(clerk.getDepartmentId()))
.collect(Collectors.toList())
.get(0)
.getTitle()
);
} catch (Exception e) {
log.error("填充部门信息异常", e);
}
}
clerkVO.setMobile(
members.stream().filter
(member -> member.getId().equals(clerk.getMemberId()))
.collect(Collectors.toList())
.get(0)
.getMobile()
);
if (!StringUtils.isEmpty(clerk.getRoleIds())) {
try {
List<String> memberRoles = Arrays.asList(clerk.getRoleIds().split(","));
clerkVO.setRoles(
roles.stream().filter
(role -> memberRoles.contains(role.getId()))
.collect(Collectors.toList())
);
} catch (Exception e) {
log.error("填充部门信息异常", e);
}
}
result.add(clerkVO);
});
Page<ClerkVO> pageResult = new Page(clerkPage.getCurrent(), clerkPage.getSize(), clerkPage.getTotal());
pageResult.setRecords(result);
return pageResult;
}
return new Page<ClerkVO>();*/
}
@Override
public ClerkVO get(String id) {
Clerk clerk = this.getById(id);
ClerkVO clerkVO = new ClerkVO(clerk);
//手机号码
clerkVO.setMobile(memberService.getById(clerk.getMemberId()).getMobile());
if (!CharSequenceUtil.isEmpty(clerk.getDepartmentId())) {
clerkVO.setDepartmentTitle(storeDepartmentService.getById(clerk.getDepartmentId()).getTitle());
}
if (!StringUtils.isEmpty(clerk.getRoleIds())) {
List<String> memberRoles = Arrays.asList(clerk.getRoleIds().split(","));
List<StoreRole> roles = storeRoleService.list(new QueryWrapper<StoreRole>()
.eq("store_id", UserContext.getCurrentUser().getStoreId()));
clerkVO.setRoles(
roles.stream().filter
(role -> memberRoles.contains(role.getId()))
.collect(Collectors.toList())
);
}
return clerkVO;
}
@Override
public Clerk updateClerk(ClerkEditDTO clerkEditDTO) {
Clerk clerk = this.getById(clerkEditDTO.getId());
if (clerk != null) {
//校验当前店员是否是当前店铺的
if (!clerk.getStoreId().equals(UserContext.getCurrentUser().getStoreId())) {
throw new ServiceException(ResultCode.USER_AUTHORITY_ERROR);
}
if (clerkEditDTO.getIsSuper()) {
clerk.setRoleIds("");
} else {
//角色赋值
if (!clerkEditDTO.getRoles().isEmpty()) {
clerk.setRoleIds(CharSequenceUtil.join(",", clerkEditDTO.getRoles()));
}
}
//部门校验
if (StringUtils.isNotEmpty(clerkEditDTO.getDepartmentId())) {
if (storeDepartmentService.getById(clerkEditDTO.getDepartmentId()) != null) {
clerk.setDepartmentId(clerkEditDTO.getDepartmentId());
} else {
throw new ServiceException(ResultCode.PERMISSION_NOT_FOUND_ERROR);
}
}
clerk.setIsSuper(clerkEditDTO.getIsSuper());
this.updateById(clerk);
return clerk;
}
throw new ServiceException(ResultCode.CLERK_NOT_FOUND_ERROR);
}
@Override
public Clerk saveClerk(ClerkAddDTO clerkAddDTO) {
Clerk clerk = new Clerk(clerkAddDTO);
clerk.setShopkeeper(clerkAddDTO.getShopkeeper());
clerk.setIsSuper(clerkAddDTO.getIsSuper());
//校验此会员是否已经是店员
Clerk temp = this.getClerkByMemberId(clerkAddDTO.getMemberId());
if (temp != null && !temp.getStoreId().equals(UserContext.getCurrentUser().getStoreId())) {
throw new ServiceException(ResultCode.CLERK_USER_ERROR);
}
if (temp != null && temp.getStoreId().equals(UserContext.getCurrentUser().getStoreId())) {
throw new ServiceException(ResultCode.CLERK_ALREADY_EXIT_ERROR);
}
//部门校验
if (StringUtils.isNotEmpty(clerkAddDTO.getDepartmentId())) {
if (storeDepartmentService.getById(clerkAddDTO.getDepartmentId()) == null) {
throw new ServiceException(ResultCode.PERMISSION_NOT_FOUND_ERROR);
}
}
//角色校验
if (clerkAddDTO.getRoles() != null && clerkAddDTO.getRoles().size() > 0) {
List<StoreRole> storeRoles = storeRoleService.list(clerkAddDTO.getRoles());
if (storeRoles.size() != clerkAddDTO.getRoles().size()) {
throw new ServiceException(ResultCode.USER_AUTHORITY_ERROR);
}
}
this.save(clerk);
//判断用户角色权限不为超级会员且权限路径不为空
if(clerkAddDTO.getIsSuper()==false && clerkAddDTO.getRoles()!=null){
//添加店员用户角色
List<StoreClerkRole> storeClerkRoleList = new ArrayList<>();
clerkAddDTO.getRoles().stream().forEach(a -> {
storeClerkRoleList.add(StoreClerkRole.builder().clerkId(clerk.getId()).roleId(a).build());
});
storeClerkRoleService.saveBatch(storeClerkRoleList);
}
return clerk;
}
@Override
public Clerk getClerkByMemberId(String memberId) {
return this.getOne(new QueryWrapper<Clerk>().eq("member_id", memberId));
}
@Override
public void resetPassword(List<String> ids) {
QueryWrapper<Clerk> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("store_id", UserContext.getCurrentUser().getStoreId());
queryWrapper.in("id", ids);
List<Clerk> clerks = this.baseMapper.selectList(queryWrapper);
//校验要重置的店员是否是当前店铺的店员
if (clerks.size() != ids.size()) {
throw new ServiceException(ResultCode.USER_AUTHORITY_ERROR);
}
//店员密码就是会员密码所以要组织会员修改密码参数信息
List<String> memberIds = new ArrayList<>();
clerks.forEach(clerk -> {
//如果是店主无法重置密码
if (clerk.getShopkeeper()) {
throw new ServiceException(ResultCode.CLERK_SUPPER);
}
memberIds.add(clerk.getMemberId());
});
memberService.resetPassword(memberIds);
}
@Override
public void deleteClerk(List<String> ids) {
QueryWrapper<Clerk> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("store_id", UserContext.getCurrentUser().getStoreId());
queryWrapper.in("id", ids);
List<Clerk> clerks = this.baseMapper.selectList(queryWrapper);
if (clerks.size() > 0) {
//校验要重置的店员是否是当前店铺的店员
if (clerks.size() != ids.size()) {
throw new ServiceException(ResultCode.USER_AUTHORITY_ERROR);
}
//删除店员
this.removeByIds(ids);
//更改会员为为拥有店铺
List<String> memberIds = new ArrayList<>();
clerks.forEach(clerk -> {
//无法删除当前登录的店员
if (UserContext.getCurrentUser().getClerkId().equals(clerk.getId())) {
throw new ServiceException(ResultCode.CLERK_CURRENT_SUPPER);
}
//无法删除店主
if (clerk.getShopkeeper()) {
throw new ServiceException(ResultCode.CLERK_SUPPER);
}
memberIds.add(clerk.getMemberId());
});
memberService.updateHaveShop(false, null, memberIds);
}
}
@Override
public Member checkClerk(String mobile) {
//校验是否已经是会员
Member member = memberService.findByMobile(mobile);
if (member != null) {
//校验要添加的会员是否已经是店主
if (member.getHaveStore()) {
throw new ServiceException(ResultCode.STORE_APPLY_DOUBLE_ERROR);
}
//校验会员的有效性
if (!member.getDisabled()) {
throw new ServiceException(ResultCode.USER_STATUS_ERROR);
}
//校验此会员是否已经是店员
Clerk clerk = this.getClerkByMemberId(member.getId());
if (clerk != null && !clerk.getStoreId().equals(UserContext.getCurrentUser().getStoreId())) {
throw new ServiceException(ResultCode.CLERK_USER_ERROR);
}
if (clerk != null && clerk.getStoreId().equals(UserContext.getCurrentUser().getStoreId())) {
throw new ServiceException(ResultCode.CLERK_ALREADY_EXIT_ERROR);
}
return member;
}
return new Member();
}
@Override
public void disable(String id, Boolean status) {
Clerk clerk = this.getById(id);
if (clerk == null) {
throw new ServiceException(ResultCode.USER_NOT_EXIST);
}
//店主无法禁用
if (clerk.getShopkeeper() && clerk.getStatus()) {
throw new ServiceException(ResultCode.CLERK_SUPPER);
}
clerk.setStatus(status);
this.updateById(clerk);
}
}

View File

@ -27,7 +27,7 @@ import java.util.List;
* @since 2020/11/17 3:44 下午
*/
@Service
@Transactional(propagation = Propagation.REQUIRED, rollbackFor = java.lang.Exception.class)
@Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class)
public class MemberNoticeSenterServiceImpl extends ServiceImpl<MemberNoticeSenterMapper, MemberNoticeSenter> implements MemberNoticeSenterService {
/**

View File

@ -17,10 +17,7 @@ import cn.lili.common.security.context.UserContext;
import cn.lili.common.security.enums.UserEnums;
import cn.lili.common.security.token.Token;
import cn.lili.common.sensitive.SensitiveWordsFilter;
import cn.lili.common.utils.BeanUtil;
import cn.lili.common.utils.CookieUtil;
import cn.lili.common.utils.SnowFlake;
import cn.lili.common.utils.UuidUtils;
import cn.lili.common.utils.*;
import cn.lili.common.vo.PageVO;
import cn.lili.modules.connect.config.ConnectAuthEnum;
import cn.lili.modules.connect.entity.Connect;
@ -122,6 +119,13 @@ public class MemberServiceImpl extends ServiceImpl<MemberMapper, Member> impleme
throw new ServiceException(ResultCode.USER_NOT_LOGIN);
}
@Override
public Member findByMobile(String mobile) {
QueryWrapper<Member> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("mobile", mobile);
return this.baseMapper.selectOne(queryWrapper);
}
@Override
public boolean findByMobile(String uuid, String mobile) {
QueryWrapper<Member> queryWrapper = new QueryWrapper<>();
@ -150,6 +154,32 @@ public class MemberServiceImpl extends ServiceImpl<MemberMapper, Member> impleme
return memberTokenGenerate.createToken(member, false);
}
@Override
public void resetPassword(List<String> ids) {
String password = new BCryptPasswordEncoder().encode(StringUtils.md5("123456"));
LambdaUpdateWrapper<Member> lambdaUpdateWrapper = Wrappers.lambdaUpdate();
lambdaUpdateWrapper.in(Member::getId, ids);
lambdaUpdateWrapper.set(Member::getPassword, password);
this.update(lambdaUpdateWrapper);
}
@Override
public void updateHaveShop(Boolean haveStore, String storeId, List<String> memberIds) {
List<Member> members = this.baseMapper.selectBatchIds(memberIds);
if (members.size() > 0) {
members.forEach(member -> {
member.setHaveStore(haveStore);
if (haveStore) {
member.setStoreId(storeId);
} else {
member.setStoreId(null);
}
});
this.updateBatchById(members);
}
}
@Override
public Token usernameStoreLogin(String username, String password) {
@ -272,7 +302,6 @@ public class MemberServiceImpl extends ServiceImpl<MemberMapper, Member> impleme
return member;
}
@Override
@DemoSite
public Member modifyPass(String oldPassword, String newPassword) {
AuthUser tokenUser = UserContext.getCurrentUser();

View File

@ -0,0 +1,52 @@
package cn.lili.modules.member.serviceimpl;
import cn.lili.modules.member.entity.dos.StoreClerkRole;
import cn.lili.modules.member.mapper.StoreClerkRoleMapper;
import cn.lili.modules.member.service.StoreClerkRoleService;
import cn.lili.modules.permission.entity.dos.UserRole;
import cn.lili.modules.permission.mapper.UserRoleMapper;
import cn.lili.modules.permission.service.UserRoleService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.ArrayList;
import java.util.List;
/**
* 用户权限业务层实现
*
* @author Chopper
* @since 2020/11/17 3:52 下午
*/
@Service
@Transactional(rollbackFor = Exception.class)
public class StoreClerkRoleServiceImpl extends ServiceImpl<StoreClerkRoleMapper, StoreClerkRole> implements StoreClerkRoleService {
@Override
public List<StoreClerkRole> listByUserId(String clerkId) {
QueryWrapper<StoreClerkRole> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("clerk_id", clerkId);
return this.baseMapper.selectList(queryWrapper);
}
@Override
public List<String> listId(String clerkId) {
List<StoreClerkRole> userRoleList = this.listByUserId(clerkId);
List<String> strings = new ArrayList<>();
userRoleList.forEach(item -> strings.add(item.getRoleId()));
return strings;
}
@Override
public void updateClerkRole(String clerkId, List<StoreClerkRole> storeClerkRoles) {
//删除
QueryWrapper<StoreClerkRole> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("clerk_id", clerkId);
this.remove(queryWrapper);
//保存
this.saveBatch(storeClerkRoles);
}
}

View File

@ -0,0 +1,49 @@
package cn.lili.modules.member.serviceimpl;
import cn.lili.common.security.context.UserContext;
import cn.lili.modules.member.entity.dos.StoreDepartmentRole;
import cn.lili.modules.member.mapper.StoreDepartmentRoleMapper;
import cn.lili.modules.member.service.StoreDepartmentRoleService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
/**
* 部门角色业务层实现
*
* @author Chopper
* @since 2020/11/22 12:08
*/
@Service
@Transactional(rollbackFor = Exception.class)
public class StoreDepartmentRoleServiceImpl extends ServiceImpl<StoreDepartmentRoleMapper, StoreDepartmentRole> implements StoreDepartmentRoleService {
@Override
public List<StoreDepartmentRole> listByDepartmentId(String storeDepartmentId) {
QueryWrapper queryWrapper = new QueryWrapper<>();
queryWrapper.eq("department_id", storeDepartmentId);
return this.baseMapper.selectList(queryWrapper);
}
@Override
public void updateByDepartmentId(String storeDepartmentId, List<StoreDepartmentRole> storeDepartmentRoles) {
if (storeDepartmentRoles.size() > 0) {
QueryWrapper queryWrapper = new QueryWrapper<>();
queryWrapper.eq("department_id", storeDepartmentId);
this.remove(queryWrapper);
this.saveBatch(storeDepartmentRoles);
}
}
@Override
public void deleteByDepartment(List<String> ids) {
QueryWrapper queryWrapper = new QueryWrapper<>();
queryWrapper.in("department_id", ids);
this.remove(queryWrapper);
}
}

View File

@ -0,0 +1,112 @@
package cn.lili.modules.member.serviceimpl;
import cn.lili.common.enums.ResultCode;
import cn.lili.common.exception.ServiceException;
import cn.lili.common.security.context.UserContext;
import cn.lili.modules.member.entity.dos.Clerk;
import cn.lili.modules.member.entity.dos.StoreDepartment;
import cn.lili.modules.member.entity.vo.StoreDepartmentVO;
import cn.lili.modules.member.mapper.StoreDepartmentMapper;
import cn.lili.modules.member.service.ClerkService;
import cn.lili.modules.member.service.StoreDepartmentRoleService;
import cn.lili.modules.member.service.StoreDepartmentService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.ArrayList;
import java.util.List;
/**
* 店铺部门业务层实现
*
* @author Chopper
* @since 2020/11/17 3:47 下午
*/
@Slf4j
@Service
@Transactional(rollbackFor = Exception.class)
public class StoreDepartmentServiceImpl extends ServiceImpl<StoreDepartmentMapper, StoreDepartment> implements StoreDepartmentService {
@Autowired
private StoreDepartmentRoleService storeDepartmentRoleService;
@Autowired
private ClerkService clerkService;
@Override
public void deleteByIds(List<String> ids) {
//校验是否有操作店铺部门权限
List<StoreDepartment> storeDepartments = this.list(new QueryWrapper<StoreDepartment>()
.in("id", ids)
.eq("store_id", UserContext.getCurrentUser().getStoreId()));
if (storeDepartments.size() != ids.size()) {
throw new ServiceException(ResultCode.USER_AUTHORITY_ERROR);
}
//校验店员是否绑定部门
if (clerkService.count(new QueryWrapper<Clerk>().in("department_id", ids)) > 0) {
throw new ServiceException(ResultCode.PERMISSION_DEPARTMENT_DELETE_ERROR);
}
//删除店铺部门
this.removeByIds(ids);
//删除店铺部门角色
storeDepartmentRoleService.deleteByDepartment(ids);
}
@Override
public List<StoreDepartmentVO> tree(QueryWrapper<StoreDepartment> initWrapper) {
try {
List<StoreDepartment> departments = this.list(initWrapper);
List<StoreDepartmentVO> all = new ArrayList<>();
departments.forEach(item -> all.add(new StoreDepartmentVO(item)));
List<StoreDepartmentVO> tree = new ArrayList<>();
all.forEach(item -> {
if ("0".equals(item.getParentId())) {
initChild(item, all);
tree.add(item);
}
});
return tree;
} catch (Exception e) {
log.error("部门业务错误", e);
return null;
}
}
/**
* 递归初始化子树
*
* @param tree 树结构
* @param departmentVOS 数据库对象集合
*/
private void initChild(StoreDepartmentVO tree, List<StoreDepartmentVO> departmentVOS) {
departmentVOS.stream()
.filter(item -> (item.getParentId().equals(tree.getId())))
.forEach(child -> {
StoreDepartmentVO childTree = new StoreDepartmentVO(child);
initChild(childTree, departmentVOS);
tree.getChildren().add(childTree);
});
}
@Override
public Boolean update(StoreDepartment storeDepartment) {
StoreDepartment temp = this.getById(storeDepartment);
//校验部门是否存在
if (temp == null) {
throw new ServiceException(ResultCode.PERMISSION_NOT_FOUND_ERROR);
}
//校验店铺权限
if (!temp.getStoreId().equals(UserContext.getCurrentUser().getStoreId())) {
throw new ServiceException(ResultCode.USER_AUTHORITY_ERROR);
}
return this.updateById(storeDepartment);
}
}

View File

@ -1,8 +1,10 @@
package cn.lili.modules.member.serviceimpl;
import cn.lili.common.security.context.UserContext;
import cn.lili.modules.member.mapper.StoreLogisticsMapper;
import cn.lili.modules.member.service.StoreLogisticsService;
import cn.lili.modules.store.entity.dos.StoreLogistics;
import cn.lili.modules.store.entity.dto.StoreLogisticsCustomerDTO;
import cn.lili.modules.system.entity.vo.StoreLogisticsVO;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
@ -10,6 +12,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import java.util.List;
import java.util.Objects;
/**
* 物流公司业务层实现
@ -37,13 +40,54 @@ public class StoreLogisticsServiceImpl extends ServiceImpl<StoreLogisticsMapper,
}
@Override
public StoreLogistics add(String logisticsId, String storeId) {
public List<StoreLogisticsVO> getStoreSelectedLogisticsUseFaceSheet(String storeId) {
return this.baseMapper.getSelectedStoreLogisticsUseFaceSheet(storeId);
}
@Override
public StoreLogistics update(String logisticsId, String storeId,StoreLogisticsCustomerDTO storeLogisticsCustomerDTO) {
LambdaQueryWrapper<StoreLogistics> lambdaQueryWrapper = Wrappers.lambdaQuery();
lambdaQueryWrapper.eq(StoreLogistics::getLogisticsId, logisticsId);
lambdaQueryWrapper.eq(StoreLogistics::getStoreId, storeId);
this.remove(lambdaQueryWrapper);
StoreLogistics ResultstoreLogistics = new StoreLogistics(storeLogisticsCustomerDTO);
ResultstoreLogistics.setStoreId(storeId);
ResultstoreLogistics.setLogisticsId(logisticsId);
this.save(ResultstoreLogistics);
return ResultstoreLogistics;
}
@Override
public StoreLogistics getStoreLogisticsInfo( String logisticsId) {
String storeId = Objects.requireNonNull(UserContext.getCurrentUser()).getStoreId();
return this.getOne(new LambdaQueryWrapper<StoreLogistics>().eq(StoreLogistics::getStoreId,storeId).eq(StoreLogistics::getLogisticsId,logisticsId));
}
@Override
public List<StoreLogisticsVO> getOpenStoreLogistics(String storeId) {
List<StoreLogisticsVO> openStoreLogistics = this.baseMapper.getOpenStoreLogistics(storeId);
for(StoreLogisticsVO storeLogisticsVO:openStoreLogistics){
storeLogisticsVO.setSelected("1");
}
return openStoreLogistics;
}
@Override
public List<StoreLogisticsVO> getCloseStoreLogistics(String storeId) {
return this.baseMapper.getCloseStroreLogistics(storeId);
}
@Override
public StoreLogistics add(String logisticsId, String storeId, StoreLogisticsCustomerDTO storeLogisticsCustomerDTO){
//判断是否已经选择过如果没有选择则进行添加
LambdaQueryWrapper<StoreLogistics> lambdaQueryWrapper = Wrappers.lambdaQuery();
lambdaQueryWrapper.eq(StoreLogistics::getLogisticsId, logisticsId);
lambdaQueryWrapper.eq(StoreLogistics::getStoreId, storeId);
StoreLogistics storeLogistics=null;
if (this.getOne(lambdaQueryWrapper) == null) {
StoreLogistics storeLogistics = new StoreLogistics(storeId, logisticsId);
storeLogistics=new StoreLogistics(storeLogisticsCustomerDTO);
storeLogistics.setStoreId(storeId);
storeLogistics.setLogisticsId(logisticsId);
this.save(storeLogistics);
return storeLogistics;
}

View File

@ -0,0 +1,104 @@
package cn.lili.modules.member.serviceimpl;
import cn.lili.cache.Cache;
import cn.lili.cache.CachePrefix;
import cn.lili.common.security.context.UserContext;
import cn.lili.modules.member.entity.dos.StoreMenuRole;
import cn.lili.modules.member.entity.vo.StoreUserMenuVO;
import cn.lili.modules.member.mapper.StoreMenuMapper;
import cn.lili.modules.member.mapper.StoreMenuRoleMapper;
import cn.lili.modules.member.service.StoreMenuRoleService;
import cn.lili.modules.permission.entity.dos.RoleMenu;
import cn.lili.modules.permission.entity.vo.UserMenuVO;
import cn.lili.modules.permission.mapper.MenuMapper;
import cn.lili.modules.permission.mapper.RoleMenuMapper;
import cn.lili.modules.permission.service.RoleMenuService;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import groovy.util.logging.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.util.List;
/**
* 角色菜单业务层实现
*
* @author Chopper
* @since 2020/11/22 11:43
*/
@Slf4j
@Service
@Transactional(rollbackFor = Exception.class)
public class StoreMenuRoleServiceImpl extends ServiceImpl<StoreMenuRoleMapper, StoreMenuRole> implements StoreMenuRoleService {
/**
* 菜单
*/
@Resource
private StoreMenuMapper storeMenuMapper;
@Autowired
private Cache<Object> cache;
@Override
public List<StoreMenuRole> findByRoleId(String roleId) {
LambdaQueryWrapper<StoreMenuRole> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(StoreMenuRole::getRoleId, roleId);
return this.baseMapper.selectList(queryWrapper);
}
@Override
public List<StoreUserMenuVO> findAllMenu(String clerkId,String memberId) {
String cacheKey = CachePrefix.STORE_USER_MENU.getPrefix() + memberId;
List<StoreUserMenuVO> menuList = (List<StoreUserMenuVO>) cache.get(cacheKey);
if (menuList == null || menuList.isEmpty()) {
menuList = storeMenuMapper.getUserRoleMenu(clerkId);
cache.put(cacheKey, menuList);
}
return menuList;
}
@Override
public void updateRoleMenu(String roleId, List<StoreMenuRole> roleMenus) {
try {
roleMenus.forEach(role -> {
role.setStoreId(UserContext.getCurrentUser().getStoreId());
});
//删除角色已经绑定的菜单
this.delete(roleId);
//重新保存角色菜单关系
this.saveBatch(roleMenus);
cache.vagueDel(CachePrefix.MENU_USER_ID.getPrefix());
cache.vagueDel(CachePrefix.USER_MENU.getPrefix());
} catch (Exception e) {
log.error("修改用户权限错误", e);
}
}
@Override
public void delete(String roleId) {
//删除
QueryWrapper<StoreMenuRole> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("role_id", roleId);
this.remove(queryWrapper);
cache.vagueDel(CachePrefix.STORE_MENU_USER_ID.getPrefix());
cache.vagueDel(CachePrefix.STORE_USER_MENU.getPrefix());
}
@Override
public void delete(List<String> roleId) {
//删除
QueryWrapper<StoreMenuRole> queryWrapper = new QueryWrapper<>();
queryWrapper.in("role_id", roleId);
this.remove(queryWrapper);
cache.vagueDel(CachePrefix.STORE_MENU_USER_ID.getPrefix());
cache.vagueDel(CachePrefix.STORE_USER_MENU.getPrefix());
}
}

Some files were not shown because too many files have changed in this diff Show More