src/com/xznu/edu/leave/action/LaboratoryAction.java
(开头部分) 6KB这里只显示每个文件的开头 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.Laboratory;
import com.xznu.edu.leave.model.LaboratoryLog;
import com.xznu.edu.leave.model.Role;
import com.xznu.edu.leave.model.User;
import com.xznu.edu.leave.service.LaboratoryLogService;
import com.xznu.edu.leave.service.LaboratoryService;
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("laboratoryAction")
@Scope("prototype")
public class LaboratoryAction extends ActionSupport implements ModelDriven<Laboratory> {
@Autowired
private UserService userService;
@Autowired
private RoleService roleService;
@Autowired
private LaboratoryService laboratoryService;
@Autowired
private LaboratoryLogService laboratoryLogService;
private User user;
private Laboratory laboratory;
private Integer laboratoryId;
private Map<String, Object> map = new HashMap();
/**
* list
*
* @return
*/
public String list(){
User user1 = UserUtils.getUser();
if (user1 == null || user1.getId() == null){
ActionContext.getContext().put("login", 1);
return SUCCESS;
}
Pager<Laboratory> pagers = null;
Role role = user1.getRole();
if (role.getEnName().equals("admin") || role.getEnName().equals("js")) {
后面还有 167 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读 AI
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
