功能介绍
管理员登录系统后,可以对首页,个人中心,用户管理,公告信息管理,车位信息管理,入场信息管理,出场信息管理,统计收入管理等功能进行相应的操作。
用户管理,在用户管理页面可以对索引,用户账号,用户姓名,性别,联系方式,车牌号码,头像等内容进行详情,修改或删除等操作。
公告信息管理,在公告信息管理页面可以对索索引,标题,封面,发布日期等内容进行详情,修改和删除等操作。
车位信息管理,在车位信息管理页面可以对索引,车位编号,车位名称,车位图片,车位类型,车位位置,车位状态,车位价格等内容进行详情,修改或删除等操作。
入场信息管理,在入场信息管理页面可以对索引,车位编号,车位名称,车位类型,车位位置,用户账号,用户姓名,车牌号码,车位价格,入场时间等内容进行详情,出场,修改和删除等操作
等等......
部分功能模块代码
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.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.CheweixinxiEntity;
import com.entity.view.CheweixinxiView;
import com.service.CheweixinxiService;
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;
/**
* 车位信息
* 后端接口
* @author
* @email
* @date 2022-04-19 22:07:01
*/
@RestController
@RequestMapping("/cheweixinxi")
public class CheweixinxiController {
@Autowired
private CheweixinxiService cheweixinxiService;
/**
* 后端列表
*/
@RequestMapping("/page")
public R page(@RequestParam Map<String, Object> params,CheweixinxiEntity cheweixinxi,
HttpServletRequest request){
EntityWrapper<CheweixinxiEntity> ew = new EntityWrapper<CheweixinxiEntity>();
PageUtils page = cheweixinxiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, cheweixinxi), params), params));
return R.ok().put("data", page);
}
/**
* 前端列表
*/
@IgnoreAuth
@RequestMapping("/list")
public R list(@RequestParam Map<String, Object> params,CheweixinxiEntity cheweixinxi,
HttpServletRequest request){
EntityWrapper<CheweixinxiEntity> ew = new EntityWrapper<CheweixinxiEntity>();
PageUtils page = cheweixinxiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, cheweixinxi), params), params));
return R.ok().put("data", page);
}
/**
* 列表
*/
@RequestMapping("/lists")
public R list( CheweixinxiEntity cheweixinxi){
EntityWrapper<CheweixinxiEntity> ew = new EntityWrapper<CheweixinxiEntity>();
ew.allEq(MPUtil.allEQMapPre( cheweixinxi, "cheweixinxi"));
return R.ok().put("data", cheweixinxiService.selectListView(ew));
}
/**
* 查询
*/
@RequestMapping("/query")
public R query(CheweixinxiEntity cheweixinxi){
EntityWrapper< CheweixinxiEntity> ew = new EntityWrapper< CheweixinxiEntity>();
ew.allEq(MPUtil.allEQMapPre( cheweixinxi, "cheweixinxi"));
CheweixinxiView cheweixinxiView = cheweixinxiService.selectView(ew);
return R.ok("查询车位信息成功").put("data", cheweixinxiView);
}
/**
* 后端详情
*/
@RequestMapping("/info/{id}")
public R info(@PathVariable("id") Long id){
CheweixinxiEntity cheweixinxi = cheweixinxiService.selectById(id);
return R.ok().put("data", cheweixinxi);
}
/**
* 前端详情
*/
@IgnoreAuth
@RequestMapping("/detail/{id}")
public R detail(@PathVariable("id") Long id){
CheweixinxiEntity cheweixinxi = cheweixinxiService.selectById(id);
return R.ok().put("data", cheweixinxi);
}
/**
* 后端保存
*/
@RequestMapping("/save")
public R save(@RequestBody CheweixinxiEntity cheweixinxi, HttpServletRequest request){
cheweixinxi.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
//ValidatorUtils.validateEntity(cheweixinxi);
cheweixinxiService.insert(cheweixinxi);
return R.ok();
}
/**
* 前端保存
*/
@RequestMapping("/add")
public R add(@RequestBody CheweixinxiEntity cheweixinxi, HttpServletRequest request){
cheweixinxi.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
//ValidatorUtils.validateEntity(cheweixinxi);
cheweixinxiService.insert(cheweixinxi);
return R.ok();
}
/**
* 修改
*/
@RequestMapping("/update")
public R update(@RequestBody CheweixinxiEntity cheweixinxi, HttpServletRequest request){
//ValidatorUtils.validateEntity(cheweixinxi);
cheweixinxiService.updateById(cheweixinxi);//全部更新
return R.ok();
}
/**
* 删除
*/
@RequestMapping("/delete")
public R delete(@RequestBody Long[] ids){
cheweixinxiService.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<CheweixinxiEntity> wrapper = new EntityWrapper<CheweixinxiEntity>();
if(map.get("remindstart")!=null) {
wrapper.ge(columnName, map.get("remindstart"));
}
if(map.get("remindend")!=null) {
wrapper.le(columnName, map.get("remindend"));
}
int count = cheweixinxiService.selectCount(wrapper);
return R.ok().put("count", count);
}
}
package com.service.impl;
import org.springframework.stereotype.Service;
import java.util.Map;
import java.util.List;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.plugins.Page;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.utils.PageUtils;
import com.utils.Query;
import com.dao.CheweixinxiDao;
import com.entity.CheweixinxiEntity;
import com.service.CheweixinxiService;
import com.entity.vo.CheweixinxiVO;
import com.entity.view.CheweixinxiView;
@Service("cheweixinxiService")
public class CheweixinxiServiceImpl extends ServiceImpl<CheweixinxiDao, CheweixinxiEntity> implements CheweixinxiService {
@Override
public PageUtils queryPage(Map<String, Object> params) {
Page<CheweixinxiEntity> page = this.selectPage(
new Query<CheweixinxiEntity>(params).getPage(),
new EntityWrapper<CheweixinxiEntity>()
);
return new PageUtils(page);
}
@Override
public PageUtils queryPage(Map<String, Object> params, Wrapper<CheweixinxiEntity> wrapper) {
Page<CheweixinxiView> page =new Query<CheweixinxiView>(params).getPage();
page.setRecords(baseMapper.selectListView(page,wrapper));
PageUtils pageUtil = new PageUtils(page);
return pageUtil;
}
@Override
public List<CheweixinxiVO> selectListVO(Wrapper<CheweixinxiEntity> wrapper) {
return baseMapper.selectListVO(wrapper);
}
@Override
public CheweixinxiVO selectVO(Wrapper<CheweixinxiEntity> wrapper) {
return baseMapper.selectVO(wrapper);
}
@Override
public List<CheweixinxiView> selectListView(Wrapper<CheweixinxiEntity> wrapper) {
return baseMapper.selectListView(wrapper);
}
@Override
public CheweixinxiView selectView(Wrapper<CheweixinxiEntity> wrapper) {
return baseMapper.selectView(wrapper);
}
}
package com.dao;
import com.entity.CheweixinxiEntity;
import com.baomidou.mybatisplus.mapper.BaseMapper;
import java.util.List;
import java.util.Map;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.baomidou.mybatisplus.plugins.pagination.Pagination;
import org.apache.ibatis.annotations.Param;
import com.entity.vo.CheweixinxiVO;
import com.entity.view.CheweixinxiView;
/**
* 车位信息
*
* @author
* @email
* @date 2022-04-19 22:07:01
*/
public interface CheweixinxiDao extends BaseMapper<CheweixinxiEntity> {
List<CheweixinxiVO> selectListVO(@Param("ew") Wrapper<CheweixinxiEntity> wrapper);
CheweixinxiVO selectVO(@Param("ew") Wrapper<CheweixinxiEntity> wrapper);
List<CheweixinxiView> selectListView(@Param("ew") Wrapper<CheweixinxiEntity> wrapper);
List<CheweixinxiView> selectListView(Pagination page,@Param("ew") Wrapper<CheweixinxiEntity> wrapper);
CheweixinxiView selectView(@Param("ew") Wrapper<CheweixinxiEntity> wrapper);
}
论文目录