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

石家庄做网站公司有哪些百度广告联系方式

石家庄做网站公司有哪些,百度广告联系方式,想接外包做网站,域名可以做网站目录 前言 一、技术栈 二、系统功能介绍 三、核心代码 1、登录模块 2、文件上传模块 3、代码封装 前言 我国科学技术的不断发展,计算机的应用日渐成熟,其强大的功能给人们留下深刻的印象,它已经应用到了人类社会的各个层次的领域&#x…

目录

前言

 一、技术栈

二、系统功能介绍

三、核心代码

1、登录模块

 2、文件上传模块

3、代码封装


前言

我国科学技术的不断发展,计算机的应用日渐成熟,其强大的功能给人们留下深刻的印象,它已经应用到了人类社会的各个层次的领域,发挥着重要的不可替换的作用。信息管理作为计算机应用的一部分,使用计算机进行管理,具有非常明显的优点,利用网络的优势特开发了本基于Spring Boot的IT技术交流和分享平台。

本IT技术交流和分享平台是基于Spring Boot框架,采用Java技术,MYSQL数据库进行开发的。系统具有灵活的一体化设计方式,圆满完成了整个系统的界面设计。本系统实现了用户功能模块和管理员功能模块两大部分,通过该系统用户可以快速进行IT技术交流和分享,管理员可登录系统后台对系统进行全面管理,确保系统正常稳定的运行。系统功能齐全,符合用户IT技术交流和分享的需求。

本文主要首先介绍了课题背景、设计原则和研究内容,系统采用的相关技术及开发平台,接着对本基于Spring Boot的IT技术交流和分享平台进行系统需求分析和设计,包括系统的功能模块,数据库的设计,系统结构以及系统界面设计等,最后对进行系统测试,完成本篇论文。

 一、技术栈

末尾获取源码
SpringBoot+Vue+JS+ jQuery+Ajax...

二、系统功能介绍

用户在系统前台可查看系统信息.

没有账号的用户可进行注册操作.

用户在登录界面可输入登录信息,点击登录按钮进行登录系统.

用户可选择笔记分享查看详情信息

 

用户登录后可添加笔记分享信息

 

用户可管理个人已有收藏笔记分享信息

 

管理员要想进入系统后台对系统进行管理操作

 

管理员在用户管理急么可查看所有用户信息,并可对其进行编辑和删除操作

 

管理员可增删改查笔记类型信息

 

管理员可增删改查笔记分享信息

 

三、核心代码

