基于javaweb+SpringBoot+MyBatis在线购物商城shop系统(仅前台购物)

开发工具:eclipse/idea/myeclipse/sts等均可配置运行

适用

课程设计,大作业,毕业设计,项目练习,学习演示等

            <img th:src="${productCategory.bannerImg}" width="1200" /></div><div class="i_t mar_10"><span class="floor_num" th:text="${productCategory.name}"></span> <span class="fl" th:text="${productCategory.name}">笔记本</span></div><div class="content"><div class="fresh_left"><div class="fre_ban"><div id="imgPlay1" class="imgPlay1"><ul class="imgs" id="actor1"><li><img th:src="${productCategory.topImg}" width="211"/></li></ul></div></div></div><div class="fresh_mid"><ul><li th:each="productVO:${productCategory.productVOList}"><div class="name"><a th:href="'/product/findById/'+${productVO.id}" th:text="${productVO.name}"></a></div><div class="price"><font>¥<span th:text="${productVO.price}">206</span></font> &nbsp;</div><div class="img">
import com.demo.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;import javax.servlet.http.HttpSession;@Controller
@RequestMapping("/user")
    @GetMapping("/deleteById/{id}")public String deleteById(@PathVariable("id") Integer id){cartService.removeById(id);return "redirect:/cart/findAllCart";}@GetMapping("/settlement2")public ModelAndView settlement2(HttpSession session){ModelAndView modelAndView = new ModelAndView();modelAndView.setViewName("settlement2");User user = (User)session.getAttribute("user");modelAndView.addObject("cartList",cartService.findAllCartVOByUserId(user.getId()));QueryWrapper wrapper = new QueryWrapper();wrapper.eq("user_id",user.getId());modelAndView.addObject("addressList",userAddressService.list(wrapper));return modelAndView;}@PostMapping("/update/{id}/{quantity}/{cost}")@ResponseBodypublic String updateCart(@PathVariable("id") Integer id,@PathVariable("quantity") Integer quantity,@PathVariable("cost") Float cost){Cart cart = cartService.getById(id);
        </div></div><script type="text/javascript">function settlement3() {$("#form").submit();}</script>
</div><th:block th:include="common.html :: footer"></th:block>
<th:block th:include="common.html :: permit"></th:block></body>
</html>
<!DOCTYPE html>
            result = userService.save(user);} catch (Exception e) {model.addAttribute("error", user.getLoginName() + "已存在!请重新输入!");return "register";}if (result) return "login";return "register";}/*** 登录** @param loginName* @param password* @param session* @return
        QueryWrapper wrapper = new QueryWrapper();wrapper.eq("login_name", loginName);wrapper.eq("password", password);User user = userService.getOne(wrapper);if (user == null) {return "login";} else {session.setAttribute("user", user);return "redirect:/productCategory/list";}}/*** 退出** @param session
package com.demo.controller;import com.demo.entity.Orders;
import com.demo.entity.User;
import com.demo.service.CartService;
import com.demo.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;import javax.servlet.http.HttpSession;@Controller
@RequestMapping("/orders")
public class OrderController {@Autowiredprivate OrderService orderService;@Autowiredprivate CartService cartService;@PostMapping("/settlement3")
<div class="configHead"><div class="i_bg bg_color"><div class="i_ban_bg"><div class="banner" style="width: 978px"><div class="top_slide_wrap" style="width: 978px"><ul class="slide_box bxslider" style="width: 978px"><li><img src="/images/1.png" width="978" height="401" /></li><li><img src="/images/2.png" width="978" height="401" /></li><li><img src="/images/3.png" width="978" height="401" /></li></ul><div class="op_btns clearfix" style="width: 978px"><a href="#" class="op_btn op_prev"><span></span></a> <a href="#"class="op_btn op_next"><span></span></a></div></div></div><script type="text/javascript">var jq2 = jQuery.noConflict();(function() {$(".bxslider").bxSlider({auto : true,prevSelector : jq2(".top_slide_wrap .op_prev")[0],nextSelector : jq2(".top_slide_wrap .op_next")[0]
            </form></div><div class="i_car"><a href="/cart/findAllCart"><div class="car_t">购物车 [<span th:text="${cartList.size()}"></span>]</div></a><div class="car_bg"><div class="un_login">我的购物车</div><ul class="cars"><li th:each="cart:${cartList}"><div class="img"><a th:href="'/product/findById/'+${cart.productId}"><img th:src="'/images/'+${cart.fileName}" width="58" height="58" /></a></div><div class="name"><a th:href="'/product/findById/'+${cart.productId}" th:text="${cart.name}"></a></div><div class="price"><font color="#ff4e00" th:text="'¥'+${cart.price}"></font> X <span class="quantity" th:text="${cart.quantity}"></span>  =  <span class="cost" th:text="${cart.cost}"></span></div></li>
        ModelAndView modelAndView = new ModelAndView();modelAndView.setViewName("userInfo");modelAndView.addObject("cartList", cartService.findAllCartVOByUserId(user.getId()));return modelAndView;}
}package com.demo.service.impl;import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.demo.common.exception.MallException;
import com.demo.entity.Cart;
import com.demo.entity.Product;
import com.demo.common.enums.ResultEnum;
import com.demo.mapper.CartMapper;
import com.demo.mapper.ProductMapper;
import com.demo.service.CartService;
import com.demo.vo.CartVO;
import lombok.extern.slf4j.Slf4j;
                        </td><td align="center" th:text="${cart.quantity}"></td><td align="center" class="qprice" style="color:#ff4e00;" th:text="'¥'+${cart.cost}"></td></tr></table><div class="two_t"><span class="fr"></span>收货人信息</div><table border="0" class="peo_tab" style="width:1110px;" cellspacing="0" cellpadding="0"><tr><td class="p_td" width="160">用户名称</td><td width="395" th:text="${session.user.userName}"></td><td class="p_td">登录名称</td><td th:text="${session.user.loginName}"></td></tr><tr><td class="p_td">手机</td><td th:text="${session.user.mobile}"></td><td class="p_td" width="160">电子邮件</td>

运行环境

Java≥8、MySQL≥5.5

开发工具

eclipse/idea/myeclipse/sts等均可配置运行

技术框架

HTML CSS JavaScript jQuery LayUI thymeleaf SpringBoot SpringMVC MyBatis

适用

课程设计,大作业,毕业设计,项目练习,学习演示等

功能说明

用户:登录、注册、商品查询与下单、购物车管理


基于javaweb+SpringBoot+MyBatis在线购物商城shop系统(仅前台购物)相关推荐

  1. 基于javaweb+mysql的在线购物商城shop系统(仅前台购物)

    基于javaweb+mysql的在线购物商城shop系统(仅前台购物) 运行环境 Java≥8.MySQL≥5.7 开发工具 eclipse/idea/myeclipse/sts等均可配置运行 适用 ...

  2. 基于javaweb+springboot的水果商城在线商城(java+Springboot+ssm+mysql+jsp+maven)

    基于javaweb+springboot的水果商城在线商城(java+Springboot+ssm+mysql+jsp+maven) 一.项目简述 本系统主要实现的功能有: 前台用户的登录注册,水果商 ...

  3. 基于javaweb的水果店商城超市系统(java+ssm+jsp+ajax+jquery+mysql)

    基于javaweb的水果店商城超市系统(java+ssm+jsp+ajax+jquery+mysql) 运行环境 Java≥8.MySQL≥5.7.Tomcat≥8 开发工具 eclipse/idea ...

  4. 基于javaweb+springboot的医院预约挂号系统(java+Springboot+jsp+maven+layui+mysql)

    基于javaweb+springboot的医院预约挂号系统(java+Springboot+jsp+maven+layui+mysql) 一.项目简述 功能包括: 用户分为患者,医生,管理员,患者可进 ...

  5. 基于javaweb(springboot+mybatis)网上家具商城项目设计和实现以及文档报告

    具体功能模块: (1) 用户注册和登录登录功能: ①用户的注册功能 : 访问网站的人根据网站的提示注册自己的账户 ②用户的登录功能 : 用户可以输入用户名和密码进行登录操作,当没有该账户的时 候,提示 ...

  6. 基于javaweb(springboot+mybatis)宠物医院预约管理系统设计和实现

    本项目演示链接地址> 项目使用java SpringMVC.springboot mybatis.layui为核心技术编写 多的不说,直接上一部分效果图吧 首页登录有可爱的小猫咪 系统主页主要功 ...

  7. 基于javaweb(springboot+mybatis)网上酒类商城项目设计和实现以及文档报告

  8. 基于JAVA+SpringBoot+Mybatis+MYSQL的个人理财系统

    项目功能: 系统分为用户和管理员两种角色,用户端功能:登录注册.个人理财(零钱理财.工资理财.期限理财.基金理财.银行推荐).金融工具(资金记录.安全网贷).个人中心(我的理财.我的借贷.银行卡管理. ...

  9. 基于javaweb(springboot+mybatis)宠物医院预约管理系统设计和实现以及论文报告

最新文章

  1. 玩转Spring Cloud之配置中心(config server config client)
  2. ios辅助功能之voiceover实战
  3. linux线程关闭信号,Linux/UNIX用同步方法处理异步信号
  4. debug —— set args调试命令(作为程序运行时的参数)
  5. 深入理解分布式技术 - 负载均衡实现之一致性哈希算法
  6. 客户机系统已禁用cpu_Metricbeat System process metricset系统进程监控参数详情
  7. Remoting 配置格式说明(转)
  8. java issynthetic_java.lang.reflect.Constructor.isSynthetic()方法示例
  9. 编译maven_头条一面竟然问我Maven?
  10. PHP: 深入pack/unpack
  11. 第二季1:图像基础知识
  12. 用GDB调试Segmentation Fault错误
  13. java基础入门之数组循环初始化
  14. ISO 19011 《管理体系审核指南》
  15. 人脸识别中常用的人脸检测和人脸对齐
  16. CSS3时光流逝效果
  17. 当web应用包含了websocket长连接,如何在web应用前加一层nginx转发
  18. 关于 360 评估你可能不知道的事
  19. 2019上半年阿里,腾讯,百度,美团,头条等技术面试题目,以及答案,专家出题人分析汇总...
  20. 主攻文推荐攻守都有系统_第五十五章 攻守转换

热门文章

  1. Linux删除带锁文件夹和无权限文件夹
  2. hexo-添加图片,音乐,链接,视频
  3. CSS-设置超链接样式
  4. Spark 集群模式概述
  5. 教你让Ubuntu中文程序远离乱码
  6. CollectGarbage函数--JS清理垃圾,内存释放
  7. AI金融:利用LSTM预测股票每日最高价
  8. 我推出了微博寻人在线系统
  9. 谷歌公布 12 月 14 日服务器宕机的主要技术原因
  10. 参观用友(UFIDA)产业园流水账~~