Git Product home page Git Product logo

liushu's Introduction

流书网-图书外卖

流书网-图书外卖

流书网-图书外卖

介绍

  • 名称由来: 流动书吧(简称:流书)
  • 简介:一个主要服务于校园的图书外卖平台,将图书借阅以外卖的形式进行交易。用户可在平台借阅、续借、归还图书,商家可出借、回收图书。该系统主要提供模拟平台线上必须、可行操作。
  • 模块设计:根据服务角色主要分为两个模块——用户模块和商家模块。采用前后端分离的设计,两个模块都有各自的前端项目,后端则采用统一项目。
  • 展示地址:校园图书外卖平台毕设展示_哔哩哔哩_bilibili

目录结构

backend                             -- 后端
└── liushu-main                     -- 核心模块
	├── src/main/java~
		├── annotation      -- 自定义注解
        ├── bo                      -- BO模块
        ├── config                  -- 配置模块
        ├── common                  -- 通用模块
        ├── controller              -- 表现层
        ├── dao                     -- 持久层
        ├── dto                     -- DTO模块
        ├── entity                  -- 实体类
        ├── filter                  -- 过滤器
        ├── service                 -- 业务层
        ├── util                    -- 工具模块
        ├── vo                      -- VO模块
        └── LiushuApplication.java  -- 项目入口
        src/main/resources
        └── application.yml         -- 项目配置文件
	└── pom.xml
frontend                            -- 前端
├── store_backstage                 -- 商家模块
└── user_model                      -- 用户模块
	├── public                  -- 外部静态资源
	├── src
		├── api             -- API模块
		├── assets          -- 内部静态资源
		├── router          -- 路由模块
		├── utils           -- 工具模块
        ├── components              -- 自定义组件
        ├── packages                -- 功能引入包
        ├── store                   -- VUEX模块
        ├── views                   -- 视图组件
        ├── App.vue                 -- 根组件
        └── main.js                 -- 入口文件
	└── vue.config.js           -- 项目配置
sql                                 -- 项目数据库
└── liushu.sql
  • backend存放项目后端项目,为maven结构
  • frontend存放项目前端项目,包含用户模块和商家模块的前端项目。
  • 数据库文件存放于sql,需使用MySQL8及以上版本,开发使用MySQL8.0.26

项目特点

  • 用户模块采用简约的UI设计,交互体验良好
  • 商家模块采用常见的后台管理系统设计,功能完善,体验良好
  • 注册使用邮箱+验证码进行身份确认注册(邮件美观)
  • 登录支持多账户统一登录,不同账号采用同一输入进行登录
  • 拥有图书推荐系统,多个召回通道,区分登录与未登录进行推荐(数据量小,效果不理想)
  • 即时通讯,满足用户与商家的即时沟通(基于腾讯IM服务开发)
  • 延时任务系统,采用时间轮算法进行设计,以满足延时任务监听的需求

技术支持

前端: vue + vuex + vue-router + axios + element + echarts

后端: SpringBoot + MyBatisPlus + Mysql + Mahout + Netty

其它: 腾讯IM服务

部署配置

前端配置

  • 用户模块user_model

    • /src/main.js

      // 根据自己的部署位置更改,如:部署位置域名 + '/api/img/'
      // 即将 http://localhost:8080 改为自己部署服务器访问域名
      Vue.prototype.$ossPath = 'http://localhost:8080/api/img/';
    • /src/utils/request.js

      const request = Axios.create({
        // 设置请求根路径
        // 将 http://localhost:8080 更改为后端部署位置访问路径
        baseURL: 'http://localhost:8080/api',
        // 跨域请求时发送Cookie
        withCredentials: true
      });
  • 商家模块store_backstage

    • /src/main.js

      // 将 http://localhost:8080 改为自己部署服务器访问域名
      Vue.prototype.$staticUrl = 'http://localhost:8080';
      
      Vue.prototype.$ossPath = 'http://localhost:8080/api/img/';
    • /src/utils/request.js

      const request = Axios.create({
        // 设置请求根路径
        // 将 http://localhost:8080 更改为后端部署位置访问路径
        baseURL: 'http://localhost:8080/api',
        // 跨域请求时发送Cookie
        withCredentials: true
      });

后端配置

详细要求可看application.yml注解

大致如下

# 端口
server:
  port: 8080
#  servlet:
#    context-path: /api

# 使用 smtp 协议
spring:
  # 应用名称
  application:
    name: liushu
  # 数据库配置
  datasource:
    druid:
      driver-class-name: com.mysql.cj.jdbc.Driver
      url: # 数据库链接
      username: # 数据库用户名
      password: # 数据库密码
  # 模板插件配置
  freemarker:
    template-loader-path: classpath:/templates/
  main:
    banner-mode: off
  # 邮件配置
  mail:
    # 选用QQ邮箱
    protocol: smtp
    host: smtp.qq.com
    # 端口号465或587
    port: 587
    # 发送方昵称
    nickname: 流书网-图书外卖
    # 发送方
    username: # 自己的邮箱服务器
    password: # 对应邮箱服务授权码
    test-connection: false
    default-encoding: UTF-8
    properties:
      mail:
        smtp:
          timeout: 10000
#          ssl:
#            # 打开ssl安全验证
#            enable: true
#            required: true
          socketFactory:
            class: javax.net.ssl.SSLSocketFactory
          # 设置是否需要认证,如果为true,那么用户名和密码就必须的,
          # 如果设置false,可以不设置用户名和密码,当然也得看你的对接的平台是否支持无密码进行访问的。
          auth: true
          starttls:
            enable: true
            required: true
        # 开启debug模式,这样邮件发送过程的日志会在控制台打印出来,方便排查错误
        debug: false
  #        mime:
  #          splitlongparameters: false
  # 线程池配置
  task:
    pool:
      # 核心线程数
      core-size: 10
      # 最大线程数
      max-size: 25
      # 线程队列大小
      queue-capacity: 10
      # 线程忍受空闲时间
      keep-alive: 60
    # 线程名称前缀
    thread-name-prefix:
      scheduled: liushu-task-
      timer-task: timer-task-


# Mybatis-Plus 配置
mybatis-plus:
  configuration:
    #在映射实体或者属性时,将数据库中表名和字段名中的下划线去掉,按照驼峰命名法映射
    map-underscore-to-camel-case: true
    log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
  global-config:
    db-config:
      id-type: ASSIGN_ID
    banner: false

# 项目自定义配置项
liushu:
  # 项目部署地址
  server-name: localhost # 本地部署
  # 项目静态资源(图书封面等)地址
  oss: # 自行配置一个本地路径
  # JWT相关配置
  jwt:
    # 签名秘钥,可自定义
    secret: # 自定义
    # 默认过期时间(s) => 1天(86400s), 30分钟(1800s)
    expires: 86400
  # 验证码相关配置
  captcha:
    # 验证码有效时间(单位:s)
    time: 300
  # TIM 服务
  tim:
    # APP ID
    SDKAPPID: # 腾讯IM服务应用APPID
    # 秘钥
    SECRETKEY: # 对应APPID的秘钥
    # 签名过期时间 7 x 24 x 60 x 60 = 604800 = 7 天
    EXPIRETIME: 604800
  # mail 相关
  mail:
    # 邮件发送模式
    # console - 控制台输出结果
    # send - 真实发送邮件
    mode: console
  # 推荐算法相关
  mahout:
    user:
      tourist-id: 2942
      # 用户邻居数
      nearest-num: 10
      # 保存的最新
      lately-num: 3
  # 喜好度分值
  preference:
    # 点击分值
    click: 1.0
    # 加入购物车分值
    add-cart: 2.0
    # 收藏
    collection: 3.0
    # 结算分值
    settlement: 4.0
  # 时间轮相关配置
  timing-wheel:
    # 延时时间(s)
    delay: 900
  order:
    # 订单逾期缓冲期限(天)
    overdue-period: 15
    # 到达一定的结点状态,用户无操作的缓冲期限(天)
    # 如,订单配送完成后,用户没有确认收货,7 天后,商家可自行确认收货,以便进入下一状态
    confirm-buff-day: 7
    # 售后订单退货预约上门时间缓冲期限 - 天(需在此时间内)
    aso-day: 7
  # 用户相关
  user:
    # 充值模式 infinite | limit | real
    recharge-mode: infinite
    # 单次充值最大值
    single-max: 1000
  admin:
    # 暂时未实现功能
    username: # 平台管理用户名
    password: # 平台管理密码
  # 平台账户
  account:
    # 流书网账户ID
    ls-id: 37
    # 每笔订单平台收取的服务费 -> 2%
    service-fee: 0.02

项目截图

用户模块

用户模块登录

用户模块首页

用户模块分类

用户模块个人

商家模块

商家模块登录

商家模块店铺

商家模块图书

邮件

验证码邮件

审核状态邮件

声明

本项目仅用于学习交流使用,请勿滥用,如滥用所造成一切后果自负。

liushu's People

Contributors

skmcj avatar

Stargazers

 avatar  avatar Goden avatar Two-Henuzwh avatar 老坛干脆面 avatar

Watchers

 avatar

Forkers

zhang2645795251

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.