|  | @@ -507,7 +507,7 @@ public class ApiGoodsController extends ApiBaseAction {
 | 
	
		
			
				|  |  |          params.put("store_id", store_id);
 | 
	
		
			
				|  |  |          if (!StringUtils.isNullOrEmpty(sort) && !StringUtils.isNullOrEmpty(order)) {
 | 
	
		
			
				|  |  |              if (sort.equals("price")) {
 | 
	
		
			
				|  |  | -                params.put("sidx", "a.retail_price");
 | 
	
		
			
				|  |  | +                params.put("sidx", "psr1.retail_price");
 | 
	
		
			
				|  |  |                  params.put("order", order);
 | 
	
		
			
				|  |  |              }
 | 
	
		
			
				|  |  |          }
 | 
	
	
		
			
				|  | @@ -663,20 +663,33 @@ public class ApiGoodsController extends ApiBaseAction {
 | 
	
		
			
				|  |  |                                @RequestParam(value = "page", defaultValue = "1") Integer
 | 
	
		
			
				|  |  |                                        page, @RequestParam(value = "size", defaultValue = "10") Integer size,
 | 
	
		
			
				|  |  |                                String sort, String order) {
 | 
	
		
			
				|  |  | +        Long storeId = getStoreId();
 | 
	
		
			
				|  |  |          Map params = Maps.newHashMap();
 | 
	
		
			
				|  |  |          params.put("is_new", isNew);
 | 
	
		
			
				|  |  |          params.put("page", page);
 | 
	
		
			
				|  |  |          params.put("limit", size);
 | 
	
		
			
				|  |  |          params.put("order", sort);
 | 
	
		
			
				|  |  |          params.put("sidx", order);
 | 
	
		
			
				|  |  | -        params.put("store_id", getStoreId());
 | 
	
		
			
				|  |  | +        params.put("store_id", storeId);
 | 
	
		
			
				|  |  | +        StoreVo storeVo = apiStoreService.queryObject(storeId);
 | 
	
		
			
				|  |  | +        String isStockShare = "";
 | 
	
		
			
				|  |  | +        if(storeVo != null) {
 | 
	
		
			
				|  |  | +            ThirdMerchantBizVo thirdMerchantBiz = apiThirdMerchantBizService.getThirdMerchangByCode(storeVo.getThirdPartyMerchCode());
 | 
	
		
			
				|  |  | +            if (null == thirdMerchantBiz) {
 | 
	
		
			
				|  |  | +                return toResponsFail("第三方商户为空");
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +            isStockShare = thirdMerchantBiz.getIsStockShare();
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  |          //
 | 
	
		
			
				|  |  |          if (null != sort && sort.equals("price")) {
 | 
	
		
			
				|  |  |              params.put("sidx", "psr1.retail_price");
 | 
	
		
			
				|  |  |              params.put("order", order);
 | 
	
		
			
				|  |  | -        } else if (null != sort && sort.equals("sell")) {
 | 
	
		
			
				|  |  | +        } else if (null != sort && sort.equals("sell") && Dict.isStockShare.item_0.getItem().equalsIgnoreCase(isStockShare)) {
 | 
	
		
			
				|  |  |              params.put("sidx", "psr1.sell_volume");
 | 
	
		
			
				|  |  |              params.put("order", order);
 | 
	
		
			
				|  |  | +        } else if (null != sort && sort.equals("sell") && Dict.isStockShare.item_1.getItem().equalsIgnoreCase(isStockShare)) {
 | 
	
		
			
				|  |  | +            params.put("sidx", "a.sell_volume");
 | 
	
		
			
				|  |  | +            params.put("order", order);
 | 
	
		
			
				|  |  |          } else {
 | 
	
		
			
				|  |  |              params.put("sidx", "id");
 | 
	
		
			
				|  |  |              params.put("order", "desc");
 | 
	
	
		
			
				|  | @@ -703,19 +716,12 @@ public class ApiGoodsController extends ApiBaseAction {
 | 
	
		
			
				|  |  |          // 当前购物车中
 | 
	
		
			
				|  |  |          List<CartVo> cartList = new ArrayList();
 | 
	
		
			
				|  |  |          if (null != getUserId()) {
 | 
	
		
			
				|  |  | -            Long storeId = getStoreId();
 | 
	
		
			
				|  |  |              //查询列表数据
 | 
	
		
			
				|  |  |              Map cartParam = Maps.newHashMap();
 | 
	
		
			
				|  |  |              cartParam.put("user_id", getUserId());
 | 
	
		
			
				|  |  |              cartParam.put("store_id", storeId);
 | 
	
		
			
				|  |  | -            StoreVo storeVo = apiStoreService.queryObject(storeId);
 | 
	
		
			
				|  |  | -            if(storeVo != null) {
 | 
	
		
			
				|  |  | -                ThirdMerchantBizVo thirdMerchantBiz = apiThirdMerchantBizService.getThirdMerchangByCode(storeVo.getThirdPartyMerchCode());
 | 
	
		
			
				|  |  | -                if (null == thirdMerchantBiz) {
 | 
	
		
			
				|  |  | -                    return toResponsFail("第三方商户为空");
 | 
	
		
			
				|  |  | -                }
 | 
	
		
			
				|  |  | -                cartParam.put("isStockShare", thirdMerchantBiz.getIsStockShare());
 | 
	
		
			
				|  |  | -            }
 | 
	
		
			
				|  |  | +            cartParam.put("isStockShare", isStockShare);
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |              cartList = cartService.queryList(cartParam);
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |          if (null != cartList && cartList.size() > 0 && null != goodsList && goodsList.size() > 0) {
 |