类 ProductAttrUtils

java.lang.Object
com.ishop.merchant.util.ProductAttrUtils

public class ProductAttrUtils extends Object
  • 字段详细资料

    • logger

      protected static final org.slf4j.Logger logger
  • 构造器详细资料

    • ProductAttrUtils

      public ProductAttrUtils()
  • 方法详细资料

    • acquirePriceAttrMoney

      public static final double acquirePriceAttrMoney(String[] priceAttr, String attrValueSku)
      根据价格规格,返回自定义属性中要存放的价格信息。
      
       
      参数:
      priceAttr - 几个规格定义,如:[100,200,300,500,其他金额]
      attrValueSku - 自定义属性值,如:98#,其他金额 或者 98#,500
      返回:
    • hasPriceAttr

      public static final String[] hasPriceAttr(List<EbProductAttr> attrList)
      返回价格规格,对应的价格数组,如果存在的话。
          格式如下:
          [100, 200, 其他金额(或自定义)]
       
      参数:
      attrList -
      返回:
    • combineProductAttrValue

      public static final void combineProductAttrValue(ProductAddVo request, EbProduct product)
      设置添加(或编辑)商品价格信息。
      参数:
      request -
      product -
    • getSku

      public static final String getSku(String attrValue)
      商品sku。

      返回数据格式,如:92汽油,95汽油,98汽油,规格值拼接了一下,要存储数据库

      参数:
      attrValue - json字符串,如:{"92号":"92号", "93号":"93号"}
      返回:
      sku
    • splitTypeAndProductId

      public static final String[] splitTypeAndProductId(String key)
      把给定的 Key,分隔为:type | productId
      参数:
      key -
      返回:
    • combineKey

      public static final String combineKey(int type, long productId)