|
2 | 2 |
|
3 | 3 | import static com.sponus.sponusbe.global.enums.ApiPath.*;
|
4 | 4 |
|
5 |
| -import java.io.IOException; |
6 |
| -import java.util.List; |
7 |
| - |
8 |
| -import org.springframework.web.bind.annotation.DeleteMapping; |
9 | 5 | import org.springframework.web.bind.annotation.GetMapping;
|
10 |
| -import org.springframework.web.bind.annotation.PatchMapping; |
11 |
| -import org.springframework.web.bind.annotation.PathVariable; |
| 6 | +import org.springframework.web.bind.annotation.ModelAttribute; |
12 | 7 | import org.springframework.web.bind.annotation.PostMapping;
|
13 | 8 | import org.springframework.web.bind.annotation.RequestBody;
|
14 | 9 | import org.springframework.web.bind.annotation.RequestMapping;
|
15 |
| -import org.springframework.web.bind.annotation.RequestParam; |
16 |
| -import org.springframework.web.bind.annotation.RequestPart; |
17 | 10 | import org.springframework.web.bind.annotation.RestController;
|
18 |
| -import org.springframework.web.multipart.MultipartFile; |
19 | 11 |
|
20 | 12 | import com.sponus.coredomain.domain.common.ApiResponse;
|
21 | 13 | import com.sponus.coredomain.domain.organization.Organization;
|
22 | 14 | import com.sponus.coreinfrasecurity.annotation.AuthOrganization;
|
| 15 | +import com.sponus.sponusbe.domain.organization.dto.request.PageCondition; |
| 16 | +import com.sponus.sponusbe.domain.organization.dto.response.PageResponse; |
23 | 17 | import com.sponus.sponusbe.domain.propose.dto.request.ProposeCreateRequest;
|
24 | 18 | import com.sponus.sponusbe.domain.propose.dto.response.ProposeCreateResponse;
|
| 19 | +import com.sponus.sponusbe.domain.propose.dto.response.ProposeGetResponse; |
25 | 20 | import com.sponus.sponusbe.domain.propose.service.ProposeQueryService;
|
26 | 21 | import com.sponus.sponusbe.domain.propose.service.ProposeService;
|
27 | 22 |
|
|
36 | 31 | public class ProposeController {
|
37 | 32 |
|
38 | 33 | private final ProposeService proposeService;
|
| 34 | + private final ProposeQueryService proposequeryService; |
39 | 35 |
|
40 | 36 | @PostMapping()
|
41 | 37 | public ApiResponse<ProposeCreateResponse> createPropose(
|
42 | 38 | @AuthOrganization Organization authOrganization,
|
43 | 39 | @RequestBody @Valid ProposeCreateRequest request
|
44 |
| - ){ |
| 40 | + ) { |
45 | 41 | return ApiResponse.onSuccess(proposeService.createPropose(authOrganization, request));
|
46 | 42 | }
|
| 43 | + |
| 44 | + @GetMapping("/send") |
| 45 | + public ApiResponse<PageResponse<ProposeGetResponse>> getSendPropose( |
| 46 | + @AuthOrganization Organization authOrganization, |
| 47 | + @ModelAttribute @Valid PageCondition pageCondition |
| 48 | + ) { |
| 49 | + return ApiResponse.onSuccess(proposequeryService.getSendPropose(authOrganization, pageCondition)); |
| 50 | + } |
47 | 51 | }
|
0 commit comments