|
@@ -1,27 +1,38 @@
|
|
|
package cn.com.ty.lift.business.maintenance.controller;
|
|
|
|
|
|
import cn.com.ty.lift.business.maintenance.dao.entity.model.request.PropertyMtRequest;
|
|
|
+import cn.com.ty.lift.business.maintenance.dao.entity.model.response.PropertyMtResponse;
|
|
|
import cn.com.ty.lift.business.maintenance.dao.mapper.MaintenancePlanMapper;
|
|
|
import cn.com.ty.lift.business.maintenance.dao.mapper.MaintenanceRecordMapper;
|
|
|
+import cn.com.ty.lift.business.maintenance.dao.mapper.PropertyMaintenanceMapper;
|
|
|
import cn.com.xwy.boot.web.dto.RestResponse;
|
|
|
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
import lombok.AllArgsConstructor;
|
|
|
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 java.util.List;
|
|
|
+
|
|
|
@RestController
|
|
|
@AllArgsConstructor
|
|
|
@RequestMapping("property")
|
|
|
public class PropertyMaintenanceController {
|
|
|
private final MaintenancePlanMapper maintenancePlanMapper;
|
|
|
private final MaintenanceRecordMapper maintenanceRecordMapper;
|
|
|
+ private final PropertyMaintenanceMapper propertyMaintenanceMapper;
|
|
|
|
|
|
@PostMapping("maintenance")
|
|
|
public RestResponse maintenance(@RequestBody PropertyMtRequest propertyMtRequest) {
|
|
|
+ Page<PropertyMtResponse> propertyMtResponsePage = new Page<>(propertyMtRequest.getPageNum(), propertyMtRequest.getPageSize());
|
|
|
//todo
|
|
|
return RestResponse.success("待实现");
|
|
|
}
|
|
|
|
|
|
-
|
|
|
+ public Page<PropertyMtResponse> propertyMtResponsePage(Page<PropertyMtResponse> propertyMtResponsePage, PropertyMtRequest propertyMtRequest) {
|
|
|
+ Page<PropertyMtResponse> propertyMtResponses =
|
|
|
+ propertyMaintenanceMapper.queryMaintenance(propertyMtResponsePage, propertyMtRequest.getUserId());
|
|
|
+ return propertyMtResponses;
|
|
|
+ }
|
|
|
}
|