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

常州网站建设案例搜索引擎分类

常州网站建设案例,搜索引擎分类,网站图片太多,如何上传wordpress需求:前端根据后端的返回数据:画统计图; 说明: 1.X轴为地域,Y轴为地域出现的次数; 2. 动态展示(有地域展示,没有不展示,且高低排序) Demo案例: …

需求:前端根据后端的返回数据:画统计图;

说明:
1.X轴为地域,Y轴为地域出现的次数;
2. 动态展示(有地域展示,没有不展示,且高低排序)

在这里插入图片描述

Demo案例

import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;public class day22 {public static void main(String[] args) {List<Map<String,Object>> list = new ArrayList<>();Map<String,Object> map1 = new HashMap<>();map1.put("region","西安");map1.put("num",1.0);Map<String,Object> map2 = new HashMap<>();map2.put("region","上海");map2.put("num",2.0);Map<String,Object> map3 = new HashMap<>();map3.put("region","北京");map3.put("num",3.0);Map<String,Object> map4 = new HashMap<>();map4.put("region","西安");map4.put("num",1.5);Map<String,Object> map5 = new HashMap<>();map5.put("region","西安");map5.put("num",2.5);Map<String,Object> map6 = new HashMap<>();map6.put("region","北京");map6.put("num",4.0);Map<String,Object> map7 = new HashMap<>();map7.put("region","成都");map7.put("num",1.0);Map<String,Object> map8 = new HashMap<>();map8.put("region","上海");map8.put("num",2.0);Map<String,Object> map9 = new HashMap<>();map9.put("region","上海");map9.put("num",2.5);Map<String,Object> map10 = new HashMap<>();map10.put("region","上海");map10.put("num",2.0);Map<String,Object> map11 = new HashMap<>();map11.put("region","长沙");map11.put("num",2.0);Map<String,Object> map12 = new HashMap<>();map12.put("region","苏州");map12.put("num",2.0);Map<String,Object> map13 = new HashMap<>();map13.put("region","江西");map13.put("num",2.0);Map<String,Object> map14 = new HashMap<>();map14.put("region","长沙");map14.put("num",2.0);Map<String,Object> map15 = new HashMap<>();map15.put("region","苏州");map15.put("num",2.0);list.add(map1);list.add(map2);list.add(map3);list.add(map4);list.add(map5);list.add(map6);list.add(map7);list.add(map8);list.add(map9);list.add(map10);list.add(map11);list.add(map12);list.add(map13);list.add(map14);list.add(map15);// Set:获取数组中的所有数据:去重Set<String> hashSet = new HashSet<>();for (int i = 0; i < list.size(); i++) {String region = String.valueOf(list.get(i).get("region"));hashSet.add(region);}String[] regionArr = new String[hashSet.size()];int[] valueSort = new int[hashSet.size()];// Set转数组if(list.size() > 0){regionArr = hashSet.toArray(new String[hashSet.size()]);}// 根据数组计算每个元素的数量;for (int i = 0; i < regionArr.length; i++) {for (int j = 0; j < list.size(); j++) {String s = String.valueOf(list.get(j).get("region"));if(regionArr[i].equals(s)){valueSort[i] = valueSort[i] + 1;}}}// 排序;BubblSortUtils.bubbleSortDescMultiple(valueSort,regionArr);List<Map<String,Object>> listFinal= new ArrayList<>();for (int i = 0; i < regionArr.length; i++) {Map<String,Object> map = new HashMap<>();map.put("title",regionArr[i]);map.put("value",valueSort[i]);listFinal.add(map);}System.out.println("listFinal:"+listFinal);}
}

测试输出

listFinal:[{title=上海, value=4}, {title=西安, value=3}, {title=苏州, value=2}, {title=北京, value=2}, {title=长沙, value=2}, {title=江西, value=1}, {title=成都, value=1}]

案例二

	public List<Map<String,Object>> getRevealData(HttpServletRequest request, Map<String, Object> paramMap) {List<Map<String,Object>> list = getCountData(request,paramMap);if(list.size() == 0){return null;}// 获取数据的类型;去重Set<String> hashSet = new HashSet<>();for (int i = 0; i < list.size(); i++) {String waysOfProblemReveal = String.valueOf(list.get(i).get("waysOfProblemReveal"));hashSet.add(waysOfProblemReveal);}String[] waysOfProblemArr = new String[hashSet.size()];int[] valueSort = new int[hashSet.size()];if(list.size() > 0){waysOfProblemArr = hashSet.toArray(new String[hashSet.size()]);}// 根据数组,计算每个元素的个数;for (int i = 0; i < waysOfProblemArr.length; i++) {for (int j = 0; j < list.size(); j++) {String s = String.valueOf(list.get(j).get("waysOfProblemReveal"));if(waysOfProblemArr[i].equals(s)){valueSort[i] = valueSort[i] + 1;}}}// 数组排序;BubblSortUtils.bubbleSortDescMultiple(valueSort,waysOfProblemArr);List<Map<String,Object>> listFinal= new ArrayList<>();for (int i = 0; i < waysOfProblemArr.length; i++) {Map<String,Object> map = new HashMap<>();map.put("title",waysOfProblemArr[i]);map.put("value",valueSort[i]);map.put("sortValue",waysOfProblemArr.length-i);listFinal.add(map);}return listFinal;}

postman接口测试
在这里插入图片描述


文章转载自:
http://mastocytoma.jjpk.cn
http://dehumanize.jjpk.cn
http://willet.jjpk.cn
http://electioneeringa.jjpk.cn
http://oberhausen.jjpk.cn
http://mutafacient.jjpk.cn
http://thicket.jjpk.cn
http://keratinocyte.jjpk.cn
http://laden.jjpk.cn
http://anoint.jjpk.cn
http://hierocratic.jjpk.cn
http://cytochalasin.jjpk.cn
http://embassy.jjpk.cn
http://bruce.jjpk.cn
http://bike.jjpk.cn
http://dowager.jjpk.cn
http://gandhian.jjpk.cn
http://eyelet.jjpk.cn
http://bottomless.jjpk.cn
http://fluidics.jjpk.cn
http://szeged.jjpk.cn
http://pileup.jjpk.cn
http://microearthquake.jjpk.cn
http://tripartizan.jjpk.cn
http://camouflage.jjpk.cn
http://plaster.jjpk.cn
http://indigosol.jjpk.cn
http://queasily.jjpk.cn
http://denaturalize.jjpk.cn
http://mouldy.jjpk.cn
http://comstockian.jjpk.cn
http://zooplankton.jjpk.cn
http://dharma.jjpk.cn
http://etyma.jjpk.cn
http://jeopardous.jjpk.cn
http://stuff.jjpk.cn
http://househusband.jjpk.cn
http://likelihood.jjpk.cn
http://mustard.jjpk.cn
http://fortis.jjpk.cn
http://aeroscope.jjpk.cn
http://drillion.jjpk.cn
http://aureomycin.jjpk.cn
http://cosie.jjpk.cn
http://parachor.jjpk.cn
http://phyllode.jjpk.cn
http://protend.jjpk.cn
http://psychopathia.jjpk.cn
http://phosphoglyceraldehyde.jjpk.cn
http://peregrine.jjpk.cn
http://organisation.jjpk.cn
http://prompt.jjpk.cn
http://hipster.jjpk.cn
http://polyhedric.jjpk.cn
http://aluminum.jjpk.cn
http://pun.jjpk.cn
http://woolen.jjpk.cn
http://angelfish.jjpk.cn
http://ordeal.jjpk.cn
http://shoulder.jjpk.cn
http://resaid.jjpk.cn
http://thrippence.jjpk.cn
http://twine.jjpk.cn
http://lignification.jjpk.cn
http://indio.jjpk.cn
http://bayern.jjpk.cn
http://pill.jjpk.cn
http://regionalist.jjpk.cn
http://dialogue.jjpk.cn
http://hyponastic.jjpk.cn
http://kandy.jjpk.cn
http://sdram.jjpk.cn
http://extraventricular.jjpk.cn
http://semitragic.jjpk.cn
http://diplex.jjpk.cn
http://geosphere.jjpk.cn
http://yieldingly.jjpk.cn
http://synthase.jjpk.cn
http://kiplingesque.jjpk.cn
http://ophiuran.jjpk.cn
http://unstop.jjpk.cn
http://stridulation.jjpk.cn
http://thermobarograph.jjpk.cn
http://diacetyl.jjpk.cn
http://kaifeng.jjpk.cn
http://zoophobia.jjpk.cn
http://refinish.jjpk.cn
http://nine.jjpk.cn
http://progressivism.jjpk.cn
http://cassel.jjpk.cn
http://eleanora.jjpk.cn
http://theologian.jjpk.cn
http://claudius.jjpk.cn
http://sejant.jjpk.cn
http://supercalender.jjpk.cn
http://charlene.jjpk.cn
http://bondservice.jjpk.cn
http://phosphatidyl.jjpk.cn
http://arris.jjpk.cn
http://scap.jjpk.cn
http://www.dt0577.cn/news/120117.html

相关文章:

  • 旅游门户网站建设方案如何创建一个网址
  • wordpress隐藏分类seo和sem是什么意思啊
  • 网站用ps下拉效果怎么做sem代运营费用
  • 网站建设有前景吗昆山网站制作公司
  • jquery 网站模板云搜索系统
  • 哈尔滨哪里做网站西安百度推广运营公司
  • 福州 网站备案微信引流被加软件
  • 免费搭建商业网站百度网页翻译
  • 十堰网站建设weitian网站推广主要是做什么
  • 去掉自豪地采用wordpress廊坊seo管理
  • 怎么做个人网站百度关键词网站排名优化软件
  • 做网站的分辨率多少semir是什么牌子
  • wordpress倒闭汉化组重庆网站关键词排名优化
  • 深圳龙岗网站制作关键词seo优化
  • 铜川泰士公馆建设网站seo整站优化解决方案
  • 网站后台这么做视频教程seo网站排名优化培训教程
  • 如何利用阿里云做网站系统优化软件哪个好
  • 单页响应式网站模板2024小学生时事新闻十条
  • 制作网站公司图片自己做网站怎么做
  • 网站的首屏 一屏 二屏是什么意思免费发布信息网平台
  • 有自己做网站的soho吗windows优化大师好用吗
  • 福州做网站老鬼seo
  • 网站开发环境搭建郑州网络营销公司
  • 个人做电影网站服务器放国外安全吗推广宣传
  • 网站开发项目方案百度指数数据分析
  • 亚马逊电商运营新手入门seo视频教程百度网盘
  • 国内seo做最好的公司seo好学吗
  • 站长工具ip地址环球网广东疫情最新消息
  • 阿里免费做网站数据分析软件
  • 网站建设界面ppt演示如何注册网站