|
@@ -1,6 +1,7 @@
|
|
package org.jeecg.modules.ctop.controller;
|
|
package org.jeecg.modules.ctop.controller;
|
|
|
|
|
|
import cn.com.ctop.common.module.service.ISysRoleService;
|
|
import cn.com.ctop.common.module.service.ISysRoleService;
|
|
|
|
+import cn.com.ctop.common.module.service.IUserAllocationService;
|
|
import cn.com.ctop.common.module.utils.ResultMapUtils;
|
|
import cn.com.ctop.common.module.utils.ResultMapUtils;
|
|
import cn.com.ctop.common.module.utils.StatusCode;
|
|
import cn.com.ctop.common.module.utils.StatusCode;
|
|
import cn.com.ctop.crawler.modules.pangolin.service.*;
|
|
import cn.com.ctop.crawler.modules.pangolin.service.*;
|
|
@@ -33,6 +34,32 @@ public class PangolinController {
|
|
private PangolinChannelService pangolinChannelService;
|
|
private PangolinChannelService pangolinChannelService;
|
|
@Autowired
|
|
@Autowired
|
|
private ISysRoleService sysRoleService;
|
|
private ISysRoleService sysRoleService;
|
|
|
|
+ @Autowired
|
|
|
|
+ private IUserAllocationService userAllocationService;
|
|
|
|
+ @PostMapping("api/user/list")
|
|
|
|
+ public Map<String, Object> userList(@RequestBody JSONObject data) {
|
|
|
|
+// LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
|
|
|
+// String userId = user.getId();
|
|
|
|
+ String userId = "6b4c821adc414dc8b7718ab63ccbfcaf";
|
|
|
|
+ String roleCode = sysRoleService.getRoleCodeByUserId(userId);
|
|
|
|
+ if(null!=roleCode&&(roleCode.equals("admin"))){
|
|
|
|
+ userId = null;
|
|
|
|
+ }
|
|
|
|
+ return userAllocationService.getPangolinAccountListByParams(userId,data);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @PostMapping("api/project/list")
|
|
|
|
+ public Map<String, Object> projectList(@RequestBody JSONObject data) {
|
|
|
|
+// LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
|
|
|
+// String userId = user.getId();
|
|
|
|
+ String userId = "6b4c821adc414dc8b7718ab63ccbfcaf";
|
|
|
|
+ String roleCode = sysRoleService.getRoleCodeByUserId(userId);
|
|
|
|
+ if(null!=roleCode&&(roleCode.equals("admin"))){
|
|
|
|
+ userId = null;
|
|
|
|
+ }
|
|
|
|
+ return userAllocationService.getPangolinProjectListByParams(userId);
|
|
|
|
+ }
|
|
|
|
+
|
|
@PostMapping("api/channel/list")
|
|
@PostMapping("api/channel/list")
|
|
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();
|
|
@@ -47,7 +74,7 @@ public class PangolinController {
|
|
|
|
|
|
|
|
|
|
@PostMapping("api/app/list")
|
|
@PostMapping("api/app/list")
|
|
- public Map<String, Object> appList() {
|
|
|
|
|
|
+ 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 = user.getId();
|
|
String userId = "6b4c821adc414dc8b7718ab63ccbfcaf";
|
|
String userId = "6b4c821adc414dc8b7718ab63ccbfcaf";
|
|
@@ -55,7 +82,7 @@ public class PangolinController {
|
|
if(null!=roleCode&&(roleCode.equals("admin"))){
|
|
if(null!=roleCode&&(roleCode.equals("admin"))){
|
|
userId = null;
|
|
userId = null;
|
|
}
|
|
}
|
|
- return pangolinAppService.getListByUserId(userId);
|
|
|
|
|
|
+ return pangolinAppService.getListByUserId(userId,data);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|