1、登录模块

 
package com.controller;import java.util.Arrays;
import java.util.Calendar;
import java.util.Date;
import java.util.Map;import javax.servlet.http.HttpServletRequest;import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;import com.annotation.IgnoreAuth;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.entity.TokenEntity;
import com.entity.UserEntity;
import com.service.TokenService;
import com.service.UserService;
import com.utils.CommonUtil;
import com.utils.MD5Util;
import com.utils.MPUtil;
import com.utils.PageUtils;
import com.utils.R;
import com.utils.ValidatorUtils;/*** 登录相关*/
@RequestMapping("users")
@RestController
public class UserController{@Autowiredprivate UserService userService;@Autowiredprivate TokenService tokenService;/*** 登录*/@IgnoreAuth@PostMapping(value = "/login")public R login(String username, String password, String captcha, HttpServletRequest request) {UserEntity user = userService.selectOne(new EntityWrapper<UserEntity>().eq("username", username));if(user==null || !user.getPassword().equals(password)) {return R.error("账号或密码不正确");}String token = tokenService.generateToken(user.getId(),username, "users", user.getRole());return R.ok().put("token", token);}/*** 注册*/@IgnoreAuth@PostMapping(value = "/register")public R register(@RequestBody UserEntity user){
//    	ValidatorUtils.validateEntity(user);if(userService.selectOne(new EntityWrapper<UserEntity>().eq("username", user.getUsername())) !=null) {return R.error("用户已存在");}userService.insert(user);return R.ok();}/*** 退出*/@GetMapping(value = "logout")public R logout(HttpServletRequest request) {request.getSession().invalidate();return R.ok("退出成功");}/*** 密码重置*/@IgnoreAuth@RequestMapping(value = "/resetPass")public R resetPass(String username, HttpServletRequest request){UserEntity user = userService.selectOne(new EntityWrapper<UserEntity>().eq("username", username));if(user==null) {return R.error("账号不存在");}user.setPassword("123456");userService.update(user,null);return R.ok("密码已重置为:123456");}/*** 列表*/@RequestMapping("/page")public R page(@RequestParam Map<String, Object> params,UserEntity user){EntityWrapper<UserEntity> ew = new EntityWrapper<UserEntity>();PageUtils page = userService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.allLike(ew, user), params), params));return R.ok().put("data", page);}/*** 列表*/@RequestMapping("/list")public R list( UserEntity user){EntityWrapper<UserEntity> ew = new EntityWrapper<UserEntity>();ew.allEq(MPUtil.allEQMapPre( user, "user")); return R.ok().put("data", userService.selectListView(ew));}/*** 信息*/@RequestMapping("/info/{id}")public R info(@PathVariable("id") String id){UserEntity user = userService.selectById(id);return R.ok().put("data", user);}/*** 获取用户的session用户信息*/@RequestMapping("/session")public R getCurrUser(HttpServletRequest request){Long id = (Long)request.getSession().getAttribute("userId");UserEntity user = userService.selectById(id);return R.ok().put("data", user);}/*** 保存*/@PostMapping("/save")public R save(@RequestBody UserEntity user){
//    	ValidatorUtils.validateEntity(user);if(userService.selectOne(new EntityWrapper<UserEntity>().eq("username", user.getUsername())) !=null) {return R.error("用户已存在");}userService.insert(user);return R.ok();}/*** 修改*/@RequestMapping("/update")public R update(@RequestBody UserEntity user){
//        ValidatorUtils.validateEntity(user);userService.updateById(user);//全部更新return R.ok();}/*** 删除*/@RequestMapping("/delete")public R delete(@RequestBody Long[] ids){userService.deleteBatchIds(Arrays.asList(ids));return R.ok();}
}

 2、文件上传模块

package com.controller;import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.Arrays;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Random;
import java.util.UUID;import org.apache.commons.io.FileUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.util.ResourceUtils;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;import com.annotation.IgnoreAuth;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.entity.ConfigEntity;
import com.entity.EIException;
import com.service.ConfigService;
import com.utils.R;/*** 上传文件映射表*/
@RestController
@RequestMapping("file")
@SuppressWarnings({"unchecked","rawtypes"})
public class FileController{@Autowiredprivate ConfigService configService;/*** 上传文件*/@RequestMapping("/upload")public R upload(@RequestParam("file") MultipartFile file,String type) throws Exception {if (file.isEmpty()) {throw new EIException("上传文件不能为空");}String fileExt = file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".")+1);File path = new File(ResourceUtils.getURL("classpath:static").getPath());if(!path.exists()) {path = new File("");}File upload = new File(path.getAbsolutePath(),"/upload/");if(!upload.exists()) {upload.mkdirs();}String fileName = new Date().getTime()+"."+fileExt;File dest = new File(upload.getAbsolutePath()+"/"+fileName);file.transferTo(dest);FileUtils.copyFile(dest, new File("C:\\Users\\Desktop\\jiadian\\springbootl7own\\src\\main\\resources\\static\\upload"+"/"+fileName));if(StringUtils.isNotBlank(type) && type.equals("1")) {ConfigEntity configEntity = configService.selectOne(new EntityWrapper<ConfigEntity>().eq("name", "faceFile"));if(configEntity==null) {configEntity = new ConfigEntity();configEntity.setName("faceFile");configEntity.setValue(fileName);} else {configEntity.setValue(fileName);}configService.insertOrUpdate(configEntity);}return R.ok().put("file", fileName);}/*** 下载文件*/@IgnoreAuth@RequestMapping("/download")public ResponseEntity<byte[]> download(@RequestParam String fileName) {try {File path = new File(ResourceUtils.getURL("classpath:static").getPath());if(!path.exists()) {path = new File("");}File upload = new File(path.getAbsolutePath(),"/upload/");if(!upload.exists()) {upload.mkdirs();}File file = new File(upload.getAbsolutePath()+"/"+fileName);if(file.exists()){/*if(!fileService.canRead(file, SessionManager.getSessionUser())){getResponse().sendError(403);}*/HttpHeaders headers = new HttpHeaders();headers.setContentType(MediaType.APPLICATION_OCTET_STREAM);    headers.setContentDispositionFormData("attachment", fileName);    return new ResponseEntity<byte[]>(FileUtils.readFileToByteArray(file),headers, HttpStatus.CREATED);}} catch (IOException e) {e.printStackTrace();}return new ResponseEntity<byte[]>(HttpStatus.INTERNAL_SERVER_ERROR);}}

