作者主页:编程指南针
作者简介:Java领域优质创作者、CSDN博客专家 、掘金特邀作者、多年架构师设计经验、腾讯课堂常驻讲师
主要内容:Java项目、毕业设计、简历模板、学习资料、面试题库、技术互助
文末获取源码
项目编号:BS-XX-151
捐赠救助系统组织管理进行信息化建设的目的主要有三点:一是信息资源是能够创造财富的;二是信息化的运用可以降低成本,提高效率;三是信息透明是捐赠救助组织的核心竞争力,有助于提高捐赠救助系统组织的公信力建设。通过网络信息的传播并透明公开,能提高公信力,并增强规范发展,同时推动捐赠救助系统服务的成效;通过信息平台建设和信息服务,有助于转变捐赠救助系统组织服务意识,救助项目执行管理方式的改变以及专业能力建设的推动,这必将成为捐赠救助系统事业发展的趋势。
随着社会的发展,捐赠救助系统组织的业务流程和服务形式的进一步优化,工作方式必然全面改造,需要彻底地向社会大众提供优质、规范、透明、公正的服务,符合国际水准的管理和服务。
如何运用现代信息技术,帮助捐赠救助系统组织,完善捐赠救助系统组织捐赠相关信息的入库、更新、检索,优化管理流程、提高效率,这些问题的研究和解决对中国捐赠救助系统组织的发展具有重要意义,同时也对其他相关组织信息化管理有示范与借鉴的作用。
本系统以使捐赠救助系统后台管理规范化信息化为宗旨,利用Java技术,采用B/S模式,实现了工作人员登录个人账号后对于捐赠过程涉及到的信息的增删改查等功能,保证了捐赠救助系统工作人员对于各种信息登记获取的及时性与便利性。且在本论文中,笔者对于小型捐赠救助系统信息管理不完善的现象,给出了一定的解决方案。
本系统主要基于Springboot开发实现一个爱心损赠管理系统,用户分为前端损赠平台使用用户和后台管理用户。前端用户注册登陆系统后可以实现在线损赚物资,查看自己损赚的物品统计情况,图形报表统计,在线发贴交流,在线许愿,个人主页等功能,后台管理员登陆系统后可以实现对捐赠信息的管理功能,以用户的管理功能,查看论坛贴子等信息管理功能。
语言环境:Java: jdk1.8
数据库:Mysql: mysql5.7
应用服务器:Tomcat: tomcat8.5.31
开发工具:IDEA或eclipse
后台开发技术:Springboot+Mybatis
前台开发技术:Layui+Ajax+Echart图形报表
前端首页

在线捐赠物品

论坛交流

爱心许愿

个人主页

用户登陆界面:前端用户可以在此进行注册登陆

用户管理

捐赠记录管理

论坛管理

留言管理

心愿管理

package com.lc.controller;import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson.JSON;
import com.lc.entity.Article;
import com.lc.entity.User;
import com.lc.service.ArticleService;
import com.lc.utils.UserContext;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;import java.util.*;/*** 文章信息控制层*/
@RestController
@RequestMapping("/article")
public class ArticleController {@AutowiredArticleService articleService;/*** 文章信息数据表格接口*/@RequestMapping(value = "/getTableData", produces = "application/json; charset=utf-8")public String getTableData(@RequestBody Article article) {Map pageDataMap = new HashMap<>(3);//默认分页参数if(article.getCurrentPage() == null || article.getLimitCount() == null){article.setCurrentPage(1);article.setLimitCount(10);}List dataList = articleService.selectList(article);for(Article a : dataList){if(!StrUtil.isBlank(a.getPicStr())){a.setCoverImg(a.getPicStr().split(",")[0]);}}Integer totalCount = articleService.selectCount(article);pageDataMap.put("code", 0);pageDataMap.put("data", dataList);pageDataMap.put("count", totalCount);return JSON.toJSONString(pageDataMap);}/*** 文章信息保存*/@RequestMapping("/saveArticle")public String saveArticle(@RequestBody Article article) {return articleService.saveArticle(article);}/*** 文章信息删除(物理删除)*/@RequestMapping("/deleteArticle")public String deleteArticle(String id) {return articleService.deletePhysical(id);}/*** 我的文章数据获取*/@RequestMapping("/selfArticle")public List selfArticle() {User currentUser = UserContext.getCurrentUser();List articleList = articleService.selectByUserId(currentUser.getId());return articleList;}/*** 根据id获取*/@RequestMapping("/getById")public Article getById(String id) {Article article = articleService.selectEntity(id);if(!StrUtil.isBlank(article.getPicStr())){List picList = new ArrayList<>(Arrays.asList(article.getPicStr().split(",")));article.setPicList(picList);}return article;}}
package com.lc.controller;import cn.hutool.core.date.DateField;
import cn.hutool.core.date.DateUtil;
import com.alibaba.fastjson.JSON;
import com.lc.entity.Donation;
import com.lc.entity.User;
import com.lc.service.DonationService;
import com.lc.utils.UserContext;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;import java.util.*;
import java.util.stream.Collectors;/*** 捐赠信息控制层*/
@RestController
@RequestMapping("/donation")
public class DonationController {@AutowiredDonationService donationService;/*** 捐赠信息数据表格接口*/@RequestMapping(value="/getTableData", produces="application/json; charset=utf-8")public String getTableData(@RequestBody Donation donation) {Map map = donationService.selectPage(donation);return JSON.toJSONString(map);}/*** 后台捐赠信息保存*/@RequestMapping("/saveDonation")public String saveDonation(@RequestBody Donation donation) {return donationService.save(donation);}/*** 前台捐赠信息保存*/@RequestMapping("/insertDonationList")public String insertDonationList(@RequestBody List list) {return donationService.insertDonationList(list);}/*** 捐赠信息删除(物理删除)*/@RequestMapping("/deleteDonation")public String deleteDonation(String id) {return donationService.deletePhysical(id);}/*** 我的捐赠记录数据获取*/@RequestMapping("/selfDonation")public List
package com.lc.controller;import cn.hutool.core.codec.Base64;
import cn.hutool.core.io.file.FileNameUtil;
import cn.hutool.core.util.IdUtil;
import com.alibaba.fastjson.JSON;
import org.springframework.stereotype.Controller;
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.multipart.MultipartFile;import java.io.File;
import java.util.*;/*** 文件上传控制层*/
@Controller
@RequestMapping("/file")
public class FileController {/*** 前缀路径(本地测试环境)*/public static String filePrePath = System.getProperty("user.dir")+ "\\src\\main\\resources\\static\\";/*** 论坛图片上传* @param file* @return*/@RequestMapping("/imagesUpload")@ResponseBodypublic String imagesUpload(@RequestParam("file") MultipartFile file){Map resultMap = new HashMap<>(4);try{//修改文件名,防止重复String filename = file.getOriginalFilename();String extName = FileNameUtil.getSuffix(filename);String newFileName = IdUtil.simpleUUID() + "." +extName;String pathString = filePrePath + "forumImg\\" + newFileName;//文件上传File f = new File(pathString);file.transferTo(f);//转base64String base64 = "data:image/"+extName+";base64," + Base64.encode(f);//回调信息resultMap.put("code",0);resultMap.put("data", newFileName);resultMap.put("baseData", base64);return JSON.toJSONString(resultMap);}catch(Exception e){e.printStackTrace();resultMap.put("code",1);return JSON.toJSONString(resultMap);}}/*** 随机获取一个默认头像*/public static String randomGetDefaultUserImg(){List userImgList = new ArrayList<>();userImgList.add("defaultOne.jpg");userImgList.add("defaultTwo.jpg");userImgList.add("defaultThree.jpg");userImgList.add("defaultFour.jpg");userImgList.add("defaultFive.jpg");Random random = new Random();return userImgList.get(random.nextInt(userImgList.size()));}}
package com.lc.controller;import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson.JSON;
import com.lc.entity.*;
import com.lc.service.*;
import com.lc.utils.UserContext;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;/*** 用户信息控制层*/
@RestController
@RequestMapping("/user")
public class UserController {@AutowiredUserService userService;@AutowiredDonationService donationService;@AutowiredArticleService articleService;@AutowiredMessageService messageService;@AutowiredWishService wishService;/*** 用户信息数据表格接口*/@RequestMapping(value="/getTableData", produces="application/json; charset=utf-8")public String getUserData(@RequestBody User user) {Map map = userService.selectPage(user);return JSON.toJSONString(map);}/*** 用户信息保存*/@RequestMapping("/saveUser")public String saveUser(@RequestBody User user) {return userService.saveUser(user);}/*** 用户删除(物理删除)*/@RequestMapping("/deleteUser")public String deleteUser(String id) {return userService.deletePhysical(id);}/*** 根据userId获取个人信息*/@RequestMapping("getPersonalInformation")public Map getPersonalInformation(String userId){Map map = new HashMap<>();if(StrUtil.isBlank(userId)){User currentUser = UserContext.getCurrentUser();userId = currentUser.getId();}//用户个人信息User user = userService.selectEntity(userId);map.put("user", user);//用户捐赠总数量List donationList = donationService.selectByUserId(userId);map.put("donationCount", donationList.stream().mapToDouble(Donation::getNumber).sum());//用户发帖数量List articleList = articleService.selectByUserId(userId);map.put("articleCount", articleList.size());//用户帖子map.put("article", articleList);//用户心愿数量List wishList = wishService.selectByUserId(userId);map.put("wishCount", wishList.size());//用户心愿map.put("wish", wishList);//用户留言数量List messageList = messageService.selectByUserId(userId);map.put("messageCount", messageList.size());//各个捐赠类别的数量Map> groupMap = donationList.stream().collect(Collectors.groupingBy(Donation::getKind));for(Map.Entry> itemGroup : groupMap.entrySet()){map.put(String.valueOf(itemGroup.getKey()), itemGroup.getValue().stream().mapToDouble(Donation::getNumber).sum());}//补零for(int i=0; i<=5; i++){if(map.get(String.valueOf(i)) == null){map.put(String.valueOf(i), 0);}}return map;}}
项目整体功能完整,前后端业务流程完备,适合做毕业设计使用。