zhangchen пре 3 месеци
родитељ
комит
656ae3df17

+ 13 - 0
alien-entity/src/main/java/shop/alien/entity/store/vo/PerformanceListVo.java

@@ -6,6 +6,7 @@ import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 
 import java.io.Serializable;
+import java.util.List;
 
 /**
  * 演出列表VO
@@ -62,5 +63,17 @@ public class PerformanceListVo implements Serializable {
      */
     @ApiModelProperty(value = "演出类型(0-特邀演出,1-常规演出)")
     private Integer performanceType;
+
+    /**
+     * 演出风格(字典表proficient_tag的dict_id,逗号分隔)
+     */
+    @ApiModelProperty(value = "演出风格(字典表proficient_tag的dict_id,逗号分隔)")
+    private String performanceStyle;
+
+    /**
+     * 演出人员头像列表(从store_staff_config表的staff_image字段获取)
+     */
+    @ApiModelProperty(value = "演出人员头像列表(从store_staff_config表的staff_image字段获取)")
+    private List<String> staffImageList;
 }
 

+ 63 - 0
alien-store/src/main/java/shop/alien/store/service/impl/PerformanceListServiceImpl.java

@@ -190,6 +190,12 @@ public class PerformanceListServiceImpl implements PerformanceListService {
         // 设置演出时间安排
         vo.setScheduleInfo(buildScheduleInfo(performance));
 
+        // 设置演出风格(直接返回表中的值,不查询字典)
+        vo.setPerformanceStyle(performance.getPerformanceStyle());
+
+        // 设置演出人员头像列表
+        vo.setStaffImageList(queryStaffImageList(performance.getStaffConfigIds()));
+
         return vo;
     }
 
@@ -261,6 +267,63 @@ public class PerformanceListServiceImpl implements PerformanceListService {
     }
 
     /**
+     * 查询演出人员头像列表
+     * <p>
+     * 根据员工配置ID字符串(逗号分隔)查询store_staff_config表,获取所有员工的头像
+     * </p>
+     *
+     * @param staffConfigIds 员工配置ID字符串(逗号分隔)
+     * @return 员工头像URL列表
+     */
+    private List<String> queryStaffImageList(String staffConfigIds) {
+        List<String> imageList = new ArrayList<>();
+        
+        if (StringUtils.isEmpty(staffConfigIds)) {
+            return imageList;
+        }
+
+        try {
+            String[] ids = staffConfigIds.split(",");
+            List<Integer> staffIdList = new ArrayList<>();
+            
+            // 解析所有有效的员工ID
+            for (String idStr : ids) {
+                if (StringUtils.isNotEmpty(idStr.trim())) {
+                    try {
+                        Integer staffId = Integer.parseInt(idStr.trim());
+                        if (staffId > 0) {
+                            staffIdList.add(staffId);
+                        }
+                    } catch (NumberFormatException e) {
+                        log.warn("解析员工配置ID失败,无效的ID:{}", idStr);
+                    }
+                }
+            }
+
+            if (staffIdList.isEmpty()) {
+                return imageList;
+            }
+
+            // 批量查询员工信息
+            List<StoreStaffConfig> staffList = storeStaffConfigMapper.selectBatchIds(staffIdList);
+            
+            if (staffList != null && !staffList.isEmpty()) {
+                // 提取所有非空的头像URL
+                for (StoreStaffConfig staff : staffList) {
+                    if (staff != null && StringUtils.isNotEmpty(staff.getStaffImage())) {
+                        imageList.add(staff.getStaffImage());
+                    }
+                }
+            }
+        } catch (Exception e) {
+            log.error("查询演出人员头像列表异常,staffConfigIds={},异常信息:{}", 
+                    staffConfigIds, e.getMessage(), e);
+        }
+
+        return imageList;
+    }
+
+    /**
      * 构建日期范围
      *
      * @param performance 演出信息