|
|
@ -45,24 +45,24 @@ import java.util.Map; |
|
|
|
@RestController |
|
|
|
@RequestMapping("propertyprojectscore") |
|
|
|
public class PropertyProjectScoreController { |
|
|
|
|
|
|
|
|
|
|
|
@Autowired |
|
|
|
private PropertyProjectScoreService propertyProjectScoreService; |
|
|
|
|
|
|
|
@GetMapping("page") |
|
|
|
public Result<PageData<PropertyProjectScoreDTO>> page(@RequestParam Map<String, Object> params){ |
|
|
|
public Result<PageData<PropertyProjectScoreDTO>> page(@RequestParam Map<String, Object> params) { |
|
|
|
PageData<PropertyProjectScoreDTO> page = propertyProjectScoreService.page(params); |
|
|
|
return new Result<PageData<PropertyProjectScoreDTO>>().ok(page); |
|
|
|
} |
|
|
|
|
|
|
|
@GetMapping("{id}") |
|
|
|
public Result<PropertyProjectScoreDTO> get(@PathVariable("id") String id){ |
|
|
|
public Result<PropertyProjectScoreDTO> get(@PathVariable("id") String id) { |
|
|
|
PropertyProjectScoreDTO data = propertyProjectScoreService.get(id); |
|
|
|
return new Result<PropertyProjectScoreDTO>().ok(data); |
|
|
|
} |
|
|
|
|
|
|
|
@PostMapping |
|
|
|
public Result save(@RequestBody PropertyProjectScoreDTO dto){ |
|
|
|
public Result save(@RequestBody PropertyProjectScoreDTO dto) { |
|
|
|
//效验数据
|
|
|
|
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); |
|
|
|
propertyProjectScoreService.save(dto); |
|
|
@ -70,7 +70,7 @@ public class PropertyProjectScoreController { |
|
|
|
} |
|
|
|
|
|
|
|
@PutMapping |
|
|
|
public Result update(@RequestBody PropertyProjectScoreDTO dto){ |
|
|
|
public Result update(@RequestBody PropertyProjectScoreDTO dto) { |
|
|
|
//效验数据
|
|
|
|
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); |
|
|
|
propertyProjectScoreService.update(dto); |
|
|
@ -78,7 +78,7 @@ public class PropertyProjectScoreController { |
|
|
|
} |
|
|
|
|
|
|
|
@DeleteMapping |
|
|
|
public Result delete(@RequestBody String[] ids){ |
|
|
|
public Result delete(@RequestBody String[] ids) { |
|
|
|
//效验数据
|
|
|
|
AssertUtils.isArrayEmpty(ids, "id"); |
|
|
|
propertyProjectScoreService.delete(ids); |
|
|
@ -90,5 +90,4 @@ public class PropertyProjectScoreController { |
|
|
|
List<PropertyProjectScoreDTO> list = propertyProjectScoreService.list(params); |
|
|
|
ExcelUtils.exportExcelToTarget(response, null, list, PropertyProjectScoreExcel.class); |
|
|
|
} |
|
|
|
|
|
|
|
} |