当前位置:   article > 正文

免费分享一套微信小程序图书馆座位预约管理系统(SpringBoot后端+Vue管理端)【论文+源码+SQL脚本】,帅呆了~~

免费分享一套微信小程序图书馆座位预约管理系统(SpringBoot后端+Vue管理端)【论文+源码+SQL脚本】,帅呆了~~

大家好,我是java1234_小锋老师,看到一个不错的微信小程序图书馆座位预约管理系统(SpringBoot后端+Vue管理端),分享下哈。

项目介绍

随着移动互联网技术的飞速发展和智能设备的普及,图书馆服务模式正在经历深刻的变革。本论文旨在探讨如何利用微信小程序这一便捷高效的平台,开发一款针对高校图书馆的座位预约管理系统,以优化图书馆资源分配,提升学生和教师的学习与研究效率。

本文首先分析了当前高校图书馆座位管理中存在的问题,如座位空置率高、排队等候时间长、信息更新不及时等,这些问题严重影响了图书馆资源的有效利用和用户体验。随后,我们设计并实现了一款基于微信小程序的图书馆座位预约系统,该系统集成了座位查询、在线预约、自动释放、实时通知等功能,能够为用户提供全方位、个性化的座位服务。

系统采用微信小程序作为前端展示界面,用户通过简单的操作即可完成座位预约;后台服务器则负责处理数据存储、逻辑运算及与用户的交互。此外,系统还引入了位置感知技术和大数据分析,能够根据用户的历史行为和偏好推荐最佳座位,并预测高峰时段,帮助图书馆管理者进行资源调配。

实验结果表明,该系统能够显著减少座位浪费,提高图书馆空间利用率,同时极大地提升了用户的满意度和图书馆的服务水平。未来,我们将继续探索更多智能化的功能,如人脸识别签退、智能推荐系统等,以进一步提升图书馆座位管理系统的效率和用户体验。

系统展示

