remove id men
This commit is contained in:
@@ -3,14 +3,8 @@ package com.iconplus.smartproc.controller;
|
||||
import com.iconplus.smartproc.model.request.RksDaftarIsiRequest;
|
||||
import com.iconplus.smartproc.model.request.RksIsiRequest;
|
||||
import com.iconplus.smartproc.model.request.RksTemplateRequest;
|
||||
import com.iconplus.smartproc.model.response.ListRksDaftarIsiResponse;
|
||||
import com.iconplus.smartproc.model.response.ListRksIsiResponse;
|
||||
import com.iconplus.smartproc.model.response.RksDaftarIsiResponse;
|
||||
import com.iconplus.smartproc.model.response.RksTemplateResponse;
|
||||
import com.iconplus.smartproc.service.rks.GetListRksDaftarIsiService;
|
||||
import com.iconplus.smartproc.service.rks.GetListRksIsiService;
|
||||
import com.iconplus.smartproc.service.rks.PostCreateRksDaftarIsiService;
|
||||
import com.iconplus.smartproc.service.rks.PostCreateRksTemplateService;
|
||||
import com.iconplus.smartproc.model.response.*;
|
||||
import com.iconplus.smartproc.service.rks.*;
|
||||
import org.springframework.data.domain.PageRequest;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
@@ -24,14 +18,17 @@ public class RksController {
|
||||
private final PostCreateRksDaftarIsiService postCreateRksDaftarIsiService;
|
||||
private final GetListRksIsiService getListRksIsiService;
|
||||
private final PostCreateRksTemplateService postCreateRksTemplateService;
|
||||
private final GetListRksTemplateService getListRksTemplateService;
|
||||
public RksController(GetListRksDaftarIsiService getListRksDaftarIsiService,
|
||||
PostCreateRksDaftarIsiService postCreateRksDaftarIsiService,
|
||||
GetListRksIsiService getListRksIsiService,
|
||||
PostCreateRksTemplateService postCreateRksTemplateService) {
|
||||
PostCreateRksTemplateService postCreateRksTemplateService,
|
||||
GetListRksTemplateService getListRksTemplateService) {
|
||||
this.getListRksDaftarIsiService = getListRksDaftarIsiService;
|
||||
this.postCreateRksDaftarIsiService = postCreateRksDaftarIsiService;
|
||||
this.getListRksIsiService = getListRksIsiService;
|
||||
this.postCreateRksTemplateService = postCreateRksTemplateService;
|
||||
this.getListRksTemplateService = getListRksTemplateService;
|
||||
}
|
||||
|
||||
|
||||
@@ -71,4 +68,17 @@ public class RksController {
|
||||
return postCreateRksTemplateService.execute(rksTemplateRequest);
|
||||
}
|
||||
|
||||
@GetMapping("/template")
|
||||
public ListRksTemplateResponse getListRksTemplate(@RequestParam(name = "page", defaultValue = "1") Integer page,
|
||||
@RequestParam(name = "size", defaultValue = "5") Integer size) {
|
||||
|
||||
Pageable pageable = PageRequest.of((page - 1), size);
|
||||
RksTemplateRequest rksTemplateRequest = RksTemplateRequest.builder()
|
||||
.pageable(pageable)
|
||||
.build();
|
||||
|
||||
return getListRksTemplateService.execute(rksTemplateRequest);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user