|
|
@@ -8,6 +8,8 @@ import lombok.SneakyThrows;
|
|
|
import org.springblade.common.constant.OperationConstant;
|
|
|
import org.springblade.community.entity.Residential;
|
|
|
import org.springblade.community.feign.IResidentialClient;
|
|
|
+import org.springblade.core.mp.support.BladePage;
|
|
|
+import org.springblade.core.mp.support.Query;
|
|
|
import org.springblade.core.tool.api.R;
|
|
|
import org.springblade.core.tool.utils.StringUtil;
|
|
|
import org.springblade.enterprise.entity.Staff;
|
|
|
@@ -19,14 +21,12 @@ import org.springblade.estate.entity.Car;
|
|
|
import org.springblade.estate.feign.IApplyUserClient;
|
|
|
import org.springblade.estate.feign.ICarClient;
|
|
|
import org.springblade.estate.vo.ApplyUserVO;
|
|
|
+import org.springblade.estate.vo.CarVO;
|
|
|
import org.springblade.person.entity.HouseUser;
|
|
|
import org.springblade.person.feign.IHouseUserClient;
|
|
|
import org.springblade.person.feign.IMemberClient;
|
|
|
import org.springblade.person.vo.HouseUserVO;
|
|
|
-import org.springframework.web.bind.annotation.PostMapping;
|
|
|
-import org.springframework.web.bind.annotation.RequestBody;
|
|
|
-import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
-import org.springframework.web.bind.annotation.RestController;
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
import java.util.HashMap;
|
|
|
import java.util.Map;
|
|
|
@@ -81,14 +81,22 @@ public class CarController {
|
|
|
}
|
|
|
|
|
|
|
|
|
- @PostMapping(value = "/page")
|
|
|
+ @GetMapping(value = "/page/member")
|
|
|
@SneakyThrows
|
|
|
- public Map<String,Object> getPage(@RequestBody CarDTO carDto){
|
|
|
- Map<String,Object> map = new HashMap<>();
|
|
|
- R<Page<Car>> page = this.carClient.page(carDto);
|
|
|
- if(page != null){
|
|
|
- map.put("carPage",page.getData());
|
|
|
- }
|
|
|
- return map;
|
|
|
+ public R<BladePage<CarVO>> getMemberCarPage(@RequestParam(value = "residentialId") Long residentialId, @RequestParam(value = "memberId") Long memberId, Query query){
|
|
|
+ CarDTO carDTO = new CarDTO();
|
|
|
+ carDTO.setQuery(query);
|
|
|
+ carDTO.setMemberId(memberId);
|
|
|
+ carDTO.setResidentialId(residentialId);
|
|
|
+ return carClient.page(carDTO);
|
|
|
+ }
|
|
|
+
|
|
|
+ @PostMapping(value = "/page/admin")
|
|
|
+ @SneakyThrows
|
|
|
+ public R<BladePage<CarVO>> getAdminCarPage(@RequestParam(value = "residentialId") Long residentialId, Query query){
|
|
|
+ CarDTO carDTO = new CarDTO();
|
|
|
+ carDTO.setQuery(query);
|
|
|
+ carDTO.setResidentialId(residentialId);
|
|
|
+ return carClient.page(carDTO);
|
|
|
}
|
|
|
}
|