基于java开发的服装销售管理系统毕业设计以及源码


基于Java的服装销售管理系统,适用于毕业设计和课程报告,有详细的源码和论文文字,下载下来直接用。



有问题可以私聊我
资源截图
代码片段和文件信息
package com.restrant.action;

import java.util.HashMap;
import java.util.Map;
import org.apache.struts2.interceptor.SessionAware;
import com.opensymphony.xwork2.ActionSupport;
import com.restrant.biz.MealBiz;
import com.restrant.biz.MealSeriesBiz;
import com.restrant.entity.CartItemBean;
import com.restrant.entity.Meal;

public class CartAction extends ActionSupport implements SessionAware {
//封装表单传递来的服装的编号mealId参数值
private Integer mealId;
public void setMealId(Integer mealId) {
this.mealId = mealId;
}
public Integer getMealId() {
return mealId;
}
//封装表单传递来的服装的数量quantity参数值
int quantity;
public int getQuantity() {
return quantity;
}
public void setQuantity(int quantity) {
this.quantity = quantity;
}
MealBiz mealBiz;
public void setMealBiz(MealBiz mealBiz) {
this.mealBiz = mealBiz;
}
MealSeriesBiz mealSeriesBiz;
public void setMealSeriesBiz(MealSeriesBiz mealSeriesBiz) {
this.mealSeriesBiz = mealSeriesBiz;
}
Mapject> session;
@Override
public void setSession(Mapject> session) {
this.session=session;
}
//将选购的服装添加到购物车
public String addtoshopcart() throws Exception {
//从session中取出购物车,放入Map对象cart中
Map cart=(Map)session.get(“cart“);
//获取当前要添加到购物车的服装信息
Meal meal=mealBiz.getMealByMealId(mealId);
//如果购物车不存在,则创建购物车(实例化HashMap类),并存入session中
if(cart==null){
cart=new HashMap();
session.put(“cart“ cart);
}
//如果存在购物车,则判断服装是否在购物车中
CartItemBean cartItem=(CartItemBean)cart.get(meal.getMealId());
if(cartItem!=null){
    //如果服装在购物车中,更新其数量
cartItem.setQuantity(cartItem.getQuantity()+1);
}else{
//否则,创建一个条目到Map中
cart.put(meal.getMealId()new CartItemBean(meal1));
}
//页面转到shopCart.jsp,显示购物车
return “shopCart“;
}

//更改数量
public String updateSelectedQuantity() throws Exception {
//从session中取出购物车,放入Map对象cart中
    Map cart=(Map)session.get(“cart“);
    CartItemBean cartItem=(CartItemBean)cart.get(mealId);
    cartItem.setQuantity(quantity);
    return “shopCart“;
}

//从购物车中移除指定编号订单
public String deleteSelectedOrders() throws Exception {
//从session中取出购物车,放入Map对象cart中
    Map cart=(Map)session.get(“cart“);
    cart.remove(mealId);
    return “shopCart“;
}

//清空购物车
public String clearCart() throws Exception {
//从session中取出购物车,放入Map对象cart中
    Map cart=(Map)session.get(“cart“);
    cart.clear();
    return “shopCart“;
}

}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2019-03-14 16:21  clothpay
     目录           0  2017-04-13 02:16  clothpay
estrant
     文件        9104  2016-11-30 19:04  clothpay
estrant.classpath
     目录           0  2017-04-13 02:16  clothpay
estrant.externalToolBuilders
     文件         548  2017-04-13 02:16  clothpay
estrant.externalToolBuildersorg.eclipse.wst.jsdt.core.javascriptValidator (5).launch
     文件         464  2014-05-03 08:15  clothpay
estrant.myhibernatedata
     文件        1850  2017-04-13 02:16  clothpay
estrant.project
     目录           0  2017-04-12 20:26  clothpay
estrant.settings
     文件         522  2014-05-01 17:02  clothpay
estrant.settings.jsdtscope
     文件        1009  2017-04-12 20:23  clothpay
estrant.settingscom.genuitec.eclipse.j2eedt.core.prefs
     文件         179  2014-05-01 21:09  clothpay
estrant.settingscom.genuitec.runtime.libraries.xml
     文件         598  2017-04-14 13:48  clothpay
estrant.settingsorg.eclipse.jdt.core.prefs
     文件         485  2017-04-12 20:23  clothpay
estrant.settingsorg.eclipse.wst.common.component
     文件         481  2014-05-01 21:05  clothpay
estrant.settingsorg.eclipse.wst.common.project.facet.core.prefs.xml
     文件         547  2014-05-01 21:09  clothpay
estrant.settingsorg.eclipse.wst.common.project.facet.core.xml
     文件          49  2014-05-01 17:02  clothpay
estrant.settingsorg.eclipse.wst.jsdt.ui.superType.container
     文件           6  2014-05-01 17:02  clothpay
estrant.settingsorg.eclipse.wst.jsdt.ui.superType.name
     文件         425  2014-05-01 21:08  clothpay
estrant.springBeans
     目录           0  2017-04-12 20:19  clothpay
estrantin
     目录           0  2017-04-12 20:19  clothpay
estrantdata
     文件        5627  2017-04-26 14:25  clothpay
estrantdata
estrant.sql
     文件        1076  2014-05-01 21:24  clothpay
estranthibernate.reveng.xml
     目录           0  2017-04-12 20:19  clothpay
estrantsrc
     文件        5470  2017-04-19 13:50  clothpay
estrantsrcapplicationContext.xml
     目录           0  2017-04-12 20:19  clothpay
estrantsrccom
     目录           0  2017-04-12 20:19  clothpay
estrantsrccom
estrant
     目录           0  2017-04-12 20:19  clothpay
estrantsrccom
estrantaction
     文件        2679  2017-04-26 13:51  clothpay
estrantsrccom
estrantactionCartAction.java
     文件        7481  2017-04-26 13:57  clothpay
estrantsrccom
estrantactionMealAction.java
     文件        4658  2016-11-30 19:05  clothpay
estrantsrccom
estrantactionOrdersAction.java
     文件        2719  2014-05-11 20:35  clothpay
estrantsrccom
estrantactionUserAction.java
............此处省略338个文件信息

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件举报,一经查实,本站将立刻删除。

发表评论

评论列表(条)