Package co.mastermindcms.modules.util
Class SellerSkuUtil
- java.lang.Object
-
- co.mastermindcms.modules.util.SellerSkuUtil
-
@Component public class SellerSkuUtil extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description private AttributeService
attributeService
private org.springframework.data.mongodb.core.MongoTemplate
mongoTemplate
private SequenceGeneratorService
sequenceGeneratorService
private SKUService
skuService
-
Constructor Summary
Constructors Constructor Description SellerSkuUtil()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addAttributeLogicalValue(java.lang.String logical, java.util.List<AttributeValue> attributeValues)
void
addAttributeValues(java.util.Map<java.lang.String,java.lang.String> attributes, java.util.List<AttributeValue> attributeValues)
void
addRandomAttributeListValue(java.lang.String list, java.lang.String listValue, java.util.List<AttributeValue> attributeValues)
void
addRandomAttributeLogicalValue(java.lang.String logical, java.util.List<AttributeValue> attributeValues)
void
addRandomRangeAttributeValues(java.lang.String range, java.lang.String value, java.util.List<AttributeValue> attributeValues)
void
addRandomValues(java.lang.String range, java.lang.String value, java.util.List<AttributeValue> attributeValues)
void
addRangeAttributeValues(java.util.Map<java.lang.String,java.lang.String> rangeAttributes, java.util.List<AttributeValue> attributeValues)
void
addRelationsToAttributeValues(java.util.List<AttributeValue> attributeValues, java.lang.String sellerSkuId, java.lang.String sellerSkuName)
static void
generateFilterIndex(SellerSKU sellerSKU)
java.lang.String
getRandomValue(java.lang.String value)
java.lang.String
getSellerSkuId(java.lang.String seqName)
void
removeAttributeValues(java.util.List<AttributeValue> attributeValues)
void
removeRelationsFromSKU(SellerSKU sellerSKU)
void
removeRemainedAttributeValues(java.util.List<AttributeValue> remainAttributeValues)
private void
saveAttributeValue(java.lang.String seqName, Attribute attribute, java.util.List<AttributeValue> attributeValues, java.lang.String value, double maxValue, double minValue)
private java.util.List<java.lang.String>
stringArrayToList(java.lang.String[] strings)
void
updateSellerSkusFromSeller(Seller seller)
void
updateSellerSkusFromSKU(SKU sku)
-
-
-
Field Detail
-
attributeService
@Autowired private AttributeService attributeService
-
skuService
@Autowired private SKUService skuService
-
sequenceGeneratorService
@Autowired private SequenceGeneratorService sequenceGeneratorService
-
mongoTemplate
@Autowired private org.springframework.data.mongodb.core.MongoTemplate mongoTemplate
-
-
Method Detail
-
getRandomValue
public java.lang.String getRandomValue(java.lang.String value)
-
addRandomValues
public void addRandomValues(java.lang.String range, java.lang.String value, java.util.List<AttributeValue> attributeValues)
-
addRandomRangeAttributeValues
public void addRandomRangeAttributeValues(java.lang.String range, java.lang.String value, java.util.List<AttributeValue> attributeValues)
-
addRandomAttributeListValue
public void addRandomAttributeListValue(java.lang.String list, java.lang.String listValue, java.util.List<AttributeValue> attributeValues)
-
addRandomAttributeLogicalValue
public void addRandomAttributeLogicalValue(java.lang.String logical, java.util.List<AttributeValue> attributeValues)
-
addRangeAttributeValues
public void addRangeAttributeValues(java.util.Map<java.lang.String,java.lang.String> rangeAttributes, java.util.List<AttributeValue> attributeValues)
-
addAttributeValues
public void addAttributeValues(java.util.Map<java.lang.String,java.lang.String> attributes, java.util.List<AttributeValue> attributeValues)
-
addAttributeLogicalValue
public void addAttributeLogicalValue(java.lang.String logical, java.util.List<AttributeValue> attributeValues)
-
getSellerSkuId
public java.lang.String getSellerSkuId(java.lang.String seqName)
-
addRelationsToAttributeValues
public void addRelationsToAttributeValues(java.util.List<AttributeValue> attributeValues, java.lang.String sellerSkuId, java.lang.String sellerSkuName)
-
removeRemainedAttributeValues
public void removeRemainedAttributeValues(java.util.List<AttributeValue> remainAttributeValues)
-
removeAttributeValues
public void removeAttributeValues(java.util.List<AttributeValue> attributeValues)
-
removeRelationsFromSKU
public void removeRelationsFromSKU(SellerSKU sellerSKU)
-
updateSellerSkusFromSKU
public void updateSellerSkusFromSKU(SKU sku)
-
updateSellerSkusFromSeller
public void updateSellerSkusFromSeller(Seller seller)
-
generateFilterIndex
public static void generateFilterIndex(SellerSKU sellerSKU)
-
saveAttributeValue
private void saveAttributeValue(java.lang.String seqName, Attribute attribute, java.util.List<AttributeValue> attributeValues, java.lang.String value, double maxValue, double minValue)
-
stringArrayToList
private java.util.List<java.lang.String> stringArrayToList(java.lang.String[] strings)
-
-