fix
This commit is contained in:
@@ -1,133 +0,0 @@
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for x_file_category
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS x_file_category;
|
||||
CREATE TABLE x_file_category (
|
||||
id BIGSERIAL PRIMARY KEY,
|
||||
file_category VARCHAR(32) DEFAULT NULL,
|
||||
file_suffix VARCHAR(32) DEFAULT NULL,
|
||||
deleted BOOLEAN DEFAULT FALSE,
|
||||
create_by BIGINT DEFAULT NULL,
|
||||
create_time TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
||||
update_by BIGINT DEFAULT NULL,
|
||||
update_time TIMESTAMP DEFAULT NULL,
|
||||
proxy_by BIGINT DEFAULT NULL
|
||||
);
|
||||
COMMENT ON TABLE x_file_category IS '文件种类';
|
||||
COMMENT ON COLUMN x_file_category.id IS '主键ID';
|
||||
COMMENT ON COLUMN x_file_category.file_category IS '文件种类';
|
||||
COMMENT ON COLUMN x_file_category.file_suffix IS '文件后缀';
|
||||
COMMENT ON COLUMN x_file_category.deleted IS '是否删除';
|
||||
COMMENT ON COLUMN x_file_category.create_by IS '创建人';
|
||||
COMMENT ON COLUMN x_file_category.create_time IS '创建时间';
|
||||
COMMENT ON COLUMN x_file_category.update_by IS '修改人';
|
||||
COMMENT ON COLUMN x_file_category.update_time IS '修改时间';
|
||||
COMMENT ON COLUMN x_file_category.proxy_by IS '代理人';
|
||||
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for x_user_space
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS x_user_space;
|
||||
CREATE TABLE x_user_space (
|
||||
id BIGSERIAL PRIMARY KEY,
|
||||
user_id BIGINT DEFAULT NULL,
|
||||
total_size BIGINT DEFAULT NULL,
|
||||
used_size BIGINT DEFAULT NULL,
|
||||
deleted BOOLEAN DEFAULT FALSE,
|
||||
create_by BIGINT DEFAULT NULL,
|
||||
create_time TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
||||
update_by BIGINT DEFAULT NULL,
|
||||
update_time TIMESTAMP DEFAULT NULL,
|
||||
proxy_by BIGINT DEFAULT NULL
|
||||
);
|
||||
COMMENT ON TABLE x_user_space IS '用户空间';
|
||||
COMMENT ON COLUMN x_user_space.id IS '主键ID';
|
||||
COMMENT ON COLUMN x_user_space.user_id IS '用户id';
|
||||
COMMENT ON COLUMN x_user_space.total_size IS '总容量';
|
||||
COMMENT ON COLUMN x_user_space.used_size IS '已使用容量';
|
||||
COMMENT ON COLUMN x_user_space.deleted IS '是否删除';
|
||||
COMMENT ON COLUMN x_user_space.create_by IS '创建人';
|
||||
COMMENT ON COLUMN x_user_space.create_time IS '创建时间';
|
||||
COMMENT ON COLUMN x_user_space.update_by IS '修改人';
|
||||
COMMENT ON COLUMN x_user_space.update_time IS '修改时间';
|
||||
COMMENT ON COLUMN x_user_space.proxy_by IS '代理人';
|
||||
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for x_user_file
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS x_user_file;
|
||||
CREATE TABLE x_user_file (
|
||||
id BIGSERIAL PRIMARY KEY,
|
||||
user_id BIGINT DEFAULT NULL,
|
||||
root_type VARCHAR(2) DEFAULT NULL,
|
||||
file_type VARCHAR(32) DEFAULT NULL,
|
||||
file_name VARCHAR(256) DEFAULT NULL,
|
||||
parent_id BIGINT DEFAULT NULL,
|
||||
file_code VARCHAR(32) DEFAULT NULL,
|
||||
file_status VARCHAR(2) DEFAULT NULL,
|
||||
path VARCHAR(255) DEFAULT NULL,
|
||||
end_time TIMESTAMP DEFAULT NULL,
|
||||
access_code VARCHAR(6) DEFAULT NULL,
|
||||
deleted BOOLEAN DEFAULT FALSE,
|
||||
create_by BIGINT DEFAULT NULL,
|
||||
create_time TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
||||
update_by BIGINT DEFAULT NULL,
|
||||
update_time TIMESTAMP DEFAULT NULL,
|
||||
proxy_by BIGINT DEFAULT NULL
|
||||
);
|
||||
COMMENT ON TABLE x_user_file IS '用户文件';
|
||||
COMMENT ON COLUMN x_user_file.id IS '主键ID';
|
||||
COMMENT ON COLUMN x_user_file.user_id IS '用户id';
|
||||
COMMENT ON COLUMN x_user_file.root_type IS '根类型:1普通/2内穿外/3外传内/4我的分享';
|
||||
COMMENT ON COLUMN x_user_file.file_type IS '文件大类:1文件/2文件夹';
|
||||
COMMENT ON COLUMN x_user_file.file_name IS '文件名';
|
||||
COMMENT ON COLUMN x_user_file.parent_id IS '父id';
|
||||
COMMENT ON COLUMN x_user_file.file_code IS '文件编码';
|
||||
COMMENT ON COLUMN x_user_file.file_status IS '文件状态:1正常2失效11解析中12待审核13传输中';
|
||||
COMMENT ON COLUMN x_user_file.path IS '路径';
|
||||
COMMENT ON COLUMN x_user_file.end_time IS '有效期';
|
||||
COMMENT ON COLUMN x_user_file.access_code IS '访问码';
|
||||
COMMENT ON COLUMN x_user_file.deleted IS '是否删除';
|
||||
COMMENT ON COLUMN x_user_file.create_by IS '创建人';
|
||||
COMMENT ON COLUMN x_user_file.create_time IS '创建时间';
|
||||
COMMENT ON COLUMN x_user_file.update_by IS '修改人';
|
||||
COMMENT ON COLUMN x_user_file.update_time IS '修改时间';
|
||||
COMMENT ON COLUMN x_user_file.proxy_by IS '代理人';
|
||||
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for x_file_risk
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS x_file_risk;
|
||||
CREATE TABLE x_file_risk (
|
||||
id BIGSERIAL PRIMARY KEY,
|
||||
file_code VARCHAR(32) DEFAULT NULL,
|
||||
max_risk_level VARCHAR(2) DEFAULT NULL,
|
||||
risk_json TEXT DEFAULT NULL,
|
||||
dify_file_json TEXT DEFAULT NULL,
|
||||
deleted BOOLEAN DEFAULT FALSE,
|
||||
create_by BIGINT DEFAULT NULL,
|
||||
create_time TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
||||
update_by BIGINT DEFAULT NULL,
|
||||
update_time TIMESTAMP DEFAULT NULL,
|
||||
proxy_by BIGINT DEFAULT NULL,
|
||||
CONSTRAINT uk_file_code UNIQUE (file_code)
|
||||
);
|
||||
COMMENT ON TABLE x_file_risk IS '文件风险';
|
||||
COMMENT ON COLUMN x_file_risk.id IS '主键ID';
|
||||
COMMENT ON COLUMN x_file_risk.file_code IS '文件编码';
|
||||
COMMENT ON COLUMN x_file_risk.max_risk_level IS '最高风险等级:1重度/2中度/3轻度';
|
||||
COMMENT ON COLUMN x_file_risk.risk_json IS '风险详情JSON';
|
||||
COMMENT ON COLUMN x_file_risk.dify_file_json IS 'Dify文件上传响应JSON';
|
||||
COMMENT ON COLUMN x_file_risk.deleted IS '是否删除';
|
||||
COMMENT ON COLUMN x_file_risk.create_by IS '创建人';
|
||||
COMMENT ON COLUMN x_file_risk.create_time IS '创建时间';
|
||||
COMMENT ON COLUMN x_file_risk.update_by IS '修改人';
|
||||
COMMENT ON COLUMN x_file_risk.update_time IS '修改时间';
|
||||
COMMENT ON COLUMN x_file_risk.proxy_by IS '代理人';
|
||||
|
||||
|
||||
|
||||
67
db/file.sql
67
db/file.sql
@@ -1,67 +0,0 @@
|
||||
|
||||
CREATE TABLE `x_file_category` (
|
||||
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
|
||||
`file_category` varchar(32) DEFAULT NULL COMMENT '文件种类',
|
||||
`file_suffix` varchar(32) DEFAULT NULL COMMENT '文件后缀',
|
||||
|
||||
`deleted` bit(1) DEFAULT b'0' COMMENT '是否删除',
|
||||
`create_by` bigint(20) DEFAULT NULL COMMENT '创建人',
|
||||
`create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
`update_by` bigint(20) DEFAULT NULL COMMENT '修改人',
|
||||
`update_time` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
|
||||
`proxy_by` bigint(20) DEFAULT NULL COMMENT '代理人',
|
||||
PRIMARY KEY (`id`) USING BTREE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='文件种类';
|
||||
|
||||
CREATE TABLE `x_user_space` (
|
||||
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
|
||||
`user_id` bigint(20) DEFAULT NULL COMMENT '用户id',
|
||||
`total_size` bigint DEFAULT NULL COMMENT '总容量',
|
||||
`used_size` bigint DEFAULT NULL COMMENT '已使用容量',
|
||||
|
||||
`deleted` bit(1) DEFAULT b'0' COMMENT '是否删除',
|
||||
`create_by` bigint(20) DEFAULT NULL COMMENT '创建人',
|
||||
`create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
`update_by` bigint(20) DEFAULT NULL COMMENT '修改人',
|
||||
`update_time` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
|
||||
`proxy_by` bigint(20) DEFAULT NULL COMMENT '代理人',
|
||||
PRIMARY KEY (`id`) USING BTREE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='用户空间';
|
||||
|
||||
CREATE TABLE `x_user_file` (
|
||||
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
|
||||
`user_id` bigint(20) DEFAULT NULL COMMENT '用户id',
|
||||
`root_type` varchar(2) DEFAULT NULL COMMENT '根类型:1普通/2内穿外/3外传内/4我的分享',
|
||||
`file_type` varchar(32) DEFAULT NULL COMMENT '文件大类:1文件/2文件夹',
|
||||
`file_name` varchar(256) DEFAULT NULL COMMENT '文件名',
|
||||
`parent_id` bigint(20) DEFAULT NULL COMMENT '父id',
|
||||
`file_code` varchar(32) DEFAULT NULL COMMENT '文件编码',
|
||||
`file_status` varchar(2) DEFAULT NULL COMMENT '文件状态:1正常2失效11解析中12待审核13传输中',
|
||||
`path` varchar(255) DEFAULT NULL COMMENT '路径',
|
||||
`end_time` datetime DEFAULT NULL COMMENT '有效期',
|
||||
`access_code` varchar(6) DEFAULT NULL COMMENT '访问码',
|
||||
`deleted` bit(1) DEFAULT b'0' COMMENT '是否删除',
|
||||
`create_by` bigint(20) DEFAULT NULL COMMENT '创建人',
|
||||
`create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
`update_by` bigint(20) DEFAULT NULL COMMENT '修改人',
|
||||
`update_time` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
|
||||
`proxy_by` bigint(20) DEFAULT NULL COMMENT '代理人',
|
||||
PRIMARY KEY (`id`) USING BTREE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='用户文件';
|
||||
|
||||
CREATE TABLE `x_file_risk` (
|
||||
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
|
||||
`file_code` varchar(32) DEFAULT NULL COMMENT '文件编码',
|
||||
`max_risk_level` varchar(2) DEFAULT NULL COMMENT '最高风险等级:1重度/2中度/3轻度',
|
||||
`risk_json` text DEFAULT NULL COMMENT '风险详情JSON',
|
||||
`dify_file_json` text DEFAULT NULL COMMENT 'Dify文件上传响应JSON',
|
||||
|
||||
`deleted` bit(1) DEFAULT b'0' COMMENT '是否删除',
|
||||
`create_by` bigint(20) DEFAULT NULL COMMENT '创建人',
|
||||
`create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
`update_by` bigint(20) DEFAULT NULL COMMENT '修改人',
|
||||
`update_time` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
|
||||
`proxy_by` bigint(20) DEFAULT NULL COMMENT '代理人',
|
||||
PRIMARY KEY (`id`) USING BTREE,
|
||||
UNIQUE KEY `uk_file_code` (`file_code`) USING BTREE COMMENT '文件编码唯一索引'
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='文件风险';
|
||||
@@ -10,7 +10,7 @@ VALUES('senmesh', 'O001', '1', '440232', NULL, NULL, false, TRUE, TRUE, NULL, ''
|
||||
|
||||
INSERT INTO uc_user
|
||||
(username, password, type, supeiror, security_code, nickname, avatar, phone, phone_binding, real_name, card_no, authenticated, status, email, address, education, init_user_id, enabled, account_non_expired, account_non_locked, credentials_non_expired, deleted, create_by, create_time, update_by, update_time, proxy_by, gender, birthday)
|
||||
VALUES('admin', '$2a$10$0N3iaxx2sYv0hXvYzS4.6.yriL.DfjRTjED7Y4vkqxzbxi2dNpBou', 1, TRUE, '$2a$10$992AErI/g5nnfGnraSh7NuoeZVOXYcPuPQ3hqi5FjjIlU0Dwfk0/a', '平台管理员', '20d78fb6abe9478cadc2e1cb5bf93a35', '13611806907', TRUE, '平台管理员', NULL, FALSE, 2, null, NULL, NULL, NULL, TRUE, TRUE, TRUE, TRUE, FALSE, 0, now(), 1, NULL, NULL, NULL, NULL);
|
||||
VALUES('admin', '$2a$10$0N3iaxx2sYv0hXvYzS4.6.yriL.DfjRTjED7Y4vkqxzbxi2dNpBou', 1, TRUE, '$2a$10$mGA1jdBzq8micEr02KiJ9OiYQz1fc/PSVG0hN0EYUuxhZp8EI1M2q', '平台管理员', '', '13888888888', TRUE, '平台管理员', NULL, FALSE, 2, null, NULL, NULL, NULL, TRUE, TRUE, TRUE, TRUE, FALSE, 0, now(), 1, NULL, NULL, NULL, NULL);
|
||||
INSERT INTO uc_org_user
|
||||
(user_id, org_id, administrator, deleted, create_by, create_time, update_by, update_time, proxy_by)
|
||||
VALUES(1, 1, TRUE, FALSE, 0, now(), NULL, NULL, NULL);
|
||||
|
||||
@@ -985,41 +985,6 @@ COMMENT ON COLUMN uc_user_auth.update_by IS '更新人';
|
||||
COMMENT ON COLUMN uc_user_auth.update_time IS '更新时间';
|
||||
COMMENT ON COLUMN uc_user_auth.proxy_by IS '代理人';
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for uc_user_bank_account
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS uc_user_bank_account;
|
||||
CREATE TABLE uc_user_bank_account (
|
||||
id BIGSERIAL PRIMARY KEY,
|
||||
user_id BIGINT DEFAULT NULL,
|
||||
account_no VARCHAR(32) DEFAULT NULL,
|
||||
account_name VARCHAR(32) DEFAULT NULL,
|
||||
bank_name VARCHAR(64) DEFAULT NULL,
|
||||
bank_branch_name VARCHAR(64) DEFAULT NULL,
|
||||
default_account BOOLEAN DEFAULT NULL,
|
||||
deleted BOOLEAN DEFAULT FALSE,
|
||||
create_by BIGINT DEFAULT NULL,
|
||||
create_time TIMESTAMP DEFAULT NULL,
|
||||
update_by BIGINT DEFAULT NULL,
|
||||
update_time TIMESTAMP DEFAULT NULL,
|
||||
proxy_by BIGINT DEFAULT NULL
|
||||
);
|
||||
CREATE INDEX INDEX12379426737700 ON uc_user_bank_account(user_id);
|
||||
COMMENT ON TABLE uc_user_bank_account IS '用户银行卡表';
|
||||
COMMENT ON COLUMN uc_user_bank_account.id IS '主键';
|
||||
COMMENT ON COLUMN uc_user_bank_account.user_id IS '用户id';
|
||||
COMMENT ON COLUMN uc_user_bank_account.account_no IS '卡号';
|
||||
COMMENT ON COLUMN uc_user_bank_account.account_name IS '户名';
|
||||
COMMENT ON COLUMN uc_user_bank_account.bank_name IS '银行名';
|
||||
COMMENT ON COLUMN uc_user_bank_account.bank_branch_name IS '开户行名';
|
||||
COMMENT ON COLUMN uc_user_bank_account.default_account IS '是否默认账户';
|
||||
COMMENT ON COLUMN uc_user_bank_account.deleted IS '是否逻辑删除';
|
||||
COMMENT ON COLUMN uc_user_bank_account.create_by IS '创建人';
|
||||
COMMENT ON COLUMN uc_user_bank_account.create_time IS '创建时间';
|
||||
COMMENT ON COLUMN uc_user_bank_account.update_by IS '更新人';
|
||||
COMMENT ON COLUMN uc_user_bank_account.update_time IS '更新时间';
|
||||
COMMENT ON COLUMN uc_user_bank_account.proxy_by IS '代理人';
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for uc_user_cancel
|
||||
-- ----------------------------
|
||||
@@ -1145,39 +1110,6 @@ COMMENT ON COLUMN uc_user_face.update_by IS '更新人';
|
||||
COMMENT ON COLUMN uc_user_face.update_time IS '更新时间';
|
||||
COMMENT ON COLUMN uc_user_face.proxy_by IS '代理人';
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for uc_user_identity_photo
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS uc_user_identity_photo;
|
||||
CREATE TABLE uc_user_identity_photo (
|
||||
id BIGSERIAL PRIMARY KEY,
|
||||
user_id BIGINT DEFAULT NULL,
|
||||
front_file_code VARCHAR(32) DEFAULT NULL,
|
||||
back_file_code VARCHAR(32) DEFAULT NULL,
|
||||
status SMALLINT DEFAULT NULL,
|
||||
fail_reason VARCHAR(128) DEFAULT NULL,
|
||||
deleted BOOLEAN DEFAULT FALSE,
|
||||
create_by BIGINT DEFAULT NULL,
|
||||
create_time TIMESTAMP DEFAULT NULL,
|
||||
update_by BIGINT DEFAULT NULL,
|
||||
update_time TIMESTAMP DEFAULT NULL,
|
||||
proxy_by BIGINT DEFAULT NULL
|
||||
);
|
||||
CREATE INDEX INDEX12379555691300 ON uc_user_identity_photo(user_id);
|
||||
COMMENT ON TABLE uc_user_identity_photo IS '用户身份证正反面';
|
||||
COMMENT ON COLUMN uc_user_identity_photo.id IS '主键';
|
||||
COMMENT ON COLUMN uc_user_identity_photo.user_id IS '用户id';
|
||||
COMMENT ON COLUMN uc_user_identity_photo.front_file_code IS '正面照';
|
||||
COMMENT ON COLUMN uc_user_identity_photo.back_file_code IS '反面照';
|
||||
COMMENT ON COLUMN uc_user_identity_photo.status IS '状态';
|
||||
COMMENT ON COLUMN uc_user_identity_photo.fail_reason IS '失败原因';
|
||||
COMMENT ON COLUMN uc_user_identity_photo.deleted IS '是否逻辑删除';
|
||||
COMMENT ON COLUMN uc_user_identity_photo.create_by IS '创建人';
|
||||
COMMENT ON COLUMN uc_user_identity_photo.create_time IS '创建时间';
|
||||
COMMENT ON COLUMN uc_user_identity_photo.update_by IS '更新人';
|
||||
COMMENT ON COLUMN uc_user_identity_photo.update_time IS '更新时间';
|
||||
COMMENT ON COLUMN uc_user_identity_photo.proxy_by IS '代理人';
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for uc_user_postal_info
|
||||
-- ----------------------------
|
||||
@@ -1212,35 +1144,6 @@ COMMENT ON COLUMN uc_user_postal_info.update_by IS '更新人';
|
||||
COMMENT ON COLUMN uc_user_postal_info.update_time IS '更新时间';
|
||||
COMMENT ON COLUMN uc_user_postal_info.proxy_by IS '代理人';
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for uc_user_real_name_two_verification
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS uc_user_real_name_two_verification;
|
||||
CREATE TABLE uc_user_real_name_two_verification (
|
||||
id BIGSERIAL PRIMARY KEY,
|
||||
user_id BIGINT DEFAULT NULL,
|
||||
config_code VARCHAR(64) DEFAULT NULL,
|
||||
config_value VARCHAR(1024) DEFAULT NULL,
|
||||
remark VARCHAR(128) DEFAULT NULL,
|
||||
deleted BOOLEAN DEFAULT FALSE,
|
||||
create_by BIGINT DEFAULT NULL,
|
||||
create_time TIMESTAMP DEFAULT NULL,
|
||||
update_by BIGINT DEFAULT NULL,
|
||||
update_time TIMESTAMP DEFAULT NULL,
|
||||
proxy_by BIGINT DEFAULT NULL
|
||||
);
|
||||
COMMENT ON TABLE uc_user_real_name_two_verification IS '用户配置表';
|
||||
COMMENT ON COLUMN uc_user_real_name_two_verification.id IS '主键';
|
||||
COMMENT ON COLUMN uc_user_real_name_two_verification.user_id IS '用户id';
|
||||
COMMENT ON COLUMN uc_user_real_name_two_verification.config_code IS '编码';
|
||||
COMMENT ON COLUMN uc_user_real_name_two_verification.config_value IS '配置值';
|
||||
COMMENT ON COLUMN uc_user_real_name_two_verification.remark IS '备注';
|
||||
COMMENT ON COLUMN uc_user_real_name_two_verification.deleted IS '是否逻辑删除';
|
||||
COMMENT ON COLUMN uc_user_real_name_two_verification.create_by IS '创建人';
|
||||
COMMENT ON COLUMN uc_user_real_name_two_verification.create_time IS '创建时间';
|
||||
COMMENT ON COLUMN uc_user_real_name_two_verification.update_by IS '更新人';
|
||||
COMMENT ON COLUMN uc_user_real_name_two_verification.update_time IS '更新时间';
|
||||
COMMENT ON COLUMN uc_user_real_name_two_verification.proxy_by IS '代理人';
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for uc_user_register
|
||||
@@ -1981,3 +1884,139 @@ COMMENT ON COLUMN xs_url.update_by IS '修改人';
|
||||
COMMENT ON COLUMN xs_url.update_time IS '修改时间';
|
||||
COMMENT ON COLUMN xs_url.proxy_by IS '代理人';
|
||||
COMMENT ON COLUMN xs_url.platform_code IS '平台编码';
|
||||
|
||||
|
||||
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for x_file_category
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS x_file_category;
|
||||
CREATE TABLE x_file_category (
|
||||
id BIGSERIAL PRIMARY KEY,
|
||||
file_category VARCHAR(32) DEFAULT NULL,
|
||||
file_suffix VARCHAR(32) DEFAULT NULL,
|
||||
deleted BOOLEAN DEFAULT FALSE,
|
||||
create_by BIGINT DEFAULT NULL,
|
||||
create_time TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
||||
update_by BIGINT DEFAULT NULL,
|
||||
update_time TIMESTAMP DEFAULT NULL,
|
||||
proxy_by BIGINT DEFAULT NULL
|
||||
);
|
||||
COMMENT ON TABLE x_file_category IS '文件种类';
|
||||
COMMENT ON COLUMN x_file_category.id IS '主键ID';
|
||||
COMMENT ON COLUMN x_file_category.file_category IS '文件种类';
|
||||
COMMENT ON COLUMN x_file_category.file_suffix IS '文件后缀';
|
||||
COMMENT ON COLUMN x_file_category.deleted IS '是否删除';
|
||||
COMMENT ON COLUMN x_file_category.create_by IS '创建人';
|
||||
COMMENT ON COLUMN x_file_category.create_time IS '创建时间';
|
||||
COMMENT ON COLUMN x_file_category.update_by IS '修改人';
|
||||
COMMENT ON COLUMN x_file_category.update_time IS '修改时间';
|
||||
COMMENT ON COLUMN x_file_category.proxy_by IS '代理人';
|
||||
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for x_user_space
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS x_user_space;
|
||||
CREATE TABLE x_user_space (
|
||||
id BIGSERIAL PRIMARY KEY,
|
||||
user_id BIGINT DEFAULT NULL,
|
||||
total_size BIGINT DEFAULT NULL,
|
||||
used_size BIGINT DEFAULT NULL,
|
||||
deleted BOOLEAN DEFAULT FALSE,
|
||||
create_by BIGINT DEFAULT NULL,
|
||||
create_time TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
||||
update_by BIGINT DEFAULT NULL,
|
||||
update_time TIMESTAMP DEFAULT NULL,
|
||||
proxy_by BIGINT DEFAULT NULL
|
||||
);
|
||||
COMMENT ON TABLE x_user_space IS '用户空间';
|
||||
COMMENT ON COLUMN x_user_space.id IS '主键ID';
|
||||
COMMENT ON COLUMN x_user_space.user_id IS '用户id';
|
||||
COMMENT ON COLUMN x_user_space.total_size IS '总容量';
|
||||
COMMENT ON COLUMN x_user_space.used_size IS '已使用容量';
|
||||
COMMENT ON COLUMN x_user_space.deleted IS '是否删除';
|
||||
COMMENT ON COLUMN x_user_space.create_by IS '创建人';
|
||||
COMMENT ON COLUMN x_user_space.create_time IS '创建时间';
|
||||
COMMENT ON COLUMN x_user_space.update_by IS '修改人';
|
||||
COMMENT ON COLUMN x_user_space.update_time IS '修改时间';
|
||||
COMMENT ON COLUMN x_user_space.proxy_by IS '代理人';
|
||||
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for x_user_file
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS x_user_file;
|
||||
CREATE TABLE x_user_file (
|
||||
id BIGSERIAL PRIMARY KEY,
|
||||
user_id BIGINT DEFAULT NULL,
|
||||
root_type VARCHAR(2) DEFAULT NULL,
|
||||
file_type VARCHAR(32) DEFAULT NULL,
|
||||
file_name VARCHAR(256) DEFAULT NULL,
|
||||
parent_id BIGINT DEFAULT NULL,
|
||||
file_code VARCHAR(32) DEFAULT NULL,
|
||||
file_status VARCHAR(2) DEFAULT NULL,
|
||||
path VARCHAR(255) DEFAULT NULL,
|
||||
end_time TIMESTAMP DEFAULT NULL,
|
||||
access_code VARCHAR(6) DEFAULT NULL,
|
||||
deleted BOOLEAN DEFAULT FALSE,
|
||||
create_by BIGINT DEFAULT NULL,
|
||||
create_time TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
||||
update_by BIGINT DEFAULT NULL,
|
||||
update_time TIMESTAMP DEFAULT NULL,
|
||||
proxy_by BIGINT DEFAULT NULL
|
||||
);
|
||||
COMMENT ON TABLE x_user_file IS '用户文件';
|
||||
COMMENT ON COLUMN x_user_file.id IS '主键ID';
|
||||
COMMENT ON COLUMN x_user_file.user_id IS '用户id';
|
||||
COMMENT ON COLUMN x_user_file.root_type IS '根类型:1普通/2内穿外/3外传内/4我的分享';
|
||||
COMMENT ON COLUMN x_user_file.file_type IS '文件大类:1文件/2文件夹';
|
||||
COMMENT ON COLUMN x_user_file.file_name IS '文件名';
|
||||
COMMENT ON COLUMN x_user_file.parent_id IS '父id';
|
||||
COMMENT ON COLUMN x_user_file.file_code IS '文件编码';
|
||||
COMMENT ON COLUMN x_user_file.file_status IS '文件状态:1正常2失效11解析中12待审核13传输中';
|
||||
COMMENT ON COLUMN x_user_file.path IS '路径';
|
||||
COMMENT ON COLUMN x_user_file.end_time IS '有效期';
|
||||
COMMENT ON COLUMN x_user_file.access_code IS '访问码';
|
||||
COMMENT ON COLUMN x_user_file.deleted IS '是否删除';
|
||||
COMMENT ON COLUMN x_user_file.create_by IS '创建人';
|
||||
COMMENT ON COLUMN x_user_file.create_time IS '创建时间';
|
||||
COMMENT ON COLUMN x_user_file.update_by IS '修改人';
|
||||
COMMENT ON COLUMN x_user_file.update_time IS '修改时间';
|
||||
COMMENT ON COLUMN x_user_file.proxy_by IS '代理人';
|
||||
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for x_file_risk
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS x_file_risk;
|
||||
CREATE TABLE x_file_risk (
|
||||
id BIGSERIAL PRIMARY KEY,
|
||||
file_code VARCHAR(32) DEFAULT NULL,
|
||||
max_risk_level VARCHAR(2) DEFAULT NULL,
|
||||
risk_json TEXT DEFAULT NULL,
|
||||
dify_file_json TEXT DEFAULT NULL,
|
||||
deleted BOOLEAN DEFAULT FALSE,
|
||||
create_by BIGINT DEFAULT NULL,
|
||||
create_time TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
||||
update_by BIGINT DEFAULT NULL,
|
||||
update_time TIMESTAMP DEFAULT NULL,
|
||||
proxy_by BIGINT DEFAULT NULL,
|
||||
CONSTRAINT uk_file_code UNIQUE (file_code)
|
||||
);
|
||||
COMMENT ON TABLE x_file_risk IS '文件风险';
|
||||
COMMENT ON COLUMN x_file_risk.id IS '主键ID';
|
||||
COMMENT ON COLUMN x_file_risk.file_code IS '文件编码';
|
||||
COMMENT ON COLUMN x_file_risk.max_risk_level IS '最高风险等级:1重度/2中度/3轻度';
|
||||
COMMENT ON COLUMN x_file_risk.risk_json IS '风险详情JSON';
|
||||
COMMENT ON COLUMN x_file_risk.dify_file_json IS 'Dify文件上传响应JSON';
|
||||
COMMENT ON COLUMN x_file_risk.deleted IS '是否删除';
|
||||
COMMENT ON COLUMN x_file_risk.create_by IS '创建人';
|
||||
COMMENT ON COLUMN x_file_risk.create_time IS '创建时间';
|
||||
COMMENT ON COLUMN x_file_risk.update_by IS '修改人';
|
||||
COMMENT ON COLUMN x_file_risk.update_time IS '修改时间';
|
||||
COMMENT ON COLUMN x_file_risk.proxy_by IS '代理人';
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -631,27 +631,6 @@ CREATE TABLE `uc_user_auth` (
|
||||
KEY `idx_unique_id` (`unique_id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COMMENT='用户授权中间表';
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for uc_user_bank_account
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `uc_user_bank_account`;
|
||||
CREATE TABLE `uc_user_bank_account` (
|
||||
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
|
||||
`user_id` bigint(20) DEFAULT NULL COMMENT '用户id',
|
||||
`account_no` varchar(32) DEFAULT NULL COMMENT '卡号',
|
||||
`account_name` varchar(32) DEFAULT NULL COMMENT '户名',
|
||||
`bank_name` varchar(64) DEFAULT NULL COMMENT '银行名',
|
||||
`bank_branch_name` varchar(64) DEFAULT NULL COMMENT '开户行名',
|
||||
`default_account` bit(1) DEFAULT NULL COMMENT '是否默认账户',
|
||||
`deleted` bit(1) DEFAULT b'0' COMMENT '是否逻辑删除',
|
||||
`create_by` bigint(20) DEFAULT NULL COMMENT '创建人',
|
||||
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
|
||||
`update_by` bigint(20) DEFAULT NULL COMMENT '更新人',
|
||||
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
|
||||
`proxy_by` bigint(20) DEFAULT NULL COMMENT '代理人',
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `INDEX12379426737700` (`user_id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COMMENT='用户银行卡表';
|
||||
|
||||
|
||||
-- ----------------------------
|
||||
@@ -734,28 +713,6 @@ CREATE TABLE `uc_user_face` (
|
||||
KEY `INDEX12379510213700` (`user_id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='用户活体信息表';
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for uc_user_identity_photo
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `uc_user_identity_photo`;
|
||||
CREATE TABLE `uc_user_identity_photo` (
|
||||
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
|
||||
`user_id` bigint(20) DEFAULT NULL COMMENT '用户id',
|
||||
`front_file_code` varchar(32) DEFAULT NULL COMMENT '正面照',
|
||||
`back_file_code` varchar(32) DEFAULT NULL COMMENT '反面照',
|
||||
`status` tinyint(4) DEFAULT NULL COMMENT '状态',
|
||||
`fail_reason` varchar(128) DEFAULT NULL COMMENT '失败原因',
|
||||
`deleted` bit(1) DEFAULT b'0' COMMENT '是否逻辑删除',
|
||||
`create_by` bigint(20) DEFAULT NULL COMMENT '创建人',
|
||||
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
|
||||
`update_by` bigint(20) DEFAULT NULL COMMENT '更新人',
|
||||
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
|
||||
`proxy_by` bigint(20) DEFAULT NULL COMMENT '代理人',
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `INDEX12379555691300` (`user_id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='用户身份证正反面';
|
||||
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for uc_user_postal_info
|
||||
-- ----------------------------
|
||||
@@ -777,24 +734,6 @@ CREATE TABLE `uc_user_postal_info` (
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='用户邮寄信息';
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for uc_user_real_name_two_verification
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `uc_user_real_name_two_verification`;
|
||||
CREATE TABLE `uc_user_real_name_two_verification` (
|
||||
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
|
||||
`user_id` bigint(20) DEFAULT NULL COMMENT '用户id',
|
||||
`config_code` varchar(64) DEFAULT NULL COMMENT '编码',
|
||||
`config_value` varchar(1024) DEFAULT NULL COMMENT '配置值',
|
||||
`remark` varchar(128) DEFAULT NULL COMMENT '备注',
|
||||
`deleted` bit(1) DEFAULT b'0' COMMENT '是否逻辑删除',
|
||||
`create_by` bigint(20) DEFAULT NULL COMMENT '创建人',
|
||||
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
|
||||
`update_by` bigint(20) DEFAULT NULL COMMENT '更新人',
|
||||
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
|
||||
`proxy_by` bigint(20) DEFAULT NULL COMMENT '代理人',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='用户配置表';
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for uc_user_register
|
||||
@@ -1163,26 +1102,6 @@ CREATE TABLE `xs_permission_resources` (
|
||||
KEY `INDEX12372582404500` (`permission_package_id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=43 DEFAULT CHARSET=utf8mb4 COMMENT='权限包-资源关系表';
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for xs_real_name_two_verification
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `xs_real_name_two_verification`;
|
||||
CREATE TABLE `xs_real_name_two_verification` (
|
||||
`id` bigint(20) NOT NULL AUTO_INCREMENT,
|
||||
`user_id` bigint(20) DEFAULT NULL,
|
||||
`person_name` varchar(64) DEFAULT NULL,
|
||||
`identity_no` varchar(32) DEFAULT NULL,
|
||||
`status` varchar(2) DEFAULT '0',
|
||||
`authentication_source` tinyint(4) DEFAULT NULL,
|
||||
`err_msg` varchar(64) DEFAULT NULL,
|
||||
`deleted` bit(1) DEFAULT b'0',
|
||||
`create_by` bigint(20) DEFAULT NULL,
|
||||
`create_time` datetime DEFAULT NULL,
|
||||
`update_by` bigint(20) DEFAULT NULL,
|
||||
`update_time` datetime DEFAULT NULL,
|
||||
`proxy_by` bigint(20) DEFAULT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for xs_role
|
||||
@@ -1268,4 +1187,77 @@ CREATE TABLE `xs_url` (
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=36 DEFAULT CHARSET=utf8mb4 COMMENT='菜单地址';
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
CREATE TABLE `x_file_category` (
|
||||
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
|
||||
`file_category` varchar(32) DEFAULT NULL COMMENT '文件种类',
|
||||
`file_suffix` varchar(32) DEFAULT NULL COMMENT '文件后缀',
|
||||
|
||||
`deleted` bit(1) DEFAULT b'0' COMMENT '是否删除',
|
||||
`create_by` bigint(20) DEFAULT NULL COMMENT '创建人',
|
||||
`create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
`update_by` bigint(20) DEFAULT NULL COMMENT '修改人',
|
||||
`update_time` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
|
||||
`proxy_by` bigint(20) DEFAULT NULL COMMENT '代理人',
|
||||
PRIMARY KEY (`id`) USING BTREE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='文件种类';
|
||||
|
||||
CREATE TABLE `x_user_space` (
|
||||
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
|
||||
`user_id` bigint(20) DEFAULT NULL COMMENT '用户id',
|
||||
`total_size` bigint DEFAULT NULL COMMENT '总容量',
|
||||
`used_size` bigint DEFAULT NULL COMMENT '已使用容量',
|
||||
|
||||
`deleted` bit(1) DEFAULT b'0' COMMENT '是否删除',
|
||||
`create_by` bigint(20) DEFAULT NULL COMMENT '创建人',
|
||||
`create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
`update_by` bigint(20) DEFAULT NULL COMMENT '修改人',
|
||||
`update_time` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
|
||||
`proxy_by` bigint(20) DEFAULT NULL COMMENT '代理人',
|
||||
PRIMARY KEY (`id`) USING BTREE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='用户空间';
|
||||
|
||||
CREATE TABLE `x_user_file` (
|
||||
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
|
||||
`user_id` bigint(20) DEFAULT NULL COMMENT '用户id',
|
||||
`root_type` varchar(2) DEFAULT NULL COMMENT '根类型:1普通/2内穿外/3外传内/4我的分享',
|
||||
`file_type` varchar(32) DEFAULT NULL COMMENT '文件大类:1文件/2文件夹',
|
||||
`file_name` varchar(256) DEFAULT NULL COMMENT '文件名',
|
||||
`parent_id` bigint(20) DEFAULT NULL COMMENT '父id',
|
||||
`file_code` varchar(32) DEFAULT NULL COMMENT '文件编码',
|
||||
`file_status` varchar(2) DEFAULT NULL COMMENT '文件状态:1正常2失效11解析中12待审核13传输中',
|
||||
`path` varchar(255) DEFAULT NULL COMMENT '路径',
|
||||
`end_time` datetime DEFAULT NULL COMMENT '有效期',
|
||||
`access_code` varchar(6) DEFAULT NULL COMMENT '访问码',
|
||||
`deleted` bit(1) DEFAULT b'0' COMMENT '是否删除',
|
||||
`create_by` bigint(20) DEFAULT NULL COMMENT '创建人',
|
||||
`create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
`update_by` bigint(20) DEFAULT NULL COMMENT '修改人',
|
||||
`update_time` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
|
||||
`proxy_by` bigint(20) DEFAULT NULL COMMENT '代理人',
|
||||
PRIMARY KEY (`id`) USING BTREE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='用户文件';
|
||||
|
||||
CREATE TABLE `x_file_risk` (
|
||||
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
|
||||
`file_code` varchar(32) DEFAULT NULL COMMENT '文件编码',
|
||||
`max_risk_level` varchar(2) DEFAULT NULL COMMENT '最高风险等级:1重度/2中度/3轻度',
|
||||
`risk_json` text DEFAULT NULL COMMENT '风险详情JSON',
|
||||
`dify_file_json` text DEFAULT NULL COMMENT 'Dify文件上传响应JSON',
|
||||
|
||||
`deleted` bit(1) DEFAULT b'0' COMMENT '是否删除',
|
||||
`create_by` bigint(20) DEFAULT NULL COMMENT '创建人',
|
||||
`create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
`update_by` bigint(20) DEFAULT NULL COMMENT '修改人',
|
||||
`update_time` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
|
||||
`proxy_by` bigint(20) DEFAULT NULL COMMENT '代理人',
|
||||
PRIMARY KEY (`id`) USING BTREE,
|
||||
UNIQUE KEY `uk_file_code` (`file_code`) USING BTREE COMMENT '文件编码唯一索引'
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='文件风险';
|
||||
|
||||
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
||||
@@ -1,11 +1,16 @@
|
||||
package com.senmesh.security.dto;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.senmesh.common.util.UserContextHolder;
|
||||
import com.senmesh.security.util.PasswordUtils;
|
||||
import com.senmesh.usercenter.user.util.UserUtils;
|
||||
import java.io.Serializable;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Builder.Default;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
@@ -57,5 +62,25 @@ public class UserInfoDTO implements Serializable{
|
||||
|
||||
private String avatar;
|
||||
|
||||
@ApiModelProperty("密码")
|
||||
@JsonIgnore
|
||||
private String password;
|
||||
|
||||
@ApiModelProperty("是否初始密码")
|
||||
@Default
|
||||
private Boolean originPassword = Boolean.TRUE;
|
||||
|
||||
@ApiModelProperty("是否机构管理员")
|
||||
private Boolean administrator;
|
||||
|
||||
public void setPassword(String password){
|
||||
this.password = password;
|
||||
if (!PasswordUtils.match(UserUtils.DEFAULT_ORG_USER_PASSWORD, password)) {
|
||||
this.originPassword = Boolean.FALSE;
|
||||
}
|
||||
}
|
||||
public Boolean getAdministrator(){
|
||||
return UserContextHolder.isAdministrator();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -52,6 +52,14 @@ public class UserFileController {
|
||||
return AlitaResult.success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/remove_by_ids")
|
||||
@ApiOperation("批量删除")
|
||||
public AlitaResult<Boolean> removeByIds(@RequestBody List<Long> ids) {
|
||||
Long userId = UserContextHolder.getExistLoginUserId();
|
||||
userFileService.removeByIds(ids, userId);
|
||||
return AlitaResult.success(true);
|
||||
}
|
||||
|
||||
@PutMapping("/invalid/{id}")
|
||||
@ApiOperation("失效")
|
||||
public AlitaResult<Boolean> invalid(@PathVariable Long id) {
|
||||
|
||||
@@ -30,8 +30,9 @@ public interface UserFileMapper extends MyMapper<UserFile> {
|
||||
*
|
||||
* @param fileId 文件ID
|
||||
* @param newParentId 新父节点ID
|
||||
* @param operateUserId 操作用户ID
|
||||
*/
|
||||
void updatePathByParentIdChange(@Param("fileId") Long fileId, @Param("newParentId") Long newParentId);
|
||||
void updatePathByParentIdChange(@Param("fileId") Long fileId, @Param("newParentId") Long newParentId, @Param("operateUserId") Long operateUserId);
|
||||
|
||||
/**
|
||||
* 删除文件及其所有子文件(逻辑删除)
|
||||
|
||||
@@ -60,5 +60,8 @@ public class UserFileQueryDTO extends PageQueryDTO<UserFileDTO> {
|
||||
|
||||
@ApiModelProperty("文件种类")
|
||||
private String fileCategory;
|
||||
|
||||
@ApiModelProperty("关联查询上级不为INVALID")
|
||||
private Boolean parentNotInvalid;
|
||||
}
|
||||
|
||||
|
||||
@@ -34,6 +34,9 @@
|
||||
LEFT JOIN xs_file_record fr ON t.file_code = fr.file_code AND fr.deleted = FALSE
|
||||
LEFT JOIN x_file_category fc ON fr.file_suffix = fc.file_suffix AND fc.deleted = FALSE
|
||||
LEFT JOIN x_file_risk fk ON t.file_code = fk.file_code AND fk.deleted = FALSE
|
||||
<if test='param.parentNotInvalid != null and param.parentNotInvalid == true'>
|
||||
LEFT JOIN x_user_file parent ON t.parent_id = parent.id AND parent.deleted = FALSE
|
||||
</if>
|
||||
WHERE t.deleted = FALSE
|
||||
<if test='param.id != null'>
|
||||
AND t.id = #{param.id}
|
||||
@@ -76,6 +79,9 @@
|
||||
<if test='param.fileCategory != null and param.fileCategory.trim() != ""'>
|
||||
AND fc.file_category = #{param.fileCategory}
|
||||
</if>
|
||||
<if test='param.parentNotInvalid != null and param.parentNotInvalid == true'>
|
||||
AND (t.parent_id = 0 OR parent.file_status != '2')
|
||||
</if>
|
||||
</sql>
|
||||
|
||||
<update id="updatePathByParentIdChange">
|
||||
|
||||
@@ -82,6 +82,14 @@ public interface UserFileService {
|
||||
*/
|
||||
void remove(Long id, Long userId);
|
||||
|
||||
/**
|
||||
* 批量删除用户文件(校验用户权限)
|
||||
*
|
||||
* @param ids 主键ID列表
|
||||
* @param userId 用户ID
|
||||
*/
|
||||
void removeByIds(List<Long> ids, Long userId);
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
|
||||
@@ -245,7 +245,7 @@ public class UserFileServiceImpl implements UserFileService {
|
||||
}
|
||||
|
||||
// 2.2 在SQL中一次性更新当前节点和所有子孙节点的path(SQL内部会限制相同userId和rootType)
|
||||
userFileMapper.updatePathByParentIdChange(id, newParentId);
|
||||
userFileMapper.updatePathByParentIdChange(id, newParentId, modifyDTO.getOperateUserId());
|
||||
}
|
||||
|
||||
// 3. 更新文件信息
|
||||
@@ -305,6 +305,18 @@ public class UserFileServiceImpl implements UserFileService {
|
||||
remove(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public void removeByIds(List<Long> ids, Long userId) {
|
||||
Assert.notEmpty(ids, "文件ID列表不能为空");
|
||||
Assert.notNull(userId, "用户ID不能为空");
|
||||
|
||||
// 循环删除每个文件
|
||||
for (Long id : ids) {
|
||||
remove(id, userId);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<UserFileDTO> list(UserFileQueryDTO queryDTO) {
|
||||
queryDTO.disablePage();
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.senmesh.usercenter.dto;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
import com.senmesh.common.dto.BaseDTO;
|
||||
@@ -23,10 +24,12 @@ public class OrgUserEditDTO extends BaseDTO{
|
||||
private static final long serialVersionUID = -9143944005872387841L;
|
||||
|
||||
|
||||
/**
|
||||
* 昵称
|
||||
*/
|
||||
private String chineseName;
|
||||
@ApiModelProperty("昵称")
|
||||
private String nickname;
|
||||
|
||||
@ApiModelProperty("姓名")
|
||||
private String realName;
|
||||
|
||||
/**
|
||||
* 帐号
|
||||
*/
|
||||
@@ -36,8 +39,8 @@ public class OrgUserEditDTO extends BaseDTO{
|
||||
/**
|
||||
* 手机号码
|
||||
*/
|
||||
@NotNull(groups = {Update.class,Create.class}, message = "手机号码不能为空")
|
||||
private String phone;
|
||||
// @NotNull(groups = {Update.class,Create.class}, message = "手机号码不能为空")
|
||||
// private String phone;
|
||||
|
||||
/**
|
||||
* 手机号验证码
|
||||
|
||||
@@ -1,68 +0,0 @@
|
||||
package com.senmesh.usercenter.user.controller;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import com.senmesh.common.AlitaResult;
|
||||
import com.senmesh.common.util.UserContextHolder;
|
||||
import com.senmesh.usercenter.user.dto.UserBankAccountDTO;
|
||||
import com.senmesh.usercenter.user.dto.UserBankAccountModifyDTO;
|
||||
import com.senmesh.usercenter.user.dto.UserBankAccountQueryDTO;
|
||||
import com.senmesh.usercenter.user.service.UserBankAccountService;
|
||||
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 用户银行卡表 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author Carlye
|
||||
* @since 2021-06-25
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/user/bank_account")
|
||||
@Api(tags = "用户银行卡")
|
||||
public class UserBankAccountController {
|
||||
|
||||
@Autowired
|
||||
private UserBankAccountService userBankAccountService;
|
||||
|
||||
@ApiOperation("获取指定证件号与账户号的映射")
|
||||
@GetMapping("/card_no/map")
|
||||
public AlitaResult<Map<String,String>> queryBankAccountMap(@RequestParam("cardNos") List<String> cardNos){
|
||||
return AlitaResult.success(userBankAccountService.queryBankAccountMap(cardNos));
|
||||
}
|
||||
|
||||
@ApiOperation("列表查询")
|
||||
@GetMapping("/list")
|
||||
public AlitaResult<List<UserBankAccountDTO>> list(UserBankAccountQueryDTO userBankAccountQueryDTO){
|
||||
userBankAccountQueryDTO.setUserId(UserContextHolder.getExistLoginUserId());
|
||||
return AlitaResult.success(userBankAccountService.list(userBankAccountQueryDTO));
|
||||
}
|
||||
|
||||
@ApiOperation("修改")
|
||||
@PutMapping
|
||||
public AlitaResult<Void> modify(@Validated @RequestBody UserBankAccountModifyDTO userBankAccountModifyDTO) {
|
||||
userBankAccountService.modify(userBankAccountModifyDTO);
|
||||
return AlitaResult.success();
|
||||
}
|
||||
|
||||
@GetMapping("/{id}")
|
||||
@ApiOperation("查询单个")
|
||||
public AlitaResult<UserBankAccountDTO> get(@PathVariable Long id){
|
||||
return AlitaResult.success(userBankAccountService.get(id));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,91 +0,0 @@
|
||||
package com.senmesh.usercenter.user.controller;
|
||||
|
||||
import com.senmesh.common.validation.Create;
|
||||
import java.util.List;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
|
||||
import com.senmesh.common.validation.Update;
|
||||
import com.senmesh.common.AlitaResult;
|
||||
import com.senmesh.common.util.UserContextHolder;
|
||||
import com.senmesh.tkmybatis.pojo.Page;
|
||||
import com.senmesh.usercenter.user.dto.UserIdentityPhotoQueryDTO;
|
||||
import com.senmesh.usercenter.user.service.UserIdentityPhotoService;
|
||||
import com.senmesh.usercenter.user.dto.UserIdentityPhotoInfoDTO;
|
||||
import com.senmesh.usercenter.user.dto.UserIdentityPhotoDTO;
|
||||
import com.senmesh.usercenter.user.dto.UserIdentityPhotoOperateDTO;
|
||||
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
|
||||
/**
|
||||
* @author sr on 2021-05-24
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("user_identity_photo")
|
||||
@Api(tags = "用户证件正反面")
|
||||
public class UserIdentityPhotoController {
|
||||
|
||||
@Autowired
|
||||
private UserIdentityPhotoService userIdentityPhotoService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@ApiOperation("创建")
|
||||
public AlitaResult<Long> create(
|
||||
@Validated(Create.class) @RequestBody UserIdentityPhotoOperateDTO userIdentityPhotoOperateDTO) {
|
||||
return AlitaResult.success(userIdentityPhotoService.create(userIdentityPhotoOperateDTO));
|
||||
}
|
||||
|
||||
@PutMapping("/modify")
|
||||
@ApiOperation("修改")
|
||||
public AlitaResult<Boolean> modify(
|
||||
@Validated(Update.class) @RequestBody UserIdentityPhotoOperateDTO userIdentityPhotoOperateDTO) {
|
||||
userIdentityPhotoService.modify(userIdentityPhotoOperateDTO);
|
||||
return AlitaResult.success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/remove/{id}")
|
||||
@ApiOperation("删除")
|
||||
public AlitaResult<Boolean> remove(@PathVariable Long id) {
|
||||
userIdentityPhotoService.remove(id);
|
||||
return AlitaResult.success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get/{userId}")
|
||||
@ApiOperation("根据用户Id查询")
|
||||
public AlitaResult<UserIdentityPhotoDTO> getByUserId(@PathVariable Long userId) {
|
||||
return AlitaResult.success(userIdentityPhotoService.getByUserId(userId));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@ApiOperation("分页查询")
|
||||
public AlitaResult<Page<UserIdentityPhotoDTO>> page(
|
||||
UserIdentityPhotoQueryDTO userIdentityPhotoQueryDTO) {
|
||||
userIdentityPhotoService.list(userIdentityPhotoQueryDTO);
|
||||
return AlitaResult.success(userIdentityPhotoQueryDTO.getPageResult());
|
||||
}
|
||||
|
||||
@GetMapping("/list")
|
||||
@ApiOperation("列表查询")
|
||||
public AlitaResult<List<UserIdentityPhotoDTO>> list(
|
||||
UserIdentityPhotoQueryDTO userIdentityPhotoQueryDTO) {
|
||||
userIdentityPhotoQueryDTO.setNeedPage(false);
|
||||
return AlitaResult.success(userIdentityPhotoService.list(userIdentityPhotoQueryDTO));
|
||||
}
|
||||
|
||||
@GetMapping("/info")
|
||||
@ApiOperation("查询详细信息")
|
||||
public AlitaResult<UserIdentityPhotoInfoDTO> findInfo() {
|
||||
return AlitaResult
|
||||
.success(userIdentityPhotoService.findInfo(UserContextHolder.getExistLoginUserId()));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,26 +0,0 @@
|
||||
package com.senmesh.usercenter.user.dao;
|
||||
|
||||
import com.senmesh.tkmybatis.mybatis.MyMapper;
|
||||
import com.senmesh.usercenter.user.dto.UserBankAccountDTO;
|
||||
import com.senmesh.usercenter.user.dto.UserBankAccountModifyDTO;
|
||||
import com.senmesh.usercenter.user.dto.UserBankAccountQueryDTO;
|
||||
import com.senmesh.usercenter.user.entity.UcUserBankAccount;
|
||||
import java.util.List;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 用户银行卡表 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author Carlye
|
||||
* @since 2021-06-25
|
||||
*/
|
||||
public interface UserBankAccountMapper extends MyMapper<UcUserBankAccount> {
|
||||
|
||||
List<UserBankAccountDTO> queryByCardNos(List<String> cardNos);
|
||||
|
||||
List<UserBankAccountDTO> listUserBankAccountDTO(@Param("param") UserBankAccountQueryDTO userBankAccountQueryDTO);
|
||||
|
||||
int modify(@Param("param") UserBankAccountModifyDTO userBankAccountModifyDTO);
|
||||
}
|
||||
@@ -1,27 +0,0 @@
|
||||
package com.senmesh.usercenter.user.dao;
|
||||
|
||||
import com.senmesh.tkmybatis.mybatis.MyMapper;
|
||||
import com.senmesh.usercenter.user.dto.UserBankCardFourVerificationDTO;
|
||||
import com.senmesh.usercenter.user.dto.UserBankCardFourVerificationQueryDTO;
|
||||
import com.senmesh.usercenter.user.entity.UserBankCardFourVerification;
|
||||
import java.util.List;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* @author czy
|
||||
* @date 2021-06-23
|
||||
*/
|
||||
public interface UserBankCardFourVerificationMapper extends MyMapper<UserBankCardFourVerification> {
|
||||
|
||||
|
||||
/**
|
||||
* 查询
|
||||
*
|
||||
* @param userBankCardFourVerificationQueryDTO
|
||||
* @return
|
||||
* @author sr on 2021-08-04
|
||||
*/
|
||||
List<UserBankCardFourVerificationDTO> listUserBankCardFourVerificationDTO(
|
||||
@Param("param") UserBankCardFourVerificationQueryDTO userBankCardFourVerificationQueryDTO);
|
||||
|
||||
}
|
||||
@@ -1,30 +0,0 @@
|
||||
package com.senmesh.usercenter.user.dao;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import com.senmesh.tkmybatis.mybatis.MyMapper;
|
||||
import com.senmesh.usercenter.user.dto.UserBankCardThreeVerificationDTO;
|
||||
import com.senmesh.usercenter.user.dto.UserBankCardThreeVerificationQueryDTO;
|
||||
import com.senmesh.usercenter.user.entity.UserBankCardThreeVerification;
|
||||
|
||||
/**
|
||||
* @author czy
|
||||
* @date 2021-06-23
|
||||
*/
|
||||
public interface UserBankCardThreeVerificationMapper
|
||||
extends MyMapper<UserBankCardThreeVerification> {
|
||||
|
||||
|
||||
/**
|
||||
* 查询
|
||||
*
|
||||
* @param userBankCardThreeVerificationQueryDTO
|
||||
* @return
|
||||
* @author sr on 2021-08-04
|
||||
*/
|
||||
List<UserBankCardThreeVerificationDTO> listUserBankCardThreeVerificationDTO(
|
||||
@Param("param") UserBankCardThreeVerificationQueryDTO userBankCardThreeVerificationQueryDTO);
|
||||
|
||||
}
|
||||
@@ -1,31 +0,0 @@
|
||||
package com.senmesh.usercenter.user.dao;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import com.senmesh.usercenter.user.dto.UserIdentityPhotoDTO;
|
||||
import com.senmesh.usercenter.user.dto.UserIdentityPhotoQueryDTO;
|
||||
import com.senmesh.usercenter.user.entity.UserIdentityPhoto;
|
||||
import com.senmesh.tkmybatis.mybatis.MyMapper;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
|
||||
/**
|
||||
* 用户证件正反面
|
||||
*
|
||||
* @author sr on 2021-05-24
|
||||
*/
|
||||
public interface UserIdentityPhotoMapper extends MyMapper<UserIdentityPhoto> {
|
||||
|
||||
/**
|
||||
* 查询
|
||||
*
|
||||
* @param userIdentityPhotoQueryDTO
|
||||
* @return
|
||||
* @author sr on 2021-05-24
|
||||
*/
|
||||
List<UserIdentityPhotoDTO> listUserIdentityPhotoDTO(@Param("param") UserIdentityPhotoQueryDTO userIdentityPhotoQueryDTO);
|
||||
|
||||
@Select("select * from uc_user_identity_photo where deleted=false and user_id=#{userId} limit 1")
|
||||
UserIdentityPhotoDTO getByUserId(@Param("userId") Long userId);
|
||||
}
|
||||
@@ -1,29 +0,0 @@
|
||||
package com.senmesh.usercenter.user.dao;
|
||||
|
||||
import com.senmesh.tkmybatis.mybatis.MyMapper;
|
||||
import com.senmesh.usercenter.user.dto.UserPhoneThreeVerificationDTO;
|
||||
import com.senmesh.usercenter.user.dto.UserPhoneThreeVerificationQueryDTO;
|
||||
import com.senmesh.usercenter.user.entity.UserPhoneThreeVerification;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author czy
|
||||
* @date 2021-06-23
|
||||
*/
|
||||
public interface UserPhoneThreeVerificationMapper
|
||||
extends MyMapper<UserPhoneThreeVerification> {
|
||||
|
||||
|
||||
/**
|
||||
* 查询
|
||||
*
|
||||
* @param userPhoneThreeVerificationQueryDTO
|
||||
* @return
|
||||
* @author sr on 2021-08-04
|
||||
*/
|
||||
List<UserPhoneThreeVerificationDTO> listUserPhoneThreeVerificationDTO(
|
||||
@Param("param") UserPhoneThreeVerificationQueryDTO userPhoneThreeVerificationQueryDTO);
|
||||
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
package com.senmesh.usercenter.user.dao;
|
||||
|
||||
import com.senmesh.tkmybatis.mybatis.MyMapper;
|
||||
import com.senmesh.usercenter.user.entity.UserRealNameTwoVerification;
|
||||
|
||||
/**
|
||||
* @author fzp
|
||||
* @date 2021年7月14日10:24:46
|
||||
*/
|
||||
public interface UserRealNameTwoVerificationMapper extends MyMapper<UserRealNameTwoVerification> {
|
||||
|
||||
}
|
||||
@@ -1,44 +0,0 @@
|
||||
package com.senmesh.usercenter.user.dto;
|
||||
|
||||
import com.senmesh.common.dto.BaseOperateDTO;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.*;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ApiModel(description = "用户银行卡修改")
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class UserBankAccountChangeReqDTO extends BaseOperateDTO{
|
||||
private static final long serialVersionUID = 6138358763847523428L;
|
||||
|
||||
@ApiModelProperty(value = "用户ID",required = true)
|
||||
@NotNull(message = "用户ID不能为空")
|
||||
private Long userId;
|
||||
|
||||
@ApiModelProperty(value = "历史银行卡号",required = true)
|
||||
@NotNull(message = "历史银行卡号不能为空")
|
||||
private String oldAccountNo;
|
||||
|
||||
@ApiModelProperty(value = "新绑银行卡号",required = true)
|
||||
@NotNull(message = "新绑银行卡号不能为空")
|
||||
private String newAccountNo;
|
||||
|
||||
@ApiModelProperty(value = "户名")
|
||||
private String accountName;
|
||||
|
||||
@ApiModelProperty(value = "银行名")
|
||||
private String bankName;
|
||||
|
||||
@ApiModelProperty(value = "开户行名")
|
||||
private String bankBranchName;
|
||||
|
||||
@ApiModelProperty(value = "是否默认账户")
|
||||
private Boolean defaultAccount;
|
||||
|
||||
}
|
||||
@@ -1,48 +0,0 @@
|
||||
package com.senmesh.usercenter.user.dto;
|
||||
|
||||
import com.senmesh.common.dto.BaseOperateDTO;
|
||||
import com.senmesh.common.validation.annotation.Expression;
|
||||
import com.senmesh.common.validation.constants.ValidProviderEnum;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.*;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ApiModel(description = "用户银行卡创建")
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class UserBankAccountCreateReqDTO extends BaseOperateDTO{
|
||||
private static final long serialVersionUID = 6138358763847523428L;
|
||||
|
||||
@ApiModelProperty(value = "用户ID",required = true)
|
||||
private Long userId;
|
||||
|
||||
@ApiModelProperty(value = "用户身份证",required = true)
|
||||
@Expression(type = ValidProviderEnum.CARD_NO, message = "身份证号不正确")
|
||||
private String cardNo;
|
||||
|
||||
@ApiModelProperty(value = "银行卡号",required = true)
|
||||
@NotNull(message = "用户银行卡号不能为空")
|
||||
private String accountNo;
|
||||
|
||||
@ApiModelProperty(value = "户名")
|
||||
@NotBlank(message = "户名不能为空")
|
||||
private String accountName;
|
||||
|
||||
@ApiModelProperty(value = "银行名")
|
||||
private String bankName;
|
||||
|
||||
@ApiModelProperty(value = "开户行名")
|
||||
private String bankBranchName;
|
||||
|
||||
@ApiModelProperty(value = "是否默认账户")
|
||||
private Boolean defaultAccount;
|
||||
|
||||
}
|
||||
@@ -1,42 +0,0 @@
|
||||
package com.senmesh.usercenter.user.dto;
|
||||
|
||||
import com.senmesh.common.dto.BaseDTO;
|
||||
|
||||
import lombok.*;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
/**
|
||||
* @author czy
|
||||
* @date 2021-06-29
|
||||
*/
|
||||
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@SuperBuilder
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class UserBankAccountDTO extends BaseDTO {
|
||||
|
||||
private static final long serialVersionUID = 3818282613956368311L;
|
||||
/** 用户id **/
|
||||
private Long userId;
|
||||
|
||||
/** 证件号 **/
|
||||
private String cardNo;
|
||||
|
||||
/** 卡号 **/
|
||||
private String accountNo;
|
||||
|
||||
/** 户名 **/
|
||||
private String accountName;
|
||||
|
||||
/** 银行名 **/
|
||||
private String bankName;
|
||||
|
||||
/** 开户行名 **/
|
||||
private String bankBranchName;
|
||||
|
||||
/** 是否默认账户 **/
|
||||
private Boolean defaultAccount;
|
||||
|
||||
}
|
||||
@@ -1,45 +0,0 @@
|
||||
package com.senmesh.usercenter.user.dto;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.io.Serializable;
|
||||
|
||||
|
||||
@ApiModel(description = "用户银行卡创建")
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class UserBankAccountInfoDTO implements Serializable {
|
||||
private static final long serialVersionUID = 6138358763847523428L;
|
||||
|
||||
@ApiModelProperty(value = "ID")
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty(value = "用户ID",required = true)
|
||||
@NotNull(message = "用户ID不能为空")
|
||||
private Long userId;
|
||||
|
||||
@ApiModelProperty(value = "银行卡号",required = true)
|
||||
@NotNull(message = "用户银行卡号不能为空")
|
||||
private String accountNo;
|
||||
|
||||
@ApiModelProperty(value = "户名")
|
||||
private String accountName;
|
||||
|
||||
@ApiModelProperty(value = "银行名")
|
||||
private String bankName;
|
||||
|
||||
@ApiModelProperty(value = "开户行名")
|
||||
private String bankBranchName;
|
||||
|
||||
@ApiModelProperty(value = "是否默认账户")
|
||||
private Boolean defaultAccount;
|
||||
|
||||
}
|
||||
@@ -1,35 +0,0 @@
|
||||
package com.senmesh.usercenter.user.dto;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
import com.senmesh.common.dto.BaseOperateDTO;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ApiModel(description = "用户银行卡修改")
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class UserBankAccountModifyDTO extends BaseOperateDTO{
|
||||
private static final long serialVersionUID = 6138358763847523428L;
|
||||
|
||||
@ApiModelProperty(value = "id",required = true)
|
||||
@NotNull(message = "id不能为空")
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty(value = "开户行名")
|
||||
private String bankBranchName;
|
||||
|
||||
@ApiModelProperty(value = "是否默认账户")
|
||||
private Boolean defaultAccount;
|
||||
|
||||
}
|
||||
@@ -1,44 +0,0 @@
|
||||
package com.senmesh.usercenter.user.dto;
|
||||
|
||||
import com.senmesh.common.dto.PageQueryDTO;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import lombok.*;
|
||||
|
||||
/**
|
||||
* @author czy
|
||||
* @date 2021-07-19
|
||||
*/
|
||||
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Builder
|
||||
@ApiModel(description = "用户银行账户信息查询DTO")
|
||||
public class UserBankAccountQueryDTO extends PageQueryDTO<UserAuthDTO> {
|
||||
|
||||
private static final long serialVersionUID = -4199087483393678322L;
|
||||
private Long id;
|
||||
|
||||
/** 用户id **/
|
||||
private Long userId;
|
||||
|
||||
/** 卡号 **/
|
||||
private String accountNo;
|
||||
|
||||
/** 户名 **/
|
||||
private String accountName;
|
||||
|
||||
/** 银行名 **/
|
||||
private String bankName;
|
||||
|
||||
/** 开户行名 **/
|
||||
private String bankBranchName;
|
||||
|
||||
/** 是否默认账户 **/
|
||||
private Boolean defaultAccount;
|
||||
|
||||
/** 未注销用户 **/
|
||||
private Boolean unCanceledUser;
|
||||
|
||||
}
|
||||
@@ -1,42 +0,0 @@
|
||||
package com.senmesh.usercenter.user.dto;
|
||||
|
||||
import com.senmesh.common.annotation.trimAndUpper.TrimAndUpper;
|
||||
import com.senmesh.common.dto.BaseDTO;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
/**
|
||||
* @author czy
|
||||
* @date 2021-06-23
|
||||
*/
|
||||
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@SuperBuilder
|
||||
public class UserBankCardFourVerificationDTO extends BaseDTO {
|
||||
|
||||
/** 用户Id **/
|
||||
private Long userId;
|
||||
/** 姓名 **/
|
||||
private String realName;
|
||||
/** 证件号 **/
|
||||
@TrimAndUpper
|
||||
private String cardNo;
|
||||
/** 银行卡号 **/
|
||||
@TrimAndUpper
|
||||
private String bankAccountNo;
|
||||
/** 手机号 **/
|
||||
@TrimAndUpper
|
||||
private String phone;
|
||||
/** 认证源id **/
|
||||
private Long sourceVerifyId;
|
||||
/** 状态 **/
|
||||
private Integer status;
|
||||
/** 失败原因 **/
|
||||
private String failReason;
|
||||
|
||||
}
|
||||
@@ -1,39 +0,0 @@
|
||||
package com.senmesh.usercenter.user.dto;
|
||||
|
||||
import com.senmesh.common.dto.BaseOperateDTO;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* @author czy
|
||||
* @date 2021-07-19
|
||||
*/
|
||||
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Builder
|
||||
@ApiModel(description = "用户四要素操作")
|
||||
public class UserBankCardFourVerificationOperateDTO extends BaseOperateDTO {
|
||||
|
||||
/** 用户Id **/
|
||||
private Long userId;
|
||||
/** 姓名 **/
|
||||
private String realName;
|
||||
/** 证件号 **/
|
||||
private String cardNo;
|
||||
/** 银行卡号 **/
|
||||
private String bankAccountNo;
|
||||
/** 手机号 **/
|
||||
private String phone;
|
||||
/** 认证源id **/
|
||||
private Long sourceVerifyId;
|
||||
/** 状态 **/
|
||||
private Integer status;
|
||||
/** 失败原因 **/
|
||||
private String failReason;
|
||||
|
||||
}
|
||||
@@ -1,41 +0,0 @@
|
||||
package com.senmesh.usercenter.user.dto;
|
||||
|
||||
import com.senmesh.common.dto.PageQueryDTO;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.io.Serializable;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* @author sr on 2021-08-04
|
||||
*/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Builder
|
||||
@ApiModel(description = "用户四要素查询条件")
|
||||
public class UserBankCardFourVerificationQueryDTO extends PageQueryDTO<UserBankCardThreeVerificationDTO> implements Serializable{
|
||||
|
||||
/** **/
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("id")
|
||||
private Long id;
|
||||
@ApiModelProperty("用户Id")
|
||||
private Long userId;
|
||||
@ApiModelProperty("姓名")
|
||||
private String realName;
|
||||
@ApiModelProperty("证件号")
|
||||
private String cardNo;
|
||||
@ApiModelProperty("银行卡号")
|
||||
private String bankAccountNo;
|
||||
@ApiModelProperty("手机号")
|
||||
private String phone;
|
||||
@ApiModelProperty("状态")
|
||||
private Integer status;
|
||||
|
||||
|
||||
}
|
||||
@@ -1,47 +0,0 @@
|
||||
package com.senmesh.usercenter.user.dto;
|
||||
|
||||
import com.senmesh.common.annotation.trimAndUpper.TrimAndUpper;
|
||||
import com.senmesh.common.dto.BaseOperateDTO;
|
||||
import com.senmesh.common.validation.annotation.Expression;
|
||||
import com.senmesh.common.validation.constants.ValidProviderEnum;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.*;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
|
||||
/**
|
||||
* @author czy
|
||||
* @date 2021-06-23
|
||||
*/
|
||||
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Builder
|
||||
public class UserBankCardThreeVerificationCreateDTO extends BaseOperateDTO {
|
||||
|
||||
private static final long serialVersionUID = 2760612675601900048L;
|
||||
/** 姓名 **/
|
||||
@NotBlank(message = "姓名不能为空")
|
||||
@TrimAndUpper
|
||||
private String realName;
|
||||
/** 证件号 **/
|
||||
@TrimAndUpper
|
||||
@Expression(type = ValidProviderEnum.CARD_NO, message = "身份证号不正确")
|
||||
private String cardNo;
|
||||
/** 银行卡号 **/
|
||||
@TrimAndUpper
|
||||
@NotBlank(message = "银行卡号不能为空")
|
||||
private String bankAccountNo;
|
||||
|
||||
/** 添加卡时可以附带以下信息保存 **/
|
||||
@ApiModelProperty(value = "银行名")
|
||||
private String bankName;
|
||||
@ApiModelProperty(value = "开户行名")
|
||||
private String bankBranchName;
|
||||
@ApiModelProperty(value = "是否默认账户")
|
||||
private Boolean defaultAccount;
|
||||
|
||||
}
|
||||
@@ -1,39 +0,0 @@
|
||||
package com.senmesh.usercenter.user.dto;
|
||||
|
||||
import com.senmesh.common.annotation.trimAndUpper.TrimAndUpper;
|
||||
import com.senmesh.common.dto.BaseDTO;
|
||||
|
||||
import lombok.*;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
/**
|
||||
* @author czy
|
||||
* @date 2021-06-23
|
||||
*/
|
||||
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@SuperBuilder
|
||||
public class UserBankCardThreeVerificationDTO extends BaseDTO {
|
||||
|
||||
private static final long serialVersionUID = 2760612675601900048L;
|
||||
/** 用户Id **/
|
||||
private Long userId;
|
||||
/** 姓名 **/
|
||||
private String realName;
|
||||
/** 证件号 **/
|
||||
@TrimAndUpper
|
||||
private String cardNo;
|
||||
/** 银行卡号 **/
|
||||
@TrimAndUpper
|
||||
private String bankAccountNo;
|
||||
/** 认证源id **/
|
||||
private Long sourceVerifyId;
|
||||
/** 状态 **/
|
||||
private Integer status;
|
||||
/** 失败原因 **/
|
||||
private String failReason;
|
||||
|
||||
}
|
||||
@@ -1,37 +0,0 @@
|
||||
package com.senmesh.usercenter.user.dto;
|
||||
|
||||
import com.senmesh.common.dto.BaseOperateDTO;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* @author czy
|
||||
* @date 2021-07-19
|
||||
*/
|
||||
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Builder
|
||||
@ApiModel(description = "用户三要素操作")
|
||||
public class UserBankCardThreeVerificationOperateDTO extends BaseOperateDTO {
|
||||
|
||||
/** 用户Id **/
|
||||
private Long userId;
|
||||
/** 姓名 **/
|
||||
private String realName;
|
||||
/** 证件号 **/
|
||||
private String cardNo;
|
||||
/** 银行卡号 **/
|
||||
private String bankAccountNo;
|
||||
/** 认证源id **/
|
||||
private Long sourceVerifyId;
|
||||
/** 状态 **/
|
||||
private Integer status;
|
||||
/** 失败原因 **/
|
||||
private String failReason;
|
||||
|
||||
}
|
||||
@@ -1,40 +0,0 @@
|
||||
package com.senmesh.usercenter.user.dto;
|
||||
|
||||
import com.senmesh.common.dto.PageQueryDTO;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @author sr on 2021-08-04
|
||||
*/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Builder
|
||||
@ApiModel(description = "用户三要素查询条件")
|
||||
public class UserBankCardThreeVerificationQueryDTO extends PageQueryDTO<UserBankCardThreeVerificationDTO> implements Serializable{
|
||||
|
||||
/** **/
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("id")
|
||||
private Long id;
|
||||
@ApiModelProperty("用户Id")
|
||||
private Long userId;
|
||||
@ApiModelProperty("姓名")
|
||||
private String realName;
|
||||
@ApiModelProperty("证件号")
|
||||
private String cardNo;
|
||||
@ApiModelProperty("银行卡号")
|
||||
private String bankAccountNo;
|
||||
@ApiModelProperty("状态")
|
||||
private Integer status;
|
||||
|
||||
|
||||
}
|
||||
@@ -1,36 +0,0 @@
|
||||
package com.senmesh.usercenter.user.dto;
|
||||
|
||||
import com.senmesh.common.dto.BaseDTO;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
/**
|
||||
* @author czy
|
||||
* @date 2021-06-22
|
||||
*/
|
||||
@ApiModel("用户信息要素认证")
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@SuperBuilder
|
||||
public class UserFactorVerifyDTO extends BaseDTO {
|
||||
|
||||
@ApiModelProperty("姓名")
|
||||
private String realName;
|
||||
@ApiModelProperty("证件号")
|
||||
private String cardNo;
|
||||
@ApiModelProperty("")
|
||||
private String bankAccountNo;
|
||||
@ApiModelProperty("")
|
||||
private String phone;
|
||||
@ApiModelProperty("")
|
||||
private Integer status;
|
||||
@ApiModelProperty("")
|
||||
private Integer authenticationSource;
|
||||
|
||||
}
|
||||
@@ -1,39 +0,0 @@
|
||||
package com.senmesh.usercenter.user.dto;
|
||||
|
||||
import com.senmesh.common.dto.BaseDTO;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
/**
|
||||
* @author sr on 2021-05-24
|
||||
*/
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@SuperBuilder
|
||||
@Data
|
||||
@ApiModel(description = "用户证件正反面")
|
||||
public class UserIdentityPhotoDTO extends BaseDTO {
|
||||
|
||||
/** **/
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 用户id */
|
||||
private Long userId;
|
||||
/** 正面照 */
|
||||
private String frontFileCode;
|
||||
/** 反面照 */
|
||||
private String backFileCode;
|
||||
/** 状态 */
|
||||
private Integer status;
|
||||
|
||||
/** 备注(失败状态时,此处为失败原因) */
|
||||
private String remark;
|
||||
|
||||
|
||||
}
|
||||
@@ -1,58 +0,0 @@
|
||||
package com.senmesh.usercenter.user.dto;
|
||||
|
||||
import com.senmesh.common.dto.BaseDTO;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.util.Date;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
/**
|
||||
* @author czy
|
||||
* @date 2021-06-11
|
||||
*/
|
||||
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@SuperBuilder
|
||||
@ApiModel("用户证件信息")
|
||||
public class UserIdentityPhotoInfoDTO extends BaseDTO {
|
||||
|
||||
@ApiModelProperty("证件照片id")
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty("用户id")
|
||||
private Long userId;
|
||||
|
||||
@ApiModelProperty("正面照片文件编码")
|
||||
private String frontFileCode;
|
||||
|
||||
@ApiModelProperty("背面照片文件编码")
|
||||
private String backFileCode;
|
||||
|
||||
@ApiModelProperty("姓名")
|
||||
private String realName;
|
||||
|
||||
@ApiModelProperty("性别(0-女 1-男)")
|
||||
private Integer gender;
|
||||
|
||||
@ApiModelProperty("年龄")
|
||||
private Integer age;
|
||||
|
||||
@ApiModelProperty("身份证号")
|
||||
private String cardNo;
|
||||
|
||||
@ApiModelProperty("身份证有效期起始日期")
|
||||
private Date idCardValidPeriodStart;
|
||||
|
||||
@ApiModelProperty("身份证有效期结束日期")
|
||||
private Date idCardValidPeriodEnd;
|
||||
|
||||
@ApiModelProperty("状态")
|
||||
private Integer status;
|
||||
|
||||
}
|
||||
@@ -1,42 +0,0 @@
|
||||
package com.senmesh.usercenter.user.dto;
|
||||
|
||||
import com.senmesh.common.dto.BaseOperateDTO;
|
||||
import com.senmesh.common.validation.Create;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.io.Serializable;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* @author sr on 2021-05-24
|
||||
*/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Builder
|
||||
@ApiModel(description = "用户证件正反面操作")
|
||||
public class UserIdentityPhotoOperateDTO extends BaseOperateDTO implements Serializable{
|
||||
|
||||
/** **/
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("用户Id")
|
||||
private Long userId;
|
||||
|
||||
@ApiModelProperty("正面照片文件编码")
|
||||
@NotNull(message = "正面照片文件编码不能为空", groups = {Create.class})
|
||||
private String frontFileCode;
|
||||
|
||||
@ApiModelProperty("背面照片文件编码")
|
||||
@NotNull(message = "背面照片文件编码不能为空", groups = {Create.class})
|
||||
private String backFileCode;
|
||||
|
||||
@ApiModelProperty("失败原因")
|
||||
private String failReason;
|
||||
|
||||
|
||||
}
|
||||
@@ -1,37 +0,0 @@
|
||||
package com.senmesh.usercenter.user.dto;
|
||||
|
||||
import com.senmesh.common.dto.PageQueryDTO;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.*;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* @author sr on 2021-05-24
|
||||
*/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Builder
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ApiModel(description = "用户证件正反面查询条件")
|
||||
public class UserIdentityPhotoQueryDTO extends PageQueryDTO<UserIdentityPhotoDTO> implements Serializable{
|
||||
|
||||
/** **/
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("id")
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty("用户Id")
|
||||
private Long userId;
|
||||
|
||||
@ApiModelProperty("状态")
|
||||
private Integer status;
|
||||
|
||||
@ApiModelProperty("用户Ids")
|
||||
private Set<Long> userIds;
|
||||
|
||||
}
|
||||
@@ -1,46 +0,0 @@
|
||||
package com.senmesh.usercenter.user.dto;
|
||||
|
||||
import com.senmesh.common.annotation.trimAndUpper.TrimAndUpper;
|
||||
import com.senmesh.common.dto.BaseDTO;
|
||||
import com.senmesh.common.validation.annotation.Expression;
|
||||
import com.senmesh.common.validation.constants.ValidProviderEnum;
|
||||
|
||||
import lombok.*;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
|
||||
/**
|
||||
* @author czy
|
||||
* @date 2021-06-23
|
||||
*/
|
||||
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@SuperBuilder
|
||||
public class UserPhoneThreeVerificationDTO extends BaseDTO {
|
||||
|
||||
private static final long serialVersionUID = 2760612675601900048L;
|
||||
/** 用户Id **/
|
||||
private Long userId;
|
||||
/** 姓名 **/
|
||||
@NotBlank(message = "姓名不能为空")
|
||||
private String realName;
|
||||
/** 证件号 **/
|
||||
@TrimAndUpper
|
||||
@Expression(type = ValidProviderEnum.CARD_NO, message = "身份证号不正确")
|
||||
private String cardNo;
|
||||
/** 银行卡号 **/
|
||||
@TrimAndUpper
|
||||
@NotBlank(message = "手机号不能为空")
|
||||
private String phone;
|
||||
/** 认证源id **/
|
||||
private Long sourceVerifyId;
|
||||
/** 状态 **/
|
||||
private Integer status;
|
||||
/** 失败原因 **/
|
||||
private String failReason;
|
||||
|
||||
}
|
||||
@@ -1,38 +0,0 @@
|
||||
package com.senmesh.usercenter.user.dto;
|
||||
|
||||
import com.senmesh.common.dto.BaseOperateDTO;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* @author czy
|
||||
* @date 2021-07-19
|
||||
*/
|
||||
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Builder
|
||||
@ApiModel(description = "用户三要素操作")
|
||||
public class UserPhoneThreeVerificationOperateDTO extends BaseOperateDTO {
|
||||
|
||||
private static final long serialVersionUID = -2410402053001109346L;
|
||||
/** 用户Id **/
|
||||
private Long userId;
|
||||
/** 姓名 **/
|
||||
private String realName;
|
||||
/** 证件号 **/
|
||||
private String cardNo;
|
||||
/** 银行卡号 **/
|
||||
private String phone;
|
||||
/** 认证源id **/
|
||||
private Long sourceVerifyId;
|
||||
/** 状态 **/
|
||||
private Integer status;
|
||||
/** 失败原因 **/
|
||||
private String failReason;
|
||||
|
||||
}
|
||||
@@ -1,38 +0,0 @@
|
||||
package com.senmesh.usercenter.user.dto;
|
||||
|
||||
import com.senmesh.common.dto.PageQueryDTO;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.*;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @author sr on 2021-08-04
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Builder
|
||||
@ApiModel(description = "用户三要素查询条件")
|
||||
public class UserPhoneThreeVerificationQueryDTO extends PageQueryDTO<UserBankCardThreeVerificationDTO> implements Serializable{
|
||||
|
||||
/** **/
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("id")
|
||||
private Long id;
|
||||
@ApiModelProperty("用户Id")
|
||||
private Long userId;
|
||||
@ApiModelProperty("姓名")
|
||||
private String realName;
|
||||
@ApiModelProperty("证件号")
|
||||
private String cardNo;
|
||||
@ApiModelProperty("手机号")
|
||||
private String phone;
|
||||
@ApiModelProperty("状态")
|
||||
private Integer status;
|
||||
|
||||
|
||||
}
|
||||
@@ -1,35 +0,0 @@
|
||||
package com.senmesh.usercenter.user.dto;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
|
||||
import com.senmesh.common.annotation.trimAndUpper.TrimAndUpper;
|
||||
import com.senmesh.common.dto.BaseOperateDTO;
|
||||
import com.senmesh.common.validation.annotation.Expression;
|
||||
import com.senmesh.common.validation.constants.ValidProviderEnum;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Builder
|
||||
public class UserRealNameTwoAuthCreateDTO extends BaseOperateDTO {
|
||||
|
||||
/** **/
|
||||
private static final long serialVersionUID = -5584391504640898412L;
|
||||
|
||||
/** 姓名 **/
|
||||
@NotBlank(message = "姓名不能为空")
|
||||
@TrimAndUpper
|
||||
private String realName;
|
||||
/** 证件号 **/
|
||||
@TrimAndUpper
|
||||
@Expression(type = ValidProviderEnum.CARD_NO, message = "身份证号不正确")
|
||||
private String cardNo;
|
||||
|
||||
}
|
||||
@@ -1,43 +0,0 @@
|
||||
package com.senmesh.usercenter.user.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.senmesh.common.entity.BaseEntity;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
/**
|
||||
* @author czy
|
||||
* @date 2021-06-29
|
||||
*/
|
||||
|
||||
@TableName("uc_user_bank_account")
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@SuperBuilder
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class UcUserBankAccount extends BaseEntity {
|
||||
|
||||
/** 用户id **/
|
||||
private Long userId;
|
||||
|
||||
/** 卡号 **/
|
||||
private String accountNo;
|
||||
|
||||
/** 户名 **/
|
||||
private String accountName;
|
||||
|
||||
/** 银行名 **/
|
||||
private String bankName;
|
||||
|
||||
/** 开户行名 **/
|
||||
private String bankBranchName;
|
||||
|
||||
/** 是否默认账户 **/
|
||||
private Boolean defaultAccount;
|
||||
|
||||
}
|
||||
@@ -1,42 +0,0 @@
|
||||
package com.senmesh.usercenter.user.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.senmesh.common.entity.BaseEntity;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
/**
|
||||
* @author czy
|
||||
* @date 2021-06-23
|
||||
*/
|
||||
|
||||
@TableName("uc_user_bank_card_four_verification")
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@SuperBuilder
|
||||
@Data
|
||||
public class UserBankCardFourVerification extends BaseEntity {
|
||||
|
||||
/** 用户Id **/
|
||||
private Long userId;
|
||||
/** 姓名 **/
|
||||
private String realName;
|
||||
/** 证件号 **/
|
||||
private String cardNo;
|
||||
/** 银行卡号 **/
|
||||
private String bankAccountNo;
|
||||
/** 手机号 **/
|
||||
private String phone;
|
||||
/** 认证源id **/
|
||||
private Long sourceVerifyId;
|
||||
/** 状态 **/
|
||||
private Integer status;
|
||||
/** 失败原因 **/
|
||||
private String failReason;
|
||||
|
||||
}
|
||||
@@ -1,55 +0,0 @@
|
||||
package com.senmesh.usercenter.user.entity;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.senmesh.common.entity.BaseEntity;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* @author czy
|
||||
* @date 2021-06-23
|
||||
*/
|
||||
|
||||
@TableName("uc_user_bank_card_three_verification")
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
public class UserBankCardThreeVerification extends BaseEntity {
|
||||
|
||||
/** 用户Id **/
|
||||
private Long userId;
|
||||
/** 姓名 **/
|
||||
private String realName;
|
||||
/** 证件号 **/
|
||||
private String cardNo;
|
||||
/** 银行卡号 **/
|
||||
private String bankAccountNo;
|
||||
/** 认证源id **/
|
||||
private Long sourceVerifyId;
|
||||
/** 状态 **/
|
||||
private Integer status;
|
||||
/** 失败原因 **/
|
||||
private String failReason;
|
||||
|
||||
@Builder
|
||||
public UserBankCardThreeVerification(Long id, Boolean deleted, Long createBy,
|
||||
Date createTime, Long updateBy, Date updateTime, Long proxyBy,
|
||||
Long userId, String realName, String cardNo, String bankAccountNo,
|
||||
Long sourceVerifyId, Integer status, String failReason) {
|
||||
super(id, deleted, createBy, createTime, updateBy, updateTime, proxyBy);
|
||||
this.userId = userId;
|
||||
this.realName = realName;
|
||||
this.cardNo = cardNo;
|
||||
this.bankAccountNo = bankAccountNo;
|
||||
this.sourceVerifyId = sourceVerifyId;
|
||||
this.status = status;
|
||||
this.failReason = failReason;
|
||||
}
|
||||
}
|
||||
@@ -1,39 +0,0 @@
|
||||
package com.senmesh.usercenter.user.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.senmesh.common.entity.BaseEntity;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
/**
|
||||
* 用户证件正反面
|
||||
*
|
||||
* @author sr on 2021-05-24
|
||||
*/
|
||||
@TableName("uc_user_identity_photo")
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@SuperBuilder
|
||||
@Data
|
||||
public class UserIdentityPhoto extends BaseEntity {
|
||||
|
||||
/** **/
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 用户id */
|
||||
private Long userId ;
|
||||
/** 正面照 */
|
||||
private String frontFileCode ;
|
||||
/** 反面照 */
|
||||
private String backFileCode ;
|
||||
/** 状态(1-未认证 2-认证中 3-认证成功 4-认证失败) */
|
||||
private Integer status ;
|
||||
/** 失败原因 */
|
||||
private String failReason;
|
||||
|
||||
}
|
||||
@@ -1,53 +0,0 @@
|
||||
package com.senmesh.usercenter.user.entity;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.senmesh.common.entity.BaseEntity;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* @author czy
|
||||
* @date 2021-06-23
|
||||
*/
|
||||
|
||||
@TableName("uc_user_phone_three_verification")
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
public class UserPhoneThreeVerification extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = -7530290681100657538L;
|
||||
/** 用户Id **/
|
||||
private Long userId;
|
||||
/** 姓名 **/
|
||||
private String realName;
|
||||
/** 证件号 **/
|
||||
private String cardNo;
|
||||
/** 手机号 **/
|
||||
private String phone;
|
||||
/** 认证源id **/
|
||||
private Long sourceVerifyId;
|
||||
/** 状态 **/
|
||||
private Integer status;
|
||||
/** 失败原因 **/
|
||||
private String failReason;
|
||||
|
||||
@Builder
|
||||
public UserPhoneThreeVerification(Long id, Boolean deleted, Long createBy, Date createTime, Long updateBy, Date updateTime, Long proxyBy, Long userId, String realName, String cardNo, String phone, Long sourceVerifyId, Integer status, String failReason) {
|
||||
super(id, deleted, createBy, createTime, updateBy, updateTime, proxyBy);
|
||||
this.userId = userId;
|
||||
this.realName = realName;
|
||||
this.cardNo = cardNo;
|
||||
this.phone = phone;
|
||||
this.sourceVerifyId = sourceVerifyId;
|
||||
this.status = status;
|
||||
this.failReason = failReason;
|
||||
}
|
||||
}
|
||||
@@ -1,38 +0,0 @@
|
||||
package com.senmesh.usercenter.user.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.senmesh.common.entity.BaseEntity;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
/**
|
||||
* @author fzp
|
||||
* @date 2021年7月14日10:24:54
|
||||
*/
|
||||
|
||||
@TableName("uc_user_real_name_two_verification")
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@SuperBuilder
|
||||
@Data
|
||||
public class UserRealNameTwoVerification extends BaseEntity {
|
||||
|
||||
/** 用户Id **/
|
||||
private Long userId;
|
||||
/** 姓名 **/
|
||||
private String realName;
|
||||
/** 证件号 **/
|
||||
private String cardNo;
|
||||
/** 认证源id **/
|
||||
private Integer sourceVerifyId;
|
||||
/** 认证状态 1未认证2认证中3认证成功4认证失败 **/
|
||||
private Integer status;
|
||||
/** 失败原因 **/
|
||||
private String failReason;
|
||||
|
||||
}
|
||||
@@ -1,11 +1,14 @@
|
||||
package com.senmesh.usercenter.user.login.dto;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.senmesh.security.util.PasswordUtils;
|
||||
import com.senmesh.usercenter.user.util.UserUtils;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.*;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
import lombok.Builder.Default;
|
||||
|
||||
/**
|
||||
* 用户
|
||||
@@ -93,4 +96,15 @@ public class UserDetailDTO implements Serializable{
|
||||
@JsonIgnore
|
||||
private List<UserDetailSelectDTO> users;
|
||||
|
||||
@ApiModelProperty("是否初始密码")
|
||||
@Default
|
||||
private Boolean originPassword = Boolean.TRUE;
|
||||
|
||||
public void setPassword(String password){
|
||||
this.password = password;
|
||||
if (!PasswordUtils.match(password, UserUtils.DEFAULT_ORG_USER_PASSWORD)) {
|
||||
originPassword = Boolean.FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,82 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.senmesh.usercenter.user.dao.UserBankAccountMapper">
|
||||
|
||||
<select id="queryByCardNos" resultType="com.senmesh.usercenter.user.dto.UserBankAccountDTO">
|
||||
SELECT
|
||||
uu.card_no,
|
||||
uuba.*
|
||||
FROM
|
||||
uc_user uu
|
||||
LEFT JOIN uc_user_bank_account uuba ON uuba.user_id = uu.id
|
||||
WHERE
|
||||
uu.deleted = FALSE
|
||||
AND uuba.deleted = FALSE
|
||||
AND uuba.default_account = 1
|
||||
AND uu.card_no IN
|
||||
<foreach collection="cardNos" item="cardNo" open="(" close=")" separator=",">
|
||||
#{cardNo}
|
||||
</foreach>
|
||||
</select>
|
||||
|
||||
<select id="listUserBankAccountDTO" resultType="com.senmesh.usercenter.user.dto.UserBankAccountDTO">
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
uc_user_bank_account
|
||||
WHERE
|
||||
deleted = FALSE
|
||||
<if test="param.id != null">
|
||||
and id = #{param.id}
|
||||
</if>
|
||||
<if test="param.userId != null">
|
||||
and user_id = #{param.userId}
|
||||
</if>
|
||||
<if test="param.accountNo != null">
|
||||
and account_no = #{param.accountNo}
|
||||
</if>
|
||||
<if test="param.accountName != null">
|
||||
and account_name = #{param.accountName}
|
||||
</if>
|
||||
<if test="param.bankName != null">
|
||||
and bank_name = #{param.bankName}
|
||||
</if>
|
||||
<if test="param.bankBranchName != null">
|
||||
and bank_branch_name = #{param.bankBranchName}
|
||||
</if>
|
||||
<if test="param.defaultAccount != null">
|
||||
and default_account = #{param.defaultAccount}
|
||||
</if>
|
||||
<if test="param.unCanceledUser != null">
|
||||
and exists (
|
||||
select 1 from uc_user u
|
||||
where u.id = user_id
|
||||
and u.deleted = FALSE and u.status != 3
|
||||
)
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<update id="modify">
|
||||
update uc_user_bank_account
|
||||
<set>
|
||||
update_time = now(),
|
||||
update_by = #{param.operateUserId},
|
||||
<if test="param.defaultAccount == true">
|
||||
default_account = if(id = #{param.id}, 1, 0),
|
||||
</if>
|
||||
<if test="param.bankBranchName != null and param.bankBranchName != ''">
|
||||
bank_branch_name = #{param.bankBranchName},
|
||||
</if>
|
||||
</set>
|
||||
where user_id = #{param.operateUserId}
|
||||
and deleted = FALSE
|
||||
and (id = #{param.id}
|
||||
<if test="param.defaultAccount == true">
|
||||
or default_account = 1
|
||||
</if>
|
||||
)
|
||||
</update>
|
||||
|
||||
</mapper>
|
||||
@@ -1,38 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.senmesh.usercenter.user.dao.UserBankCardFourVerificationMapper">
|
||||
|
||||
<select id="listUserBankCardFourVerificationDTO" resultType="com.senmesh.usercenter.user.dto.UserBankCardFourVerificationDTO">
|
||||
select
|
||||
*
|
||||
from uc_user_bank_card_four_verification
|
||||
where
|
||||
deleted = FALSE
|
||||
<if test="param.id != null">
|
||||
and id = #{param.id}
|
||||
</if>
|
||||
<if test="param.userId != null">
|
||||
and user_id = #{param.userId}
|
||||
</if>
|
||||
<if test="param.realName != null and param.realName != ''">
|
||||
and real_name = #{param.realName}
|
||||
</if>
|
||||
<if test="param.cardNo != null and param.cardNo != ''">
|
||||
and card_no = #{param.cardNo}
|
||||
</if>
|
||||
<if test="param.bankAccountNo != null and param.bankAccountNo != ''">
|
||||
and bank_account_no = #{param.bankAccountNo}
|
||||
</if>
|
||||
<if test="param.bankAccountNo != null and param.bankAccountNo != ''">
|
||||
and phone = #{param.phone}
|
||||
</if>
|
||||
<if test="param.status != null and param.status != ''">
|
||||
and status = #{param.status}
|
||||
</if>
|
||||
order by id desc
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
@@ -1,35 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.senmesh.usercenter.user.dao.UserBankCardThreeVerificationMapper">
|
||||
<select id="listUserBankCardThreeVerificationDTO" resultType="com.senmesh.usercenter.user.dto.UserBankCardThreeVerificationDTO">
|
||||
select
|
||||
*
|
||||
from uc_user_bank_card_three_verification
|
||||
where
|
||||
deleted = FALSE
|
||||
<if test="param.id != null">
|
||||
and id = #{param.id}
|
||||
</if>
|
||||
<if test="param.userId != null">
|
||||
and user_id = #{param.userId}
|
||||
</if>
|
||||
<if test="param.realName != null and param.realName != ''">
|
||||
and real_name = #{param.realName}
|
||||
</if>
|
||||
<if test="param.cardNo != null and param.cardNo != ''">
|
||||
and card_no = #{param.cardNo}
|
||||
</if>
|
||||
<if test="param.bankAccountNo != null and param.bankAccountNo != ''">
|
||||
and bank_account_no = #{param.bankAccountNo}
|
||||
</if>
|
||||
<if test="param.status != null and param.status != ''">
|
||||
and status = #{param.status}
|
||||
</if>
|
||||
order by id desc
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
</mapper>
|
||||
@@ -1,25 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.senmesh.usercenter.user.dao.UserIdentityPhotoMapper">
|
||||
<select id="listUserIdentityPhotoDTO" resultType="com.senmesh.usercenter.user.dto.UserIdentityPhotoDTO">
|
||||
select
|
||||
uip.*
|
||||
from uc_user_identity_photo uip
|
||||
where
|
||||
uip.deleted = FALSE
|
||||
<if test="param.id != null">
|
||||
and uip.id = #{param.id}
|
||||
</if>
|
||||
<if test="param.status != null">
|
||||
and uip.status = #{param.status}
|
||||
</if>
|
||||
<if test="param.userIds != null and param.userIds.size() > 0 ">
|
||||
AND uip.user_id in
|
||||
<foreach close=")" collection="param.userIds" index="index" item="userId" open="("
|
||||
separator=",">#{userId}
|
||||
</foreach>
|
||||
</if>
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -102,7 +102,6 @@
|
||||
where
|
||||
id = #{operateUserId}
|
||||
and deleted = FALSE and status != 3
|
||||
and (password is null or password = '')
|
||||
</update>
|
||||
|
||||
<select id="listUserDetailDTO" resultType="com.senmesh.usercenter.user.login.dto.UserDetailDTO">
|
||||
@@ -372,6 +371,7 @@
|
||||
o.id as org_id,
|
||||
o.org_name,
|
||||
o.type as orgType,
|
||||
u.password,
|
||||
case when u.password is null or password = '' then 0 else 1 end initialedPassword,
|
||||
o.recruit_position_type
|
||||
FROM uc_user u
|
||||
|
||||
@@ -1,33 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.senmesh.usercenter.user.dao.UserPhoneThreeVerificationMapper">
|
||||
<select id="listUserPhoneThreeVerificationDTO" resultType="com.senmesh.usercenter.user.dto.UserPhoneThreeVerificationDTO">
|
||||
select
|
||||
*
|
||||
from uc_user_phone_three_verification
|
||||
where
|
||||
deleted = FALSE
|
||||
<if test="param.id != null">
|
||||
and id = #{param.id}
|
||||
</if>
|
||||
<if test="param.userId != null">
|
||||
and user_id = #{param.userId}
|
||||
</if>
|
||||
<if test="param.realName != null and param.realName != ''">
|
||||
and real_name = #{param.realName}
|
||||
</if>
|
||||
<if test="param.cardNo != null and param.cardNo != ''">
|
||||
and card_no = #{param.cardNo}
|
||||
</if>
|
||||
<if test="param.phone != null and param.phone != ''">
|
||||
and phone = #{param.phone}
|
||||
</if>
|
||||
<if test="param.status != null and param.status != ''">
|
||||
and status = #{param.status}
|
||||
</if>
|
||||
order by id desc
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -1,59 +0,0 @@
|
||||
package com.senmesh.usercenter.user.mapstruct;
|
||||
|
||||
import com.senmesh.usercenter.user.dto.UserBankAccountChangeReqDTO;
|
||||
import com.senmesh.usercenter.user.dto.UserBankAccountCreateReqDTO;
|
||||
import com.senmesh.usercenter.user.dto.UserBankAccountDTO;
|
||||
import com.senmesh.usercenter.user.dto.UserBankAccountInfoDTO;
|
||||
import com.senmesh.usercenter.user.dto.UserBankCardThreeVerificationCreateDTO;
|
||||
import com.senmesh.usercenter.user.entity.UcUserBankAccount;
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.Mapping;
|
||||
import org.mapstruct.Mappings;
|
||||
import org.mapstruct.factory.Mappers;
|
||||
|
||||
|
||||
/**
|
||||
* 用户的银行账户映射映射器
|
||||
*
|
||||
* @author Carlye
|
||||
* @date 2021/06/25
|
||||
*/
|
||||
@Mapper
|
||||
public interface UserBankAccountMapMapper {
|
||||
|
||||
UserBankAccountMapMapper INSTANCE =
|
||||
Mappers.getMapper(UserBankAccountMapMapper.class);
|
||||
|
||||
|
||||
/**
|
||||
* dto转换
|
||||
* @param reqDTO 点播dto
|
||||
* @return {@link UcUserBankAccount}
|
||||
*/
|
||||
UcUserBankAccount exchange(UserBankAccountCreateReqDTO reqDTO);
|
||||
|
||||
/**
|
||||
* dto转换
|
||||
* @param reqDTO 点播dto
|
||||
* @return {@link UcUserBankAccount}
|
||||
*/
|
||||
UserBankAccountInfoDTO exchange(UserBankAccountDTO reqDTO);
|
||||
|
||||
@Mapping(source = "newAccountNo",target = "accountNo")
|
||||
UserBankAccountCreateReqDTO exchange(UserBankAccountChangeReqDTO reqDTO);
|
||||
|
||||
|
||||
/**
|
||||
* dto转换
|
||||
* @param userBankAccount 点播dto
|
||||
* @return {@link UserBankAccountCreateReqDTO}
|
||||
*/
|
||||
UserBankAccountInfoDTO exchange(UcUserBankAccount userBankAccount);
|
||||
|
||||
|
||||
@Mappings(value = {
|
||||
@Mapping(target = "accountName", source = "realName"),
|
||||
@Mapping(target = "accountNo", source = "bankAccountNo"),
|
||||
})
|
||||
UserBankAccountCreateReqDTO toDto(UserBankCardThreeVerificationCreateDTO userBankCardThreeVerificationCreateDTO);
|
||||
}
|
||||
@@ -1,41 +0,0 @@
|
||||
package com.senmesh.usercenter.user.mapstruct;
|
||||
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.factory.Mappers;
|
||||
|
||||
import com.senmesh.usercenter.user.dto.UserIdentityPhotoInfoDTO;
|
||||
import com.senmesh.usercenter.user.dto.UserIdentityPhotoDTO;
|
||||
import com.senmesh.usercenter.user.entity.UserIdentityPhoto;
|
||||
import com.senmesh.usercenter.user.dto.UserIdentityPhotoOperateDTO;
|
||||
|
||||
/**
|
||||
* @author sr on 2021-05-24
|
||||
*/
|
||||
@Mapper
|
||||
public interface UserIdentityPhotoMapMapper {
|
||||
|
||||
UserIdentityPhotoMapMapper INSTANCE =
|
||||
Mappers.getMapper(UserIdentityPhotoMapMapper.class);
|
||||
|
||||
/**
|
||||
* dto to entity
|
||||
*
|
||||
* @param userIdentityPhotoDto
|
||||
* @return
|
||||
* @author sr on 2021-05-24
|
||||
*/
|
||||
UserIdentityPhoto toEntity(
|
||||
UserIdentityPhotoDTO userIdentityPhotoDto);
|
||||
|
||||
|
||||
/**
|
||||
* @param userIdentityPhotoOperateDTO
|
||||
* @return
|
||||
* @author sr on 2021-05-24
|
||||
*/
|
||||
UserIdentityPhoto toEntity(UserIdentityPhotoOperateDTO userIdentityPhotoOperateDTO);
|
||||
|
||||
UserIdentityPhotoInfoDTO toInfo(
|
||||
UserIdentityPhotoDTO userIdentityPhotoDto);
|
||||
|
||||
}
|
||||
@@ -1,49 +0,0 @@
|
||||
package com.senmesh.usercenter.user.service;
|
||||
|
||||
import com.senmesh.usercenter.user.dto.*;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.groups.Default;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 用户银行卡 业务逻辑
|
||||
*
|
||||
* @author Carlye
|
||||
* @date 2021/06/25
|
||||
*/
|
||||
@Validated(Default.class)
|
||||
public interface UserBankAccountService {
|
||||
|
||||
/**
|
||||
* 添加银行账户
|
||||
*
|
||||
* @param reqDTO 点播dto
|
||||
* @return {@link UserBankAccountInfoDTO}
|
||||
*/
|
||||
UserBankAccountInfoDTO addBankAccount(@Valid UserBankAccountCreateReqDTO reqDTO);
|
||||
|
||||
|
||||
/**
|
||||
* 获取身份证列表对应的银行卡号
|
||||
* @param cardNos
|
||||
* @return
|
||||
*/
|
||||
Map<String, String> queryBankAccountMap(List<String> cardNos);
|
||||
|
||||
/**
|
||||
* 获取身份证列表对应的银行卡号
|
||||
* @param userBankAccountQueryDTO
|
||||
* @return
|
||||
*/
|
||||
List<UserBankAccountDTO> list(UserBankAccountQueryDTO userBankAccountQueryDTO);
|
||||
|
||||
void page(UserBankAccountQueryDTO userBankAccountQueryDTO);
|
||||
|
||||
void modify(UserBankAccountModifyDTO userBankAccountModifyDTO);
|
||||
|
||||
UserBankAccountDTO get(Long id);
|
||||
|
||||
}
|
||||
@@ -1,60 +0,0 @@
|
||||
package com.senmesh.usercenter.user.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.senmesh.usercenter.user.dto.UserIdentityPhotoQueryDTO;
|
||||
import com.senmesh.usercenter.user.dto.UserIdentityPhotoOperateDTO;
|
||||
import com.senmesh.usercenter.user.dto.UserIdentityPhotoDTO;
|
||||
import com.senmesh.usercenter.user.dto.UserIdentityPhotoInfoDTO;
|
||||
|
||||
/**
|
||||
* 用户证件正反面
|
||||
*
|
||||
* @author sr on 2021-05-24
|
||||
*/
|
||||
public interface UserIdentityPhotoService {
|
||||
|
||||
/**
|
||||
* 新增
|
||||
*
|
||||
* @param userIdentityPhotoOperateDTO
|
||||
* @return
|
||||
* @author sr on 2021-05-24
|
||||
*/
|
||||
Long create(UserIdentityPhotoOperateDTO userIdentityPhotoOperateDTO);
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*
|
||||
* @param userIdentityPhotoOperateDTO
|
||||
* @author sr on 2021-05-24
|
||||
*/
|
||||
void modify(UserIdentityPhotoOperateDTO userIdentityPhotoOperateDTO);
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*
|
||||
* @param id
|
||||
* @author sr on 2021-05-24
|
||||
*/
|
||||
void remove(Long id);
|
||||
|
||||
/**
|
||||
* 根据userId查
|
||||
* @param userId
|
||||
* @return
|
||||
*/
|
||||
UserIdentityPhotoDTO getByUserId(Long userId);
|
||||
|
||||
/**
|
||||
* 查询
|
||||
*
|
||||
* @param userIdentityPhotoQueryDTO
|
||||
* @return
|
||||
* @author sr on 2021-05-24
|
||||
*/
|
||||
List<UserIdentityPhotoDTO> list(UserIdentityPhotoQueryDTO userIdentityPhotoQueryDTO);
|
||||
|
||||
UserIdentityPhotoInfoDTO findInfo(Long userId);
|
||||
|
||||
}
|
||||
@@ -1,160 +0,0 @@
|
||||
package com.senmesh.usercenter.user.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import com.google.common.collect.Maps;
|
||||
import com.senmesh.common.exception.util.Assert;
|
||||
import com.senmesh.common.util.ListUtil;
|
||||
import com.senmesh.frame.redis.aop.annotation.AutoUnLock;
|
||||
import com.senmesh.frame.redis.dto.LockDTO;
|
||||
import com.senmesh.frame.redis.redisson.RedissonUtils;
|
||||
import com.senmesh.usercenter.user.dao.UserBankAccountMapper;
|
||||
import com.senmesh.usercenter.user.dao.UserBankCardThreeVerificationMapper;
|
||||
import com.senmesh.usercenter.user.dto.UserBankAccountCreateReqDTO;
|
||||
import com.senmesh.usercenter.user.dto.UserBankAccountDTO;
|
||||
import com.senmesh.usercenter.user.dto.UserBankAccountInfoDTO;
|
||||
import com.senmesh.usercenter.user.dto.UserBankAccountModifyDTO;
|
||||
import com.senmesh.usercenter.user.dto.UserBankAccountQueryDTO;
|
||||
import com.senmesh.usercenter.user.dto.UserDTO;
|
||||
import com.senmesh.usercenter.user.dto.UserQueryDTO;
|
||||
import com.senmesh.usercenter.user.entity.UcUserBankAccount;
|
||||
import com.senmesh.usercenter.user.mapstruct.UserBankAccountMapMapper;
|
||||
import com.senmesh.usercenter.user.service.UserBankAccountService;
|
||||
import com.senmesh.usercenter.user.service.UserService;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 用户银行卡表 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author Carlye
|
||||
* @since 2021-06-25
|
||||
*/
|
||||
@Slf4j
|
||||
@Service
|
||||
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
|
||||
public class UserBankAccountServiceImpl implements UserBankAccountService {
|
||||
|
||||
public static final String BIND_BANK_ACCOUNT = "bindBankAccount";
|
||||
|
||||
@Resource
|
||||
private UserBankAccountMapper userBankAccountMapper;
|
||||
|
||||
@Resource
|
||||
private UserBankCardThreeVerificationMapper userBankCardThreeVerificationMapper;
|
||||
|
||||
@Autowired
|
||||
private UserService userService;
|
||||
|
||||
@Override
|
||||
@AutoUnLock
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public UserBankAccountInfoDTO addBankAccount(UserBankAccountCreateReqDTO reqDTO) {
|
||||
List<UserDTO> list = userService.list(UserQueryDTO.builder().id(reqDTO.getUserId())
|
||||
.cardNo(reqDTO.getCardNo()).build());
|
||||
Assert.isTrue(CollectionUtils.size(list) == 1, "用户信息模糊,绑定失败");
|
||||
Long userId = list.get(0).getId();
|
||||
String accountNo = reqDTO.getAccountNo();
|
||||
Assert.isTrue(
|
||||
RedissonUtils.tryLockAutomatically(
|
||||
LockDTO.builder()
|
||||
.tryLockWaitTime(0L)
|
||||
.lockTimeout(60 * 5L)
|
||||
.methodName(BIND_BANK_ACCOUNT)
|
||||
.arg(String.valueOf(reqDTO.getUserId()))
|
||||
.arg(reqDTO.getAccountNo())
|
||||
.build()
|
||||
),
|
||||
"该用户银行卡绑定正在处理, 请稍后再试");
|
||||
List<UserBankAccountDTO> userBankAccountDTOS = list(UserBankAccountQueryDTO.builder()
|
||||
.accountNo(accountNo)
|
||||
.unCanceledUser(Boolean.TRUE)
|
||||
.build());
|
||||
UserBankAccountDTO userBankAccount = userBankAccountDTOS.isEmpty() ? null : userBankAccountDTOS.stream().findFirst().get();
|
||||
String errorMsg = null;
|
||||
if (Objects.nonNull(userBankAccount)) {
|
||||
if (userId.compareTo(userBankAccount.getUserId()) == 0) {
|
||||
// errorMsg = String.format("该[%s]银行卡已经被其他人绑定了",accountNo);
|
||||
return UserBankAccountMapMapper.INSTANCE.exchange(userBankAccount);
|
||||
} else {
|
||||
errorMsg = String.format("该银行卡[%s]已经被其他用户绑定了", accountNo);
|
||||
}
|
||||
}
|
||||
Assert.isTrue(StringUtils.isEmpty(errorMsg), errorMsg);
|
||||
|
||||
UcUserBankAccount userBankAccountEntity = UserBankAccountMapMapper.INSTANCE.exchange(reqDTO);
|
||||
userBankAccountDTOS = list(UserBankAccountQueryDTO.builder()
|
||||
.userId(userId)
|
||||
.build());
|
||||
//如不存在默认卡
|
||||
if (CollectionUtils.isEmpty(userBankAccountDTOS)) {
|
||||
userBankAccountEntity.setDefaultAccount(Boolean.TRUE);
|
||||
} else {
|
||||
// 找到默认卡
|
||||
UserBankAccountDTO userBankAccountExist = userBankAccountDTOS.stream()
|
||||
.filter(UserBankAccountDTO::getDefaultAccount)
|
||||
.findFirst().orElse(null);
|
||||
if (Objects.isNull(userBankAccountExist)) {
|
||||
userBankAccountEntity.setDefaultAccount(Boolean.TRUE);
|
||||
} else if (Boolean.TRUE.equals(userBankAccountEntity.getDefaultAccount())) { //如果需要设置默认卡
|
||||
userBankAccountMapper.updateEntitySelective(UcUserBankAccount.builder()
|
||||
.id(userBankAccountExist.getId()).defaultAccount(Boolean.FALSE).build());
|
||||
}
|
||||
}
|
||||
userBankAccountMapper.saveEntity(userBankAccountEntity);
|
||||
|
||||
return UserBankAccountMapMapper.INSTANCE.exchange(userBankAccountEntity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, String> queryBankAccountMap(List<String> cardNos) {
|
||||
return Optional.ofNullable(userBankAccountMapper.queryByCardNos(cardNos))
|
||||
.map(list -> list.stream().collect(Collectors.toMap(UserBankAccountDTO::getCardNo, UserBankAccountDTO::getAccountNo)))
|
||||
.orElse(Maps.newHashMap());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void page(UserBankAccountQueryDTO userBankAccountQueryDTO) {
|
||||
userBankAccountMapper
|
||||
.listUserBankAccountDTO(userBankAccountQueryDTO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<UserBankAccountDTO> list(UserBankAccountQueryDTO userBankAccountQueryDTO) {
|
||||
userBankAccountQueryDTO.disablePage();
|
||||
return userBankAccountMapper
|
||||
.listUserBankAccountDTO(userBankAccountQueryDTO);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public void modify(UserBankAccountModifyDTO userBankAccountModifyDTO) {
|
||||
Long id = userBankAccountModifyDTO.getId();
|
||||
Long userId = userBankAccountModifyDTO.getOperateUserId();
|
||||
Assert.isTrue(!list(UserBankAccountQueryDTO.builder().id(id).userId(userId).build()).isEmpty(),
|
||||
"未找到对应卡记录");
|
||||
userBankAccountMapper.modify(userBankAccountModifyDTO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public UserBankAccountDTO get(Long id) {
|
||||
List<UserBankAccountDTO> userBankAccountDTOs = list(UserBankAccountQueryDTO.builder().id(id).build());
|
||||
return ListUtil.first(userBankAccountDTOs);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,95 +0,0 @@
|
||||
package com.senmesh.usercenter.user.service.impl;
|
||||
|
||||
import com.senmesh.common.util.UserContextHolder;
|
||||
import com.senmesh.usercenter.user.constant.UserIdentityPhotoConstants;
|
||||
import com.senmesh.usercenter.user.dao.UserIdentityPhotoMapper;
|
||||
import com.senmesh.usercenter.user.dto.*;
|
||||
import com.senmesh.usercenter.user.entity.UserIdentityPhoto;
|
||||
import com.senmesh.usercenter.user.mapstruct.UserIdentityPhotoMapMapper;
|
||||
import com.senmesh.usercenter.user.service.UserIdentityPhotoService;
|
||||
import com.senmesh.usercenter.user.service.UserService;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author sr on 2021-05-24
|
||||
*/
|
||||
@Service
|
||||
public class UserIdentityPhotoServiceImpl implements UserIdentityPhotoService {
|
||||
|
||||
@Autowired
|
||||
private UserIdentityPhotoMapper userIdentityPhotoMapper;
|
||||
|
||||
@Autowired
|
||||
private UserService userService;
|
||||
|
||||
@Override
|
||||
public Long create(UserIdentityPhotoOperateDTO userIdentityPhotoOperateDTO) {
|
||||
Long userId = userIdentityPhotoOperateDTO.getUserId();
|
||||
if(userId == null){
|
||||
userId = UserContextHolder.getLoginUserId();
|
||||
}
|
||||
// 删除此人历史数据
|
||||
this.removeByUserId(userId);
|
||||
|
||||
UserIdentityPhoto userIdentityPhoto = UserIdentityPhotoMapMapper.INSTANCE
|
||||
.toEntity(userIdentityPhotoOperateDTO);
|
||||
userIdentityPhoto.setUserId(userId);
|
||||
//默认为未认证状态
|
||||
userIdentityPhoto.setStatus(UserIdentityPhotoConstants.PHOTO_STATUS_NOT_AUTH);
|
||||
userIdentityPhotoMapper.saveEntity(userIdentityPhoto);
|
||||
return userIdentityPhoto.getId();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void modify(UserIdentityPhotoOperateDTO userIdentityPhotoOperateDTO) {
|
||||
UserIdentityPhoto userIdentityPhoto = UserIdentityPhotoMapMapper.INSTANCE
|
||||
.toEntity(userIdentityPhotoOperateDTO);
|
||||
userIdentityPhotoMapper.updateEntitySelective(userIdentityPhoto,UserContextHolder.getLoginUserId());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void remove(Long id) {
|
||||
userIdentityPhotoMapper.deleteEntity(UserIdentityPhoto.builder().id(id).build(),
|
||||
UserContextHolder.getLoginUserId());
|
||||
}
|
||||
|
||||
private void removeByUserId(Long userId){
|
||||
UserIdentityPhotoQueryDTO userIdentityPhotoQueryDTO =
|
||||
(UserIdentityPhotoQueryDTO) UserIdentityPhotoQueryDTO.builder().userId(userId).build()
|
||||
.disablePage();
|
||||
List<UserIdentityPhotoDTO> list = this.list(userIdentityPhotoQueryDTO);
|
||||
if(CollectionUtils.isNotEmpty(list)){
|
||||
list.forEach(userIdentityPhoto -> {
|
||||
this.remove(userIdentityPhoto.getId());
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public UserIdentityPhotoDTO getByUserId(Long userId) {
|
||||
return userIdentityPhotoMapper.getByUserId(userId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<UserIdentityPhotoDTO> list(UserIdentityPhotoQueryDTO userIdentityPhotoQueryDTO) {
|
||||
return userIdentityPhotoMapper.listUserIdentityPhotoDTO(userIdentityPhotoQueryDTO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public UserIdentityPhotoInfoDTO findInfo(Long userId) {
|
||||
UserIdentityPhotoDTO identityPhotoDTO = this.getByUserId(userId);
|
||||
if(identityPhotoDTO == null){
|
||||
return null;
|
||||
}
|
||||
UserIdentityPhotoInfoDTO infoDto = UserIdentityPhotoMapMapper.INSTANCE.toInfo(identityPhotoDTO);
|
||||
UserDTO userDTO = userService.get(userId);
|
||||
infoDto.setRealName(userDTO.getRealName());
|
||||
infoDto.setCardNo(userDTO.getCardNo());
|
||||
return infoDto;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -897,6 +897,7 @@ public class UserServiceImpl implements UserService {
|
||||
//是否已经有重名
|
||||
Assert.isTrue(!userMapper.existUsername(username, orgUserEditDTO.getId()),
|
||||
"账号已存在!");
|
||||
user.setUsername(username);
|
||||
|
||||
if (StringUtils.isNotBlank(orgUserEditDTO.getEmail())) {
|
||||
boolean emailFlag = ValidateUtils.checkEmail(orgUserEditDTO.getEmail());
|
||||
@@ -904,22 +905,25 @@ public class UserServiceImpl implements UserService {
|
||||
}
|
||||
user.setEmail(orgUserEditDTO.getEmail());
|
||||
|
||||
boolean nicknameFlag = ValidateUtils.checkNickName(orgUserEditDTO.getChineseName());
|
||||
if (StringUtils.isNotBlank(orgUserEditDTO.getNickname())) {
|
||||
boolean nicknameFlag = ValidateUtils.checkNickName(orgUserEditDTO.getNickname());
|
||||
Assert.isTrue(nicknameFlag, "中文名格式错误!(长度小于32位,不支持特殊字符)");
|
||||
user.setNickname(orgUserEditDTO.getChineseName());
|
||||
user.setNickname(orgUserEditDTO.getNickname());
|
||||
}
|
||||
user.setRealName(orgUserEditDTO.getRealName());
|
||||
|
||||
// 用户名上锁
|
||||
LockDTO lockDTO = UserServiceImpl.getUsernameLockDTO(username);
|
||||
Assert.isTrue(RedissonUtils.tryLockAutomatically(lockDTO), "当前用户名正在操作");
|
||||
|
||||
//手机号码有变化则更新
|
||||
String phone = orgUserEditDTO.getPhone();
|
||||
/* String phone = orgUserEditDTO.getPhone();
|
||||
if (!Objects.equals(phone, userDto.getPhone())) {
|
||||
lockAndCheck(userDto.getType(), phone);
|
||||
user.setPhone(orgUserEditDTO.getPhone());
|
||||
//代管操作,更新手机号码后,恢复到未绑定状态
|
||||
user.setPhoneBinding(Boolean.FALSE);
|
||||
}
|
||||
}*/
|
||||
user.setEnabled(orgUserEditDTO.getEnabled());
|
||||
return userMapper.updateEntitySelective(user) == 1;
|
||||
}
|
||||
|
||||
@@ -21,6 +21,7 @@ public class UserUtils {
|
||||
public static final int NICKNAME_LENGTH = 12;
|
||||
|
||||
public static final String DEFAULT_AVATAR_KEY = "user.default.avatars";
|
||||
public static final String DEFAULT_ORG_USER_PASSWORD = "Qaz123567!@#";
|
||||
|
||||
/**
|
||||
* 设置创建用户初始状态数据 (账号随机生成/非超管/非实名/待激活/已启用-登录相关)
|
||||
@@ -51,8 +52,8 @@ public class UserUtils {
|
||||
public static void setInitUserNameAndPasswordToCreateUser(User user, Boolean administrator) {
|
||||
//创建用户的时候就给手机号绑定状态改为已绑定
|
||||
user.setPhoneBinding(true);
|
||||
user.setUsername("ou"+user.getPhone());
|
||||
user.setPassword(PasswordUtils.encode("ou123567"));
|
||||
user.setUsername(user.getPhone());
|
||||
user.setPassword(PasswordUtils.encode(DEFAULT_ORG_USER_PASSWORD));
|
||||
}
|
||||
|
||||
public static String dealNickname(String nickname, String phone) {
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
package com.senmesh;
|
||||
|
||||
import com.senmesh.common.AlitaResult;
|
||||
import com.senmesh.common.util.JsonUtils;
|
||||
import com.senmesh.sdk.ali.config.AliProperties.IdcardProperties;
|
||||
import com.senmesh.sdk.ali.dto.IdCardReq;
|
||||
import com.senmesh.sdk.ali.dto.IdCardRes;
|
||||
import com.senmesh.sdk.ali.service.impl.AliVerifyServiceImpl;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
@Slf4j
|
||||
public class AliVerifyTest {
|
||||
|
||||
public static IdcardProperties idcardProperties = IdcardProperties.builder()
|
||||
.url("https://kzidcardv1.market.alicloudapi.com/api-mall/api/id_card/check")
|
||||
.appcode("728e8c05167a482093418707ca22822b").build();
|
||||
|
||||
@Test
|
||||
public void idcard() {
|
||||
IdCardReq req = IdCardReq.builder().name("吴国东").idcard("210221197907106318").build();
|
||||
AlitaResult<IdCardRes> result = AliVerifyServiceImpl.verify(req, idcardProperties);
|
||||
log.info("{}", JsonUtils.toJsonString(result));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
package com.senmesh;
|
||||
|
||||
import com.senmesh.common.AlitaResult;
|
||||
import com.senmesh.sdk.deepseek.service.DeepSeekProvider;
|
||||
import com.senmesh.sdk.xf.model.ChatReq;
|
||||
import com.senmesh.sdk.xf.model.MessageDTO;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
@Slf4j
|
||||
public class DeepSeekTest {
|
||||
|
||||
@Test
|
||||
public void chat(){
|
||||
AlitaResult result = DeepSeekProvider.httpChat(ChatReq.builder().model("deepseek-chat").message(MessageDTO.builder().role("user").content("讲个故事").build()).build(), "");
|
||||
log.info("{}", result);
|
||||
}
|
||||
|
||||
}
|
||||
11
src/test/java/com/senmesh/PwdTest.java
Normal file
11
src/test/java/com/senmesh/PwdTest.java
Normal file
@@ -0,0 +1,11 @@
|
||||
package com.senmesh;
|
||||
|
||||
public class PwdTest {
|
||||
|
||||
public static void main(String[] args) {
|
||||
String password = "Qaz123567!@#";
|
||||
String encode = com.senmesh.security.util.PasswordUtils.encode(password);
|
||||
System.out.println(encode);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,77 +0,0 @@
|
||||
package com.senmesh;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStreamReader;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.springframework.core.io.ClassPathResource;
|
||||
|
||||
import com.senmesh.common.util.SensitiveWordUtils;
|
||||
|
||||
import toolgood.words.IllegalWordsSearch;
|
||||
|
||||
public class SensitiveWordTest {
|
||||
|
||||
@Test
|
||||
public void testLoadWordsFormBinaryFile() throws IOException {
|
||||
long l1 = System.currentTimeMillis();
|
||||
|
||||
IllegalWordsSearch search = new IllegalWordsSearch();
|
||||
long l2 = System.currentTimeMillis();
|
||||
System.out.println("IllegalWordsSearch init time:" + (l2 - l1));
|
||||
|
||||
search.Load(new ClassPathResource("config" + File.separator +"IllegalWordsSearch.dat").getFile().getAbsolutePath());
|
||||
long l3 = System.currentTimeMillis();
|
||||
System.out.println("load Load time:" + (l3 - l2));
|
||||
String test = "机机ji歪歪";
|
||||
boolean b = search.ContainsAny(test);
|
||||
System.out.println(b);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testLoadWordsFormFile() throws IOException {
|
||||
List<String> list = new ArrayList<>();
|
||||
long l2 = System.currentTimeMillis();
|
||||
try (BufferedReader bufferedReader = new BufferedReader(
|
||||
new InputStreamReader(new ClassPathResource("config" + File.separator + "sensi_words.txt").getInputStream()))) {
|
||||
for (String line = bufferedReader.readLine(); line != null; line =
|
||||
bufferedReader.readLine()) {
|
||||
list.add(line);
|
||||
}
|
||||
}
|
||||
IllegalWordsSearch search = new IllegalWordsSearch();
|
||||
search.SetKeywords(list);
|
||||
long l3 = System.currentTimeMillis();
|
||||
System.out.println("load Load time:" + (l3 - l2));
|
||||
// search.Save("IllegalWordsSearch.dat");
|
||||
String test = "机机ji歪歪";
|
||||
|
||||
boolean b = search.ContainsAny(test);
|
||||
if (b == false) {
|
||||
System.out.println("ContainsAny is Error.");
|
||||
}
|
||||
System.out.println("end...");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void check() {
|
||||
boolean check = SensitiveWordUtils.check("机机2歪歪");
|
||||
System.out.println(check);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void findFirst() {
|
||||
System.out.println(SensitiveWordUtils.findFirst("这是一个正经的岗位"));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void findAll() {
|
||||
System.out.println(SensitiveWordUtils.findAll("的"));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -1,245 +0,0 @@
|
||||
package com.senmesh;
|
||||
|
||||
import com.senmesh.sdk.xf.config.XfProperties.XfAppProperties;
|
||||
import com.senmesh.sdk.xf.model.TranslateReq;
|
||||
import com.senmesh.sdk.xf.service.RtasrClientApp;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import org.apache.tomcat.util.http.fileupload.ByteArrayOutputStream;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.springframework.http.HttpEntity;
|
||||
import org.springframework.http.HttpHeaders;
|
||||
import org.springframework.http.HttpMethod;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
import com.senmesh.common.AlitaResult;
|
||||
import com.senmesh.common.exception.BusinessException;
|
||||
import com.senmesh.common.exception.util.Assert;
|
||||
import com.senmesh.common.util.JsonUtils;
|
||||
import com.senmesh.sdk.common.util.HttpUtils;
|
||||
import com.senmesh.sdk.xf.config.XfProperties;
|
||||
import com.senmesh.sdk.xf.model.ChatReq;
|
||||
import com.senmesh.sdk.xf.model.MessageDTO;
|
||||
import com.senmesh.sdk.xf.service.XfSparkProvider;
|
||||
import com.senmesh.sdk.xf.util.WebIATWS;
|
||||
import com.senmesh.sdk.xf.util.WebTtsWS;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
@Slf4j
|
||||
public class SparkTest {
|
||||
static String httpAPIPassword = "";
|
||||
|
||||
static XfProperties xfProperties = XfProperties.builder()
|
||||
.iatHostUrl("https://iat-api.xfyun.cn/v2/iat")
|
||||
.ttsHostUrl("https://tts-api.xfyun.cn/v2/tts")
|
||||
.otsHostUrl("https://ntrans.xfyun.cn/v2/ots")
|
||||
.httpAPIPassword("EfqszvaEEoTnUfQRRcvr:ohEYAwzpIiUeWFvZAqEk")
|
||||
.appId("83b8ddca")
|
||||
.apiSecret("ZWE2MjkzY2VmZDkwM2EwZGJhNGRhOWJm")
|
||||
.apiKey("e092f93e28ebe6d27f756bb2d884dcff")
|
||||
.rtasr(XfAppProperties.builder().apiKey("2e33d9128a73be21b294594e5377ca53").build())
|
||||
.build();
|
||||
|
||||
@Test
|
||||
public void test() {
|
||||
HttpHeaders header = new HttpHeaders();
|
||||
header.add("Authorization", "Bearer " + httpAPIPassword);
|
||||
header.add("Content-Type", "application/json");
|
||||
// 发送请求
|
||||
Map<String, Object> data = new HashMap<String, Object>();
|
||||
data.put("model","4.0Ultra");
|
||||
Map<String, Object> r1 = new HashMap<String, Object>();
|
||||
r1.put("role","system");
|
||||
r1.put("content","你是一位专业的HR。目标任务:请根据我给出的position_name生成5个相关的面试中可能会问到的问题,并为每个问题都生成一个参考答案,并从1开始生成问题序号");
|
||||
Map<String, Object> r2 = new HashMap<String, Object>();
|
||||
r2.put("role","system");
|
||||
r2.put("content","全部数据以JSON模版的形式返回,格式为:{position_name:岗位信息, [{qno:问题序号,q:问题,a:参考答案}]}");
|
||||
Map<String, Object> r3 = new HashMap<String, Object>();
|
||||
r3.put("role","user");
|
||||
r3.put("content","{\"positionName\":\"java开发\"}");
|
||||
data.put("messages",Lists.newArrayList(r1, r2, r3));
|
||||
HttpEntity requestEntity = new HttpEntity(data, header);
|
||||
ResponseEntity<String> response = HttpUtils.restTemplate.exchange("https://spark-api-open.xf-yun.com/v1/chat/completions", HttpMethod.POST, requestEntity, String.class);
|
||||
System.out.println(JsonUtils.toDefaultJsonString(response));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testAlita() {
|
||||
ChatReq req = ChatReq.builder()
|
||||
.message(MessageDTO.builder().role("system")
|
||||
.content("你是一位专业的HR。目标任务:请根据我给出的信息生成5个相关的面试中可能会问到的问题,并为每个问题都生成一个参考答案,并从1开始生成问题序号")
|
||||
.build())
|
||||
.message(MessageDTO.builder().role("system")
|
||||
.content("全部数据以JSON模版的形式返回,格式为:[{qno:问题序号,q:问题,a:参考答案}]").build())
|
||||
.message(MessageDTO.builder().role("user").content("jobName").build()).build();
|
||||
AlitaResult<?> res = XfSparkProvider.httpChat(req, httpAPIPassword);
|
||||
log.info("{}", res);
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
public void testEvaluate() {
|
||||
ChatReq req = ChatReq.builder()
|
||||
.message(MessageDTO.builder().role("system")
|
||||
.content("你是一位专业的简历撰写专家。目标任务:请根据我给出的信息,生成指定的内容。需求说明:要求在与原文语意一致的基础上扩写内容,风格设定,简明扼要。")
|
||||
.build())
|
||||
.message(MessageDTO.builder().role("system")
|
||||
.content("根据我输入的信息,输出1段自我评价,包含学习能力、工作态度、团队协作等方面,字数在300字左右")
|
||||
.build())
|
||||
.message(MessageDTO.builder().role("system")
|
||||
.content("全部数据以JSON模版的形式返回, 格式为:{'selfEva':xxx}")
|
||||
.build())
|
||||
.message(MessageDTO.builder().role("user").content("环卫工").build()).build();
|
||||
AlitaResult<?> res = XfSparkProvider.httpChat(req, httpAPIPassword);
|
||||
log.info("{}", res);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testWorkExperience() {
|
||||
ChatReq req = ChatReq.builder()
|
||||
.message(MessageDTO.builder().role("system")
|
||||
.content("你是一位专业的简历撰写专家。目标任务:请根据我给出的信息,生成一份履历丰富的简历。")
|
||||
.build())
|
||||
.message(MessageDTO.builder().role("system")
|
||||
.content("简历内容包含个人信息简介、工作经历、教育背景、掌握技能、自我评价。以JSON格式返回,每个点作为一个对象。")
|
||||
.build())
|
||||
.message(MessageDTO.builder().role("system")
|
||||
.content("个人信息输出格式为:{姓名:xxx, 年龄:xxx,联系电话:xxx,联系邮箱:xxx}")
|
||||
.build())
|
||||
.message(MessageDTO.builder().role("system")
|
||||
.content("工作经历以数组的形式返回。输出格式为:[{企业名称:xxx, 岗位:xxx,工作职责:[xxx,xxx,xxx],工作时间:xxx-xxx}]")
|
||||
.build())
|
||||
.message(MessageDTO.builder().role("system")
|
||||
.content("掌握技能必须作为数组输出")
|
||||
.build())
|
||||
.message(MessageDTO.builder().role("system")
|
||||
.content("自我评价必须作为数组输出")
|
||||
.build())
|
||||
.message(MessageDTO.builder().role("user")
|
||||
// .content("{\"name\":\"小明\",\"gender\":1,\"contactWay\":\"0717-123123\",\"birthDay\":\"1980-07\",\"work\":\"在一家科技公司干了4年\"}")
|
||||
.content("我是小明,在一家科技公司干了4年")
|
||||
.build()).build();
|
||||
AlitaResult<String> result = XfSparkProvider.httpChat(req, httpAPIPassword);
|
||||
log.info("{}", result);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
public void testAnalyseResume() {
|
||||
ChatReq req = ChatReq.builder()
|
||||
.message(MessageDTO.builder().role("system")
|
||||
.content("你是一位专业的简历分析专家。目标任务:请根据我给出的信息,分析得出简历信息。不要自己填充json信息")
|
||||
.build())
|
||||
.message(MessageDTO.builder().role("system")
|
||||
.content("请生成一个包含以下信息的 JSON 数据,根据用户给出的实际信息解析,值都可为空:\n"
|
||||
+ "- name(字符串类型):表示用户的姓名。\n"
|
||||
+ "- sex(字符串类型):表示用户的性别,值为 \"1\"(男)或 \"2\"(女),身份证号倒数第二位,奇数是男,偶数是女。\n"
|
||||
+ "- phone(字符串类型):表示用户的联系电话,可为空,不为空的格式为 以 1 开头,共 11 位数字。\n"
|
||||
+ "- email(字符串类型):表示用户的联系电子邮箱地址,可为空,不为空的格式为 包含 @ 符号,且 @ 前后至少有一个字符 及 域名部分至少包含一个 . 符号。\n"
|
||||
+ "- intentionPosition(字符串类型):表示用户的意向职位。\n"
|
||||
+ "- major(字符串类型):表示用户的专业。\n"
|
||||
+ "- birthday(日期类型):表示用户的出生日期,格式为 YYYY-MM。\n"
|
||||
+ "- jobTime(日期类型):表示用户的参加工作时间,格式为 YYYY-MM。\n"
|
||||
+ "- school(字符串类型):表示用户的毕业院校。\n"
|
||||
+ "- education(字符串类型):表示用户的学历,值为:\n"
|
||||
+ " - \"1\":\"博士\"\n"
|
||||
+ " - \"2\":\"硕士\"\n"
|
||||
+ " - \"3\":\"本科\"\n"
|
||||
+ " - \"4\":\"大专\"\n"
|
||||
+ " - \"5\":\"中专\"\n"
|
||||
+ " - \"6\":\"技校\"\n"
|
||||
+ " - \"7\":\"职高\"\n"
|
||||
+ " - \"9\":\"高中\"\n"
|
||||
+ " - \"10\":\"初中\"\n"
|
||||
+ " - \"11\":\"小学\"\n"
|
||||
+ "- workExperience(字符串类型):表示用户的工作经历,格式为多行文本,包含以下信息:\n"
|
||||
+ " - 企业名称\n"
|
||||
+ " - 岗位\n"
|
||||
+ " - 工作时间\n"
|
||||
+ " - 工作职责\n"
|
||||
+ "- selfEvaluation(字符串类型):表示用户的自我评价,格式为多行文本。")
|
||||
.build())
|
||||
.message(MessageDTO.builder().role("user").content("我是小明,身份证号是110105199003071234,小学毕业,前年在一家科技公司干了1年,现在想找个环卫工的活,请用abc@33.com联系我").build()).build();
|
||||
AlitaResult<String> result = XfSparkProvider.httpChat(req, httpAPIPassword);
|
||||
log.info("{}", result);
|
||||
|
||||
}
|
||||
|
||||
@Test
|
||||
public void iat() throws IOException {
|
||||
String file = "src/main/resources/iat/cn.pcm";
|
||||
try(InputStream is = new FileInputStream(file)){
|
||||
AlitaResult<String> result = WebIATWS.execute(is, xfProperties);
|
||||
log.info("{}", result);
|
||||
}
|
||||
// // 示例的WebM文件路径(请替换为实际的有效路径)
|
||||
String webmFilePath = "src/main/resources/iat/audio.webm";
|
||||
// // 示例的输出MP3文件路径(请替换为实际的有效路径)
|
||||
// String mp3FilePath = "src/main/resources/iat/file.mp3";
|
||||
|
||||
// try(InputStream is = FileUtils.convertWebmToMp3(new File(webmFilePath))){
|
||||
// AlitaResult<String> result = WebIATWS.execute(is, xfProperties);
|
||||
// log.info("{}", result);
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
@Test
|
||||
public void tts() throws Exception {
|
||||
// try(OutputStream outputStream = new FileOutputStream("src/main/resources/iat/223.mp3");){
|
||||
// WebTtsWS.execute("欢迎来到讯飞开放平台", xfProperties, outputStream);
|
||||
// }
|
||||
// try(ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
|
||||
// OutputStream fs = new FileOutputStream("src/main/resources/iat/323.mp3");){
|
||||
// WebTtsWS.execute("欢迎来到讯飞开放平台", xfProperties, outputStream);
|
||||
// fs.write(outputStream.toByteArray());
|
||||
// }
|
||||
|
||||
try(ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
|
||||
OutputStream fs = new FileOutputStream("src/main/resources/iat/323.mp3");){
|
||||
AlitaResult<Void> result = WebTtsWS.execute("欢迎来到讯飞开放平台", xfProperties, outputStream);
|
||||
Assert.isTrue(result.getSuccess(), result.getMsg());
|
||||
fs.write(outputStream.toByteArray());
|
||||
} catch (IOException e) {
|
||||
throw new BusinessException("语音合成异常:" + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
public void ots(){
|
||||
// AlitaResult<?> result = XfSparkProvider.translate(TranslateReq.builder().text("欢迎#你啊,.;@#$你好").build(), xfProperties);
|
||||
AlitaResult<?> result = XfSparkProvider.translate(TranslateReq.builder().text("تىيانەي ئەقىللىق خىزمەت مۇلازىمىتى بىرلەشمە سۇپىسىغا خوش ھەمرىيىڭىز.").from("uy").to("cn").build(), xfProperties);
|
||||
log.info("{}", result);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void rtasr() throws IOException {
|
||||
String file = "src/main/resources/iat/ug.pcm";
|
||||
try (InputStream is = new FileInputStream(file)) {
|
||||
AlitaResult<String> result = RtasrClientApp.execute(is, "cn_uyghur", xfProperties);
|
||||
log.info("{}", result);
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
public void chat(){
|
||||
ChatReq req = ChatReq.builder().message(MessageDTO.builder().role("system").content(
|
||||
"你是一位专业的简历分析专家。目标任务:请根据我给出的信息,分析得出简历信息。不要自己填充json信息")
|
||||
.role("user").content("我是大学生")
|
||||
.build()).build();
|
||||
|
||||
AlitaResult<String> result = XfSparkProvider.httpChat(req, xfProperties.getHttpAPIPassword());
|
||||
Assert.isTrue(result.getSuccess(), result.getMsg());
|
||||
log.info("{}", result);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user