Graduation project Android student learning record and reminder management system

Development language: Java
Java development tool: JDK1.8
Back-end framework: SSM
Front-end: developed using Vue technology
Database: MySQL5.7 combined with Navicat management tool
Server: Tomcat8.5
Development software: IDEA/Eclipse
Whether it is a Maven project: Yes

Table of contents

1. Project Introduction

2. System functions

3. System project screenshots

3.1APP home page

3.2Backend management

4. Core code

4.1 Login related

4.2 Learning records

4.3 Study reminders



1. Project Introduction

The widespread application of the Internet has brought great convenience to life. Therefore, the learning record and reminder application management is combined with the current network, and Java technology is used to build the learning record and reminder application app to realize the informatization of the learning record and reminder application. This can play a significant role in further improving the development of learning record and reminder application management and enriching learning record and reminder application management experience.

The study record and reminder application app can be widely and comprehensively promoted through the Internet, so that as many users as possible can understand and be familiar with the convenience and efficiency of the study record and reminder application app. It not only provides services to the masses, but also promotes itself, allowing More people understand themselves. For learning record and reminder applications, if you have your own app, you can get better management through the system and improve your image at the same time.

The current status and trends of this app design, from the design of requirements, structure, database, etc. to the implementation of the app, are front-end and back-end implementation respectively. The content of the paper shows the development process from the aspects of system design, description, implementation, analysis, and testing. This app chooses a feasible development plan based on the actual situation, and uses the Java programming language and mysql database to realize all the functions of the app. Next, the system is tested to test whether there are loopholes in the system and test user permissions to improve the app. Finally, the app Completion meets relevant standards.

2. System functions

This learning record and reminder application management system mainly includes three functional modules, namely the student function module and the teacher function module and the administrator function module.

(1) Administrator module: Home page, personal center, student management, teacher management, learning material management, type management, learning record management, suggestion information management, homework information management, student homework management, correction information management, online consultation management, reply Information management, forum management, system management and other functions.

(2) Student APP interface: home page, study materials, homework information, forum, mine, etc. On the My page, you can manage personal center, study records, suggestion information, student homework, online consultation, my collection management, and I want to post , My Post and other functions to operate.

(3) Teacher module: Home page, personal center, learning material management, learning record management, suggestion information management, homework information management, student homework management, correction information management, online consultation management, reply information management and other functions.

3. System project screenshots

3.1APP home page

Log in. The user enters the app and enters his or her account number and password to log in to the system.

To register as a student, enter the registration page and fill in the student ID, password, confirmation password, name, gender, email, mobile phone number and other information to register.

After students log in to the system, they can perform detailed operations on the homepage, study materials, homework information, forums, mine, etc.

For learning materials, you can view the material name, material cover, type, video, key points and difficulties, job number, teacher name, release date, material introduction, material content and other information on the learning material page. You can add records, suggestions and consultations as needed.

Assignment information, on the assignment information page, you can view the assignment name, assignment cover, type, notes, job number, teacher name, release date, assignment content and other information, and perform submission operations.

Students can operate detailed information such as personal center, study records, suggestion information, student assignments, online consultation, my collection management, I want to post, and my posts on my page.

3.2Backend management

For background login, administrators and teachers can log in to the system by entering their username and password, selecting a role and clicking Login.

After the administrator logs in to the system, he can view the home page, personal center, student management, teacher management, learning material management, type management, learning record management, suggestion information management, homework information management, student homework management, correction information management, online consultation management, Reply information management, forum management, system management and other functions, and you can also perform corresponding operations on each function one by one

Student management. On the student management page, you can perform detailed operations such as index, personal account, name, gender, email, mobile phone number, photos, etc., modify or delete them.

Teacher management. On the teacher management page, you can perform detailed operations such as index, job number, teacher name, gender, email, mobile phone number, photos, etc., modify or delete them.

Learning material management. On the learning material management page, you can perform detailed operations such as index, material name, material cover, type, video, key and difficult points, job number, teacher name, release date, etc., delete operations, etc.

Learning record management, on the learning record management page, you can perform detailed operations on the index, material name, material cover, type, job number, teacher name, start time, end time, study time, student number, name, etc., delete operations, etc.

Suggestion information management. On the suggestion information management page, you can perform detailed operations on the index, data name, data cover, type, job number, teacher name, student number, name, submission date, etc., delete operations, etc.

