记得上下班打卡 | git大法好,push需谨慎

Commit fcf6228c authored by 张国柄's avatar 张国柄

dm;

parent fc02dd8d
......@@ -16,24 +16,10 @@ create table adam_third_party
comment text
) engine = InnoDB comment '用户第三方账号信息';
create index idx_third_party_uid_platform on adam_third_party (uid, platform);
create index idx_third_party_state on adam_third_party (state);
# MDB.idx:uid,state
-- >>------------------------------------------------------------------------------------
# drop table if exists adam_login;
# create table adam_login
# (
# mid int unsigned auto_increment primary key,
# mobile varchar(16),
# platform varchar(20) comment '平台名称',
# entrance varchar(20) comment '入口标记:Wechat、H5、App',
# source varchar(20) comment '来源终端',
# version varchar(20) comment '终端版本',
# client_ip varchar(20),
# client_area varchar(30),
# created_at datetime
# ) engine = InnoDB comment '登录记录';
# create index idx_login_mobile on adam_login (mobile);
create index idx_athird_party_uid_platform on adam_third_party (uid, platform);
create index idx_athird_party_state on adam_third_party (state);
create index idx_athird_party_open_id on adam_third_party (open_id);
# MDB.idx:uid,open_id,platform,state
-- >>------------------------------------------------------------------------------------
# drop table if exists adam_device_token;
# create table adam_device_token
......@@ -49,7 +35,7 @@ create index idx_third_party_state on adam_third_party (state);
# comment text
# ) engine = InnoDB comment 'TOKEN';
#
# create index idx_device_token_uid on adam_device_token (uid);
# create index idx_adevice_token_uid on adam_device_token (uid);
-- >>------------------------------------------------------------------------------------
drop table if exists adam_user;
create table adam_user
......@@ -67,7 +53,9 @@ create table adam_user
comment text
) ENGINE = InnoDB comment '用户';
create unique index uidx_user_uid on adam_user (uid);
create unique index uidx_auser_uid on adam_user (uid);
create index idx_auser_mobile on adam_user (mobile);
# MDB.idx:uid,mobile,state
-- >>------------------------------------------------------------------------------------
drop table if exists adam_user_info;
create table adam_user_info
......@@ -89,7 +77,7 @@ create table adam_user_info
comment text
) engine = InnoDB comment '用户信息';
create unique index idx_user_info_uid on adam_user_info (uid);
create unique index idx_auser_info_uid on adam_user_info (uid);
-- >>------------------------------------------------------------------------------------
drop table if exists adam_real_name;
create table adam_real_name
......@@ -106,17 +94,16 @@ create table adam_real_name
comment text
) engine = InnoDB comment '实名信息';
create unique index idx_real_name_id on adam_real_name (real_name_id);
create index idx_real_name_id_card_type on adam_real_name (id_card, type);
create index idx_real_name_uid on adam_real_name (uid);
create index idx_real_name_state on adam_real_name (state);
create unique index idx_areal_name_id on adam_real_name (real_name_id);
create index idx_areal_name_id_card_type on adam_real_name (id_card, type);
create index idx_areal_name_uid on adam_real_name (uid);
create index idx_areal_name_state on adam_real_name (state);
# MDB.idx:uid,state
-- >>------------------------------------------------------------------------------------
drop table if exists adam_enters;
create table adam_enters
(
mid bigint unsigned auto_increment primary key,
# `user_id` int(11) NOT NULL DEFAULT '0' COMMENT '用户id',
enters_id varchar(64) not null,
uid varchar(64) not null comment '用户id',
type tinyint not null default '1' comment '1-大陆身份证,2-港澳通行证,3-台胞证,4-护照,5-军官证',
......@@ -124,7 +111,6 @@ create table adam_enters
mobile varchar(20) not null default '' comment '入场人手机号',
id_card varchar(20) not null default '' comment '入场人身份号码,或护照号码',
is_default boolean not null default false comment '是否为默认:0-否,1-是,第一个入默认1',
# is_certification enum ('yes','no') not null default 'no' comment '入场人的身份证号是否认证',
state tinyint not null comment '状态:0-INIT,1-NORMAL,2-INVALID',
created_at datetime(3) not null,
updated_at datetime(3),
......@@ -132,8 +118,9 @@ create table adam_enters
comment text
) engine = InnoDB comment ='入场人';
create unique index uidx_enters_id on adam_enters (enters_id);
create index idx_enters_uid on adam_enters (uid);
create unique index uidx_aenters_id on adam_enters (enters_id);
create index idx_aenters_uid_state on adam_enters (uid, state);
# MDB.idx:uid,state
-- >>------------------------------------------------------------------------------------
drop table if exists adam_addresses;
create table adam_addresses
......@@ -141,14 +128,13 @@ create table adam_addresses
mid bigint unsigned auto_increment not null primary key,
addresses_id varchar(64) not null,
uid varchar(64) not null,
name varchar(30) not null comment '姓名',
name varchar(120) not null comment '姓名',
phone varchar(30) not null comment '手机号',
province varchar(30) not null comment '省份',
city varchar(30) not null comment '城市',
county varchar(30) not null comment '区县',
address varchar(100) not null comment '详细地址',
city varchar(50) not null comment '城市',
county varchar(60) not null comment '区县',
address varchar(750) not null comment '详细地址',
is_default boolean not null default false comment '是否为默认:0-否,1-是,第一个默认1',
# is_certification enum ('yes','no') not null default 'no' comment '入场人的身份证号是否认证',
state tinyint not null comment '状态:0-INIT,1-NORMAL,2-INVALID',
created_at datetime(3) not null,
updated_at datetime(3),
......@@ -156,8 +142,9 @@ create table adam_addresses
comment text
) engine = InnoDB comment '收货地址';
create unique index uidx_addresses_id on adam_addresses (addresses_id);
create index idx_addresses_uid on adam_addresses (uid);
create unique index uidx_aaddresses_id on adam_addresses (addresses_id);
create index idx_aaddresses_uid_state on adam_addresses (uid, state);
# MDB.idx:uid,state
-- >>------------------------------------------------------------------------------------
# drop table if exists adam_feedback;
# create table adam_feedback
......@@ -192,7 +179,10 @@ create table adam_collection
comment text
) engine = InnoDB comment '收藏';
create unique index uidx_collection_uid_content_id on adam_collection (uid, content_id);
create index idx_acollection_uid on adam_collection (uid);
create index idx_acollection_content_id on adam_collection (content_id);
create index idx_acollection_state on adam_collection (state);
# MDB.idx:uid,state,content_id
-- >>------------------------------------------------------------------------------------
drop table if exists adam_disposed;
create table adam_disposed
......@@ -206,8 +196,11 @@ create table adam_disposed
updated_at datetime(3),
comment text
) engine = InnoDB comment '想去';
create index idx_disposed_uid on adam_disposed (uid);
create index idx_disposed_content on adam_disposed (content_id);
create index idx_adisposed_uid on adam_disposed (uid);
create index idx_adisposed_content_id on adam_disposed (content_id);
create index idx_adisposed_state on adam_disposed (state);
# MDB.idx:uid,state,content_id
-- >>------------------------------------------------------------------------------------
drop table if exists adam_member;
create table adam_member
......@@ -235,6 +228,9 @@ create table adam_member
limitation int default 0 comment '限购数量,0不限购',
comment text
);
create unique index uidx_amember_id on adam_member (member_id);
# MDB.idx:member_id,state
-- >>------------------------------------------------------------------------------------
drop table if exists adam_member_price;
create table adam_member_price
......@@ -252,6 +248,10 @@ create table adam_member_price
updated_at datetime(3),
comment text
);
create unique index uidx_amember_price_id on adam_member_price (member_price_id);
create index idx_amember_price_member_id on adam_member_price (member_id);
# MDB.idx:member_id,state
-- >>------------------------------------------------------------------------------------
drop table if exists adam_member_order;
create table adam_member_order
......@@ -280,6 +280,9 @@ create table adam_member_order
version varchar(20),
comment text
);
create unique index uidx_amember_order_id on adam_member_order (order_no);
# MDB.idx:order_no
-- >>------------------------------------------------------------------------------------
drop table if exists adam_user_member;
create table adam_user_member
......@@ -294,6 +297,10 @@ create table adam_user_member
updated_at datetime(3),
comment text
);
create index idx_auser_member_uid on adam_user_member (uid);
create index idx_auser_member_no on adam_user_member (member_no);
# MDB.idx:uid,member_no
-- >>------------------------------------------------------------------------------------
drop table if exists adam_member_code;
create table adam_member_code
......@@ -315,6 +322,9 @@ create table adam_member_code
use_at datetime(3) default null,
comment text
);
create unique index uidx_amember_code_id on adam_member_code (code);
# MDB.idx:code
-- >>------------------------------------------------------------------------------------
-- >>------------------------------------------------------------------------------------
-- >>------------------------------------------------------------------------------------
......@@ -39,6 +39,8 @@ public class AdamDMAdminController extends AdamBaseController {
DMMemberOrderProcessor dmMemberOrderProcessor;
@Autowired
DMMemberCodeProcessor dmMemberCodeProcessor;
@Autowired
DMCollectionProcessor dmCollectionProcessor;
@ApiOperationSupport(order = 1)
@ApiOperation(value = "user")
......@@ -111,4 +113,12 @@ public class AdamDMAdminController extends AdamBaseController {
dmMemberCodeProcessor.handler();
return ResponseDto.success();
}
@ApiOperationSupport(order = 10)
@ApiOperation(value = "collect")
@GetMapping(value = {"collect"})
public ResponseDto<Object> dataMigrationForCollect() {
dmCollectionProcessor.handler();
return ResponseDto.success();
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment