ssm社区管理与服务系统源码和论文

ssm社区管理与服务的设计与实现031


 开发工具:idea 
 数据库mysql5.7+
 数据库链接工具:navcat,小海豚等
  技术:ssm 

研究背景

当今时代是飞速发展的信息时代。在各行各业中离不开信息处理,这正是计算机被广泛应用于信息管理系统的环境。计算机的最大好处在于利用它能够进行信息管理。使用计算机进行信息控制,不仅提高了工作效率,而且大大的提高了其安全性。尤其对于复杂的信息管理,计算机能够充分发挥它的优越性。

对于社区管理和服务方面,虽然现在已经有利用信息技术运作社区管理和服务的例子,但大都处于起步阶段,有的仅仅是一些静态的网页设计或单纯的搬一些必需的表格上电脑,缺乏互动性,这些并没有很好的利用信息技术实现真正的社区管理和服务的自动化。因此为了解决这一问题,更好的为社区居民服务,选择开发本社区管理与服务系统。

在互联网的迅速发展下,局域网的普及,为建立社区管理与服务系统的设计与实现提供了基础条件。社区管理与服务系统与传统的社区管理与服务方式相比,有着无法比拟的优点,网络共享、传播速度快的特点,社区居民可以随时随地进入系统查询所需信息,同时管理员可通过计算机可对系统相关信息进行全面管理,更好的为广大社区居民服务。

研究现状

随着计算机的普及,信息技术也得到了空前的发展,计算机应用的领域也越来越广泛。提高处理事情的效率也已经成为了各行各业所追求的目标。

在国外,由于计算机发展的比较早,信息技术发展相比于国内更加快速,况且国外对于计算机系统应用的也是广泛。在国外社区管理与服务系统很早就已经开始进行实施了,而且效果相当不错。由于国外应用社区管理与服务系统的时间很长,所以使得他们在实际的工作中发现了计算机系统的不足之处,并将这些不足之处进行弥补。也是通过这些不足之出,国外的研究人员也逐渐制定了完善的规则和标准。并将其应用到社区管理与服务系统中。使得软件系统技术得到了长足的发展。

在国内,计算机普及的时间比较短,信息技术发展的还不是很完善,对于计算机信息应用的也不是很多,对计算机系统了解还不是透彻,导致计算机系统在实际应用中的实际效果与预期效果大相径庭,国内缺少的是解决计算机系统出现的问题的经验,因为对计算机系统的应用太少,国内缺少的是解决计算机系统所产生的问题的经验,想要社区管理与服务系统方面的研究水平得到提高,就要多遇到问题,然后解决问题,这样积累经验的速度才是最快的。

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.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.ShequyonghuEntity;
import com.entity.view.ShequyonghuView;

import com.service.ShequyonghuService;
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-02-27 15:35:54
 */
@RestController
@RequestMapping("/shequyonghu")
public class ShequyonghuController {
    @Autowired
    private ShequyonghuService shequyonghuService;
    
	@Autowired
	private TokenService tokenService;
	
	/**
	 * 登录
	 */
	@IgnoreAuth
	@RequestMapping(value = "/login")
	public R login(String username, String password, String captcha, HttpServletRequest request) {
		ShequyonghuEntity user = shequyonghuService.selectOne(new EntityWrapper<ShequyonghuEntity>().eq("yonghuzhanghao", username));
		if(user==null || !user.getMima().equals(password)) {
			return R.error("账号或密码不正确");
		}
		String token = tokenService.generateToken(user.getId(), username,"shequyonghu",  "社区用户" );
		return R.ok().put("token", token);
	}
	
	/**
     * 注册
     */
	@IgnoreAuth
    @RequestMapping("/register")
    public R register(@RequestBody ShequyonghuEntity shequyonghu){
    	//ValidatorUtils.validateEntity(shequyonghu);
    	ShequyonghuEntity user = shequyonghuService.selectOne(new EntityWrapper<ShequyonghuEntity>().eq("yonghuzhanghao", shequyonghu.getYonghuzhanghao()));
		if(user!=null) {
			return R.error("注册用户已存在");
		}
		Long uId = new Date().getTime();
		shequyonghu.setId(uId);
        shequyonghuService.insert(shequyonghu);
        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");
        ShequyonghuEntity user = shequyonghuService.selectById(id);
        return R.ok().put("data", user);
    }
    
