基于SSH的母嬰用品銷售管理系統帶萬字文檔

文章目錄

  • 母嬰商城系統
    • 一、項目演示
    • 二、項目介紹
    • 三、系統部分功能截圖
    • 四、萬字論文參考
    • 五、部分代碼展示
    • 六、底部獲取項目源碼和萬字論文參考(9.9¥帶走)

母嬰商城系統

一、項目演示

母嬰商城系統

二、項目介紹

基于SSH的母嬰商城系統

系統角色 : 管理員、用戶

一,管理員
1、用戶登陸 2、商品展示 3、會員注冊 4、我的購物車 5、我的訂單 6、留言反饋 7、促銷信息

二,用戶
1、修改登陸密碼 2、商品類型管理 3、商品信息管理 4、會員信息管理 5、訂單信息管理 6、留言反饋管理 7、促銷信息管理

語言:java
技術棧:Spring;JSP; Struts2; hibernate
數據庫:MySQL

三、系統部分功能截圖

在這里插入圖片描述
在這里插入圖片描述
在這里插入圖片描述
在這里插入圖片描述
在這里插入圖片描述
在這里插入圖片描述
在這里插入圖片描述
在這里插入圖片描述

四、萬字論文參考

在這里插入圖片描述
在這里插入圖片描述

五、部分代碼展示

package com.itbaizhan.action;import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Iterator;
import java.util.List;
import java.util.Map;import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;import org.apache.struts2.ServletActionContext;import com.itbaizhan.dao.TGoodsDAO;
import com.itbaizhan.dao.TMingxiDAO;
import com.itbaizhan.dao.TOrderDAO;
import com.itbaizhan.model.TGoods;
import com.itbaizhan.model.THuiyuan;
import com.itbaizhan.model.TMingxi;
import com.itbaizhan.model.TOrder;
import com.itbaizhan.util.Cart;
import com.opensymphony.xwork2.ActionSupport;public class buyAction extends ActionSupport
{private TGoodsDAO goodsDAO;private TOrderDAO orderDAO;private TMingxiDAO mingxiDAO;private String message;private String path;public String addToCart(){HttpServletRequest request=ServletActionContext.getRequest();HttpSession session=request.getSession();int goodsId=Integer.parseInt(request.getParameter("goodsId"));int shuliang=Integer.parseInt(request.getParameter("shuliang"));TGoods goods=goodsDAO.findById(goodsId);TMingxi mingxi=new TMingxi();mingxi.setGoods(goods);mingxi.setGoodsShuliang(shuliang);Cart cart = (Cart)session.getAttribute("cart");cart.addGoods(goodsId, mingxi);session.setAttribute("cart",cart);this.setMessage("成功購物");this.setPath("myCart.action");return "succeed";}public String myCart(){return ActionSupport.SUCCESS;}public String orderQueren(){Map request=(Map)ServletActionContext.getContext().get("request");return ActionSupport.SUCCESS;}public String orderSubmit(){HttpServletRequest request=ServletActionContext.getRequest();HttpSession session=request.getSession();Cart cart = (Cart)session.getAttribute("cart");THuiyuan huiyuan=(THuiyuan)session.getAttribute("huiyuan");TOrder order=new TOrder();//order.setId(id);order.setBianhao(new SimpleDateFormat("yyyyMMddhhmmss").format(new Date()));order.setXiadanshi(new SimpleDateFormat("yyyy-MM-dd hh:mm:ss").format(new Date()));order.setZt("待受理");order.setSonghuodizhi(request.getParameter("songhuodizhi"));order.setFukuanfangshi(request.getParameter("fukuanfangshi"));order.setZongjia(cart.getTotalPrice());order.setHuiyuanId(huiyuan.getId());orderDAO.save(order);for (Iterator it = cart.getItems().values().iterator(); it.hasNext();){TMingxi mingxi = (TMingxi) it.next();mingxi.setOrderId(order.getId());mingxi.setGoodsId(mingxi.getGoods().getId());mingxiDAO.save(mingxi);}cart.getItems().clear();session.setAttribute("cart", cart);request.setAttribute("order", order);return ActionSupport.SUCCESS;}public String orderMine(){Map session= ServletActionContext.getContext().getSession();THuiyuan huiyuan=(THuiyuan)session.get("huiyuan");String sql="from TOrder where huiyuanId="+huiyuan.getId();List orderList=orderDAO.getHibernateTemplate().find(sql);Map request=(Map)ServletActionContext.getContext().get("request");request.put("orderList", orderList);return ActionSupport.SUCCESS;}public String orderDel(){HttpServletRequest request=ServletActionContext.getRequest();int id=Integer.parseInt(request.getParameter("id"));TOrder order=orderDAO.findById(id);orderDAO.delete(order);this.setMessage("訂單刪除完畢");this.setPath("orderMine.action");return "succeed";}public String orderMana(){String sql="from TOrder";List orderList=orderDAO.getHibernateTemplate().find(sql);Map request=(Map)ServletActionContext.getContext().get("request");request.put("orderList", orderList);return ActionSupport.SUCCESS;}public String orderShouli(){HttpServletRequest request=ServletActionContext.getRequest();int id=Integer.parseInt(request.getParameter("id"));TOrder order=orderDAO.findById(id);order.setZt("已受理");orderDAO.attachDirty(order);request.setAttribute("msg", "受理訂單成功");return "msg";}public String orderDetail(){HttpServletRequest request=ServletActionContext.getRequest();int orderId=Integer.parseInt(request.getParameter("orderId"));String sql="from TMingxi where orderId="+orderId;List mingxiList=mingxiDAO.getHibernateTemplate().find(sql);for(int i=0;i<mingxiList.size();i++){TMingxi mingxi=(TMingxi)mingxiList.get(i);mingxi.setGoods(goodsDAO.findById(mingxi.getGoodsId()));}request.setAttribute("mingxiList", mingxiList);return ActionSupport.SUCCESS;}public TGoodsDAO getGoodsDAO(){return goodsDAO;}public TMingxiDAO getMingxiDAO(){return mingxiDAO;}public void setMingxiDAO(TMingxiDAO mingxiDAO){this.mingxiDAO = mingxiDAO;}public void setGoodsDAO(TGoodsDAO goodsDAO){this.goodsDAO = goodsDAO;}public TOrderDAO getOrderDAO(){return orderDAO;}public void setOrderDAO(TOrderDAO orderDAO){this.orderDAO = orderDAO;}public String getMessage(){return message;}public void setMessage(String message){this.message = message;}public String getPath(){return path;}public void setPath(String path){this.path = path;}}
package com.itbaizhan.action;import java.util.List;
import java.util.Map;import org.apache.struts2.ServletActionContext;import com.itbaizhan.dao.TCuxiaoDAO;
import com.itbaizhan.dao.TGoodsDAO;
import com.itbaizhan.model.TCuxiao;
import com.opensymphony.xwork2.ActionSupport;public class cuxiaoAction extends ActionSupport
{private Integer id;private String biaoti;private String neirong;private String fabushi;private TCuxiaoDAO cuxiaoDAO;public String cuxiaoAdd(){TCuxiao cuxiao=new TCuxiao();cuxiao.setBiaoti(biaoti);cuxiao.setNeirong(neirong);cuxiao.setFabushi(fabushi);cuxiaoDAO.save(cuxiao);Map request=(Map)ServletActionContext.getContext().get("request");request.put("msg", "信息添加完畢");return "msg";}public String cuxiaoMana(){String sql="from TCuxiao";List cuxiaoList=cuxiaoDAO.getHibernateTemplate().find(sql);Map request=(Map)ServletActionContext.getContext().get("request");request.put("cuxiaoList", cuxiaoList);return ActionSupport.SUCCESS;}public String cuxiaoDel(){TCuxiao cuxiao=cuxiaoDAO.findById(id);cuxiaoDAO.delete(cuxiao);Map request=(Map)ServletActionContext.getContext().get("request");request.put("msg", "信息刪除完畢");return "msg";}public String cuxiaoAll(){String sql="from TCuxiao";List cuxiaoList=cuxiaoDAO.getHibernateTemplate().find(sql);Map request=(Map)ServletActionContext.getContext().get("request");request.put("cuxiaoList", cuxiaoList);return ActionSupport.SUCCESS;}public String cuxiaoDetailQian(){TCuxiao cuxiao=cuxiaoDAO.findById(id);Map request=(Map)ServletActionContext.getContext().get("request");request.put("cuxiao", cuxiao);return ActionSupport.SUCCESS;}public Integer getId(){return id;}public void setId(Integer id){this.id = id;}public String getBiaoti(){return biaoti;}public void setBiaoti(String biaoti){this.biaoti = biaoti;}public String getNeirong(){return neirong;}public void setNeirong(String neirong){this.neirong = neirong;}public String getFabushi(){return fabushi;}public void setFabushi(String fabushi){this.fabushi = fabushi;}public TCuxiaoDAO getCuxiaoDAO(){return cuxiaoDAO;}public void setCuxiaoDAO(TCuxiaoDAO cuxiaoDAO){this.cuxiaoDAO = cuxiaoDAO;}}
package com.itbaizhan.action;import java.util.List;
import java.util.Map;import javax.servlet.http.HttpServletRequest;import org.apache.struts2.ServletActionContext;import com.itbaizhan.dao.TGoodsDAO;
import com.itbaizhan.model.TGoods;
import com.itbaizhan.util.Pagesize;
import com.itbaizhan.util.Pagination;
import com.opensymphony.xwork2.ActionSupport;public class goodsAction extends ActionSupport
{private Integer id;private Integer leibieId;private String mingcheng;private String jieshao;private String fujian;private Integer jiage;private Integer tejia;private String shifoutejia;private String del;private TGoodsDAO goodsDAO;public String goodsAdd(){TGoods goods=new TGoods();//goods.setId(id);goods.setLeibieId(leibieId);goods.setMingcheng(mingcheng);goods.setJieshao(jieshao);goods.setFujian(fujian);goods.setJiage(jiage);goods.setTejia(jiage);goods.setShifoutejia("no");goods.setDel("no");goodsDAO.save(goods);Map request=(Map)ServletActionContext.getContext().get("request");request.put("msg", "信息添加成功");return "msg";}public String goodsMana(){String sql="from TGoods where del='no' order by leibieId";List goodsList=goodsDAO.getHibernateTemplate().find(sql);Map request=(Map)ServletActionContext.getContext().get("request");request.put("goodsList", goodsList);return ActionSupport.SUCCESS;}public String goodsDel(){TGoods goods=goodsDAO.findById(id);goods.setDel("yes");goodsDAO.attachDirty(goods);Map request=(Map)ServletActionContext.getContext().get("request");request.put("msg", "信息刪除成功");return "msg";}public String goodsAll(){String sql="from TGoods where del='no' order by id desc";List goodsList=goodsDAO.getHibernateTemplate().find(sql);HttpServletRequest request=ServletActionContext.getRequest();int index=0;if(request.getParameter("index")==null){index=1;}else{index=Integer.parseInt(request.getParameter("index"));}int fromIndex = (index - 1) * Pagesize.size;int toIndex = Math.min(fromIndex + Pagesize.size, goodsList.size());List goodsList1 = goodsList.subList(fromIndex, toIndex);Pagination p = new Pagination();p.setIndex(index);p.setPageSize(Pagesize.size);p.setTotle(goodsList.size());p.setData(goodsList1);request.setAttribute("page", p);return ActionSupport.SUCCESS;}public String goodsDetailQian(){TGoods goods=goodsDAO.findById(id);Map request=(Map)ServletActionContext.getContext().get("request");request.put("goods", goods);return ActionSupport.SUCCESS;}public String goodsByLeibie(){String sql="from TGoods where del='no' and leibieId=?";Object[] con={leibieId};Map request=(Map)ServletActionContext.getContext().get("request");List goodsList=goodsDAO.getHibernateTemplate().find(sql,con);request.put("goodsList", goodsList);System.out.println(goodsList.size()+"&&");return ActionSupport.SUCCESS;}public String goodsRes(){String sql="from TGoods where del='no' and mingcheng like '%"+mingcheng.trim()+"%'";List goodsList=goodsDAO.getHibernateTemplate().find(sql);Map request=(Map)ServletActionContext.getContext().get("request");request.put("goodsList", goodsList);return ActionSupport.SUCCESS;}public Integer getLeibieId(){return leibieId;}public void setLeibieId(Integer leibieId){this.leibieId = leibieId;}public Integer getId(){return id;}public void setId(Integer id){this.id = id;}public String getMingcheng(){return mingcheng;}public void setMingcheng(String mingcheng){this.mingcheng = mingcheng;}public String getJieshao(){return jieshao;}public void setJieshao(String jieshao){this.jieshao = jieshao;}public String getFujian(){return fujian;}public void setFujian(String fujian){this.fujian = fujian;}public Integer getJiage(){return jiage;}public void setJiage(Integer jiage){this.jiage = jiage;}public Integer getTejia(){return tejia;}public void setTejia(Integer tejia){this.tejia = tejia;}public String getShifoutejia(){return shifoutejia;}public void setShifoutejia(String shifoutejia){this.shifoutejia = shifoutejia;}public String getDel(){return del;}public void setDel(String del){this.del = del;}public TGoodsDAO getGoodsDAO(){return goodsDAO;}public void setGoodsDAO(TGoodsDAO goodsDAO){this.goodsDAO = goodsDAO;}}

六、底部獲取項目源碼和萬字論文參考(9.9¥帶走)

有問題,或者需要協助調試運行項目的也可以

本文來自互聯網用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務,不擁有所有權,不承擔相關法律責任。
如若轉載,請注明出處:http://www.pswp.cn/web/15382.shtml
繁體地址,請注明出處:http://hk.pswp.cn/web/15382.shtml
英文地址,請注明出處:http://en.pswp.cn/web/15382.shtml

如若內容造成侵權/違法違規/事實不符,請聯系多彩編程網進行投訴反饋email:809451989@qq.com,一經查實,立即刪除!

相關文章

Tina-Linux -- 3. LVGL測試

參考韋東山 – Tina_Linux_圖形系統_開發指南 Tina-linux lvgl 配置 環境配置 進入Tina-SDK根目錄 source build/envsetup.sh lunch XXX平臺名稱 make menuconfigLVGL Gui --->Littlevgl --->< > lv_demo<*> lv_examples &#xff08;lvgl官方demo&#…

【區塊鏈】fisco節點運維 更新ing

基于已完成的區塊鏈系統與管理平臺搭建工作&#xff0c;開展區塊鏈節點的加入與退出運維工作&#xff0c;具體內容如下 以下只是舉例子講 如果有其他修改沒舉例出來可以留言 私信 主要以比賽出題的形式講 區塊鏈節點輸出等級為警告級&#xff0c;并設置日志存儲閾值為100MB并…

主機與VMware虛擬機共享文件夾

虛擬機M --> 設置 --> 選項 --> 共享文件夾 虛擬機里的共享文件夾需要掛載 sudo mount -t fuse.vmhgfs-fuse .host:/ /mnt/hgfs -o allow_other from 主機與VMware虛擬機共享文件夾&#xff1a;解決虛擬機找不到共享文件夾問題 - 知乎

C++實現的代碼行數統計器

代碼在GitHubMaolinYe/CodeCounter: C20實現的代碼統計器&#xff0c;代碼量小于100行&#xff0c;可以統計目錄下所有代碼文件的行數 (github.com) 前段時間到處面試找實習&#xff0c;有技術負責人的負責人問我C寫過多少行&#xff0c;5萬還是10萬&#xff0c;用來評估熟練度…

Capture One Studio for Mac:打造完美影像的利器

對于攝影師而言&#xff0c;每一次按下快門都是一次對完美影像的追求。而Capture One Studio for Mac正是這樣一款能夠幫助你實現這一追求的利器。 Capture One Studio for Mac v16.4.2.1中文直裝版下載 首先&#xff0c;Capture One Studio for Mac擁有出色的圖像處理能力。它…

從零起航,Python編程全攻略

新書上架~&#x1f447;全國包郵奧~ python實用小工具開發教程http://pythontoolsteach.com/3 歡迎關注我&#x1f446;&#xff0c;收藏下次不迷路┗|&#xff40;O′|┛ 嗷~~ 目錄 一、Python入門之旅 二、Python進階之道 三、Python爬蟲實戰 四、Python數據分析利器 五…

kind: Telemetry

訪問日志 訪問日志提供了一種從單個工作負載實例的角度監控和理解行為的方法。 Istio 能夠以一組可配置的格式為服務流量生成訪問日志&#xff0c; 使操作員可以完全控制日志記錄的方式、內容、時間和地點。 有關更多信息&#xff0c;請參閱獲取 Envoy 的訪問日志。 https:/…

TS+elementUI的表格做form校驗寫法(手機/郵箱號驗證)

1.form表單寫法 <template><div style"height:100%;width:100%;position:relative"><el-dialog title"編輯" :visible.sync"dialogVisible" width15% :close-on-click-modalfalse><el-form :model"form" :rule…

模塊化程序設計(函數的定義、調用、參數傳遞、局部變量、全局變量)

函數的引入&#xff1a; 我們曾經學習了程序設計中的三種基本控制結構&#xff08;順序、分支、循環&#xff09;。用它們可以組成任何程序。但在應用中&#xff0c;還經常用到子程序結構。 通常&#xff0c;在程序設計中&#xff0c;我們會發現一些程序段在程序的不同地方反復…

[python]當你認為python字符串的strip()或replace()不能刪除空格或者換行符的時候,看這里

str "123 abc\r\n" 當你調用 str.strip() 或 str.replace("\n","")之后&#xff0c;發現空格或換行符還存在&#xff0c; 是因為strip()和replace()沒有改變str本身的值&#xff0c;需要這樣重新賦值&#xff1a; str str.strip() ...

RabbitMQ 發布訂閱

RabbitMQ 發布訂閱視頻學習地址&#xff1a; 簡單模式下RabbitMQ 發布者發布消息 消費者消費消息 Publist/Subscribe 發布訂閱 在 RabbitMQ 中&#xff0c;發布訂閱模式是一種消息傳遞方式&#xff0c;其中發送者&#xff08;發布者&#xff09;不會將消息直接發送到特 定的…

基于open3d對kitti數據集檢測結果可視化

前言 KITTI數據集是自動駕駛和計算機視覺領域中一個廣泛使用的基準數據集&#xff0c;它提供了豐富的傳感器數據&#xff0c;包括激光雷達、相機和GPS等。Open3D是一個功能強大的3D數據處理和可視化庫&#xff0c;支持多種3D數據格式。本文將介紹如何使用Open3D對KITTI數據集的…

Python常見數據類型處理

一、數據類型分類 Python3 中常見的數據類型有&#xff1a; Number&#xff08;數字&#xff09;String&#xff08;字符串&#xff09;bool&#xff08;布爾類型&#xff09;List&#xff08;列表&#xff09;Tuple&#xff08;元組&#xff09;Set&#xff08;集合&#xf…

詳解 Spring MVC(Spring MVC 簡介)

什么是 Spring MVC&#xff1f; Spring MVC 是 Spring 框架提供的一個基于 MVC 模式的輕量級 Web 框架&#xff0c;是 Spring 為表示層開發提供的一整套完整的解決方案&#xff0c;Spring MVC 使用了 MVC 架構模式&#xff0c;將 Web 層職責解耦&#xff0c;基于請求驅動模型&…

基于Java、SpringBoot和uniapp在線考試系統安卓APP和微信小程序

摘要 基于Java、SpringBoot和uniapp的在線考試系統安卓APP微信小程序是一種結合了現代Web開發技術和移動應用技術的解決方案&#xff0c;旨在為教育機構提供一個方便、高效和靈活的在線考試平臺。該系統采用Java語言進行后端開發&#xff0c;使用SpringBoot框架簡化企業級應用…

SpringCloud微服務之Nacos、Feign、GateWay詳解

SpringCloud微服務之Nacos、Feign、GateWay詳解 1、Nacos配置管理1.1、統一配置管理1.1.1、在nacos中添加配置文件1.1.2、從微服務拉取配置 1.2、配置熱更新1.2.1、方式一1.2.2、方式二 1.3、配置共享1.3.1、配置共享的優先級 1.4、搭建nacos集群1.4.1、初始化數據庫1.4.2、下載…

plt多子圖設置

import matplotlib.pyplot as plt# 使用 subplots 函數創建一個 2x3 的子圖網格 fig, axs plt.subplots(nrows2, ncols3, figsize(16, 10)) # 調整 figsize 來改變圖像大小# 遍歷每個子圖&#xff0c;并繪制一些內容&#xff08;這里只是簡單的示例&#xff09; for ax in ax…

React與Vue的區別?

一、區別: 1. 語法 Vue采用自己特有的模板語法&#xff1b; React是單向的&#xff0c;采用jsx語法創建react元素。 2.監聽數據變化的實現原理不同 Vue2.0 通過Object.defineproperty()方法的getter/setter屬性, 實現數據劫持, 每次修改完數據會觸發diff算法(雙端對比) …

VUE 頁面生命周期基本知識點

在 Vue.js 中&#xff0c;頁面生命周期&#xff08;更準確地說是組件生命周期&#xff09;指的是組件從創建到銷毀的一系列過程。了解這些生命周期鉤子可以幫助我們更好地管理組件的狀態和行為。以下是 Vue 組件的主要生命周期鉤子&#xff1a; beforeCreate 在實例初始化之后&…

vue使用element plus組件上傳服務器

在Vue項目中使用Element Plus組件上傳文件到服務器&#xff0c;你可以使用ElUpload組件。以下是一個簡單的示例&#xff0c;展示了如何使用ElUpload組件來上傳文件&#xff0c;并將其保存到服務器。 首先&#xff0c;確保你已經安裝了Element Plus。 npm install element-plu…