xxxx18一60岁hd中国/日韩女同互慰一区二区/西西人体扒开双腿无遮挡/日韩欧美黄色一级片 - 色护士精品影院www

  • 大小: 20.94MB
    文件類型: .7z
    金幣: 1
    下載: 0 次
    發布日期: 2023-06-14
  • 語言: Java
  • 標簽:

資源簡介

網上商城WEB開發,其中包括用戶注冊登錄界面,以及商城商品顯示界面,購物車管理界面,以及支付界面,當商品數量發生變化時會及時反饋到商城頁面......訂單管理界面含開發文檔,數據庫源碼,演示截圖,導入即可運行

資源截圖

代碼片段和文件信息

package?com.aaa.controller;

import?java.util.List;

import?javax.annotation.Resource;
import?javax.servlet.http.HttpSession;
import?org.springframework.stereotype.Controller;
import?org.springframework.ui.Model;
import?org.springframework.web.bind.annotation.PathVariable;
import?org.springframework.web.bind.annotation.RequestMapping;
import?com.aaa.service.ICartService;
import?com.aaa.vo.Cart;
import?com.aaa.vo.User;
import?com.util.Constants;

@Controller
@RequestMapping(“/cart“)
public?class?CartController?{

@Resource
private?ICartService?cartService;

@RequestMapping(“/toCartList“)
public?String?toCartList(){
return?“cart/cartList“;
}
@RequestMapping(“/addCart“)
public?String?addCart(Cart?cartHttpSession?sessionModel?model){
//User?user=(User)session.getAttribute(Constants.USER_SESSION);
User?user=new?User();
user.setUid(1);
//將目前存在的用戶id,放到cart里
cart.setUid(user.getUid());

if(null==user){
//未登陸狀態操作
System.out.println(“==“);
}else{
//登錄狀態
cartService.addCart(cart);
List?selectOne=cartService.selectByUid(user.getUid());
model.addAttribute(“cartList“selectOne);
}
return?“cart/cartList“;
}
@RequestMapping(“/selectById“)
public?String?selectById(Cart?cartModel?model){
List?selectOne?=?cartService.selectOne(cart);
model.addAttribute(“cartList“?selectOne);
return?“cart/cartList“;
}
@RequestMapping(“/select“)
public?String?select(Model?model){
cartService.select();
List?select?=?cartService.select();
model.addAttribute(“cartList“?select);
return?“cart/cartList“;
}
@RequestMapping(“/{id}/deleteById“)
public?String?deleteById(@PathVariable?int?id){
cartService.deleteById(id);
return?“redirect:/cart/select“;

}
}

評論

共有 條評論

相關資源