mirror of
https://gitee.com/zoujingli/ThinkAdmin.git
synced 2025-04-05 19:41:44 +08:00
同步样式
This commit is contained in:
parent
ec9370b651
commit
22e43ea99d
162
SQL01-数据表结构.sql
162
SQL01-数据表结构.sql
@ -1,19 +1,3 @@
|
||||
/*
|
||||
Navicat MySQL Data Transfer
|
||||
|
||||
Source Server : anyon.localhost
|
||||
Source Server Type : MySQL
|
||||
Source Server Version : 80018
|
||||
Source Host : localhost:3306
|
||||
Source Schema : admin_v6
|
||||
|
||||
Target Server Type : MySQL
|
||||
Target Server Version : 80018
|
||||
File Encoding : 65001
|
||||
|
||||
Date: 29/07/2021 14:09:36
|
||||
*/
|
||||
|
||||
SET NAMES utf8mb4;
|
||||
SET
|
||||
FOREIGN_KEY_CHECKS = 0;
|
||||
@ -40,7 +24,7 @@ CREATE TABLE `base_postage_company`
|
||||
INDEX `idx_base_postage_company_code3`(`code_3`) USING BTREE,
|
||||
INDEX `idx_base_postage_company_status`(`status`) USING BTREE,
|
||||
INDEX `idx_base_postage_company_deleted`(`deleted`) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '数据-快递-公司' ROW_FORMAT = Dynamic;
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '数据-快递-公司' ROW_FORMAT = DYNAMIC;
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for base_postage_region
|
||||
@ -83,7 +67,7 @@ CREATE TABLE `base_postage_template`
|
||||
INDEX `idx_base_postage_template_code`(`code`) USING BTREE,
|
||||
INDEX `idx_base_postage_template_status`(`status`) USING BTREE,
|
||||
INDEX `idx_base_postage_template_deleted`(`deleted`) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '数据-快递-模板' ROW_FORMAT = Dynamic;
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '数据-快递-模板' ROW_FORMAT = DYNAMIC;
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for base_user_discount
|
||||
@ -102,7 +86,7 @@ CREATE TABLE `base_user_discount`
|
||||
PRIMARY KEY (`id`) USING BTREE,
|
||||
INDEX `idx_base_user_discount_status`(`status`) USING BTREE,
|
||||
INDEX `idx_base_user_discount_deleted`(`deleted`) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '数据-基础-折扣' ROW_FORMAT = Dynamic;
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '数据-基础-折扣' ROW_FORMAT = DYNAMIC;
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for base_user_message
|
||||
@ -123,7 +107,7 @@ CREATE TABLE `base_user_message`
|
||||
INDEX `idx_base_user_message_type`(`type`) USING BTREE,
|
||||
INDEX `idx_base_user_message_status`(`status`) USING BTREE,
|
||||
INDEX `idx_base_user_message_deleted`(`deleted`) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '数据-基础-通知' ROW_FORMAT = Dynamic;
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '数据-基础-通知' ROW_FORMAT = DYNAMIC;
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for base_user_payment
|
||||
@ -147,7 +131,7 @@ CREATE TABLE `base_user_payment`
|
||||
INDEX `idx_base_user_payment_code`(`code`) USING BTREE,
|
||||
INDEX `idx_base_user_payment_status`(`status`) USING BTREE,
|
||||
INDEX `idx_base_user_payment_deleted`(`deleted`) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '数据-基础-支付' ROW_FORMAT = Dynamic;
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '数据-基础-支付' ROW_FORMAT = DYNAMIC;
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for base_user_upgrade
|
||||
@ -177,7 +161,7 @@ CREATE TABLE `base_user_upgrade`
|
||||
PRIMARY KEY (`id`) USING BTREE,
|
||||
INDEX `idx_base_user_upgrade_status`(`status`) USING BTREE,
|
||||
INDEX `idx_base_user_upgrade_number`(`number`) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '数据-用户-等级' ROW_FORMAT = Dynamic;
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '数据-用户-等级' ROW_FORMAT = DYNAMIC;
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for data_news_item
|
||||
@ -201,10 +185,10 @@ CREATE TABLE `data_news_item`
|
||||
`deleted` tinyint(1) NULL DEFAULT 0 COMMENT '删除状态(0未删,1已删)',
|
||||
`create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
PRIMARY KEY (`id`) USING BTREE,
|
||||
INDEX `idx_data_news_item_code`(`code`) USING BTREE,
|
||||
INDEX `idx_data_news_item_status`(`status`) USING BTREE,
|
||||
INDEX `idx_data_news_item_deleted`(`deleted`) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '数据-文章-内容' ROW_FORMAT = Dynamic;
|
||||
INDEX `idx_data_news_item_deleted`(`deleted`) USING BTREE,
|
||||
INDEX `idx_data_news_item_code`(`code`) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '数据-文章-内容' ROW_FORMAT = DYNAMIC;
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for data_news_mark
|
||||
@ -222,7 +206,7 @@ CREATE TABLE `data_news_mark`
|
||||
PRIMARY KEY (`id`) USING BTREE,
|
||||
INDEX `idx_data_news_mark_status`(`status`) USING BTREE,
|
||||
INDEX `idx_data_news_mark_deleted`(`deleted`) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '数据-文章-标签' ROW_FORMAT = Dynamic;
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '数据-文章-标签' ROW_FORMAT = DYNAMIC;
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for data_news_x_collect
|
||||
@ -238,11 +222,11 @@ CREATE TABLE `data_news_x_collect`
|
||||
`status` tinyint(1) NULL DEFAULT 1 COMMENT '记录状态(0无效,1待审核,2已审核)',
|
||||
`create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
PRIMARY KEY (`id`) USING BTREE,
|
||||
INDEX `idx_data_news_x_collect_uuid`(`uuid`) USING BTREE,
|
||||
INDEX `idx_data_news_x_collect_type`(`type`) USING BTREE,
|
||||
INDEX `idx_data_news_x_collect_code`(`code`) USING BTREE,
|
||||
INDEX `idx_data_news_x_collect_status`(`status`) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '数据-文章-标记' ROW_FORMAT = Dynamic;
|
||||
INDEX `idx_data_news_x_collect_status`(`status`) USING BTREE,
|
||||
INDEX `idx_data_news_x_collect_uuid`(`uuid`) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '数据-文章-标记' ROW_FORMAT = DYNAMIC;
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for data_user
|
||||
@ -296,16 +280,16 @@ CREATE TABLE `data_user`
|
||||
`deleted` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '删除状态(0未删,1已删)',
|
||||
`create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '注册时间',
|
||||
PRIMARY KEY (`id`) USING BTREE,
|
||||
INDEX `idx_data_user_pid0`(`pid0`) USING BTREE,
|
||||
INDEX `idx_data_user_pid1`(`pid1`) USING BTREE,
|
||||
INDEX `idx_data_user_pid2`(`pid2`) USING BTREE,
|
||||
INDEX `idx_data_user_pids`(`pids`) USING BTREE,
|
||||
INDEX `idx_data_user_status`(`status`) USING BTREE,
|
||||
INDEX `idx_data_user_deleted`(`deleted`) USING BTREE,
|
||||
INDEX `idx_data_user_openid1`(`openid1`) USING BTREE,
|
||||
INDEX `idx_data_user_openid2`(`openid2`) USING BTREE,
|
||||
INDEX `idx_data_user_unionid`(`unionid`) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '数据-用户-会员' ROW_FORMAT = Dynamic;
|
||||
INDEX `idx_data_user_unionid`(`unionid`) USING BTREE,
|
||||
INDEX `idx_data_user_pid1`(`pid1`) USING BTREE,
|
||||
INDEX `idx_data_user_pid2`(`pid2`) USING BTREE,
|
||||
INDEX `idx_data_user_pid0`(`pid0`) USING BTREE,
|
||||
INDEX `idx_data_user_pids`(`pids`) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '数据-用户-会员' ROW_FORMAT = DYNAMIC;
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for data_user_address
|
||||
@ -329,11 +313,11 @@ CREATE TABLE `data_user_address`
|
||||
`deleted` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '删除状态',
|
||||
`create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
PRIMARY KEY (`id`) USING BTREE,
|
||||
INDEX `idx_data_user_address_uuid`(`uuid`) USING BTREE,
|
||||
INDEX `idx_data_user_address_type`(`type`) USING BTREE,
|
||||
INDEX `idx_data_user_address_code`(`code`) USING BTREE,
|
||||
INDEX `idx_data_user_address_deleted`(`deleted`) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '数据-用户-地址' ROW_FORMAT = Dynamic;
|
||||
INDEX `idx_data_user_address_deleted`(`deleted`) USING BTREE,
|
||||
INDEX `idx_data_user_address_uuid`(`uuid`) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '数据-用户-地址' ROW_FORMAT = DYNAMIC;
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for data_user_balance
|
||||
@ -352,10 +336,10 @@ CREATE TABLE `data_user_balance`
|
||||
`create_by` bigint(20) NULL DEFAULT 0 COMMENT '系统用户',
|
||||
`create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
PRIMARY KEY (`id`) USING BTREE,
|
||||
INDEX `idx_data_user_balance_uuid`(`uuid`) USING BTREE,
|
||||
INDEX `idx_data_user_balance_code`(`code`) USING BTREE,
|
||||
INDEX `idx_data_user_balance_deleted`(`deleted`) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '数据-用户-余额' ROW_FORMAT = Dynamic;
|
||||
INDEX `idx_data_user_balance_deleted`(`deleted`) USING BTREE,
|
||||
INDEX `idx_data_user_balance_uuid`(`uuid`) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '数据-用户-余额' ROW_FORMAT = DYNAMIC;
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for data_user_message
|
||||
@ -374,10 +358,10 @@ CREATE TABLE `data_user_message`
|
||||
`create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
PRIMARY KEY (`id`) USING BTREE,
|
||||
INDEX `idx_data_user_message_type`(`type`) USING BTREE,
|
||||
INDEX `idx_data_user_message_status`(`status`) USING BTREE,
|
||||
INDEX `idx_data_user_message_phone`(`phone`) USING BTREE,
|
||||
INDEX `idx_data_user_message_msgid`(`msgid`) USING BTREE,
|
||||
INDEX `idx_data_user_message_status`(`status`) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '数据-用户-短信' ROW_FORMAT = Dynamic;
|
||||
INDEX `idx_data_user_message_msgid`(`msgid`) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '数据-用户-短信' ROW_FORMAT = DYNAMIC;
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for data_user_payment
|
||||
@ -402,7 +386,7 @@ CREATE TABLE `data_user_payment`
|
||||
INDEX `idx_data_user_payment_payment_type`(`payment_type`) USING BTREE,
|
||||
INDEX `idx_data_user_payment_payment_trade`(`payment_trade`) USING BTREE,
|
||||
INDEX `idx_data_user_payment_payment_status`(`payment_status`) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '数据-用户-支付' ROW_FORMAT = Dynamic;
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '数据-用户-支付' ROW_FORMAT = DYNAMIC;
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for data_user_rebate
|
||||
@ -424,13 +408,13 @@ CREATE TABLE `data_user_rebate`
|
||||
`deleted` tinyint(1) NULL DEFAULT 0 COMMENT '删除状态(0未删除,1已删除)',
|
||||
`create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
PRIMARY KEY (`id`) USING BTREE,
|
||||
INDEX `idx_data_user_rebate_uuid`(`uuid`) USING BTREE,
|
||||
INDEX `idx_data_user_rebate_type`(`type`) USING BTREE,
|
||||
INDEX `idx_data_user_rebate_date`(`date`) USING BTREE,
|
||||
INDEX `idx_data_user_rebate_code`(`code`) USING BTREE,
|
||||
INDEX `idx_data_user_rebate_name`(`name`) USING BTREE,
|
||||
INDEX `idx_data_user_rebate_status`(`status`) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '数据-用户-返利' ROW_FORMAT = Dynamic;
|
||||
INDEX `idx_data_user_rebate_status`(`status`) USING BTREE,
|
||||
INDEX `idx_data_user_rebate_uuid`(`uuid`) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '数据-用户-返利' ROW_FORMAT = DYNAMIC;
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for data_user_token
|
||||
@ -446,10 +430,11 @@ CREATE TABLE `data_user_token`
|
||||
`tokenv` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '授权验证',
|
||||
`create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
PRIMARY KEY (`id`) USING BTREE,
|
||||
INDEX `idx_data_user_token_uuid`(`uuid`) USING BTREE,
|
||||
INDEX `idx_data_user_token_type`(`type`) USING BTREE,
|
||||
INDEX `idx_data_user_token_time`(`time`) USING BTREE,
|
||||
INDEX `idx_data_user_token_token`(`token`) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '数据-用户-认证' ROW_FORMAT = Dynamic;
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '数据-用户-认证' ROW_FORMAT = DYNAMIC;
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for data_user_transfer
|
||||
@ -486,15 +471,15 @@ CREATE TABLE `data_user_transfer`
|
||||
`status` tinyint(1) NULL DEFAULT 1 COMMENT '提现状态(0失败,1待审核,2已审核,3打款中,4已打款,5已收款)',
|
||||
`create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
PRIMARY KEY (`id`) USING BTREE,
|
||||
INDEX `idx_data_user_transfer_uuid`(`uuid`) USING BTREE,
|
||||
INDEX `idx_data_user_transfer_date`(`date`) USING BTREE,
|
||||
INDEX `idx_data_user_transfer_type`(`type`) USING BTREE,
|
||||
INDEX `idx_data_user_transfer_code`(`code`) USING BTREE,
|
||||
INDEX `idx_data_user_transfer_status`(`status`) USING BTREE,
|
||||
INDEX `idx_data_user_transfer_date`(`date`) USING BTREE,
|
||||
INDEX `idx_data_user_transfer_type`(`type`) USING BTREE,
|
||||
INDEX `idx_data_user_transfer_audit_status`(`audit_status`) USING BTREE,
|
||||
INDEX `idx_data_user_transfer_appid`(`appid`) USING BTREE,
|
||||
INDEX `idx_data_user_transfer_openid`(`openid`) USING BTREE,
|
||||
INDEX `idx_data_user_transfer_audit_status`(`audit_status`) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '数据-用户-提现' ROW_FORMAT = Dynamic;
|
||||
INDEX `idx_data_user_transfer_uuid`(`uuid`) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '数据-用户-提现' ROW_FORMAT = DYNAMIC;
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for shop_goods
|
||||
@ -538,7 +523,7 @@ CREATE TABLE `shop_goods`
|
||||
INDEX `idx_shop_goods_code`(`code`) USING BTREE,
|
||||
INDEX `idx_shop_goods_status`(`status`) USING BTREE,
|
||||
INDEX `idx_shop_goods_deleted`(`deleted`) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '商城-商品-内容' ROW_FORMAT = Dynamic;
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '商城-商品-内容' ROW_FORMAT = DYNAMIC;
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for shop_goods_cate
|
||||
@ -559,7 +544,7 @@ CREATE TABLE `shop_goods_cate`
|
||||
INDEX `idx_shop_goods_cate_sort`(`sort`) USING BTREE,
|
||||
INDEX `idx_shop_goods_cate_status`(`status`) USING BTREE,
|
||||
INDEX `idx_shop_goods_cate_deleted`(`deleted`) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '商城-商品-分类' ROW_FORMAT = Dynamic;
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '商城-商品-分类' ROW_FORMAT = DYNAMIC;
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for shop_goods_item
|
||||
@ -585,7 +570,7 @@ CREATE TABLE `shop_goods_item`
|
||||
INDEX `index_store_goods_item_code`(`goods_code`) USING BTREE,
|
||||
INDEX `index_store_goods_item_spec`(`goods_spec`) USING BTREE,
|
||||
INDEX `index_store_goods_item_status`(`status`) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '商城-商品-规格' ROW_FORMAT = Dynamic;
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '商城-商品-规格' ROW_FORMAT = DYNAMIC;
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for shop_goods_mark
|
||||
@ -602,7 +587,7 @@ CREATE TABLE `shop_goods_mark`
|
||||
PRIMARY KEY (`id`) USING BTREE,
|
||||
INDEX `idx_shop_goods_mark_sort`(`sort`) USING BTREE,
|
||||
INDEX `idx_shop_goods_mark_status`(`status`) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '商城-商品-标签' ROW_FORMAT = Dynamic;
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '商城-商品-标签' ROW_FORMAT = DYNAMIC;
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for shop_goods_stock
|
||||
@ -621,7 +606,7 @@ CREATE TABLE `shop_goods_stock`
|
||||
PRIMARY KEY (`id`) USING BTREE,
|
||||
INDEX `idx_shop_goods_stock_status`(`status`) USING BTREE,
|
||||
INDEX `idx_shop_goods_stock_deleted`(`deleted`) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '商城-商品-库存' ROW_FORMAT = Dynamic;
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '商城-商品-库存' ROW_FORMAT = DYNAMIC;
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for shop_order
|
||||
@ -665,14 +650,14 @@ CREATE TABLE `shop_order`
|
||||
`status` tinyint(1) NULL DEFAULT 1 COMMENT '订单流程状态(0已取消,1预订单,2待支付,3支付中,4已支付,5已发货,6已完成)',
|
||||
`create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '订单创建时间',
|
||||
PRIMARY KEY (`id`) USING BTREE,
|
||||
INDEX `idx_shop_order_mid`(`uuid`) USING BTREE,
|
||||
INDEX `idx_shop_order_from`(`puid1`) USING BTREE,
|
||||
INDEX `idx_shop_order_status`(`status`) USING BTREE,
|
||||
INDEX `idx_shop_order_deleted`(`deleted_status`) USING BTREE,
|
||||
INDEX `idx_shop_order_orderno`(`order_no`) USING BTREE,
|
||||
INDEX `idx_shop_order_cancel_status`(`cancel_status`) USING BTREE,
|
||||
INDEX `idx_shop_order_payment_status`(`payment_status`) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '商城-订单-内容' ROW_FORMAT = Dynamic;
|
||||
INDEX `idx_shop_order_payment_status`(`payment_status`) USING BTREE,
|
||||
INDEX `idx_shop_order_from`(`puid1`) USING BTREE,
|
||||
INDEX `idx_shop_order_deleted`(`deleted_status`) USING BTREE,
|
||||
INDEX `idx_shop_order_mid`(`uuid`) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '商城-订单-内容' ROW_FORMAT = DYNAMIC;
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for shop_order_item
|
||||
@ -719,7 +704,7 @@ CREATE TABLE `shop_order_item`
|
||||
INDEX `idx_shop_order_item_goods_code`(`goods_code`) USING BTREE,
|
||||
INDEX `idx_shop_order_item_goods_spec`(`goods_spec`) USING BTREE,
|
||||
INDEX `idx_shop_order_item_rebate_type`(`rebate_type`) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '商城-订单-商品' ROW_FORMAT = Dynamic;
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '商城-订单-商品' ROW_FORMAT = DYNAMIC;
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for shop_order_send
|
||||
@ -754,11 +739,11 @@ CREATE TABLE `shop_order_send`
|
||||
`deleted` tinyint(1) NULL DEFAULT 0 COMMENT '发货删除状态(0未删,1已删)',
|
||||
`create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
PRIMARY KEY (`id`) USING BTREE,
|
||||
INDEX `idx_shop_order_send_mid`(`uuid`) USING BTREE,
|
||||
INDEX `idx_shop_order_send_status`(`status`) USING BTREE,
|
||||
INDEX `idx_shop_order_send_deleted`(`deleted`) USING BTREE,
|
||||
INDEX `idx_shop_order_send_order_no`(`order_no`) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '商城-订单-配送' ROW_FORMAT = Dynamic;
|
||||
INDEX `idx_shop_order_send_order_no`(`order_no`) USING BTREE,
|
||||
INDEX `idx_shop_order_send_mid`(`uuid`) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '商城-订单-配送' ROW_FORMAT = DYNAMIC;
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for system_auth
|
||||
@ -774,9 +759,9 @@ CREATE TABLE `system_auth`
|
||||
`status` tinyint(1) UNSIGNED NULL DEFAULT 1 COMMENT '权限状态(1使用,0禁用)',
|
||||
`create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
PRIMARY KEY (`id`) USING BTREE,
|
||||
INDEX `idx_system_auth_title`(`title`) USING BTREE,
|
||||
INDEX `idx_system_auth_status`(`status`) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '系统-权限' ROW_FORMAT = Dynamic;
|
||||
INDEX `idx_system_auth_status`(`status`) USING BTREE,
|
||||
INDEX `idx_system_auth_title`(`title`) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '系统-权限' ROW_FORMAT = DYNAMIC;
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for system_auth_node
|
||||
@ -790,7 +775,7 @@ CREATE TABLE `system_auth_node`
|
||||
PRIMARY KEY (`id`) USING BTREE,
|
||||
INDEX `idx_system_auth_auth`(`auth`) USING BTREE,
|
||||
INDEX `idx_system_auth_node`(`node`(191)) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '系统-授权' ROW_FORMAT = Dynamic;
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '系统-授权' ROW_FORMAT = DYNAMIC;
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for system_base
|
||||
@ -841,7 +826,7 @@ CREATE TABLE `system_data`
|
||||
`value` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL COMMENT '配置值',
|
||||
PRIMARY KEY (`id`) USING BTREE,
|
||||
INDEX `idx_system_data_name`(`name`) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '系统-数据' ROW_FORMAT = Dynamic;
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '系统-数据' ROW_FORMAT = DYNAMIC;
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for system_menu
|
||||
@ -878,7 +863,7 @@ CREATE TABLE `system_oplog`
|
||||
`username` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '操作人用户名',
|
||||
`create_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
PRIMARY KEY (`id`) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '系统-日志' ROW_FORMAT = Dynamic;
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '系统-日志' ROW_FORMAT = DYNAMIC;
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for system_queue
|
||||
@ -908,7 +893,7 @@ CREATE TABLE `system_queue`
|
||||
INDEX `idx_system_queue_rscript`(`rscript`) USING BTREE,
|
||||
INDEX `idx_system_queue_create_at`(`create_at`) USING BTREE,
|
||||
INDEX `idx_system_queue_exec_time`(`exec_time`) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '系统-任务' ROW_FORMAT = Dynamic;
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '系统-任务' ROW_FORMAT = DYNAMIC;
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for system_user
|
||||
@ -917,6 +902,7 @@ DROP TABLE IF EXISTS `system_user`;
|
||||
CREATE TABLE `system_user`
|
||||
(
|
||||
`id` bigint(20) NOT NULL AUTO_INCREMENT,
|
||||
`usertype` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '用户类型',
|
||||
`username` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '用户账号',
|
||||
`password` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '用户密码',
|
||||
`nickname` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '用户昵称',
|
||||
@ -937,7 +923,7 @@ CREATE TABLE `system_user`
|
||||
INDEX `idx_system_user_status`(`status`) USING BTREE,
|
||||
INDEX `idx_system_user_username`(`username`) USING BTREE,
|
||||
INDEX `idx_system_user_deleted`(`is_deleted`) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 10000 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '系统-用户' ROW_FORMAT = COMPACT;
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '系统-用户' ROW_FORMAT = COMPACT;
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for wechat_auto
|
||||
@ -969,7 +955,7 @@ CREATE TABLE `wechat_auto`
|
||||
INDEX `idx_wechat_auto_keys`(`time`) USING BTREE,
|
||||
INDEX `idx_wechat_auto_code`(`code`) USING BTREE,
|
||||
INDEX `idx_wechat_auto_appid`(`appid`) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '微信-回复' ROW_FORMAT = Dynamic;
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '微信-回复' ROW_FORMAT = DYNAMIC;
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for wechat_fans
|
||||
@ -1003,7 +989,7 @@ CREATE TABLE `wechat_fans`
|
||||
INDEX `index_wechat_fans_unionid`(`unionid`) USING BTREE,
|
||||
INDEX `index_wechat_fans_isblack`(`is_black`) USING BTREE,
|
||||
INDEX `index_wechat_fans_subscribe`(`subscribe`) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '微信-粉丝' ROW_FORMAT = Dynamic;
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '微信-粉丝' ROW_FORMAT = DYNAMIC;
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for wechat_fans_tags
|
||||
@ -1018,7 +1004,7 @@ CREATE TABLE `wechat_fans_tags`
|
||||
`create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建日期',
|
||||
INDEX `index_wechat_fans_tags_id`(`id`) USING BTREE,
|
||||
INDEX `index_wechat_fans_tags_appid`(`appid`) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '微信-标签' ROW_FORMAT = Dynamic;
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '微信-标签' ROW_FORMAT = DYNAMIC;
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for wechat_keys
|
||||
@ -1046,10 +1032,10 @@ CREATE TABLE `wechat_keys`
|
||||
`create_by` bigint(20) UNSIGNED NULL DEFAULT 0 COMMENT '创建人',
|
||||
`create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
PRIMARY KEY (`id`) USING BTREE,
|
||||
INDEX `index_wechat_keys_appid`(`appid`) USING BTREE,
|
||||
INDEX `index_wechat_keys_type`(`type`) USING BTREE,
|
||||
INDEX `index_wechat_keys_keys`(`keys`) USING BTREE,
|
||||
INDEX `index_wechat_keys_appid`(`appid`) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '微信-规则' ROW_FORMAT = Dynamic;
|
||||
INDEX `index_wechat_keys_keys`(`keys`) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '微信-规则' ROW_FORMAT = DYNAMIC;
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for wechat_media
|
||||
@ -1066,11 +1052,11 @@ CREATE TABLE `wechat_media`
|
||||
`media_url` varchar(300) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '远程图片链接',
|
||||
`create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
PRIMARY KEY (`id`) USING BTREE,
|
||||
INDEX `index_wechat_media_appid`(`appid`) USING BTREE,
|
||||
INDEX `index_wechat_media_md5`(`md5`) USING BTREE,
|
||||
INDEX `index_wechat_media_type`(`type`) USING BTREE,
|
||||
INDEX `index_wechat_media_appid`(`appid`) USING BTREE,
|
||||
INDEX `index_wechat_media_media_id`(`media_id`) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '微信-素材' ROW_FORMAT = Dynamic;
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '微信-素材' ROW_FORMAT = DYNAMIC;
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for wechat_news
|
||||
@ -1086,9 +1072,9 @@ CREATE TABLE `wechat_news`
|
||||
`create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
`create_by` bigint(20) NULL DEFAULT NULL COMMENT '创建人',
|
||||
PRIMARY KEY (`id`) USING BTREE,
|
||||
INDEX `index_wechat_news_media_id`(`media_id`) USING BTREE,
|
||||
INDEX `index_wechat_news_artcle_id`(`article_id`) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '微信-图文' ROW_FORMAT = Dynamic;
|
||||
INDEX `index_wechat_news_artcle_id`(`article_id`) USING BTREE,
|
||||
INDEX `index_wechat_news_media_id`(`media_id`) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '微信-图文' ROW_FORMAT = DYNAMIC;
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for wechat_news_article
|
||||
@ -1107,7 +1093,7 @@ CREATE TABLE `wechat_news_article`
|
||||
`read_num` bigint(20) UNSIGNED NULL DEFAULT 0 COMMENT '阅读数量',
|
||||
`create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
PRIMARY KEY (`id`) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '微信-文章' ROW_FORMAT = Dynamic;
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '微信-文章' ROW_FORMAT = DYNAMIC;
|
||||
|
||||
SET
|
||||
FOREIGN_KEY_CHECKS = 1;
|
||||
|
@ -7712,6 +7712,7 @@ DROP TABLE IF EXISTS `system_user`;
|
||||
CREATE TABLE `system_user`
|
||||
(
|
||||
`id` bigint(20) NOT NULL AUTO_INCREMENT,
|
||||
`usertype` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '用户类型',
|
||||
`username` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '用户账号',
|
||||
`password` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '用户密码',
|
||||
`nickname` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '用户昵称',
|
||||
@ -7732,13 +7733,13 @@ CREATE TABLE `system_user`
|
||||
INDEX `idx_system_user_status`(`status`) USING BTREE,
|
||||
INDEX `idx_system_user_username`(`username`) USING BTREE,
|
||||
INDEX `idx_system_user_deleted`(`is_deleted`) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 10001 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '系统-用户' ROW_FORMAT = COMPACT;
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '系统-用户' ROW_FORMAT = COMPACT;
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of system_user
|
||||
-- ----------------------------
|
||||
INSERT INTO `system_user`
|
||||
VALUES (10000, 'admin', '21232f297a57a5a743894a0e4a801fc3', '系统管理员', 'https://xhtwxapp.cdn.xiaoding.shop/cf/23526f451784ff137f161b8fe18d5a.png', ',,', '', '', '', '127.0.0.1', '2021-04-10 13:42:51', 142, '', 1, 0, 0, '2015-11-13 15:14:22');
|
||||
VALUES (10000, '', 'admin', '21232f297a57a5a743894a0e4a801fc3', '系统管理员', 'https://xhtwxapp.cdn.xiaoding.shop/cf/23526f451784ff137f161b8fe18d5a.png', ',,', '', '', '', '127.0.0.1', '2021-04-10 13:42:51', 142, '', 1, 0, 0, '2015-11-13 15:14:22');
|
||||
|
||||
SET
|
||||
FOREIGN_KEY_CHECKS = 1;
|
||||
|
@ -63,7 +63,7 @@ CREATE TABLE IF NOT EXISTS `system_base`
|
||||
ROW_FORMAT = COMPACT;
|
||||
|
||||
-- 权限表增加身份权限字段
|
||||
ALTER TABLE `system_auth`
|
||||
ADD COLUMN `utype` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '身份权限' AFTER `title`;
|
||||
ALTER TABLE `system_user`
|
||||
ADD COLUMN `usertype` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '用户类型' AFTER `id`;
|
||||
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
@ -17,7 +17,6 @@
|
||||
namespace app\admin\controller;
|
||||
|
||||
use app\admin\model\SystemAuth;
|
||||
use app\admin\model\SystemBase;
|
||||
use think\admin\Controller;
|
||||
use think\admin\service\AdminService;
|
||||
|
||||
@ -45,19 +44,13 @@ class Auth extends Controller
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
$this->title = '系统权限管理';
|
||||
$this->types = (new SystemBase)->items('身份权限');
|
||||
$query = $this->_query(SystemAuth::class)->dateBetween('create_at');
|
||||
$query->like('title,desc')->equal('status,utype')->layTable();
|
||||
}
|
||||
|
||||
/**
|
||||
* 数据列表处理
|
||||
* @param array $data
|
||||
*/
|
||||
protected function _page_filter(array &$data)
|
||||
{
|
||||
(new SystemBase())->items('身份权限', $data, 'utype', 'utype_info');
|
||||
if ($this->request->isGet() && input('get.output') !== 'layui.table') {
|
||||
$this->title = '系统权限管理';
|
||||
$this->fetch();
|
||||
} else {
|
||||
$query = $this->_query(SystemAuth::class)->dateBetween('create_at');
|
||||
$query->like('title,desc')->equal('status,utype')->layTable();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@ -86,17 +79,6 @@ class Auth extends Controller
|
||||
$this->_form($this->table, 'form');
|
||||
}
|
||||
|
||||
/**
|
||||
* 表单处理数据
|
||||
* @param array $data
|
||||
*/
|
||||
protected function _form_filter(array &$data)
|
||||
{
|
||||
if ($this->request->isGet()) {
|
||||
$this->bases = (new SystemBase())->items('身份权限');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改权限状态
|
||||
* @auth true
|
||||
|
@ -118,5 +118,4 @@ class Index extends Controller
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -60,17 +60,23 @@ class User extends Controller
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
$this->title = '系统用户管理';
|
||||
$query = $this->_query(SystemUser::class);
|
||||
// 加载对应数据列表
|
||||
if (($this->type = input('type', 'all')) === 'all') {
|
||||
$query->where(['is_deleted' => 0, 'status' => 1]);
|
||||
} elseif ($this->type = 'recycle') {
|
||||
$query->where(['is_deleted' => 0, 'status' => 0]);
|
||||
$this->type = input('type', 'index');
|
||||
if ($this->request->isGet() && input('get.output') !== 'layui.table') {
|
||||
$this->bases = (new SystemBase)->items('身份权限');
|
||||
$this->title = '系统用户管理';
|
||||
$this->fetch();
|
||||
} else {
|
||||
$query = $this->_query(SystemUser::class);
|
||||
// 加载对应数据列表
|
||||
if ($this->type === 'index') {
|
||||
$query->where(['is_deleted' => 0, 'status' => 1]);
|
||||
} elseif ($this->type = 'recycle') {
|
||||
$query->where(['is_deleted' => 0, 'status' => 0]);
|
||||
}
|
||||
// 列表排序并显示
|
||||
$query->equal('status,usertype')->dateBetween('login_at,create_at');
|
||||
$query->like('username,contact_phone#phone,contact_mail#mail')->layTable();
|
||||
}
|
||||
// 列表排序并显示
|
||||
$query->equal('status')->like('username,contact_phone#phone,contact_mail#mail');
|
||||
$query->dateBetween('login_at,create_at')->layTable();
|
||||
}
|
||||
|
||||
/**
|
||||
@ -138,6 +144,8 @@ class User extends Controller
|
||||
protected function _form_filter(array &$data)
|
||||
{
|
||||
if ($this->request->isPost()) {
|
||||
// 账号权限绑定处理
|
||||
$data['authorize'] = arr2str($data['authorize'] ?? []);
|
||||
if (isset($data['id']) && $data['id'] > 0) {
|
||||
unset($data['username']);
|
||||
} else {
|
||||
@ -150,15 +158,14 @@ class User extends Controller
|
||||
// 新添加的用户密码与账号相同
|
||||
$data['password'] = md5($data['username']);
|
||||
}
|
||||
// 账号权限绑定处理
|
||||
$data['authorize'] = arr2str($data['authorize'] ?? []);
|
||||
} else {
|
||||
// 用户身份数据
|
||||
$this->bases = (new SystemBase)->items('身份权限');
|
||||
// 权限绑定处理
|
||||
$data['authorize'] = str2arr($data['authorize'] ?? '');
|
||||
// 用户权限管理
|
||||
$query = $this->app->db->name('SystemAuth')->where(['status' => 1]);
|
||||
$this->authorizes = $query->order('sort desc,id desc')->select()->toArray();
|
||||
// 身份权限关联
|
||||
(new SystemBase)->items('身份权限', $this->authorizes, 'utype', 'utypeinfo');
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2,7 +2,6 @@
|
||||
|
||||
namespace app\admin\model;
|
||||
|
||||
use think\db\Query;
|
||||
use think\Model;
|
||||
|
||||
/**
|
||||
@ -33,37 +32,6 @@ class SystemUser extends Model
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过身份类型获取
|
||||
* @param string $type 身份类型
|
||||
* @param string $fields 数据字段
|
||||
* @return array
|
||||
*/
|
||||
public function itemsByType(string $type, string $fields = 'username,nickname,headimg,status,is_deleted'): array
|
||||
{
|
||||
$rids = (new SystemAuth)->where(['status' => 1, 'utype' => $type])->column('id');
|
||||
return empty($rids) ? [] : $this->where(function (Query $query) use ($rids) {
|
||||
foreach ($rids as $rid) $query->whereOr('authorize', 'like', "%,{$rid},%");
|
||||
})->where(['status' => 1, 'is_deleted' => 0])->column($fields, 'id');
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取用户身份数据
|
||||
* @param mixed $uuid
|
||||
* @return array
|
||||
*/
|
||||
public function rolesByUuid($uuid): array
|
||||
{
|
||||
$types = (new SystemBase)->items('身份权限');
|
||||
if (empty($types)) return [];
|
||||
$rrids = str2arr($this->where(['id' => $uuid])->value('authorize') ?: '');
|
||||
if (empty($rrids)) return [];
|
||||
$utypes = (new SystemAuth)->where(['status' => 1])->whereIn('id', $rrids)->column('utype');
|
||||
if (empty($utypes)) return [];
|
||||
foreach ($types as $key => $type) if (!in_array($type, $utypes)) unset($types[$key]);
|
||||
return array_values($types);
|
||||
}
|
||||
|
||||
/**
|
||||
* 格式化登录时间
|
||||
* @param string $value
|
||||
|
@ -6,24 +6,9 @@
|
||||
<span class="color-green font-w7">权限名称</span>
|
||||
<span class="color-desc margin-left-5">Permission Name</span>
|
||||
<input maxlength="100" class="layui-input" name="title" value='{$vo.title|default=""}' required placeholder="请输入权限名称">
|
||||
<!--<span class="help-block">访问权限名称需要保持不重复,在给用户授权时需要根据名称选择!</span>-->
|
||||
<span class="help-block">访问权限名称需要保持不重复,在给用户授权时需要根据名称选择!</span>
|
||||
</label>
|
||||
|
||||
{notempty name='bases'}
|
||||
<div class="layui-form-item">
|
||||
<span class="color-green font-w7 label-required-prev">身份权限</span>
|
||||
<span class="color-desc margin-left-5">Identity Permissions</span>
|
||||
<select class="layui-select" name="utype">
|
||||
{foreach $bases as $k=>$v}
|
||||
{if isset($vo.utype) && $k eq $vo.utype}
|
||||
<option selected value="{$k}">{$v.name} ( {$v.code} )</option>
|
||||
{else}
|
||||
<option value="{$k}">{$v.name} ( {$v.code} )</option>
|
||||
{/if}{/foreach}
|
||||
</select>
|
||||
</div>
|
||||
{/notempty}
|
||||
|
||||
<label class="layui-form-item relative block">
|
||||
<span class="color-green font-w7">权限描述</span>
|
||||
<span class="color-desc margin-left-5">Permission Description</span>
|
||||
@ -39,8 +24,4 @@
|
||||
<button class="layui-btn" type='submit'>保存数据</button>
|
||||
<button class="layui-btn layui-btn-danger" type='button' data-confirm="确定要取消编辑吗?" data-close>取消编辑</button>
|
||||
</div>
|
||||
</form>
|
||||
<script>
|
||||
layui.form.render();
|
||||
$('#AuthForm').parent().css('overflow', 'revert');
|
||||
</script>
|
||||
</form>
|
@ -21,26 +21,14 @@
|
||||
<script>
|
||||
$(function () {
|
||||
// 初始化表格组件
|
||||
var $table = $('#RoleData').layTable({
|
||||
$('#RoleData').layTable({
|
||||
even: true, height: 'full',
|
||||
sort: {field: 'sort desc,id', type: 'desc'},
|
||||
cols: [[
|
||||
{checkbox: true, fixed: true},
|
||||
{field: 'sort', title: '排序权重', width: 100, align: 'center', sort: true, templet: '#SortInputTpl'},
|
||||
{field: 'title', title: '权限名称', minWidth: 140, align: 'center', sort: false},
|
||||
{
|
||||
field: 'utype', title: '身份权限', minWidth: 140, sort: false, templet: function (d) {
|
||||
if ((d.utype_info || {}).name) {
|
||||
return d.utype_info.name + '<span class="color-desc"> ( ' + d.utype_info.code + ' ) </span>'
|
||||
}
|
||||
return '<span class="color-desc">-</span>';
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'desc', title: '权限描述', align: 'center', sort: false, templet: function (d) {
|
||||
return d.desc || '<span class="color-desc">-</span>'
|
||||
}
|
||||
},
|
||||
{field: 'desc', title: '权限描述', sort: false, align: 'center', templet: '<div>{{d.desc||"-"}}</div>'},
|
||||
{field: 'create_at', title: '创建时间', align: 'center', sort: true},
|
||||
{field: 'status', title: '权限状态', align: 'center', minWidth: 110, fixed: 'right', templet: '#StatusSwitchTpl'},
|
||||
{toolbar: '#toolbar', align: 'center', minWidth: 200, title: '权限操作', fixed: 'right'},
|
||||
@ -51,7 +39,7 @@
|
||||
layui.form.on('switch(StatusSwitch)', function (obj) {
|
||||
$.form.load("{:url('state')}", {id: obj.value, status: obj.elem.checked > 0 ? 1 : 0}, 'post', function (ret) {
|
||||
if (ret.code < 1) $.msg.error(ret.info, 3, function () {
|
||||
$table.trigger('reload'); // 操作异常时重载数据
|
||||
$('#RoleData').trigger('reload'); // 操作异常时重载数据
|
||||
});
|
||||
return false;
|
||||
}, false);
|
||||
|
@ -9,22 +9,6 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{notempty name='types'}
|
||||
<div class="layui-form-item layui-inline">
|
||||
<label class="layui-form-label">身份权限</label>
|
||||
<div class="layui-input-inline">
|
||||
<select name='utype' lay-search class="layui-select">
|
||||
<option value=''>-- 身份权限 --</option>
|
||||
{foreach $types as $type}{if $type.code eq input('get.utype')}
|
||||
<option selected value="{$type.code}">( {$type.name} ) {$type.code}</option>
|
||||
{else}
|
||||
<option value="{$type.code}">( {$type.name} ) {$type.code}</option>
|
||||
{/if}{/foreach}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
{/notempty}
|
||||
|
||||
<div class="layui-form-item layui-inline">
|
||||
<label class="layui-form-label">权限描述</label>
|
||||
<div class="layui-input-inline">
|
||||
@ -58,5 +42,6 @@
|
||||
<button class="layui-btn layui-btn-primary"><i class="layui-icon"></i> 搜 索</button>
|
||||
</div>
|
||||
</form>
|
||||
<script>form.render()</script>
|
||||
</fieldset>
|
||||
|
||||
<script>layui.form.render()</script>
|
||||
</fieldset>
|
||||
|
@ -1,87 +1,106 @@
|
||||
<form class="layui-form layui-card" action="{:sysuri()}" data-auto="true" method="post" autocomplete="off">
|
||||
<form class="layui-form layui-card" action="{:sysuri()}" id="UserForm" data-auto="true" method="post" autocomplete="off">
|
||||
<div class="layui-card-body padding-left-40">
|
||||
<div class="layui-row layui-col-space15">
|
||||
<div class="layui-col-xs2 text-center">
|
||||
<input type="hidden" name="headimg" value="{$vo.headimg|default=''}">
|
||||
<script>$('[name=headimg]').uploadOneImage()</script>
|
||||
|
||||
<fieldset>
|
||||
<legend><b class="layui-badge think-bg-violet">用户账号</b></legend>
|
||||
<div class="layui-row layui-col-space15">
|
||||
<div class="layui-row layui-col-space15">
|
||||
<div class="layui-col-xs2 text-center">
|
||||
<input type="hidden" name="headimg" value="{$vo.headimg|default=''}">
|
||||
<script>$('[name=headimg]').uploadOneImage()</script>
|
||||
</div>
|
||||
<div class="layui-col-xs5">
|
||||
<label class="block relative">
|
||||
<span class="color-green font-w7">登录账号</span>
|
||||
<span class="color-desc margin-left-5">Login Username</span>
|
||||
{if isset($vo) and isset($vo.username)}
|
||||
<input disabled value='{$vo.username|default=""}' required class="layui-input think-bg-gray">
|
||||
{else}
|
||||
<input name="username" value='{$vo.username|default=""}' required pattern="^.{4,}$" placeholder="请输入登录账号" class="layui-input">
|
||||
{/if}
|
||||
<span class="help-block">登录账号不能重复并且创建后不能再次修改哦。</span>
|
||||
</label>
|
||||
</div>
|
||||
<div class="layui-col-xs5">
|
||||
<label class="block relative">
|
||||
<span class="color-green font-w7">用户名称</span>
|
||||
<span class="color-desc margin-left-5">User Nickname</span>
|
||||
<input name="nickname" value='{$vo.nickname|default=""}' required placeholder="请输入用户名称" class="layui-input">
|
||||
<span class="help-block">用于区分用户数据的用户名称,请尽量不要重复。</span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-col-xs5">
|
||||
<label class="block relative">
|
||||
<span class="color-green font-w7">登录账号</span>
|
||||
<span class="color-desc margin-left-5">Login Name</span>
|
||||
{if isset($vo) and isset($vo.username)}
|
||||
<input disabled value='{$vo.username|default=""}' required class="layui-input think-bg-gray">
|
||||
</fieldset>
|
||||
|
||||
{if !empty($authorizes) && !empty($bases)}
|
||||
<fieldset>
|
||||
<legend><b class="layui-badge think-bg-violet">用户权限</b></legend>
|
||||
{if !empty($bases)}
|
||||
<div class="layui-form-item">
|
||||
<span class="color-green font-w7">角色身份</span>
|
||||
<span class="color-desc margin-left-5">Role Identity</span>
|
||||
<select class="layui-select" lay-search name="usertype">
|
||||
<option value="">-- 选择 --</option>
|
||||
{foreach $bases as $base}{if isset($vo.usertype) and $vo.usertype eq $base.code}
|
||||
<option selected value="{$base.code}">{$base.name|default=''} ( {$base.code|default=''} )</option>
|
||||
{else}
|
||||
<input name="username" value='{$vo.username|default=""}' required pattern="^.{4,}$" placeholder="请输入登录账号" class="layui-input">
|
||||
{/if}
|
||||
<span class="help-block">登录账号不能重复并且创建后不能再次修改哦。</span>
|
||||
</label>
|
||||
<option value="{$base.code}">{$base.name|default=''} ( {$base.code|default=''} )</option>
|
||||
{/if}{/foreach}
|
||||
</select>
|
||||
</div>
|
||||
<div class="layui-col-xs5">
|
||||
<label class="block relative">
|
||||
<span class="color-green font-w7">用户名称</span>
|
||||
<span class="color-desc margin-left-5">User Name</span>
|
||||
<input name="nickname" value='{$vo.nickname|default=""}' required placeholder="请输入用户名称" class="layui-input">
|
||||
<span class="help-block">用于区分用户数据的用户名称,请尽量不要重复。</span>
|
||||
</label>
|
||||
{/if}{if !empty($authorizes)}
|
||||
<div class="layui-form-item">
|
||||
<span class="color-green font-w7">访问权限</span>
|
||||
<span class="color-desc margin-left-5">User Permission</span>
|
||||
<div class="layui-textarea" style="min-height:50px">
|
||||
{if isset($vo.username) and $vo.username eq $superName}
|
||||
<span class="color-desc">超级用户不需要配置权限</span>
|
||||
{else}{foreach $authorizes as $authorize}
|
||||
<label class="think-checkbox layui-unselect">
|
||||
{if in_array($authorize.id, $vo.authorize)}
|
||||
<input type="checkbox" checked name="authorize[]" value="{$authorize.id}" lay-ignore>{$authorize.title}
|
||||
{else}
|
||||
<input type="checkbox" name="authorize[]" value="{$authorize.id}" lay-ignore>{$authorize.title}
|
||||
{/if}
|
||||
</label>
|
||||
{/foreach}{/if}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
</fieldset>
|
||||
{/if}
|
||||
|
||||
<div class="hr-line-dashed margin-top-10 margin-bottom-10"></div>
|
||||
<div class="layui-row layui-col-space15">
|
||||
<div class="layui-col-xs4">
|
||||
<label class="relative block">
|
||||
<span class="color-green font-w7">联系邮箱</span><span class="color-desc margin-left-5">Contact Email</span>
|
||||
<input name="contact_mail" pattern="^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$" value='{$vo.contact_mail|default=""}' placeholder="请输入联系电子邮箱" class="layui-input">
|
||||
<span class="color-desc">可选,请填写常用的电子邮箱</span>
|
||||
</label>
|
||||
<fieldset>
|
||||
<legend><b class="layui-badge think-bg-violet">用户资料</b></legend>
|
||||
<div class="layui-row layui-col-space15">
|
||||
<div class="layui-col-xs4">
|
||||
<label class="relative block">
|
||||
<span class="color-green font-w7">联系邮箱</span><span class="color-desc margin-left-5">Contact Email</span>
|
||||
<input name="contact_mail" pattern="^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$" value='{$vo.contact_mail|default=""}' placeholder="请输入联系电子邮箱" class="layui-input">
|
||||
<span class="color-desc">可选,请填写用户常用的电子邮箱</span>
|
||||
</label>
|
||||
</div>
|
||||
<div class="layui-col-xs4">
|
||||
<label class="relative block">
|
||||
<span class="color-green font-w7">联系手机</span><span class="color-desc margin-left-5">Contact Mobile</span>
|
||||
<input type="tel" maxlength="11" name="contact_phone" value='{$vo.contact_phone|default=""}' pattern="^1[3-9][0-9]{9}$" placeholder="请输入用户联系手机" class="layui-input">
|
||||
<span class="color-desc">可选,请填写用户常用的联系手机号</span>
|
||||
</label>
|
||||
</div>
|
||||
<div class="layui-col-xs4">
|
||||
<label class="relative block">
|
||||
<span class="color-green font-w7">联系QQ</span><span class="color-desc margin-left-5">Contact QQ</span>
|
||||
<input name="contact_qq" pattern="^\d{6,}$" value='{$vo.contact_qq|default=""}' placeholder="请输入常用的联系QQ" class="layui-input">
|
||||
<span class="color-desc">可选,请填写用户常用的联系QQ号</span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-col-xs4">
|
||||
<label class="relative block">
|
||||
<span class="color-green font-w7">联系手机</span><span class="color-desc margin-left-5">Contact Mobile</span>
|
||||
<input type="tel" maxlength="11" name="contact_phone" value='{$vo.contact_phone|default=""}' pattern="^1[3-9][0-9]{9}$" placeholder="请输入用户联系手机" class="layui-input">
|
||||
<span class="color-desc">可选,请填写常用的联系手机号</span>
|
||||
</label>
|
||||
</div>
|
||||
<div class="layui-col-xs4">
|
||||
<label class="relative block">
|
||||
<span class="color-green font-w7">联系QQ</span><span class="color-desc margin-left-5">Contact QQ</span>
|
||||
<input name="contact_qq" pattern="^\d{6,}$" value='{$vo.contact_qq|default=""}' placeholder="请输入常用的联系QQ" class="layui-input">
|
||||
<span class="color-desc">可选,请填写常用的联系QQ号</span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{notempty name='authorizes'}
|
||||
<div class="hr-line-dashed margin-top-10 margin-bottom-10"></div>
|
||||
<div class="layui-form-item">
|
||||
<span class="color-green font-w7">访问权限</span>
|
||||
<span class="color-desc margin-left-5">User Authorize</span>
|
||||
<div class="layui-textarea" style="min-height:50px">
|
||||
{if isset($vo.username) and $vo.username eq $superName}
|
||||
<span class="color-desc">超级用户不需要配置权限</span>
|
||||
{elseif empty($authorizes)}
|
||||
<span class="color-desc">未配置权限</span>
|
||||
{else}{foreach $authorizes as $authorize}
|
||||
<label class="think-checkbox layui-unselect">
|
||||
{if in_array($authorize.id, $vo.authorize)}
|
||||
<input type="checkbox" checked name="authorize[]" value="{$authorize.id}" lay-ignore>
|
||||
{$authorize.title} <span class="margin-left-5 color-desc">{notempty name='authorize.utypeinfo'}( {$authorize.utypeinfo.name} ){/notempty}</span>
|
||||
{else}
|
||||
<input type="checkbox" name="authorize[]" value="{$authorize.id}" lay-ignore>
|
||||
{$authorize.title} <span class="margin-left-5 color-desc">{notempty name='authorize.utypeinfo'}( {$authorize.utypeinfo.name} ){/notempty}</span>
|
||||
{/if}
|
||||
</label>
|
||||
{/foreach}{/if}
|
||||
</div>
|
||||
</div>
|
||||
{/notempty}
|
||||
|
||||
<div class="hr-line-dashed margin-top-10 margin-bottom-10"></div>
|
||||
<label class="layui-form-item block relative">
|
||||
<span class="color-green font-w7">用户描述</span><span class="color-desc margin-left-5">User Remark</span>
|
||||
<textarea placeholder="请输入用户描述" class="layui-textarea" name="describe">{$vo.describe|default=""}</textarea>
|
||||
</label>
|
||||
<label class="layui-form-item block relative margin-top-10">
|
||||
<span class="color-green font-w7">用户描述</span><span class="color-desc margin-left-5">User Remark</span>
|
||||
<textarea placeholder="请输入用户描述" class="layui-textarea" name="describe">{$vo.describe|default=""}</textarea>
|
||||
</label>
|
||||
</fieldset>
|
||||
|
||||
<div class="hr-line-dashed"></div>
|
||||
{notempty name='vo.id'}<input type='hidden' value='{$vo.id}' name='id'>{/notempty}
|
||||
@ -91,4 +110,9 @@
|
||||
<button class="layui-btn layui-btn-danger" type='button' data-confirm="确定要取消编辑吗?" data-close>取消编辑</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</form>
|
||||
|
||||
<script>
|
||||
layui.form.render();
|
||||
$('#UserForm').parent().css('overflow', 'revert');
|
||||
</script>
|
@ -1,7 +1,7 @@
|
||||
{extend name="../../admin/view/table"}
|
||||
|
||||
{block name="button"}
|
||||
{if isset($type) and $type eq 'all'}
|
||||
{if isset($type) and $type eq 'index'}
|
||||
<!--{if auth("add")}-->
|
||||
<button data-modal='{:url("add")}' data-title="添加用户" class='layui-btn layui-btn-sm layui-btn-primary'>添加用户</button>
|
||||
<!--{/if}-->
|
||||
@ -21,7 +21,7 @@
|
||||
{block name="content"}
|
||||
<div class="layui-tab layui-tab-card">
|
||||
<ul class="layui-tab-title">
|
||||
{foreach ['all'=>'系统用户','recycle'=>'回 收 站'] as $k=>$v}{if isset($type) and $type eq $k}
|
||||
{foreach ['index'=>'系统用户','recycle'=>'回 收 站'] as $k=>$v}{if isset($type) and $type eq $k}
|
||||
<li data-open="{:url('index')}?type={$k}" class="layui-this">{$v}</li>
|
||||
{else}
|
||||
<li data-open="{:url('index')}?type={$k}">{$v}</li>
|
||||
@ -37,33 +37,20 @@
|
||||
var $table = $('#UserData').layTable({
|
||||
even: true, height: 'full',
|
||||
sort: {field: 'sort desc,id', type: 'desc'},
|
||||
where: {type: '{$type|default="all"}'},
|
||||
where: {type: '{$type|default="index"}'},
|
||||
cols: [[
|
||||
{checkbox: true, fixed: true},
|
||||
{field: 'sort', title: '排序权重', width: 100, align: 'center', sort: true, templet: '#SortInputTpl'},
|
||||
{field: 'username', title: '登录账号', minWidth: 100, align: 'center', sort: true},
|
||||
{field: 'nickname', title: '用户名称', align: 'center', sort: false},
|
||||
{
|
||||
field: 'contact_phone', title: '联系电话', sort: false, templet: function (d) {
|
||||
return d.contact_phone || '<span class="color-desc">-</span>';
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'contact_mail', title: '联系邮箱', sort: false, templet: function (d) {
|
||||
return d.contact_mail || '<span class="color-desc">-</span>';
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'login_num', title: '登录次数', align: 'center', sort: false
|
||||
},
|
||||
{
|
||||
field: 'login_at', title: '最后登录', sort: true, align: 'center', minWidth: 170, templet: function (d) {
|
||||
return d.login_at || '<span class="color-desc">还未登录</span>';
|
||||
}
|
||||
},
|
||||
{field: 'nickname', title: '用户名称', align: 'center', sort: false, templet: '<div>{{d.nickname||"-"}}</div>'},
|
||||
{field: 'username', title: '登录账号', minWidth: 100, align: 'center', sort: true, templet: '<div>{{d.username||"-"}}</div>'},
|
||||
{field: 'usertype', title: '角色身份', minWidth: 100, align: 'center', sort: true, templet: '<div>{{d.usertype||"-"}}</div>'},
|
||||
{field: 'contact_mail', title: '联系邮箱', align: 'center', sort: false, templet: '<div>{{d.contact_mail||"-"}}</div>'},
|
||||
{field: 'contact_phone', title: '联系电话', align: 'center', sort: false, templet: '<div>{{d.contact_phone||"-"}}</div>'},
|
||||
{field: 'login_num', title: '登录次数', align: 'center', sort: false},
|
||||
{field: 'login_at', title: '最后登录', sort: true, align: 'center', minWidth: 170},
|
||||
{field: 'create_at', title: '创建时间', align: 'center', minWidth: 170, sort: true},
|
||||
{field: 'status', title: '权限状态', align: 'center', minWidth: 110, fixed: 'right', templet: '#StatusSwitchTpl'},
|
||||
{toolbar: '#toolbar', title: '操作', align: 'center', minWidth: 150, fixed: 'right'}
|
||||
{toolbar: '#toolbar', title: '操作', align: 'center', minWidth: 160, fixed: 'right'}
|
||||
]]
|
||||
});
|
||||
|
||||
@ -94,7 +81,7 @@
|
||||
</script>
|
||||
|
||||
<script type="text/html" id="toolbar">
|
||||
{if isset($type) and $type eq 'all'}
|
||||
{if isset($type) and $type eq 'index'}
|
||||
<!--{if auth("edit")}-->
|
||||
<a class="layui-btn layui-btn-sm" data-title="编辑用户" data-modal='{:url("edit")}?id={{d.id}}'>编 辑</a>
|
||||
<!--{/if}-->
|
||||
|
@ -1,6 +1,23 @@
|
||||
<fieldset>
|
||||
<legend>条件搜索</legend>
|
||||
<form class="layui-form layui-form-pane form-search" action="{:sysuri()}" onsubmit="return false" method="get" autocomplete="off">
|
||||
|
||||
{notempty name='bases'}
|
||||
<div class="layui-form-item layui-inline">
|
||||
<label class="layui-form-label">用户身份</label>
|
||||
<div class="layui-input-inline">
|
||||
<select name="usertype" lay-search class="layui-select">
|
||||
<option value=''>-- 全部 --</option>
|
||||
{foreach $bases as $base}{if $base.code eq input('get.usertype')}
|
||||
<option selected value="{$base.code|default=''}">{$base.name|default=''} ( {$base.code|default=''} )</option>
|
||||
{else}
|
||||
<option value="{$base.code|default=''}">{$base.name|default=''} ( {$base.code|default=''} )</option>
|
||||
{/if}{/foreach}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
{/notempty}
|
||||
|
||||
<div class="layui-form-item layui-inline">
|
||||
<label class="layui-form-label">用户账号</label>
|
||||
<label class="layui-input-inline">
|
||||
@ -37,7 +54,7 @@
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item layui-inline">
|
||||
<input type="hidden" name="type" value="{$type|default='all'}">
|
||||
<input type="hidden" name="type" value="{$type|default='index'}">
|
||||
<button class="layui-btn layui-btn-primary"><i class="layui-icon"></i> 搜 索</button>
|
||||
</div>
|
||||
</form>
|
||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -308,8 +308,8 @@
|
||||
}
|
||||
|
||||
.uploadimage {
|
||||
width: 77px;
|
||||
height: 77px;
|
||||
width: 76px;
|
||||
height: 76px;
|
||||
cursor: pointer;
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
|
@ -188,6 +188,12 @@ fieldset {
|
||||
}
|
||||
}
|
||||
|
||||
.layui-form-select dl {
|
||||
top: 37px;
|
||||
padding: 0;
|
||||
border-color: @InputBorderActiveColor;
|
||||
}
|
||||
|
||||
/*! 搜索表单样式 */
|
||||
.form-search {
|
||||
.layui-btn {
|
||||
@ -230,6 +236,7 @@ fieldset {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* 表单验证异常提示 */
|
||||
.label-required {
|
||||
&-prev:before {
|
||||
@ -260,7 +267,8 @@ fieldset {
|
||||
}
|
||||
}
|
||||
|
||||
.layui-input, .layui-select {
|
||||
.layui-input,
|
||||
.layui-select {
|
||||
line-height: 38px;
|
||||
border-color: @InputBorderNormalColor;
|
||||
|
||||
@ -269,7 +277,8 @@ fieldset {
|
||||
}
|
||||
}
|
||||
|
||||
.layui-disabled, .layui-disabled:hover {
|
||||
.layui-disabled,
|
||||
.layui-disabled:hover {
|
||||
color: #333 !important;
|
||||
background: #EEE !important;
|
||||
}
|
||||
@ -280,18 +289,21 @@ fieldset {
|
||||
}
|
||||
}
|
||||
|
||||
label.think-radio, label.think-checkbox {
|
||||
label.think-radio,
|
||||
label.think-checkbox {
|
||||
cursor: pointer;
|
||||
margin-right: 10px;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.think-radio, .think-checkbox {
|
||||
.think-radio,
|
||||
.think-checkbox {
|
||||
margin-top: 10px;
|
||||
font-weight: 400;
|
||||
line-height: 18px;
|
||||
|
||||
input[type=radio], input[type=checkbox] {
|
||||
input[type=radio],
|
||||
input[type=checkbox] {
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
cursor: pointer;
|
||||
@ -354,7 +366,6 @@ label.think-radio, label.think-checkbox {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.layui-table {
|
||||
td, th {
|
||||
font-size: 12px;
|
||||
@ -410,13 +421,13 @@ table.layui-table {
|
||||
.layui-btn.layui-btn-sm {
|
||||
margin-top: -1px;
|
||||
}
|
||||
}
|
||||
|
||||
table.layui-table[lay-size="lg"] {
|
||||
input.layui-input, .layui-btn.layui-btn-sm {
|
||||
height: 38px;
|
||||
line-height: 38px;
|
||||
box-sizing: border-box;
|
||||
&[lay-size="lg"] {
|
||||
input.layui-input, .layui-btn.layui-btn-sm {
|
||||
height: 38px;
|
||||
line-height: 38px;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -510,7 +521,6 @@ table.layui-table[lay-size="lg"] {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/** 手机盒子及微信菜单 */
|
||||
.mobile-preview {
|
||||
width: 317px;
|
||||
|
Loading…
x
Reference in New Issue
Block a user