基于SpringBoot+Redis的系统JSP+MYSQL在线相册系统照片社区
基于SpringBoot+Redis的系统JSP+MYSQL在线相册系统照片社区
1.包含源程序,数据库脚本。代码和数据库脚本都有详细注释。
2.课题设计仅供参考学习使用,可以在此基础上进行扩展完善
github,下载 https://github.com/21503882/net-photo
开发环境:
Eclipse ,MYSQL,JDK1.8,Tomcat 8.5
涉及技术点:
MVC模式、SpringBoot、Mybatis、Redis、HTML、log4j、druid、Bootstrap、
Semantic UI、Thymeleaf、JavaScript、CSS、JQUERY、Ajax等
适合学习J2EE的一段时间的熟手,代码思路清晰,注解详细,数据库用的是mysql5.1,服务器用的tomcat8.5,JDK版本1.8. 编程软件Eclispe J2EE版本。是典型MVC架构,并且前后台分离
主要功能:
/**
* @FileName: ExamineeController.java
* @Description: TODO
*
* @author
* @version V1.0
* @Date 2018年1月11日 下午11:15:29
*
*/
package com.njfu.bysj.oerts.controller;
import org.springframework.beans.factory.annotation.Autowired;
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.RestController;
import com.aliyuncs.exceptions.ClientException;
import com.njfu.bysj.oerts.bean.IdentifyLogin;
import com.njfu.bysj.oerts.entity.ExamineeEntity;
import com.njfu.bysj.oerts.entity.JsonResult;
import com.njfu.bysj.oerts.service.ExamineeService;
import com.njfu.bysj.oerts.utils.JsonUtil;
import com.njfu.bysj.oerts.utils.SmsUtil;
/**
* @ClassName: ExamineeController
* @Description: TODO
*
* @author: 徐至彦
* @date: 2018年1月11日 下午11:15:29
*
*/
@RestController
public class ExamineeController {
@Autowired
private ExamineeService examineeService;
@PostMapping("/loginbypassw")
public JsonResult loginByPassw(@RequestBody ExamineeEntity userLogin) {
if (examineeService.loginByPassw(userLogin)) {
return JsonUtil.success(examineeService.getByUserPhone(userLogin.getUserPhone()));
} else {
return JsonUtil.failed("没有对应用户数据");
}
}
@PostMapping("/registbypassw")
public JsonResult registByPassw(@RequestBody ExamineeEntity userRegist) {
if (examineeService.registByPassw(userRegist)) {
return JsonUtil.success();
} else {
return JsonUtil.failed("注册失败");
}
}
@PostMapping("/examinee/regist/identifycode")
public JsonResult registByIdentifycode(@RequestBody ExamineeEntity userRegist) {
if (examineeService.registByIdentifycode(userRegist)) {
return JsonUtil.success();
} else {
return JsonUtil.failed("注册失败");
}
}
@PostMapping("/updatebyuserphone")
public JsonResult updateByUserPhone(@RequestBody ExamineeEntity userInfo) {
if (examineeService.updateByUserPhone(userInfo)) {
return JsonUtil.success();
} else {
return JsonUtil.failed("更新用户数据失败");
}
}
@GetMapping("/countbyuserphone/{userPhone}")
public JsonResult countByUserPhone(@PathVariable String userPhone) {
return JsonUtil.success(examineeService.countByUserPhone(userPhone));
}
@GetMapping("/getbyuserphone/{userPhone}")
public JsonResult getByUserPhone(@PathVariable String userPhone) {
return JsonUtil.success(examineeService.getByUserPhone(userPhone));
}
@GetMapping("/examinee/list/all")
public JsonResult getAllExaminee() {
return JsonUtil.success(examineeService.getAllExaminee());
}
@PostMapping("/examinee/login/identifycode")
public JsonResult loginByIdentifycode(@RequestBody ExamineeEntity userLogin) throws ClientException {
String templateCode = SmsUtil.createIdentifycode();
String templateParam = "{\"code\":\"" + templateCode + "\"}";
// 发送短信
SmsUtil.sendSms(userLogin.getUserPhone(), "SMS_134105056", templateParam);
// 返回手机号和对应验证码
IdentifyLogin identify = new IdentifyLogin();
identify.setUserPhone(userLogin.getUserPhone());
identify.setCode(templateCode);
return JsonUtil.success(identify);
}
@PostMapping("/examinee/update/identifycode")
public JsonResult updatePasswByIdentifycode(@RequestBody ExamineeEntity userLogin) throws ClientException {
String templateCode = SmsUtil.createIdentifycode();
String templateParam = "{\"code\":\"" + templateCode + "\"}";
// 发送短信
SmsUtil.sendSms(userLogin.getUserPhone(), "SMS_134105057", templateParam);
// 返回手机号和对应验证码
IdentifyLogin identify = new IdentifyLogin();
identify.setUserPhone(userLogin.getUserPhone());
identify.setCode(templateCode);
return JsonUtil.success(identify);
}
@PostMapping("/examinee/update/password")
public JsonResult updatePasswByUserPhone(@RequestBody ExamineeEntity userInfo) {
examineeService.updatePasswByUserPhone(userInfo);
return JsonUtil.success();
}
@GetMapping("/examinee/get/balance/{userPhone}")
public JsonResult getBalanceByUserPhone(@PathVariable String userPhone) {
return JsonUtil.success(examineeService.getBalanceByUserPhone(userPhone));
}
}
package com.njfu.bysj.oerts.controller;
import java.io.IOException;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import org.springframework.beans.factory.annotation.Autowired;
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.RestController;
import com.njfu.bysj.oerts.bean.CompleteRegistExam;
import com.njfu.bysj.oerts.bean.ExamineeRegistInfo;
import com.njfu.bysj.oerts.entity.ExamRegistrationEntity;
import com.njfu.bysj.oerts.entity.JsonResult;
import com.njfu.bysj.oerts.service.ExamRegistrationService;
import com.njfu.bysj.oerts.utils.JsonUtil;
import freemarker.template.TemplateException;
@RestController
public class ExamRegistrationController {
@Autowired
private ExamRegistrationService examRegistrationService;
@PostMapping("/exam/registration/regist")
public JsonResult examRegistByIdCardAndExamID(@RequestBody ExamRegistrationEntity regist,
HttpServletRequest request) {
if (examRegistrationService.examRegistByIdCardAndExamID(regist, request)) {
return JsonUtil.success();
} else {
return JsonUtil.failed("报名失败");
}
}
@GetMapping("/countregist/{examId}/{idCard}")
public JsonResult countByIdCardAndExamID(@PathVariable String examId, @PathVariable String idCard) {
if (examRegistrationService.countByIdCardAndExamID(examId, idCard)) {
return JsonUtil.success();
} else {
return JsonUtil.failed("不能重复报名");
}
}
@GetMapping("/testcompletelist/{idCard}")
public JsonResult completeResgistList(@PathVariable String idCard) {
return JsonUtil.success(examRegistrationService.completeResgistList(idCard));
}
@GetMapping("/registration/payList/{idCard}/{status}")
public JsonResult getPayList(@PathVariable String idCard, @PathVariable String status) {
return JsonUtil.success(examRegistrationService.getPayList(idCard, status));
}
@PostMapping("/registration/delete")
public JsonResult deleteByIdCardAndExamID(@RequestBody ExamRegistrationEntity delete) {
if (examRegistrationService.deleteByIdCardAndExamID(delete)) {
return JsonUtil.success();
} else {
return JsonUtil.failed("删除失败");
}
}
@GetMapping("/registration/score/{admissionTicket}")
public JsonResult getScoreByAdmissionTicket(@PathVariable String admissionTicket) {
CompleteRegistExam scoreEntity = examRegistrationService.getScoreByAdmissionTicket(admissionTicket);
if (scoreEntity == null) {
return JsonUtil.failed("没有对应数据");
} else {
return JsonUtil.success(scoreEntity);
}
}
@GetMapping("/registration/score/list/{examId}")
public JsonResult getScoreEntryListById(@PathVariable String examId) {
return JsonUtil.success(examRegistrationService.getScoreEntryListById(examId));
}
@PostMapping("/registration/score/entry")
public JsonResult entryScore(@RequestBody List<ExamineeRegistInfo> scoreInfo, HttpServletRequest request)
throws IOException, TemplateException {
return JsonUtil.success(examRegistrationService.entryScore(scoreInfo, request));
}
@PostMapping("/registration/pay/update")
public JsonResult updatePayRegistration(@RequestBody CompleteRegistExam payInfo, HttpServletRequest request)
throws IOException, TemplateException {
examRegistrationService.updatePayRegistration(payInfo, request);
return JsonUtil.success();
}
@GetMapping("/registration/info/{idCard}/{examId}")
public JsonResult getCompleteResgistInfo(@PathVariable String idCard, @PathVariable String examId) {
return JsonUtil.success(examRegistrationService.getCompleteResgistInfo(idCard, examId));
}
}
- 点赞
- 收藏
- 分享
- 文章举报
- 基于springboot+redis+bootstrap+mysql开发一套属于自己的分布式springcloud云权限架构(十七)【权限架构系统(基础框架搭建)】
- 基于springboot+redis+bootstrap+mysql开发一套属于自己的分布式springcloud云权限架构(四)【构建链路调用监控系统】
- 基于springboot+bootstrap+mysql+redis搭建一套完整的权限架构【五】【编写基础代码快速生成工具】
- SpringBoot整合mybatis、shiro、redis实现基于数据库的细粒度动态权限管理系统实例
- 基于springboot+redis+bootstrap+mysql开发一套属于自己的分布式springcloud云权限架构(二)【构建实体模型】
- 基于jsp+mysql+Spring+mybatis的SSM学生管理系统eclipse源码
- 基于jsp+mysql+Spring+mybatis的SSM企业工资管理系统eclipse源码
- 基于springboot+redis+bootstrap+mysql开发一套属于自己的分布式springcloud云权限架构(十二)【权限架构生产者(菜单管理)】
- 基于springboot+bootstrap+mysql+redis搭建一套完整的权限架构【六】【引入bootstrap前端框架】
- 基于springboot+redis+bootstrap+mysql开发一套属于自己的分布式springcloud云权限架构(十四)【权限架构消费者(通用类编写)】
- 基于springboot+redis+bootstrap+mysql开发一套属于自己的分布式springcloud云权限架构(十)【权限架构生产者(用户管理)】
- 基于springboot+redis+bootstrap+mysql开发一套属于自己的分布式springcloud云权限架构(三)【构建注册中心】
- SpringBoot整合mybatis、shiro、redis实现基于数据库的细粒度动态权限管理系统实例
- SpringBoot整合mybatis、shiro、redis实现基于数据库的细粒度动态权限管理系统实例
- SpringBoot整合mybatis、shiro、redis实现基于数据库的细粒度动态权限管理系统实例
- springboot+redis+jsp学生选课管理系统
- 基于springboot+redis+bootstrap+mysql开发一套属于自己的分布式springcloud云权限架构(七)【权限架构生产者(数据字典)】
- 基于springboot+redis+bootstrap+mysql开发一套属于自己的分布式springcloud云权限架构(十一)【权限架构生产者(组织架构)】
- 基于springboot+redis+bootstrap+mysql开发一套属于自己的分布式springcloud云权限架构(一)【云架构前言】
- 基于springboot+bootstrap+mysql+redis搭建一套完整的权限架构【四】【编写基础开发工具】