|
@@ -7,6 +7,7 @@ import com.ningdatech.pmapi.ding.task.EmployeeBatchGetTask; |
|
|
import com.ningdatech.pmapi.ding.task.GovBusinessStripsTask; |
|
|
import com.ningdatech.pmapi.ding.task.GovBusinessStripsTask; |
|
|
import com.ningdatech.pmapi.ding.task.OrganizationBatchGetTask; |
|
|
import com.ningdatech.pmapi.ding.task.OrganizationBatchGetTask; |
|
|
import lombok.RequiredArgsConstructor; |
|
|
import lombok.RequiredArgsConstructor; |
|
|
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
import org.springframework.http.ResponseEntity; |
|
|
import org.springframework.http.ResponseEntity; |
|
|
import org.springframework.web.bind.annotation.*; |
|
|
import org.springframework.web.bind.annotation.*; |
|
|
import org.springframework.web.client.RestTemplate; |
|
|
import org.springframework.web.client.RestTemplate; |
|
@@ -24,6 +25,7 @@ import java.security.NoSuchAlgorithmException; |
|
|
@RestController |
|
|
@RestController |
|
|
@RequestMapping("/api/v1/zwdd/pull") |
|
|
@RequestMapping("/api/v1/zwdd/pull") |
|
|
@RequiredArgsConstructor |
|
|
@RequiredArgsConstructor |
|
|
|
|
|
@Slf4j |
|
|
public class DingInfoPullController { |
|
|
public class DingInfoPullController { |
|
|
|
|
|
|
|
|
private final EmployeeBatchGetTask employeeBatchGetTask; |
|
|
private final EmployeeBatchGetTask employeeBatchGetTask; |
|
@@ -84,7 +86,7 @@ public class DingInfoPullController { |
|
|
RestTemplate restTemplate = new RestTemplate(); |
|
|
RestTemplate restTemplate = new RestTemplate(); |
|
|
ResponseEntity<String> forEntity = restTemplate.getForEntity(url, String.class); |
|
|
ResponseEntity<String> forEntity = restTemplate.getForEntity(url, String.class); |
|
|
|
|
|
|
|
|
System.out.println(JSON.toJSONString(forEntity)); |
|
|
|
|
|
|
|
|
log.info("forEntity : {}",JSON.toJSONString(forEntity)); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@GetMapping("/test-app2") |
|
|
@GetMapping("/test-app2") |
|
@@ -103,7 +105,7 @@ public class DingInfoPullController { |
|
|
RestTemplate restTemplate = new RestTemplate(); |
|
|
RestTemplate restTemplate = new RestTemplate(); |
|
|
ResponseEntity<String> forEntity = restTemplate.getForEntity(url, String.class); |
|
|
ResponseEntity<String> forEntity = restTemplate.getForEntity(url, String.class); |
|
|
|
|
|
|
|
|
System.out.println(JSON.toJSONString(forEntity)); |
|
|
|
|
|
|
|
|
log.info("forEntity : {}",JSON.toJSONString(forEntity)); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@GetMapping("/getToken") |
|
|
@GetMapping("/getToken") |
|
|