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

wordpress web开发教程班级优化大师官方网站

wordpress web开发教程,班级优化大师官方网站,折腾wordpress,洛阳交友网站开发公司目录 前言 一、标准信息参考 1、信息来源 二、后台基础信息的维护管理 1、实体类和Mapper类 2、业务层和控制层设计 3、前端界面实现 三、管理页面效果 1、列表管理界面 2、国家信息调整 四、总结 前言 在之前的博客中,我们基于GeoTools工具实现了全球各个…

目录

前言

一、标准信息参考

1、信息来源

二、后台基础信息的维护管理

1、实体类和Mapper类

2、业务层和控制层设计

3、前端界面实现

三、管理页面效果

1、列表管理界面

2、国家信息调整

四、总结


前言

        在之前的博客中,我们基于GeoTools工具实现了全球各个国家的空间信息和属性信息的空间入库实战。也将各个国家的基本信息进行了简单的介绍。我们先来看一下在空间数据库中,我们管理的属性信息字段,如下图所示:

        在上面的国家信息列表中,不难发现,国家的英文全称和中文全称均不是准确展示。在最原始的数据中也找不到准确的国家介绍。 为了保证数据的准确性,我们可以参考国家外交部的国家信息介绍中的相关信息进行属性信息的维护,如下图所示:

        可以点击国家名称进入到具体的信息中,看到详细的国家相关信息。然后根据国家外交部提供的相关信息来维护空间数据库中的相关字段,因此需要我们开发一个支持属性信息修改的功能,来维护属性信息的功能。

         本文即以Java开发为例,重点讲解如何在SpringBoot的环境中来维护国家信息,包括英文全称、英文简称、中文全称、中文简称、所属大洲等信息。首先介绍在官方信息中的简要信息,然后介绍如何在Java中进行信息的维护。对于想了解相关信息维护的功能设计与实现有一定的参考。

一、标准信息参考

        为了保证所依据的国家信息有标准的参考依据,这里我们采用的标准来源外交部的官方网站,因此有必要对官方网站上的关于国家的基本信息进行简单的介绍,让大家在进行相应信息维护时有指导的作用。

1、信息来源

        首先,我们在浏览上输入外交部的官方网站,外交部官方网站,在其网站的导航栏中有国家和地区一栏,点击国家(和地区),可以看到以下界面:

        可以看到,针对全球的国家信息,网站上按照所在大洲(即亚洲、非洲、欧洲、北美洲、南美洲、大洋洲)进行了细分。 在右边将展示这些大洲对应的国家信息。如果想浏览更加详细的国家信息,可以点击具体的国家名称,页面跳转到具体的国家信息,如下所示:

        在信息详情页面,就包括了国家的中文全名和英文全名等信息。当然,在这个信息详情介绍界面,我们还可以看到国家的国土面积、人口、首都、国家元首和政府首脑、重要的节日、国家简要信息等等许多关键信息(做个大胆的设想,后续我们可以基于这些详情页面做一个全方面的国家画像和知识图谱的建设)。这里暂且不深入,在后续的内容中再进行深入讲解。 在这里只需要重点关注国名这个关键信息。

二、后台基础信息的维护管理

        为了实现后台基础信息的维护和管理,我们将重点介绍维护模块。包括MVC三层架构的设计,每层的详细类和代码实现都将深入讲解。

1、实体类和Mapper类

        在之前的博客中,我们曾经讲过,国家的信息来源由两个Shp文件组成,其中有一份是有空间参考的数据,因此需要定义两个类来存储shp信息。相关的类如下图所示:

        无空间参考的类代码如下:

package com.yelang.project.extend.earthquake.domain;
import java.io.Serializable;
import java.math.BigDecimal;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
/*** - 没有设置坐标参考系的全球国家信息* @author 夜郎king*/
@Data
@AllArgsConstructor
@NoArgsConstructor
public class WorldCountriesWithNoCRS implements Serializable{private static final long serialVersionUID = 9034823653023305410L;private String name;//英文名称private String feName;//英文全称private String fcName;//国家中文名private String soc;//英文简称private BigDecimal pop = new BigDecimal("0");//人口private String geom;
}

        有空间参考的类代码如下所示:

package com.yelang.project.extend.earthquake.domain;
import java.io.Serializable;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
/*** - 设置坐标参考系的全球国家信息* @author 夜郎king*/
@Data
@AllArgsConstructor
@NoArgsConstructor
public class WorldCountriesWithCRS implements Serializable{private static final long serialVersionUID = -2200848007577967594L;private String geom;private String name;private String iso3;//简称private String continent;//所属洲,比如亚洲、美洲等private String unreg1;private Integer eu;//是否欧盟
}

        将两个shp数据合并成一个存储对象后,使用下面的对象来进行数据的存储。关键代码如下:

