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

网站htm建设5118数据分析平台

网站htm建设,5118数据分析平台,做兼职的网站,cookie做网站访问量springboot/ssm互联网智慧医院体检平台web健康体检管理系统Java代码编写 基于springboot(可改ssm)vue项目 开发语言:Java 框架:springboot/可改ssm vue JDK版本:JDK1.8(或11) 服务器:tomcat 数据库&am…

springboot/ssm互联网智慧医院体检平台web健康体检管理系统Java代码编写

基于springboot(可改ssm)+vue项目

开发语言:Java

框架:springboot/可改ssm + vue

JDK版本:JDK1.8(或11)

服务器:tomcat

数据库:mysql 5.7(或8.0)

数据库工具:Navicat/sqlyog

开发软件:eclipse/idea

依赖管理包:Maven

代码+数据库保证完整可用,可免费修改项目名以及所有代码文件日期!

可提供¥远程调试并指导运行服务~

可提供¥讲解以及修改服务,比如界面、功能、框架等等...

千套代码,欢迎带题目咨询哦~~

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.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);UserEntity u = userService.selectOne(new EntityWrapper<UserEntity>().eq("username", user.getUsername()));if(u!=null && u.getId()!=user.getId() && u.getUsername().equals(user.getUsername())) {return R.error("用户名已存在。");}userService.updateById(user);//全部更新return R.ok();}/*** 删除*/@RequestMapping("/delete")public R delete(@RequestBody Long[] ids){userService.deleteBatchIds(Arrays.asList(ids));return R.ok();}
}

http://www.dt0577.cn/news/54004.html

相关文章:

  • 漯河市建设监理协会网站seo实战培训教程
  • 自己动手做导航网站青岛seo招聘
  • 政府网站建设明细报价表需要多少钱
  • 自己做网站百度会收录教育培训机构加盟十大排名
  • 外贸建站应该怎么做微信小程序平台官网
  • 怎么做网站推广的论文seo优化方案模板
  • 网站域名如何优化网络服务平台
  • 网站建设精品课程百度网盟推广官方网站
  • 联系昆明网站建设微信小程序开发教程
  • 电子商务网站建设与管理B卷网站推广的基本方法有
  • 计算机网络编程技术江苏企业seo推广
  • 新疫情最新消息seo关键词排名优
  • 做网站要求什么条件全国最新实时大数据
  • 做网站国外访问开发一个网站的步骤流程
  • 小软件制作教程疫情优化调整
  • 政府补贴企业做网站怎样建立一个网络销售平台
  • 网站建设丨金手指谷哥14seo自学网
  • 设计师常上的网站网络安全有名的培训学校
  • 台州做网站免费建站系统
  • WordPress众筹网站主题媒体代发布
  • 怎么查看网站的空间商代写
  • 交易平台网站怎么做软文推广例子
  • 多多鱼网页模板惠州百度seo在哪
  • 沈阳室内设计公司优化快速排名教程
  • 武汉网站关键词长沙seo男团
  • 国外网站开发公司it培训机构排名前十
  • 东莞网站建设哪家好百度账户登录
  • 怎样在赶集微网站做微招聘营销策划机构
  • 西安昆奇网站建设线上渠道推广怎么做
  • 什么网站可以做调查今天的病毒感染情况