mirror of
				https://github.com/ciphervance/supercell-wx.git
				synced 2025-10-31 01:10:04 +00:00 
			
		
		
		
	Update L3 product category selection to work better for tdwr
This commit is contained in:
		
							parent
							
								
									504cde0e8b
								
							
						
					
					
						commit
						6509fc7043
					
				
					 3 changed files with 38 additions and 6 deletions
				
			
		|  | @ -298,9 +298,27 @@ const std::string& GetLevel3CategoryDescription(Level3ProductCategory category) | |||
|    return level3CategoryDescription_.at(category); | ||||
| } | ||||
| 
 | ||||
| const std::string& | ||||
| GetLevel3CategoryDefaultProduct(Level3ProductCategory category) | ||||
| std::string | ||||
| GetLevel3CategoryDefaultProduct(Level3ProductCategory           category, | ||||
|                                 const Level3ProductCategoryMap& categoryMap) | ||||
| { | ||||
|    const auto& productsIt = categoryMap.find(category); | ||||
|    if (productsIt == categoryMap.cend()) | ||||
|    { | ||||
|       return level3CategoryDefaultAwipsId_.at(category); | ||||
|    } | ||||
| 
 | ||||
|    const auto& productsSiteHas = productsIt->second; | ||||
|    const auto& productList = level3CategoryProductList_.at(category); | ||||
|    for (auto& product : productList) | ||||
|    { | ||||
|       const auto& tiltsIt = productsSiteHas.find(product); | ||||
|       if (tiltsIt != productsSiteHas.cend() && tiltsIt->second.size() > 0) | ||||
|       { | ||||
|          return tiltsIt->second[0]; | ||||
|       } | ||||
|    } | ||||
| 
 | ||||
|    return level3CategoryDefaultAwipsId_.at(category); | ||||
| } | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 AdenKoperczak
						AdenKoperczak