|
@@ -14,6 +14,7 @@ import cn.rankin.data.api.product.entity.Package;
|
|
|
import cn.rankin.productservice.code.ProductServiceAPICode;
|
|
|
import cn.rankin.productservice.repository.MerchantProductRepository;
|
|
|
import cn.rankin.productservice.repository.ProductRepository;
|
|
|
+import cn.rankin.productservice.utils.DTOConverter;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
@@ -73,7 +74,9 @@ public class ProductService {
|
|
|
}else if (ProductTypeEnum.PACKAGE.equals(type)) {
|
|
|
return packageService.getPackage(productId);
|
|
|
}else if (ProductTypeEnum.TRAINING.equals(type)) {
|
|
|
- return trainingService.get(productId);
|
|
|
+ Training entity = trainingService.get(productId);
|
|
|
+ Product productEntity = DTOConverter.convert(entity);
|
|
|
+ APIResult.ok(productEntity);
|
|
|
}
|
|
|
|
|
|
|