• 大小: 21.71MB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2023-07-23
  • 语言: 其他
  • 标签: html  jquery  bootstrap  

资源简介

酒店前台,用户的登陆注册,查看房间信息,地图的展现

资源截图

代码片段和文件信息

package com.digital.action;

import java.util.HashMap;
import java.util.Map;

import org.apache.struts2.interceptor.SessionAware;
import org.hibernate.Session;

import com.digital.entity.CartItemBean;
import com.digital.entity.ProductInfo;
import com.digital.service.ProductInfoService;
import com.opensymphony.xwork2.ActionSupport;
import com.sun.org.apache.bcel.internal.generic.NEW;

public class CartAction extends ActionSupport implements SessionAware{
private Integer productInfoId;
private int quantity;
public Integer getProductInfoId() {
return productInfoId;
}
public void setProductInfoId(Integer productInfoId) {
this.productInfoId = productInfoId;
}
public int getQuantity() {
return quantity;
}
public void setQuantity(int quantity) {
this.quantity = quantity;
}

ProductInfoService productInfoService;
public void setProductInfoService(ProductInfoService productInfoService) {
this.productInfoService = productInfoService;
}
Mapject> session;
@Override
public void setSession(Mapject> session) {
this.session=session;
}

public String addtoshopcart(){

Map cart=(Map)session.get(“cart“);

ProductInfo productInfo=productInfoService.getProductInfoByPiId(productInfoId);

if (cart==null) {
cart=new HashMap();
session.put(“cart“ cart);
}

CartItemBean cartItem=(CartItemBean)cart.get(productInfo.getId());
if (cartItem!=null) {

cartItem.setQuantity(cartItem.getQuantity()+1);
}else {

cart.put(productInfo.getId() new CartItemBean(productInfo 1));
}

return “shopCart“;
}

public String updateSelectedQuantity(){

Map cart=(Map)session.get(“cart“);
CartItemBean cartItem=(CartItemBean)cart.get(productInfoId);
cartItem.setQuantity(quantity);
return “shopCart“;
}


public String deleteSelectedOrders(){

Map cart=(Map)session.get(“cart“);
cart.remove(productInfoId);
return “shopCart“;
}

public String clearCart(){

Map cart=(Map)session.get(“cart“);
cart.clear();
return “shopCart“;
}




}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2017-12-20 20:25  jiudian1\
     文件         548  2018-04-24 18:50  jiudian1\.classpath
     文件        1042  2017-12-04 19:34  jiudian1\.project
     目录           0  2017-12-20 20:25  jiudian1\.settings\
     文件         567  2017-12-01 14:21  jiudian1\.settings\.jsdtscope
     文件         210  2017-12-11 16:34  jiudian1\.settings\org.eclipse.core.resources.prefs
     文件         364  2017-12-01 14:21  jiudian1\.settings\org.eclipse.jdt.core.prefs
     文件         476  2017-12-01 14:21  jiudian1\.settings\org.eclipse.wst.common.component
     文件         345  2017-12-01 14:21  jiudian1\.settings\org.eclipse.wst.common.project.facet.core.xml
     文件          49  2017-12-01 14:21  jiudian1\.settings\org.eclipse.wst.jsdt.ui.superType.container
     文件           6  2017-12-01 14:21  jiudian1\.settings\org.eclipse.wst.jsdt.ui.superType.name
     目录           0  2017-12-20 20:25  jiudian1\build\
     目录           0  2018-04-24 18:51  jiudian1\build\classes\
     文件        4972  2017-12-17 17:19  jiudian1\build\classes\applicationContext.xml
     目录           0  2018-04-24 18:51  jiudian1\build\classes\com\
     目录           0  2018-04-24 18:51  jiudian1\build\classes\com\digital\
     目录           0  2018-04-24 18:51  jiudian1\build\classes\com\digital\action\
     文件        2786  2018-04-24 18:51  jiudian1\build\classes\com\digital\action\CartAction.class
     文件        4486  2018-04-24 18:51  jiudian1\build\classes\com\digital\action\OrderAction.class
     文件        3305  2018-04-24 18:51  jiudian1\build\classes\com\digital\action\ProductInfoAction.class
     文件        2116  2018-04-24 18:51  jiudian1\build\classes\com\digital\action\UserInfoAction.class
     目录           0  2018-04-24 18:51  jiudian1\build\classes\com\digital\dao\
     目录           0  2018-04-24 18:51  jiudian1\build\classes\com\digital\dao\impl\
     文件        1667  2018-04-24 18:51  jiudian1\build\classes\com\digital\dao\impl\OrderDetailDAOImpl.class
     文件        1919  2018-04-24 18:51  jiudian1\build\classes\com\digital\dao\impl\OrderInfoDAOImpl.class
     文件        2070  2018-04-24 18:51  jiudian1\build\classes\com\digital\dao\impl\ProductInfoDAOImpl.class
     文件        1207  2018-04-24 18:51  jiudian1\build\classes\com\digital\dao\impl\TypeDAOImpl.class
     文件        1635  2018-04-24 18:51  jiudian1\build\classes\com\digital\dao\impl\UserInfoDAOImpl.class
     文件         239  2018-04-24 18:51  jiudian1\build\classes\com\digital\dao\OrderDetailDAO.class
     文件         303  2018-04-24 18:51  jiudian1\build\classes\com\digital\dao\OrderInfoDAO.class
     文件         447  2018-04-24 18:51  jiudian1\build\classes\com\digital\dao\ProductInfoDAO.class
............此处省略347个文件信息

评论

共有 条评论