上传代码

master
zhiyong.ning 4 years ago
parent 41ef326915
commit 1d3a277b42
  1. 2
      src/main/java/com/yipin/liuwanr/entity/UserInfo.java
  2. 5
      src/main/java/com/yipin/liuwanr/service/UserInfoService.java

@ -99,4 +99,6 @@ public class UserInfo {
private String twoDepartmentName; private String twoDepartmentName;
//组织架构id //组织架构id
private Integer organizationRelationshipId; private Integer organizationRelationshipId;
//登陆时间
private String dataTime;
} }

@ -440,12 +440,13 @@ public class UserInfoService {
String roleId = userInfo.getRoleId(); String roleId = userInfo.getRoleId();
Integer schoolId = userInfo.getSchoolId(); Integer schoolId = userInfo.getSchoolId();
try { try {
SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");//设置日期格式
String date = df.format(new Date());// new Date()为获取当前系统时间,也可使用当前时间戳
UserInfo user=userInfoMapper.logins(userInfo); UserInfo user=userInfoMapper.logins(userInfo);
String token = user.getToken(); String token = user.getToken();
Integer userId = user.getUserId(); Integer userId = user.getUserId();
user.setDataTime(date);
obj.put("user",user); obj.put("user",user);
SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");//设置日期格式
String date = df.format(new Date());// new Date()为获取当前系统时间,也可使用当前时间戳
if(id!=null) { if(id!=null) {
List<Staff> staffList = userInfoMapper.queryStaffAll(id,roleId,schoolId); List<Staff> staffList = userInfoMapper.queryStaffAll(id,roleId,schoolId);
obj.put("staffList",staffList); obj.put("staffList",staffList);

Loading…
Cancel
Save