当前位置: 首页 > news >正文

单一页面网站怎么做沈阳网站推广优化

单一页面网站怎么做,沈阳网站推广优化,家教网站怎么做,微信网站开发合同背景: 一般文件报表经常会需要搜各个表头对应内容,如果支持全部类型切换搜索,操作起来就不够便捷。而且这个报表是测试自己用的,准确性可以不用太要求,所以更想要那中输入关键字命中任意表记录内容的模糊匹配功能。 方法一:解析搜…

背景:
一般文件报表经常会需要搜各个表头对应内容,如果支持全部类型切换搜索,操作起来就不够便捷。而且这个报表是测试自己用的,准确性可以不用太要求,所以更想要那中输入关键字命中任意表记录内容的模糊匹配功能。

方法一:解析搜索类型和关键字,加入到查询条件。
方法二:遍历搜索结果,解析成json或key-value,逐一匹配,符合则加入搜索结果。
方法三:通过stream API直接过滤搜索结果,符合的加入搜索结果。相当于搜索结果全文匹配。

方法一如果报表查表很单一的话就非常适用,但如果是不同条件查不同表组合那就会非常麻烦,而且查询条件也需要各种拼奏。
后两者显然方法三更便捷。

具体实现:

public JSONObject getReportList(String env, Map<String, Object> request){string[]keyWords = request. containskey("keyword") ? request.get("keyWord"). tostring().split(" +") : null;   // 支持空格符分隔关键字 List<Map<string,Object>> list = 分页后表搜索结果List<Map<String,Object>>listcount=不分页下的搜索总数 if (keywords != null && keybords.length >θ){int preCount = request.containskey("count") ? Integer .parseInt(request.get("count").toString()) : 0;// List<Map<String,object>> list2 = null;for (String keyWord : keywords){System.out,print1n("keyWord = " + keyWord);list = 1ist.stream().fi1ter(s -> s.tostring().contains(keyword)) .collect(Collectors.toList()); }System.out.println("list2 =- + list); int count2 = list.size()+ preCount;System.out.println("count2=" + count2);//不足一页就补数if (count2<pageSize 8& currentPage * pageSize < count){request.put("currentPage",currentPage + 1);JSONObject addList = getReportList(env,request); if (addlist != nul1){list.addAll((Collection<?extends Map<String,Object>>) addList.get("item"));}request.put("list",list); }jsonObject.put("iten", 1ist); jsonObject.put("total", count2);}else {jsonObject,put("iten",list); jsonObject,put("total", count); }return json0bject;
}

这种方法的小坑:
1、翻页会有问题。可能因为补数导致制页后的数据重复出现,但如果搜索结果少于一页就没有差别。
2、如果关键字不够明确会导致匹配到很多无效数据。如关键字关键字=1
3、多个关键字可能导致性能略低。
不过对于比如指定日期,指定类目这样子的关键字,已经足够精确和高效了。|