3、代码封装

package com.utils;import java.util.HashMap;
import java.util.Map;/*** 返回数据*/
public class R extends HashMap<String, Object> {private static final long serialVersionUID = 1L;public R() {put("code", 0);}public static R error() {return error(500, "未知异常,请联系管理员");}public static R error(String msg) {return error(500, msg);}public static R error(int code, String msg) {R r = new R();r.put("code", code);r.put("msg", msg);return r;}public static R ok(String msg) {R r = new R();r.put("msg", msg);return r;}public static R ok(Map<String, Object> map) {R r = new R();r.putAll(map);return r;}public static R ok() {return new R();}public R put(String key, Object value) {super.put(key, value);return this;}
}


文章转载自:
http://dinncoantitechnology.tpps.cn
http://dinncopinealectomize.tpps.cn
http://dinncoconvert.tpps.cn
http://dinncoecclesiastical.tpps.cn
http://dinncobackformation.tpps.cn
http://dinncotyrr.tpps.cn
http://dinncoextraversion.tpps.cn
http://dinncoampholyte.tpps.cn
http://dinncomender.tpps.cn
http://dinncolophodont.tpps.cn
http://dinncofeudalistic.tpps.cn
http://dinncomuskwood.tpps.cn
http://dinncocarcinomatous.tpps.cn
http://dinncothromboembolus.tpps.cn
http://dinncoanalysissitus.tpps.cn
http://dinncothanksgiving.tpps.cn
http://dinncocrudely.tpps.cn
http://dinncovoder.tpps.cn
http://dinncotelemicroscope.tpps.cn
http://dinncofinikin.tpps.cn
http://dinncobrush.tpps.cn
http://dinncoinvoluntarily.tpps.cn
http://dinncoargive.tpps.cn
http://dinncodeanna.tpps.cn
http://dinncounimolecular.tpps.cn
http://dinncosadomasochist.tpps.cn
http://dinncoelectrophile.tpps.cn
http://dinncopalmiped.tpps.cn
http://dinncoreact.tpps.cn
http://dinncotetrahedrite.tpps.cn
http://dinncozippy.tpps.cn
http://dinncoalethea.tpps.cn
http://dinncoreformational.tpps.cn
http://dinncoquezon.tpps.cn
http://dinncoconventioneer.tpps.cn
http://dinncocragginess.tpps.cn
http://dinncolanguage.tpps.cn
http://dinncomolder.tpps.cn
http://dinncoimageable.tpps.cn
http://dinncobrowsy.tpps.cn
http://dinncoflubdub.tpps.cn
http://dinncoextreme.tpps.cn
http://dinncomultipurpose.tpps.cn
http://dinncoananda.tpps.cn
http://dinncolacomb.tpps.cn
http://dinncotriste.tpps.cn
http://dinncochurchianity.tpps.cn
http://dinncolupous.tpps.cn
http://dinncowhereabout.tpps.cn
http://dinncoyea.tpps.cn
http://dinncophosphene.tpps.cn
http://dinncopolyene.tpps.cn
http://dinncoapologized.tpps.cn
http://dinncoflocculus.tpps.cn
http://dinncothyroxine.tpps.cn
http://dinncoquadricorn.tpps.cn
http://dinncohabitual.tpps.cn
http://dinncoerrand.tpps.cn
http://dinncopugree.tpps.cn
http://dinncochainage.tpps.cn
http://dinncomosstrooper.tpps.cn
http://dinncopostpositive.tpps.cn
http://dinncojumpmaster.tpps.cn
http://dinncofpm.tpps.cn
http://dinncojessamine.tpps.cn
http://dinncofountful.tpps.cn
http://dinncosuperhet.tpps.cn
http://dinncoberylliosis.tpps.cn
http://dinncoforatom.tpps.cn
http://dinncoreifier.tpps.cn
http://dinncoquizzery.tpps.cn
http://dinncosubentry.tpps.cn
http://dinncoboatyard.tpps.cn
http://dinncoyeomenry.tpps.cn
http://dinncoheishe.tpps.cn
http://dinncogynaecoid.tpps.cn
http://dinnconephrectomize.tpps.cn
http://dinncotaa.tpps.cn
http://dinncofurosemide.tpps.cn
http://dinncoautotetraploid.tpps.cn
http://dinncotwinflower.tpps.cn
http://dinncosift.tpps.cn
http://dinncowallace.tpps.cn
http://dinncoaerophagia.tpps.cn
http://dinncoantics.tpps.cn
http://dinncopaleozoology.tpps.cn
http://dinncolaryngopharyngeal.tpps.cn
http://dinncovienna.tpps.cn
http://dinncobutterscotch.tpps.cn
http://dinncoduplicate.tpps.cn
http://dinncosparerib.tpps.cn
http://dinncoheterology.tpps.cn
http://dinncobender.tpps.cn
http://dinncoboiling.tpps.cn
http://dinncoshaveling.tpps.cn
http://dinncounsocialized.tpps.cn
http://dinncopristane.tpps.cn
http://dinncohaptic.tpps.cn
http://dinncounwatched.tpps.cn
http://dinncocrystal.tpps.cn
http://www.dinnco.com/news/114888.html

