Commit 8fbe9ee4 authored by 赵啸非's avatar 赵啸非

热门词汇修改

parent 3eff261c
......@@ -82,8 +82,10 @@ public class BasesetServiceImpl extends AbstractCRUDServiceImpl<BasesetDao, Base
}else{
item.setCreateUserId(this.getContextUserId(context));
item.setCreateTime(new Date());
if(!ObjectUtils.isEmpty(item.getHotwords())){
hotwordService.save(item, context);
}
}
});
}
}
......
......@@ -63,6 +63,21 @@ public class HotwordController extends BaseCRUDJsonBodyMappingController<Hotword
item.setUpdateTime(new Date());
}
});
Iterator<HotwordEntity> iterator = list.iterator();
while (iterator.hasNext()) {
HotwordEntity item = iterator.next();
if(ObjectUtils.isEmpty(item.getHotwords())){
iterator.remove();
continue;
}
HotwordEntity hotwordEntity = this.service.selectOne(new HotwordQuery().siteId(item.getSiteId()).hotwords(item.getHotwords()));
if (!ObjectUtils.isEmpty(hotwordEntity)) {
item.setId(hotwordEntity.getId());
item.setSearchCount(hotwordEntity.getSearchCount());
item.setUpdateTime(new Date());
}
}
super.batchSaveBefore(list, model, context);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment