刘帅
2026-09-18 328ba81892349e09d21c4806298c1d7db27298e9
cloud-server-course/src/main/java/com/dsh/course/controller/CoursePackagePaymentController.java
@@ -491,12 +491,24 @@
                }
            }
            TAppUser appUser = appUserClient.queryAppUser1(re.getAppUserId());
            // 统计接口只关心订单金额;历史订单可能没有关联学员或用户,不能因此整批查询失败。
            re.setPayStudent("无");
            if (re.getStudentIds() != null && !re.getStudentIds().trim().isEmpty()) {
                try {
            String[] split = re.getStudentIds().split(",");
            Student student = studentClient.queryStudentById(Integer.valueOf(split[0]));
                    if (student != null && student.getName() != null) {
            re.setPayStudent(student.getName());
                    }
                } catch (NumberFormatException ignored) {
                    // 历史脏数据按“无学员”返回,避免影响其他有效订单。
                }
            }
            if (appUser != null) {
            re.setPayUser(appUser.getName());
            re.setPhone(appUser.getPhone());
        }
        }
        return res;
    }