AiJiNanProject/src/main/java/com/platform/modules/lives/LivesSyscolumn.java
小黄狗横扫士力架 adc94ba564 2023年1月17日17:12:20
2023-01-17 17:18:02 +08:00

31 lines
923 B
Java

package com.platform.modules.lives;
import com.platform.common.utils.R;
import com.platform.modules.live.service.LiveChannelService;
import org.springframework.beans.factory.annotation.Autowired;
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.RestController;
@RestController
@RequestMapping("/lives")
public class LivesSyscolumn {
@Autowired
private LiveChannelService liveChannelService;
@GetMapping("/syscolumn/{id}")
public R channels(@PathVariable("id") Long id){
Long tenantId= id;
if (tenantId==1){
return R.ok().put("list", liveChannelService.getAllList());
}else {
return R.ok().put("list",liveChannelService.getAllChannelByTenant(tenantId));
}
}
}