diff --git a/rc-service/rc-inner-api/other-inner/other-inner-model/src/main/java/com/red/circle/other/inner/model/dto/user/UserProfileDTO.java b/rc-service/rc-inner-api/other-inner/other-inner-model/src/main/java/com/red/circle/other/inner/model/dto/user/UserProfileDTO.java index d6e0cd29..ed710adc 100644 --- a/rc-service/rc-inner-api/other-inner/other-inner-model/src/main/java/com/red/circle/other/inner/model/dto/user/UserProfileDTO.java +++ b/rc-service/rc-inner-api/other-inner/other-inner-model/src/main/java/com/red/circle/other/inner/model/dto/user/UserProfileDTO.java @@ -174,6 +174,11 @@ public class UserProfileDTO implements Serializable { */ private Boolean sameRegion; + /** + * 是否金币代理 + */ + private Boolean isFreightAgent; + /** * 用户使用的徽章. */ diff --git a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/user/query/UserProfileUseSearchQryExe.java b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/user/query/UserProfileUseSearchQryExe.java index 031ef903..9b469a19 100644 --- a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/user/query/UserProfileUseSearchQryExe.java +++ b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/user/query/UserProfileUseSearchQryExe.java @@ -9,6 +9,8 @@ import com.red.circle.other.domain.gateway.user.UserProfileGateway; import com.red.circle.other.inner.asserts.user.UserErrorCode; import com.red.circle.other.inner.model.dto.user.UserProfileDTO; import java.util.Objects; + +import com.red.circle.wallet.inner.endpoint.freight.FreightGoldClient; import lombok.RequiredArgsConstructor; import org.springframework.stereotype.Component; @@ -23,6 +25,7 @@ public class UserProfileUseSearchQryExe { private final UserProfileGateway userProfileGateway; private final UserProfileAppConvertor userProfileAppConvertor; + private final FreightGoldClient freightGoldClient; public UserProfileDTO execute(AccountQryCmd cmd) { UserProfile userProfile = userProfileGateway.getByAccount(cmd.requireReqSysOrigin(), @@ -33,7 +36,10 @@ public class UserProfileUseSearchQryExe { || Objects.equals(userProfile.getDel(), Boolean.TRUE)) { return null; } - return userProfileAppConvertor.toUserProfileDTO(userProfile); + + UserProfileDTO userProfileDTO = userProfileAppConvertor.toUserProfileDTO(userProfile); + userProfileDTO.setIsFreightAgent(ResponseAssert.requiredSuccess(freightGoldClient.checkFreightAgent(userProfile.getId()))); + return userProfileDTO; } }