|  | @@ -5,17 +5,12 @@ import com.fs.app.annotation.Login;
 | 
	
		
			
				|  |  |  import com.fs.app.controller.AppBaseController;
 | 
	
		
			
				|  |  |  import com.fs.common.core.domain.R;
 | 
	
		
			
				|  |  |  import com.fs.common.param.BaseQueryParam;
 | 
	
		
			
				|  |  | +import com.fs.common.utils.StringUtils;
 | 
	
		
			
				|  |  |  import com.fs.erp.service.IErpGoodsService;
 | 
	
		
			
				|  |  | -import com.fs.hisStore.domain.FsStoreProductAttrScrm;
 | 
	
		
			
				|  |  | -import com.fs.hisStore.domain.FsStoreProductAttrValueScrm;
 | 
	
		
			
				|  |  | -import com.fs.hisStore.domain.FsStoreProductCategoryScrm;
 | 
	
		
			
				|  |  | -import com.fs.hisStore.domain.FsStoreProductRelationScrm;
 | 
	
		
			
				|  |  | +import com.fs.hisStore.domain.*;
 | 
	
		
			
				|  |  |  import com.fs.hisStore.param.*;
 | 
	
		
			
				|  |  |  import com.fs.hisStore.service.*;
 | 
	
		
			
				|  |  | -import com.fs.hisStore.vo.FsStoreCartVO;
 | 
	
		
			
				|  |  | -import com.fs.hisStore.vo.FsStoreProductAttrValueQueryVO;
 | 
	
		
			
				|  |  | -import com.fs.hisStore.vo.FsStoreProductListQueryVO;
 | 
	
		
			
				|  |  | -import com.fs.hisStore.vo.FsStoreProductQueryVO;
 | 
	
		
			
				|  |  | +import com.fs.hisStore.vo.*;
 | 
	
		
			
				|  |  |  import com.github.pagehelper.PageHelper;
 | 
	
		
			
				|  |  |  import com.github.pagehelper.PageInfo;
 | 
	
		
			
				|  |  |  import io.swagger.annotations.Api;
 | 
	
	
		
			
				|  | @@ -25,6 +20,7 @@ import org.springframework.validation.annotation.Validated;
 | 
	
		
			
				|  |  |  import org.springframework.web.bind.annotation.*;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  import javax.servlet.http.HttpServletRequest;
 | 
	
		
			
				|  |  | +import java.util.ArrayList;
 | 
	
		
			
				|  |  |  import java.util.Date;
 | 
	
		
			
				|  |  |  import java.util.List;
 | 
	
		
			
				|  |  |  
 | 
	
	
		
			
				|  | @@ -53,6 +49,9 @@ public class ProductScrmController extends AppBaseController {
 | 
	
		
			
				|  |  |      private IFsStoreProductRelationScrmService productRelationService;
 | 
	
		
			
				|  |  |      @Autowired
 | 
	
		
			
				|  |  |      IErpGoodsService goodsService;
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +    @Autowired
 | 
	
		
			
				|  |  | +    private IFsStoreScrmService storeService;
 | 
	
		
			
				|  |  |      /**
 | 
	
		
			
				|  |  |       * 获取用户信息
 | 
	
		
			
				|  |  |       * @param request
 | 
	
	
		
			
				|  | @@ -96,13 +95,33 @@ public class ProductScrmController extends AppBaseController {
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |      @ApiOperation("获取商品详情")
 | 
	
		
			
				|  |  |      @GetMapping("/getProductDetails")
 | 
	
		
			
				|  |  | -    public R getProductDetails(@RequestParam(value="productId") Long productId){
 | 
	
		
			
				|  |  | +    public R getProductDetails(@RequestParam(value="productId") Long productId,@RequestParam(value="storeId",required = false) String storeId){
 | 
	
		
			
				|  |  |          FsStoreProductQueryVO product=productService.selectFsStoreProductByIdQuery(productId);
 | 
	
		
			
				|  |  |          if(product==null){
 | 
	
		
			
				|  |  |              return R.error("商品不存在或已下架");
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |          List<FsStoreProductAttrScrm> productAttr=attrService.selectFsStoreProductAttrByProductId(product.getProductId());
 | 
	
		
			
				|  |  | -        List<FsStoreProductAttrValueScrm> productValues=attrValueService.selectFsStoreProductAttrValueByProductId(product.getProductId());
 | 
	
		
			
				|  |  | +        List<FsStoreProductAttrValueScrm> productValues=attrValueService.selectFsStoreProductAttrValueByProductId(product.getProductId(),storeId);
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +        List<Integer> storeIds=new ArrayList<>();
 | 
	
		
			
				|  |  | +        String[] arrList={};
 | 
	
		
			
				|  |  | +        if(StringUtils.isNotEmpty(product.getStoreId())){
 | 
	
		
			
				|  |  | +            arrList=product.getStoreId().split(",");
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +        Integer tStoreId=0;
 | 
	
		
			
				|  |  | +        List<FsStoreScrmVO> storeList=new ArrayList<>();
 | 
	
		
			
				|  |  | +        ErpSkuVO skuMap=new ErpSkuVO();
 | 
	
		
			
				|  |  | +        skuMap.setPageNum(1);
 | 
	
		
			
				|  |  | +        skuMap.setPageSize(10);
 | 
	
		
			
				|  |  | +        if(arrList.length>0){
 | 
	
		
			
				|  |  | +            tStoreId=Integer.parseInt(arrList[0]);
 | 
	
		
			
				|  |  | +            FsStoreScrm store=storeService.selectFsStoreByStoreId(Long.valueOf(tStoreId));
 | 
	
		
			
				|  |  | +//            skuMap.setBusno(store.getBusNo()); //erp店铺编号
 | 
	
		
			
				|  |  | +            for (int i = 0; i <arrList.length ; i++) {
 | 
	
		
			
				|  |  | +                storeIds.add(Integer.parseInt(arrList[i]));
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +            storeList = storeService.selectFsStoreListByIds(storeIds);
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  //        for(FsStoreProductAttrValue value:productValues){
 | 
	
		
			
				|  |  |  //            if(StringUtils.isEmpty(value.getGroupBarCode())){
 | 
	
	
		
			
				|  | @@ -197,7 +216,7 @@ public class ProductScrmController extends AppBaseController {
 | 
	
		
			
				|  |  |                  productRelationService.insertFsStoreProductRelation(relation);
 | 
	
		
			
				|  |  |              }
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  | -        return R.ok().put("product",product).put("productAttr",productAttr).put("productValues",productValues);
 | 
	
		
			
				|  |  | +        return R.ok().put("product",product).put("productAttr",productAttr).put("productValues",productValues).put("stores",storeList);
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      @Login
 |