作者:计算机学长阿伟
开发技术:SpringBoot、SSM、Vue、MySQL、ElementUI等,“文末源码”。
开发运行环境
- 开发语言:Java
- 数据库:MySQL
- 技术:SpringBoot、Vue、Mybaits Plus、ELementUI
- 工具:IDEA/Ecilpse、Navicat、Maven
源码下载地址:
https://download.csdn.net/download/weixin_53180424/89899563
一、项目简介
该项目为一个简洁明了的网站设计,旨在为用户提供便捷的导航和信息查询服务。网站首页上方设有蓝色的横幅,上面写有“欢迎光临”字样,给人以亲切感。导航栏由五个主要的功能区域组成,分别是“首页”、“党团活动”、“公告信息”、“建党资讯”和“个人中心”,每个功能区域都用红色圆圈进行标记,使得用户能够迅速识别并点击所需的功能。此外,虽然图中未明确展示,但根据“后台管理”这一文字文本,我们可以推测该网站还设有后台管理系统,供管理员进行内容更新和维护。整个网站设计简洁、直观,用户友好度高。
三、系统项目部分截图
3.1后台系统部分页面效果
3.2前台系统部分页面效果
四、部分核心代码
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.transaction.annotation.Transactional;
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.DangzhibuEntity;
import com.entity.view.DangzhibuView;
import com.service.DangzhibuService;
import com.service.TokenService;
import com.utils.PageUtils;
import com.utils.R;
import com.utils.MD5Util;
import com.utils.MPUtil;
import com.utils.CommonUtil;
import java.io.IOException;
/**
* 后端接口
*/
@RestController
@RequestMapping("/dangzhibu")
public class DangzhibuController {
@Autowired
private DangzhibuService dangzhibuService;
/**
* 后端列表
*/
@RequestMapping("/page")
public R page(@RequestParam Map<String, Object> params,DangzhibuEntity dangzhibu,
HttpServletRequest request){
EntityWrapper<DangzhibuEntity> ew = new EntityWrapper<DangzhibuEntity>();
PageUtils page = dangzhibuService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, dangzhibu), params), params));
return R.ok().put("data", page);
}
/**
* 前端列表
*/
@IgnoreAuth
@RequestMapping("/list")
public R list(@RequestParam Map<String, Object> params,DangzhibuEntity dangzhibu,
HttpServletRequest request){
EntityWrapper<DangzhibuEntity> ew = new EntityWrapper<DangzhibuEntity>();
PageUtils page = dangzhibuService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, dangzhibu), params), params));
return R.ok().put("data", page);
}
/**
* 列表
*/
@RequestMapping("/lists")
public R list( DangzhibuEntity dangzhibu){
EntityWrapper<DangzhibuEntity> ew = new EntityWrapper<DangzhibuEntity>();
ew.allEq(MPUtil.allEQMapPre( dangzhibu, "dangzhibu"));
return R.ok().put("data", dangzhibuService.selectListView(ew));
}
/**
* 查询
*/
@RequestMapping("/query")
public R query(DangzhibuEntity dangzhibu){
EntityWrapper< DangzhibuEntity> ew = new EntityWrapper< DangzhibuEntity>();
ew.allEq(MPUtil.allEQMapPre( dangzhibu, "dangzhibu"));
DangzhibuView dangzhibuView = dangzhibuService.selectView(ew);
return R.ok("查询党支部成功").put("data", dangzhibuView);
}
/**
* 后端详情
*/
@RequestMapping("/info/{id}")
public R info(@PathVariable("id") Long id){
DangzhibuEntity dangzhibu = dangzhibuService.selectById(id);
return R.ok().put("data", dangzhibu);
}
/**
* 前端详情
*/
@IgnoreAuth
@RequestMapping("/detail/{id}")
public R detail(@PathVariable("id") Long id){
DangzhibuEntity dangzhibu = dangzhibuService.selectById(id);
return R.ok().put("data", dangzhibu);
}
/**
* 后端保存
*/
@RequestMapping("/save")
public R save(@RequestBody DangzhibuEntity dangzhibu, HttpServletRequest request){
dangzhibu.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
//ValidatorUtils.validateEntity(dangzhibu);
dangzhibuService.insert(dangzhibu);
return R.ok();
}
/**
* 前端保存
*/
@RequestMapping("/add")
public R add(@RequestBody DangzhibuEntity dangzhibu, HttpServletRequest request){
dangzhibu.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
//ValidatorUtils.validateEntity(dangzhibu);
dangzhibuService.insert(dangzhibu);
return R.ok();
}
/**
* 修改
*/
@RequestMapping("/update")
@Transactional
public R update(@RequestBody DangzhibuEntity dangzhibu, HttpServletRequest request){
//ValidatorUtils.validateEntity(dangzhibu);
dangzhibuService.updateById(dangzhibu);//全部更新
return R.ok();
}
/**
* 删除
*/
@RequestMapping("/delete")
public R delete(@RequestBody Long[] ids){
dangzhibuService.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<DangzhibuEntity> wrapper = new EntityWrapper<DangzhibuEntity>();
if(map.get("remindstart")!=null) {
wrapper.ge(columnName, map.get("remindstart"));
}
if(map.get("remindend")!=null) {
wrapper.le(columnName, map.get("remindend"));
}
int count = dangzhibuService.selectCount(wrapper);
return R.ok().put("count", count);
}
}
获取源码或文档
如需对应的论文或文档,以及其他定制需求,也可以下方添加联系我。