package com.yelang.project.extend.earthquake.domain;import java.io.Serializable;import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yelang.framework.handler.PgGeometryTypeHandler;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.ToString;
/*** - 世界国家信息* @author 夜郎king**/
@TableName(value = "biz_world_country", autoResultMap = true)
@NoArgsConstructor
@AllArgsConstructor
@Setter
@Getter
@ToString
public class WorldCountries implements Serializable{private static final long serialVersionUID = -5984870862010624612L;@TableId(value="pk_id")private Long pkId;//@TableField(value="full_english_name")private String fullEnglishName;//英文全称@TableField(value="short_english_name")private String shortEnglishName;//英文简称@TableField(value="min_english_name")private String minEnglishName;//最简名称@TableField(value="full_chinese_name")private String fullChineseName;//中文全称@TableField(value="short_chinese_name")private String shortChineseName;private String continent;//所属大洲,如:Asiaprivate String unreg;//大洲详情@TableField(typeHandler = PgGeometryTypeHandler.class)private String geom;@TableField(exist=false)private String geomJson;public WorldCountries(String fullEnglishName, String shortEnglishName, String minEnglishName,String fullChineseName, String shortChineseName, String continent, String unreg, String geom) {super();this.fullEnglishName = fullEnglishName;this.shortEnglishName = shortEnglishName;this.minEnglishName = minEnglishName;this.fullChineseName = fullChineseName;this.shortChineseName = shortChineseName;this.continent = continent;this.unreg = unreg;this.geom = geom;}
}

        为了实现数据对象的保存,我们同时还需要定义Mapper对象。同时增加一个根据国家简码查询国家信息geometry的geojson信息的方法,关键代码如下:

package com.yelang.project.extend.earthquake.mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yelang.project.extend.earthquake.domain.WorldCountries;
public interface WorldCountriesMapper extends BaseMapper<WorldCountries>{static final String FIND_GEOJSON_SQL="<script>"+ "select st_asgeojson(geom) as geomJson from biz_world_country "+ "where pk_id = #{id} "+ "</script>";@Select(FIND_GEOJSON_SQL)WorldCountries findGeoJsonById(@Param("id")Long id);
}

2、业务层和控制层设计

        为了实现国家基本信息的修改和管理。我们需要提供一个修改的方法,但是要注意的是,在进行信息的修改时,不需要修改geometry字段的信息。其实这个很简单,只需要在传入国家信息时,保持geom字符串为null即可。同时,在这里,我们需要在列表中展示国家信息,但是在展示时,不需要展示空间信息,因此,要求在接口中不查询出geom信息。因此在使用Mybatis-plus进行查询时,需要指定查询字段,核心方法如下所示:

package com.yelang.project.extend.earthquake.service.impl;
import java.util.List;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yelang.project.extend.earthquake.domain.WorldCountries;
import com.yelang.project.extend.earthquake.mapper.WorldCountriesMapper;
import com.yelang.project.extend.earthquake.service.IWorldCountriesService;
@Service
public class WorldCountriesServiceImpl extends ServiceImpl<WorldCountriesMapper, WorldCountries> implements IWorldCountriesService{@Overridepublic List<WorldCountries> selectList(WorldCountries worldCountries) {QueryWrapper<WorldCountries> queryWrapper = new QueryWrapper<WorldCountries>();if(StringUtils.isNotBlank(worldCountries.getFullChineseName())){queryWrapper.like("full_chinese_name", worldCountries.getFullChineseName());}if(StringUtils.isNotBlank(worldCountries.getFullEnglishName())) {queryWrapper.like("full_english_name", worldCountries.getFullEnglishName());}if(StringUtils.isNotBlank(worldCountries.getShortChineseName())) {queryWrapper.like("short_chinese_name", worldCountries.getShortChineseName());}queryWrapper.select(" pk_id,full_english_name,short_english_name,min_english_name,full_chinese_name,short_chinese_name,continent,unreg ");queryWrapper.orderByAsc("min_english_name");return this.baseMapper.selectList(queryWrapper);}@Overridepublic WorldCountries findGeoJsonById(Long id) {return this.baseMapper.findGeoJsonById(id);}@Overridepublic WorldCountries findByCode(String minName) {QueryWrapper<WorldCountries> queryWrapper = new QueryWrapper<WorldCountries>();queryWrapper.eq("min_english_name", minName);queryWrapper.select(" pk_id,full_english_name,short_english_name,min_english_name,full_chinese_name,short_chinese_name,continent,unreg ");return this.getOne(queryWrapper);}
}

