open search接口新增 是否金币代理字段
This commit is contained in:
parent
9a9f5e73de
commit
b46b6cbb05
@ -174,6 +174,11 @@ public class UserProfileDTO implements Serializable {
|
||||
*/
|
||||
private Boolean sameRegion;
|
||||
|
||||
/**
|
||||
* 是否金币代理
|
||||
*/
|
||||
private Boolean isFreightAgent;
|
||||
|
||||
/**
|
||||
* 用户使用的徽章.
|
||||
*/
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user