部分代码

  1. package com.controller;
  2. import java.util.Arrays;
  3. import java.util.Calendar;
  4. import java.util.Date;
  5. import java.util.Map;
  6. import javax.servlet.http.HttpServletRequest;
  7. import org.springframework.beans.factory.annotation.Autowired;
  8. import org.springframework.stereotype.Controller;
  9. import org.springframework.web.bind.annotation.GetMapping;
  10. import org.springframework.web.bind.annotation.PathVariable;
  11. import org.springframework.web.bind.annotation.PostMapping;
  12. import org.springframework.web.bind.annotation.RequestBody;
  13. import org.springframework.web.bind.annotation.RequestMapping;
  14. import org.springframework.web.bind.annotation.RequestParam;
  15. import org.springframework.web.bind.annotation.ResponseBody;
  16. import org.springframework.web.bind.annotation.RestController;
  17. import com.annotation.IgnoreAuth;
  18. import com.baomidou.mybatisplus.mapper.EntityWrapper;
  19. import com.entity.TokenEntity;
  20. import com.entity.UsersEntity;
  21. import com.service.TokenService;
  22. import com.service.UsersService;
  23. import com.utils.CommonUtil;
  24. import com.utils.MPUtil;
  25. import com.utils.PageUtils;
  26. import com.utils.R;
  27. import com.utils.ValidatorUtils;
  28. /**
  29. * 登录相关
  30. */
  31. @RequestMapping("users")
  32. @RestController
  33. public class UsersController{
  34. @Autowired
  35. private UsersService userService;
  36. @Autowired
  37. private TokenService tokenService;
  38. /**
  39. * 登录
  40. */
  41. @IgnoreAuth
  42. @PostMapping(value = "/login")
  43. public R login(String username, String password, String captcha, HttpServletRequest request) {
  44. UsersEntity user = userService.selectOne(new EntityWrapper<UsersEntity>().eq("username", username));
  45. if(user==null || !user.getPassword().equals(password)) {
  46. return R.error("账号或密码不正确");
  47. }
  48. String token = tokenService.generateToken(user.getId(),username, "users", user.getRole());
  49. return R.ok().put("token", token);
  50. }
  51. /**
  52. * 注册
  53. */
  54. @IgnoreAuth
  55. @PostMapping(value = "/register")
  56. public R register(@RequestBody UsersEntity user){
  57. // ValidatorUtils.validateEntity(user);
  58. if(userService.selectOne(new EntityWrapper<UsersEntity>().eq("username", user.getUsername())) !=null) {
  59. return R.error("用户已存在");
  60. }
  61. userService.insert(user);
  62. return R.ok();
  63. }
  64. /**
  65. * 退出
  66. */
  67. @GetMapping(value = "logout")
  68. public R logout(HttpServletRequest request) {
  69. request.getSession().invalidate();
  70. return R.ok("退出成功");
  71. }
  72. /**
  73. * 密码重置
  74. */
  75. @IgnoreAuth
  76. @RequestMapping(value = "/resetPass")
  77. public R resetPass(String username, HttpServletRequest request){
  78. UsersEntity user = userService.selectOne(new EntityWrapper<UsersEntity>().eq("username", username));
  79. if(user==null) {
  80. return R.error("账号不存在");
  81. }
  82. user.setPassword("123456");
  83. userService.update(user,null);
  84. return R.ok("密码已重置为:123456");
  85. }
  86. /**
  87. * 列表
  88. */
  89. @RequestMapping("/page")
  90. public R page(@RequestParam Map<String, Object> params,UsersEntity user){
  91. EntityWrapper<UsersEntity> ew = new EntityWrapper<UsersEntity>();
  92. PageUtils page = userService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.allLike(ew, user), params), params));
  93. return R.ok().put("data", page);
  94. }
  95. /**
  96. * 列表
  97. */
  98. @RequestMapping("/list")
  99. public R list( UsersEntity user){
  100. EntityWrapper<UsersEntity> ew = new EntityWrapper<UsersEntity>();
  101. ew.allEq(MPUtil.allEQMapPre( user, "user"));
  102. return R.ok().put("data", userService.selectListView(ew));
  103. }
  104. /**
  105. * 信息
  106. */
  107. @RequestMapping("/info/{id}")
  108. public R info(@PathVariable("id") String id){
  109. UsersEntity user = userService.selectById(id);
  110. return R.ok().put("data", user);
  111. }
  112. /**
  113. * 获取用户的session用户信息
  114. */
  115. @RequestMapping("/session")
  116. public R getCurrUser(HttpServletRequest request){
  117. Long id = (Long)request.getSession().getAttribute("userId");
  118. UsersEntity user = userService.selectById(id);
  119. return R.ok().put("data", user);
  120. }
  121. /**
  122. * 保存
  123. */
  124. @PostMapping("/save")
  125. public R save(@RequestBody UsersEntity user){
  126. // ValidatorUtils.validateEntity(user);
  127. if(userService.selectOne(new EntityWrapper<UsersEntity>().eq("username", user.getUsername())) !=null) {
  128. return R.error("用户已存在");
  129. }
  130. userService.insert(user);
  131. return R.ok();
  132. }
  133. /**
  134. * 修改
  135. */
  136. @RequestMapping("/update")
  137. public R update(@RequestBody UsersEntity user){
  138. // ValidatorUtils.validateEntity(user);
  139. UsersEntity u = userService.selectOne(new EntityWrapper<UsersEntity>().eq("username", user.getUsername()));
  140. if(u!=null && u.getId()!=user.getId() && u.getUsername().equals(user.getUsername())) {
  141. return R.error("用户名已存在。");
  142. }
  143. userService.updateById(user);//全部更新
  144. return R.ok();
  145. }
  146. /**
  147. * 删除
  148. */
  149. @RequestMapping("/delete")
  150. public R delete(@RequestBody Long[] ids){
  151. userService.deleteBatchIds(Arrays.asList(ids));
  152. return R.ok();
  153. }
  154. }
  1. <template>
  2. <div>
  3. <div class="container" :style='{"minHeight":"100vh","alignItems":"center","background":"url(http://codegen.caihongy.cn/20220730/9902656b81254c719937f2da32e6b42c.png)","display":"flex","width":"100%","backgroundSize":"cover","backgroundPosition":"center center","backgroundRepeat":"no-repeat","justifyContent":"center"}'>
  4. <el-form :style='{"padding":"40px 50px 20px","boxShadow":"0px 4px 10px 0px #A29988","margin":"0 0 0 -500px","borderRadius":"10px","background":"#fff","width":"420px","height":"auto"}'>
  5. <div v-if="true" :style='{"padding":"10px 20px","margin":"0 0 20px 0","color":"#000","textAlign":"center","width":"100%","lineHeight":"40px","fontSize":"20px","fontWeight":"700","height":"auto"}' class="title-container">基于微信小程序的图书馆座位预约登录</div>
  6. <div v-if="loginType==1" class="list-item" :style='{"width":"100%","margin":"0 auto 10px","alignItems":"center","flexWrap":"wrap","display":"flex"}'>
  7. <div v-if="false" class="lable" :style='{"width":"64px","lineHeight":"44px","fontSize":"14px","color":"rgba(64, 158, 255, 1)"}'>用户名</div>
  8. <input :style='{"border":"0px solid rgba(64, 158, 255, 1)","padding":"0 10px","boxShadow":" 0px 4px 10px 0px rgba(0,0,0,0.3020)","color":"#333","outlineOffset":"4px","width":"100%","fontSize":"14px","height":"44px"}' placeholder="请输入用户名" name="username" type="text" v-model="rulesForm.username">
  9. </div>
  10. <div v-if="loginType==1" class="list-item" :style='{"width":"100%","margin":"0 auto 10px","alignItems":"center","flexWrap":"wrap","display":"flex"}'>
  11. <div v-if="false" class="lable" :style='{"width":"64px","lineHeight":"44px","fontSize":"14px","color":"rgba(64, 158, 255, 1)"}'>密码:</div>
  12. <input :style='{"border":"0px solid rgba(64, 158, 255, 1)","padding":"0 10px","boxShadow":" 0px 4px 10px 0px rgba(0,0,0,0.3020)","color":"#333","outlineOffset":"4px","width":"100%","fontSize":"14px","height":"44px"}' placeholder="请输入密码" name="password" type="password" v-model="rulesForm.password">
  13. </div>
  14. <div :style='{"width":"105%","padding":"0 10px","margin":"20px auto","height":"auto"}' v-if="roles.length>1" prop="loginInRole" class="list-type">
  15. <el-radio v-for="item in roles" v-bind:key="item.roleName" v-model="rulesForm.role" :label="item.roleName">{{item.roleName}}</el-radio>
  16. </div>
  17. <div :style='{"width":"100%","margin":"20px auto","alignItems":"center","flexWrap":"wrap","justifyContent":"flex-start","display":"flex"}'>
  18. <el-button v-if="loginType==1" :style='{"border":"0","cursor":"pointer","padding":"0 24px","margin":"0","outline":"none","color":"#fff","borderRadius":"0","background":"rgba(193, 44, 44, 1)","width":"100%","fontSize":"16px","fontWeight":"600","height":"44px"}' type="primary" @click="login()" class="loginInBt">登录</el-button>
  19. </div>
  20. <a href="http://www.java1234.com/a/bysj/javaweb/" target='_blank'><font color=red>Java1234收藏整理</font></a>
  21. </el-form>
  22. </div>
  23. </div>
  24. </template>
  25. <script>
  26. import menu from "@/utils/menu";
  27. export default {
  28. data() {
  29. return {
  30. baseUrl:this.$base.url,
  31. loginType: 1,
  32. rulesForm: {
  33. username: "",
  34. password: "",
  35. role: "",
  36. code: '',
  37. },
  38. menus: [],
  39. roles: [],
  40. tableName: "",
  41. codes: [{
  42. num: 1,
  43. color: '#000',
  44. rotate: '10deg',
  45. size: '16px'
  46. },{
  47. num: 2,
  48. color: '#000',
  49. rotate: '10deg',
  50. size: '16px'
  51. },{
  52. num: 3,
  53. color: '#000',
  54. rotate: '10deg',
  55. size: '16px'
  56. },{
  57. num: 4,
  58. color: '#000',
  59. rotate: '10deg',
  60. size: '16px'
  61. }],
  62. };
  63. },
  64. mounted() {
  65. let menus = menu.list();
  66. this.menus = menus;
  67. for (let i = 0; i < this.menus.length; i++) {
  68. if (this.menus[i].hasBackLogin=='是') {
  69. this.roles.push(this.menus[i])
  70. }
  71. }
  72. },
  73. created() {
  74. this.getRandCode()
  75. },
  76. destroyed() {
  77. },
  78. methods: {
  79. //注册
  80. register(tableName){
  81. this.$storage.set("loginTable", tableName);
  82. this.$storage.set("pageFlag", "register");
  83. this.$router.push({path:'/register'})
  84. },
  85. // 登陆
  86. login() {
  87. if (!this.rulesForm.username) {
  88. this.$message.error("请输入用户名");
  89. return;
  90. }
  91. if (!this.rulesForm.password) {
  92. this.$message.error("请输入密码");
  93. return;
  94. }
  95. if(this.roles.length>1) {
  96. if (!this.rulesForm.role) {
  97. this.$message.error("请选择角色");
  98. return;
  99. }
  100. let menus = this.menus;
  101. for (let i = 0; i < menus.length; i++) {
  102. if (menus[i].roleName == this.rulesForm.role) {
  103. this.tableName = menus[i].tableName;
  104. }
  105. }
  106. } else {
  107. this.tableName = this.roles[0].tableName;
  108. this.rulesForm.role = this.roles[0].roleName;
  109. }
  110. this.$http({
  111. url: `${this.tableName}/login?username=${this.rulesForm.username}&password=${this.rulesForm.password}`,
  112. method: "post"
  113. }).then(({ data }) => {
  114. if (data && data.code === 0) {
  115. this.$storage.set("Token", data.token);
  116. this.$storage.set("role", this.rulesForm.role);
  117. this.$storage.set("sessionTable", this.tableName);
  118. this.$storage.set("adminName", this.rulesForm.username);
  119. this.$router.replace({ path: "/index/" });
  120. } else {
  121. this.$message.error(data.msg);
  122. }
  123. });
  124. },
  125. getRandCode(len = 4){
  126. this.randomString(len)
  127. },
  128. randomString(len = 4) {
  129. let chars = [
  130. "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k",
  131. "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v",
  132. "w", "x", "y", "z", "A", "B", "C", "D", "E", "F", "G",
  133. "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R",
  134. "S", "T", "U", "V", "W", "X", "Y", "Z", "0", "1", "2",
  135. "3", "4", "5", "6", "7", "8", "9"
  136. ]
  137. let colors = ["0", "1", "2","3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f"]
  138. let sizes = ['14', '15', '16', '17', '18']
  139. let output = [];
  140. for (let i = 0; i < len; i++) {
  141. // 随机验证码
  142. let key = Math.floor(Math.random()*chars.length)
  143. this.codes[i].num = chars[key]
  144. // 随机验证码颜色
  145. let code = '#'
  146. for (let j = 0; j < 6; j++) {
  147. let key = Math.floor(Math.random()*colors.length)
  148. code += colors[key]
  149. }
  150. this.codes[i].color = code
  151. // 随机验证码方向
  152. let rotate = Math.floor(Math.random()*60)
  153. let plus = Math.floor(Math.random()*2)
  154. if(plus == 1) rotate = '-'+rotate
  155. this.codes[i].rotate = 'rotate('+rotate+'deg)'
  156. // 随机验证码字体大小
  157. let size = Math.floor(Math.random()*sizes.length)
  158. this.codes[i].size = sizes[size]+'px'
  159. }
  160. },
  161. }
  162. };
  163. </script>
  164. <style lang="scss" scoped>
  165. .container {
  166. min-height: 100vh;
  167. position: relative;
  168. background-repeat: no-repeat;
  169. background-position: center center;
  170. background-size: cover;
  171. background: url(http://codegen.caihongy.cn/20220730/9902656b81254c719937f2da32e6b42c.png);
  172. .list-item /deep/ .el-input .el-input__inner {
  173. border: 0px solid rgba(64, 158, 255, 1);
  174. padding: 0 10px;
  175. box-shadow: 0px 4px 10px 0px rgba(0,0,0,0.3020);
  176. color: #333;
  177. width: 100%;
  178. font-size: 14px;
  179. outline-offset: 4px;
  180. height: 44px;
  181. }
  182. .list-code /deep/ .el-input .el-input__inner {
  183. border: 0px solid rgba(64, 158, 255, 1);
  184. padding: 0 10px;
  185. box-shadow: 0px 4px 10px 0px rgba(0,0,0,0.3020);
  186. outline: none;
  187. color: #333;
  188. width: 100%;
  189. font-size: 14px;
  190. height: 44px;
  191. }
  192. .list-type /deep/ .el-radio__input .el-radio__inner {
  193. margin: 5px 0;
  194. background: rgba(53, 53, 53, 0);
  195. border-color: #666666;
  196. }
  197. .list-type /deep/ .el-radio__input.is-checked .el-radio__inner {
  198. margin: 5px 0;
  199. background: rgba(0, 0, 0, 1);
  200. border-color: rgba(0, 0, 0, 1);
  201. }
  202. .list-type /deep/ .el-radio__label {
  203. color: rgba(112, 112, 112, 1);
  204. font-size: 14px;
  205. }
  206. .list-type /deep/ .el-radio__input.is-checked+.el-radio__label {
  207. color: rgba(0, 0, 0, 1);
  208. font-size: 14px;
  209. }
  210. }
  211. </style>

源码下载

下载地址:
链接:https://pan.baidu.com/s/1WxuQDrQS204upRoyMhhg2A 
提取码:1234

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/小惠珠哦/article/detail/896320
推荐阅读
相关标签
  

闽ICP备14008679号