|
@@ -35,13 +35,13 @@ public class EnterpriseTestController {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@GetMapping("/departments")
|
|
@GetMapping("/departments")
|
|
|
- public Result<EnterpriseWechatDepartmentListRsp> departments(@RequestParam(defaultValue = "0") Long id) {
|
|
|
|
|
|
|
+ public Result<EnterpriseWechatDepartmentListRsp> departments(@RequestParam(required = false) Long id) {
|
|
|
String accessToken = wechatMsgService.getCorpAccessToken();
|
|
String accessToken = wechatMsgService.getCorpAccessToken();
|
|
|
return Result.ok(enterpriseWechatApi.listDepartment(accessToken, id));
|
|
return Result.ok(enterpriseWechatApi.listDepartment(accessToken, id));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@GetMapping("/members")
|
|
@GetMapping("/members")
|
|
|
- public Result<EnterpriseWechatUserListRsp> members(@RequestParam(defaultValue = "1") Long departmentId) {
|
|
|
|
|
|
|
+ public Result<EnterpriseWechatUserListRsp> members(@RequestParam(required = false) Long departmentId) {
|
|
|
String accessToken = wechatMsgService.getCorpAccessToken();
|
|
String accessToken = wechatMsgService.getCorpAccessToken();
|
|
|
return Result.ok(enterpriseWechatApi.listDepartmentUsers(accessToken, departmentId));
|
|
return Result.ok(enterpriseWechatApi.listDepartmentUsers(accessToken, departmentId));
|
|
|
}
|
|
}
|