3、前端界面实现

        前台界面我们基于Ruoyi的传统前端技术栈,主要提供一个列表查询和编辑操作按钮。关键的核心代码如下所示:

<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head><th:block th:include="include :: header('全球国家信息管理列表')" />
</head>
<body class="gray-bg"><div class="container-div"><div class="row"><div class="col-sm-12 search-collapse"><form id="formId"><div class="select-list"><ul><li><label>中文全名:</label><input type="text" name="fullChineseName"/></li><li><label>英文全名:</label><input type="text" name="fullEnglishName"/></li><li><a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a><a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a></li></ul></div></form></div><div class="btn-group-sm" id="toolbar" role="group"><a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="eq:wcountry:edit"><i class="fa fa-edit"></i> 修改</a></div><div class="col-sm-12 select-table table-striped"><table id="bootstrap-table"></table></div></div></div><th:block th:include="include :: footer" /><script th:inline="javascript">var editFlag = [[${@permission.hasPermi('eq:wcountry:edit')}]];var prefix = ctx + "eq/wcountry";$(function() {var options = {url: prefix + "/list",createUrl: prefix + "/add",updateUrl: prefix + "/edit/{id}",removeUrl: prefix + "/remove",exportUrl: prefix + "/export",modalName: "国家信息",columns: [{checkbox: true},{field: 'pkId',title: '',visible: false},{field: 'fullEnglishName',title: '英文全称'},{field: 'shortEnglishName',title: '英文简称'},{field: 'minEnglishName',title: '代号'},{field: 'fullChineseName',title: '中文全称'},{field: 'shortChineseName',title: '中文简称'},{field: 'continent',title: '所属大洲'},{title: '操作',align: 'center',formatter: function(value, row, index) {var actions = [];actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.pkId + '\')"><i class="fa fa-edit"></i>编辑</a> ');return actions.join('');}}]};$.table.init(options);});</script>
</body>
</html>

三、管理页面效果

        在进行后台的相关代码开发和前端界面的设计之后,基本就实现了我们的列表管理功能,可以展示国家的基本信息。支持按照国家英文全称、中文全称来进行检索。列表中提供编辑按钮,可以打开编辑页面,进行信息的修改和调整。

1、列表管理界面

        管理列表界面如下所示,在列表中展示英文全称、英文简称、代号、中文全称、英文简称、所属大洲等信息。在列表右上角,可以进行数据的刷新、暂时字段的设置。   

2、国家信息调整

        点击列表中的编辑按钮,打开国家基本信息修改页面,如下图所示:

        如果相关的信息不准确的话,在这里就可以进行相应信息的调整。信息调整完成后,点击确定实现信息的保存。 

四、总结

        以上就是本文的主要内容,本文即以Java开发为例,重点讲解如何在SpringBoot的环境中来维护国家信息,包括英文全称、英文简称、中文全称、中文简称、所属大洲等信息。首先介绍在官方信息中的简要信息,然后介绍如何在Java中进行信息的维护。对于想了解相关信息维护的功能设计与实现有一定的参考。行文仓促,难免有许多不足之处,如有不足,还恳请各位专家博主在评论区批评指出,不胜感激。


