|
@@ -41,7 +41,6 @@ public class PangolinController {
|
|
public Map<String, Object> channelList(@RequestBody JSONObject data) {
|
|
public Map<String, Object> channelList(@RequestBody JSONObject data) {
|
|
LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
|
LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
|
String userId = user.getId();
|
|
String userId = user.getId();
|
|
-// String userId = "6b4c821adc414dc8b7718ab63ccbfcaf";
|
|
|
|
String roleCode = sysRoleService.getRoleCodeByUserId(userId);
|
|
String roleCode = sysRoleService.getRoleCodeByUserId(userId);
|
|
if(null!=roleCode&&(roleCode.equals("admin"))){
|
|
if(null!=roleCode&&(roleCode.equals("admin"))){
|
|
userId = null;
|
|
userId = null;
|
|
@@ -52,8 +51,7 @@ public class PangolinController {
|
|
@PostMapping("api/app/list")
|
|
@PostMapping("api/app/list")
|
|
public Map<String, Object> appList(@RequestBody JSONObject data) {
|
|
public Map<String, Object> appList(@RequestBody JSONObject data) {
|
|
LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
|
LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
|
-// String userId = user.getId();
|
|
|
|
- String userId = "6b4c821adc414dc8b7718ab63ccbfcaf";
|
|
|
|
|
|
+ String userId = user.getId();
|
|
String roleCode = sysRoleService.getRoleCodeByUserId(userId);
|
|
String roleCode = sysRoleService.getRoleCodeByUserId(userId);
|
|
if(null!=roleCode&&(roleCode.equals("admin"))){
|
|
if(null!=roleCode&&(roleCode.equals("admin"))){
|
|
userId = null;
|
|
userId = null;
|
|
@@ -66,9 +64,8 @@ public class PangolinController {
|
|
public Map<String,Object> memberList(){
|
|
public Map<String,Object> memberList(){
|
|
Map<String, Object> resultMap = new HashMap<>();
|
|
Map<String, Object> resultMap = new HashMap<>();
|
|
try {
|
|
try {
|
|
-// LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
|
|
|
-// String userId = user.getId();
|
|
|
|
- String userId = "6b4c821adc414dc8b7718ab63ccbfcaf";
|
|
|
|
|
|
+ LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
|
|
|
+ String userId = user.getId();
|
|
String roleCode = sysRoleService.getRoleCodeByUserId(userId);
|
|
String roleCode = sysRoleService.getRoleCodeByUserId(userId);
|
|
if (null!=roleCode&&"admin".equals(roleCode)) {
|
|
if (null!=roleCode&&"admin".equals(roleCode)) {
|
|
userId = null;
|
|
userId = null;
|
|
@@ -88,8 +85,7 @@ public class PangolinController {
|
|
@PostMapping("api/realtime")
|
|
@PostMapping("api/realtime")
|
|
public Map<String, Object> realTime(@RequestBody JSONObject data) {
|
|
public Map<String, Object> realTime(@RequestBody JSONObject data) {
|
|
LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
|
LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
|
-// String userId = user.getId();
|
|
|
|
- String userId = "6b4c821adc414dc8b7718ab63ccbfcaf";
|
|
|
|
|
|
+ String userId = user.getId();
|
|
String roleCode = sysRoleService.getRoleCodeByUserId(userId);
|
|
String roleCode = sysRoleService.getRoleCodeByUserId(userId);
|
|
if(null!=roleCode&&(roleCode.equals("admin"))){
|
|
if(null!=roleCode&&(roleCode.equals("admin"))){
|
|
userId = null;
|
|
userId = null;
|
|
@@ -103,8 +99,7 @@ public class PangolinController {
|
|
@PostMapping("api/activation/list")
|
|
@PostMapping("api/activation/list")
|
|
public Map<String, Object> activationList(@RequestBody JSONObject data) {
|
|
public Map<String, Object> activationList(@RequestBody JSONObject data) {
|
|
LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
|
LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
|
-// String userId = user.getId();
|
|
|
|
- String userId = "6b4c821adc414dc8b7718ab63ccbfcaf";
|
|
|
|
|
|
+ String userId = user.getId();
|
|
String roleCode = sysRoleService.getRoleCodeByUserId(userId);
|
|
String roleCode = sysRoleService.getRoleCodeByUserId(userId);
|
|
if(null!=roleCode&&(roleCode.equals("admin"))){
|
|
if(null!=roleCode&&(roleCode.equals("admin"))){
|
|
userId = null;
|
|
userId = null;
|
|
@@ -119,8 +114,7 @@ public class PangolinController {
|
|
public Map<String,Object> checkAppList(@RequestBody JSONObject data) {
|
|
public Map<String,Object> checkAppList(@RequestBody JSONObject data) {
|
|
Map<String,Object> result = new HashMap<>();
|
|
Map<String,Object> result = new HashMap<>();
|
|
LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
|
LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
|
-// String userId = user.getId();
|
|
|
|
- String userId = "6b4c821adc414dc8b7718ab63ccbfcaf";
|
|
|
|
|
|
+ String userId = user.getId();
|
|
String roleCode = sysRoleService.getRoleCodeByUserId(userId);
|
|
String roleCode = sysRoleService.getRoleCodeByUserId(userId);
|
|
if(null!=roleCode&&(roleCode.equals("admin"))){
|
|
if(null!=roleCode&&(roleCode.equals("admin"))){
|
|
userId = null;
|
|
userId = null;
|