|
|
@@ -2,6 +2,8 @@ package com.inspur.customer.web.controller.keyclaok;
|
|
|
|
|
|
import com.alibaba.cola.dto.Response;
|
|
|
import com.inspur.customer.client.keycloak.KeycloakService;
|
|
|
+import com.inspur.customer.client.org.SmsbMessageGroupService;
|
|
|
+import com.inspur.customer.object.keycloak.KeycloakUserCO;
|
|
|
import com.inspur.logging.annotation.SmsbMethodLog;
|
|
|
import com.inspur.logging.annotation.SmsbSysLog;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
@@ -11,6 +13,9 @@ import org.keycloak.representations.idm.GroupRepresentation;
|
|
|
import org.springframework.util.CollectionUtils;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
+import java.util.List;
|
|
|
+import java.util.Map;
|
|
|
+
|
|
|
/**
|
|
|
* 微信模块
|
|
|
* @author wangbo13
|
|
|
@@ -23,6 +28,9 @@ public class KeycloakController {
|
|
|
@DubboReference
|
|
|
private KeycloakService keycloakService;
|
|
|
|
|
|
+ @DubboReference
|
|
|
+ private SmsbMessageGroupService smsbMessageGroupService;
|
|
|
+
|
|
|
@SmsbMethodLog(description = "新增租户",business = "新增租户:${groupRepresentation.name}")
|
|
|
@PostMapping("/super/admin/tenant")
|
|
|
public Response addKeycloakTenant(@RequestBody GroupRepresentation groupRepresentation){
|
|
|
@@ -41,4 +49,14 @@ public class KeycloakController {
|
|
|
return keycloakService.removeGroup(id);
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+
|
|
|
+ @GetMapping("/group/member/warning")
|
|
|
+ public Response testMethod (@RequestParam(value = "errorId", required = false) int errorId ,
|
|
|
+ @RequestParam(value = "tenant") String tenant,
|
|
|
+ @RequestParam(value = "informLevel") int informLevel) {
|
|
|
+ Map<Long, List<KeycloakUserCO>> map = smsbMessageGroupService.listUserByInformLevel(tenant, informLevel, errorId);
|
|
|
+ log.info("map:{}",map);
|
|
|
+ return Response.buildSuccess();
|
|
|
+ }
|
|
|
}
|