Search in sources :

Example 1 with SpuEntity

use of com.fp.mall.product.model.entity.SpuEntity in project FCLProject by FlowingCloudL.

the class SpuServiceImpl method convertToSpuEntity.

private SpuEntity convertToSpuEntity(SpuDTO spuDTO) {
    SpuEntity spuEntity = new SpuEntity();
    spuEntity.setSpuId(spuDTO.getSpuId());
    spuEntity.setSpuName(spuDTO.getSpuName());
    spuEntity.setSpuDesc(spuDTO.getSpuDesc());
    spuEntity.setDescImgUrl(spuDTO.getDescImgUrl());
    spuEntity.setBrandId(spuDTO.getBrandId());
    spuEntity.setCategoryId(spuDTO.getCategoryId());
    spuEntity.setStatus(spuDTO.getStatus());
    return spuEntity;
}
Also used : SpuEntity(com.fp.mall.product.model.entity.SpuEntity)

Example 2 with SpuEntity

use of com.fp.mall.product.model.entity.SpuEntity 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;
}
Also used : SpuEntity(com.fp.mall.product.model.entity.SpuEntity) OrderSkuBO(com.fp.api.mall.product.model.OrderSkuBO) SkuEntity(com.fp.mall.product.model.entity.SkuEntity) OrderSpuBO(com.fp.api.mall.product.model.OrderSpuBO) Transactional(org.springframework.transaction.annotation.Transactional)

Aggregations

SpuEntity (com.fp.mall.product.model.entity.SpuEntity)2 OrderSkuBO (com.fp.api.mall.product.model.OrderSkuBO)1 OrderSpuBO (com.fp.api.mall.product.model.OrderSpuBO)1 SkuEntity (com.fp.mall.product.model.entity.SkuEntity)1 Transactional (org.springframework.transaction.annotation.Transactional)1