Class PartnerController
java.lang.Object
hu.rts.mike.example.dev.crm.rest.controller.PartnerController
@RestController
@RequestMapping("/api/partner")
@PreAuthorize("isAuthenticated()")
public class PartnerController
extends Object
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final org.modelmapper.ModelMapperprivate final PartnerService -
Constructor Summary
ConstructorsConstructorDescriptionPartnerController(PartnerService service, org.modelmapper.ModelMapper mapper) -
Method Summary
Modifier and TypeMethodDescriptioncreate(PartnerDto dto) voiddeleteById(IdListDto<Integer> dto) org.springframework.data.domain.Page<PartnerDto>update(PartnerDto dto)
-
Field Details
-
service
-
mapper
private final org.modelmapper.ModelMapper mapper
-
-
Constructor Details
-
PartnerController
-
-
Method Details
-
table
@GetMapping @PreAuthorize("hasAuthority(\'READ_PARTNER\')") public org.springframework.data.domain.Page<PartnerDto> table(@RequestParam(value="page",defaultValue="0") int page, @RequestParam(value="size",defaultValue="20") int size, @RequestParam(value="sort",required=false) List<String> sorts, @RequestParam(value="filter",required=false) List<String> filterString) -
getById
@GetMapping("{id}") @PreAuthorize("hasAuthority(\'READ_PARTNER\')") public PartnerDto getById(@PathVariable("id") Integer id) -
deleteById
-
create
@PostMapping @PreAuthorize("hasAuthority(\'CREATE_PARTNER\')") public PartnerDto create(@RequestBody PartnerDto dto) -
update
@PutMapping @PreAuthorize("hasAuthority(\'UPDATE_PARTNER\')") public PartnerDto update(@RequestBody PartnerDto dto)
-