shinnosuke
4 天以前 38e39c50dcca12534c4efe2b49355a97c396b507
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
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));
    }
}