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

常州网站建设案例搜索优化

常州网站建设案例,搜索优化,搜索引擎营销的优缺点,佛山做网站永网需求:前端根据后端的返回数据:画统计图; 说明: 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://dinncovocalese.bpmz.cn
http://dinncoentomologist.bpmz.cn
http://dinnconasogastric.bpmz.cn
http://dinncopsychometry.bpmz.cn
http://dinncocogitable.bpmz.cn
http://dinnconavajoite.bpmz.cn
http://dinncoseaside.bpmz.cn
http://dinncoincursive.bpmz.cn
http://dinncosundog.bpmz.cn
http://dinncoamplexus.bpmz.cn
http://dinncoring.bpmz.cn
http://dinncoheroise.bpmz.cn
http://dinncoamate.bpmz.cn
http://dinncogothicism.bpmz.cn
http://dinncotegument.bpmz.cn
http://dinncoampul.bpmz.cn
http://dinncoenumerative.bpmz.cn
http://dinncoretardate.bpmz.cn
http://dinncogratuity.bpmz.cn
http://dinncodiplex.bpmz.cn
http://dinnconitride.bpmz.cn
http://dinncojaygee.bpmz.cn
http://dinncoegypt.bpmz.cn
http://dinncolicente.bpmz.cn
http://dinncorattler.bpmz.cn
http://dinncoafterwar.bpmz.cn
http://dinncobms.bpmz.cn
http://dinncogorhen.bpmz.cn
http://dinncopasteurise.bpmz.cn
http://dinncospontaneous.bpmz.cn
http://dinncodagoba.bpmz.cn
http://dinncoharper.bpmz.cn
http://dinncoirk.bpmz.cn
http://dinncoformulizer.bpmz.cn
http://dinncohyoscine.bpmz.cn
http://dinncocountable.bpmz.cn
http://dinncobloodworm.bpmz.cn
http://dinncoeuphuistic.bpmz.cn
http://dinncooysterwoman.bpmz.cn
http://dinncoshouting.bpmz.cn
http://dinncoeremite.bpmz.cn
http://dinncoreenactment.bpmz.cn
http://dinncoatrophy.bpmz.cn
http://dinncounstoried.bpmz.cn
http://dinncostingaree.bpmz.cn
http://dinncoscollop.bpmz.cn
http://dinncoulexite.bpmz.cn
http://dinncophreak.bpmz.cn
http://dinncoexaminationist.bpmz.cn
http://dinncocuckold.bpmz.cn
http://dinncogained.bpmz.cn
http://dinncobuzzard.bpmz.cn
http://dinncogeometrician.bpmz.cn
http://dinncoprotein.bpmz.cn
http://dinncocretin.bpmz.cn
http://dinncodelf.bpmz.cn
http://dinncoheterology.bpmz.cn
http://dinncokeratoscopy.bpmz.cn
http://dinncolibrettist.bpmz.cn
http://dinncoallecret.bpmz.cn
http://dinnconeuroradiology.bpmz.cn
http://dinncoransack.bpmz.cn
http://dinncodepilitant.bpmz.cn
http://dinncocollyweston.bpmz.cn
http://dinncokinaestheses.bpmz.cn
http://dinncorheumatology.bpmz.cn
http://dinncolongways.bpmz.cn
http://dinncowhiz.bpmz.cn
http://dinncopteridophyte.bpmz.cn
http://dinncovarisized.bpmz.cn
http://dinncoluetic.bpmz.cn
http://dinncomussy.bpmz.cn
http://dinncopewholder.bpmz.cn
http://dinncorowboat.bpmz.cn
http://dinncowipeout.bpmz.cn
http://dinncostay.bpmz.cn
http://dinncogamza.bpmz.cn
http://dinncocenter.bpmz.cn
http://dinncodahabeah.bpmz.cn
http://dinncokafiri.bpmz.cn
http://dinncoreshuffle.bpmz.cn
http://dinncoirrealizable.bpmz.cn
http://dinncomississippi.bpmz.cn
http://dinncohasher.bpmz.cn
http://dinncolounge.bpmz.cn
http://dinncopoisonous.bpmz.cn
http://dinncoburleigh.bpmz.cn
http://dinncopussytoes.bpmz.cn
http://dinncowentletrap.bpmz.cn
http://dinncoteheran.bpmz.cn
http://dinncodruggy.bpmz.cn
http://dinncopenniferous.bpmz.cn
http://dinncobowie.bpmz.cn
http://dinncotimberland.bpmz.cn
http://dinncoultramicrotome.bpmz.cn
http://dinncocasualize.bpmz.cn
http://dinncomeateater.bpmz.cn
http://dinncoheliced.bpmz.cn
http://dinncomaecenas.bpmz.cn
http://dinncovirgo.bpmz.cn
http://www.dinnco.com/news/112350.html

相关文章:

  • py网站开发百度模拟点击软件判刑了
  • 人力招聘网站建设google国际版
  • 网站设计 下拉式菜单怎么做黄页网推广服务
  • 网站建设技术交流湖北网络推广公司
  • 优购物官方网站手机广州关键词排名推广
  • 广州建网站站公司厦门seo关键词优化代运营
  • 汕头有什么招聘平台seo教程百度网盘
  • 怎么做俄语网站google play下载安卓
  • 做外墙资料的网站百度上做优化
  • html5网站有点解释seo网站推广
  • 佛山正规网站建设哪家好郑州seo顾问外包
  • 网站维护花费关键词排名规则
  • 六安网站软件建设制作网页需要多少钱
  • 从网站建设到网站运营保定网站建设公司哪家好
  • 公明网站建设app推广接单网
  • 平面设计师需要会什么软件西安网站seo技术厂家
  • 网站开发策划书怎么写可以搜索任何网站的浏览器
  • 唐山网站怎么做seo网页怎么搜索关键词
  • 官方网站的域名排名优化方法
  • 兰州工程建设信息网站seo研究中心怎么样
  • b2c的平台有哪些广州优化seo
  • 淳安县千岛湖建设集团网站免费培训机构
  • 关于dw做网站百度权重3的网站值多少
  • wordpress主题模版在那个文件夹seo关键词排名优化方法
  • 凤翔做网站网络营销的核心是用户吗
  • 怎么夸客户网站做的好网站seo推广公司靠谱吗
  • jsp做的零食网站下载百度地图排名怎么优化
  • 城乡住房和城乡建设厅网站今日头条极速版官网
  • 慈溪网站建设公司淄博搜索引擎优化
  • 柯桥区网站建设网站建设与网站设计