src/com/action/guahaoAction.java

(开头部分) 3KB

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

package com.action;

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

import org.apache.struts2.ServletActionContext;

import com.dao.TGuanhaoDAO;
import com.dao.TKeshiDAO;
import com.dao.TYishengDAO;
import com.model.TGuanhao;
import com.opensymphony.xwork2.ActionSupport;

public class guahaoAction extends ActionSupport
{
	private int guahaoId;
	private String name;
	private String sex;
	private String age;
	private String feiyong;
	private int keshiId;
	private int yishengId;
	
	private String message;
	private String path;
	private TGuanhaoDAO guanhaoDAO;
	private TKeshiDAO keshiDAO;
	private TYishengDAO yishengDAO;
	
	
	public String guahaoAdd()
	{
		TGuanhao guanhao=new TGuanhao();
		guanhao.setName(name);
		guanhao.setSex(sex);
		guanhao.setAge(age);
		guanhao.setFeiyong(feiyong);
		guanhao.setKeshiId(keshiId);
		guanhao.setYishengId(yishengId);
		guanhao.setDel("no");
		guanhaoDAO.save(guanhao);
		this.setMessage("操作成功");
		this.setPath("guahaoMana.action");
		return "succeed";
	}
	
	
	public String guahaoMana()
	{
		String sql="from TGuanhao where del='no'";
		List guahaoList=guanhaoDAO.getHibernateTemplate().find(sql);
		for(int i=0;i<guahaoList.size();i++)
		{
			TGuanhao guanhao=(TGuanhao)guahaoList.get(i);
			guanhao.setKeshiName(keshiDAO.findById(guanhao.getKeshiId()).getKeshiAnme());
			guanhao.setYishengName(yishengDAO.findById(guanhao.getYishengId()).getYishengName());
		}
		Map request=(Map)ServletActionContext.getContext().get("request");
		request.put("guahaoList", guahaoList);
		return ActionSupport.SUCCESS;
后面还有 121 行代码,购买后查看完整代码

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

AI 解读 AI

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

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