From 179c4d64313c9b7572778da4aaaf6c6584fe457d Mon Sep 17 00:00:00 2001 From: mitao <2763622819@qq.com> Date: 星期二, 20 五月 2025 23:48:08 +0800 Subject: [PATCH] 修改文件上传类型限制 --- springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/warehouse/ExportDonatesVO.java | 11 +++++++++-- 1 files changed, 9 insertions(+), 2 deletions(-) diff --git a/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/warehouse/ExportDonatesVO.java b/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/warehouse/ExportDonatesVO.java index efbb558..ee6ee4a 100644 --- a/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/warehouse/ExportDonatesVO.java +++ b/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/warehouse/ExportDonatesVO.java @@ -5,6 +5,7 @@ import java.util.Date; import com.alibaba.excel.annotation.ExcelProperty; +import com.panzhihua.common.utlis.StringUtils; import lombok.Data; @@ -51,11 +52,15 @@ private String status; public void setIsAnonymous(String isAnonymous) { - this.isAnonymous = nonNull(isAnonymous) && isAnonymous.equals("1") ? "是" : "否"; + if (StringUtils.isNumber(isAnonymous)) { + this.isAnonymous = nonNull(isAnonymous) && isAnonymous.equals("1") ? "是" : "否"; + } else { + this.isAnonymous = isAnonymous; + } } public void setStatus(String status) { - if (nonNull(status)) { + if (StringUtils.isNumber(status)) { switch (status) { case "1": this.status = "待签收"; @@ -67,6 +72,8 @@ this.status = "已取消"; break; } + } else { + this.status = status; } } } -- Gitblit v1.7.1