git-svn-id: svn://192.168.0.12/source@196 8346c931-da38-4b9b-9d4c-e48b93cbd075

This commit is contained in:
admin
2015-09-25 02:58:37 +00:00
parent 7961401b3d
commit 1595ce6eaf

View File

@@ -1204,7 +1204,8 @@ void SFilterProcess::DataInfluenceCount(QString _strFilter,QString _strCompanyNu
foreach(QStringList strlist,m_data[E_ARTICLE_REPLY]) foreach(QStringList strlist,m_data[E_ARTICLE_REPLY])
{ {
QString strUrl = strlist[m_nUrlColumn].trimmed(); if (strlist[m_anData[E_DATA_platform_form]].trimmed().compare(QString("blog")) != 0) continue;
QString strUrl = strlist[m_nUrlColumn].trimmed();
SInfluenceMap stInfluenceMap; SInfluenceMap stInfluenceMap;
stInfluenceMap.m_nBody = m_mapData[strUrl].m_nNum; stInfluenceMap.m_nBody = m_mapData[strUrl].m_nNum;
stInfluenceMap.m_nId = m_mapID[strlist[m_anData[E_DATA_article_id]].trimmed()].m_nNum; stInfluenceMap.m_nId = m_mapID[strlist[m_anData[E_DATA_article_id]].trimmed()].m_nNum;
@@ -1213,8 +1214,6 @@ void SFilterProcess::DataInfluenceCount(QString _strFilter,QString _strCompanyNu
vecInfluenceMap[E_ARTICLE_REPLY].push_back(stInfluenceMap); vecInfluenceMap[E_ARTICLE_REPLY].push_back(stInfluenceMap);
} }
InsertLog("Influence Rank Count Make End"); InsertLog("Influence Rank Count Make End");
{ {
m_db.setHostName(m_strWebDataBaseHost); m_db.setHostName(m_strWebDataBaseHost);
@@ -1234,7 +1233,12 @@ void SFilterProcess::DataInfluenceCount(QString _strFilter,QString _strCompanyNu
strQuery = "delete from stats_inf_blogger_rank where company_num = " + strCompanyNum; strQuery = "delete from stats_inf_blogger_rank where company_num = " + strCompanyNum;
if(query.exec(strQuery.toUtf8()) == false) {InsertLog(query.lastError().text());return;} if(query.exec(strQuery.toUtf8()) == false) {InsertLog(query.lastError().text());return;}
strQuery = "delete from influencer where company_num = " + strCompanyNum; strQuery = "delete from influencer where company_num = " + strCompanyNum;
if(query.exec(strQuery.toUtf8()) == false) {InsertLog(query.lastError().text());return;}
strQuery = "delete from body_influencer_map_" + _strCompanyNum + "_update";
if(query.exec(strQuery.toUtf8()) == false) {InsertLog(query.lastError().text());return;} if(query.exec(strQuery.toUtf8()) == false) {InsertLog(query.lastError().text());return;}
strQuery = "delete from reply_influencer_map_" + _strCompanyNum + "_update";
if(query.exec(strQuery.toUtf8()) == false) {InsertLog(query.lastError().text());return;}
QList<SInfluenceCount> list = mapCount.values(); QList<SInfluenceCount> list = mapCount.values();
qSort(list.begin(),list.end(),QSortInfulrence); qSort(list.begin(),list.end(),QSortInfulrence);
@@ -1303,6 +1307,7 @@ void SFilterProcess::DataInfluenceCount(QString _strFilter,QString _strCompanyNu
UpdateDBInfoState(m_db,_strCompanyNum,"Influence (Map body Insert)"); UpdateDBInfoState(m_db,_strCompanyNum,"Influence (Map body Insert)");
nCount = 1; nCount = 1;
foreach(SInfluenceMap stMap,vecInfluenceMap[E_ARTICLE_BODY]) foreach(SInfluenceMap stMap,vecInfluenceMap[E_ARTICLE_BODY])
{ {
strQuery = "insert into body_influencer_map_"; strQuery = "insert into body_influencer_map_";
@@ -1324,7 +1329,7 @@ void SFilterProcess::DataInfluenceCount(QString _strFilter,QString _strCompanyNu
{ {
strQuery = "insert into reply_influencer_map_"; strQuery = "insert into reply_influencer_map_";
strQuery += _strCompanyNum + "_update"; strQuery += _strCompanyNum + "_update";
strQuery += " (num,body_num,id_num) VALUES ("; strQuery += " (num,body_num,reply_num,id_num) VALUES (";
strQuery += QString::number(nCount++) + ","; strQuery += QString::number(nCount++) + ",";
strQuery += QString::number(stMap.m_nBody) + ","; strQuery += QString::number(stMap.m_nBody) + ",";
strQuery += QString::number(stMap.m_nReply) + ","; strQuery += QString::number(stMap.m_nReply) + ",";
@@ -1545,10 +1550,8 @@ void SFilterProcess::DataSpammersCount(QString _strFilter,QString _strCompanyNum
if(query.exec(strQuery.toUtf8()) == false) {InsertLog(query.lastError().text());return;} if(query.exec(strQuery.toUtf8()) == false) {InsertLog(query.lastError().text());return;}
strQuery = "delete from spammer where company_num = " + strCompanyNum; strQuery = "delete from spammer where company_num = " + strCompanyNum;
if(query.exec(strQuery.toUtf8()) == false) {InsertLog(query.lastError().text());return;} if(query.exec(strQuery.toUtf8()) == false) {InsertLog(query.lastError().text());return;}
strQuery = "delete from body_spammer_map_" + _strCompanyNum + "_update"; strQuery = "delete from body_spammer_map_" + _strCompanyNum + "_update";
if(query.exec(strQuery.toUtf8()) == false) {InsertLog(query.lastError().text());return;} if(query.exec(strQuery.toUtf8()) == false) {InsertLog(query.lastError().text());return;}
strQuery = "delete from reply_spammer_map_" + _strCompanyNum + "_update"; strQuery = "delete from reply_spammer_map_" + _strCompanyNum + "_update";
if(query.exec(strQuery.toUtf8()) == false) {InsertLog(query.lastError().text());return;} if(query.exec(strQuery.toUtf8()) == false) {InsertLog(query.lastError().text());return;}
@@ -1831,6 +1834,11 @@ void SFilterProcess::DataPowerCafeCount(QString _strFilter,QString _strCompanyNu
if(query.exec(strQuery.toUtf8()) == false) {InsertLog(query.lastError().text());return;} if(query.exec(strQuery.toUtf8()) == false) {InsertLog(query.lastError().text());return;}
strQuery = "delete from stats_pow_cafe_rank where company_num = " + strCompanyNum; strQuery = "delete from stats_pow_cafe_rank where company_num = " + strCompanyNum;
if(query.exec(strQuery.toUtf8()) == false) {InsertLog(query.lastError().text());return;} if(query.exec(strQuery.toUtf8()) == false) {InsertLog(query.lastError().text());return;}
strQuery = "delete from body_powercafe_map_" + _strCompanyNum + "_update";
if(query.exec(strQuery.toUtf8()) == false) {InsertLog(query.lastError().text());return;}
strQuery = "delete from reply_powercafe_map_" + _strCompanyNum + "_update";
if(query.exec(strQuery.toUtf8()) == false) {InsertLog(query.lastError().text());return;}
QList<SPowerCafeCount> list = mapRealCount.values(); QList<SPowerCafeCount> list = mapRealCount.values();
qSort(list.begin(),list.end(),QSortPowerCafeReal); qSort(list.begin(),list.end(),QSortPowerCafeReal);
strQuery = "insert into powercafe (company_num,rank,community_num,community_id,bodycountall,replycountall,allcountall,usercountall,bodycountreal,replycountreal,allcountreal,usercountreal)" strQuery = "insert into powercafe (company_num,rank,community_num,community_id,bodycountall,replycountall,allcountall,usercountall,bodycountreal,replycountreal,allcountreal,usercountreal)"