| | |
| | | package com.tcm.training.admin.app.home.controller; |
| | | |
| | | import com.tcm.training.admin.app.home.service.AppVzanLiveEntryService; |
| | | import com.tcm.training.admin.app.home.vo.AppVzanLiveEntryVO; |
| | | import com.tcm.training.admin.common.ApiResponse; |
| | | import com.tcm.training.admin.live.service.LiveRoomSettingService; |
| | | import com.tcm.training.admin.live.vo.LiveRoomSettingVO; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | |
| | | @RequestMapping({"/api/app/home", "/api/v1/app/home"}) |
| | | public class AppLiveRoomSettingController { |
| | | private final LiveRoomSettingService service; |
| | | private final AppVzanLiveEntryService vzanLiveEntryService; |
| | | |
| | | public AppLiveRoomSettingController(LiveRoomSettingService service) { |
| | | public AppLiveRoomSettingController(LiveRoomSettingService service, |
| | | AppVzanLiveEntryService vzanLiveEntryService) { |
| | | this.service = service; |
| | | this.vzanLiveEntryService = vzanLiveEntryService; |
| | | } |
| | | |
| | | @GetMapping("/live-room-setting") |
| | | public ApiResponse<LiveRoomSettingVO> current() { |
| | | return ApiResponse.ok(service.current()); |
| | | } |
| | | } |
| | | |
| | | @PostMapping("/live-room-entry") |
| | | public ApiResponse<AppVzanLiveEntryVO> createEntry() { |
| | | return ApiResponse.ok(vzanLiveEntryService.createEntry()); |
| | | } |
| | | } |