Authored by 胡古飞

remove warning

Showing 20 changed files with 113 additions and 119 deletions
... ... @@ -6,22 +6,24 @@ import java.io.Serializable;
* Created by wangnan on 2016/6/30.
*/
public class BrokenCode implements Serializable {
private Integer productSkn;
private Double breakingRate;
public Integer getProductSkn() {
return productSkn;
}
private static final long serialVersionUID = -5187295436950928862L;
private Integer productSkn;
private Double breakingRate;
public void setProductSkn(Integer productSkn) {
this.productSkn = productSkn;
}
public Integer getProductSkn() {
return productSkn;
}
public Double getBreakingRate() {
return breakingRate;
}
public void setProductSkn(Integer productSkn) {
this.productSkn = productSkn;
}
public void setBreakingRate(Double breakingRate) {
this.breakingRate = breakingRate;
}
public Double getBreakingRate() {
return breakingRate;
}
public void setBreakingRate(Double breakingRate) {
this.breakingRate = breakingRate;
}
}
... ...
package com.yoho.search.dal.model;
import java.io.Serializable;
/**
* Created by wangnan on 2016/6/30.
*/
public class GoodsCoverImage implements Serializable {
private Integer id;
public class GoodsCoverImage{
private Integer id;
private Integer goodsId;
private String cover_1;
private String cover_2;
... ...
package com.yoho.search.dal.model;
import java.io.Serializable;
/**
* Created by wangnan on 2016/6/30.
*/
public class ProductActivity implements Serializable {
private Integer productSkn;
public class ProductActivity{
private Integer productSkn;
private String activity;
public Integer getProductSkn() {
... ...
package com.yoho.search.dal.model;
import java.io.Serializable;
/**
* Created by wangnan on 2016/6/29.
*/
public class ProductColors implements Serializable {
public class ProductColors {
private Integer productId;
private String colorIds;
private String colorNames;
... ...
package com.yoho.search.dal.model;
import java.io.Serializable;
/**
* Created by wangnan on 2016/6/30.
*/
public class ProductDefaultImage implements Serializable {
public class ProductDefaultImage{
private Integer productId;
private String defaultImage;
... ...
package com.yoho.search.dal.model;
import java.io.Serializable;
/**
* Created by wangnan on 2016/6/30.
*/
public class ProductSearchBrand implements Serializable {
public class ProductSearchBrand {
private Integer productSkn;
private Integer brandWeightId;
... ...
package com.yoho.search.dal.model;
import java.io.Serializable;
public class ProductSearchShop {
private Integer productSkn;
private Integer shopWeightId;
public class ProductSearchShop implements Serializable {
private Integer productSkn;
private Integer shopWeightId;
public Integer getProductSkn() {
return productSkn;
}
public void setProductSkn(Integer productSkn) {
this.productSkn = productSkn;
}
public Integer getShopWeightId() {
return shopWeightId;
}
public void setShopWeightId(Integer shopWeightId) {
this.shopWeightId = shopWeightId;
}
... ...
package com.yoho.search.dal.model;
import java.io.Serializable;
/**
* Created by wangnan on 2016/6/30.
*/
public class ProductSearchSort implements Serializable {
private Integer productSkn;
public class ProductSearchSort {
private Integer productSkn;
private Integer sortWeightId;
public Integer getProductSkn() {
... ...
package com.yoho.search.dal.model;
import java.io.Serializable;
/**
* Created by wangnan on 2016/6/30.
*/
public class ProductSizes implements Serializable {
public class ProductSizes {
private Integer productId;
private String sizeIds;
private String sizeNames;
//private Integer salesNum;
private Integer storageNum;
public Integer getProductId() {
... ...
package com.yoho.search.dal.model;
import java.io.Serializable;
/**
* Created by wangnan on 2016/6/30.
*/
public class ProductStyles implements Serializable {
public class ProductStyles{
private Integer productId;
private String styleIds;
... ...
package com.yoho.search.consumer.index.increment;
import com.alibaba.fastjson.JSONArray;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.UUID;
import org.apache.commons.lang.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.amqp.core.Message;
import org.springframework.amqp.rabbit.core.ChannelAwareMessageListener;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import com.alibaba.fastjson.JSONObject;
import com.rabbitmq.client.Channel;
import com.yoho.error.event.SearchEvent;
... ... @@ -11,21 +24,10 @@ import com.yoho.search.consumer.common.CostStatistics;
import com.yoho.search.consumer.index.increment.bulks.StorageSkuIndexBulkService;
import com.yoho.search.consumer.index.increment.rule.AbstractStorageRelatedMqListener;
import com.yoho.search.consumer.service.base.GoodsService;
import com.yoho.search.consumer.service.bo.ProductGoodsBO;
import com.yoho.search.consumer.service.bo.StorageSkuBO;
import com.yoho.search.consumer.service.logic.StorageSkuLogicService;
import com.yoho.search.consumer.service.logic.productIndex.ProductGoodsLogicService;
import com.yoho.search.core.es.utils.IgnoreSomeException;
import com.yoho.search.dal.model.Goods;
import org.apache.commons.lang.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.amqp.core.Message;
import org.springframework.amqp.rabbit.core.ChannelAwareMessageListener;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import java.util.*;
@Component
public class GoodsMqListener extends AbstractStorageRelatedMqListener implements ChannelAwareMessageListener {
... ...
package com.yoho.search.consumer.index.increment;
import java.util.Map;
import java.util.UUID;
import org.apache.commons.lang.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.amqp.core.Message;
import org.springframework.amqp.rabbit.core.ChannelAwareMessageListener;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationEventPublisher;
import org.springframework.stereotype.Component;
import com.alibaba.fastjson.JSONObject;
import com.rabbitmq.client.Channel;
import com.yoho.error.event.SearchEvent;
... ... @@ -11,17 +23,6 @@ import com.yoho.search.consumer.index.increment.bulks.GlobalndexBulkService;
import com.yoho.search.consumer.service.base.TblProductSkcService;
import com.yoho.search.core.es.utils.IgnoreSomeException;
import com.yoho.search.dal.model.TblProductSkc;
import org.apache.commons.lang.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.amqp.core.Message;
import org.springframework.amqp.rabbit.core.ChannelAwareMessageListener;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationEventPublisher;
import org.springframework.stereotype.Component;
import java.util.Map;
import java.util.UUID;
/**
* Created by wangnan on 2016/12/19.
... ...
package com.yoho.search.consumer.index.increment;
import java.util.Map;
import java.util.UUID;
import org.apache.commons.lang.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.amqp.core.Message;
import org.springframework.amqp.rabbit.core.ChannelAwareMessageListener;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationEventPublisher;
import org.springframework.stereotype.Component;
import com.alibaba.fastjson.JSONObject;
import com.rabbitmq.client.Channel;
import com.yoho.error.event.SearchEvent;
... ... @@ -11,17 +23,6 @@ import com.yoho.search.consumer.index.increment.bulks.GlobalndexBulkService;
import com.yoho.search.consumer.service.base.TblProductSkuService;
import com.yoho.search.core.es.utils.IgnoreSomeException;
import com.yoho.search.dal.model.TblProductSku;
import org.apache.commons.lang.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.amqp.core.Message;
import org.springframework.amqp.rabbit.core.ChannelAwareMessageListener;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationEventPublisher;
import org.springframework.stereotype.Component;
import java.util.Map;
import java.util.UUID;
/**
* Created by wangnan on 2016/12/19.
... ...
... ... @@ -4,7 +4,6 @@ import java.util.List;
import java.util.Map;
import java.util.UUID;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
... ...
package com.yoho.search.consumer.index.increment.bulks;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ArrayBlockingQueue;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import javax.annotation.PostConstruct;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationEventPublisher;
import org.springframework.context.ApplicationEventPublisherAware;
import org.springframework.stereotype.Component;
import com.alibaba.fastjson.JSONObject;
import com.yoho.error.event.SearchEvent;
import com.yoho.search.base.utils.EventReportEnum;
... ... @@ -7,24 +23,10 @@ import com.yoho.search.base.utils.ISearchConstants;
import com.yoho.search.consumer.common.CostStatistics;
import com.yoho.search.consumer.index.common.IYohoIndexService;
import com.yoho.search.consumer.service.bo.StorageSkuBO;
import com.yoho.search.consumer.service.logic.tools.SpecialDealLogicService;
import com.yoho.search.consumer.service.logic.StorageSkuLogicService;
import com.yoho.search.consumer.service.logic.tools.SpecialDealLogicService;
import com.yoho.search.core.es.model.ESBluk;
import com.yoho.search.core.es.utils.IgnoreSomeException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationEventPublisher;
import org.springframework.context.ApplicationEventPublisherAware;
import org.springframework.stereotype.Component;
import javax.annotation.PostConstruct;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ArrayBlockingQueue;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
@Component
public class StorageSkuIndexBulkService implements ApplicationEventPublisherAware {
... ...
package com.yoho.search.consumer.index.increment.rule;
import org.apache.curator.framework.CuratorFramework;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;
import java.util.Map;
import javax.annotation.Resource;
import java.util.Map;
import org.apache.curator.framework.CuratorFramework;
import org.springframework.stereotype.Component;
/**
* 负责持久化rule的值到ZK。
... ... @@ -15,8 +14,6 @@ import java.util.Map;
@Component
public class DynamicRulePersistenceService {
private static final Logger logger = LoggerFactory.getLogger(DynamicRulePersistenceService.class);
private static final String CONFIG_ROOT_PATH = "/yh/config";
@Resource(name = "curatorFramework")
... ...
package com.yoho.search.consumer.job;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
import java.util.Map;
import java.util.Optional;
... ...
package com.yoho.search.consumer.suggests.discover;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.stream.Collectors;
import org.springframework.beans.factory.annotation.Autowired;
import com.yoho.search.base.utils.ISearchConstants;
import com.yoho.search.consumer.index.common.IYohoIndexService;
import com.yoho.search.consumer.suggests.common.SuggestSearchParamBuilder;
... ... @@ -8,13 +16,6 @@ import com.yoho.search.consumer.suggests.counter.KeywordCounterService;
import com.yoho.search.core.es.agg.IAggregation;
import com.yoho.search.core.es.model.SearchParam;
import com.yoho.search.core.es.model.SearchResult;
import org.springframework.beans.factory.annotation.Autowired;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.stream.Collectors;
/**
* Created by ginozhang on 2016/11/25.
... ... @@ -36,23 +37,20 @@ public abstract class AbstractAggSuggestionDiscoverer extends AbstractSuggestion
if (countMap == null || countMap.isEmpty()) {
return 0;
}
if (tokenList != null) {
return tokenList.size();
}
synchronized (this) {
if (tokenList != null) {
return tokenList.size();
}
tokenList = countMap.keySet().stream().collect(Collectors.toList());
}
return tokenList.size();
}
private Map<String, Integer> findSuggestionTokenByAgg(IAggregation aggregation) {
@SuppressWarnings("unchecked")
private Map<String, Integer> findSuggestionTokenByAgg(IAggregation aggregation) {
SearchParam searchParam = SuggestSearchParamBuilder.build("", CountUsage.PC);
searchParam.addAbstractAggregationBuilder(aggregation.getBuilder());
SearchResult searchResult = yohoIndexService.search(ISearchConstants.INDEX_NAME_PRODUCT_INDEX, searchParam);
... ... @@ -70,11 +68,9 @@ public abstract class AbstractAggSuggestionDiscoverer extends AbstractSuggestion
if (end > tokenList.size()) {
end = tokenList.size();
}
if (start > end) {
return sortNameSet;
}
tokenList.subList(start, end).forEach((item) -> sortNameSet.add(item));
return sortNameSet;
}
... ...
package com.yoho.search.consumer.suggests.discover;
import java.util.HashSet;
import java.util.Set;
import javax.annotation.Resource;
import org.springframework.stereotype.Component;
import com.yoho.core.redis.YHHashOperations;
import com.yoho.core.redis.YHZSetOperations;
import com.yoho.search.consumer.suggests.common.KeywordType;
import com.yoho.search.consumer.suggests.common.SuggestionConstants;
import org.springframework.data.redis.core.ZSetOperations;
import org.springframework.stereotype.Component;
import javax.annotation.Resource;
import java.util.HashSet;
import java.util.Set;
/**
* Created by ginozhang on 2016/11/25.
... ...
... ... @@ -10,7 +10,6 @@ import org.springframework.stereotype.Component;
import com.yoho.search.consumer.service.base.TblSortService;
import com.yoho.search.consumer.suggests.common.KeywordType;
import com.yoho.search.dal.model.ProductSort;
import com.yoho.search.dal.model.TblSort;
@Component
... ...