use of com.fp.mall.product.model.entity.SkuEntity in project FCLProject by FlowingCloudL.
the class SkuServiceImpl method convertToSkuEntity.
private SkuEntity convertToSkuEntity(SkuDTO dto) {
SkuEntity entity = new SkuEntity();
entity.setSkuId(dto.getSkuId());
entity.setSpuId(dto.getSpuId());
entity.setSkuName(dto.getSkuName());
entity.setSkuDesc(dto.getSkuDesc());
entity.setPrice(dto.getPrice());
entity.setStock(dto.getStock());
entity.setSales(dto.getSales());
entity.setStatus(dto.getStatus());
return entity;
}
use of com.fp.mall.product.model.entity.SkuEntity in project FCLProject by FlowingCloudL.
the class RemoteSpuServiceImpl method getSpuBySkuId.
@Transactional
@Override
public OrderSpuBO getSpuBySkuId(Long skuId) {
// 获取SKU
SkuEntity skuEntity = skuMapper.getBySkuId(skuId);
OrderSkuBO orderSkuBO = new OrderSkuBO();
BeanUtils.copyProperties(skuEntity, orderSkuBO);
// 获取SPU
SpuEntity spuEntity = spuMapper.getBySpuId(skuEntity.getSpuId());
OrderSpuBO orderSpuBO = new OrderSpuBO();
BeanUtils.copyProperties(spuEntity, orderSpuBO);
// 设置SKU到SPU
orderSpuBO.setSkuBO(orderSkuBO);
return orderSpuBO;
}
Aggregations