Commit 99fba793 by zhangxingmin

根据条件查询客户端用户业务ID列表

parent 0ffe9b67
...@@ -13,6 +13,7 @@ import org.springframework.web.bind.annotation.RequestMapping; ...@@ -13,6 +13,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import javax.validation.constraints.NotBlank; import javax.validation.constraints.NotBlank;
import java.util.List;
/** /**
* 客户端用户信息 * 客户端用户信息
...@@ -48,4 +49,15 @@ public class ApiClientUserController implements ApiClientUserFeignClient { ...@@ -48,4 +49,15 @@ public class ApiClientUserController implements ApiClientUserFeignClient {
return apiClientUserService.detail(clientUserBizId); return apiClientUserService.detail(clientUserBizId);
} }
/**
* 根据条件查询客户端用户业务ID列表
* @param tenantBizId
* @param tenantBizId
* @return
*/
@Override
public Result<List<String>> clientUserBizIdList(String tenantBizId, String projectBizId) {
return apiClientUserService.clientUserBizIdList(tenantBizId,projectBizId);
}
} }
...@@ -17,4 +17,6 @@ public interface ApiClientUserService { ...@@ -17,4 +17,6 @@ public interface ApiClientUserService {
Result saveClientUserList(List<String> userBizIdList, Result saveClientUserList(List<String> userBizIdList,
String tenantBizId, String tenantBizId,
String projectBizId); String projectBizId);
Result<List<String>> clientUserBizIdList(String tenantBizId, String projectBizId);
} }
...@@ -179,6 +179,25 @@ public class ApiClientUserServiceImpl implements ApiClientUserService { ...@@ -179,6 +179,25 @@ public class ApiClientUserServiceImpl implements ApiClientUserService {
} }
/** /**
* 根据条件查询客户端用户业务ID列表
* @param tenantBizId
* @param tenantBizId
* @return
*/
@Override
public Result<List<String>> clientUserBizIdList(String tenantBizId, String projectBizId) {
List<String> clientUserBizIdList = new ArrayList<>();
List<ClientUser> clientUserList = iClientUserService.queryList(ClientUserDto.builder()
.tenantBizId(tenantBizId)
.projectBizId(projectBizId)
.build());
if (!CollectionUtils.isEmpty(clientUserList)) {
clientUserBizIdList = clientUserList.stream().map(ClientUser::getClientUserBizId).collect(Collectors.toList());
}
return Result.success(clientUserBizIdList);
}
/**
* 校验客户端用户是否存在 * 校验客户端用户是否存在
* @param clientUserBizId * @param clientUserBizId
* @return * @return
......
...@@ -12,6 +12,7 @@ import org.springframework.web.bind.annotation.PostMapping; ...@@ -12,6 +12,7 @@ import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RequestParam;
import javax.validation.constraints.NotBlank; import javax.validation.constraints.NotBlank;
import java.util.List;
/** /**
* 客户端用户信息Feign客户端 * 客户端用户信息Feign客户端
...@@ -36,4 +37,15 @@ public interface ApiClientUserFeignClient { ...@@ -36,4 +37,15 @@ public interface ApiClientUserFeignClient {
@GetMapping("/detail") @GetMapping("/detail")
@Operation(summary = "详情-客户端用户信息") @Operation(summary = "详情-客户端用户信息")
Result<ApiClientUserDetailResponse> detail(@NotBlank(message = "客户端用户表唯一业务ID不能为空") @RequestParam(value = "clientUserBizId") String clientUserBizId); Result<ApiClientUserDetailResponse> detail(@NotBlank(message = "客户端用户表唯一业务ID不能为空") @RequestParam(value = "clientUserBizId") String clientUserBizId);
/**
* 根据条件查询客户端用户业务ID列表
* @param tenantBizId
* @param tenantBizId
* @return
*/
@GetMapping("/clientUserBizIdList")
Result<List<String>> clientUserBizIdList(@RequestParam(value = "tenantBizId") String tenantBizId,
@RequestParam(value = "projectBizId") String projectBizId);
} }
...@@ -7,8 +7,7 @@ import com.yd.user.feign.response.clientuser.ApiClientUserDetailResponse; ...@@ -7,8 +7,7 @@ import com.yd.user.feign.response.clientuser.ApiClientUserDetailResponse;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.cloud.openfeign.FallbackFactory; import org.springframework.cloud.openfeign.FallbackFactory;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import java.util.List;
import javax.validation.constraints.NotBlank;
/** /**
* 客户端用户信息Feign降级处理 * 客户端用户信息Feign降级处理
...@@ -28,6 +27,11 @@ public class ApiClientUserFeignFallbackFactory implements FallbackFactory<ApiCli ...@@ -28,6 +27,11 @@ public class ApiClientUserFeignFallbackFactory implements FallbackFactory<ApiCli
public Result<ApiClientUserDetailResponse> detail(String clientUserBizId) { public Result<ApiClientUserDetailResponse> detail(String clientUserBizId) {
return null; return null;
} }
@Override
public Result<List<String>> clientUserBizIdList(String tenantBizId, String projectBizId) {
return null;
}
}; };
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment