草庐IT

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

IT教程资源- 2023-04-15 原文

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

服务器:Tomcat9.0, jdk1.8

项目构建:maven

数据库:mysql5.7

前端技术:vue、uniapp

服务端技术:springboot+mybatis

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

项目功能描述:

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

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

文档截图:

微信小程序截图:

后台截图:

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 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.NoticeAdvise;
import com.yiyue.model.dto.wx.NoticeAdviseDTO;
import com.yiyue.mapper.wx.NoticeAdviseMapper;

@Service
@Transactional
public class NoticeAdviseService {

    @Autowired
    private NoticeAdviseMapper noticeAdviseMapper;

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

        IPage<NoticeAdvise> noticeAdviseList=noticeAdviseMapper.findNoticeAdvisePageList(PageUtil.getPagination(noticeAdviseDTO),queryWrapper);
        return noticeAdviseList;
    }

    private QueryWrapper getQueryWrapper(NoticeAdviseDTO noticeAdviseDTO){
        QueryWrapper<NoticeAdvise> queryWrapper=new QueryWrapper<>();
        // 序号
        if(!StringUtils.isBlank(noticeAdviseDTO.getId())){
            queryWrapper.eq("id",noticeAdviseDTO.getId());
        }
        // 标题
        if(!StringUtils.isBlank(noticeAdviseDTO.getTitle())){
            queryWrapper.like("title","%"+noticeAdviseDTO.getTitle()+"%");
        }
        // 内容
        if(!StringUtils.isBlank(noticeAdviseDTO.getNoticeContent())){
            queryWrapper.eq("notice_content",noticeAdviseDTO.getNoticeContent());
        }
        // 时间
        if(!StringUtils.isBlank(noticeAdviseDTO.getCreateDate())){
            queryWrapper.eq("create_date",noticeAdviseDTO.getCreateDate());
        }
        return queryWrapper;
    }

    public void insertNoticeAdvise(NoticeAdvise noticeAdvise) {
        noticeAdviseMapper.insert(noticeAdvise);
    }

    public void updateNoticeAdvise(NoticeAdvise noticeAdvise) {
        this.noticeAdviseMapper.updateById(noticeAdvise);
    }

    public void deleteNoticeAdviseById(String id) {
        this.noticeAdviseMapper.deleteById(id);
    }

    public NoticeAdvise findNoticeAdviseById(String id) {
        return noticeAdviseMapper.selectById(id);
    }

}
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.mapper.wx.SeatStatusMapper;
import com.yiyue.model.bean.wx.SeatStatus;
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.OrderMange;
import com.yiyue.model.dto.wx.OrderMangeDTO;
import com.yiyue.mapper.wx.OrderMangeMapper;

import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;


@Service
@Transactional
public class OrderMangeService {

    @Autowired
    private OrderMangeMapper orderMangeMapper;

    @Autowired
    private SeatStatusMapper seatStatusMapper;

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

