• 大小: 36.89MB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2023-07-09
  • 语言: Java
  • 标签: j2ee  

资源简介

适合SSH初学者学习,学习java ee的各项技术。

资源截图

代码片段和文件信息

package com.action;

import java.io.IOException;
import java.util.List;

import com.biz.BuycarBiz;
import com.biz.CityBiz;
import com.biz.ProvinceBiz;
import com.biz.SysUsersBiz;
import com.entity.Buycar;
import com.entity.EleBikedetail;
import com.entity.SysUsers;
import com.util.baseAction;

public class BuycarAction extends baseAction  {
BuycarBiz buycarBiz;
private EleBikedetail ele;
private boolean flag=false;
private SysUsersBiz sysUsersBiz;
private Buycar bc;
Buycar buycar;
SysUsers users;
public String requestParams_zh(){

return ““;
}

public String addBuyCar_zh() throws IOException{
if(users==null){
users=(SysUsers) this.getHttpSession().getAttribute(“user“);
}
if(buycar!=null){
buycar.setCarDate(new java.sql.Timestamp(new java.util.Date().getTime()));
buycar.setSysUsers(users);
buycar.setStates(0);
}
Boolean flag=false;
List list=buycarBiz.findBuyCarByBikeId_zh(buycar);
if(list.size()>0){
Buycar buyCarList=list.get(0);
buyCarList.setBuyCount(buycar.getBuyCount()+buyCarList.getBuyCount());
flag=buycarBiz.updateBuyCar_zh(buyCarList);
}else{
System.out.println(“asdasd“);
flag=buycarBiz.addBuyCar_zh(buycar);
}
this.getResponse().getWriter().print(flag);
return null;
}


public  String update(){
Buycar el=buycarBiz.findbuycar(bc.getCarId());
el.setBuyCount(bc.getBuyCount());
buycarBiz.savebuycar(el);
flag=true;
return “gwc“;

}
/**
 * 查看购物车的方法
 * @return
 */
public String seebuycar(){
SysUsers su=(SysUsers) this.getSession().get(“user“);
this.getRequest().put(“buycar“ sysUsersBiz.findById(su.getUserName()));
return “bycar“;
}

/**
 * 禁用(删除购物车记录方法)
 * @return
 */
public  String jinyong(){
Buycar el=buycarBiz.findbuycar(bc.getCarId());
el.setStates(bc.getStates());
buycarBiz.savebuycar(el);
flag=true;
return “gwc“;

}

public BuycarBiz getBuycarBiz() {
return buycarBiz;
}
public void setBuycarBiz(BuycarBiz buycarBiz) {
this.buycarBiz = buycarBiz;
}
public EleBikedetail getEle() {
return ele;
}
public void setEle(EleBikedetail ele) {
this.ele = ele;
}
public boolean isFlag() {
return flag;
}


public void setFlag(boolean flag) {
this.flag = flag;
}

public SysUsersBiz getSysUsersBiz() {
return sysUsersBiz;
}

public void setSysUsersBiz(SysUsersBiz sysUsersBiz) {
this.sysUsersBiz = sysUsersBiz;
}
public Buycar getBc() {
return bc;
}
public void setBc(Buycar bc) {
this.bc = bc;
}
public Buycar getBuycar() {
return buycar;
}
public void setBuycar(Buycar buycar) {
this.buycar = buycar;
}
public SysUsers getUsers() {
return users;
}
public void setUsers(SysUsers users) {
this.users = users;
}

}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件       1690  2014-05-23 15:17  电动车进销存系统\eleBike\.classpath

     文件        547  2014-06-09 02:22  电动车进销存系统\eleBike\.externalToolBuilders\org.eclipse.wst.validation.validationbuilder.launch

     文件          0  2014-06-10 14:06  电动车进销存系统\eleBike\.metadata\.lock

     文件       3543  2014-06-10 14:06  电动车进销存系统\eleBike\.metadata\.log

     文件        830  2014-06-10 14:07  电动车进销存系统\eleBike\.metadata\.plugins\com.genuitec.eclipse.sqlexplorer\ConnectionProfiles.xml

     文件      16653  2014-06-10 14:07  电动车进销存系统\eleBike\.metadata\.plugins\com.genuitec.eclipse.sqlexplorer\SQLDrivers.xml

     文件          1  2014-06-10 14:07  电动车进销存系统\eleBike\.metadata\.plugins\org.eclipse.core.resources\.root\.indexes\history.version

     文件         57  2014-06-10 14:06  电动车进销存系统\eleBike\.metadata\.plugins\org.eclipse.core.resources\.root\.indexes\properties.index

     文件          1  2014-06-10 14:07  电动车进销存系统\eleBike\.metadata\.plugins\org.eclipse.core.resources\.root\.indexes\properties.version

     文件        153  2014-06-10 14:07  电动车进销存系统\eleBike\.metadata\.plugins\org.eclipse.core.resources\.root\1.tree

     文件        590  2014-06-10 14:07  电动车进销存系统\eleBike\.metadata\.plugins\org.eclipse.core.resources\.safetable\org.eclipse.core.resources

     文件         52  2014-06-10 14:07  电动车进销存系统\eleBike\.metadata\.plugins\org.eclipse.core.runtime\.settings\com.genuitec.eclipse.derby.prefs

     文件         54  2014-06-10 14:07  电动车进销存系统\eleBike\.metadata\.plugins\org.eclipse.core.runtime\.settings\com.genuitec.eclipse.examples.prefs

     文件       1022  2014-06-10 14:07  电动车进销存系统\eleBike\.metadata\.plugins\org.eclipse.core.runtime\.settings\com.genuitec.eclipse.wizards.prefs

     文件         85  2014-06-10 14:07  电动车进销存系统\eleBike\.metadata\.plugins\org.eclipse.core.runtime\.settings\com.genuitec.myeclipse.compatibility.prefs

     文件        101  2014-06-10 14:06  电动车进销存系统\eleBike\.metadata\.plugins\org.eclipse.core.runtime\.settings\com.genuitec.pulse.client.targetcfg.collab.ui.prefs

     文件         95  2014-06-10 14:06  电动车进销存系统\eleBike\.metadata\.plugins\org.eclipse.core.runtime\.settings\com.genuitec.pulse2.common.ui.prefs

     文件         42  2014-06-10 14:07  电动车进销存系统\eleBike\.metadata\.plugins\org.eclipse.core.runtime\.settings\org.eclipse.core.resources.prefs

     文件        672  2014-06-10 14:07  电动车进销存系统\eleBike\.metadata\.plugins\org.eclipse.core.runtime\.settings\org.eclipse.jdt.core.prefs

     文件        542  2014-06-10 14:07  电动车进销存系统\eleBike\.metadata\.plugins\org.eclipse.core.runtime\.settings\org.eclipse.jdt.launching.prefs

     文件        517  2014-06-10 14:07  电动车进销存系统\eleBike\.metadata\.plugins\org.eclipse.core.runtime\.settings\org.eclipse.jdt.ui.prefs

     文件         73  2014-06-10 14:07  电动车进销存系统\eleBike\.metadata\.plugins\org.eclipse.core.runtime\.settings\org.eclipse.m2e.discovery.prefs

     文件        219  2014-06-10 14:06  电动车进销存系统\eleBike\.metadata\.plugins\org.eclipse.core.runtime\.settings\org.eclipse.team.cvs.core.prefs

     文件         57  2014-06-10 14:07  电动车进销存系统\eleBike\.metadata\.plugins\org.eclipse.core.runtime\.settings\org.eclipse.team.cvs.ui.prefs

     文件         69  2014-06-10 14:07  电动车进销存系统\eleBike\.metadata\.plugins\org.eclipse.core.runtime\.settings\org.eclipse.team.ui.prefs

     文件        128  2014-06-10 14:07  电动车进销存系统\eleBike\.metadata\.plugins\org.eclipse.core.runtime\.settings\org.eclipse.ui.ide.prefs

     文件       3000  2014-06-10 14:07  电动车进销存系统\eleBike\.metadata\.plugins\org.eclipse.core.runtime\.settings\org.eclipse.ui.workbench.prefs

     文件         12  2014-06-10 14:07  电动车进销存系统\eleBike\.metadata\.plugins\org.eclipse.dltk.core\Containers.dat

     文件          4  2014-06-10 14:07  电动车进销存系统\eleBike\.metadata\.plugins\org.eclipse.jdt.core\invalidArchivesCache

     文件          4  2014-06-10 14:07  电动车进销存系统\eleBike\.metadata\.plugins\org.eclipse.jdt.core\nonChainingJarsCache

............此处省略3629个文件信息

评论

共有 条评论