|
@@ -10,10 +10,7 @@ import com.yonge.cooleshow.mbg.model.*;
|
|
|
import com.yonge.cooleshow.portal.dao.PortalProductDao;
|
|
|
import com.yonge.cooleshow.portal.domain.CartProduct;
|
|
|
import com.yonge.cooleshow.portal.domain.CartPromotionItem;
|
|
|
-import com.yonge.cooleshow.portal.service.OmsCartItemService;
|
|
|
-import com.yonge.cooleshow.portal.service.OmsPromotionService;
|
|
|
-import com.yonge.cooleshow.portal.service.PmsPortalProductService;
|
|
|
-import com.yonge.cooleshow.portal.service.UmsMemberService;
|
|
|
+import com.yonge.cooleshow.portal.service.*;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.util.CollectionUtils;
|
|
@@ -49,6 +46,9 @@ public class OmsCartItemServiceImpl implements OmsCartItemService {
|
|
|
@Autowired
|
|
|
private PmsPortalProductService portalProductService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private PortalBrandService portalBrandService;
|
|
|
+
|
|
|
@Override
|
|
|
public OmsCartItem add(OmsCartItem cartItem) {
|
|
|
UmsMember currentMember;
|
|
@@ -85,7 +85,12 @@ public class OmsCartItemServiceImpl implements OmsCartItemService {
|
|
|
cartItem.setProductName(pmsProduct.getName());
|
|
|
cartItem.setProductSubTitle(pmsProduct.getSubTitle());
|
|
|
cartItem.setProductCategoryId(pmsProduct.getProductCategoryId());
|
|
|
- cartItem.setProductBrand(pmsProduct.getName());
|
|
|
+ if (pmsProduct.getBrandId() != null) {
|
|
|
+ PmsBrand detail = portalBrandService.detail(pmsProduct.getBrandId());
|
|
|
+ if ( detail != null) {
|
|
|
+ cartItem.setProductBrand(detail.getName());
|
|
|
+ }
|
|
|
+ }
|
|
|
cartItem.setProductSn(pmsProduct.getProductSn());
|
|
|
if (cartItem.getProductSkuId() != null) {
|
|
|
cartItem.setProductSkuCode(pmsSkuStock.getSkuCode());
|