Browse Source

v2.3.0版本

master
huangww 7 years ago
parent
commit
338faf070b
6 changed files with 97626 additions and 5526 deletions
  1. 10787
      35数据库设计/1hjz.cdm
  2. 432
      35数据库设计/1hjz.sql
  3. 42034
      35数据库设计/v2.3.0/1hjz.cdm
  4. 48002
      35数据库设计/v2.3.0/1hjz.pdm
  5. 1827
      35数据库设计/v2.3.0/1hjz.sql
  6. 70
      35数据库设计/v2.3.0/1hjz_v2.3.0.sql

10787
35数据库设计/1hjz.cdm
File diff suppressed because it is too large
View File

432
35数据库设计/1hjz.sql

@ -1,6 +1,6 @@
/*==============================================================*/
/* DBMS name: MySQL 5.0 */
/* Created on: 2018/6/28 18:05:16 */
/* Created on: 2018/8/16 14:49:37 */
/*==============================================================*/
@ -18,6 +18,8 @@ drop table if exists activity_log;
drop table if exists address;
drop table if exists address_ext;
drop table if exists admin_info;
drop table if exists book;
@ -26,14 +28,28 @@ drop table if exists book_detail;
drop table if exists book_log;
drop table if exists book_serve;
drop table if exists book_serve_attachment;
drop table if exists book_serve_log;
drop table if exists channel;
drop table if exists cleaner_attendance_appeal;
drop table if exists cleaner_attendance_appeal_log;
drop table if exists cleaner_blacklists;
drop table if exists cleaner_district;
drop table if exists cleaner_info;
drop table if exists cleaner_leave_application;
drop table if exists cleaner_leave_application_log;
drop table if exists cleaner_pool;
drop table if exists cleaner_pool_log;
@ -56,6 +72,10 @@ drop table if exists distribution_config;
drop table if exists enchashment_record;
drop table if exists enchashment_record2;
drop table if exists function_permission;
drop table if exists merchant;
drop table if exists merchant_auth_area;
@ -64,6 +84,10 @@ drop table if exists merchant_log;
drop table if exists merchant_mall_img;
drop table if exists message_info;
drop table if exists notice_desc;
drop table if exists order_log;
drop table if exists permission_info;
@ -80,6 +104,10 @@ drop table if exists role_permission;
drop table if exists service_card;
drop table if exists service_card_operate;
drop table if exists service_evaluation;
drop table if exists sms_template;
drop table if exists system_config;
@ -117,6 +145,7 @@ create table account_flow
(
id bigint not null comment '主键ID',
user_recommend_id bigint,
relation_id bigint,
account_info_id bigint not null comment '主键ID',
flow_no varchar(32) not null comment '流水编号',
create_time bigint default 0 comment '创建时间',
@ -296,6 +325,42 @@ create table address
alter table address comment '地址';
/*==============================================================*/
/* Table: address_ext */
/*==============================================================*/
create table address_ext
(
id bigint not null comment '主键',
book_serve_id2 bigint,
book_serve_id bigint comment '主键',
address_id bigint not null default 0 comment '地址id',
version_id int not null default 0 comment '版本号',
user_id varchar(32) not null comment '用户id',
building_type tinyint default 0 comment '房屋类型',
room_type tinyint default 0 comment '房间数量',
parlour_num_type tinyint default 0 comment '客厅数量',
kitchen_num_type tinyint default 0 comment '厨房数量',
toilet_num_type tinyint default 0 comment '卫生间数量',
balcony_num_type tinyint default 0 comment '阳台数量',
member_num_type tinyint default 0 comment '成员数量类型',
square_type tinyint default 0 comment '面积范围',
disposition_type tinyint default 0 comment '户主性格类型',
sofa_type tinyint default 0 comment '沙发类型',
pet_plant varchar(255) comment '宠物和盆栽情况',
valuables_desc varchar(255) comment '贵重物情况',
hygiene_type tinyint default 0 comment '卫生程度',
clean_level tinyint default 0 comment '服务需求',
consumer_desc varchar(255) comment '用户兴趣和生活习惯',
created_by varchar(32) comment '创建人',
created_at bigint default 0 comment '创建时间',
updated_by varchar(32) comment '更新人',
updated_at bigint default 0 comment '更新时间',
del_flag tinyint default 0 comment '删除标识',
primary key (id)
);
alter table address_ext comment '地址附加信息';
/*==============================================================*/
/* Table: admin_info */
/*==============================================================*/
@ -303,6 +368,7 @@ create table admin_info
(
id bigint unsigned not null,
user_id2 bigint,
merchant_id bigint not null,
merchant_no national varchar(32) comment '商户编号',
user_id national varchar(32) comment '用户id',
nick_name national varchar(20) comment '昵称',
@ -356,7 +422,7 @@ create table book_detail
(
id bigint unsigned not null,
cleaner_info_id bigint,
default_cleaner_id bigint comment '默认保洁师id',
default_cleaner_id bigint,
service_card_id bigint not null comment '主键ID',
merchant_no national varchar(32) not null comment '商家编号',
card_type tinyint default 0 comment '服务卡类型',
@ -368,11 +434,13 @@ create table book_detail
time_type tinyint default 0 comment '时间类型',
cleaner_name national varchar(32) comment '保洁师名称',
full_address national varchar(128) comment '服务地址',
address_id bigint unsigned not null,
address_telephone national varchar(16) comment '联系人号码',
linkman national varchar(16) comment '联系人姓名',
lng decimal(10,6) default 0.000000 comment '经度',
lat decimal(10,6) default 0.000000 comment '纬度',
square int default 0 comment '房屋面积',
district_id int default 0 comment '区域id',
region_id int default 0 comment '区域id',
created_at bigint unsigned default 0 comment '创建时间',
created_by national varchar(32) comment '创建者',
@ -384,6 +452,11 @@ create table book_detail
cleaner_comment national varchar(255) comment '保洁师评价',
has_check tinyint default 0 comment '保洁师是否已查看 0否1是',
has_send tinyint default 0 comment '是否已发送短信 只有待服务的状态下才体现 0否 1是',
default_cleaner_name varchar(50) comment '默认保洁师名称',
amap_lng decimal(10,6) default 0.000000 comment '高德经度',
amap_lat decimal(10,6) default 0.000000 comment '高德纬度',
push_status tinyint comment '推送标识:0-未推送,1-已推送',
push_at datetime comment '推送时间',
primary key (id)
);
@ -411,6 +484,93 @@ create table book_log
alter table book_log comment '预约日志';
/*==============================================================*/
/* Table: book_serve */
/*==============================================================*/
create table book_serve
(
book_detail_id bigint not null,
id bigint not null comment '主键',
cleaner_pool_id bigint not null,
serve_no varchar(32) not null comment '服务单号',
region_id int not null default 0 comment '服务区域id',
user_id varchar(32) not null comment '用户id',
card_no varchar(32) comment '服务卡编号',
linkman varchar(32) not null comment '联系人姓名',
address_telephone varchar(16) not null comment '联系人电话',
full_address varchar(255) not null comment '服务地址',
address_id bigint not null default 0 comment '住址区域id',
district_id int not null default 0 comment '服务区域id',
lng decimal(10,6) default 0.000000 comment '经度',
lat decimal(10,6) default 0.000000 comment '纬度',
status tinyint default 0 comment '状态',
evaluation_of_consumer tinyint default 0 comment '对客户评价',
remark_of_consumer varchar(255) comment '对客户备注',
remark varchar(255) comment '备注',
created_by varchar(32) not null comment '创建人id',
created_at bigint not null default 0 comment '创建时间',
updated_by varchar(32) not null comment '更新人id',
updated_at bigint not null default 0 comment '更新时间',
del_flag tinyint default 0 comment '删除标识',
has_log tinyint default 0 comment '保洁师是否评价 0否1是',
has_send tinyint default 0 comment '是否已发送短信 0否 1是',
work_start bigint default 0 comment '开始工作时间',
work_start_status tinyint default 0 comment '上班卡状态 AttendanceStatusEnum',
work_start_distance int default -1 comment '上班卡距离',
work_stop bigint default 0 comment '结束工作时间',
work_stop_status tinyint default 0 comment '下班卡状态 AttendanceStatusEnum',
work_attendance tinyint default 0 comment '打卡情况 AttendanceStatusEnum',
primary key (book_detail_id, id)
);
alter table book_serve comment '服务订单详情';
/*==============================================================*/
/* Table: book_serve_attachment */
/*==============================================================*/
create table book_serve_attachment
(
id bigint not null comment '主键',
book_serve_id2 bigint not null,
book_serve_id bigint not null comment '主键',
attachment_no varchar(32) not null comment '附件编号',
merchant_no varchar(32) not null comment '商户号',
name varchar(128) not null comment '附件名',
type tinyint not null default 0 comment '附件类型',
attachment_url varchar(255) not null comment '附件地址',
created_by varchar(32) not null comment '创建人',
created_at bigint not null default 0 comment '创建时间',
status tinyint default 0 comment '状态',
del_flag tinyint default 0 comment '删除标识',
primary key (id)
);
alter table book_serve_attachment comment '服务单附件表';
/*==============================================================*/
/* Table: book_serve_log */
/*==============================================================*/
create table book_serve_log
(
book_serve_id2 bigint,
book_serve_id bigint comment '主键',
id bigint,
merchant_no varchar(32),
user_id char(32),
client_type tinyint,
opt_type int,
created_at bigint,
created_by varchar(32),
status tinyint,
del_flag tinyint,
client_ip varchar(50),
remark text,
lng decimal(10,6),
lat decimal(10,6)
);
alter table book_serve_log comment '服务工单流水';
/*==============================================================*/
/* Table: channel */
/*==============================================================*/
@ -432,19 +592,72 @@ create table channel
primary key (id)
);
/*==============================================================*/
/* Table: cleaner_attendance_appeal */
/*==============================================================*/
create table cleaner_attendance_appeal
(
id bigint not null comment '主键',
book_serve_id2 bigint not null,
book_serve_id bigint not null comment '主键',
appeal_no varchar(32) not null comment '申诉编号',
merchant_no varchar(32) not null comment '商户编号',
book_time date not null comment '服务日期',
time_type tinyint not null default 0 comment '服务时间',
full_address varchar(255) not null comment '服务地址',
linkman varchar(255) not null comment '联系人',
address_telephone varchar(16) not null comment '联系号码',
created_by varchar(32) not null comment '用户id',
created_at bigint not null default 0 comment '发起申诉时间',
appeal_reason varchar(255) not null comment '申诉原因',
appeal_img varchar(255) comment '申诉图片',
status tinyint default 0 comment '状态',
type tinyint default 0 comment '申诉类型',
attendance_time_type tinyint default 0 comment '0上班卡 1下班卡 AttendanceTimeEnum',
updated_by varchar(32) comment '更新人',
updated_at bigint default 0 comment '更新时间',
del_flag tinyint default 0 comment '删除标识',
primary key (id)
);
alter table cleaner_attendance_appeal comment '保洁师考勤申诉记录';
/*==============================================================*/
/* Table: cleaner_attendance_appeal_log */
/*==============================================================*/
create table cleaner_attendance_appeal_log
(
id bigint not null comment '主键',
cleaner_attendance_appeal_id bigint not null comment '主键',
merchant_no varchar(32) not null comment '商户编号',
serve_no varchar(32) not null comment '服务单号',
opt_user_id varchar(32) not null comment '审核人id',
opt_type tinyint not null default 0 comment '操作类型',
appeal_type tinyint not null default 0 comment '申诉类型',
client_type tinyint default 0 comment '用户类型',
status tinyint not null default 0 comment '状态',
created_at bigint not null default 0 comment '审核时间',
review_comment varchar(255) not null comment '审核内容',
client_id varchar(64) not null comment '审核人ip',
primary key (id)
);
alter table cleaner_attendance_appeal_log comment '保洁师考勤申诉审核记录';
/*==============================================================*/
/* Table: cleaner_blacklists */
/*==============================================================*/
create table cleaner_blacklists
(
id int not null auto_increment comment 'id',
cleaner_id bigint not null comment '保洁师id',
consumer_id bigint not null comment '消费者id',
cleaner_id bigint not null,
consumer_id bigint not null,
cp_cleaner_name varchar(32) comment '保洁师名称',
create_at bigint comment '创建时间',
create_by varchar(32) comment '创建人',
update_at bigint comment '更新时间',
update_by varchar(32) comment '更新人',
status tinyint comment '状态:0-正常,1-解除',
remark varchar(100) comment '备注',
del_flag tinyint comment '删除标识:0-未删除,1-已删除',
primary key (id)
@ -513,6 +726,51 @@ create table cleaner_info
alter table cleaner_info comment '保洁师';
/*==============================================================*/
/* Table: cleaner_leave_application */
/*==============================================================*/
create table cleaner_leave_application
(
id bigint not null,
cleaner_pool_id bigint not null,
apply_no varchar(32) not null comment '申请编号',
merchant_no varchar(32) not null comment '商户编号',
begin_time bigint not null default 0 comment '请假开始时间',
end_time bigint not null default 0 comment '请假结束时间',
leave_reason varchar(255) not null comment '请假理由',
leave_days float not null default 0 comment '请假天数',
swap_user_id varchar(32) not null comment '调班对象id',
swap_remark varchar(255) not null comment '调班备注',
created_by varchar(32) not null comment '创建人',
created_at bigint not null default 0 comment '创建时间',
updated_by varchar(32) not null comment '更新人',
updated_at bigint not null default 0 comment '更新时间',
status tinyint not null default 0 comment '状态',
del_flag tinyint not null default 0 comment '删除标识',
primary key (id)
);
alter table cleaner_leave_application comment '保洁师请假申请';
/*==============================================================*/
/* Table: cleaner_leave_application_log */
/*==============================================================*/
create table cleaner_leave_application_log
(
id bigint not null comment '主键',
cleaner_leave_application_id bigint not null,
merchant_no varchar(32) not null comment '商户编号',
opt_user_id varchar(32) not null comment '审核/操作人id',
opt_type tinyint not null default 0 comment '操作类型',
created_at bigint not null default 0 comment '操作时间',
opt_remark varchar(255) not null comment '操作备注',
client_id varchar(64) not null comment '操作者ip',
client_type tinyint,
primary key (id)
);
alter table cleaner_leave_application_log comment '请假审核日志';
/*==============================================================*/
/* Table: cleaner_pool */
/*==============================================================*/
@ -600,6 +858,7 @@ alter table consumer_evaluated comment '销售对客户评价';
create table consumer_info
(
id bigint unsigned not null,
channel_id int comment 'id',
user_id bigint,
nick_name varchar(255) comment '昵称',
mobile national varchar(20) comment '手机号',
@ -771,6 +1030,44 @@ create table enchashment_record
alter table enchashment_record comment '提现记录表';
/*==============================================================*/
/* Table: enchashment_record2 */
/*==============================================================*/
create table enchashment_record2
(
id bigint not null,
enchashment_no national varchar(32) not null comment '提现记录编号',
trans_amount bigint default 0 comment '提现金额',
bank_name national varchar(20) default '0' comment '开户银行',
bank_account national varchar(50) default '0' comment '银行账号',
account_name national varchar(20) default '0' comment '开户名称',
create_time bigint default 0 comment '创建时间',
status tinyint default 0 comment '状态 0 未审核 1 审核通过 2 审核不通过',
remark national varchar(50) default '0' comment '描述信息',
del_flag tinyint default 0 comment '删除标志 0正常 1删除',
update_at bigint default 0 comment '更新时间',
update_by national varchar(32) default '0' comment '更新人',
primary key (id)
);
alter table enchashment_record2 comment '提现记录';
/*==============================================================*/
/* Table: function_permission */
/*==============================================================*/
create table function_permission
(
id int not null auto_increment comment 'id',
name varchar(50) comment '名称',
url varchar(200) comment 'url',
method varchar(20) comment '请求方式:GET,POST,PUT,DELETE',
create_time bigint comment '创建时间',
del_flag tinyint,
primary key (id)
);
alter table function_permission comment '功能权限';
/*==============================================================*/
/* Table: merchant */
/*==============================================================*/
@ -870,6 +1167,51 @@ create table merchant_mall_img
alter table merchant_mall_img comment '商户对应的商城banner、广告图配置';
/*==============================================================*/
/* Table: message_info */
/*==============================================================*/
create table message_info
(
id bigint not null,
notice_desc_id bigint not null,
cleaner_leave_application_id bigint not null,
cleaner_leave_application_id2 bigint not null,
message_no national varchar(32) not null comment '消息编号',
merchant_no national varchar(32) not null comment '商户编号',
user_id national varchar(32) not null comment '用户id',
type tinyint not null default 0 comment '消息类型',
created_by national varchar(32) not null comment '创建人',
created_at bigint not null default 0 comment '创建时间',
status tinyint not null default 0 comment '状态',
del_flag tinyint not null default 0 comment '删除标识',
primary key (id)
);
alter table message_info comment '消息列表';
/*==============================================================*/
/* Table: notice_desc */
/*==============================================================*/
create table notice_desc
(
id bigint not null,
merchant_no varchar(32) not null comment '商户编号',
notice_no varchar(32) not null comment '公告编号',
notice_type tinyint not null default 0 comment '公告类型',
notice_title varchar(64) not null comment '公告标题',
notice_img varchar(255) not null comment '公告配图',
notice_content text not null comment '公告内容',
created_by varchar(32) not null comment '创建人',
created_at bigint not null default 0 comment '创建时间',
updated_by varchar(32) not null comment '更新人',
updated_at bigint not null default 0 comment '更新时间',
status tinyint default 0 comment '状态',
del_flag tinyint default 0 comment '删除标识',
primary key (id)
);
alter table notice_desc comment '公告信息表';
/*==============================================================*/
/* Table: order_log */
/*==============================================================*/
@ -898,13 +1240,23 @@ create table permission_info
(
id int(20) not null auto_increment comment '权限ID',
permission_name national varchar(32) comment '权限名称',
permission_url varchar(200) comment 'URL',
parent_id bigint comment '父级菜单',
level int comment '级别',
icon varchar(50) comment '图标',
sort bigint comment '排序',
type tinyint comment '权限类型:1-菜单,2-菜单组',
create_by varchar(32) comment '创建人',
create_time bigint default 0 comment '创建时间',
update_by varchar(32) comment '更新人',
update_at bigint comment '更新时间',
fids varchar(200) comment '功能权限id集合:逗号分隔',
remark national varchar(64) comment '备注',
del_flag tinyint default 0 comment '删除标志',
primary key (id)
);
alter table permission_info comment '权限';
alter table permission_info comment '菜单权限';
/*==============================================================*/
/* Table: refund_process */
@ -974,7 +1326,11 @@ create table role_info
(
id int(20) not null auto_increment comment '角色ID',
role_name national varchar(100) comment '角色名',
create_time bigint default 0 comment '创建时间',
status tinyint default 0 comment '状态:0-正常,1-禁止',
create_time bigint comment '创建时间',
create_by varchar(32) comment '创建人',
update_time bigint comment '更新时间',
update_by varchar(32) comment '更新人',
remark national varchar(64) comment '备注',
del_flag tinyint default 0 comment '删除标志',
primary key (id)
@ -987,18 +1343,14 @@ alter table role_info comment '角色';
/*==============================================================*/
create table role_permission
(
id bigint not null comment '主键ID',
role_info_id int(20) comment '角色ID',
permission_info_id int(20) comment '权限ID',
permission_id int(20) not null comment '权限ID',
role_id int(20) not null comment '角色ID',
role_name national varchar(100) comment '角色名',
permission_id bigint default 0 comment '权限ID',
permission_name national varchar(32) comment '权限名',
del_flag tinyint default 0 comment '删除标志',
primary key (id)
primary key (permission_id, role_id)
);
alter table role_permission comment '角色与权限';
/*==============================================================*/
/* Table: service_card */
/*==============================================================*/
@ -1044,6 +1396,44 @@ create table service_card
alter table service_card comment '服务卡';
/*==============================================================*/
/* Table: service_card_operate */
/*==============================================================*/
create table service_card_operate
(
id int not null auto_increment,
card_id bigint comment '主键ID',
card_no varchar(32),
operate_content varchar(255),
create_at bigint,
create_by varchar(32),
primary key (id)
);
alter table service_card_operate comment '服务卡操作记录';
/*==============================================================*/
/* Table: service_evaluation */
/*==============================================================*/
create table service_evaluation
(
id int not null auto_increment,
book_id bigint,
consumer_id bigint,
book_no varchar(32) comment '预约编号',
evaluation_no varchar(32),
time_score int,
service_score int,
profession_score int,
create_at bigint,
content varchar(255),
status tinyint comment '状态:0-待回访,1-已回访',
feedback_at bigint,
feedback_content varchar(255),
feedback_by varchar(32),
primary key (id)
);
/*==============================================================*/
/* Table: sms_template */
/*==============================================================*/
@ -1225,16 +1615,16 @@ alter table user_recommend comment '推荐表';
/*==============================================================*/
create table user_role
(
admin_info_id bigint not null,
id bigint not null comment '主键id',
role_info_id int(20) comment '角色ID',
id int not null auto_increment comment '主键id',
user_id bigint not null,
role_id int(20) not null comment '角色ID',
nick_name national varchar(20) comment '用户昵称',
role_name national varchar(100) comment '角色名',
create_time bigint default 0 comment '创建时间',
open_time bigint default 0 comment '开通时间',
close_time bigint default 0 comment '关闭时间',
create_time bigint comment '创建时间',
open_time bigint comment '开通时间',
close_time bigint comment '关闭时间',
del_flag tinyint default 0 comment '删除标志',
primary key (admin_info_id, id)
primary key (id)
);
alter table user_role comment '用户角色';
@ -1303,6 +1693,7 @@ create table vgoods
sale_profit int default 0 comment '分销提成,万分比',
sequence_num int default 0 comment '排序',
is_show_coupon tinyint comment '优惠券展示:0-不展示,1-展示',
sale_type tinyint comment '分销类型:1-实付比例,2-固定金额',
primary key (id)
);
@ -1407,6 +1798,7 @@ create table vorder
del_flag tinyint default 0 comment '删除标志',
sale_profit int default 0 comment '分销',
order_type tinyint comment '订单类型',
sale_type tinyint comment '分销类型:1-实付比例,2-固定金额',
primary key (id)
);

42034
35数据库设计/v2.3.0/1hjz.cdm
File diff suppressed because it is too large
View File

48002
35数据库设计/v2.3.0/1hjz.pdm
File diff suppressed because it is too large
View File

1827
35数据库设计/v2.3.0/1hjz.sql
File diff suppressed because it is too large
View File

70
35数据库设计/v2.3.0/1hjz_v2.3.0.sql

@ -0,0 +1,70 @@
/*==============================================================*/
/* Table: service_card_operate */
/*==============================================================*/
create table service_card_operate
(
id bigint not null auto_increment comment '主键id',
card_id bigint comment '服务卡id',
card_no varchar(32) comment '服务卡编号',
operate_content varchar(255) comment '操作内容',
create_at bigint default 0 comment '创建时间',
create_by varchar(32) comment '创建人',
primary key (id)
);
alter table service_card_operate comment '服务卡操作记录';
/*==============================================================*/
/* Table: function_permission */
/*==============================================================*/
create table function_permission
(
id int not null auto_increment comment 'id',
name varchar(50) comment '名称',
url varchar(200) comment 'url',
method varchar(20) comment '请求方式:GET,POST,PUT,DELETE',
create_time bigint default 0 comment '创建时间',
del_flag tinyint default 0 comment '删除标识:0-未删除,1-已删除',
primary key (id)
);
alter table function_permission comment '功能权限';
/*==============================================================*/
/* Table: role_info */
/*==============================================================*/
alter table role_info
add column status tinyint default 0 comment '状态:0-正常,1-禁止',
add column create_by varchar(32) comment '创建人',
add column update_time bigint comment '更新时间',
add column update_by varchar(32) comment '更新人';
/*==============================================================*/
/* Table: permission_info */
/*==============================================================*/
alter table permission_info
add column permission_url varchar(200) comment 'URL',
add column parent_id bigint comment '父级菜单',
add column level int comment '级别',
add column icon varchar(50) comment '图标',
add column sort bigint comment '排序',
add column type tinyint default 1 comment '权限类型:1-菜单,2-菜单组',
add column create_by varchar(32) comment '创建人',
add column update_time bigint comment '更新时间',
add column update_by varchar(32) comment '更新人',
add column fids varchar(200) comment '功能权限id集合:逗号分隔';
-- 更新用户状态
UPDATE
admin_info a
SET a.STATUS = '0'
WHERE
a.`status` = 1;
UPDATE
admin_info a
SET a.STATUS = '1'
WHERE
a.`status` in ('2','10','20','21')
Loading…
Cancel
Save