• 首页 首页 icon
  • 工具库 工具库 icon
    • IP查询 IP查询 icon
  • 内容库 内容库 icon
    • 快讯库 快讯库 icon
    • 精品库 精品库 icon
    • 问答库 问答库 icon
  • 更多 更多 icon
    • 服务条款 服务条款 icon

微信小程序图书馆座位预约管理系统

武飞扬头像
IT教程资源-
帮助1

开发工具:IDEA、微信小程序

服务器:Tomcat9.0, jdk1.8

项目构建:maven

数据库:mysql5.7

前端技术:vue、uniapp

服务端技术:springboot mybatis

本系统分微信小程序和管理后台两部分,项目采用前后端分离

项目功能描述:

1.微信小程序:登录、注册、主页、公告、轮播图、图书馆预约(座位选择、时间选择),图书借阅、个人中心(预约状态、扫码签到、修改密码、设置、退出登录)

2.后台管理:登录、修改密码、系统管理(用户管理、角色管理、菜单管理、组织管理)、图书馆管理、座位管理、通知管理、预约管理、借阅管理、图书管理

文档截图:

学新通
学新通

微信小程序截图:

学新通
学新通
学新通
学新通
学新通
学新通
学新通
学新通
学新通
学新通
学新通

后台截图:

学新通
学新通
学新通
学新通
学新通
学新通
学新通
学新通
学新通
学新通
学新通
学新通
  1.  
    package com.yiyue.service.wx;
  2.  
     
  3.  
     
  4.  
    import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
  5.  
    import com.baomidou.mybatisplus.core.metadata.IPage;
  6.  
    import com.yiyue.common.util.PageUtil;
  7.  
    import org.springframework.beans.factory.annotation.Autowired;
  8.  
    import org.springframework.stereotype.Service;
  9.  
    import org.springframework.transaction.annotation.Transactional;
  10.  
    import org.apache.commons.lang3.StringUtils;
  11.  
    import com.yiyue.model.bean.wx.NoticeAdvise;
  12.  
    import com.yiyue.model.dto.wx.NoticeAdviseDTO;
  13.  
    import com.yiyue.mapper.wx.NoticeAdviseMapper;
  14.  
     
  15.  
    @Service
  16.  
    @Transactional
  17.  
    public class NoticeAdviseService {
  18.  
     
  19.  
    @Autowired
  20.  
    private NoticeAdviseMapper noticeAdviseMapper;
  21.  
     
  22.  
    public IPage<NoticeAdvise> findNoticeAdviseListPageByParam(NoticeAdviseDTO noticeAdviseDTO) {
  23.  
    // 从dto对象中获得查询条件,添加到queryWrapper对象中, 查询条件还需要视情况自行修改
  24.  
    QueryWrapper<NoticeAdvise> queryWrapper=getQueryWrapper(noticeAdviseDTO);
  25.  
     
  26.  
    IPage<NoticeAdvise> noticeAdviseList=noticeAdviseMapper.findNoticeAdvisePageList(PageUtil.getPagination(noticeAdviseDTO),queryWrapper);
  27.  
    return noticeAdviseList;
  28.  
    }
  29.  
     
  30.  
    private QueryWrapper getQueryWrapper(NoticeAdviseDTO noticeAdviseDTO){
  31.  
    QueryWrapper<NoticeAdvise> queryWrapper=new QueryWrapper<>();
  32.  
    // 序号
  33.  
    if(!StringUtils.isBlank(noticeAdviseDTO.getId())){
  34.  
    queryWrapper.eq("id",noticeAdviseDTO.getId());
  35.  
    }
  36.  
    // 标题
  37.  
    if(!StringUtils.isBlank(noticeAdviseDTO.getTitle())){
  38.  
    queryWrapper.like("title","%" noticeAdviseDTO.getTitle() "%");
  39.  
    }
  40.  
    // 内容
  41.  
    if(!StringUtils.isBlank(noticeAdviseDTO.getNoticeContent())){
  42.  
    queryWrapper.eq("notice_content",noticeAdviseDTO.getNoticeContent());
  43.  
    }
  44.  
    // 时间
  45.  
    if(!StringUtils.isBlank(noticeAdviseDTO.getCreateDate())){
  46.  
    queryWrapper.eq("create_date",noticeAdviseDTO.getCreateDate());
  47.  
    }
  48.  
    return queryWrapper;
  49.  
    }
  50.  
     
  51.  
    public void insertNoticeAdvise(NoticeAdvise noticeAdvise) {
  52.  
    noticeAdviseMapper.insert(noticeAdvise);
  53.  
    }
  54.  
     
  55.  
    public void updateNoticeAdvise(NoticeAdvise noticeAdvise) {
  56.  
    this.noticeAdviseMapper.updateById(noticeAdvise);
  57.  
    }
  58.  
     
  59.  
    public void deleteNoticeAdviseById(String id) {
  60.  
    this.noticeAdviseMapper.deleteById(id);
  61.  
    }
  62.  
     
  63.  
    public NoticeAdvise findNoticeAdviseById(String id) {
  64.  
    return noticeAdviseMapper.selectById(id);
  65.  
    }
  66.  
     
  67.  
    }
