wangwei 7 gadi atpakaļ
vecāks
revīzija
2a22be8db4

+ 1 - 1
examcloud-core-basic-api-provider/src/main/java/cn/com/qmth/examcloud/core/basic/api/controller/StudentController.java

@@ -27,7 +27,7 @@ import org.springframework.web.bind.annotation.RestController;
 import cn.com.qmth.examcloud.core.basic.dao.StudentRepo;
 import cn.com.qmth.examcloud.core.basic.dao.UserRepo;
 import cn.com.qmth.examcloud.core.basic.dao.entity.Student;
-import cn.com.qmth.examcloud.core.basic.dao.entity.User;
+import cn.com.qmth.examcloud.core.basic.dao.entity.UserEntity;
 import cn.com.qmth.examcloud.core.basic.dao.enums.LoginType;
 import cn.com.qmth.examcloud.core.basic.service.bean.UserInfo;
 import cn.com.qmth.examcloud.core.basic.service.impl.StudentService;

+ 11 - 11
examcloud-core-basic-api-provider/src/main/java/cn/com/qmth/examcloud/core/basic/api/controller/UserController.java

@@ -37,7 +37,7 @@ import cn.com.qmth.examcloud.commons.web.security.enums.RoleMeta;
 import cn.com.qmth.examcloud.commons.web.security.enums.UacPolicy;
 import cn.com.qmth.examcloud.commons.web.support.ControllerSupport;
 import cn.com.qmth.examcloud.core.basic.dao.UserRepo;
-import cn.com.qmth.examcloud.core.basic.dao.entity.User;
+import cn.com.qmth.examcloud.core.basic.dao.entity.UserEntity;
 import cn.com.qmth.examcloud.core.basic.dao.entity.UserRole;
 import cn.com.qmth.examcloud.core.basic.dao.enums.UserType;
 import cn.com.qmth.examcloud.core.basic.service.bean.UserInfo;