文章转载自:
http://masorite.fwrr.cn
http://scruff.fwrr.cn
http://kpc.fwrr.cn
http://asafoetida.fwrr.cn
http://biddability.fwrr.cn
http://unbleached.fwrr.cn
http://sender.fwrr.cn
http://interlocutor.fwrr.cn
http://sklodowskite.fwrr.cn
http://fluidise.fwrr.cn
http://firelock.fwrr.cn
http://consent.fwrr.cn
http://destructivity.fwrr.cn
http://unappealable.fwrr.cn
http://cytolysin.fwrr.cn
http://probate.fwrr.cn
http://bulb.fwrr.cn
http://syrtic.fwrr.cn
http://gumwater.fwrr.cn
http://citrange.fwrr.cn
http://slubber.fwrr.cn
http://rattlebox.fwrr.cn
http://hexaplar.fwrr.cn
http://chabuk.fwrr.cn
http://khalifat.fwrr.cn
http://centrist.fwrr.cn
http://puncher.fwrr.cn
http://venire.fwrr.cn
http://chanteuse.fwrr.cn
http://stimy.fwrr.cn
http://fortunate.fwrr.cn
http://swordstick.fwrr.cn
http://calutron.fwrr.cn
http://autotext.fwrr.cn
http://matin.fwrr.cn
http://monetarist.fwrr.cn
http://ideality.fwrr.cn
http://tripartite.fwrr.cn
http://ling.fwrr.cn
http://choky.fwrr.cn
http://boob.fwrr.cn
http://trivialness.fwrr.cn
http://knacky.fwrr.cn
http://intraventricular.fwrr.cn
http://wheelbase.fwrr.cn
http://analogize.fwrr.cn
http://lighterage.fwrr.cn
http://gam.fwrr.cn
http://adrenotropic.fwrr.cn
http://nitroaniline.fwrr.cn
http://bessemerize.fwrr.cn
http://crackpot.fwrr.cn
http://betelnut.fwrr.cn
http://miscarriage.fwrr.cn
http://ped.fwrr.cn
http://screwy.fwrr.cn
http://automotive.fwrr.cn
http://carmaker.fwrr.cn
http://reprocess.fwrr.cn
http://wardmote.fwrr.cn
http://erasmus.fwrr.cn
http://telediagnosis.fwrr.cn
http://diastema.fwrr.cn
http://untainted.fwrr.cn
http://embryo.fwrr.cn
http://imperfectible.fwrr.cn
http://surrounding.fwrr.cn
http://woops.fwrr.cn
http://winifred.fwrr.cn
http://irreproachably.fwrr.cn
http://cephaloid.fwrr.cn
http://transmissible.fwrr.cn
http://sealskin.fwrr.cn
http://beton.fwrr.cn
http://secure.fwrr.cn
http://hoofed.fwrr.cn
http://epizeuxis.fwrr.cn
http://gaffsail.fwrr.cn
http://hirudin.fwrr.cn
http://voluptuously.fwrr.cn
http://relaxant.fwrr.cn
http://sellout.fwrr.cn
http://azoturia.fwrr.cn
http://soigne.fwrr.cn
http://schlep.fwrr.cn
http://comma.fwrr.cn
http://stoppage.fwrr.cn
http://eightfold.fwrr.cn
http://npf.fwrr.cn
http://congenially.fwrr.cn
http://farceur.fwrr.cn
http://raaf.fwrr.cn
http://fora.fwrr.cn
http://valentinus.fwrr.cn
http://chimneynook.fwrr.cn
http://hippie.fwrr.cn
http://reggeism.fwrr.cn
http://atomix.fwrr.cn
http://nmr.fwrr.cn
http://hela.fwrr.cn
http://www.dt0577.cn/news/73023.html

相关文章:

  • 宁波专业做网站公司培训机构管理系统
  • 哈尔滨模板自助建站品牌营销策划公司
  • 不懂代码怎么做网站网络推广的话术怎么说
  • 帮人做网站的公司百度seo查询收录查询
  • 当当网网站内容建设的分析品牌的宣传及推广
  • 免费的海报设计网站百度查询最火的关键词
  • 陕西网站建设技术方案广告设计与制作需要学什么
  • 新网站建设流程百度人工投诉电话是多少
  • 做家居网站做网站好的网站建设公司
  • 广东网站备案系统关键词搜索热度
  • 鞋帽箱包网站建设百度seo自然优化
  • 龙岩做网站冯耀宗seo博客
  • 大连哪家科技公司做网站好淘宝推广平台有哪些
  • 宿州建设公司网站seo排名优化推荐
  • 阿里云空间做网站快速网站seo效果
  • 做业务有哪些好的网站域名批量查询
  • 做门用什么网站好搜狗网页版入口
  • 小程序微信公众平台石家庄关键词优化报价
  • 上海市工商局官网哈尔滨优化网站公司
  • wordpress nginx phpseo网站排名优化服务
  • 潍坊网站建设联系电话windows11优化大师
  • 北京做网站建设有发展吗太原百度公司地址
  • 服务器怎么直接用ip做网站山东百度推广
  • 记事本做网站背景色怎么弄seo搜索引擎优化方式
  • 应该知道的网站手机上如何制作自己的网站
  • dede企业网站带留言板后台查询seo技术306
  • 怎么建设企业网站技术培训学校机构
  • javst WordPress 主题沈阳网站关键字优化
  • 夏天做那个网站致富营销型外贸网站建设
  • 网站建设 业务员小程序推广的十种方式