学新通
  1.  
    package com.yiyue.service.wx;
  2.  
     
  3.  
     
  4.  
    import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
  5.  
    import com.baomidou.mybatisplus.core.metadata.IPage;
  6.  
    import com.yiyue.common.util.PageUtil;
  7.  
    import com.yiyue.mapper.wx.SeatStatusMapper;
  8.  
    import com.yiyue.model.bean.wx.SeatStatus;
  9.  
    import org.springframework.beans.factory.annotation.Autowired;
  10.  
    import org.springframework.stereotype.Service;
  11.  
    import org.springframework.transaction.annotation.Transactional;
  12.  
    import org.apache.commons.lang3.StringUtils;
  13.  
    import com.yiyue.model.bean.wx.OrderMange;
  14.  
    import com.yiyue.model.dto.wx.OrderMangeDTO;
  15.  
    import com.yiyue.mapper.wx.OrderMangeMapper;
  16.  
     
  17.  
    import java.text.SimpleDateFormat;
  18.  
    import java.util.Date;
  19.  
    import java.util.List;
  20.  
     
  21.  
     
  22.  
    @Service
  23.  
    @Transactional
  24.  
    public class OrderMangeService {
  25.  
     
  26.  
    @Autowired
  27.  
    private OrderMangeMapper orderMangeMapper;
  28.  
     
  29.  
    @Autowired
  30.  
    private SeatStatusMapper seatStatusMapper;
  31.  
     
  32.  
    public IPage<OrderMange> findOrderMangeListPageByParam(OrderMangeDTO orderMangeDTO) {
  33.  
    // 从dto对象中获得查询条件,添加到queryWrapper对象中, 查询条件还需要视情况自行修改
  34.  
    QueryWrapper<OrderMange> queryWrapper=getQueryWrapper(orderMangeDTO);
  35.  
     
  36.  
    IPage<OrderMange> orderMangeList=orderMangeMapper.findOrderMangePageList(PageUtil.getPagination(orderMangeDTO),queryWrapper);
  37.  
    return orderMangeList;
  38.  
    }
  39.  
     
  40.  
    private QueryWrapper getQueryWrapper(OrderMangeDTO orderMangeDTO){
  41.  
    QueryWrapper<OrderMange> queryWrapper=new QueryWrapper<>();
  42.  
    // 序号
  43.  
    if(!StringUtils.isBlank(orderMangeDTO.getId())){
  44.  
    queryWrapper.eq("s1.id",orderMangeDTO.getId());
  45.  
    }
  46.  
    // 订单编号
  47.  
    if(!StringUtils.isBlank(orderMangeDTO.getOrderId())){
  48.  
    // queryWrapper.eq("s1.order_id",orderMangeDTO.getOrderId());
  49.  
    queryWrapper.eq("s1.id",orderMangeDTO.getOrderId());
  50.  
    }
  51.  
    // 用户
  52.  
    if(!StringUtils.isBlank(orderMangeDTO.getUserId())){
  53.  
    queryWrapper.eq("s1.user_id",orderMangeDTO.getUserId());
  54.  
    }
  55.  
    // 图书馆id
  56.  
    if(!StringUtils.isBlank(orderMangeDTO.getLibraryId())){
  57.  
    queryWrapper.eq("s1.library_id",orderMangeDTO.getLibraryId());
  58.  
    }
  59.  
    // 图书馆
  60.  
    if(!StringUtils.isBlank(orderMangeDTO.getLibraryName())){
  61.  
    queryWrapper.eq("s1.library_name",orderMangeDTO.getLibraryName());
  62.  
    }
  63.  
    // 座位id
  64.  
    if(!StringUtils.isBlank(orderMangeDTO.getSeatId())){
  65.  
    queryWrapper.eq("s1.seat_id",orderMangeDTO.getSeatId());
  66.  
    }
  67.  
    // 座位
  68.  
    if(!StringUtils.isBlank(orderMangeDTO.getSeatName())){
  69.  
    queryWrapper.eq("s1.seat_name",orderMangeDTO.getSeatName());
  70.  
    }
  71.  
    // 订单状态
  72.  
    if(!StringUtils.isBlank(orderMangeDTO.getOrderStatus())){
  73.  
    queryWrapper.eq("s1.order_status",orderMangeDTO.getOrderStatus());
  74.  
    }
  75.  
    // 预约时间
  76.  
    if(!StringUtils.isBlank(orderMangeDTO.getPlanTime())){
  77.  
    queryWrapper.eq("s1.plan_time",orderMangeDTO.getPlanTime());
  78.  
    }
  79.  
    // 创建时间
  80.  
    if(!StringUtils.isBlank(orderMangeDTO.getCreateDate())){
  81.  
    queryWrapper.eq("create_date",orderMangeDTO.getCreateDate());
  82.  
    }
  83.  
    return queryWrapper;
  84.  
    }
  85.  
     
  86.  
    public void insertOrderMange(OrderMange orderMange) {
  87.  
    orderMangeMapper.insert(orderMange);
  88.  
    }
  89.  
     
  90.  
    public void updateOrderMange(OrderMange orderMange) {
  91.  
    this.orderMangeMapper.updateById(orderMange);
  92.  
    }
  93.  
     
  94.  
    public void deleteOrderMangeById(String id) {
  95.  
    this.orderMangeMapper.deleteById(id);
  96.  
    }
  97.  
     
  98.  
    public OrderMange findOrderMangeById(String id) {
  99.  
    return orderMangeMapper.selectById(id);
  100.  
    }
  101.  
     
  102.  
    public int findUserIdOrOrder(String userId) {
  103.  
    QueryWrapper<OrderMange> queryWrapper = new QueryWrapper<>();
  104.  
    queryWrapper.eq("user_id",userId);
  105.  
    queryWrapper.eq("order_status",0);
  106.  
    return orderMangeMapper.selectCount(queryWrapper);
  107.  
     
  108.  
    }
  109.  
     
  110.  
    public OrderMange findOrderState(OrderMangeDTO orderMangeDTO) {
  111.  
    QueryWrapper<OrderMange> queryWrapper = new QueryWrapper<>();
  112.  
    queryWrapper.eq("user_id",orderMangeDTO.getUserId());
  113.  
    queryWrapper.eq("order_status",0);
  114.  
    if (orderMangeMapper.selectList(queryWrapper).size()==0){
  115.  
    return null;
  116.  
    }
  117.  
    return orderMangeMapper.selectList(queryWrapper).get(0);
  118.  
    }
  119.  
     
  120.  
    public void findSeatState(String id) {
  121.  
    OrderMange orderMange = orderMangeMapper.selectById(id);
  122.  
    int seatId = orderMange.getSeatId();
  123.  
    SeatStatus seatStatus = new SeatStatus();
  124.  
    seatStatus.setId(seatId);
  125.  
    seatStatus.setStatus(0);
  126.  
    seatStatusMapper.updateById(seatStatus);
  127.  
    }
  128.  
     
  129.  
    public void selectOrOrderState() {
  130.  
    //取消座位预约findSeatState
  131.  
    SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
  132.  
    /* QueryWrapper<OrderMange> queryWrapper = new QueryWrapper<>();
  133.  
    queryWrapper.eq("order_status","0");*/
  134.  
    List<OrderMange> list = orderMangeMapper.selectList(null);
  135.  
    if (list.size()==0){
  136.  
    return;
  137.  
    }
  138.  
    for (int i = 0; i < list.size(); i ) {
  139.  
    Date planDate = new Date(list.get(i).getPlanTime().getTime() 900000);
  140.  
    if (planDate.getTime()<new Date().getTime()){
  141.  
    orderMangeMapper.deleteById(list.get(i).getId());
  142.  
    SeatStatus seatStatus = new SeatStatus();
  143.  
    seatStatus.setId(list.get(i).getSeatId());
  144.  
    seatStatus.setStatus(0);
  145.  
    seatStatusMapper.updateById(seatStatus);
  146.  
    }
  147.  
    }
  148.  
    //时间到时的确认时间
  149.  
    QueryWrapper<OrderMange> queryWrapper2 = new QueryWrapper<>();
  150.  
    queryWrapper2.eq("order_status","1");
  151.  
    List<OrderMange> list2 = orderMangeMapper.selectList(queryWrapper2);
  152.  
    if (list.size()==0){
  153.  
    return;
  154.  
    }
  155.  
    for (int i = 0; i < list2.size(); i ) {
  156.  
    if (list2.get(i).getEndTime().getTime()<new Date().getTime()){
  157.  
    orderMangeMapper.deleteById(list.get(i).getId());
  158.  
    SeatStatus seatStatus = new SeatStatus();
  159.  
    seatStatus.setId(list.get(i).getSeatId());
  160.  
    seatStatus.setStatus(0);
  161.  
    seatStatusMapper.updateById(seatStatus);
  162.  
    }
  163.  
    }
  164.  
     
  165.  
    }
  166.  
    }
