|
@@ -12,7 +12,6 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
import lombok.AllArgsConstructor;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
-import org.springframework.web.bind.annotation.PathVariable;
|
|
|
import org.springframework.web.bind.annotation.RequestBody;
|
|
|
|
|
|
import java.util.List;
|
|
@@ -44,7 +43,7 @@ public class PropertyCompanyServiceImpl extends ServiceImpl<PropertyCompanyMappe
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- public String delete(@PathVariable int id) {
|
|
|
+ public String delete(Long id) {
|
|
|
//维保电梯大于0
|
|
|
if (this.getMaintenanceLiftNum() > 0) {
|
|
|
//就不删除
|
|
@@ -60,7 +59,7 @@ public class PropertyCompanyServiceImpl extends ServiceImpl<PropertyCompanyMappe
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- public int deleteForContact(int id) {
|
|
|
+ public int deleteForContact(Long id) {
|
|
|
return contactMapper.delete(new QueryWrapper<PropertyContact>().eq("pp_company_id", id));
|
|
|
}
|
|
|
|
|
@@ -81,7 +80,7 @@ public class PropertyCompanyServiceImpl extends ServiceImpl<PropertyCompanyMappe
|
|
|
return 888;
|
|
|
}
|
|
|
|
|
|
- public RestResponse propertyCompanyListResponse(Long mtCompanyId,Integer pageNum, Integer pageSize) {
|
|
|
+ public List<Map<String, Object>> propertyCompanyListResponse(Long mtCompanyId, Integer pageNum, Integer pageSize) {
|
|
|
Page<PropertyCompany> page = new Page<>(pageNum, pageSize);
|
|
|
List<Map<String, Object>> records = this.pageMaps(page, new QueryWrapper<PropertyCompany>()
|
|
|
.select("id", "code", "name", "address", "telephone")
|
|
@@ -89,7 +88,7 @@ public class PropertyCompanyServiceImpl extends ServiceImpl<PropertyCompanyMappe
|
|
|
records.forEach(record -> {
|
|
|
record.put("maintenanceLiftNum", this.getMaintenanceLiftNum());
|
|
|
});
|
|
|
- return RestResponse.ok(records, "查询成功");
|
|
|
+ return records;
|
|
|
}
|
|
|
|
|
|
|