use of com.actionworks.flashsale.persistence.model.FlashItemDO in project flash-sale by ThoughtsBeta.
the class FlashItemRepositoryImpl method findById.
@Override
public Optional<FlashItem> findById(Long itemId) {
FlashItemDO flashItemDO = flashItemMapper.getById(itemId);
if (flashItemDO == null) {
return Optional.empty();
}
FlashItem flashItem = FlashItemBuilder.toDomainObject(flashItemDO);
return Optional.of(flashItem);
}
use of com.actionworks.flashsale.persistence.model.FlashItemDO in project flash-sale by ThoughtsBeta.
the class FlashItemBuilder method toDataObjectForCreate.
public static FlashItemDO toDataObjectForCreate(FlashItem flashItem) {
FlashItemDO flashItemDO = new FlashItemDO();
BeanUtils.copyProperties(flashItem, flashItemDO);
return flashItemDO;
}
Aggregations