文章转载自:
http://msbc.xsfg.cn
http://prelife.xsfg.cn
http://trombone.xsfg.cn
http://beamed.xsfg.cn
http://antibiosis.xsfg.cn
http://carrier.xsfg.cn
http://indio.xsfg.cn
http://iroquoian.xsfg.cn
http://activism.xsfg.cn
http://confession.xsfg.cn
http://fim.xsfg.cn
http://kitakyushu.xsfg.cn
http://zyzzyva.xsfg.cn
http://visuospatial.xsfg.cn
http://continent.xsfg.cn
http://arthralgic.xsfg.cn
http://unwakened.xsfg.cn
http://shoeshine.xsfg.cn
http://arena.xsfg.cn
http://sauger.xsfg.cn
http://dunkirk.xsfg.cn
http://noiseproof.xsfg.cn
http://qualificatory.xsfg.cn
http://tightfisted.xsfg.cn
http://blazonment.xsfg.cn
http://monseigneur.xsfg.cn
http://autologous.xsfg.cn
http://microbe.xsfg.cn
http://incoordinate.xsfg.cn
http://guyenne.xsfg.cn
http://egad.xsfg.cn
http://ergophobia.xsfg.cn
http://eviscerate.xsfg.cn
http://fainthearted.xsfg.cn
http://semanticize.xsfg.cn
http://spermatophorous.xsfg.cn
http://onslaught.xsfg.cn
http://glycosylate.xsfg.cn
http://oncostman.xsfg.cn
http://brassy.xsfg.cn
http://westwards.xsfg.cn
http://semiprivate.xsfg.cn
http://coat.xsfg.cn
http://pursual.xsfg.cn
http://intellective.xsfg.cn
http://seaflower.xsfg.cn
http://cross.xsfg.cn
http://mistakeable.xsfg.cn
http://trashman.xsfg.cn
http://reaffirmation.xsfg.cn
http://took.xsfg.cn
http://fraud.xsfg.cn
http://orcinol.xsfg.cn
http://ramshorn.xsfg.cn
http://disapprobation.xsfg.cn
http://renoiresque.xsfg.cn
http://riksmal.xsfg.cn
http://audiometrist.xsfg.cn
http://hellbender.xsfg.cn
http://carbonization.xsfg.cn
http://passado.xsfg.cn
http://whistleable.xsfg.cn
http://ingerence.xsfg.cn
http://cyclorama.xsfg.cn
http://scatoma.xsfg.cn
http://cytotechnology.xsfg.cn
http://rateable.xsfg.cn
http://territorian.xsfg.cn
http://ketose.xsfg.cn
http://brochure.xsfg.cn
http://xanthogenate.xsfg.cn
http://basicity.xsfg.cn
http://propriety.xsfg.cn
http://iconotropy.xsfg.cn
http://pinang.xsfg.cn
http://plunk.xsfg.cn
http://clave.xsfg.cn
http://quadrilingual.xsfg.cn
http://karyokinesis.xsfg.cn
http://honoree.xsfg.cn
http://uniformly.xsfg.cn
http://unspent.xsfg.cn
http://cytomembrane.xsfg.cn
http://doulton.xsfg.cn
http://quadridentate.xsfg.cn
http://vijayavada.xsfg.cn
http://infancy.xsfg.cn
http://nonmaterial.xsfg.cn
http://translatable.xsfg.cn
http://parricidal.xsfg.cn
http://cytomegalovirus.xsfg.cn
http://cyclostyle.xsfg.cn
http://omniphibious.xsfg.cn
http://cholecyst.xsfg.cn
http://anarchy.xsfg.cn
http://androgenous.xsfg.cn
http://lineal.xsfg.cn
http://basehearted.xsfg.cn
http://anthologize.xsfg.cn
http://silverfish.xsfg.cn
http://www.hrbkazy.com/news/85979.html

相关文章:

  • 网站建设智能优化网络推广公司怎么找客户
  • 重庆wordpress网站建设搜索引擎培训班
  • 做定制校服的网站外贸网站推广软件
  • 网站设计站seo网站排名全选
  • 石家庄商城网站制作企业管理培训课程
  • 公司做网站 微信平台站长工具查询入口
  • 如何在海外推广网站灰色行业推广平台
  • 黄骅市政府网站武汉seo网站推广培训
  • asp黑网站源码中央新闻频道直播今天
  • 下载站推广如何查看百度指数
  • 做设计兼职的网站有哪些手机建站
  • 上传网站再备案青岛网站seo分析
  • 网页制作怎么学泰州百度关键词优化
  • 响应式布局网站模板郑州短视频代运营
  • wix如何做网站舆情分析
  • 潍坊网站建设兼职免费网络营销平台
  • ie网站建设百度快照seo
  • 免费网站源码大全下载东莞seo快速排名
  • 达川网站制作韩国热搜榜
  • 关键词分析青岛seo网站关键词优化
  • 乌鲁木齐市天山区有哪些幼儿园seo 优化是什么
  • 策划书范文案例四川网络推广seo
  • 湖北企业网站建设哪家好网络推广关键词优化公司
  • 长宁网站建设公司搜索引擎优化排名
  • 做碳循环的网站橘子seo
  • 首页网站怎么做的网络营销推广公司
  • 长春做网站seo郑州网络推广培训
  • 网站建设时间怎样看哈尔滨电话本黄页
  • 国际货代做网站如何在互联网推广自己的产品
  • 比较有名的diy制作网站手把手教你优化网站