Bootstrap

基于SpringBoot网购商城管理系统的设计与实现

博主主页:一点源码
博主简介:专注Java技术领域和毕业设计项目实战、Java、微信小程序、安卓等技术开发,远程调试部署、代码讲解、文档指导、ppt制作等技术指导。
主要内容:毕业设计,SpringBoot、Vue、SSM、HLMT、Jsp、PHP、Python、Nodejs、小程序、安卓app、大数据等设计与开发

🍅文末获取联系🍅

项目介绍

系统根据现有的管理模块进行开发和扩展,采用面向对象的开发的思想和结构化的开发方法对轻院网购商城管理的现状进行系统调查。采用结构化的分析设计,该方法要求结合一定的图表,在模块化的基础上进行系统的开发工作。在设计中采用自下而上的思想,在轻院网购商城管理系统实现了用户、商品分类、商品信息、系统和订单等的功能性。

系统主要技术

开发语言:Java
 
使用框架:spring boot
 
前端技术:Vue 、css、element-ui、js、html
 
开发工具:IDEA/MyEclipse/Eclipse、Visual Studio Code
 
数据库:MySQL 5.7/8.0
 
数据库管理工具:phpstudy/Navicat
 
JDK版本:jdk1.8
 
Maven: apache-maven 3.8.1-bin

系统结构设计 

为了更好的去理清本系统整体思路,对该系统以结构图的形式表达出来,设计实现该轻院网购商城管理系统的功能结构图如下所示:

部分功能展示

5.1 前台用户功能模块

当游客打开系统的网址后,首先看到的就是首页界面。在这里,游客能够看到轻院网购商城管理系统的导航条显示首页、商品信息、系统公告、购物车、个人中心。系统首页界面如图5-1所示:

5-1 系统首页界面

在系统首页点击中间的注册/登录按钮,然后页面跳转到注册登录界面,后来输入信息完成后,单击注册或者登录操作,如图5-2所示:

5-2用户注册、用户登录界面

用户点击商品信息,在商品信息页面的搜索栏输入商品编号、商品名称,进行查询,然后查看商品编号、商品名称、商品分类、品牌、封面、规格、库存、单限、点击次数、价格、会员价,如有需要可以添加到购物车、立即购买或者收藏、评论等操作;如图5-3所示:

5-3商品信息页面

购物车:用户将想要购买的商品加入购物车,加入购物车后可以增减数量、删除、点击购买,可一键清除失效商品,如图5-4所示:

5-4购物车页面

在个人中心页面可以输入个人详细信息,进行信息更新,还可以对我的订单、我的地址、我的收藏进行详细操作,如图5-5所示:

  5-5 个人中心界面

5.2 后台管理员功能模块

管理员通过登录页面填写用户名和密码完成后进行登录,如图5-6所示。

5-6管理员登录页面

管理员登录进入轻院网购商城管理系统的实现可以查看系统首页、个人中心、用户管理、商品分类管理、商品信息管理、系统管理、订单管理等信息,如图5-7所示。

5-7管理员功能界面图

管理员点击用户管理;在用户管理页面对用户名、姓名、性别、年龄、手机号、是否会员等信息,进行查询,新增或删除用户信息等操作;如图5-8所示。

5-8用户管理界面图

管理员点击商品分类管理;在商品分类管理页面对商品分类等信息,进行查询,新增或删除商品分类等操作;如图5-9所示。

5-9商品分类管理界面图

管理员点击商品信息管理;在商品信息管理页面对商品编号、商品名称、商品分类、品牌、封面、规格、库存、单限、点击次数、价格、会员价等信息,进行查询,新增或删除商品信息等操作;如图5-10所示。

5-10商品信息管理界面图

管理员点击系统管理;在系统管理页面对关于我们、系统简介、轮播图管理、系统公告等信息,进行查询或删除系统信息等操作;如图5-11所示。

5-11系统管理界面图

管理员点击订单管理;在订单管理页面对已取消订单、已退款订单、未支付订单、已发货订单、已支付订单、已完成订单等信息,还可以查询或删除订单编号、商品名称等操作;如图5-12所示。

5-12订单管理界面图

部分代码实现 


 * @author 
 * @email 
 * @date 2021-03-05 14:09:24
 */
@RestController
@RequestMapping("/tuihuantushu")
public class TuihuantushuController {
    @Autowired
    private TuihuantushuService tuihuantushuService;
    
 
 
