Przeglądaj źródła

feat:文件上传修改

fangxinjian 3 lat temu
rodzic
commit
c479f5649c

+ 2 - 5
abi-cloud-qr-platform-server/src/main/java/com/abi/qms/platform/service/impl/QrBoxMappingServiceImpl.java

@@ -34,7 +34,6 @@ import com.abi.qms.platform.infrastructure.util.PageUtil;
 import com.abi.qms.platform.infrastructure.util.UserUtil;
 import com.abi.qms.platform.service.QrBoxMappingService;
 import com.abi.task.common.api.exception.BusinessException;
-import com.abi.task.common.api.exception.ErrorCodeEnum;
 import com.abi.task.common.tablestore.TableStorePlusUtils;
 import com.abi.task.common.utils.PojoConverterUtils;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
@@ -147,12 +146,10 @@ public class QrBoxMappingServiceImpl implements QrBoxMappingService {
                 resultMap.put(o.getKey(), new UploadFileRes(SUCCESS, "上传箱码合一文件成功!"));
             } catch (BusinessException e) {
                 log.info("文件上传失败");
-                throw new BusinessException(ErrorCodeEnum.FAIL.getCode(),"文件上传失败");
-//                resultMap.put(o.getKey(), new UploadFileRes(FAIL, e.getMessage()));
+                resultMap.put(o.getKey(), new UploadFileRes(FAIL, e.getMessage()));
             } catch (Exception e) {
                 log.info("文件上传异常", e);
-                throw new BusinessException(ErrorCodeEnum.SERVICE_EXCEPTION.getCode(),"文件上传异常");
-//                resultMap.put(o.getKey(), new UploadFileRes(FAIL, e.getMessage()));
+                resultMap.put(o.getKey(), new UploadFileRes(FAIL, e.getMessage()));
             }
         });