Skip to content

Commit

Permalink
add detail
Browse files Browse the repository at this point in the history
  • Loading branch information
lhpqaq committed Nov 14, 2024
1 parent 4ec8e15 commit f8ce15e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ public interface AuthPlatformConverter {
AuthPlatformConverter INSTANCE = Mappers.getMapper(AuthPlatformConverter.class);

@Mapping(target = "platformName", expression = "java(platformPO.getName())")
@Mapping(source = "credentials", target = "authCredentials", qualifiedByName = "jsonString2Map")
AuthPlatformVO fromPO2VO(AuthPlatformPO authPlatformPO, @Context PlatformPO platformPO);

AuthPlatformDTO fromReq2DTO(AuthPlatformReq authPlatformReq);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@

import lombok.Data;

import java.util.Map;

@Data
public class AuthPlatformVO {
private Long id;
Expand All @@ -36,5 +38,7 @@ public class AuthPlatformVO {

private Integer status;

private Map<String, String> authCredentials;

public AuthPlatformVO() {}
}
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,7 @@ public AuthPlatformVO getAuthorizedPlatform(Long authId) {
if (authPlatformPO == null || authPlatformPO.getIsDeleted()) {
throw new ApiException(ApiExceptionEnum.PLATFORM_NOT_FOUND);
}

return AuthPlatformConverter.INSTANCE.fromPO2VO(
authPlatformPO, platformDao.findById(authPlatformPO.getPlatformId()));
}
Expand Down

0 comments on commit f8ce15e

Please sign in to comment.