package com.action; import java.util.List; import java.util.Map; import org.apache.struts2.ServletActionContext; import com.dao.TAdminDAO; import com.model.TAdmin; import com.opensymphony.xwork2.ActionSupport; public class adminAction extends ActionSupport { private int userId; private String userName; private String userPw; private String message; private String path; private int index=1; private TAdminDAO adminDAO; public String adminAdd() { TAdmin admin=new TAdmin(); admin.setUserName(userName); admin.setUserPw(userPw); adminDAO.save(admin); this.setMessage("²Ù×÷³É¹¦"); this.setPath("adminManage.action"); return "succeed"; } public String adminManage() { List adminList=adminDAO.findAll(); Map request=(Map)ServletActionContext.getContext().get("request"); request.put("adminList", adminList); return ActionSupport.SUCCESS; } public String adminDel() { adminDAO.delete(adminDAO.findById(userId)); this.setMessage("ɾ³ý³É¹¦"); this.setPath("adminManage.action"); return "succeed"; } public TAdminDAO getAdminDAO() { return adminDAO; } public void setAdminDAO(TAdminDAO adminDAO) { this.adminDAO = adminDAO; } public String getMessage() { return message; } public int getIndex() { return index; } public void setIndex(int index) { this.index = index; } public void setMessage(String message) { this.message = message; } public String getPath() { return path; } public void setPath(String path) { this.path = path; } public int getUserId() { return userId; } public void setUserId(int userId) { this.userId = userId; } public String getUserName() { return userName; } public void setUserName(String userName) { this.userName = userName; } public String getUserPw() { return userPw; } public void setUserPw(String userPw) { this.userPw = userPw; } }

wananall LV13
2024年3月13日
qq2901732871 LV9
2023年4月11日
907552380 LV13
2022年5月27日
1151277823 LV1
2022年4月2日
a318888331 LV13
2022年3月30日
wanglinddad LV55
2021年12月17日
iop4875127 LV4
2021年9月24日
1327330592 LV1
2021年6月1日
ericxu1116 LV24
2021年5月26日
fengsoul LV1
2021年5月19日

84126415 LV2
2024年12月10日
565236523
2024年12月10日
暂无贡献等级
9632148963 LV1
2024年12月10日
WBelong LV8
2024年9月20日
zayuchuan
2024年4月6日
暂无贡献等级
微信网友_6914427966033920 LV4
2024年3月20日
wananall LV13
2024年3月13日
茶话会
2024年3月11日
暂无贡献等级
静静123456 LV3
2023年12月16日
liuchang183 LV5
2023年12月8日