31 lines
923 B
Java
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));
|
|
}
|
|
|
|
}
|
|
|
|
|
|
}
|