    /**
     * 后端列表
     */
    @RequestMapping("/page")
    public R page(@RequestParam Map<String, Object> params,TuihuantushuEntity tuihuantushu, HttpServletRequest request){
		String tableName = request.getSession().getAttribute("tableName").toString();
		if(tableName.equals("xuesheng")) {
			tuihuantushu.setXuehao((String)request.getSession().getAttribute("username"));
		}
        EntityWrapper<TuihuantushuEntity> ew = new EntityWrapper<TuihuantushuEntity>();
		PageUtils page = tuihuantushuService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, tuihuantushu), params), params));
 
        return R.ok().put("data", page);
    }
    
    /**
     * 前端列表
     */
    @RequestMapping("/list")
    public R list(@RequestParam Map<String, Object> params,TuihuantushuEntity tuihuantushu, HttpServletRequest request){
        EntityWrapper<TuihuantushuEntity> ew = new EntityWrapper<TuihuantushuEntity>();
		PageUtils page = tuihuantushuService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, tuihuantushu), params), params));
        return R.ok().put("data", page);
    }
 
	/**
     * 列表
     */
    @RequestMapping("/lists")
    public R list( TuihuantushuEntity tuihuantushu){
       	EntityWrapper<TuihuantushuEntity> ew = new EntityWrapper<TuihuantushuEntity>();
      	ew.allEq(MPUtil.allEQMapPre( tuihuantushu, "tuihuantushu")); 
        return R.ok().put("data", tuihuantushuService.selectListView(ew));
    }
 
	 /**
     * 查询
     */
    @RequestMapping("/query")
    public R query(TuihuantushuEntity tuihuantushu){
        EntityWrapper< TuihuantushuEntity> ew = new EntityWrapper< TuihuantushuEntity>();
 		ew.allEq(MPUtil.allEQMapPre( tuihuantushu, "tuihuantushu")); 
		TuihuantushuView tuihuantushuView =  tuihuantushuService.selectView(ew);
		return R.ok("查询退换图书成功").put("data", tuihuantushuView);
    }
	
    /**
     * 后端详情
     */
    @RequestMapping("/info/{id}")
    public R info(@PathVariable("id") Long id){
        TuihuantushuEntity tuihuantushu = tuihuantushuService.selectById(id);
        return R.ok().put("data", tuihuantushu);
    }
 
    /**
     * 前端详情
     */
    @RequestMapping("/detail/{id}")
    public R detail(@PathVariable("id") Long id){
        TuihuantushuEntity tuihuantushu = tuihuantushuService.selectById(id);
        return R.ok().put("data", tuihuantushu);
    }
    
 
 
 
    /**
     * 后端保存
     */
    @RequestMapping("/save")
    public R save(@RequestBody TuihuantushuEntity tuihuantushu, HttpServletRequest request){
    	tuihuantushu.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
    	//ValidatorUtils.validateEntity(tuihuantushu);
        tuihuantushuService.insert(tuihuantushu);
        return R.ok();
    }
    
    /**
     * 前端保存
     */
    @RequestMapping("/add")
    public R add(@RequestBody TuihuantushuEntity tuihuantushu, HttpServletRequest request){
    	tuihuantushu.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
    	//ValidatorUtils.validateEntity(tuihuantushu);
        tuihuantushuService.insert(tuihuantushu);
        return R.ok();
    }
 
    /**
     * 修改
     */
    @RequestMapping("/update")
    public R update(@RequestBody TuihuantushuEntity tuihuantushu, HttpServletRequest request){
        //ValidatorUtils.validateEntity(tuihuantushu);
        tuihuantushuService.updateById(tuihuantushu);//全部更新
        return R.ok();
    }
    
 
    /**
     * 删除
     */
    @RequestMapping("/delete")
    public R delete(@RequestBody Long[] ids){
        tuihuantushuService.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<TuihuantushuEntity> wrapper = new EntityWrapper<TuihuantushuEntity>();
		if(map.get("remindstart")!=null) {
			wrapper.ge(columnName, map.get("remindstart"));
		}
		if(map.get("remindend")!=null) {
			wrapper.le(columnName, map.get("remindend"));
		}
 
		String tableName = request.getSession().getAttribute("tableName").toString();
		if(tableName.equals("xuesheng")) {
			wrapper.eq("xuehao", (String)request.getSession().getAttribute("username"));
		}
 
		int count = tuihuantushuService.selectCount(wrapper);
		return R.ok().put("count", count);
	}
	
 
 
}

;