package com.cuikaixuan.hp.annoth.action;

import java.util.List;

import org.apache.struts2.convention.annotation.Action;
import org.apache.struts2.convention.annotation.Namespace;
import org.apache.struts2.convention.annotation.ParentPackage;
import org.apache.struts2.convention.annotation.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;

import com.cuikaixuan.hp.annoth.entity.Annoth;
import com.cuikaixuan.hp.annoth.service.IAnnothService;
import com.opensymphony.xwork2.ActionSupport;

@Controller
@Scope("prototype")
@Namespace("/annoth")
@ParentPackage("struts-default")
public class AnnothAction extends ActionSupport {
	@Autowired
	private IAnnothService annothService;
	private Annoth annoth;
	private List list;
	
	@Action(value="tooadd",results={
			@Result(name="success",location="addannoth.jsp")
	})
	public String tooadd(){//去增加页面
		return SUCCESS;
	}

	@Action(value="addAnnoth",results={
			@Result(name="success",type="redirect",location="findall")
	})
	public String addAnnoth(){//增
		this.annothService.addAnnoth(annoth);
		return SUCCESS;
	}
	
	@Action(value="delAnnoth",results={
			@Result(name="success",type="redirect",location="findall")
	})
	public String delAnnoth(){//删
		this.annothService.delAnnoth(annoth);
		return SUCCESS;
	}
	
	@Action(value="modifyAnnoth",results={
			@Result(name="success",type="redirect",location="findall")
	})
	public String modifyAnnoth(){//改
		this.annothService.modifyAnnoth(annoth);
		return SUCCESS;
	}
	
	@Action(value="findall",results={
			@Result(name="success",location="showannoth.jsp")
	})
	public String findall(){//查全部
		list=this.annothService.findall();
		return SUCCESS;
	}
	@Action(value="findbyid",results={
			@Result(name="success",location="byidannoth.jsp")
	})
	public String findbyid(){//查单个
		annoth=this.annothService.findbyid(annoth);
		return SUCCESS;
	}
	public Annoth getAnnoth() {
		return annoth;
	}
	public void setAnnoth(Annoth annoth) {
		this.annoth = annoth;
	}
	public List getList() {
		return list;
	}
	public void setList(List list) {
		this.list = list;
	}
	
}
最近下载更多
张真狗  LV9 2023年5月22日
小王wang  LV10 2022年8月15日
uuuuuuuuuuuwwwwww  LV3 2021年12月14日
dingyue  LV2 2021年12月5日
漫长的白日梦  LV8 2021年12月4日
lsglsg9  LV22 2021年11月24日
yexiansheng  LV1 2021年11月6日
GD_chan  LV5 2021年7月20日
yu  LV1 2021年6月24日
qweqweqwe7987987  LV1 2021年6月22日
最近浏览更多
asddwh  LV12 2023年12月25日
WBelong  LV7 2023年12月18日
zdfxcv  LV1 2023年10月14日
80730176  LV7 2023年10月11日
wanglei92  LV2 2023年6月26日
yemmmm666  LV1 2023年6月12日
张真狗  LV9 2023年5月22日
3516569014  LV5 2023年5月7日
星辰xc  LV2 2023年5月7日
jierffff  LV2 2023年4月12日
顶部 客服 微信二维码 底部
>扫描二维码关注最代码为好友扫描二维码关注最代码为好友