Procházet zdrojové kódy

fix(用户中心机构删除问题修改): 用户中心机构删除问题修改

1、用户中心机构删除问题修改
2、权限中心多余接口删除
3、app所属机构id问题排查
mazq před 3 roky
rodič
revize
d2ccca0298

+ 0 - 74
src/main/java/com/dragoninfo/dcuc/authweb/restcontroller/app/AppController.java

@@ -51,8 +51,6 @@ public class AppController {
     @Autowired
     private IDuceapUploadFacade uploadFacade;
 
-    @Autowired
-    private IApplicationInfoFacade applicationInfoFacade;
 
     @ApiOperation(value = "查询所有应用列表")
     @ApiImplicitParam(name = "applyStatus", value = "applyStatus:应用在用标识(0:启用 1:禁用)")
@@ -62,14 +60,6 @@ public class AppController {
         return Result.success(applyList);
     }
 
-    @ApiOperation(value = "查询应用列表")
-    @ApiImplicitParam(name = "searchable", value = "查询条件(applyName:应用名称,like;managerOrgCode:应用系统事权单位代码,like;applyStatus:应用在用标识(0:启用 1:禁用);=;)")
-    @PostMapping(value = "apps")
-    public Result<List<ApplyInfo>> applyPage(Searchable searchable) {
-        SearchDTO searchDTO = searchable.toSearchDTO();
-        Page<ApplyInfo> page = applyInfoFacade.applyInfoPage(searchDTO);
-        return Result.success(page.getTotalElements(), page.getContent());
-    }
 
     @ApiOperation(value = "修改应用")
     @PutMapping(value = "/app/{id}")
@@ -160,68 +150,4 @@ public class AppController {
         return Result.success(message);
     }
 
-
-    @ApiOperation(value = "根据厂商ID,获取厂商所有的应用")
-    @ApiImplicitParams({@ApiImplicitParam(paramType = "path", name = "id", value = "厂商ID", required = true
-            , example = "40288a8b699fc2500169a33b20540000")})
-    @GetMapping(value = "app/manufacturer/{mfrId}")
-    public Result<List<Map<String, String>>> getAppByMfr(@PathVariable String mfrId) {
-        if (StrUtil.isBlank(mfrId)) {
-            return Result.success(Collections.emptyList());
-        }
-
-        List<ApplyInfo> appList = applyInfoFacade.getAppListByManufacturerId(mfrId);
-        List<Map<String, String>> list = new ArrayList<>(appList.size());
-        for (ApplyInfo app : appList) {
-            Map<String, String> appmap = new HashMap<>();
-            appmap.put("code", app.getId());
-            appmap.put("value", app.getApplyName());
-            appmap.put("managerName", app.getManagerName());
-            appmap.put("managerPhone", app.getManagerPhone());
-            list.add(appmap);
-        }
-        return Result.success(list);
-    }
-
-
-    /**
-     * 根据机构Id获取应用信息列表
-     **/
-    @ApiOperation(value = "查询应用列表")
-    @ApiImplicitParam(name = "searchable", value = "查询条件")
-    @PostMapping(value = "apps/role/_serach")
-    public Result getAppList(Searchable searchable) {
-//        AuthUserDTO userInfo = authUserInfoFacade.get(ContextUtils.getUserInfo().getId());
-        //TODO
-        //权限中心同步的应用厂商非必填
-        //外部人员只能配置自己所属厂商下的应用
-//        if (UserTypeEnum.EXTERNAL.getValue().equals(userInfo.getUserType())) {
-//            searchable.addSearchParam("manufacturerId", userInfo.getCompany());
-//        }
-        SearchDTO searchDTO = searchable.toSearchDTO();
-        Page<ApplyInfo> applyInfos = applyInfoFacade.applyInfoPage(searchDTO);
-        if (CollectionUtils.isEmpty(applyInfos.getContent())) {
-            return Result.success(0L, "");
-        }
-        //填充统计数据
-        List<ApplicationInfoVO> apps = applicationInfoFacade.addCountInfo(objectConvert(applyInfos));
-        return Result.success(applyInfos.getTotalElements(), apps);
-    }
-
-    private List<ApplicationInfoVO> objectConvert(Page<ApplyInfo> applyInfos) {
-        List<ApplicationInfoVO> apps = new ArrayList<>();
-        for (ApplyInfo applyInfo : applyInfos) {
-            ApplicationInfoVO applicationInfoVO = new ApplicationInfoVO();
-            applicationInfoVO.setId(applyInfo.getId());
-            applicationInfoVO.setCode(applyInfo.getApplyCode());
-            applicationInfoVO.setName(applyInfo.getApplyName());
-            applicationInfoVO.setMenus(0L);
-            applicationInfoVO.setRoles(0L);
-            applicationInfoVO.setInitquotas(0L);
-            applicationInfoVO.setQuotaed(0L);
-            applicationInfoVO.setLeavequotas(0L);
-            apps.add(applicationInfoVO);
-        }
-        return apps;
-    }
 }

+ 3 - 11
src/main/java/com/dragoninfo/dcuc/authweb/restcontroller/auth/ApplicationController.java

@@ -52,8 +52,8 @@ public class ApplicationController {
      * @return
      */
     @ApiOperation(value = "根据机构code获取应用信息列表")
-    @ApiImplicitParam(name = "searchable", value = "查询条件,orgCode不能为空")
-    @PostMapping(value = "/appList/_search", produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
+    @ApiImplicitParam(name = "searchable", value = "查询条件,orgCode")
+    @PostMapping(value = "/appList/_search")
     public Result<List<ApplicationInfoVo>> getAppList(SearchDTO searchDTO) {
         List<ApplicationInfoVo> resultList = new ArrayList<>();
         Searchable searchable = Searchable.toSearchable(searchDTO);
@@ -98,7 +98,7 @@ public class ApplicationController {
      * @return
      */
     @ApiOperation(value = "根据机构Id获取应用信息列表")
-    @ApiImplicitParam(name = "searchable", value = "查询条件,orgId机构id不能为空")
+    @ApiImplicitParam(name = "searchable", value = "查询条件,orgCode机构")
     @PostMapping(value = "/appQutoList/_search")
     public Result<List<ApplicationInfoVo>> getAppQutoList(SearchDTO searchDTO) {
         List<ApplicationInfoVo> resultList = new ArrayList<>();
@@ -162,14 +162,6 @@ public class ApplicationController {
      * @return
      */
     private Page<ApplyInfo> getApplyInfos(Searchable searchable) {
-        String userId = ContextUtils.getUserInfo().getId();
-        AuthUserDTO userInfo = authUserInfoFacade.get(userId);
-        String userBusiness = userInfo.getPoliceBusiness();             //获取当前用户业务域
-        if (userBusiness == null) {
-            userBusiness = "";
-        }
-        searchable.addSearchFilter("userBusiness", SearchOperator.eq, userBusiness);
-       // searchable.addSearchFilter("zaPolicectegory", SearchOperator.eq, dcucWebConfig.getZaPolicectegory());
         Page<ApplyInfo> retainList = applyInfoFacade.findApplyList(searchable.toSearchDTO());
         return retainList;
     }