搜索用户兼容金币代理
This commit is contained in:
parent
5e8dc1126d
commit
05f2a9990e
@ -8,6 +8,8 @@ import com.red.circle.other.inner.model.dto.user.UserProfileDTO;
|
||||
import com.red.circle.other.inner.endpoint.user.user.UserProfileClient;
|
||||
import com.red.circle.wallet.app.dto.cmd.UserBankSearchUserProfileCmd;
|
||||
import java.util.Objects;
|
||||
|
||||
import com.red.circle.wallet.infra.database.rds.service.freight.FreightBalanceService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@ -24,6 +26,7 @@ public class UserBankSearchUserProfileQryExe {
|
||||
private final AgentTeamClient agentTeamClient;
|
||||
private final UserProfileClient userProfileClient;
|
||||
private final UserRegionClient userRegionClient;
|
||||
private final FreightBalanceService freightBalanceService;
|
||||
|
||||
public UserProfileDTO execute(UserBankSearchUserProfileCmd cmd) {
|
||||
|
||||
@ -57,6 +60,11 @@ public class UserBankSearchUserProfileQryExe {
|
||||
}
|
||||
|
||||
if (cmd.typeEqAgent()) {
|
||||
Boolean freightAgent = freightBalanceService.checkFreightAgent(userProfile.getId());
|
||||
if (freightAgent) {
|
||||
return userProfile;
|
||||
}
|
||||
|
||||
return Objects.equals(
|
||||
ResponseAssert.requiredSuccess(agentTeamClient.existsTeamOwn(userProfile.getId())),
|
||||
Boolean.TRUE)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user