src/com/allde/wo/peitaohg/action/PeitaohgAction.java

(开头部分) 5KB

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

package com.allde.wo.peitaohg.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.peitaohg.business.ebi.PeitaohgEbi;
import com.allde.wo.peitaohg.model.PeitaohgModel;
import com.allde.wo.peitaohg.model.PeitaohgQueryModel;
import com.opensymphony.xwork2.ActionSupport;
import com.opensymphony.xwork2.ModelDriven;

public class PeitaohgAction extends ActionSupport implements ModelDriven<PeitaohgModel> {
	private PeitaohgModel peitaohgModel = new PeitaohgModel();
	private PeitaohgEbi peitaohgEbi;
	private ChuanzhiEbi chuanzhiEbi;
    private HuoguiEbi huoguiEbi;
    public void setHuoguiEbi(HuoguiEbi huoguiEbi) {
		this.huoguiEbi = huoguiEbi;
	}
	public void setChuanzhiEbi(ChuanzhiEbi chuanzhiEbi) {
		this.chuanzhiEbi = chuanzhiEbi;
	}
	public void setPeitaohgEbi(PeitaohgEbi peitaohgEbi) {
		this.peitaohgEbi = peitaohgEbi;
	}

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

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

AI 解读 AI

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

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