    /**
     * 密码重置
     */
    @IgnoreAuth
	@RequestMapping(value = "/resetPass")
    public R resetPass(String username, HttpServletRequest request){
    	ShequyonghuEntity user = shequyonghuService.selectOne(new EntityWrapper<ShequyonghuEntity>().eq("yonghuzhanghao", username));
    	if(user==null) {
    		return R.error("账号不存在");
    	}
        user.setMima("123456");
        shequyonghuService.updateById(user);
        return R.ok("密码已重置为:123456");
    }


    /**
     * 后端列表
     */
    @RequestMapping("/page")
    public R page(@RequestParam Map<String, Object> params,ShequyonghuEntity shequyonghu, HttpServletRequest request){

        EntityWrapper<ShequyonghuEntity> ew = new EntityWrapper<ShequyonghuEntity>();
    	PageUtils page = shequyonghuService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, shequyonghu), params), params));
		request.setAttribute("data", page);
        return R.ok().put("data", page);
    }
    
    /**
     * 前端列表
     */
    @RequestMapping("/list")
    public R list(@RequestParam Map<String, Object> params,ShequyonghuEntity shequyonghu, HttpServletRequest request){
        EntityWrapper<ShequyonghuEntity> ew = new EntityWrapper<ShequyonghuEntity>();
    	PageUtils page = shequyonghuService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, shequyonghu), params), params));
		request.setAttribute("data", page);
        return R.ok().put("data", page);
    }

	/**
     * 列表
     */
    @RequestMapping("/lists")
    public R list( ShequyonghuEntity shequyonghu){
       	EntityWrapper<ShequyonghuEntity> ew = new EntityWrapper<ShequyonghuEntity>();
      	ew.allEq(MPUtil.allEQMapPre( shequyonghu, "shequyonghu")); 
        return R.ok().put("data", shequyonghuService.selectListView(ew));
    }

	 /**
     * 查询
     */
    @RequestMapping("/query")
    public R query(ShequyonghuEntity shequyonghu){
        EntityWrapper< ShequyonghuEntity> ew = new EntityWrapper< ShequyonghuEntity>();
 		ew.allEq(MPUtil.allEQMapPre( shequyonghu, "shequyonghu")); 
		ShequyonghuView shequyonghuView =  shequyonghuService.selectView(ew);
		return R.ok("查询社区用户成功").put("data", shequyonghuView);
    }
	
    /**
     * 后端详情
     */
    @RequestMapping("/info/{id}")
    public R info(@PathVariable("id") Long id){
        ShequyonghuEntity shequyonghu = shequyonghuService.selectById(id);
        return R.ok().put("data", shequyonghu);
    }

    /**
     * 前端详情
     */
    @RequestMapping("/detail/{id}")
    public R detail(@PathVariable("id") Long id){
        ShequyonghuEntity shequyonghu = shequyonghuService.selectById(id);
        return R.ok().put("data", shequyonghu);
    }
    



    /**
     * 后端保存
     */
    @RequestMapping("/save")
    public R save(@RequestBody ShequyonghuEntity shequyonghu, HttpServletRequest request){
    	shequyonghu.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
    	//ValidatorUtils.validateEntity(shequyonghu);
    	ShequyonghuEntity user = shequyonghuService.selectOne(new EntityWrapper<ShequyonghuEntity>().eq("yonghuzhanghao", shequyonghu.getYonghuzhanghao()));
		if(user!=null) {
			return R.error("用户已存在");
		}

		shequyonghu.setId(new Date().getTime());
        shequyonghuService.insert(shequyonghu);
        return R.ok();
    }
    
    /**
     * 前端保存
     */
    @RequestMapping("/add")
    public R add(@RequestBody ShequyonghuEntity shequyonghu, HttpServletRequest request){
    	shequyonghu.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
    	//ValidatorUtils.validateEntity(shequyonghu);
    	ShequyonghuEntity user = shequyonghuService.selectOne(new EntityWrapper<ShequyonghuEntity>().eq("yonghuzhanghao", shequyonghu.getYonghuzhanghao()));
		if(user!=null) {
			return R.error("用户已存在");
		}

		shequyonghu.setId(new Date().getTime());
        shequyonghuService.insert(shequyonghu);
        return R.ok();
    }

    /**
     * 修改
     */
    @RequestMapping("/update")
    public R update(@RequestBody ShequyonghuEntity shequyonghu, HttpServletRequest request){
        //ValidatorUtils.validateEntity(shequyonghu);
        shequyonghuService.updateById(shequyonghu);//全部更新
        return R.ok();
    }
    

    /**
     * 删除
     */
    @RequestMapping("/delete")
    public R delete(@RequestBody Long[] ids){
        shequyonghuService.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<ShequyonghuEntity> wrapper = new EntityWrapper<ShequyonghuEntity>();
		if(map.get("remindstart")!=null) {
			wrapper.ge(columnName, map.get("remindstart"));
		}
		if(map.get("remindend")!=null) {
			wrapper.le(columnName, map.get("remindend"));
		}


		int count = shequyonghuService.selectCount(wrapper);
		return R.ok().put("count", count);
	}
	
	


}

 

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mfbz.cn/a/79185.html