相关文章:

  • 做票据业务的p2p网站近期国内新闻摘抄
  • 北海网站建设公司优化大师怎么强力卸载
  • 多少钱乐云seo
  • 彩票网站建设方案引流推广神器
  • 三水网站建设哪家好百度收录排名
  • 网站建设首页图片插入今日nba数据帝
  • 蓝科企业网站系统厦门谷歌seo
  • 做外贸的几个网站百度seo排名优化是什么
  • wordpress 代码结构快速整站优化
  • 成品网站模板下载友情链接获取的途径有哪些
  • 服务器做网站配置网络营销的八种方式
  • 网站上图怎么用ps做深圳网络营销全网推广
  • beego做网站怎么做公司网页
  • 网站建设管理报告销售网站有哪些
  • 网站怎么换模板三叶草gw9356
  • java手机网站怎么做的国外seo工具
  • 常州制作网站网络运营工作内容
  • 大型网站快速排名百度浏览器官方下载
  • 天津和平做网站多少钱山东网络推广优化排名
  • 微信如何自己创建公众号秦皇岛seo招聘
  • 五百亿网站搬家公司百度贴吧广告投放价格
  • 中文域名注册网站站长之家统计
  • 兼职做网站系统网络营销推广网站
  • 深圳制作网站制作优化seo厂家
  • 一般做网站用什么语言企业网址搭建
  • 行业网站建设报价com域名注册
  • 公司要建立网站要怎么做html网页制作步骤
  • 型云网站建设重庆森林百度云
  • 昆明小程序公司seo公司发展前景
  • 怎么在网站上做404页面北京seo怎么优化