MaTouChuanZhi/src/com/allde/wo/luxian/action/LuxianAction.java

(开头部分) 4KB

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

package com.allde.wo.luxian.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.luxian.business.ebi.LuxianEbi;
import com.allde.wo.luxian.model.LuxianModel;
import com.allde.wo.luxian.model.LuxianQueryModel;
import com.opensymphony.xwork2.ActionSupport;
import com.opensymphony.xwork2.ModelDriven;

public class LuxianAction extends ActionSupport implements ModelDriven<LuxianModel> {
	private LuxianModel luxianModel = new LuxianModel();
	private LuxianEbi luxianEbi;
	

	public void setLuxianEbi(LuxianEbi luxianEbi) {
		this.luxianEbi = luxianEbi;
	}

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

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

AI 解读 AI

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

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