use of com.actionworks.flashsale.persistence.model.FlashOrderDO in project flash-sale by ThoughtsBeta.
the class FlashOrderBuilder method toDataObjectForCreate.
public static FlashOrderDO toDataObjectForCreate(FlashOrder flashOrder) {
FlashOrderDO flashOrderDO = new FlashOrderDO();
BeanUtils.copyProperties(flashOrder, flashOrderDO);
return flashOrderDO;
}
use of com.actionworks.flashsale.persistence.model.FlashOrderDO in project flash-sale by ThoughtsBeta.
the class FlashOrderRepositoryImpl method save.
@Override
public boolean save(FlashOrder flashOrder) {
FlashOrderDO flashOrderDO = FlashOrderBuilder.toDataObjectForCreate(flashOrder);
int effectedRows = flashOrderMapper.insert(flashOrderDO);
return effectedRows == 1;
}
use of com.actionworks.flashsale.persistence.model.FlashOrderDO in project flash-sale by ThoughtsBeta.
the class FlashOrderRepositoryImpl method findById.
@Override
public Optional<FlashOrder> findById(Long orderId) {
FlashOrderDO flashOrderDO = flashOrderMapper.getById(orderId);
if (flashOrderDO == null) {
return Optional.empty();
}
FlashOrder flashOrder = FlashOrderBuilder.toDomainObject(flashOrderDO);
return Optional.of(flashOrder);
}
use of com.actionworks.flashsale.persistence.model.FlashOrderDO in project flash-sale by ThoughtsBeta.
the class FlashOrderRepositoryImpl method updateStatus.
@Override
public boolean updateStatus(FlashOrder flashOrder) {
FlashOrderDO flashOrderDO = FlashOrderBuilder.toDataObjectForCreate(flashOrder);
int effectedRows = flashOrderMapper.updateStatus(flashOrderDO);
return effectedRows == 1;
}
Aggregations