use of com.actionworks.flashsale.app.model.dto.FlashItemDTO in project flash-sale by ThoughtsBeta.
the class FlashItemAppBuilder method toFlashItemDTO.
public static FlashItemDTO toFlashItemDTO(FlashItem flashItem) {
FlashItemDTO flashItemDto = new FlashItemDTO();
BeanUtils.copyProperties(flashItem, flashItemDto);
return flashItemDto;
}
use of com.actionworks.flashsale.app.model.dto.FlashItemDTO in project flash-sale by ThoughtsBeta.
the class FlashItemController method getFlashItems.
@GetMapping(value = "/activities/{activityId}/flash-items")
@SentinelResource("GetFlashItems")
public MultiResponse<FlashItemDTO> getFlashItems(@RequestAttribute Long userId, @PathVariable Long activityId, @RequestParam Integer pageSize, @RequestParam Integer pageNumber, @RequestParam(required = false) String keyword) {
FlashItemsQuery flashItemsQuery = new FlashItemsQuery().setKeyword(keyword).setPageSize(pageSize).setPageNumber(pageNumber);
AppMultiResult<FlashItemDTO> flashItemsResult = flashItemAppService.getFlashItems(userId, activityId, flashItemsQuery);
return ResponseBuilder.withMulti(flashItemsResult);
}
Aggregations