modify github_tmp to github
This commit is contained in:
parent
f73a392437
commit
7d0df885cc
|
@ -48,10 +48,7 @@ public class GetSynonyms{
|
|||
@Resource
|
||||
private PlatformProjectDao paltformDao;
|
||||
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
>>>>>>> bd2d35aba440af111af5020aa31f5d6462c1ea51
|
||||
private static String gatherProjectsTableName =TableName.gatherProjectsTableName;//TableName.gatherProjectsTableName;
|
||||
private static String gatherProjectsTableName =TableName.gatherProjectsTableName;
|
||||
private static String synonymsTableName = TableName.synonymsTableName;
|
||||
private static String pointerTableName = TableName.pointerTableName;
|
||||
private static int batchSize = 1000;
|
||||
|
@ -254,8 +251,8 @@ public class GetSynonyms{
|
|||
}
|
||||
if(communityValue1 == 1)
|
||||
{
|
||||
List<Integer> hot1 = paltformDao.getHotValue("github_tmp","forks",model1.getUrl_md5());
|
||||
List<Integer> hot2 = paltformDao.getHotValue("github_tmp","forks",model2.getUrl_md5());
|
||||
List<Integer> hot1 = paltformDao.getHotValue("github","forks",model1.getUrl_md5());
|
||||
List<Integer> hot2 = paltformDao.getHotValue("github","forks",model2.getUrl_md5());
|
||||
if(hot1.size()>0 && hot2.size()>0)
|
||||
return hot1.get(0) > hot2.get(0) ? model1:model2;
|
||||
else
|
||||
|
@ -375,7 +372,7 @@ public class GetSynonyms{
|
|||
{
|
||||
//github项目名称中有斜杠,提取斜杠后内容做为别名
|
||||
String subName = getSubName(prjName);
|
||||
if(subName != null)
|
||||
if(subName != null && !subName.equals(""))
|
||||
{
|
||||
SynonymMap.put(subName, 1);
|
||||
}
|
||||
|
@ -747,10 +744,13 @@ public class GetSynonyms{
|
|||
private String getSubName(String prjName) {
|
||||
// TODO Auto-generated method stub
|
||||
String SubName = prjName;
|
||||
if(!prjName.equals(""))
|
||||
{
|
||||
if(prjName.indexOf('/') == -1)
|
||||
return SubName;
|
||||
else
|
||||
SubName = prjName.substring(prjName.indexOf('/') + 1);
|
||||
}
|
||||
return SubName;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue