package com.talentcard.server.business.portal;
|
|
import java.util.Map;
|
|
import com.talentcard.server.common.ApiResponse;
|
import com.talentcard.server.request.ServiceAppointmentSubmitRequest;
|
import com.talentcard.server.service.ServiceAppointmentApplicationService;
|
import io.swagger.v3.oas.annotations.Operation;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
import jakarta.validation.Valid;
|
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.RequestBody;
|
import org.springframework.web.bind.annotation.RequestHeader;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RestController;
|
|
@Tag(name = "小程序-预约申请", description = "小程序提交体检、医院快捷通道、酒店、配偶就业、学生托管预约申请")
|
@RestController
|
@RequestMapping("/api/app/service-appointment-applications")
|
public class ServiceAppointmentApplicationController {
|
private final ServiceAppointmentApplicationService service;
|
|
public ServiceAppointmentApplicationController(ServiceAppointmentApplicationService service) {
|
this.service = service;
|
}
|
|
@Operation(summary = "提交预约申请", description = "按预约类型保存预约信息;学生托管默认进入待审核状态,其他服务默认待处理")
|
@PostMapping
|
public ApiResponse<Map<String, Object>> submit(
|
@Valid @RequestBody ServiceAppointmentSubmitRequest request,
|
@RequestHeader(value = "X-Idempotency-Key", required = false) String idempotencyKey
|
) {
|
return ApiResponse.success(service.submit(request, idempotencyKey));
|
}
|
}
|