91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 29.48MB
    文件類型: .zip
    金幣: 1
    下載: 0 次
    發(fā)布日期: 2023-06-14
  • 語言: Java
  • 標(biāo)簽: 基于java??

資源簡介

基于Java的服裝銷售管理系統(tǒng),適用于畢業(yè)設(shè)計(jì)和課程報(bào)告,有詳細(xì)的源碼和論文文字,下載下來直接用。



有問題可以私聊我

資源截圖

代碼片段和文件信息

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參數(shù)值
private?Integer?mealId;
public?void?setMealId(Integer?mealId)?{
this.mealId?=?mealId;
}
public?Integer?getMealId()?{
return?mealId;
}
//封裝表單傳遞來的服裝的數(shù)量quantity參數(shù)值
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“);
//獲取當(dāng)前要添加到購物車的服裝信息
Meal?meal=mealBiz.getMealByMealId(mealId);
//如果購物車不存在,則創(chuàng)建購物車(實(shí)例化HashMap類),并存入session中
if(cart==null){
cart=new?HashMap();
session.put(“cart“?cart);
}
//如果存在購物車,則判斷服裝是否在購物車中
CartItemBean?cartItem=(CartItemBean)cart.get(meal.getMealId());
if(cartItem!=null){
????//如果服裝在購物車中,更新其數(shù)量
cartItem.setQuantity(cartItem.getQuantity()+1);
}else{
//否則,創(chuàng)建一個條目到Map中
cart.put(meal.getMealId()new?CartItemBean(meal1));
}
//頁面轉(zhuǎn)到shopCart.jsp,顯示購物車
return?“shopCart“;
}

//更改數(shù)量
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\restrant\
?????文件????????9104??2016-11-30?19:04??clothpay\restrant\.classpath
?????目錄???????????0??2017-04-13?02:16??clothpay\restrant\.externalToolBuilders\
?????文件?????????548??2017-04-13?02:16??clothpay\restrant\.externalToolBuilders\org.eclipse.wst.jsdt.core.javascriptValidator?(5).launch
?????文件?????????464??2014-05-03?08:15??clothpay\restrant\.myhibernatedata
?????文件????????1850??2017-04-13?02:16??clothpay\restrant\.project
?????目錄???????????0??2017-04-12?20:26??clothpay\restrant\.settings\
?????文件?????????522??2014-05-01?17:02??clothpay\restrant\.settings\.jsdtscope
?????文件????????1009??2017-04-12?20:23??clothpay\restrant\.settings\com.genuitec.eclipse.j2eedt.core.prefs
?????文件?????????179??2014-05-01?21:09??clothpay\restrant\.settings\com.genuitec.runtime.libraries.xml
?????文件?????????598??2017-04-14?13:48??clothpay\restrant\.settings\org.eclipse.jdt.core.prefs
?????文件?????????485??2017-04-12?20:23??clothpay\restrant\.settings\org.eclipse.wst.common.component
?????文件?????????481??2014-05-01?21:05??clothpay\restrant\.settings\org.eclipse.wst.common.project.facet.core.prefs.xml
?????文件?????????547??2014-05-01?21:09??clothpay\restrant\.settings\org.eclipse.wst.common.project.facet.core.xml
?????文件??????????49??2014-05-01?17:02??clothpay\restrant\.settings\org.eclipse.wst.jsdt.ui.superType.container
?????文件???????????6??2014-05-01?17:02??clothpay\restrant\.settings\org.eclipse.wst.jsdt.ui.superType.name
?????文件?????????425??2014-05-01?21:08??clothpay\restrant\.springBeans
?????目錄???????????0??2017-04-12?20:19??clothpay\restrant\bin\
?????目錄???????????0??2017-04-12?20:19??clothpay\restrant\data\
?????文件????????5627??2017-04-26?14:25??clothpay\restrant\data\restrant.sql
?????文件????????1076??2014-05-01?21:24??clothpay\restrant\hibernate.reveng.xml
?????目錄???????????0??2017-04-12?20:19??clothpay\restrant\src\
?????文件????????5470??2017-04-19?13:50??clothpay\restrant\src\applicationContext.xml
?????目錄???????????0??2017-04-12?20:19??clothpay\restrant\src\com\
?????目錄???????????0??2017-04-12?20:19??clothpay\restrant\src\com\restrant\
?????目錄???????????0??2017-04-12?20:19??clothpay\restrant\src\com\restrant\action\
?????文件????????2679??2017-04-26?13:51??clothpay\restrant\src\com\restrant\action\CartAction.java
?????文件????????7481??2017-04-26?13:57??clothpay\restrant\src\com\restrant\action\MealAction.java
?????文件????????4658??2016-11-30?19:05??clothpay\restrant\src\com\restrant\action\OrdersAction.java
?????文件????????2719??2014-05-11?20:35??clothpay\restrant\src\com\restrant\action\UserAction.java
............此處省略338個文件信息

評論

共有 條評論

相關(guān)資源