Authored by liangyi.chen@yoho.cn

Fix

... ... @@ -31,24 +31,26 @@ public class UserInfoListener extends AbstractMqListener<UserInfo> {
@Override
protected void deleteData(UserInfo userInfo , Object checkResult) throws Exception {
logger.info("enter UserInfoListener delete userInfo data is {}" , userInfo);
boolean syncFlag = configReaderUtil.getBoolean("grass.search.es.flag", false);
boolean syncFlag = configReaderUtil.getBoolean("sync.es.flag", false);
if(syncFlag){
//更新用户信息索引到ES 添加到队列中
ESBluk esBluk = new ESBluk(null,String.valueOf(userInfo.getYohoUid()),
IndexConstant.INDEX_NAME.GRASS,IndexConstant.INDEX_TYPE.USER_INFO,true);
esUpdateProcess.add(esBluk);
logger.info("add userInfo data to queue for sync to es");
}
}
@Override
protected void updateData(UserInfo userInfo , Object checkResult) throws Exception {
logger.info("enter UserInfoListener update userInfo data is {}" , userInfo);
boolean syncFlag = configReaderUtil.getBoolean("grass.search.es.flag", false);
boolean syncFlag = configReaderUtil.getBoolean("sync.es.flag", false);
if(syncFlag){
//更新用户信息索引到ES 添加到队列中
ESBluk esBluk = new ESBluk(JSON.toJSONString(userInfo),String.valueOf(userInfo.getYohoUid()),
IndexConstant.INDEX_NAME.GRASS,IndexConstant.INDEX_TYPE.USER_INFO,false);
esUpdateProcess.add(esBluk);
logger.info("add userInfo data to queue for sync to es");
}
}
... ...