|
|
@@ -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 演出信息
|