        IPage<OrderMange> orderMangeList=orderMangeMapper.findOrderMangePageList(PageUtil.getPagination(orderMangeDTO),queryWrapper);
        return orderMangeList;
    }

    private QueryWrapper getQueryWrapper(OrderMangeDTO orderMangeDTO){
        QueryWrapper<OrderMange> queryWrapper=new QueryWrapper<>();
        // 序号
        if(!StringUtils.isBlank(orderMangeDTO.getId())){
            queryWrapper.eq("s1.id",orderMangeDTO.getId());
        }
        // 订单编号
        if(!StringUtils.isBlank(orderMangeDTO.getOrderId())){
//            queryWrapper.eq("s1.order_id",orderMangeDTO.getOrderId());
            queryWrapper.eq("s1.id",orderMangeDTO.getOrderId());
        }
        // 用户
        if(!StringUtils.isBlank(orderMangeDTO.getUserId())){
            queryWrapper.eq("s1.user_id",orderMangeDTO.getUserId());
        }
        // 图书馆id
        if(!StringUtils.isBlank(orderMangeDTO.getLibraryId())){
            queryWrapper.eq("s1.library_id",orderMangeDTO.getLibraryId());
        }
        // 图书馆
        if(!StringUtils.isBlank(orderMangeDTO.getLibraryName())){
            queryWrapper.eq("s1.library_name",orderMangeDTO.getLibraryName());
        }
        // 座位id
        if(!StringUtils.isBlank(orderMangeDTO.getSeatId())){
            queryWrapper.eq("s1.seat_id",orderMangeDTO.getSeatId());
        }
        // 座位
        if(!StringUtils.isBlank(orderMangeDTO.getSeatName())){
            queryWrapper.eq("s1.seat_name",orderMangeDTO.getSeatName());
        }
        // 订单状态
        if(!StringUtils.isBlank(orderMangeDTO.getOrderStatus())){
            queryWrapper.eq("s1.order_status",orderMangeDTO.getOrderStatus());
        }
        // 预约时间
        if(!StringUtils.isBlank(orderMangeDTO.getPlanTime())){
            queryWrapper.eq("s1.plan_time",orderMangeDTO.getPlanTime());
        }
        // 创建时间
        if(!StringUtils.isBlank(orderMangeDTO.getCreateDate())){
            queryWrapper.eq("create_date",orderMangeDTO.getCreateDate());
        }
        return queryWrapper;
    }

    public void insertOrderMange(OrderMange orderMange) {
        orderMangeMapper.insert(orderMange);
    }

    public void updateOrderMange(OrderMange orderMange) {
        this.orderMangeMapper.updateById(orderMange);
    }

    public void deleteOrderMangeById(String id) {
        this.orderMangeMapper.deleteById(id);
    }

    public OrderMange findOrderMangeById(String id) {
        return orderMangeMapper.selectById(id);
    }

    public int findUserIdOrOrder(String userId) {
        QueryWrapper<OrderMange> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("user_id",userId);
        queryWrapper.eq("order_status",0);
        return orderMangeMapper.selectCount(queryWrapper);

    }

    public OrderMange findOrderState(OrderMangeDTO orderMangeDTO) {
        QueryWrapper<OrderMange> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("user_id",orderMangeDTO.getUserId());
        queryWrapper.eq("order_status",0);
        if (orderMangeMapper.selectList(queryWrapper).size()==0){
            return null;
        }
        return orderMangeMapper.selectList(queryWrapper).get(0);
    }

    public void findSeatState(String id) {
        OrderMange orderMange = orderMangeMapper.selectById(id);
        int seatId = orderMange.getSeatId();
        SeatStatus seatStatus = new SeatStatus();
        seatStatus.setId(seatId);
        seatStatus.setStatus(0);
        seatStatusMapper.updateById(seatStatus);
    }

    public void selectOrOrderState() {
        //取消座位预约findSeatState
        SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
       /* QueryWrapper<OrderMange> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("order_status","0");*/
        List<OrderMange> list = orderMangeMapper.selectList(null);
        if (list.size()==0){
            return;
        }
        for (int i = 0; i < list.size(); i++) {
            Date planDate = new Date(list.get(i).getPlanTime().getTime() + 900000);
            if (planDate.getTime()<new Date().getTime()){
                orderMangeMapper.deleteById(list.get(i).getId());
                SeatStatus seatStatus = new SeatStatus();
                seatStatus.setId(list.get(i).getSeatId());
                seatStatus.setStatus(0);
                seatStatusMapper.updateById(seatStatus);
            }
        }
        //时间到时的确认时间
        QueryWrapper<OrderMange> queryWrapper2 = new QueryWrapper<>();
        queryWrapper2.eq("order_status","1");
        List<OrderMange> list2 = orderMangeMapper.selectList(queryWrapper2);
        if (list.size()==0){
            return;
        }
        for (int i = 0; i < list2.size(); i++) {
            if (list2.get(i).getEndTime().getTime()<new Date().getTime()){
                orderMangeMapper.deleteById(list.get(i).getId());
                SeatStatus seatStatus = new SeatStatus();
                seatStatus.setId(list.get(i).getSeatId());
                seatStatus.setStatus(0);
                seatStatusMapper.updateById(seatStatus);
            }
        }

    }
}
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;
}

}

