|
@@ -8,12 +8,10 @@ import cn.com.xwy.boot.web.dto.RestResponse;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
import lombok.AllArgsConstructor;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
-import org.springframework.web.client.RestTemplate;
|
|
|
|
|
|
import java.util.ArrayList;
|
|
|
import java.util.HashMap;
|
|
|
import java.util.List;
|
|
|
-import java.util.Map;
|
|
|
|
|
|
@RestController
|
|
|
@RequestMapping("/property-company")
|
|
@@ -26,8 +24,6 @@ import java.util.Map;
|
|
|
*/
|
|
|
public class PropertyCompanyController {
|
|
|
private final PropertyCompanyServiceImpl propertyCompanyService;
|
|
|
- private final PropertyContactServiceImpl propertyContactService;
|
|
|
- private final RestTemplate restTemplate;
|
|
|
|
|
|
@GetMapping("/{id}")
|
|
|
/**
|
|
@@ -64,7 +60,10 @@ public class PropertyCompanyController {
|
|
|
*/
|
|
|
public RestResponse add(@RequestBody PropertyCompany propertyCompany) {
|
|
|
//service层判断了是否有相同名称的name//如果数据库客户名不重复,就删除里面判断name是否重复的逻辑
|
|
|
- return propertyCompanyService.savePropertyCompany(propertyCompany);
|
|
|
+ if (propertyCompanyService.save(propertyCompany)) {
|
|
|
+ return RestResponse.ok(null,"1","新增成功");
|
|
|
+ }
|
|
|
+ return RestResponse.ok(null,"0","新增失败");
|
|
|
}
|
|
|
|
|
|
@PostMapping("/update")
|