package com.org.hktshop.utils;


import com.org.hktshop.Interface.global.IHktLanguageService;
import com.org.hktshop.constant.CommonConstant;
import com.org.hktshop.entity.global.HktLanguage;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * @author hotking03
 */
@Component
public class GoodsUtils {

    @Autowired
    private IHktLanguageService languageService;

    public String getCollectionName(String languageId) {
        HktLanguage language = new HktLanguage();
        language.setId(languageId);
        HktLanguage flanguage = languageService.queryLanguage(language);
        return CommonConstant.HKT_Goods_Cache_KeyHead + flanguage.getAbbreviate();
    }

    public String getCollectionNameForSearchReMind(String languageId) {
        HktLanguage language = new HktLanguage();
        language.setId(languageId);
        HktLanguage flanguage = languageService.queryLanguage(language);
        return CommonConstant.HKT_SEARCH_CACHE_REMIND + flanguage.getAbbreviate();
    }
}
