資源簡介
這是個網上購書系統,主要使用了struts2+Mybatis+oracle技術

代碼片段和文件信息
package?com.baizhi.wuyh.action;
import?java.util.List;
import?java.util.Map;
import?com.baizhi.wuyh.entity.Book;
import?com.baizhi.wuyh.service.BookService;
import?com.baizhi.wuyh.service.impl.BookServiceImpl;
import?com.opensymphony.xwork2.ActionContext;
public?class?BookAction?{
//到首頁
public?String?toMain(){
Mapject>?sessionMap?=?ActionContext.getContext().getSession();
try{
object?account?=?sessionMap.get(“account“);
if(account?==?null){
return?“main“;
}else{
return?“address“;
}
}catch(Exception?e){
sessionMap.put(“msg“?e.getMessage());
return?“register_ok“;
}
}
//查詢編輯推薦
public?String?selectRecommend(){
Mapject>?sessionMap?=?ActionContext.getContext().getSession();
try{
BookService?service?=?new?BookServiceImpl();
List?recommend?=?service.findByCustomerScore();
sessionMap.put(“recommend“?recommend);
return?“recommend“;
}catch(Exception?e){
sessionMap.put(“msg“?e.getMessage());
return?“recommend“;
}
}
//查詢熱銷圖書
public?String?selectHot(){
Mapject>?sessionMap?=?ActionContext.getContext().getSession();
try{
BookService?service?=?new?BookServiceImpl();
List?hot?=?service.findBySaleNumber();
sessionMap.put(“hot“?hot);
return?“hot“;
}catch(Exception?e){
sessionMap.put(“msg“?e.getMessage());
return?“hot“;
}
}
//查詢最新上架圖書
public?String?selectLatest(){
Mapject>?sessionMap?=?ActionContext.getContext().getSession();
try{
BookService?service?=?new?BookServiceImpl();
List?latest?=?service.findByPutAway();
sessionMap.put(“latest“?latest);
return?“new“;
}catch(Exception?e){
sessionMap.put(“msg“?e.getMessage());
return?“new“;
}
}
//查詢新書熱賣
public?String?selectHotBoard(){
Mapject>?sessionMap?=?ActionContext.getContext().getSession();
try{
BookService?service?=?new?BookServiceImpl();
List?hotBoard?=?service.findByPutAwayAndSaleNumber();
sessionMap.put(“hotBoard“?hotBoard);
return?“hotBoard“;
}catch(Exception?e){
sessionMap.put(“msg“?e.getMessage());
return?“hotBoard“;
}
}
//查詢圖書詳細信息
public?String?selectProduct(){
Mapject>?sessionMap?=?ActionContext.getContext().getSession();
try{
BookService?service?=?new?BookServiceImpl();
Book?book?=?service.findById(id);
this.book?=?book;
return?“product“;
}catch(Exception?e){
sessionMap.put(“msg“?e.getMessage());
return?“product“;
}
}
private?Integer?id;
private?Book?book;
public?Book?getBook()?{
return?book;
}
public?void?setBook(Book?book)?{
this.book?=?book;
}
public?Integer?getId()?{
return?id;
}
public?void?setId(Integer?id)?{
this.id?=?id;
}
}
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2016-11-15?16:39??DangDang_wyh\
?????文件?????????652??2016-11-15?16:39??DangDang_wyh\.classpath
?????目錄???????????0??2016-11-15?16:32??DangDang_wyh\.myeclipse\
?????文件?????????297??2016-11-15?16:39??DangDang_wyh\.myme
?????文件????????1751??2016-11-15?16:39??DangDang_wyh\.project
?????目錄???????????0??2016-11-15?16:40??DangDang_wyh\.settings\
?????文件?????????500??2016-11-15?16:40??DangDang_wyh\.settings\.jsdtscope
?????文件??????????57??2016-11-15?16:40??DangDang_wyh\.settings\org.eclipse.core.resources.prefs
?????文件?????????364??2016-11-15?16:40??DangDang_wyh\.settings\org.eclipse.jdt.core.prefs
?????文件?????????539??2016-11-15?16:40??DangDang_wyh\.settings\org.eclipse.wst.common.component
?????文件?????????252??2016-11-15?16:40??DangDang_wyh\.settings\org.eclipse.wst.common.project.facet.core.xm
?????文件??????????49??2016-11-15?16:40??DangDang_wyh\.settings\org.eclipse.wst.jsdt.ui.superType.container
?????文件???????????6??2016-11-15?16:40??DangDang_wyh\.settings\org.eclipse.wst.jsdt.ui.superType.name
?????目錄???????????0??2016-11-15?16:40??DangDang_wyh\config\
?????目錄???????????0??2016-11-15?16:40??DangDang_wyh\config\com\
?????目錄???????????0??2016-11-15?16:40??DangDang_wyh\config\com\baizhi\
?????目錄???????????0??2016-11-15?16:40??DangDang_wyh\config\com\baizhi\wuyh\
?????目錄???????????0??2016-11-15?16:40??DangDang_wyh\config\com\baizhi\wuyh\dao\
?????目錄???????????0??2016-11-15?16:40??DangDang_wyh\config\com\baizhi\wuyh\dao\impl\
?????文件?????????637??2016-11-15?16:40??DangDang_wyh\config\com\baizhi\wuyh\dao\impl\AddressDAOImpl.xm
?????文件????????3456??2016-11-15?16:40??DangDang_wyh\config\com\baizhi\wuyh\dao\impl\BookDAOImpl.xm
?????文件????????3527??2016-11-15?16:40??DangDang_wyh\config\com\baizhi\wuyh\dao\impl\CategoryDAOImpl.xm
?????文件????????1226??2016-11-15?16:40??DangDang_wyh\config\com\baizhi\wuyh\dao\impl\OrderDAOImpl.xm
?????文件????????1026??2016-11-15?16:40??DangDang_wyh\config\com\baizhi\wuyh\dao\impl\OrderItemDAOImpl.xm
?????文件????????2941??2016-11-15?16:40??DangDang_wyh\config\com\baizhi\wuyh\dao\impl\UserDAOImpl.xm
?????目錄???????????0??2016-11-15?16:40??DangDang_wyh\config\com\baizhi\wuyh\struts\
?????目錄???????????0??2016-11-15?16:40??DangDang_wyh\config\com\baizhi\wuyh\struts\book\
?????文件????????1596??2016-11-15?16:40??DangDang_wyh\config\com\baizhi\wuyh\struts\book\book.xm
?????目錄???????????0??2016-11-15?16:40??DangDang_wyh\config\com\baizhi\wuyh\struts\cart\
?????文件????????1133??2016-11-15?16:40??DangDang_wyh\config\com\baizhi\wuyh\struts\cart\cart.xm
?????目錄???????????0??2016-11-15?16:40??DangDang_wyh\config\com\baizhi\wuyh\struts\category\
............此處省略596個文件信息
- 上一篇:北極熊掃描器4.5最新版
- 下一篇:SSM兩表增刪查
評論
共有 條評論