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

修复企微计划导出 Excel 类型列文本错误:convertQwPlanTypeText 改用 QwPlanTypeEnum.getDescription(),表头同步为「类型(0-社群 1-自动回复)」。

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
刘立冬 18 часов назад
Родитель
Сommit
7c483eb31a

+ 1 - 1
api-module/src/main/java/com/tzld/piaoquan/api/model/vo/contentplatform/QwPlanItemExportVO.java

@@ -16,7 +16,7 @@ import lombok.NoArgsConstructor;
 @ContentRowHeight(25)
 public class QwPlanItemExportVO {
 
-    @ExcelProperty("类型(0-自动回复 1-每日推送)")
+    @ExcelProperty("类型(0-社群 1-自动回复)")
     private String type;
 
     @ExcelProperty("场景(0-群发 1-单发)")

+ 1 - 7
api-module/src/main/java/com/tzld/piaoquan/api/service/contentplatform/impl/ContentPlatformPlanServiceImpl.java

@@ -1512,13 +1512,7 @@ public class ContentPlatformPlanServiceImpl implements ContentPlatformPlanServic
         if (Objects.isNull(type)) {
             return "";
         }
-        if (type == 0) {
-            return "自动回复";
-        }
-        if (type == 1) {
-            return "每日推送";
-        }
-        return String.valueOf(type);
+        return QwPlanTypeEnum.from(type).getDescription();
     }
 
     private String convertQwPlanSceneText(Integer scene) {