|
@@ -3,15 +3,11 @@ package cn.com.ty.lift.enterprise.custom.controller;
|
|
|
import cn.com.ty.lift.enterprise.custom.dao.entity.PropertyCompany;
|
|
|
import cn.com.ty.lift.enterprise.custom.service.impl.PropertyCompanyServiceImpl;
|
|
|
import cn.com.xwy.boot.web.dto.RestResponse;
|
|
|
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
-import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
import lombok.AllArgsConstructor;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
import java.time.LocalDateTime;
|
|
|
import java.util.HashMap;
|
|
|
-import java.util.Map;
|
|
|
|
|
|
@RestController
|
|
|
@RequestMapping("/property-company")
|
|
@@ -25,17 +21,6 @@ import java.util.Map;
|
|
|
public class PropertyCompanyController {
|
|
|
private final PropertyCompanyServiceImpl propertyCompanyService;
|
|
|
|
|
|
- @GetMapping("/list")
|
|
|
- /**
|
|
|
- * @description id顺序+分页客户列表
|
|
|
- * @date 2019/11/27 11:33
|
|
|
- * @param [维保公司id, 页码, 页大小]
|
|
|
- * @return cn.com.xwy.boot.web.dto.RestResponse
|
|
|
- */
|
|
|
- public RestResponse propertyCompanies(@RequestParam Long mtCompanyId, @RequestParam Integer pageNum, @RequestParam Integer pageSize) {
|
|
|
- return RestResponse.ok(propertyCompanyService.propertyCompanies(mtCompanyId, pageNum, pageSize), "1", "查询成功");
|
|
|
- }
|
|
|
-
|
|
|
@GetMapping("/{id}")
|
|
|
/**
|
|
|
* @description 根据id获取客户详细信息
|
|
@@ -52,42 +37,14 @@ public class PropertyCompanyController {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- @GetMapping("/list/name")
|
|
|
- /**
|
|
|
- * @description 根据客户名称分页获取客户列表
|
|
|
- * @date 2019/11/27 11:37
|
|
|
- * @param [客户名称, 维保公司id, 页码, 页大小]
|
|
|
- * @return cn.com.xwy.boot.web.dto.RestResponse
|
|
|
- */
|
|
|
- public RestResponse propertyCompaniesFromName(@RequestParam String name, @RequestParam Long mtCompanyId, @RequestParam Integer pageNum, @RequestParam Integer pageSize) {
|
|
|
- return propertyCompanyService.propertyCompaniesFromRowName(mtCompanyId, pageNum, pageSize, "name", name);
|
|
|
- }
|
|
|
-
|
|
|
- @GetMapping("/list/address")
|
|
|
- /**
|
|
|
- * @description 根据客户地址分页获取客户列表
|
|
|
- * @date 2019/11/27 11:38
|
|
|
- * @param [客户地址, 维保公司id, 页码, 页大小]
|
|
|
- * @return cn.com.xwy.boot.web.dto.RestResponse
|
|
|
- */
|
|
|
- public RestResponse propertyCompaniesFromAddress(@RequestParam String address, @RequestParam Long mtCompanyId, @RequestParam Integer pageNum, @RequestParam Integer pageSize) {
|
|
|
- return propertyCompanyService.propertyCompaniesFromRowName(mtCompanyId, pageNum, pageSize, "address", address);
|
|
|
- }
|
|
|
-
|
|
|
- @GetMapping("/list/phone")
|
|
|
+ @PostMapping("/list/condition")
|
|
|
/**
|
|
|
- * @description 根据客户电话分页获取客户列表
|
|
|
- * @date 2019/11/27 11:39
|
|
|
- * @param [客户手机, 维保公司id, 页码, 页大小]
|
|
|
+ * @description 根据条件查询客户列表
|
|
|
+ * @date 2019/12/3 8:51
|
|
|
+ * @param [客户名称或客户地址或客户联系方式,页码,页大小,维保公司id]
|
|
|
* @return cn.com.xwy.boot.web.dto.RestResponse
|
|
|
*/
|
|
|
- public RestResponse propertyCompaniesFromPhone(@RequestParam String phone, @RequestParam Long mtCompanyId, @RequestParam Integer pageNum, @RequestParam Integer pageSize) {
|
|
|
- return propertyCompanyService.propertyCompaniesFromRowName(mtCompanyId, pageNum, pageSize, "telephone", phone);
|
|
|
- }
|
|
|
-
|
|
|
- @PostMapping("/list/condition")
|
|
|
public RestResponse propertyCompaniesForCondition(@RequestBody HashMap map) {
|
|
|
-// IPage<PropertyCompany> iPage = propertyCompanyService.page(page, new QueryWrapper<PropertyCompany>().eq("mt_company_id", mtCompanyId).allEq(conditions, false));
|
|
|
return propertyCompanyService.propertyCompaniesForCondition(map);
|
|
|
}
|
|
|
|