|
@@ -1,9 +1,9 @@
|
|
|
package edu.travel.tenant.web;
|
|
|
|
|
|
-import edu.travel.tenant.entity.EduTenant;
|
|
|
-//import edu.travel.remote.feign.TenantFeign;
|
|
|
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
import edu.travel.resp.BaseResponse;
|
|
|
import edu.travel.resp.PageResponse;
|
|
|
+import edu.travel.tenant.entity.EduTenant;
|
|
|
import edu.travel.tenant.service.ITenantService;
|
|
|
import edu.travel.web.BaseController;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
@@ -12,6 +12,8 @@ import org.springframework.web.bind.annotation.GetMapping;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
+import java.util.List;
|
|
|
+
|
|
|
@RestController
|
|
|
@RequestMapping("/tenant")
|
|
|
public class TenantController extends BaseController {
|
|
@@ -20,8 +22,9 @@ public class TenantController extends BaseController {
|
|
|
|
|
|
@GetMapping("/getTenant")
|
|
|
public BaseResponse getTenant() {
|
|
|
- Object principal = SecurityContextHolder.getContext().getAuthentication().getPrincipal();
|
|
|
- EduTenant tenantByID = tenantService.getTenantByID(principal.toString());
|
|
|
- return PageResponse.out(200,"success",tenantByID);
|
|
|
+ EduTenant principal = (EduTenant)SecurityContextHolder.getContext().getAuthentication().getPrincipal();
|
|
|
+
|
|
|
+ EduTenant list = tenantService.getTenantByID(principal.getTenantPhone());
|
|
|
+ return PageResponse.out(200,"success",list);
|
|
|
}
|
|
|
}
|