Java毕业设计-基于SSM框架的小学生课外知识学习网站项目实战(附源码+论文)

大家好!我是程序猿老A,感谢您阅读本文,欢迎一键三连哦。

💞当前专栏:Java毕业设计

精彩专栏推荐👇🏻👇🏻👇🏻

🎀 Python毕业设计
🌎微信小程序毕业设计

开发环境

  • 开发语言:Java
  • 框架:ssm
  • JDK版本:JDK1.8
  • 服务器:tomcat7
  • 数据库:mysql 5.7
  • 数据库工具:Navicat12
  • 开发软件:eclipse/myeclipse/idea
  • Maven包:Maven3.3.9
  • 浏览器:谷歌浏览器

源码下载地址:

https://download.csdn.net/download/2301_76953549/89088443

论文目录

【如需全文请按文末获取联系】
在这里插入图片描述
在这里插入图片描述

一、项目简介

小学生课外知识学习网站并没有使用C/S结构,而是基于网络浏览器的方式去访问服务器,进而获取需要的数据信息,这种依靠浏览器进行数据访问的模式就是现在用得比较广泛的适用于广域网并且没有网速限制要求的B/S结构,图4.1就是开发出来的程序工作原理图。
在这里插入图片描述

二、系统设计

2.1软件功能模块设计

下图就是系统功能结构图。
在这里插入图片描述

2.2数据库设计

(1)下图就是管理员实体E-R图
在这里插入图片描述
(2)下图就是用户实体E-R图
在这里插入图片描述
(3)下图就是知识分类信息实体E-R图
在这里插入图片描述

三、系统项目部分截图

3.1用户信息管理

管理员可以查询,修改,删除用户信息。下图就是用户信息管理页面。
在这里插入图片描述

3.2知识分类管理

管理员可以对知识分类信息进行删除,查询和修改操作。下图就是知识分类管理页面。
在这里插入图片描述

3.3课外知识管理

管理员可以对课外知识进行添加,查询,修改,删除操作。下图就是课外知识管理页面。
在这里插入图片描述

3.4首页信息

用户可以在首页访问小学生课外知识学习网站方面信息,首页上面有导航栏,导航栏上面有课外知识,试卷列表,学习资讯,个人中心,后台管理等,点击导航栏课外知识可以看到很多信息,点击某个信息可以查看对应详情信息,用户登录后可以对小学生课外知识学习网站文章信息进行评论操作。下图就是首页信息页面。
在这里插入图片描述

四、部分核心代码

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.KewaizhishiEntity;
import com.entity.view.KewaizhishiView;

import com.service.KewaizhishiService;
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-22 15:48:18
 */
@RestController
@RequestMapping("/kewaizhishi")
public class KewaizhishiController {
    @Autowired
    private KewaizhishiService kewaizhishiService;
    


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

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

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

	 /**
     * 查询
     */
    @RequestMapping("/query")
    public R query(KewaizhishiEntity kewaizhishi){
        EntityWrapper< KewaizhishiEntity> ew = new EntityWrapper< KewaizhishiEntity>();
 		ew.allEq(MPUtil.allEQMapPre( kewaizhishi, "kewaizhishi")); 
		KewaizhishiView kewaizhishiView =  kewaizhishiService.selectView(ew);
		return R.ok("查询课外知识成功").put("data", kewaizhishiView);
    }
	
    /**
     * 后端详情
     */
    @RequestMapping("/info/{id}")
    public R info(@PathVariable("id") Long id){
        KewaizhishiEntity kewaizhishi = kewaizhishiService.selectById(id);
		kewaizhishi.setClicknum(kewaizhishi.getClicknum()+1);
		kewaizhishi.setClicktime(new Date());
		kewaizhishiService.updateById(kewaizhishi);
        return R.ok().put("data", kewaizhishi);
    }

    /**
     * 前端详情
     */
	@IgnoreAuth
    @RequestMapping("/detail/{id}")
    public R detail(@PathVariable("id") Long id){
        KewaizhishiEntity kewaizhishi = kewaizhishiService.selectById(id);
		kewaizhishi.setClicknum(kewaizhishi.getClicknum()+1);
		kewaizhishi.setClicktime(new Date());
		kewaizhishiService.updateById(kewaizhishi);
        return R.ok().put("data", kewaizhishi);
    }
    


    /**
     * 赞或踩
     */
    @RequestMapping("/thumbsup/{id}")
    public R thumbsup(@PathVariable("id") String id,String type){
        KewaizhishiEntity kewaizhishi = kewaizhishiService.selectById(id);
        if(type.equals("1")) {
        	kewaizhishi.setThumbsupnum(kewaizhishi.getThumbsupnum()+1);
        } else {
        	kewaizhishi.setCrazilynum(kewaizhishi.getCrazilynum()+1);
        }
        kewaizhishiService.updateById(kewaizhishi);
        return R.ok();
    }

    /**
     * 后端保存
     */
    @RequestMapping("/save")
    public R save(@RequestBody KewaizhishiEntity kewaizhishi, HttpServletRequest request){
    	kewaizhishi.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
    	//ValidatorUtils.validateEntity(kewaizhishi);

        kewaizhishiService.insert(kewaizhishi);
        return R.ok();
    }
    
    /**
     * 前端保存
     */
    @RequestMapping("/add")
    public R add(@RequestBody KewaizhishiEntity kewaizhishi, HttpServletRequest request){
    	kewaizhishi.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
    	//ValidatorUtils.validateEntity(kewaizhishi);

        kewaizhishiService.insert(kewaizhishi);
        return R.ok();
    }

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

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


		int count = kewaizhishiService.selectCount(wrapper);
		return R.ok().put("count", count);
	}
	
	/**
     * 前端智能排序
     */
	@IgnoreAuth
    @RequestMapping("/autoSort")
    public R autoSort(@RequestParam Map<String, Object> params,KewaizhishiEntity kewaizhishi, HttpServletRequest request,String pre){
        EntityWrapper<KewaizhishiEntity> ew = new EntityWrapper<KewaizhishiEntity>();
        Map<String, Object> newMap = new HashMap<String, Object>();
        Map<String, Object> param = new HashMap<String, Object>();
		Iterator<Map.Entry<String, Object>> it = param.entrySet().iterator();
		while (it.hasNext()) {
			Map.Entry<String, Object> entry = it.next();
			String key = entry.getKey();
			String newKey = entry.getKey();
			if (pre.endsWith(".")) {
				newMap.put(pre + newKey, entry.getValue());
			} else if (StringUtils.isEmpty(pre)) {
				newMap.put(newKey, entry.getValue());
			} else {
				newMap.put(pre + "." + newKey, entry.getValue());
			}
		}
		params.put("sort", "clicknum");
        
        params.put("order", "desc");
		PageUtils page = kewaizhishiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, kewaizhishi), params), params));
        return R.ok().put("data", page);
    }


}

获取源码或论文

如需对应的论文或源码,以及其他定制需求,也可以下方微❤联系。

  • 4
    点赞
  • 7
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值