Authored by hugufei

fix PersonalGenderFeatureSearch

... ... @@ -9,6 +9,7 @@ import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.HashMap;
import java.util.Map;
@Service
... ... @@ -22,9 +23,11 @@ public class PersonalGenderFeatureSearch {
@SearchCacheAble(cacheInMinute = 30, cacheName = "USER_GENDER_FEATURE", returnClass = JSONObject.class, cacheType = CacheType.SEARCH_REDIS, includeParams = {"uid"})
public JSONObject queryUserGenderFeature(Map<String, String> paramMap) {
try {
Map<String, Float> userGenderFloat = bigDataRedisService.getUserGenderFeature(paramMap.getOrDefault("uid", "0"));
JSONObject jsonObject = new JSONObject();
jsonObject.putAll(userGenderFloat);
Map<String, Float> userGenderFloat = bigDataRedisService.getUserGenderFeature(paramMap.getOrDefault("uid", "0"));
if(userGenderFloat!=null){
jsonObject.putAll(userGenderFloat);
}
return jsonObject;
} catch (Exception e) {
logger.error(e.getMessage(), e);
... ...