shinnosuke
2026-09-11 b36f4c2800e88f8c5060ae926d3eb25d4bcb69c0
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
36
37
38
39
40
41
42
43
44
package com.talentcard.server.business.portal;
 
import java.util.List;
import java.util.Map;
 
import com.talentcard.server.common.ApiResponse;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
 
@RestController
@RequestMapping("/api/app/children-entrustment-benefits")
public class ChildrenEntrustmentPortalController {
 
    private final ChildrenEntrustmentPortalService service;
 
    public ChildrenEntrustmentPortalController(ChildrenEntrustmentPortalService service) {
        this.service = service;
    }
 
    @GetMapping("/{serviceId}")
    public ApiResponse<Map<String, Object>> detail(@PathVariable Long serviceId,
                                                   @RequestParam(required = false) Long talentId) {
        return ApiResponse.success(service.detail(serviceId, talentId));
    }
 
    @GetMapping("/{serviceId}/schools")
    public ApiResponse<List<Map<String, Object>>> schools(@PathVariable Long serviceId) {
        return ApiResponse.success(service.schools(serviceId));
    }
 
    @GetMapping("/{serviceId}/school-detail")
    public ApiResponse<Map<String, Object>> configuredSchool(@PathVariable Long serviceId,
                                                              @RequestParam String schoolId) {
        return ApiResponse.success(service.school(serviceId, schoolId));
    }
 
    @GetMapping("/schools/{schoolId}")
    public ApiResponse<Map<String, Object>> school(@PathVariable Long schoolId) {
        return ApiResponse.success(service.school(schoolId));
    }
}