📄 lend.java
字号:
package action;
import java.util.Date;
import com.opensymphony.xwork2.ActionSupport;
import com.service.LendBookService;
/**
*
* 借书业务操作action
*
*/
public class Lend extends ActionSupport {
private int bookid;
private int userid;
private String bookname;
private String username;
private Date engagetime;
private String msg;
public int getBookid() {
return bookid;
}
public void setBookid(int bookid) {
this.bookid = bookid;
}
public int getUserid() {
return userid;
}
public void setUserid(int userid) {
this.userid = userid;
}
@Override
public String execute() throws Exception {
// TODO Auto-generated method stub
if (!LendBookService.lend(userid, bookid, engagetime)) {
msg = "书籍《" + bookname + "》借出失败!请确认此书是否可借!";
return ERROR;
}
msg = "书籍《" + bookname + "》被用户*" + username + "*成功借出!";
return SUCCESS;
}
public String getMsg() {
return msg;
}
public void setMsg(String msg) {
this.msg = msg;
}
public Date getEngagetime() {
return engagetime;
}
public void setEngagetime(Date engagetime) {
this.engagetime = engagetime;
}
public String getBookname() {
return bookname;
}
public void setBookname(String bookname) {
this.bookname = bookname;
}
public String getUsername() {
return username;
}
public void setUsername(String username) {
this.username = username;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -