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

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

資源簡(jiǎn)介

網(wǎng)上商城WEB開發(fā),其中包括用戶注冊(cè)登錄界面,以及商城商品顯示界面,購物車管理界面,以及支付界面,當(dāng)商品數(shù)量發(fā)生變化時(shí)會(huì)及時(shí)反饋到商城頁面......訂單管理界面含開發(fā)文檔,數(shù)據(jù)庫源碼,演示截圖,導(dǎo)入即可運(yùn)行

資源截圖

代碼片段和文件信息

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){
//未登陸狀態(tài)操作
System.out.println(“==“);
}else{
//登錄狀態(tài)
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“;

}
}

評(píng)論

共有 條評(píng)論

相關(guān)資源