⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mature.java

📁 STRUTS2的入门 教程
💻 JAVA
字号:
package action;

import java.util.List;

import javax.servlet.http.HttpSession;

import org.apache.struts2.ServletActionContext;

import com.dao.LendDAO;
import com.opensymphony.xwork2.ActionSupport;
import com.vo.MatureBook;
/**
 * 
 * 借阅提示action
 *
 */
public class Mature extends ActionSupport {
	@Override
	public String execute() throws Exception {
		// TODO Auto-generated method stub
		HttpSession session = ServletActionContext.getRequest().getSession();
		String userid = session.getAttribute("userid").toString();
		num = new LendDAO().maturenum(Integer.parseInt(userid));
		if (num != 0) {
			list = new LendDAO().matureBook(Integer.parseInt(userid));
			msg = "您当前已有已到期的书籍!";
		}else {
			msg = "您当前还没有到期的书籍!";
		}
		return SUCCESS;
	}

	private boolean isInvalid(String value) {
		return (value == null || value.length() == 0);
	}

	private String msg;
	
	private List<MatureBook> list;

	private int num;
	public String getMsg() {
		return msg;
	}

	public void setMsg(String msg) {
		this.msg = msg;
	}

	public List<MatureBook> getList() {
		return list;
	}

	public void setList(List<MatureBook> list) {
		this.list = list;
	}

	public int getNum() {
		return num;
	}

	public void setNum(int num) {
		this.num = num;
	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -