Antiloveg 8 years ago
parent
commit
13f0ea4fc4

+ 8 - 13
src/main/java/com/goafanti/achievement/controller/AchievementApiController.java

@@ -229,20 +229,15 @@ public class AchievementApiController extends CertifyApiController {
 			return res;
 		}
 
-		if (TokenManager.getUserId().equals(a.getOwnerId())) {
-			AttachmentType attachmentType = AttachmentType.getField(sign);
-			if (attachmentType == AttachmentType.ACHIEVEMENT_MATURITY_TEXT_FILE) {
-				downloadUnPrivateFile(response, a.getMaturityTextFileDownloadFileName(), a.getMaturityTextFileUrl());
-			} else if (attachmentType == AttachmentType.ACHIEVEMENT_TECH_PLAN) {
-				downloadUnPrivateFile(response, a.getTechPlanDownloadFileName(), a.getTechPlanUrl());
-			} else if (attachmentType == AttachmentType.ACHIEVEMENT_BUSINESS_PLAN) {
-				downloadUnPrivateFile(response, a.getBusinessPlanDownloadFileName(), a.getBusinessPlanUrl());
-			} else {
-				res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "", "附件标示"));
-			}
+		AttachmentType attachmentType = AttachmentType.getField(sign);
+		if (attachmentType == AttachmentType.ACHIEVEMENT_MATURITY_TEXT_FILE) {
+			downloadUnPrivateFile(response, a.getMaturityTextFileDownloadFileName(), a.getMaturityTextFileUrl());
+		} else if (attachmentType == AttachmentType.ACHIEVEMENT_TECH_PLAN) {
+			downloadUnPrivateFile(response, a.getTechPlanDownloadFileName(), a.getTechPlanUrl());
+		} else if (attachmentType == AttachmentType.ACHIEVEMENT_BUSINESS_PLAN) {
+			downloadUnPrivateFile(response, a.getBusinessPlanDownloadFileName(), a.getBusinessPlanUrl());
 		} else {
-			res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "", "科技成果ID"));
-			return res;
+			res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "", "附件标示"));
 		}
 
 		return res;