如若内容造成侵权/违法违规/事实不符,请联系我们进行投诉反馈qq邮箱809451989@qq.com,一经查实,立即删除!

相关文章

安装和配置 Ansible

安装和配置 Ansible 按照下方所述&#xff0c;在控制节点 control.area12.example.com 上安装和配置 Ansible&#xff1a; 安装所需的软件包 创建名为 /home/curtis/ansible/inventory 的静态清单文件&#xff0c;以满足以下要求&#xff1a; node1 是 dev 主机组的成员 node2 …

MYSQL 作业三

创建一个student表格&#xff1a; create table student( id int(10) not null unique primary key, name varchar(20) not null, sex varchar(4), birth year, department varchar(20), address varchar(50) ); 创建一个score表格 create table score( id int(10) n…

开发测试框架一 - 创建springboot工程及基础操作

一、创建及运行方式 1. 从官网导入&#xff1a; 注意&#xff1a;由于我的java版本是1.8&#xff1b;所以选中了spring2.7.14&#xff1b;如果你的java版本是9及以上&#xff0c;选中spring3相关的同时Java 版本也要对应起来 2. 创建第一个get请求 创建Controller package及…

opencv实战项目 手势识别-手势控制鼠标

手势识别系列文章目录 手势识别是一种人机交互技术&#xff0c;通过识别人的手势动作&#xff0c;从而实现对计算机、智能手机、智能电视等设备的操作和控制。 1. opencv实现手部追踪&#xff08;定位手部关键点&#xff09; 2.opencv实战项目 实现手势跟踪并返回位置信息&…

2019年9月全国计算机等级考试真题(C语言二级)

2019年9月全国计算机等级考试真题&#xff08;C语言二级&#xff09; 第1题 1、“商品”与“顾客”两个实体集之间的联系一般是 A. 一对一 B. 一对多 C. 多对一 D. 多对多 正确答案&#xff1a;D 第2题 定义学生选修课程的关系模式&#xff1a;SC&#xff08;S#&#xff0c…

.netcore grpc双向流方法详解

一、双向流处理概述 简单来讲客户端可以向服务端发送消息流&#xff0c;服务端也可以向客户端传输响应流&#xff0c;即客户端和服务端可以互相通讯客户端无需发送消息即可开始双向流式处理调用 。 客户端可选择使用 RequestStream.WriteAsync 发送消息。 使用 ResponseStream…

Golang 基础语法问答

使用值为 nil 的 slice、map 会发生什么&#xff1f; 允许对值为 nil 的 slice 添加元素&#xff0c;但是对值为 nil 的 map 添加元素时会造成运行时 panic。 // map错误示例 func main() {var m map[string]intm["one"] 1 // error: panic: assignment to entry …

(5)所有角色数据分析页面的构建-5

所有角色数据分析页面&#xff0c;包括一个时间轴柱状图、六个散点图、六个柱状图(每个属性角色的生命值/防御力/攻击力的max与min的对比)。 """绘图""" from pyecharts.charts import Timeline from find_type import FindType import pandas …

特殊链表(循环单链表,循环双链表,静态链表)

