|
|
@@ -165,7 +165,13 @@ public class DanAssessmentController {
|
|
|
public Result<AssessmentAppointment> createAppointment(@RequestBody Map<String, Object> body) {
|
|
|
Long userId = body.get("userId") != null ? Long.valueOf(body.get("userId").toString()) : null;
|
|
|
Long childId = Long.valueOf(body.get("childId").toString());
|
|
|
- Long guideId = Long.valueOf(body.get("guideId").toString());
|
|
|
+ // 兼容前端 teacherId / guideId 字段,允许为 null(系统安排)
|
|
|
+ Long guideId = null;
|
|
|
+ if (body.get("guideId") != null) {
|
|
|
+ guideId = Long.valueOf(body.get("guideId").toString());
|
|
|
+ } else if (body.get("teacherId") != null) {
|
|
|
+ guideId = Long.valueOf(body.get("teacherId").toString());
|
|
|
+ }
|
|
|
Long packageId = body.get("packageId") != null ? Long.valueOf(body.get("packageId").toString()) : null;
|
|
|
String appointmentDate = (String) body.get("appointmentDate");
|
|
|
String appointmentTime = (String) body.get("appointmentTime");
|