src/com/xznu/edu/leave/action/NoticeAction.java
(开头部分) 3KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
package com.xznu.edu.leave.action;
/**
* 用户新增
*/
import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionSupport;
import com.opensymphony.xwork2.ModelDriven;
import com.xznu.edu.leave.model.Notice;
import com.xznu.edu.leave.model.Role;
import com.xznu.edu.leave.model.User;
import com.xznu.edu.leave.service.NoticeService;
import com.xznu.edu.leave.service.RoleService;
import com.xznu.edu.leave.service.UserService;
import com.xznu.edu.leave.utils.JsonUtils;
import com.xznu.edu.leave.utils.Pager;
import com.xznu.edu.leave.utils.UserUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;
import java.io.IOException;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
@Controller("noticeAction")
@Scope("prototype")
public class NoticeAction extends ActionSupport implements ModelDriven<Notice> {
@Autowired
private NoticeService service;
private Notice notice;
private Map<String, Object> map = new HashMap();
/**
* list
*
* @return
*/
public String list() throws IOException {
User user1 = UserUtils.getUser();
if (user1 == null || user1.getId() == null) {
ActionContext.getContext().put("login", 1);
return SUCCESS;
}
Pager<Notice> pagers = service.getList(notice);
Role role = user1.getRole();
ActionContext.getContext().put("pagers", pagers);
ActionContext.getContext().put("user", user1);
ActionContext.getContext().put("role", role);
return SUCCESS;
}
/**
* 跳转add
*
* @return
后面还有 64 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读 AI
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