目录 1.循环单链表的初始化 2.循环双链表 3. 静态链表 (1)静态链表的初始化 (2)静态链表的插入 1.循环单链表的初始化 typedef int ElemType; typedef struct LNode{ElemType data;struct LNode *next;}LNode,*LinkList;bool InitList(LinkList &L) {L(LNode*)malloc(…

微服务基础概念【内含图解】

目录 拓展补充&#xff1a; 单体架构 分布式架构 面向服务的体系结构 云原生 微服务架构 什么是微服务&#xff1f; 微服务定义 拓展补充&#xff1a; 单体架构 单体架构&#xff1a;将业务的所有功能集中在一个项目中开发&#xff0c;最终打成一个包部署 优点&#x…

Zabbix-6.4.4 邮箱告警SMS告警配置

目录 ​------------------------- # 邮箱告警 ---------------------------------- 1.安装mailx与postfix软件包 2.修改mailx配置文件 3. 创建文件夹 4. 编写mail-send.sh脚本 5. 将该脚本赋予执行权限 6. 进入web界面进行设置—> Alerts —> Media Types 7. 添…

uniapp小程序实现上传图片功能,并显示上传进度

效果图&#xff1a; 实现方法&#xff1a; 一、通过uni.chooseMedia(OBJECT)方法&#xff0c;拍摄或从手机相册中选择图片或视频。 官方文档链接: https://uniapp.dcloud.net.cn/api/media/video.html#choosemedia uni.chooseMedia({count: 9,mediaType: [image,video],so…

Apache-DBUtils

目录 封装方法 引出dbutils 案例 当关闭connection后&#xff0c;resultset结果集就无法使用了&#xff0c;这就使得resultset不利于数据的管理 封装方法 我们可以将结果集先存储在一个集合中&#xff0c;当connection关闭后&#xff0c;我们可以通过访问集合来访问结果集 …

7.11 Java方法重写

7.11 Java方法重写 这里首先要确定的是重写跟属性没有关系&#xff0c;重写都是方法的重写&#xff0c;与属性无关 带有关键字Static修饰的方法的重写实例 父类实例 package com.baidu.www.oop.demo05;public class B {public static void test(){System.out.println("这…

C++--红黑树

1.什么是红黑树 红黑树&#xff0c;是一种二叉搜索树&#xff0c;但在每个结点上增加一个存储位表示结点的颜色&#xff0c;可以是Red或Black。 通过对任何一条从根到叶子的路径上各个结点着色方式的限制&#xff0c;红黑树确保没有一条路径会比其他路径长出俩倍&#xff0c;因…

【Java转Go】快速上手学习笔记(二)之基础篇一

目录 创建项目数据类型变量常量类型转换计数器键盘交互流程控制代码运算符 创建项目 上篇我们安装好了Go环境&#xff0c;和用IDEA安装Go插件来开发Go项目&#xff1a;【Java转Go】快速上手学习笔记&#xff08;一&#xff09;之环境安装篇 。 这篇我们开始正式学习Go语言。我…

【新知测评实验室】解谜扫描全能王——“智能高清滤镜”黑科技

目录 一、“智能高清滤镜” 原理分析1.1、智能扫描引擎AI-Scan功能拆解1.1.1、**图像感知**1.1.2、场景化决策 1.2、版面还原与识别技术分析1.2.1、元素检测和识别1.2.2、元素聚合1.2.3、版面识别 二、深度测评——“智能高清滤镜”功能2.1、图像处理方面2.2、摩尔纹去除方面2.…

【C++类和对象】类有哪些默认成员函数呢?(下)

文章目录 一、类的6个默认成员函数二、日期类的实现2.1 运算符重载部分2.2 日期之间的运算2.3 整体代码1.Date.h部分2. Date.cpp部分 三. const成员函数四. 取地址及const取地址操作符重载扩展内容 总结 ヾ(๑╹◡╹)&#xff89;" 人总要为过去的懒惰而付出代价ヾ(๑╹◡…

ffmepg滤镜

代码实现&#xff1a; 1.get_format() 这个是QSV硬件解码时的回调函数&#xff0c;在这里初始化hw_frames_ctx, get_format会在解码时被调用。因此对滤镜的初始化init_filter()应在得到第一帧数据后调用。 2.hw_frames_ctx&#xff0c;需要按照要求把他们传给对应的filter 3.然…

向量数据库 Milvus Cloud Partition Key:租户数量多,单个租户数据少的三种解决方案

三种解决方案 这个问题提出的时候,Milvus 的最新版本是 2.2.8,我们做个角色互换,在当时站在这个用户的角度,留在我们面前的选择有这么几个: 为每个租户创建一个 collection 为每个租户创建一个 partition 创建一个租户名称的标量字段 接下来,我们依次分析下这三种方案的可…
最新文章