学新通
package com.yiyue.service.wx;


import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.yiyue.common.util.PageUtil;
import com.yiyue.common.vo.ItemVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.apache.commons.lang3.StringUtils;
import com.yiyue.model.bean.wx.SeatStatus;
import com.yiyue.model.dto.wx.SeatStatusDTO;
import com.yiyue.mapper.wx.SeatStatusMapper;

import java.util.ArrayList;
import java.util.List;

@Service
@Transactional
public class SeatStatusService {

@Autowired
private SeatStatusMapper seatStatusMapper;


public IPage<SeatStatus> findSeatStatusListPageByParam(SeatStatusDTO seatStatusDTO) {
// 从dto对象中获得查询条件,添加到queryWrapper对象中, 查询条件还需要视情况自行修改
QueryWrapper<SeatStatus> queryWrapper=getQueryWrapper(seatStatusDTO);

IPage<SeatStatus> seatStatusList=seatStatusMapper.findSeatStatusPageList(PageUtil.getPagination(seatStatusDTO),queryWrapper);
return seatStatusList;
}

private QueryWrapper getQueryWrapper(SeatStatusDTO seatStatusDTO){
QueryWrapper<SeatStatus> queryWrapper=new QueryWrapper<>();
// 序号
if(!StringUtils.isBlank(seatStatusDTO.getId())){
queryWrapper.eq("id",seatStatusDTO.getId());
}
// 状态(0空闲;1预约;2占用)
if(!StringUtils.isBlank(seatStatusDTO.getStatus())){
queryWrapper.eq("status",seatStatusDTO.getStatus());
}
// 座位
if(!StringUtils.isBlank(seatStatusDTO.getSeatName())){
queryWrapper.eq("seat_name",seatStatusDTO.getSeatName());
}
// 图书馆
if(!StringUtils.isBlank(seatStatusDTO.getLibraryType())){
queryWrapper.eq("library_type",seatStatusDTO.getLibraryType());
}
return queryWrapper;
}

public void insertSeatStatus(SeatStatus seatStatus) {
seatStatusMapper.insert(seatStatus);
}

public void updateSeatStatus(SeatStatus seatStatus) {
this.seatStatusMapper.updateById(seatStatus);
}

public void deleteSeatStatusById(String id) {
this.seatStatusMapper.deleteById(id);
}

public SeatStatus findSeatStatusById(String id) {
return seatStatusMapper.selectById(id);
}

public List<ItemVO> findSeatListName(String typeId) {
ArrayList<ItemVO> arrayList = new ArrayList<>();
QueryWrapper<SeatStatus> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("library_type",typeId);
queryWrapper.eq("status",0);
List<SeatStatus> seatStatusList=this.seatStatusMapper.selectList(queryWrapper);
seatStatusList.forEach(item->{
ItemVO itemVO = new ItemVO();
itemVO.setKey(item.getId() "");
itemVO.setValue(item.getId() "");
itemVO.setTitle(item.getSeatName());
arrayList.add(itemVO);
});
return arrayList;
}

public List<SeatStatus> findSeatListGetLibrary(int id) {
QueryWrapper<SeatStatus> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("library_type",id);
List<SeatStatus> list = seatStatusMapper.selectList(queryWrapper);
return list;
}

}

这篇好文章是转载于:学新通技术网

  • 版权申明: 本站部分内容来自互联网,仅供学习及演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,请提供相关证据及您的身份证明,我们将在收到邮件后48小时内删除。
  • 本站站名: 学新通技术网
  • 本文地址: /boutique/detail/tanhgfjcjh
系列文章
更多 icon
同类精品
更多 icon
继续加载