|
|
@@ -108,7 +108,12 @@ public class ChannelController {
|
|
|
@GetMapping("/list")
|
|
|
@ApiOperation(value = "查询全部")
|
|
|
public R<List<Channel>> listByUserId() {
|
|
|
- Long userId = SecurityUtils.getSysUser().getUserId();
|
|
|
+ Long userId = null;
|
|
|
+ try {
|
|
|
+ userId = SecurityUtils.getSysUser().getUserId();
|
|
|
+ } catch (Exception e) {
|
|
|
+ throw new GlobalException("获取当前登录用户失败");
|
|
|
+ }
|
|
|
List<Channel> channels = null;
|
|
|
if(userId == Constant.SUPER_ADMIN_ID){
|
|
|
channels = channelService.list();
|