mirror of https://gitee.com/topiam/eiam
⚡ 优化代码
parent
265c357fe5
commit
705d4dbbe5
|
@ -187,7 +187,7 @@ public class UserEntity extends LogicDeleteEntity<Long> {
|
|||
*/
|
||||
@Transient
|
||||
@JsonIgnore
|
||||
private String plaintext;
|
||||
private String passwordPlainText;
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
|
|
|
@ -69,7 +69,7 @@ public class UserRepositoryCustomizedImpl implements UserRepositoryCustomized {
|
|||
@Override
|
||||
public Page<UserPO> getUserList(UserListQuery query, Pageable pageable) {
|
||||
//@formatter:off
|
||||
StringBuilder builder = new StringBuilder("SELECT `user`.id_, `user`.username_,`user`.password_, `user`.email_, `user`.phone_,`user`.phone_area_code, `user`.full_name ,`user`.nick_name, `user`.avatar_ , `user`.status_, `user`.data_origin, `user`.email_verified, `user`.phone_verified, `user`.auth_total, `user`.last_auth_ip, `user`.last_auth_time, `user`.expand_, `user`.external_id , `user`.expire_date,`user`.create_by, `user`.create_time, `user`.update_by , `user`.update_time, `user`.remark_, group_concat( IF(organization_member.primary_ = 1, null, organization_.display_path ) ) AS primary_org_display_path, group_concat( IF(organization_member.primary_ IS NULL, null, organization_.display_path ) ) AS org_display_path FROM `user` INNER JOIN `organization_member` ON (`user`.id_ = organization_member.user_id) INNER JOIN `organization` organization_ ON (organization_.id_ = organization_member.org_id) WHERE `user`.is_deleted = 0");
|
||||
StringBuilder builder = new StringBuilder("SELECT `user`.id_, `user`.username_, `user`.password_, `user`.email_, `user`.phone_, `user`.phone_area_code, `user`.full_name, `user`.nick_name, `user`.avatar_, `user`.status_, `user`.data_origin, `user`.email_verified, `user`.phone_verified, `user`.auth_total, `user`.last_auth_ip, `user`.last_auth_time, `user`.expand_, `user`.external_id, `user`.expire_date, `user`.create_by, `user`.create_time, `user`.update_by, `user`.update_time, `user`.remark_, group_concat( IF( organization_member.primary_ = TRUE, organization_.display_path, NULL) ) AS primary_org_display_path, group_concat( IF ( organization_member.primary_ IS NULL, organization_.display_path, NULL ) ) AS org_display_path FROM `user` INNER JOIN `organization_member` ON ( `user`.id_ = organization_member.user_id ) INNER JOIN `organization` organization_ ON ( organization_.id_ = organization_member.org_id ) WHERE `user`.is_deleted = 0 AND organization_member.is_deleted = 0 ");
|
||||
//组织条件
|
||||
if (StringUtils.isNotBlank(query.getOrganizationId())) {
|
||||
if (Boolean.TRUE.equals(query.getInclSubOrganization())) {
|
||||
|
|
|
@ -184,44 +184,53 @@ export default (props: UserListProps) => {
|
|||
dataIndex: 'orgDisplayPath',
|
||||
search: false,
|
||||
ellipsis: true,
|
||||
render: (_, record) => [
|
||||
<Popover
|
||||
key="pop"
|
||||
title={
|
||||
<Tag color={'geekblue'} key={record.orgDisplayPath}>
|
||||
{record.primaryOrgDisplayPath}
|
||||
</Tag>
|
||||
}
|
||||
content={
|
||||
<Space direction="vertical" size="small" style={{ display: 'flex' }}>
|
||||
{record.orgDisplayPath.split(',')?.map((p: string) => {
|
||||
return (
|
||||
<Tag color={'green'} key={p}>
|
||||
{p}
|
||||
</Tag>
|
||||
);
|
||||
})}
|
||||
</Space>
|
||||
}
|
||||
>
|
||||
<Space key="primary_path">
|
||||
{
|
||||
<Tag color={'geekblue'} key={record.primaryOrgDisplayPath}>
|
||||
{record.primaryOrgDisplayPath}
|
||||
</Tag>
|
||||
}
|
||||
</Space>
|
||||
<Space key="path" direction="vertical" size="small" style={{ display: 'flex' }}>
|
||||
{record.orgDisplayPath.split(',')?.map((p: string) => {
|
||||
return (
|
||||
<Tag color={'green'} key={p}>
|
||||
{p}
|
||||
render: (_, record) => {
|
||||
console.log(record.primaryOrgDisplayPath);
|
||||
return (
|
||||
<Popover
|
||||
key="pop"
|
||||
title={
|
||||
record.primaryOrgDisplayPath && (
|
||||
<Tag color={'geekblue'} key={record.orgDisplayPath}>
|
||||
{record.primaryOrgDisplayPath}
|
||||
</Tag>
|
||||
);
|
||||
})}
|
||||
</Space>
|
||||
</Popover>,
|
||||
],
|
||||
)
|
||||
}
|
||||
content={
|
||||
<Space direction="vertical" size="small" style={{ display: 'flex' }}>
|
||||
{record.orgDisplayPath?.split(',')?.map((p: string) => {
|
||||
return (
|
||||
<Tag color={'green'} key={p}>
|
||||
{p}
|
||||
</Tag>
|
||||
);
|
||||
})}
|
||||
</Space>
|
||||
}
|
||||
>
|
||||
{record.primaryOrgDisplayPath && (
|
||||
<Space key="primary_path">
|
||||
{
|
||||
<Tag color={'geekblue'} key={record.primaryOrgDisplayPath}>
|
||||
{record.primaryOrgDisplayPath}
|
||||
</Tag>
|
||||
}
|
||||
</Space>
|
||||
)}
|
||||
{record.orgDisplayPath && (
|
||||
<Space key="path" direction="vertical" size="small" style={{ display: 'flex' }}>
|
||||
{record.orgDisplayPath?.split(',')?.map((p: string) => {
|
||||
return (
|
||||
<Tag color={'green'} key={p}>
|
||||
{p}
|
||||
</Tag>
|
||||
);
|
||||
})}
|
||||
</Space>
|
||||
)}
|
||||
</Popover>
|
||||
);
|
||||
},
|
||||
},
|
||||
{
|
||||
title: intl.formatMessage({ id: 'pages.account.user_list.user.columns.status' }),
|
||||
|
|
|
@ -181,6 +181,7 @@ declare namespace AccountAPI {
|
|||
dataOrigin: string;
|
||||
authTotal: string;
|
||||
lastAuthTime: string;
|
||||
primaryOrgDisplayPath: string;
|
||||
orgDisplayPath: string;
|
||||
remark: string;
|
||||
custom?: Record<string, any>;
|
||||
|
|
|
@ -178,7 +178,7 @@ public class AbstractIdentitySourcePostProcessor {
|
|||
entity.setDataOrigin(dataOrigin);
|
||||
entity.setIdentitySourceId(identitySource.getId());
|
||||
entity.setPassword(passwordEncoder.encode(defaultPassword));
|
||||
entity.setPlaintext(defaultPassword);
|
||||
entity.setPasswordPlainText(defaultPassword);
|
||||
|
||||
//必须字段
|
||||
entity.setCreateBy(SYSTEM_DEFAULT_USER_NAME);
|
||||
|
@ -302,14 +302,14 @@ public class AbstractIdentitySourcePostProcessor {
|
|||
thirdPartyUser.getEmail(), thirdPartyUser.getPhone());
|
||||
if (StringUtils.isNotEmpty(thirdPartyUser.getEmail())) {
|
||||
Map<String, Object> parameter = new HashMap<>(16);
|
||||
parameter.put(MsgVariable.PASSWORD, thirdPartyUser.getPlaintext());
|
||||
parameter.put(MsgVariable.PASSWORD, thirdPartyUser.getPasswordPlainText());
|
||||
mailMsgEventPublish.publish(MailType.RESET_PASSWORD_CONFIRM,
|
||||
thirdPartyUser.getEmail(), parameter);
|
||||
}
|
||||
if (StringUtils.isNotEmpty(thirdPartyUser.getPhone())) {
|
||||
LinkedHashMap<String, String> parameter = new LinkedHashMap<>();
|
||||
parameter.put(USERNAME, thirdPartyUser.getUsername());
|
||||
parameter.put(MsgVariable.PASSWORD, thirdPartyUser.getPlaintext());
|
||||
parameter.put(MsgVariable.PASSWORD, thirdPartyUser.getPasswordPlainText());
|
||||
smsMsgEventPublish.publish(SmsType.RESET_PASSWORD_SUCCESS,
|
||||
thirdPartyUser.getPhone(), parameter);
|
||||
}
|
||||
|
|
|
@ -48,12 +48,6 @@ public class UpdateUserInfoRequest implements Serializable {
|
|||
@Schema(description = "昵称")
|
||||
private String nickName;
|
||||
|
||||
/**
|
||||
* 个人简介
|
||||
*/
|
||||
@Schema(description = "个人简介")
|
||||
private String personalProfile;
|
||||
|
||||
/**
|
||||
* 头像
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue