如今社会上各行各业,都喜欢用自己行业的专属软件工作,互联网发展到这个时候,人们已经发现离不开了互联网。新技术的产生,往往能解决一些老技术的弊端问题。因为传统宠物爱心组织管理系统信息管理难度大,容错率低,管理人员处理数据费工费时,所以专门为解决这个难题开发了一个宠物爱心组织管理系统管理系统,可以解决许多问题。
宠物爱心组织管理系统管理系统按照操作主体分为管理员和用户。管理员的功能包括备忘录管理、宠物管理、宠物收藏管理、宠物评价管理、宠物订单管理、字典管理、公告管理、捐赠管理、流浪管理、流浪收藏管理、流浪评价管理、流浪订单管理、单页数据管理、团队活动管理、团队活动收藏管理、团队活动评价管理、团队活动报名管理、用户管理、志愿者申请管理、管理员管理。用户的功能等。该系统采用了Mysql数据库,Java语言,Spring Boot框架等技术进行编程实现。
宠物爱心组织管理系统管理系统可以提高宠物爱心组织管理系统信息管理问题的解决效率,优化宠物爱心组织管理系统信息处理流程,保证宠物爱心组织管理系统信息数据的安全,它是一个非常可靠,非常安全的应用程序。
关键词:宠物爱心组织管理系统管理系统;志愿者申请,宠物Mysql数据库;Java语言
基于SpringBoot的宠物爱心组织管理系统源码和论文610
演示视频:
基于SpringBoot的宠物爱心组织管理系统源码和论文
表4.1备忘录表
序号 | 列名 | 数据类型 | 说明 | 允许空 |
1 | Id | Int | id | 否 |
2 | beiwanglu_name | String | 备忘录名称 | 是 |
3 | beiwanglu_uuid_number | String | 备忘录编号 | 是 |
4 | beiwanglu_content | String | 备忘录内容 | 是 |
5 | beiwanglu_delete | Integer | 逻辑删除 | 是 |
6 | insert_time | Date | 录入时间 | 是 |
7 | create_time | Date | 创建时间 | 是 |
表4.2宠物表
序号 | 列名 | 数据类型 | 说明 | 允许空 |
1 | Id | Int | id | 否 |
2 | yonghu_id | Integer | 用户 | 是 |
3 | chongwu_name | String | 宠物名称 | 是 |
4 | chongwu_uuid_number | String | 宠物编号 | 是 |
5 | chongwu_photo | String | 宠物照片 | 是 |
6 | chongwu_types | Integer | 宠物类型 | 是 |
7 | chongwu_content | String | 宠物介绍 | 是 |
8 | chongwu_delete | Integer | 逻辑删除 | 是 |
9 | insert_time | Date | 录入时间 | 是 |
10 | create_time | Date | 创建时间 | 是 |
表4.3宠物收藏表
序号 | 列名 | 数据类型 | 说明 | 允许空 |
1 | Id | Int | id | 否 |
2 | chongwu_id | Integer | 宠物 | 是 |
3 | yonghu_id | Integer | 用户 | 是 |
4 | chongwu_collection_types | Integer | 类型 | 是 |
5 | insert_time | Date | 收藏时间 | 是 |
6 | create_time | Date | 创建时间 | 是 |
表4.4宠物评价表
序号 | 列名 | 数据类型 | 说明 | 允许空 |
1 | Id | Int | id | 否 |
2 | chongwu_id | Integer | 宠物 | 是 |
3 | yonghu_id | Integer | 用户 | 是 |
4 | chongwu_commentback_text | String | 评价内容 | 是 |
5 | insert_time | Date | 评价时间 | 是 |
6 | reply_text | String | 回复内容 | 是 |
7 | update_time | Date | 回复时间 | 是 |
8 | create_time | Date | 创建时间 | 是 |
表4.5宠物订单表
序号 | 列名 | 数据类型 | 说明 | 允许空 |
1 | Id | Int | id | 否 |
2 | chongwu_order_uuid_number | String | 订单编号 | 是 |
3 | chongwu_id | Integer | 宠物 | 是 |
4 | yonghu_id | Integer | 用户 | 是 |
5 | chongwu_order_types | Integer | 订单类型 | 是 |
6 | insert_time | Date | 订单创建时间 | 是 |
7 | create_time | Date | 创建时间 | 是 |
表4.6字典表
序号 | 列名 | 数据类型 | 说明 | 允许空 |
1 | Id | Int | id | 否 |
2 | dic_code | String | 字段 | 是 |
3 | dic_name | String | 字段名 | 是 |
4 | code_index | Integer | 编码 | 是 |
5 | index_name | String | 编码名字 | 是 |
6 | super_id | Integer | 父字段id | 是 |
7 | beizhu | String | 备注 | 是 |
8 | create_time | Date | 创建时间 | 是 |
表4.7公告表
序号 | 列名 | 数据类型 | 说明 | 允许空 |
1 | Id | Int | id | 否 |
2 | gonggao_name | String | 公告名称 | 是 |
3 | gonggao_photo | String | 公告图片 | 是 |
4 | gonggao_types | Integer | 公告类型 | 是 |
5 | insert_time | Date | 发布时间 | 是 |
6 | gonggao_content | String | 公告详情 | 是 |
7 | create_time | Date | 创建时间 | 是 |
表4.8捐赠表
序号 | 列名 | 数据类型 | 说明 | 允许空 |
1 | Id | Int | id | 否 |
2 | juanzeng_uuid_number | String | 报名编号 | 是 |
3 | yonghu_id | Integer | 用户 | 是 |
4 | juanzeng_text | String | 捐赠 | 是 |
5 | new_money | BigDecimal | 金额 | 是 |
6 | insert_time | Date | 捐赠时间 | 是 |
7 | create_time | Date | 创建时间 | 是 |
表4.9流浪表
序号 | 列名 | 数据类型 | 说明 | 允许空 |
1 | Id | Int | id | 否 |
2 | liulang_name | String | 流浪名称 | 是 |
3 | liulang_uuid_number | String | 流浪编号 | 是 |
4 | liulang_photo | String | 流浪照片 | 是 |
5 | liulang_types | Integer | 流浪类型 | 是 |
6 | liulang_content | String | 流浪介绍 | 是 |
7 | liulang_delete | Integer | 逻辑删除 | 是 |
8 | insert_time | Date | 录入时间 | 是 |
9 | create_time | Date | 创建时间 | 是 |
表4.10流浪收藏表
序号 | 列名 | 数据类型 | 说明 | 允许空 |
1 | Id | Int | id | 否 |
2 | liulang_id | Integer | 流浪 | 是 |
3 | yonghu_id | Integer | 用户 | 是 |
4 | liulang_collection_types | Integer | 类型 | 是 |
5 | insert_time | Date | 收藏时间 | 是 |
6 | create_time | Date | 创建时间 | 是 |
Abstract
Nowadays, all walks of life in society like to work with their own industry-specific software. At this point in the development of the Internet, people have found that they cannot do without the Internet. The emergence of new technologies can often solve the drawbacks of some old technologies. Because the traditional personnel information management is difficult, the fault tolerance rate is low, and the management personnel is labor-intensive and time-consuming to process data, a personnel management system has been specially developed to solve this problem, which can solve many problems.
The personnel management system is divided into administrators and users according to the operating subjects. The functions of the administrator include managing employees, managing personnel information, including recruitment management, training management, reward and punishment management, salary management, etc., and can manage operators. User functions include managing department and department position information, managing recruitment information, training information, salary information, etc. The system uses Mysql database, Java language, Spring Boot framework and other technologies for programming.
The personnel management system can improve the efficiency of solving personnel information management problems, optimize the personnel information processing process, and ensure the security of personnel information data. It is a very reliable and very safe application.
Key Words:Personnel management system; Mysql database; Java language
package com.controller;
import java.util.List;
import java.util.Arrays;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import com.service.UsersService;
import org.springframework.beans.factory.annotation.Autowired;
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.RestController;
import com.annotation.IgnoreAuth;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.entity.UsersEntity;
import com.service.TokenService;
import com.utils.MPUtil;
import com.utils.PageUtils;
import com.utils.R;
/**
* 登录相关
*/
@RequestMapping("users")
@RestController
public class UsersController {
@Autowired
private UsersService usersService;
@Autowired
private TokenService tokenService;
/**
* 登录
*/
@IgnoreAuth
@PostMapping(value = "/login")
public R login(String username, String password, String captcha, HttpServletRequest request) {
UsersEntity user = usersService.selectOne(new EntityWrapper<UsersEntity>().eq("username", username));
if(user==null || !user.getPassword().equals(password)) {
return R.error("账号或密码不正确");
}
String token = tokenService.generateToken(user.getId(),username, "users", user.getRole());
R r = R.ok();
r.put("token", token);
r.put("role",user.getRole());
r.put("userId",user.getId());
return r;
}
/**
* 注册
*/
@IgnoreAuth
@PostMapping(value = "/register")
public R register(@RequestBody UsersEntity user){
// ValidatorUtils.validateEntity(user);
if(usersService.selectOne(new EntityWrapper<UsersEntity>().eq("username", user.getUsername())) !=null) {
return R.error("用户已存在");
}
usersService.insert(user);
return R.ok();
}
/**
* 退出
*/
@GetMapping(value = "logout")
public R logout(HttpServletRequest request) {
request.getSession().invalidate();
return R.ok("退出成功");
}
/**
* 修改密码
*/
@GetMapping(value = "/updatePassword")
public R updatePassword(String oldPassword, String newPassword, HttpServletRequest request) {
UsersEntity users = usersService.selectById((Integer)request.getSession().getAttribute("userId"));
if(newPassword == null){
return R.error("新密码不能为空") ;
}
if(!oldPassword.equals(users.getPassword())){
return R.error("原密码输入错误");
}
if(newPassword.equals(users.getPassword())){
return R.error("新密码不能和原密码一致") ;
}
users.setPassword(newPassword);
usersService.updateById(users);
return R.ok();
}
/**
* 密码重置
*/
@IgnoreAuth
@RequestMapping(value = "/resetPass")
public R resetPass(String username, HttpServletRequest request){
UsersEntity user = usersService.selectOne(new EntityWrapper<UsersEntity>().eq("username", username));
if(user==null) {
return R.error("账号不存在");
}
user.setPassword("123456");
usersService.update(user,null);
return R.ok("密码已重置为:123456");
}
/**
* 列表
*/
@RequestMapping("/page")
public R page(@RequestParam Map<String, Object> params,UsersEntity user){
EntityWrapper<UsersEntity> ew = new EntityWrapper<UsersEntity>();
PageUtils page = usersService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.allLike(ew, user), params), params));
return R.ok().put("data", page);
}
/**
* 列表
*/
@RequestMapping("/list")
public R list( UsersEntity user){
EntityWrapper<UsersEntity> ew = new EntityWrapper<UsersEntity>();
ew.allEq(MPUtil.allEQMapPre( user, "user"));
return R.ok().put("data", usersService.selectListView(ew));
}
/**
* 信息
*/
@RequestMapping("/info/{id}")
public R info(@PathVariable("id") String id){
UsersEntity user = usersService.selectById(id);
return R.ok().put("data", user);
}
/**
* 获取用户的session用户信息
*/
@RequestMapping("/session")
public R getCurrUser(HttpServletRequest request){
Integer id = (Integer)request.getSession().getAttribute("userId");
UsersEntity user = usersService.selectById(id);
return R.ok().put("data", user);
}
/**
* 保存
*/
@PostMapping("/save")
public R save(@RequestBody UsersEntity user){
// ValidatorUtils.validateEntity(user);
if(usersService.selectOne(new EntityWrapper<UsersEntity>().eq("username", user.getUsername())) !=null) {
return R.error("用户已存在");
}
usersService.insert(user);
return R.ok();
}
/**
* 修改
*/
@RequestMapping("/update")
public R update(@RequestBody UsersEntity user){
// ValidatorUtils.validateEntity(user);
usersService.updateById(user);//全部更新
return R.ok();
}
/**
* 删除
*/
@RequestMapping("/delete")
public R delete(@RequestBody Long[] ids){
List<UsersEntity> user = usersService.selectList(null);
if(user.size() > 1){
usersService.deleteBatchIds(Arrays.asList(ids));
}else{
return R.error("管理员最少保留一个");
}
return R.ok();
}
}
package com.controller;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Calendar;
import java.util.Map;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Date;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import com.utils.ValidatorUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.format.annotation.DateTimeFormat;
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 com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.annotation.IgnoreAuth;
import com.entity.YonghuEntity;
import com.entity.view.YonghuView;
import com.service.YonghuService;
import com.service.TokenService;
import com.utils.PageUtils;
import com.utils.R;
import com.utils.MD5Util;
import com.utils.MPUtil;
import com.utils.CommonUtil;
/**
* 用户
* 后端接口
* @author
* @email
* @date 2021-04-19 16:07:48
*/
@RestController
@RequestMapping("/yonghu")
public class YonghuController {
@Autowired
private YonghuService yonghuService;
@Autowired
private TokenService tokenService;
/**
* 登录
*/
@IgnoreAuth
@RequestMapping(value = "/login")
public R login(String username, String password, String captcha, HttpServletRequest request) {
YonghuEntity user = yonghuService.selectOne(new EntityWrapper<YonghuEntity>().eq("yonghuming", username));
if(user==null || !user.getMima().equals(password)) {
return R.error("账号或密码不正确");
}
String token = tokenService.generateToken(user.getId(), username,"yonghu", "用户" );
return R.ok().put("token", token);
}
/**
* 注册
*/
@IgnoreAuth
@RequestMapping("/register")
public R register(@RequestBody YonghuEntity yonghu){
//ValidatorUtils.validateEntity(yonghu);
YonghuEntity user = yonghuService.selectOne(new EntityWrapper<YonghuEntity>().eq("yonghuming", yonghu.getYonghuming()));
if(user!=null) {
return R.error("注册用户已存在");
}
Long uId = new Date().getTime();
yonghu.setId(uId);
yonghuService.insert(yonghu);
return R.ok();
}
/**
* 退出
*/
@RequestMapping("/logout")
public R logout(HttpServletRequest request) {
request.getSession().invalidate();
return R.ok("退出成功");
}
/**
* 获取用户的session用户信息
*/
@RequestMapping("/session")
public R getCurrUser(HttpServletRequest request){
Long id = (Long)request.getSession().getAttribute("userId");
YonghuEntity user = yonghuService.selectById(id);
return R.ok().put("data", user);
}
/**
* 密码重置
*/
@IgnoreAuth
@RequestMapping(value = "/resetPass")
public R resetPass(String username, HttpServletRequest request){
YonghuEntity user = yonghuService.selectOne(new EntityWrapper<YonghuEntity>().eq("yonghuming", username));
if(user==null) {
return R.error("账号不存在");
}
user.setMima("123456");
yonghuService.updateById(user);
return R.ok("密码已重置为:123456");
}
/**
* 后端列表
*/
@RequestMapping("/page")
public R page(@RequestParam Map<String, Object> params,YonghuEntity yonghu,
HttpServletRequest request){
EntityWrapper<YonghuEntity> ew = new EntityWrapper<YonghuEntity>();
PageUtils page = yonghuService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, yonghu), params), params));
return R.ok().put("data", page);
}
/**
* 前端列表
*/
@RequestMapping("/list")
public R list(@RequestParam Map<String, Object> params,YonghuEntity yonghu, HttpServletRequest request){
EntityWrapper<YonghuEntity> ew = new EntityWrapper<YonghuEntity>();
PageUtils page = yonghuService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, yonghu), params), params));
return R.ok().put("data", page);
}
/**
* 列表
*/
@RequestMapping("/lists")
public R list( YonghuEntity yonghu){
EntityWrapper<YonghuEntity> ew = new EntityWrapper<YonghuEntity>();
ew.allEq(MPUtil.allEQMapPre( yonghu, "yonghu"));
return R.ok().put("data", yonghuService.selectListView(ew));
}
/**
* 查询
*/
@RequestMapping("/query")
public R query(YonghuEntity yonghu){
EntityWrapper< YonghuEntity> ew = new EntityWrapper< YonghuEntity>();
ew.allEq(MPUtil.allEQMapPre( yonghu, "yonghu"));
YonghuView yonghuView = yonghuService.selectView(ew);
return R.ok("查询用户成功").put("data", yonghuView);
}
/**
* 后端详情
*/
@RequestMapping("/info/{id}")
public R info(@PathVariable("id") Long id){
YonghuEntity yonghu = yonghuService.selectById(id);
return R.ok().put("data", yonghu);
}
/**
* 前端详情
*/
@RequestMapping("/detail/{id}")
public R detail(@PathVariable("id") Long id){
YonghuEntity yonghu = yonghuService.selectById(id);
return R.ok().put("data", yonghu);
}
/**
* 后端保存
*/
@RequestMapping("/save")
public R save(@RequestBody YonghuEntity yonghu, HttpServletRequest request){
yonghu.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
//ValidatorUtils.validateEntity(yonghu);
YonghuEntity user = yonghuService.selectOne(new EntityWrapper<YonghuEntity>().eq("yonghuming", yonghu.getYonghuming()));
if(user!=null) {
return R.error("用户已存在");
}
yonghu.setId(new Date().getTime());
yonghuService.insert(yonghu);
return R.ok();
}
/**
* 前端保存
*/
@RequestMapping("/add")
public R add(@RequestBody YonghuEntity yonghu, HttpServletRequest request){
yonghu.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
//ValidatorUtils.validateEntity(yonghu);
YonghuEntity user = yonghuService.selectOne(new EntityWrapper<YonghuEntity>().eq("yonghuming", yonghu.getYonghuming()));
if(user!=null) {
return R.error("用户已存在");
}
yonghu.setId(new Date().getTime());
yonghuService.insert(yonghu);
return R.ok();
}
/**
* 修改
*/
@RequestMapping("/update")
public R update(@RequestBody YonghuEntity yonghu, HttpServletRequest request){
//ValidatorUtils.validateEntity(yonghu);
yonghuService.updateById(yonghu);//全部更新
return R.ok();
}
/**
* 删除
*/
@RequestMapping("/delete")
public R delete(@RequestBody Long[] ids){
yonghuService.deleteBatchIds(Arrays.asList(ids));
return R.ok();
}
/**
* 提醒接口
*/
@RequestMapping("/remind/{columnName}/{type}")
public R remindCount(@PathVariable("columnName") String columnName, HttpServletRequest request,
@PathVariable("type") String type,@RequestParam Map<String, Object> map) {
map.put("column", columnName);
map.put("type", type);
if(type.equals("2")) {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
Calendar c = Calendar.getInstance();
Date remindStartDate = null;
Date remindEndDate = null;
if(map.get("remindstart")!=null) {
Integer remindStart = Integer.parseInt(map.get("remindstart").toString());
c.setTime(new Date());
c.add(Calendar.DAY_OF_MONTH,remindStart);
remindStartDate = c.getTime();
map.put("remindstart", sdf.format(remindStartDate));
}
if(map.get("remindend")!=null) {
Integer remindEnd = Integer.parseInt(map.get("remindend").toString());
c.setTime(new Date());
c.add(Calendar.DAY_OF_MONTH,remindEnd);
remindEndDate = c.getTime();
map.put("remindend", sdf.format(remindEndDate));
}
}
Wrapper<YonghuEntity> wrapper = new EntityWrapper<YonghuEntity>();
if(map.get("remindstart")!=null) {
wrapper.ge(columnName, map.get("remindstart"));
}
if(map.get("remindend")!=null) {
wrapper.le(columnName, map.get("remindend"));
}
int count = yonghuService.selectCount(wrapper);
return R.ok().put("count", count);
}
}