feat(用户): 用户身份新增admin字段
This commit is contained in:
parent
9c5f2ac3c5
commit
ad2cc4d747
@ -3,6 +3,7 @@ package com.red.circle.other.app.service.user.user;
|
|||||||
|
|
||||||
import com.red.circle.framework.core.asserts.ResponseAssert;
|
import com.red.circle.framework.core.asserts.ResponseAssert;
|
||||||
import com.red.circle.other.app.dto.h5.UserIdentityVO;
|
import com.red.circle.other.app.dto.h5.UserIdentityVO;
|
||||||
|
import com.red.circle.other.infra.database.rds.service.sys.AdministratorService;
|
||||||
import com.red.circle.other.inner.endpoint.team.bd.BdTeamInfoClient;
|
import com.red.circle.other.inner.endpoint.team.bd.BdTeamInfoClient;
|
||||||
import com.red.circle.other.inner.endpoint.team.target.TeamProfileClient;
|
import com.red.circle.other.inner.endpoint.team.target.TeamProfileClient;
|
||||||
import com.red.circle.other.inner.enums.team.TeamMemberRole;
|
import com.red.circle.other.inner.enums.team.TeamMemberRole;
|
||||||
@ -20,6 +21,7 @@ public class UserIdentityServiceImpl implements UserIdentityService {
|
|||||||
private final TeamProfileClient teamProfileClient;
|
private final TeamProfileClient teamProfileClient;
|
||||||
private final FreightGoldClient freightGoldClient;
|
private final FreightGoldClient freightGoldClient;
|
||||||
private final BdTeamInfoClient bdTeamInfoClient;
|
private final BdTeamInfoClient bdTeamInfoClient;
|
||||||
|
private final AdministratorService administratorService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public UserIdentityVO getUserIdentity(Long userId) {
|
public UserIdentityVO getUserIdentity(Long userId) {
|
||||||
@ -29,8 +31,8 @@ public class UserIdentityServiceImpl implements UserIdentityService {
|
|||||||
.setAgent(Objects.nonNull(teamMember) && TeamMemberRole.OWN.eq(teamMember.getRole()))
|
.setAgent(Objects.nonNull(teamMember) && TeamMemberRole.OWN.eq(teamMember.getRole()))
|
||||||
.setAnchor(Objects.nonNull(teamMember))
|
.setAnchor(Objects.nonNull(teamMember))
|
||||||
.setBd(ResponseAssert.requiredSuccess(bdTeamInfoClient.check(userId)))
|
.setBd(ResponseAssert.requiredSuccess(bdTeamInfoClient.check(userId)))
|
||||||
.setFreightAgent(
|
.setFreightAgent(ResponseAssert.requiredSuccess(freightGoldClient.checkFreightAgent(userId)))
|
||||||
ResponseAssert.requiredSuccess(freightGoldClient.checkFreightAgent(userId)));
|
.setAdmin(administratorService.existsAdmin(userId));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -39,6 +39,11 @@ public class UserIdentityVO implements Serializable {
|
|||||||
*/
|
*/
|
||||||
private Boolean freightAgent;
|
private Boolean freightAgent;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否管理员
|
||||||
|
*/
|
||||||
|
private Boolean admin;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 历史身份.
|
* 历史身份.
|
||||||
*/
|
*/
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user