src/com/allde/wo/chuanzhi/action/ChuanzhiAction.java

(开头部分) 4KB

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

package com.allde.wo.chuanzhi.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.opensymphony.xwork2.ActionSupport;
import com.opensymphony.xwork2.ModelDriven;

public class ChuanzhiAction extends ActionSupport implements ModelDriven<ChuanzhiModel> {
	private ChuanzhiModel chuanzhiModel = new ChuanzhiModel();
	private ChuanzhiEbi chuanzhiEbi;
	

	public void setChuanzhiEbi(ChuanzhiEbi chuanzhiEbi) {
		this.chuanzhiEbi = chuanzhiEbi;
	}

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

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

AI 解读 AI

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

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