java springboot驾校管理系统

开发技术:
SpringBoot+springmvc+Mybitis-Puls   mysql5.x    html ajax数据交互
开发工具:
 idea或eclipse   jdk1.8    maven
  (1)  管理员登陆
  (2)  所有学员信息列表查询
(3)所有学生考试信息
(4)学员科目一,科目二,科目三,科目四信息录入,信息列表查询
(5)学员信息录入
(6)学员缴费信息录入,缴费信息查询
(7)教练信息录入

package com.crm.CLdriving.controller;


import java.util.List;

import javax.validation.Valid;

import com.crm.CLdriving.common.PageResponse;
import com.crm.CLdriving.dto.PageReq.PageNumber;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
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.ResponseBody;

import com.alibaba.fastjson.JSON;
import com.crm.CLdriving.common.BaseResponse;
import com.crm.CLdriving.dto.req.StudentDelectReqDto;
import com.crm.CLdriving.dto.req.StudentInsertReqDto;
import com.crm.CLdriving.dto.req.StudentSelectByIdReqDto;
import com.crm.CLdriving.dto.req.StudentSelectReqDto;
import com.crm.CLdriving.dto.req.StudentUpdateReqDto;
import com.crm.CLdriving.dto.resp.StudentSelectRespDto;
import com.crm.CLdriving.enu.ResponseEnum;
import com.crm.CLdriving.po.StudentPO;
import com.crm.CLdriving.service.StudentService;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.log4j.Log4j2;

@Api(tags="学员信息管理")
@Controller
@Log4j2
@RequestMapping("student")
public class StudentController {
	
	@Autowired
	private StudentService studentService;
	
	@ApiOperation("学员信息录入接口") 
	@PostMapping(value="insert")
	@ResponseBody
	public BaseResponse<?> insert(@Valid @RequestBody StudentInsertReqDto studentInsertReqDto){
		log.info("c学员基本信息录入请求参数:"+JSON.toJSONString(studentInsertReqDto));
		return studentService.insert(studentInsertReqDto);
	}
	
	
	@ApiOperation("学员基本信息查询接口")
	@PostMapping("selectJB")
	@ResponseBody
	public PageResponse<List<StudentSelectRespDto>> selectjb(@RequestBody PageNumber pageNumber){
		return studentService.selectJB(pageNumber);
	}
	
	//筛选框 查询
	@PostMapping("selectXQ")
	@ResponseBody
	@ApiOperation("学员详细信息查询接口")
	public BaseResponse<List<StudentSelectRespDto>> selectxq(@Valid @RequestBody StudentSelectReqDto studentSelectReqDto) {
		log.info("c学员详细信息查询请求参数为:"+JSON.toJSONString(studentSelectReqDto));
		if ((studentSelectReqDto.getIdentityCard()==null || studentSelectReqDto.getIdentityCard()=="") &&
				(studentSelectReqDto.getName()==null || studentSelectReqDto.getName()=="")) {
			return BaseResponse.message(ResponseEnum.MYSXTJ);
		}
		return studentService.selectXQ(studentSelectReqDto);		
	}
	
	@PostMapping("selectById")
	@ResponseBody
	@ApiOperation("查询学员信息接口")
	public BaseResponse<StudentPO> selectById(@Valid @RequestBody StudentSelectByIdReqDto studentSelectByIdReqDto){
		return studentService.selectByid(studentSelectByIdReqDto);
	}
	
	@PostMapping("updateById")
	@ResponseBody
	@ApiOperation("更新学员信息接口")
	public BaseResponse<?> updateById(@Valid @RequestBody StudentUpdateReqDto studentUpdateReqDto) {
		log.info("c更新学员信息请求参数:"+JSON.toJSONString(studentUpdateReqDto));
		return studentService.updateByid(studentUpdateReqDto);
	}
	
	
	@PostMapping("delectByID")
	@ResponseBody
	@ApiOperation("删除学员信息接口")
	public BaseResponse<?> delectByID(@Valid @RequestBody StudentDelectReqDto studentDelectReqDto) {
		log.info("删除学员信息请求参数:"+JSON.toJSONString(studentDelectReqDto));
		return studentService.delectByid(studentDelectReqDto);
	}

}

 

package com.crm.CLdriving.controller;

import java.util.List;

import javax.validation.Valid;

import com.crm.CLdriving.common.PageResponse;
import com.crm.CLdriving.dto.PageReq.PageNumber;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
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.ResponseBody;

import com.alibaba.fastjson.JSON;
import com.crm.CLdriving.common.BaseResponse;
import com.crm.CLdriving.dto.req.CoachDeleteReqDto;
import com.crm.CLdriving.dto.req.CoachInputReqDto;
import com.crm.CLdriving.dto.req.CoachInsertReqDto;
import com.crm.CLdriving.dto.req.CoachSelOneReqDto;
import com.crm.CLdriving.dto.req.CoachUpdateReqDto;
import com.crm.CLdriving.dto.resp.CoachSelectAllRespDto;
import com.crm.CLdriving.dto.resp.CoachSelectOneRespDto;
import com.crm.CLdriving.enu.ResponseEnum;
import com.crm.CLdriving.po.CoachPO;
import com.crm.CLdriving.service.CoachService;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.log4j.Log4j2;

@Controller
@RequestMapping("coach")
@Log4j2
@Api(tags="教练信息管理")
public class CoachController {
	
	@Autowired
	private CoachService coachService;

	@PostMapping("insert")
	@ResponseBody
	@ApiOperation("录入教练信息接口")
	public BaseResponse<?> insert(@Valid @RequestBody CoachInsertReqDto coachInsertReqDto) {
		log.info(""+JSON.toJSONString(coachInsertReqDto));
		return coachService.insert(coachInsertReqDto);
	}
	
	@PostMapping("selectInput")
	@ResponseBody
	@ApiOperation("筛选框查询教练信息接口")
	public BaseResponse<List<CoachPO>> SelectInput(@RequestBody @Valid CoachInputReqDto coachInputReqDto){
		log.info("筛选框查询教练信息请求:"+JSON.toJSONString(coachInputReqDto));
		if ((coachInputReqDto.getIdentity()==null || coachInputReqDto.getIdentity()=="") &&
				(coachInputReqDto.getName()==null || coachInputReqDto.getName()=="")) {
			return BaseResponse.message(ResponseEnum.MYSXTJ);
		}
		return coachService.selectInput(coachInputReqDto);
	}
	
	@PostMapping("selectall")
	@ResponseBody
	@ApiOperation("查询 全部教练信息接口")
	public PageResponse<List<CoachSelectAllRespDto>> SelectAll(@RequestBody PageNumber pageNumber) {
		return coachService.selectall(pageNumber);
	}
	
	@PostMapping("selectone")
	@ResponseBody
	@ApiOperation("查询  教练信息接口")
	public BaseResponse<CoachSelectOneRespDto> SelectOne(@Valid @RequestBody CoachSelOneReqDto coachSelOneReqDto){
		log.info(""+JSON.toJSONString(coachSelOneReqDto));
		return coachService.selectone(coachSelOneReqDto);	
	}
	
	@PostMapping("update")
	@ResponseBody
	@ApiOperation("更新教练信息接口")
	public BaseResponse<?> update(@Valid @RequestBody CoachUpdateReqDto coachUpdateReqDto){
		log.info(""+JSON.toJSONString(coachUpdateReqDto));
		return coachService.update(coachUpdateReqDto);
	}
	
	@PostMapping("delete")
	@ResponseBody
	@ApiOperation("删除教练信息接口")
	public BaseResponse<?> Delete(@Valid @RequestBody CoachDeleteReqDto coachDeleteReqDto){
		log.info(""+JSON.toJSONString(coachDeleteReqDto));
		return coachService.delete(coachDeleteReqDto);
	}
	
}

 

package com.crm.CLdriving.controller;

import java.util.List;

import javax.validation.Valid;

import com.crm.CLdriving.common.PageResponse;
import com.crm.CLdriving.dto.PageReq.PageNumber;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
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.ResponseBody;

import com.alibaba.fastjson.JSON;
import com.crm.CLdriving.common.BaseResponse;
import com.crm.CLdriving.dto.req.CostDeleteReqDto;
import com.crm.CLdriving.dto.req.CostInsertReqDto;
import com.crm.CLdriving.dto.req.CostSelectOneReqDto;
import com.crm.CLdriving.dto.req.CostSelectXQReqDto;
import com.crm.CLdriving.dto.req.CostUpdateReqDto;
import com.crm.CLdriving.enu.ResponseEnum;
import com.crm.CLdriving.po.CostPO;
import com.crm.CLdriving.service.CostService;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.log4j.Log4j2;

@Controller
@RequestMapping("cost")
@Log4j2
@Api(tags="缴费信息管理")
public class CostController {
	
	@Autowired
	private CostService costService;
	
	@PostMapping("insert")
	@ApiOperation("录入缴费信息接口")
	@ResponseBody
	public BaseResponse<?> insert(@Valid @RequestBody CostInsertReqDto costInsertReqDto) {
		log.info("录入缴费信息请求参数"+JSON.toJSONString(costInsertReqDto));
		return costService.insert(costInsertReqDto);	
	}
	
	@PostMapping("select")
	@ApiOperation("查询缴费信息接口")
	@ResponseBody
	public PageResponse<List<CostPO>> select(@RequestBody PageNumber pageNumber) {
		return costService.selectall(pageNumber);
	}
	
	
	@PostMapping("selectXQ")
	@ApiOperation("查询一条缴费信息接口")
	@ResponseBody
	public BaseResponse<List<CostPO>> SelectXQ(@Valid @RequestBody CostSelectXQReqDto costSelectXQReqDto) {
		log.info("筛选框查询缴费信息:"+JSON.toJSONString(costSelectXQReqDto));
		if ((costSelectXQReqDto.getIdentityCard()==null || costSelectXQReqDto.getIdentityCard()=="") &&
				(costSelectXQReqDto.getName()==null || costSelectXQReqDto.getName()=="")) {
			return BaseResponse.message(ResponseEnum.MYSXTJ);
		}
		return costService.selectxq(costSelectXQReqDto);	
	}
	
	
	@PostMapping("selectone")
	@ResponseBody
	@ApiOperation("查询一条缴费信息")
	public BaseResponse<CostPO> SelectOne(@Valid @RequestBody CostSelectOneReqDto costSelectOneReqDto){
		return costService.selectone(costSelectOneReqDto);
		
	}
	
	@PostMapping("updateById")
	@ApiOperation("更新缴费信息接口")
	@ResponseBody
	public BaseResponse<?> Update(@Valid @RequestBody CostUpdateReqDto costUpdateReqDto){
		log.info("更新缴费信息请求参数为:"+JSON.toJSONString(costUpdateReqDto));
		return costService.update(costUpdateReqDto);
	}
	
	@PostMapping("deleteById")
	@ResponseBody
	@ApiOperation("删除缴费信息接口")
	public BaseResponse<?> DeleteById(@Valid @RequestBody CostDeleteReqDto costDeleteReqDto){
		return costService.deleteById(costDeleteReqDto);
		
	}
 
}

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

程序猿毕业分享网

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值