Assignment information management, on the assignment information management page, you can perform detailed operations such as index, assignment name, assignment cover, type, notes, job number, teacher name, release date, etc., delete operations, etc.

Student homework management, on the student homework management page, you can perform detailed operations on the index, homework name, homework cover, type, job ID, teacher name, submission date, student ID, name, etc., delete operations, etc.

Correction information management. On the correction information management page, you can perform detailed operations such as index, assignment name, assignment cover, type, job ID, teacher name, submission date, student ID, name, score, etc., delete operations, etc.

Online consultation management. On the online consultation management page, you can perform detailed operations, delete operations, etc. on the index, job ID, teacher name, student ID, name, consultation date, etc.

Reply information management. On the reply information management page, you can perform detailed operations, delete operations, etc. on the index, employee ID, teacher name, student ID, name, reply date, etc.

Forum management. On the forum management page, you can conduct detailed operations such as index, post title, user name, status, etc., view comments or delete them, etc.

System management. On the carousel management page, you can perform detailed and modified operations on indexes, names, values, etc., and you can also perform detailed operations on announcement information.

4. Core code

4.1 Login related



    package com.controller;

    import java.util.Arrays;
    import java.util.Calendar;
    import java.util.Date;
    import java.util.Map;
    
    import javax.servlet.http.HttpServletRequest;
    
    import org.springframework.beans.factory.annotation.Autowired;
    import org.springframework.stereotype.Controller;
    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.ResponseBody;
    import org.springframework.web.bind.annotation.RestController;
    
    import com.annotation.IgnoreAuth;
    import com.baomidou.mybatisplus.mapper.EntityWrapper;
    import com.entity.TokenEntity;
    import com.entity.UserEntity;
    import com.service.TokenService;
    import com.service.UserService;
    import com.utils.CommonUtil;
    import com.utils.MD5Util;
    import com.utils.MPUtil;
    import com.utils.PageUtils;
    import com.utils.R;
    import com.utils.ValidatorUtils;
    
    /**
     * 登录相关
     */
    @RequestMapping("users")
    @RestController
    public class UserController{
    
    
    	
    	@Autowired
    	private UserService userService;
    	
    	@Autowired
    	private TokenService tokenService;
    
    	/**
    	 * 登录
    	 */
    	@IgnoreAuth
    	@PostMapping(value = "/login")
    	public R login(String username, String password, String captcha, HttpServletRequest request) {
    
    
    		UserEntity user = userService.selectOne(new EntityWrapper().eq("username", username));
    		if(user==null || !user.getPassword().equals(password)) {
    
    
    			return R.error("账号或密码不正确");
    		}
    		String token = tokenService.generateToken(user.getId(),username, "users", user.getRole());
    		return R.ok().put("token", token);
    	}
    	
    	/**
    	 * 注册
    	 */
    	@IgnoreAuth
    	@PostMapping(value = "/register")
    	public R register(@RequestBody UserEntity user){
    
    
    //    	ValidatorUtils.validateEntity(user);
        	if(userService.selectOne(new EntityWrapper().eq("username", user.getUsername())) !=null) {
    
    
        		return R.error("用户已存在");
        	}
            userService.insert(user);
            return R.ok();
        }
    
    	/**
    	 * 退出
    	 */
    	@GetMapping(value = "logout")
    	public R logout(HttpServletRequest request) {
    
    
    		request.getSession().invalidate();
    		return R.ok("退出成功");
    	}
    	
    	/**
         * 密码重置
         */
        @IgnoreAuth
    	@RequestMapping(value = "/resetPass")
        public R resetPass(String username, HttpServletRequest request){
    
    
        	UserEntity user = userService.selectOne(new EntityWrapper().eq("username", username));
        	if(user==null) {
    
    
        		return R.error("账号不存在");
        	}
        	user.setPassword("123456");
            userService.update(user,null);
            return R.ok("密码已重置为:123456");
        }
    	
    	/**
         * 列表
         */
        @RequestMapping("/page")
        public R page(@RequestParam Map params,UserEntity user){
    
    
            EntityWrapper ew = new EntityWrapper();
        	PageUtils page = userService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.allLike(ew, user), params), params));
            return R.ok().put("data", page);
        }
    
    	/**
         * 列表
         */
        @RequestMapping("/list")
        public R list( UserEntity user){
    
    
           	EntityWrapper ew = new EntityWrapper();
          	ew.allEq(MPUtil.allEQMapPre( user, "user")); 
            return R.ok().put("data", userService.selectListView(ew));
        }
    
        /**
         * 信息
         */
        @RequestMapping("/info/{id}")
        public R info(@PathVariable("id") String id){
    
    
            UserEntity user = userService.selectById(id);
            return R.ok().put("data", user);
        }
        
        /**
         * 获取用户的session用户信息
         */
        @RequestMapping("/session")
        public R getCurrUser(HttpServletRequest request){
    
    
        	Long id = (Long)request.getSession().getAttribute("userId");
            UserEntity user = userService.selectById(id);
            return R.ok().put("data", user);
        }
    
        /**
         * 保存
         */
        @PostMapping("/save")
        public R save(@RequestBody UserEntity user){
    
    
    //    	ValidatorUtils.validateEntity(user);
        	if(userService.selectOne(new EntityWrapper().eq("username", user.getUsername())) !=null) {
    
    
        		return R.error("用户已存在");
        	}
            userService.insert(user);
            return R.ok();
        }
    
        /**
         * 修改
         */
        @RequestMapping("/update")
        public R update(@RequestBody UserEntity user){
    
    
    //        ValidatorUtils.validateEntity(user);
            userService.updateById(user);//全部更新
            return R.ok();
        }
    
        /**
         * 删除
         */
        @RequestMapping("/delete")
        public R delete(@RequestBody Long[] ids){
    
    
            userService.deleteBatchIds(Arrays.asList(ids));
            return R.ok();
        }
    }


4.2 Learning records



    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.LunwenxinxiEntity;
    import com.entity.view.LunwenxinxiView;
    
    import com.service.LunwenxinxiService;
    import com.service.TokenService;
    import com.utils.PageUtils;
    import com.utils.R;
    import com.utils.MD5Util;
    import com.utils.MPUtil;
    import com.utils.CommonUtil;


​    
​    

    @RestController
    @RequestMapping("/lunwenxinxi")
    public class LunwenxinxiController {
    
    
        @Autowired
        private LunwenxinxiService lunwenxinxiService;


​    
​    

        /**
         * 后端列表
         */
        @RequestMapping("/page")
        public R page(@RequestParam Map params,LunwenxinxiEntity lunwenxinxi, HttpServletRequest request){
    
    
    
    		String tableName = request.getSession().getAttribute("tableName").toString();
    		if(tableName.equals("jiaoshi")) {
    
    
    			lunwenxinxi.setJiaoshigonghao((String)request.getSession().getAttribute("username"));
    		}
    		if(tableName.equals("xuesheng")) {
    
    
    			lunwenxinxi.setXuejihao((String)request.getSession().getAttribute("username"));
    		}
            EntityWrapper ew = new EntityWrapper();
    		PageUtils page = lunwenxinxiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, lunwenxinxi), params), params));
            return R.ok().put("data", page);
        }
        
        /**
         * 前端列表
         */
        @RequestMapping("/list")
        public R list(@RequestParam Map params,LunwenxinxiEntity lunwenxinxi, HttpServletRequest request){
    
    
            EntityWrapper ew = new EntityWrapper();
    		PageUtils page = lunwenxinxiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, lunwenxinxi), params), params));
            return R.ok().put("data", page);
        }
    
    	/**
         * 列表
         */
        @RequestMapping("/lists")
        public R list( LunwenxinxiEntity lunwenxinxi){
    
    
           	EntityWrapper ew = new EntityWrapper();
          	ew.allEq(MPUtil.allEQMapPre( lunwenxinxi, "lunwenxinxi")); 
            return R.ok().put("data", lunwenxinxiService.selectListView(ew));
        }
    
    	 /**
         * 查询
         */
        @RequestMapping("/query")
        public R query(LunwenxinxiEntity lunwenxinxi){
    
    
            EntityWrapper< LunwenxinxiEntity> ew = new EntityWrapper< LunwenxinxiEntity>();
     		ew.allEq(MPUtil.allEQMapPre( lunwenxinxi, "lunwenxinxi")); 
    		LunwenxinxiView lunwenxinxiView =  lunwenxinxiService.selectView(ew);
    		return R.ok("查询论文信息成功").put("data", lunwenxinxiView);
        }
    	
        /**
         * 后端详情
         */
        @RequestMapping("/info/{id}")
        public R info(@PathVariable("id") Long id){
    
    
            LunwenxinxiEntity lunwenxinxi = lunwenxinxiService.selectById(id);
            return R.ok().put("data", lunwenxinxi);
        }
    
        /**
         * 前端详情
         */
        @RequestMapping("/detail/{id}")
        public R detail(@PathVariable("id") Long id){
    
    
            LunwenxinxiEntity lunwenxinxi = lunwenxinxiService.selectById(id);
            return R.ok().put("data", lunwenxinxi);
        }


​    
​    
​    

        /**
         * 后端保存
         */
        @RequestMapping("/save")
        public R save(@RequestBody LunwenxinxiEntity lunwenxinxi, HttpServletRequest request){
    
    
        	lunwenxinxi.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
        	//ValidatorUtils.validateEntity(lunwenxinxi);
    
            lunwenxinxiService.insert(lunwenxinxi);
            return R.ok();
        }
        
        /**
         * 前端保存
         */
        @RequestMapping("/add")
        public R add(@RequestBody LunwenxinxiEntity lunwenxinxi, HttpServletRequest request){
    
    
        	lunwenxinxi.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
        	//ValidatorUtils.validateEntity(lunwenxinxi);
    
            lunwenxinxiService.insert(lunwenxinxi);
            return R.ok();
        }
    
        /**
         * 修改
         */
        @RequestMapping("/update")
        public R update(@RequestBody LunwenxinxiEntity lunwenxinxi, HttpServletRequest request){
    
    
            //ValidatorUtils.validateEntity(lunwenxinxi);
            lunwenxinxiService.updateById(lunwenxinxi);//全部更新
            return R.ok();
        }/**
         * 删除
         */
        @RequestMapping("/delete")
        public R delete(@RequestBody Long[] ids){
    
    
            lunwenxinxiService.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 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 wrapper = new EntityWrapper();
    		if(map.get("remindstart")!=null) {
    
    
    			wrapper.ge(columnName, map.get("remindstart"));
    		}
    		if(map.get("remindend")!=null) {
    
    
    			wrapper.le(columnName, map.get("remindend"));
    		}
    
    		String tableName = request.getSession().getAttribute("tableName").toString();
    		if(tableName.equals("jiaoshi")) {
    
    
    			wrapper.eq("jiaoshigonghao", (String)request.getSession().getAttribute("username"));
    		}
    		if(tableName.equals("xuesheng")) {
    
    
    			wrapper.eq("xuejihao", (String)request.getSession().getAttribute("username"));
    		}
    
    		int count = lunwenxinxiService.selectCount(wrapper);
    		return R.ok().put("count", count);
    	}


    }


4.3 Study reminders



    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.XuantixinxiEntity;
    import com.entity.view.XuantixinxiView;
    
    import com.service.XuantixinxiService;
    import com.service.TokenService;
    import com.utils.PageUtils;
    import com.utils.R;
    import com.utils.MD5Util;
    import com.utils.MPUtil;
    import com.utils.CommonUtil;@RestController
    @RequestMapping("/xuantixinxi")
    public class XuantixinxiController {
    
    
        @Autowired
        private XuantixinxiService xuantixinxiService;


​    
​    

        /**
         * 后端列表
         */
        @RequestMapping("/page")
        public R page(@RequestParam Map params,XuantixinxiEntity xuantixinxi, HttpServletRequest request){
    
    
    
    		String tableName = request.getSession().getAttribute("tableName").toString();
    		if(tableName.equals("jiaoshi")) {
    
    
    			xuantixinxi.setJiaoshigonghao((String)request.getSession().getAttribute("username"));
    		}
    		if(tableName.equals("xuesheng")) {
    
    
    			xuantixinxi.setXuejihao((String)request.getSession().getAttribute("username"));
    		}
            EntityWrapper ew = new EntityWrapper();
    		PageUtils page = xuantixinxiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, xuantixinxi), params), params));
            return R.ok().put("data", page);
        }
        
        /**
         * 前端列表
         */
        @RequestMapping("/list")
        public R list(@RequestParam Map params,XuantixinxiEntity xuantixinxi, HttpServletRequest request){
    
    
    
    		String tableName = request.getSession().getAttribute("tableName").toString();
    		if(tableName.equals("jiaoshi")) {
    
    
    			xuantixinxi.setJiaoshigonghao((String)request.getSession().getAttribute("username"));
    		}
    		if(tableName.equals("xuesheng")) {
    
    
    			xuantixinxi.setXuejihao((String)request.getSession().getAttribute("username"));
    		}
            EntityWrapper ew = new EntityWrapper();
    		PageUtils page = xuantixinxiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, xuantixinxi), params), params));
            return R.ok().put("data", page);
        }
    
    	/**
         * 列表
         */
        @RequestMapping("/lists")
        public R list( XuantixinxiEntity xuantixinxi){
    
    
           	EntityWrapper ew = new EntityWrapper();
          	ew.allEq(MPUtil.allEQMapPre( xuantixinxi, "xuantixinxi")); 
            return R.ok().put("data", xuantixinxiService.selectListView(ew));
        }
    
    	 /**
         * 查询
         */
        @RequestMapping("/query")
        public R query(XuantixinxiEntity xuantixinxi){
    
    
            EntityWrapper< XuantixinxiEntity> ew = new EntityWrapper< XuantixinxiEntity>();
     		ew.allEq(MPUtil.allEQMapPre( xuantixinxi, "xuantixinxi")); 
    		XuantixinxiView xuantixinxiView =  xuantixinxiService.selectView(ew);
    		return R.ok("查询选题信息成功").put("data", xuantixinxiView);
        }
    	
        /**
         * 后端详情
         */
        @RequestMapping("/info/{id}")
        public R info(@PathVariable("id") Long id){
    
    
            XuantixinxiEntity xuantixinxi = xuantixinxiService.selectById(id);
            return R.ok().put("data", xuantixinxi);
        }
    
        /**
         * 前端详情
         */
        @RequestMapping("/detail/{id}")
        public R detail(@PathVariable("id") Long id){
    
    
            XuantixinxiEntity xuantixinxi = xuantixinxiService.selectById(id);
            return R.ok().put("data", xuantixinxi);
        }


​    
​    
​    

        /**
         * 后端保存
         */
        @RequestMapping("/save")
        public R save(@RequestBody XuantixinxiEntity xuantixinxi, HttpServletRequest request){
    
    
        	xuantixinxi.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
        	//ValidatorUtils.validateEntity(xuantixinxi);
    
            xuantixinxiService.insert(xuantixinxi);
            return R.ok();
        }
        
        /**
         * 前端保存
         */
        @RequestMapping("/add")
        public R add(@RequestBody XuantixinxiEntity xuantixinxi, HttpServletRequest request){
    
    
        	xuantixinxi.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
        	//ValidatorUtils.validateEntity(xuantixinxi);
        	xuantixinxi.setUserid((Long)request.getSession().getAttribute("userId"));
    
            xuantixinxiService.insert(xuantixinxi);
            return R.ok();
        }
    
        /**
         * 修改
         */
        @RequestMapping("/update")
        public R update(@RequestBody XuantixinxiEntity xuantixinxi, HttpServletRequest request){
    
    
            //ValidatorUtils.validateEntity(xuantixinxi);
            xuantixinxiService.updateById(xuantixinxi);//全部更新
            return R.ok();
        }/**
         * 删除
         */
        @RequestMapping("/delete")
        public R delete(@RequestBody Long[] ids){
    
    
            xuantixinxiService.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 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 wrapper = new EntityWrapper();
    		if(map.get("remindstart")!=null) {
    
    
    			wrapper.ge(columnName, map.get("remindstart"));
    		}
    		if(map.get("remindend")!=null) {
    
    
    			wrapper.le(columnName, map.get("remindend"));
    		}
    
    		String tableName = request.getSession().getAttribute("tableName").toString();
    		if(tableName.equals("jiaoshi")) {
    
    
    			wrapper.eq("jiaoshigonghao", (String)request.getSession().getAttribute("username"));
    		}
    		if(tableName.equals("xuesheng")) {
    
    
    			wrapper.eq("xuejihao", (String)request.getSession().getAttribute("username"));
    		}
    
    		int count = xuantixinxiService.selectCount(wrapper);
    		return R.ok().put("count", count);
    	}


    }


Project acquisition:

https://gitee.com/sinonfin/L-javaWebSha/tree/master

Guess you like

Origin blog.csdn.net/WEB_DC/article/details/133346568