@@ -60,7 +60,7 @@ public class UserController extends ControllerSupport{
 
     @ApiOperation(value = "查询所有用户", notes = "分页带查询")
     @GetMapping("/all/{curPage}/{pageSize}")
-    public ResponseEntity getAllUser(@ModelAttribute User userCriteria,
+    public ResponseEntity getAllUser(@ModelAttribute UserEntity userCriteria,
                                      @PathVariable Integer curPage,
                                      @PathVariable Integer pageSize,
                                      HttpServletRequest request) {
@@ -88,20 +88,20 @@ public class UserController extends ControllerSupport{
     @ApiOperation(value = "按orgId查询用户", notes = "机构id查询机构用户")
     @GetMapping("/org/{orgId}")
     public ResponseEntity getUserByOrgId(@PathVariable long orgId) {
-        List<User> userList = userRepo.findByOrgIdAndType(orgId, UserType.NOT_STUDENT.name());
+        List<UserEntity> userList = userRepo.findByOrgIdAndType(orgId, UserType.NOT_STUDENT.name());
         return new ResponseEntity(userList, HttpStatus.OK);
     }
 
     @ApiOperation(value = "按rootOrgId查询用户", notes = "根机构id查询机构用户")
     @GetMapping("/rootOrg/{rootOrgId}")
     public ResponseEntity getUserByRootOrgId(@PathVariable long rootOrgId) {
-        List<User> userList = userRepo.findByRootOrgIdAndType(rootOrgId, UserType.NOT_STUDENT.name());
+        List<UserEntity> userList = userRepo.findByRootOrgIdAndType(rootOrgId, UserType.NOT_STUDENT.name());
         return new ResponseEntity(userList, HttpStatus.OK);
     }
 
     @ApiOperation(value = "新增用户", notes = "新增")
     @PostMapping
-    public ResponseEntity addUser(@RequestBody User user, HttpServletRequest request) {
+    public ResponseEntity addUser(@RequestBody UserEntity user, HttpServletRequest request) {
         cn.com.qmth.examcloud.commons.web.security.bean.User accessUser = getAccessUser();
         if (accessUser != null) {
             if (accessUser.getRootOrgId() != 0) {
@@ -121,7 +121,7 @@ public class UserController extends ControllerSupport{
 
 	@ApiOperation(value = "更新用户", notes = "更新")
 	@PutMapping
-	public User updateUser(@RequestBody User user, HttpServletRequest request) {
+	public UserEntity updateUser(@RequestBody UserEntity user, HttpServletRequest request) {
 		cn.com.qmth.examcloud.commons.web.security.bean.User accessUser = getAccessUser();
 		
 		List<UserRole> userRoles = user.getUserRoles();
@@ -157,7 +157,7 @@ public class UserController extends ControllerSupport{
         List<Long> userIds = Stream.of(ids.split(",")).map(s -> Long.parseLong(s.trim()))
                 .collect(Collectors.toList());
         for (Long userId : userIds) {
-            User user = userRepo.findOne(userId);
+            UserEntity user = userRepo.findOne(userId);
             user.setEnable(true);
             user.setUpdateTime(new Date());
             userRepo.save(user);
@@ -171,7 +171,7 @@ public class UserController extends ControllerSupport{
         List<Long> userIds = Stream.of(ids.split(",")).map(s -> Long.parseLong(s.trim()))
                 .collect(Collectors.toList());
         for (Long userId : userIds) {
-            User user = userRepo.findOne(userId);
+            UserEntity user = userRepo.findOne(userId);
             user.setEnable(false);
             user.setUpdateTime(new Date());
             userRepo.save(user);
@@ -198,7 +198,7 @@ public class UserController extends ControllerSupport{
             return new ResponseEntity(new ErrorMsg("原密码不正确"), HttpStatus.BAD_REQUEST);
         } else {
             Long userId = accessUser.getUserId();
-            User user = userRepo.findOne(userId);
+            UserEntity user = userRepo.findOne(userId);
             if (!oldPassword.equals(user.getPassword())) {
                 return new ResponseEntity(new ErrorMsg("原密码不正确"), HttpStatus.BAD_REQUEST);
             }
@@ -282,7 +282,7 @@ public class UserController extends ControllerSupport{
 
     @ApiOperation(value="查询评卷员带分页",notes="查询评卷员带分页")
     @GetMapping("/all/marker/{curPage}/{pageSize}")
-    public ResponseEntity getAllMark(@ModelAttribute User user,
+    public ResponseEntity getAllMark(@ModelAttribute UserEntity user,
     								 @PathVariable Integer curPage,
     								 @PathVariable Integer pageSize,
     								 HttpServletRequest request){
@@ -291,7 +291,7 @@ public class UserController extends ControllerSupport{
     		user.setRootOrgId(accessUser.getRootOrgId());
     		return new ResponseEntity(userService.getAllMaker(user,new PageRequest(curPage-1, pageSize)),HttpStatus.OK);
     	}else{
-    	    return new ResponseEntity(new PageImpl<User>(new ArrayList<User>()),HttpStatus.OK);
+    	    return new ResponseEntity(new PageImpl<UserEntity>(new ArrayList<UserEntity>()),HttpStatus.OK);
         }
     }
 

+ 1 - 1
examcloud-core-basic-api-provider/src/main/java/cn/com/qmth/examcloud/core/basic/api/controller/UserRoleController.java

@@ -2,7 +2,7 @@ package cn.com.qmth.examcloud.core.basic.api.controller;
 
 import cn.com.qmth.examcloud.core.basic.dao.UserRepo;
 import cn.com.qmth.examcloud.core.basic.dao.UserRoleRepo;
-import cn.com.qmth.examcloud.core.basic.dao.entity.User;
+import cn.com.qmth.examcloud.core.basic.dao.entity.UserEntity;
 import cn.com.qmth.examcloud.core.basic.dao.entity.UserRole;
 import cn.com.qmth.examcloud.core.basic.service.impl.UserRoleService;
 import io.swagger.annotations.ApiOperation;

+ 3 - 3
examcloud-core-basic-api-provider/src/main/java/cn/com/qmth/examcloud/core/basic/api/provider/UserCloudServiceProvider.java

@@ -28,7 +28,7 @@ import cn.com.qmth.examcloud.core.basic.dao.StudentRepo;
 import cn.com.qmth.examcloud.core.basic.dao.UserRepo;
 import cn.com.qmth.examcloud.core.basic.dao.entity.Org;
 import cn.com.qmth.examcloud.core.basic.dao.entity.Student;
-import cn.com.qmth.examcloud.core.basic.dao.entity.User;
+import cn.com.qmth.examcloud.core.basic.dao.entity.UserEntity;
 import cn.com.qmth.examcloud.core.basic.dao.entity.UserRole;
 import cn.com.qmth.examcloud.core.basic.service.UserService;
 import io.swagger.annotations.ApiOperation;
@@ -89,7 +89,7 @@ public class UserCloudServiceProvider extends ControllerSupport implements UserC
 
 		// 常规账户登录
 		if (AccountType.COMMON_LOGIN_NAME.getCode().equals(accountType)) {
-			User user = userService.getUser(Long.parseLong(rootOrgId), accountValue);
+			UserEntity user = userService.getUser(Long.parseLong(rootOrgId), accountValue);
 			if (null == user) {
 				throw new StatusException("B-001004", "用户不存在");
 			}
@@ -143,7 +143,7 @@ public class UserCloudServiceProvider extends ControllerSupport implements UserC
 		if (null == student) {
 			throw new StatusException("B-001005", "学生信息不存在");
 		}
-		User user = userRepo.findOne(student.getUser().getId());
+		UserEntity user = userRepo.findOne(student.getUser().getId());
 		String rightPassword = user.getPassword();
 		if (!rightPassword.equals(password)) {
 			throw new StatusException("B-001003", "密码错误");

+ 11 - 11
examcloud-core-basic-dao/src/main/java/cn/com/qmth/examcloud/core/basic/dao/UserRepo.java

@@ -12,39 +12,39 @@ import org.springframework.data.repository.query.Param;
 import org.springframework.data.repository.query.QueryByExampleExecutor;
 import org.springframework.transaction.annotation.Transactional;
 
-import cn.com.qmth.examcloud.core.basic.dao.entity.User;
+import cn.com.qmth.examcloud.core.basic.dao.entity.UserEntity;
 
 /**
  * Created by songyue on 17/1/13.
  */
-public interface UserRepo extends JpaRepository<User,Long>,QueryByExampleExecutor<User>,JpaSpecificationExecutor<User>{
+public interface UserRepo extends JpaRepository<UserEntity,Long>,QueryByExampleExecutor<UserEntity>,JpaSpecificationExecutor<UserEntity>{
 
-    User findByRootOrgIdAndLoginName(long rootOrgId,String loginName);
+    UserEntity findByRootOrgIdAndLoginName(long rootOrgId,String loginName);
 
-    User findByLoginName(String loginName);
+    UserEntity findByLoginName(String loginName);
 
     @Transactional
     @Modifying
-    @Query("update User set password = :password where id = :id")
+    @Query("update UserEntity set password = :password where id = :id")
     void updatePasswordById(@Param("id")long id,@Param("password")String password);
 
     int countByLoginName(String loginName);
 
-    List<User> findByOrgIdAndType(long orgId,String userType);
+    List<UserEntity> findByOrgIdAndType(long orgId,String userType);
 
-    List<User> findByRootOrgIdAndType(long rootOrgId,String userType);
+    List<UserEntity> findByRootOrgIdAndType(long rootOrgId,String userType);
 
-	List<User> findByOrgId(Long orgId);
+	List<UserEntity> findByOrgId(Long orgId);
 	
 	@Query(nativeQuery = true,value = "SELECT DISTINCT * FROM ecs_core_user us, ecs_core_user_role ur WHERE us.id = ur.user_id And us.root_org_id = ? And ur.role_code = 'MARKER' And us.enable = 1")
-	List<User> findMarkerByRootOrgId(Long rootOrgId);
+	List<UserEntity> findMarkerByRootOrgId(Long rootOrgId);
 
     @Query(value = "SELECT distinct * FROM ecs_core_user us, ecs_core_user_role ur WHERE us.id = ur.user_id " +
             "And us.root_org_id = ? And ur.role_code = 'MARKER' And us.enable = 1 ORDER BY ?#{#pageable}",
     countQuery = "SELECT count(distinct us.id) FROM ecs_core_user us, ecs_core_user_role ur WHERE us.id = ur.user_id " +
             "And us.root_org_id = ? And ur.role_code = 'MARKER' And us.enable = 1 ORDER BY ?#{#pageable}",nativeQuery = true)
-    Page<User> findMarkerByRootOrgId(Long rootOrgId, Pageable pageable);
+    Page<UserEntity> findMarkerByRootOrgId(Long rootOrgId, Pageable pageable);
 
     @Query(nativeQuery = true,value = "SELECT DISTINCT * FROM ecs_core_user us, ecs_core_user_role ur WHERE us.type = 'PRINT' and us.id = ur.user_id and ur.role_code = 'PROJECT_MANAGER' And us.enable = 1")
-    List<User> findPrintPm();
+    List<UserEntity> findPrintPm();
 }

+ 3 - 3
examcloud-core-basic-dao/src/main/java/cn/com/qmth/examcloud/core/basic/dao/entity/Student.java

@@ -23,7 +23,7 @@ public class Student implements Serializable {
 
 	@OneToOne(cascade = { CascadeType.ALL })
 	@JoinColumn(name = "userId")
-	private User user;
+	private UserEntity user;
 
 	@NotNull
 	private String name;
@@ -69,11 +69,11 @@ public class Student implements Serializable {
 		this.id = id;
 	}
 
-	public User getUser() {
+	public UserEntity getUser() {
 		return user;
 	}
 
-	public void setUser(User user) {
+	public void setUser(UserEntity user) {
 		this.user = user;
 	}
 

+ 4 - 4
examcloud-core-basic-dao/src/main/java/cn/com/qmth/examcloud/core/basic/dao/entity/User.java → examcloud-core-basic-dao/src/main/java/cn/com/qmth/examcloud/core/basic/dao/entity/UserEntity.java

@@ -1,6 +1,5 @@
 package cn.com.qmth.examcloud.core.basic.dao.entity;
 
-import java.io.Serializable;
 import java.util.Date;
 import java.util.List;
 
@@ -9,6 +8,7 @@ import javax.validation.constraints.NotNull;
 
 import org.springframework.format.annotation.DateTimeFormat;
 
+import cn.com.qmth.examcloud.commons.web.cloud.api.JsonSerializable;
 import cn.com.qmth.examcloud.core.basic.dao.enums.Gender;
 import cn.com.qmth.examcloud.core.basic.dao.enums.UserScope;
 import cn.com.qmth.examcloud.core.basic.dao.enums.UserType;
@@ -18,7 +18,7 @@ import cn.com.qmth.examcloud.core.basic.dao.enums.UserType;
  */
 @Entity
 @Table(name = "ecs_core_user")
-public class User implements Serializable{
+public class UserEntity implements JsonSerializable{
 
     private static final long serialVersionUID = 9190180279768027647L;
 
@@ -193,10 +193,10 @@ public class User implements Serializable{
         this.userRoles = userRoles;
     }
 
-    public User() {
+    public UserEntity() {
     }
     
-    public User(String name,UserScope scope,Long rootOrgId,Long orgId,UserType type) {
+    public UserEntity(String name,UserScope scope,Long rootOrgId,Long orgId,UserType type) {
     	this.name = name;
     	this.scope = scope;
     	this.rootOrgId = rootOrgId;

+ 2 - 2
examcloud-core-basic-service/src/main/java/cn/com/qmth/examcloud/core/basic/service/UserService.java

@@ -1,6 +1,6 @@
 package cn.com.qmth.examcloud.core.basic.service;
 
-import cn.com.qmth.examcloud.core.basic.dao.entity.User;
+import cn.com.qmth.examcloud.core.basic.dao.entity.UserEntity;
 
 /**
  * 用户服务
@@ -18,7 +18,7 @@ public interface UserService {
 	 * @param loginName
 	 * @return
 	 */
-	User getUser(Long rootOrgId, String loginName);
+	UserEntity getUser(Long rootOrgId, String loginName);
 	
 
 }

+ 4 - 4
examcloud-core-basic-service/src/main/java/cn/com/qmth/examcloud/core/basic/service/impl/OrgService.java

@@ -28,7 +28,7 @@ import cn.com.qmth.examcloud.core.basic.dao.UserRepo;
 import cn.com.qmth.examcloud.core.basic.dao.constants.Consts;
 import cn.com.qmth.examcloud.core.basic.dao.entity.ExamSite;
 import cn.com.qmth.examcloud.core.basic.dao.entity.Org;
-import cn.com.qmth.examcloud.core.basic.dao.entity.User;
+import cn.com.qmth.examcloud.core.basic.dao.entity.UserEntity;
 import cn.com.qmth.examcloud.core.basic.dao.entity.UserRole;
 import cn.com.qmth.examcloud.core.basic.dao.enums.OrgType;
 import cn.com.qmth.examcloud.core.basic.dao.enums.UserScope;
@@ -111,7 +111,7 @@ public class OrgService {
 	 * @param tempOrg
      */
 	private void createOrgUser(Org tempOrg){
-		User user = new User(tempOrg.getName(), UserScope.ORG, tempOrg.getRootId(), tempOrg.getId(), UserType.NOT_STUDENT);
+		UserEntity user = new UserEntity(tempOrg.getName(), UserScope.ORG, tempOrg.getRootId(), tempOrg.getId(), UserType.NOT_STUDENT);
 		user.setLoginName(tempOrg.getCode());
 		user.setEnable(true);
 		user.setCreateTime(new Date());
@@ -183,8 +183,8 @@ public class OrgService {
 		org.setEnable(enable);
 		orgRepo.save(org);
 		if(enable == false){
-			List<User> users = userRepo.findByOrgId(id);
-			for (User user : users) {
+			List<UserEntity> users = userRepo.findByOrgId(id);
+			for (UserEntity user : users) {
 				user.setEnable(false);
 				userRepo.save(user);
 			}

+ 3 - 3
examcloud-core-basic-service/src/main/java/cn/com/qmth/examcloud/core/basic/service/impl/StudentService.java

@@ -24,7 +24,7 @@ import cn.com.qmth.examcloud.core.basic.dao.StudentRepo;
 import cn.com.qmth.examcloud.core.basic.dao.UserRepo;
 import cn.com.qmth.examcloud.core.basic.dao.entity.Org;
 import cn.com.qmth.examcloud.core.basic.dao.entity.Student;
-import cn.com.qmth.examcloud.core.basic.dao.entity.User;
+import cn.com.qmth.examcloud.core.basic.dao.entity.UserEntity;
 import cn.com.qmth.examcloud.core.basic.dao.entity.UserRole;
 import cn.com.qmth.examcloud.core.basic.dao.enums.LoginType;
 import cn.com.qmth.examcloud.core.basic.dao.enums.UserScope;
@@ -143,7 +143,7 @@ public class StudentService {
             student.setOrgId(student.getUser().getOrgId());
             student.setRootOrgId(student.getUser().getRootOrgId());
             //新建用户和学生
-            User user = new User(student.getName(), UserScope.ORG, student.getUser().getRootOrgId(), student.getUser().getOrgId(), UserType.STUDENT);
+            UserEntity user = new UserEntity(student.getName(), UserScope.ORG, student.getUser().getRootOrgId(), student.getUser().getOrgId(), UserType.STUDENT);
             user.setEnable(student.getUser().getEnable() == null ? true : student.getUser().getEnable());
             String password = null;
             if (!StringUtils.isEmpty(student.getIdentityNumber())) {//身份证号后6位
@@ -216,7 +216,7 @@ public class StudentService {
 
     public Student update(Student student) {
         student.setUpdateTime(new Date());
-        User user = userRepo.findOne(student.getUser().getId());
+        UserEntity user = userRepo.findOne(student.getUser().getId());
         user.setName(student.getName());
         student.setUser(user);
         student = studentRepo.save(student);

+ 35 - 35
examcloud-core-basic-service/src/main/java/cn/com/qmth/examcloud/core/basic/service/impl/UserServiceImpl.java

@@ -42,7 +42,7 @@ import cn.com.qmth.examcloud.core.basic.dao.entity.Org;
 import cn.com.qmth.examcloud.core.basic.dao.entity.Student;
 import cn.com.qmth.examcloud.core.basic.dao.entity.ThirdPartyAccess;
 import cn.com.qmth.examcloud.core.basic.dao.entity.ThirdPartyAccessPK;
-import cn.com.qmth.examcloud.core.basic.dao.entity.User;
+import cn.com.qmth.examcloud.core.basic.dao.entity.UserEntity;
 import cn.com.qmth.examcloud.core.basic.dao.entity.UserLogin;
 import cn.com.qmth.examcloud.core.basic.dao.entity.UserOpsLog;
 import cn.com.qmth.examcloud.core.basic.dao.entity.UserRole;
@@ -103,8 +103,8 @@ public class UserServiceImpl  implements UserService{
      * @param pageable
      * @return
      */
-    public Page<User> findAll(User userCriteria, Pageable pageable){
-        Specification<User> userSpecification = (root, query, cb) -> {
+    public Page<UserEntity> findAll(UserEntity userCriteria, Pageable pageable){
+        Specification<UserEntity> userSpecification = (root, query, cb) -> {
             List<Predicate> predicates = new ArrayList<>();
             if(userCriteria.getType() != null){
             	predicates.add(cb.equal(root.get("type"),userCriteria.getType()));
@@ -124,7 +124,7 @@ public class UserServiceImpl  implements UserService{
             }
             return cb.and(predicates.toArray(new Predicate[predicates.size()]));
         };
-        List<User> users = userRepo.findAll(userSpecification);
+        List<UserEntity> users = userRepo.findAll(userSpecification);
         int pageNumber = pageable.getPageNumber();
         int pageSize = pageable.getPageSize();
         users = users.stream()
@@ -135,7 +135,7 @@ public class UserServiceImpl  implements UserService{
                 .skip(pageNumber * pageSize)
                 .limit(pageSize)
                 .collect(Collectors.toList());
-        Page<User> userPage = new PageImpl<User>(users,pageable,total);
+        Page<UserEntity> userPage = new PageImpl<UserEntity>(users,pageable,total);
         return userPage;
     }
 
@@ -144,7 +144,7 @@ public class UserServiceImpl  implements UserService{
      * @param user
      * @return
      */
-    private boolean filterNonMarkerUser(User user){
+    private boolean filterNonMarkerUser(UserEntity user){
         List<UserRole> userRoles = user.getUserRoles();
         if(userRoles != null){
             if(userRoles.size() == 1 && userRoles.get(0).getRoleCode().equals(RoleMeta.MARKER.name())){
@@ -161,7 +161,7 @@ public class UserServiceImpl  implements UserService{
      * @param user
      * @return
      */
-    private boolean filterAdminUser(User user){
+    private boolean filterAdminUser(UserEntity user){
         List<UserRole> userRoles = user.getUserRoles();
         if(userRoles != null){
             for(UserRole userRole:userRoles){
@@ -183,8 +183,8 @@ public class UserServiceImpl  implements UserService{
      * @param pageable
      * @return
      */
-    public Page<User> findOrgUser(User userCriteria,Pageable pageable){
-        Specification<User> userSpecification = (root, query, cb) -> {
+    public Page<UserEntity> findOrgUser(UserEntity userCriteria,Pageable pageable){
+        Specification<UserEntity> userSpecification = (root, query, cb) -> {
             List<Predicate> predicates = new ArrayList<>();
             predicates.add(cb.equal(root.get("rootOrgId"),root.get("orgId")));
             if(userCriteria.getType() != null){
@@ -204,7 +204,7 @@ public class UserServiceImpl  implements UserService{
             }
             return cb.and(predicates.toArray(new Predicate[predicates.size()]));
         };
-        List<User> users = userRepo.findAll(userSpecification);
+        List<UserEntity> users = userRepo.findAll(userSpecification);
         int pageNumber = pageable.getPageNumber();
         int pageSize = pageable.getPageSize();
         users = users.stream()
@@ -215,7 +215,7 @@ public class UserServiceImpl  implements UserService{
                 .skip(pageNumber * pageSize)
                 .limit(pageSize)
                 .collect(Collectors.toList());
-        Page<User> userPage = new PageImpl<User>(users,pageable,total);
+        Page<UserEntity> userPage = new PageImpl<UserEntity>(users,pageable,total);
         return userPage;
     }
 
@@ -224,7 +224,7 @@ public class UserServiceImpl  implements UserService{
      * @param userId
      */
     public void initPassword(long userId){
-        User user = userRepo.findOne(userId);
+        UserEntity user = userRepo.findOne(userId);
         //根据用户类型采用不同的初始化策略
         if(user.getType() == UserType.NOT_STUDENT){
             //初始化为默认密码
@@ -253,7 +253,7 @@ public class UserServiceImpl  implements UserService{
      */
     public UserInfo login(String loginName,
                           String password)throws Exception{
-		User user = userRepo.findByLoginName(loginName);
+		UserEntity user = userRepo.findByLoginName(loginName);
 		if (user == null) {
 			throw new RuntimeException("该用户不存在");
 		} else if (!user.getEnable()) {
@@ -273,7 +273,7 @@ public class UserServiceImpl  implements UserService{
     public UserInfo login(long orgId,
                           String loginName,
                           String password)throws Exception{
-        User user = userRepo.findByRootOrgIdAndLoginName(orgId,loginName);
+        UserEntity user = userRepo.findByRootOrgIdAndLoginName(orgId,loginName);
 		if (user == null) {
 			throw new RuntimeException("该用户不存在");
 		} else if (!user.getEnable()) {
@@ -288,7 +288,7 @@ public class UserServiceImpl  implements UserService{
      * @param user
      * @return
      */
-	public UserInfo loginProcess(User user) throws Exception {
+	public UserInfo loginProcess(UserEntity user) throws Exception {
 		LoginInfo loginInfo=new LoginInfo();
 		loginInfo.setAccountType(AccountType.COMMON_LOGIN_NAME.getCode());
 		loginInfo.setAccountValue(user.getLoginName());
@@ -339,7 +339,7 @@ public class UserServiceImpl  implements UserService{
 			throw new RuntimeException("第三方系统接入鉴权失败: token校验失败!");
 		}
 
-		User user = userRepo.findByRootOrgIdAndLoginName(orgId, userid);
+		UserEntity user = userRepo.findByRootOrgIdAndLoginName(orgId, userid);
 		if (user == null) {
 			throw new RuntimeException("该用户不存在!");
 		}
@@ -352,7 +352,7 @@ public class UserServiceImpl  implements UserService{
      * @param user
      */
 	@Deprecated
-    public void initUserLogin(User user){
+    public void initUserLogin(UserEntity user){
         //判断是否已登录,若已登录则强制已登录用户退出
         UserLogin userLogin= userLoginRepo.findFirstByUserId(user.getId());
         if(userLogin != null){
@@ -366,7 +366,7 @@ public class UserServiceImpl  implements UserService{
      * @param user
      * @param action
      */
-    public void createUserOpsLog(User user,String action){
+    public void createUserOpsLog(UserEntity user,String action){
         UserOpsLog userOpsLog = new UserOpsLog(action,user.getId(),user.getName(),new Date());
         userOpsLogRepo.save(userOpsLog);
     }
@@ -377,7 +377,7 @@ public class UserServiceImpl  implements UserService{
      * @param user
      */
     @Deprecated
-    public void createUserLogin(String token,User user){
+    public void createUserLogin(String token,UserEntity user){
         UserLogin userLogin = new UserLogin();
         userLogin.setLoginTime(new Date());
         userLogin.setUserId(user.getId());
@@ -391,7 +391,7 @@ public class UserServiceImpl  implements UserService{
      * @param user
      */
     @Deprecated
-    public void createAccessUser(String token,User user,Long studentId)throws Exception{
+    public void createAccessUser(String token,UserEntity user,Long studentId)throws Exception{
         AccessUser accessUser = new AccessUser();
         Set<UserRole> userRoleSet = new HashSet<UserRole>(user.getUserRoles());
         Org org = orgService.findOne(user.getRootOrgId());
@@ -418,7 +418,7 @@ public class UserServiceImpl  implements UserService{
      * @param token
      * @return
      */
-    public UserInfo getUserInfo(User user,String token)throws Exception{
+    public UserInfo getUserInfo(UserEntity user,String token)throws Exception{
         UserInfo userInfo = new UserInfo();
         Org org = orgService.findOne(user.getOrgId());
         Org rootOrg = orgService.findOne(user.getRootOrgId());
@@ -465,7 +465,7 @@ public class UserServiceImpl  implements UserService{
         userLoginRepo.deleteByUserId(accessUser.getUserId());
 	}
 
-	public List<User> getMarker(Long rootOrgId) {
+	public List<UserEntity> getMarker(Long rootOrgId) {
 		return userRepo.findMarkerByRootOrgId(rootOrgId);
 	}
 	
@@ -475,13 +475,13 @@ public class UserServiceImpl  implements UserService{
 	 * @param pageable
 	 * @return
 	 */
-	public Page<User> getAllMaker(User user,Pageable pageable){
-		Specification<User> specification = getSpecification(user);
+	public Page<UserEntity> getAllMaker(UserEntity user,Pageable pageable){
+		Specification<UserEntity> specification = getSpecification(user);
 		return userRepo.findAll(specification,pageable);
 	}
 
-	public Specification<User> getSpecification(User user){
-		Specification<User> specification = (root, query, cb) -> {
+	public Specification<UserEntity> getSpecification(UserEntity user){
+		Specification<UserEntity> specification = (root, query, cb) -> {
 			List<Predicate> predicates = new ArrayList<>();
 			predicates.add(cb.equal(root.get("type"),UserType.NOT_STUDENT));
             predicates.add(cb.equal(root.get("rootOrgId"),user.getRootOrgId()));
@@ -501,7 +501,7 @@ public class UserServiceImpl  implements UserService{
 		return specification;
 	}
 	
-	public User save(User user) throws Exception{
+	public UserEntity save(UserEntity user) throws Exception{
         user.setScope(UserScope.ORG);
         user.setCreateTime(new Date());
 		checkLoginName(user.getRootOrgId(), user.getLoginName());
@@ -509,7 +509,7 @@ public class UserServiceImpl  implements UserService{
 	}
 
 	private void checkLoginName(Long rootOrgId,String loginName) {
-		User old = userRepo.findByRootOrgIdAndLoginName(rootOrgId,loginName);
+		UserEntity old = userRepo.findByRootOrgIdAndLoginName(rootOrgId,loginName);
 		if(old!=null){
 			throw new RuntimeException("用户名已存在");
 		}else if("admin".equalsIgnoreCase(loginName)){
@@ -517,8 +517,8 @@ public class UserServiceImpl  implements UserService{
         }
 	}
 
-	public User update(Long id, User user) {
-		User old =  userRepo.findOne(id);
+	public UserEntity update(Long id, UserEntity user) {
+		UserEntity old =  userRepo.findOne(id);
 		if(!old.getLoginName().equals(user.getLoginName())){
 			checkLoginName(user.getRootOrgId(), user.getLoginName());
 		}
@@ -526,12 +526,12 @@ public class UserServiceImpl  implements UserService{
 		return userRepo.save(user);
 	}
 
-	public User saveMarker(Long rootOrgId, String loginName,String name) {
-		User old = userRepo.findByRootOrgIdAndLoginName(rootOrgId,loginName);
+	public UserEntity saveMarker(Long rootOrgId, String loginName,String name) {
+		UserEntity old = userRepo.findByRootOrgIdAndLoginName(rootOrgId,loginName);
 		if(old!=null){
 			return old;
 		}
-		User user = new User();
+		UserEntity user = new UserEntity();
 		user.setName(name);
 		user.setLoginName(loginName);
 		user.setEnable(true);
@@ -549,8 +549,8 @@ public class UserServiceImpl  implements UserService{
 	}
 
 	@Override
-	public User getUser(Long rootOrgId, String loginName) {
-        User user = userRepo.findByRootOrgIdAndLoginName(rootOrgId,loginName);
+	public UserEntity getUser(Long rootOrgId, String loginName) {
+        UserEntity user = userRepo.findByRootOrgIdAndLoginName(rootOrgId,loginName);
         return user;
 	}