Compare commits
No commits in common. "520d1885f7ac6ccf73978b141c8dc601a9aaf6ce" and "8eae6e860bcf79c02b1fa447974b1b4235e0bb34" have entirely different histories.
520d1885f7
...
8eae6e860b
|
|
@ -8,7 +8,6 @@ import com.electromagnetic.industry.software.data.manage.domain.boardservice.use
|
|||
import com.electromagnetic.industry.software.data.manage.domain.boardservice.user.params.UserDeleteKeyWords;
|
||||
import com.electromagnetic.industry.software.data.manage.domain.boardservice.user.repository.UserRepository;
|
||||
import com.electromagnetic.industry.software.data.manage.domain.boardservice.user.service.UserService;
|
||||
import electromagnetic.data.framework.share.constants.UserConstants;
|
||||
import electromagnetic.data.framework.share.exception.LoggerConstant;
|
||||
import electromagnetic.data.framework.share.util.SignUtils;
|
||||
import org.slf4j.Logger;
|
||||
|
|
@ -113,11 +112,6 @@ public class UserServiceImpl implements UserService {
|
|||
*/
|
||||
@Override
|
||||
public Boolean deleteUser(UserDeleteKeyWords userDeleteKeyWords) {
|
||||
|
||||
String workNumber = userRepository.getSingleUser(userDeleteKeyWords.getUserId()).getWorkNumber();
|
||||
if (UserConstants.ADMIN_WORK_NUMBER.equals(workNumber)) {
|
||||
throw new RuntimeException("管理员用户无法删除");
|
||||
}
|
||||
return userRepository.deleteUser(userDeleteKeyWords)>0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -28,9 +28,4 @@ public class UserConstants {
|
|||
public static final String LOGIN_USER_NAME = "userName";
|
||||
public static final String LOGIN_WORK_NUMBER = "workNumber";
|
||||
public static final String LOGIN_USER_ID = "userId";
|
||||
|
||||
/**
|
||||
* 管理员账号
|
||||
*/
|
||||
public static final String ADMIN_WORK_NUMBER = "100000";
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue