hejianhao
2026-08-19 6e873c1820bf2a0560d09ea6f96ddf963d71024f
tcm-training-admin-backend/src/main/java/com/tcm/training/admin/app/home/controller/AppLiveRoomSettingController.java
@@ -1,9 +1,12 @@
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;
@@ -11,13 +14,21 @@
@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());
    }
}