|
|
|
@ -1,6 +1,7 @@
|
|
|
|
|
package com.ibeetl.jlw.web;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import com.ibeetl.admin.console.web.query.UserQuery;
|
|
|
|
|
import com.ibeetl.admin.core.entity.CoreUser;
|
|
|
|
|
import com.ibeetl.admin.core.service.CoreUserService;
|
|
|
|
|
import com.ibeetl.admin.core.web.JsonResult;
|
|
|
|
@ -101,8 +102,12 @@ public class AccountController {
|
|
|
|
|
String roleName = objectMap.get("name").toString();
|
|
|
|
|
if (roleName.equals("学生")) {
|
|
|
|
|
return JsonResult.success(userService.getStudentByNo(username));
|
|
|
|
|
} else {
|
|
|
|
|
} else if (roleName.equals("教师")) {
|
|
|
|
|
return JsonResult.success(userService.getTeacherByNo(username));
|
|
|
|
|
}else if (roleName.equals("超级管理员")) {
|
|
|
|
|
return JsonResult.success(userService.getAdminByNo(username));
|
|
|
|
|
}else{
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return JsonResult.success(objectMap);
|
|
|
|
@ -822,4 +827,27 @@ public class AccountController {
|
|
|
|
|
map.put("content", mapPageQuery);
|
|
|
|
|
return map;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ApiOperation("修改用户表userid")
|
|
|
|
|
@PostMapping("updateUserId.json")
|
|
|
|
|
public JsonResult updateUserId() throws SQLException {
|
|
|
|
|
CoreUser coreUser = new CoreUser();
|
|
|
|
|
List<CoreUser> coreUsers = userService.getCoreUserList(coreUser);
|
|
|
|
|
int i = 0;
|
|
|
|
|
for (CoreUser user : coreUsers) {
|
|
|
|
|
Connection conn = openConn();
|
|
|
|
|
PreparedStatement ps = conn.prepareStatement("select * from EduUsers where username = '" + user.getCode() + "' and IsDeleted = 0");
|
|
|
|
|
|
|
|
|
|
ResultSet rs = ps.executeQuery();
|
|
|
|
|
while (rs.next()) {
|
|
|
|
|
Long userId = rs.getLong("id");
|
|
|
|
|
user.setOldId(userId);
|
|
|
|
|
userService.updateTemplate(user);
|
|
|
|
|
}
|
|
|
|
|
closeConn(conn);
|
|
|
|
|
ps.close();
|
|
|
|
|
System.out.println("已完成:"+i++);
|
|
|
|
|
}
|
|
|
|
|
return JsonResult.success();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|