| | |
| | | if(file == null || file.isEmpty() || !ValidateUtil.validateString(id)) |
| | | ExceptionCast.cast(CommonCode.INVALID_PARAM); |
| | | LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal(); |
| | | String userId = user.getId(); |
| | | if(!ValidateUtil.validateString(userId)) |
| | | if(!ValidateUtil.validateString(user.getUsername())) |
| | | ExceptionCast.cast(UcenterCode.UCENTER_ACCOUNT_NOT_EXIST); |
| | | FileOperate operate = fileOperateService.getByDocId(id); |
| | | if(operate == null || !userId.equals(operate.getCreateUser())) |
| | | if(operate == null || !user.getUsername().equals(operate.getCreateBy())) |
| | | ExceptionCast.cast(DocumentCode.DOC_OPERATE_PUSH_FAIL); |
| | | DocInfo en = super.getById(id); |
| | | if(en == null) |
| | |
| | | if(!ValidateUtil.validateString(id)) |
| | | ExceptionCast.cast(CommonCode.INVALID_PARAM); |
| | | LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal(); |
| | | String userId = user.getId(); |
| | | if(!ValidateUtil.validateString(userId)) |
| | | if(!ValidateUtil.validateString(user.getUsername())) |
| | | ExceptionCast.cast(UcenterCode.UCENTER_ACCOUNT_NOT_EXIST); |
| | | FileOperate operate = fileOperateService.getByDocId(id); |
| | | if(operate == null || !userId.equals(operate.getCreateUser())) |
| | | if(operate == null || !user.getUsername().equals(operate.getCreateBy())) |
| | | ExceptionCast.cast(DocumentCode.DOC_CANCEL_PULL_ERROR); |
| | | DocInfo en = super.getById(id); |
| | | if(en == null) |