src/com/action/susheAction.java

(开头部分) 1KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

package com.action;

import java.util.List;
import java.util.Map;

import org.apache.struts2.ServletActionContext;

import com.dao.TAdminDAO;
import com.dao.TSusheDAO;
import com.model.TAdmin;
import com.model.TSushe;
import com.opensymphony.xwork2.ActionSupport;
import com.util.Pagination;

public class susheAction extends ActionSupport
{
	private int id;
	private String fangjianhao;
	 
	private String message;
	private String path;
	

	private TSusheDAO susheDAO;
	
	
	public String susheAdd()
	{
		TSushe sushe=new TSushe();
		sushe.setFangjianhao(fangjianhao);
		sushe.setDel("no");
		susheDAO.save(sushe);
		this.setMessage("操作成功");
		this.setPath("susheMana.action");
		return "succeed";
	}
	
	public String susheDel()
	{
		TSushe sushe=susheDAO.findById(id);
		sushe.setDel("yes");
		susheDAO.attachDirty(sushe);
		this.setMessage("删除成功");
		this.setPath("susheMana.action");
		return "succeed";
	}
	
	
	public String susheMana()
	{
		String sql="from TSushe where del='no'";
		List susheList=susheDAO.getHibernateTemplate().find(sql);
		Map request=(Map)ServletActionContext.getContext().get("request");
		request.put("susheList", susheList);
		return ActionSupport.SUCCESS;
	}

	public String getFangjianhao()
	{
		return fangjianhao;
后面还有 49 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读 AI

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。