有关微信小程序图书馆座位预约管理系统的更多相关文章

  1. ruby - i18n Assets 管理/翻译 UI - 2

    我正在使用i18n从头开始​​构建一个多语言网络应用程序,虽然我自己可以处理一大堆yml文件,但我说的语言(非常)有限,最终我想寻求外部帮助帮助。我想知道这里是否有人在使用UI插件/gem(与django上的django-rosetta不同)来处理多个翻译器,其中一些翻译器不愿意或无法处理存储库中的100多个文件,处理语言数据。谢谢&问候,安德拉斯(如果您已经在ruby​​onrails-talk上遇到了这个问题,我们深表歉意) 最佳答案 有一个rails3branchofthetolkgem在github上。您可以通过在Gemfi

  2. ruby-on-rails - 获取 inf-ruby 以使用 ruby​​ 版本管理器 (rvm) - 2

    我安装了ruby​​版本管理器,并将RVM安装的ruby​​实现设置为默认值,这样'哪个ruby'显示'~/.rvm/ruby-1.8.6-p383/bin/ruby'但是当我在emacs中打开inf-ruby缓冲区时,它使用安装在/usr/bin中的ruby​​。有没有办法让emacs像shell一样尊重ruby​​的路径?谢谢! 最佳答案 我创建了一个emacs扩展来将rvm集成到emacs中。如果您有兴趣,可以在这里获取:http://github.com/senny/rvm.el

  3. ruby-on-rails - 事件管理员日期过滤器日期格式自定义 - 2

    是否有简单的方法来更改默认ISO格式(yyyy-mm-dd)的ActiveAdmin日期过滤器显示格式? 最佳答案 您可以像这样为日期选择器提供额外的选项,而不是覆盖js:=f.input:my_date,as::datepicker,datepicker_options:{dateFormat:"mm/dd/yy"} 关于ruby-on-rails-事件管理员日期过滤器日期格式自定义,我们在StackOverflow上找到一个类似的问题: https://s

  4. 微信小程序通过字典表匹配对应数据 - 2

    前言一般来说,前端根据后台返回code码展示对应内容只需要在前台判断code值展示对应的内容即可,但要是匹配的code码比较多或者多个页面用到时,为了便于后期维护,后台就会使用字典表让前端匹配,下面我将在微信小程序中通过wxs的方法实现这个操作。为什么要使用wxs?{{method(a,b)}}可以看到,上述代码是一个调用方法传值的操作,在vue中很常见,多用于数据之间的转换,但由于微信小程序诸多限制的原因,你并不能优雅的这样操作,可能有人会说,为什么不用if判断实现呢?但是if判断的局限性在于如果存在数据量过大时,大量重复性操作和if判断会让你的代码显得异常冗余。wxswxs相当于是一个独立

  5. 计算机毕业设计ssm+vue基本微信小程序的小学生兴趣延时班预约小程序 - 2

    项目介绍随着我国经济迅速发展,人们对手机的需求越来越大,各种手机软件也都在被广泛应用,但是对于手机进行数据信息管理,对于手机的各种软件也是备受用户的喜爱小学生兴趣延时班预约小程序的设计与开发被用户普遍使用,为方便用户能够可以随时进行小学生兴趣延时班预约小程序的设计与开发的数据信息管理,特开发了小程序的设计与开发的管理系统。小学生兴趣延时班预约小程序的设计与开发的开发利用现有的成熟技术参考,以源代码为模板,分析功能调整与小学生兴趣延时班预约小程序的设计与开发的实际需求相结合,讨论了小学生兴趣延时班预约小程序的设计与开发的使用。开发环境开发说明:前端使用微信微信小程序开发工具:后端使用ssm:VU

  6. 微信小程序开发入门与实战(Behaviors使用) - 2

    @作者:SYFStrive @博客首页:HomePage📜:微信小程序📌:个人社区(欢迎大佬们加入)👉:社区链接🔗📌:觉得文章不错可以点点关注👉:专栏连接🔗💃:感谢支持,学累了可以先看小段由小胖给大家带来的街舞👉微信小程序(🔥)目录自定义组件-behaviors    1、什么是behaviors    2、behaviors的工作方式    3、创建behavior    4、导入并使用behavior    5、behavior中所有可用的节点    6、同名字段的覆盖和组合规则总结最后自定义组件-behaviors    1、什么是behaviorsbehaviors是小程序中,用于实现

  7. ruby - (Ruby || Python) 窗口管理器 - 2

    我想用这两种语言中的任何一种(最好是ruby​​)制作一个窗口管理器。老实说,除了我需要加载某种X模块外,我不知道从哪里开始。因此,如果有人有线索,如果您能指出正确的方向,那就太好了。谢谢 最佳答案 XCB,X的下一代API使用XML格式定义X协议(protocol),并使用脚本生成特定语言绑定(bind)。它在概念上与SWIG类似,只是它描述的不是CAPI,而是X协议(protocol)。目前,C和Python存在绑定(bind)。理论上,Ruby端口只是编写一个从XML协议(protocol)定义语言到Ruby的翻译器的问题。生

  8. ruby-on-rails - 事件管理员和自定义方法 - 2

    这是我在ActiveAdmin中的自定义页面ActiveAdmin.register_page"Settings"doaction_itemdolink_to('Importprojects','settings/importprojects')endcontentdopara"Text"endcontrollerdodefimportprojectssystem"rakedataspider:import_projects_ninja"para"OK"endendend我想做的是,当我单击“导入项目”按钮时,我想在Controller中执行rake任务。但是我无法访问该方法。可能是什

  9. ruby-on-rails - (Ruby,Rails) 基于角色的身份验证和用户管理...? - 2

    我正在寻找用于Rails的优质管理插件。似乎大多数现有的插件/gem(例如“restful_authentication”、“acts_as_authenticated”)都围绕着self注册等展开。但是,我正在寻找一种功能齐全的基于管理/管理角色的解决方案——但不是简单地附加到另一个非基于角色的解决方案。如果我找不到,我想我会自己动手......只是不想重新发明轮子。 最佳答案 RyanBates最近做了两个关于授权的railscast(注意身份验证和授权之间的区别;身份验证检查用户是否如她所说的那样,授权检查用户是否有权访问资源

  10. Ubuntu20.04系统WineHQ7.0安装微信 - 2

    提供3种Ubuntu系统安装微信的方法,在Ubuntu20.04上验证都ok。1.WineHQ7.0安装微信:ubuntu20.04安装最新版微信--可以支持微信最新版,但是适配的不是特别好;比如WeChartOCR.exe报错。2.原生微信安装:linux系统下的微信安装(ubuntu20.04)--微信适配的最好,反应最快,但是微信版本只到2.1.1,版本太老,很多功能都没有。3.深度deepin-wine6安装微信:ubuntu20.04+系统deepin-wine6安装新版微信--综合比较好,当前个人使用此种方法1个月,微信版本3.4;没什么大问题,尚可。一、WineHQ7.0安装微信

随机推荐