Просмотр исходного кода

上传图片区分成果、需求存不同文件夹

anderx лет назад: 8
Родитель
Сommit
d43163c796
1 измененных файлов с 4 добавлено и 4 удалено
  1. 4 4
      src/main/java/com/goafanti/app/controller/AppUserController.java

+ 4 - 4
src/main/java/com/goafanti/app/controller/AppUserController.java

@@ -526,11 +526,11 @@ public class AppUserController extends BaseApiController {
     public Result uploadPicture(HttpServletRequest req, String sign) {
         Result res = new Result();
         AttachmentType attachmentType = AttachmentType.getField(sign);
-        if (attachmentType == AttachmentType.ACHIEVEMENT_TECHNICAL_PICTURE
-                || attachmentType == AttachmentType.ACHIEVEMENT_MATURITY_PICTURE
-                || attachmentType == AttachmentType.ACHIEVEMENT_COVER_PICTURE) {
+        if (attachmentType == AttachmentType.ACHIEVEMENT_TECHNICAL_PICTURE) {
             res.setData(handleFiles(res, "/achievement/", false, req, sign, "achievement"));
-        } else {
+        } else if (attachmentType==AttachmentType.DEMAND_PICTURE){
+        	 res.setData(handleFiles(res, "/demand/", false, req, sign, "demand"));
+        }else {
             res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "", "附件标示"));
         }
         return res;