大家好!我是程序猿老A,感谢您阅读本文,欢迎一键三连哦。
💞当前专栏:Java毕业设计
精彩专栏推荐👇🏻👇🏻👇🏻
开发环境
- 开发语言:Java
- 框架:ssm
- JDK版本:JDK1.8
- 服务器:tomcat7
- 数据库:mysql 5.7
- 数据库工具:Navicat12
- 开发软件:eclipse/myeclipse/idea
- Maven包:Maven3.3.9
- 浏览器:谷歌浏览器
源码下载地址:
https://download.csdn.net/download/m0_46388260/89271082
论文目录
【如需全文请按文末获取联系】
一、项目简介
本课题要求实现一套网上书城系统的设计与实现,系统主要分为前台和后台。主要包括前台:个人中心、后台管理、购物车、在线客服。后台:用户管理、图书信息管理、一级分类管理、二级分类管理、订单评价管理、图书统计管理、系统管理、订单管理等功能。
二、系统设计
2.1软件功能模块设计
根据我们对网上书城系统的功能要求进行分析,我们将本系统划分为以下几各主要的模块,如图4-1所示。
2.2数据库设计
(1)管理员数据E-R图,如图4-2所示:
(3)图书信息数据E-R图如图4-4所示:
(6)订单评价信息数据E-R图如图4-6所示:
三、系统项目部分截图
3.1前台功能模块
用户进入网上书城系统平台可以查看首页、图书信息、通知公告、个人中心、后台管理、购物车、在线客服等操作,系统前台主界面如图5-1所示。
用户通过登录界面,进行在线填写用户名和密码,信息输入完成后选择提交,用户登录完成,如果用户没有自己的账号,需要在线注册成为网站会员,用户进入到注册界面,进行填写用户的基本信息内容,信息编辑完成后选择提交,如图5-2所示。
用户通过图书列表可以查看网站已有的图书类别,用户根据需求可以进行在线选择分类进行查看图书,通过图书列表查看界面展示的图书信息,如图5-3所示,用户根据自己的需求可以点击商品图片进入到图书详情界面,通过详情界面获取到图书名称、商品价格、图书编号、一级分类、二级分类、作者、出版社、出版时间、点击次数等信息,根据需求在线加入购物车操作,也可结合需求进行在线购买、点我收藏等操作,如图5-4所示。
订单评价管理,用户根据自己的订单信息,可以进行订单评价操作,通过编辑订单编号、评价名称、图书评价、图书质量、综合评分、评语、账号、姓名等,信息编辑完成后进行提交,等待管理员审核完成后,通过前台的商品详情界面可以在线查看评论的内容,如图5-9所示。
3.2后台功能模块
管理员通过登录窗口进行输入自己的账号信息进行在线登录,登录完成后可以对系统所有的个人中心、用户管理、图书信息管理、一级分类管理、二级分类管理、订单评价管理、图书统计管理、系统管理、订单管理等功能模块进行在线编辑或者删除等操作。
用户管理,管理员根据需求可以在线查看系统已有的用户信息,用户名、密码、姓名、头像、性别、联系电话、邮箱、照片、地址等信息,并结合需求可以对已有的用户信息进行在线查看或者删除等操作,如图5-10所示。
图书信息管理,对于管理员可以查看系统所有的图书信息并对已有的图书信息进行编辑或者删除等操作,也可对已有的图书信息详情、修改或查看评论、删除操作,如图5-11所示,管理员根据需求可以在线添加新的商品信息,管理员进入到商品添加界面,编辑图书编号、图书名称、一级分类、二级分类、图片、作者、出版时间、简介等信息,信息编辑完成后核对信息无误后进行提交,新的图书信息添加完成,方便用户通过前台进行商品信息的查看等,如图5-12所示。
订单评价管理,订单评价数据信息都是由用户所购买的图书订单完成后所提交的订单评价,管理员根据用户提交的评价编号、图书名称、图书评价、图书质量、综合质量、综合评分、评语、账号、姓名等信息,管理员可以对已有的评价信息进行在线删除等操作,如图5-13所示。
四、部分核心代码
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.TushutongjiEntity;
import com.entity.view.TushutongjiView;
import com.service.TushutongjiService;
import com.service.TokenService;
import com.utils.PageUtils;
import com.utils.R;
import com.utils.MD5Util;
import com.utils.MPUtil;
import com.utils.CommonUtil;
/**
* 图书统计
* 后端接口
* @author
* @email
* @date 2021-03-23 23:49:23
*/
@RestController
@RequestMapping("/tushutongji")
public class TushutongjiController {
@Autowired
private TushutongjiService tushutongjiService;
/**
* 后端列表
*/
@RequestMapping("/page")
public R page(@RequestParam Map<String, Object> params,TushutongjiEntity tushutongji,
HttpServletRequest request){
EntityWrapper<TushutongjiEntity> ew = new EntityWrapper<TushutongjiEntity>();
PageUtils page = tushutongjiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, tushutongji), params), params));
return R.ok().put("data", page);
}
/**
* 前端列表
*/
@RequestMapping("/list")
public R list(@RequestParam Map<String, Object> params,TushutongjiEntity tushutongji, HttpServletRequest request){
EntityWrapper<TushutongjiEntity> ew = new EntityWrapper<TushutongjiEntity>();
PageUtils page = tushutongjiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, tushutongji), params), params));
return R.ok().put("data", page);
}
/**
* 列表
*/
@RequestMapping("/lists")
public R list( TushutongjiEntity tushutongji){
EntityWrapper<TushutongjiEntity> ew = new EntityWrapper<TushutongjiEntity>();
ew.allEq(MPUtil.allEQMapPre( tushutongji, "tushutongji"));
return R.ok().put("data", tushutongjiService.selectListView(ew));
}
/**
* 查询
*/
@RequestMapping("/query")
public R query(TushutongjiEntity tushutongji){
EntityWrapper< TushutongjiEntity> ew = new EntityWrapper< TushutongjiEntity>();
ew.allEq(MPUtil.allEQMapPre( tushutongji, "tushutongji"));
TushutongjiView tushutongjiView = tushutongjiService.selectView(ew);
return R.ok("查询图书统计成功").put("data", tushutongjiView);
}
/**
* 后端详情
*/
@RequestMapping("/info/{id}")
public R info(@PathVariable("id") Long id){
TushutongjiEntity tushutongji = tushutongjiService.selectById(id);
return R.ok().put("data", tushutongji);
}
/**
* 前端详情
*/
@RequestMapping("/detail/{id}")
public R detail(@PathVariable("id") Long id){
TushutongjiEntity tushutongji = tushutongjiService.selectById(id);
return R.ok().put("data", tushutongji);
}
/**
* 后端保存
*/
@RequestMapping("/save")
public R save(@RequestBody TushutongjiEntity tushutongji, HttpServletRequest request){
tushutongji.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
//ValidatorUtils.validateEntity(tushutongji);
tushutongjiService.insert(tushutongji);
return R.ok();
}
/**
* 前端保存
*/
@RequestMapping("/add")
public R add(@RequestBody TushutongjiEntity tushutongji, HttpServletRequest request){
tushutongji.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
//ValidatorUtils.validateEntity(tushutongji);
tushutongjiService.insert(tushutongji);
return R.ok();
}
/**
* 修改
*/
@RequestMapping("/update")
public R update(@RequestBody TushutongjiEntity tushutongji, HttpServletRequest request){
//ValidatorUtils.validateEntity(tushutongji);
tushutongjiService.updateById(tushutongji);//全部更新
return R.ok();
}
/**
* 删除
*/
@RequestMapping("/delete")
public R delete(@RequestBody Long[] ids){
tushutongjiService.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<TushutongjiEntity> wrapper = new EntityWrapper<TushutongjiEntity>();
if(map.get("remindstart")!=null) {
wrapper.ge(columnName, map.get("remindstart"));
}
if(map.get("remindend")!=null) {
wrapper.le(columnName, map.get("remindend"));
}
int count = tushutongjiService.selectCount(wrapper);
return R.ok().put("count", count);
}
}
获取源码或论文
如需对应的论文或源码,以及其他定制需求,也可以下方微❤联系。