src/com/allde/wo/huogui/action/HuoguiAction.java

(开头部分) 4KB

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

package com.allde.wo.huogui.action;

import java.io.IOException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
import java.util.Set;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;

import org.apache.struts2.ServletActionContext;

import com.allde.wo.chuanzhi.business.ebi.ChuanzhiEbi;
import com.allde.wo.chuanzhi.model.ChuanzhiModel;
import com.allde.wo.chuanzhi.model.ChuanzhiQueryModel;
import com.allde.wo.huogui.business.ebi.HuoguiEbi;
import com.allde.wo.huogui.model.HuoguiModel;
import com.allde.wo.huogui.model.HuoguiQueryModel;
import com.opensymphony.xwork2.ActionSupport;
import com.opensymphony.xwork2.ModelDriven;

public class HuoguiAction extends ActionSupport implements ModelDriven<HuoguiModel> {
	private HuoguiModel huoguiModel = new HuoguiModel();
	private HuoguiEbi huoguiEbi;
	

	public void sethuoguiEbi(HuoguiEbi huoguiEbi) {
		this.huoguiEbi = huoguiEbi;
	}

	public String create() {
		SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");//设置日期格式
		String ttime = df.format(new Date());// new Date()为获取当前系统时间
		huoguiModel.setTtime(ttime);
		huoguiEbi.create(huoguiModel);
		return SUCCESS;
	}
	//更具id得到用户详细信息
	public String getUserid(){
		HttpServletRequest request = ServletActionContext.getRequest();
		int id = Integer.parseInt(request.getParameter("id"));
		HuoguiQueryModel qm = new HuoguiQueryModel();
		qm.setId(id);
		request.setAttribute("newsxx", huoguiEbi.getByCondition(qm, 0, 20));
		return "xxid";
	}
	//根据Id得到用户信息去修改
	public String getUserById(){
		HttpServletRequest request = ServletActionContext.getRequest();
		int id = Integer.parseInt(request.getParameter("id"));
		HuoguiQueryModel qm = new HuoguiQueryModel();
		qm.setId(id);
		request.setAttribute("newsupdate", huoguiEbi.getByCondition(qm, 0, 20));
		return "byid";
	}
	//删除
	public String deletedById() {
		HttpServletRequest request = ServletActionContext.getRequest();
		int id = Integer.parseInt(request.getParameter("id"));
后面还有 74 行代码,购买后查看完整代码

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

AI 解读 AI

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

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