Просмотр исходного кода

Merge branches 'develop' and 'release/v2.1.1-beta' of 192.168.0.144:dcuc-tjdsj/auth-back into develop

 Conflicts:
	pom.xml
	src/main/java/com/dragoninfo/dcuc/authweb/restcontroller/api/authservice/v1/controller/AuthServiceController.java
	src/main/resources/application-base.yml
huangzqa 4 лет назад
Родитель
Сommit
cd2a5d1f15
14 измененных файлов с 279 добавлено и 33 удалено
  1. 7 2
      pom.xml
  2. 7 6
      src/main/java/com/dragoninfo/dcuc/authweb/restcontroller/api/authservice/v1/controller/AuthServiceController.java
  3. 32 11
      src/main/java/com/dragoninfo/dcuc/authweb/restcontroller/api/authservice/v1/controller/WorkFlowApiController.java
  4. 24 0
      src/main/java/com/dragoninfo/dcuc/authweb/restcontroller/api/authservice/v1/vo/AuthFlowRepeatCheckVo.java
  5. 6 0
      src/main/java/com/dragoninfo/dcuc/authweb/restcontroller/api/authservice/v1/vo/ServiceAuthFlowAcceptVo.java
  6. 3 0
      src/main/java/com/dragoninfo/dcuc/authweb/restcontroller/api/authservice/v1/vo/ServiceAuthResultVo.java
  7. 51 0
      src/main/java/com/dragoninfo/dcuc/authweb/restcontroller/api/authservice/v2/controller/AuthServiceV2Controller.java
  8. 8 6
      src/main/java/com/dragoninfo/dcuc/authweb/restcontroller/api/authservice/v2/controller/WorkFlowApiV2Controller.java
  9. 25 0
      src/main/java/com/dragoninfo/dcuc/authweb/restcontroller/api/authservice/v2/vo/AuthResultDelVO.java
  10. 107 0
      src/main/java/com/dragoninfo/dcuc/authweb/restcontroller/api/authservice/v3/controller/WorkFlowApiV3Controller.java
  11. 3 3
      src/main/java/com/dragoninfo/dcuc/authweb/restcontroller/app/ResourceAuthController.java
  12. 3 1
      src/main/java/com/dragoninfo/dcuc/authweb/restcontroller/auth/ServiceAuthResultController.java
  13. 1 1
      src/main/java/com/dragoninfo/dcuc/authweb/restcontroller/login/DcucLoginController.java
  14. 2 3
      src/main/resources/application-base.yml

+ 7 - 2
pom.xml

@@ -5,7 +5,7 @@
     <modelVersion>4.0.0</modelVersion>
     <groupId>com.dragoninfo</groupId>
     <artifactId>dcuc-auth-back</artifactId>
-    <version>2.2.0-tjdsj-SNAPSHOT</version>
+    <version>2.1.1-tjdsj-SNAPSHOT</version>
 
     <properties>
         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
@@ -112,7 +112,7 @@
         <dependency>
             <groupId>com.dragoninfo</groupId>
             <artifactId>dcuc-auth-api</artifactId>
-            <version>2.2.0-tjdsj-SNAPSHOT</version>
+            <version>2.1.1-tjdsj-SNAPSHOT</version>
         </dependency>
         <!--redis缓存-->
         <dependency>
@@ -133,6 +133,11 @@
             <version>2.0.0-tjdsj-SNAPSHOT</version>
         </dependency>
 
+        <dependency>
+            <groupId>com.dragoninfo</groupId>
+            <artifactId>dcuc-user-api</artifactId>
+            <version>2.0.1-SNAPSHOT</version>
+        </dependency>
 
         <dependency>
             <groupId>com.dragoninfo</groupId>

+ 7 - 6
src/main/java/com/dragoninfo/dcuc/authweb/restcontroller/api/authservice/v1/controller/AuthServiceController.java

@@ -8,7 +8,8 @@ import com.dragoninfo.dcuc.app.facade.IApplyInfoFacade;
 import com.dragoninfo.dcuc.auth.auth.dto.AppDataSensitiveLevelDTO;
 import com.dragoninfo.dcuc.auth.auth.dto.ServiceAuthResultDTO;
 import com.dragoninfo.dcuc.auth.auth.facade.IBimBusinessFacade;
-import com.dragoninfo.dcuc.auth.auth.facade.IServiceAuthFacade;
+import com.dragoninfo.dcuc.auth.auth.facade.IBimBusinessFacade;
+import com.dragoninfo.dcuc.auth.auth.facade.IServiceAuthFlowFacade;
 import com.dragoninfo.dcuc.auth.auth.facade.IServiceAuthResultFacade;
 import com.dragoninfo.dcuc.auth.auth.facade.IStaffAssignAuthInfoFacade;
 import com.dragoninfo.dcuc.authweb.restcontroller.api.authservice.v1.vo.AppAuthRespVO;
@@ -51,7 +52,7 @@ import java.util.stream.Collectors;
 public class AuthServiceController {
 
     @Autowired
-    private IServiceAuthFacade serviceAuthFacade;
+    private IServiceAuthFlowFacade serviceAuthFlowFacade;
 
     @Autowired
     private IServiceAuthResultFacade serviceAuthResultFacade;
@@ -129,7 +130,7 @@ public class AuthServiceController {
         if (applyInfo == null || BooleanEnum.TRUE.value.equals(applyInfo.getApplyStatus())) {
             return ApiResult.setFailMessage("app is not enabled");
         }
-        Object o = serviceAuthFacade.serviceAuthentication(appCode);
+        Object o = serviceAuthFlowFacade.serviceAuthentication(appCode);
         return ApiResult.setSuccessResult(o);
     }
 
@@ -164,7 +165,6 @@ public class AuthServiceController {
     }
 
     @ApiOperation(value = "服务授权撤销")
-
     @ApiImplicitParams({@ApiImplicitParam(paramType = "path", name = "appCode", value = "应用编码"),
             @ApiImplicitParam(paramType = "path", name = "serviceCode", value = "服务编码")
     })
@@ -172,15 +172,16 @@ public class AuthServiceController {
     public ApiResult delService(@PathVariable String appCode, @PathVariable String serviceCode) {
         try {
             ServiceAuthResultDTO authDto = serviceAuthResultFacade.getDetailByAppAndService(appCode, serviceCode);
-            serviceAuthResultFacade.delServiceAuthResult(authDto.getId());
+            serviceAuthResultFacade.delServiceAuthResult(authDto);
             return ApiResult.setSuccess();
         } catch (Exception e) {
             e.printStackTrace();
             return ApiResult.setFailMessage("服务授权撤销失败");
         }
-
     }
 
+
+
     /**
      * 提供给服务方查询
      * @param apiSearchReq

+ 32 - 11
src/main/java/com/dragoninfo/dcuc/authweb/restcontroller/api/authservice/v1/controller/WorkFlowApiController.java

@@ -1,14 +1,10 @@
 package com.dragoninfo.dcuc.authweb.restcontroller.api.authservice.v1.controller;
 
-import cn.hutool.core.util.StrUtil;
-import com.dragoninfo.dcuc.app.entity.ApplyInfo;
-import com.dragoninfo.dcuc.app.entity.ServiceResource;
-import com.dragoninfo.dcuc.app.facade.IApplyInfoFacade;
-import com.dragoninfo.dcuc.app.facade.IServiceResourceFacade;
 import com.dragoninfo.dcuc.auth.auth.dto.ServiceAuthFlowDTO;
 import com.dragoninfo.dcuc.auth.auth.dto.WorkFlowResutlAcceptDTO;
 import com.dragoninfo.dcuc.auth.auth.enumresources.WorkFlowStatusEnum;
-import com.dragoninfo.dcuc.auth.auth.facade.IServiceAuthFacade;
+import com.dragoninfo.dcuc.auth.auth.facade.IServiceAuthFlowFacade;
+import com.dragoninfo.dcuc.authweb.restcontroller.api.authservice.v1.vo.AuthFlowRepeatCheckVo;
 import com.dragoninfo.dcuc.authweb.restcontroller.api.authservice.v1.vo.ResourceAuthInfoVo;
 import com.dragoninfo.dcuc.authweb.restcontroller.api.authservice.v1.vo.ServiceAuthFlowAcceptVo;
 import com.dragoninfo.dcuc.authweb.restcontroller.api.authservice.v1.vo.WorkFlowResutlAcceptVo;
@@ -32,6 +28,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.ResponseBody;
 
 import javax.servlet.http.HttpServletRequest;
+import java.util.List;
 
 /**
  * @author mazq
@@ -43,7 +40,7 @@ import javax.servlet.http.HttpServletRequest;
 public class WorkFlowApiController {
 
     @Autowired
-    private IServiceAuthFacade serviceAuthFacade;
+    private IServiceAuthFlowFacade serviceAuthFlowFacade;
 
     /**
      * 服务授权工作单保存
@@ -56,20 +53,44 @@ public class WorkFlowApiController {
         String idcard = request.getHeader(Constants.IDCARD);
         String tonken = request.getHeader(Constants.DCUC_USER_TOKEN);
         String user = StringUtils.isNotBlank(idcard) ? idcard : tonken;
-
         ServiceAuthFlowDTO dto = new ServiceAuthFlowDTO();
         setAppServiceInfo(dto, serviceAuthFlowVo);
         BeanUtils.copyProperties(serviceAuthFlowVo, dto, "serviceCodes", "serviceNames");
         dto.setUser(user);
-        ResponseDTO responseDTO = serviceAuthFacade.serviceAuthFlowSave(dto);
+        ResponseDTO responseDTO = serviceAuthFlowFacade.serviceAuthFlowSave(dto);
         String statusCode = responseDTO.getStatusCode();
         if (ResponseStatus.SUCCESS_CODE.equals(statusCode)) {
             return ApiResult.setSuccess();
         } else {
-            return ApiResult.setFailMessage(responseDTO.getMessage());
+            ApiResult apiResult = ApiResult.setFailMessage(responseDTO.getMessage());
+            apiResult.setResult(responseDTO.getResult());
+            return apiResult;
         }
     }
 
+    /**
+     * 服务授权申请是否存在重复申请
+     */
+    @ApiOperation(value = "服务授权申请是否存在重复申请")
+    @ApiImplicitParams({@ApiImplicitParam(name = "authFlowRepeatCheckVo", value = "服务授权重复校验Vo")})
+    @PostMapping("auth-repeat-check")
+    @ResponseBody
+    public ApiResult authFlowRepeatCheck(@RequestBody AuthFlowRepeatCheckVo authFlowRepeatCheckVo){
+        String appCode = authFlowRepeatCheckVo.getAppCode();
+        List<String> serviceCodes = authFlowRepeatCheckVo.getServiceCodes();
+        ResponseDTO responseDTO = serviceAuthFlowFacade.authFlowRepeatCheck(appCode,serviceCodes);
+        String statusCode = responseDTO.getStatusCode();
+        if (ResponseStatus.SUCCESS_CODE.equals(statusCode)) {
+            return ApiResult.setSuccess();
+        } else {
+            ApiResult apiResult = ApiResult.setFailMessage(responseDTO.getMessage());
+            apiResult.setResult(responseDTO.getResult());
+            return apiResult;
+        }
+    }
+
+
+
     /**
      * 服务授权工作单审批结果处理
      * 提供接口
@@ -86,7 +107,7 @@ public class WorkFlowApiController {
         dto.setProcessInstanceId(flowResutlVo.getProcessInstanceId());
         dto.setRemark(flowResutlVo.getDesc());
         dto.setMessageId(flowResutlVo.getMessageId());
-        serviceAuthFacade.dealAuthFlowResult(dto);
+        serviceAuthFlowFacade.dealAuthFlowResult(dto);
         return ApiResult.setSuccess();
     }
 

+ 24 - 0
src/main/java/com/dragoninfo/dcuc/authweb/restcontroller/api/authservice/v1/vo/AuthFlowRepeatCheckVo.java

@@ -0,0 +1,24 @@
+package com.dragoninfo.dcuc.authweb.restcontroller.api.authservice.v1.vo;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.List;
+
+/**
+ * @author mazq
+ * @date 2021/5/13
+ */
+@ApiModel(value = "服务授权申请重复校验参数Vo")
+@Data
+public class AuthFlowRepeatCheckVo {
+
+    @ApiModelProperty(value = "申请方编码(应用编码)")
+    private String appCode;
+
+    @ApiModelProperty(value = "访问资源编码集合(服务编码集合)")
+    private List<String> serviceCodes;
+
+
+}

+ 6 - 0
src/main/java/com/dragoninfo/dcuc/authweb/restcontroller/api/authservice/v1/vo/ServiceAuthFlowAcceptVo.java

@@ -104,4 +104,10 @@ public class ServiceAuthFlowAcceptVo {
     @NotNull
     private ResourceAuthInfoVo resourceInfo;
 
+    /**
+     * 工作单类型
+     * SERVICE_AUTH-服务授权工作单 SERVICE_CANCEL-服务权限撤销工作单
+     */
+    @ApiModelProperty(value = "工作单类型 SERVICE_AUTH-服务授权工作单 SERVICE_CANCEL-服务权限撤销工作单")
+    private String flowType;
 }

+ 3 - 0
src/main/java/com/dragoninfo/dcuc/authweb/restcontroller/api/authservice/v1/vo/ServiceAuthResultVo.java

@@ -78,4 +78,7 @@ public class ServiceAuthResultVo {
 
     @ApiModelProperty(value = "应用事权单位名称")
     private String appOrgCode;
+
+    @ApiModelProperty(value = "服务授权状态")
+    private String authStatus;
 }

+ 51 - 0
src/main/java/com/dragoninfo/dcuc/authweb/restcontroller/api/authservice/v2/controller/AuthServiceV2Controller.java

@@ -0,0 +1,51 @@
+package com.dragoninfo.dcuc.authweb.restcontroller.api.authservice.v2.controller;
+
+import com.dragoninfo.dcuc.auth.auth.dto.ServiceAuthResultDTO;
+import com.dragoninfo.dcuc.auth.auth.facade.IServiceAuthResultFacade;
+import com.dragoninfo.dcuc.authweb.restcontroller.api.authservice.v2.vo.AuthResultDelVO;
+import com.dragoninfo.dcuc.authweb.util.VersionUtils;
+import com.dragoninfo.dcuc.common.entity.ApiResult;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * @Author yica
+ * @Date 2021/2/24 19:11
+ **/
+@RestController
+@Api(tags = {"权限管理对外开放接口"})
+@RequestMapping(value = "/api/auth-service/" + VersionUtils.VERSION_UID + "/")
+public class AuthServiceV2Controller {
+
+
+    @Autowired
+    private IServiceAuthResultFacade serviceAuthResultFacade;
+
+
+    @ApiOperation(value = "服务授权撤销")
+    @ApiImplicitParams({@ApiImplicitParam(paramType = "path", name = "appCode", value = "应用编码"),
+            @ApiImplicitParam(paramType = "path", name = "serviceCode", value = "服务编码")
+    })
+    @PostMapping("service/del")
+    public ApiResult delService(@RequestBody AuthResultDelVO authResultDelVO) {
+        try {
+            ServiceAuthResultDTO authDto = serviceAuthResultFacade.
+                    getDetailByAppAndService(authResultDelVO.getAppCode(),authResultDelVO.getServiceCode());
+            authDto.setReason(authResultDelVO.getReason());
+            serviceAuthResultFacade.delServiceAuthResult(authDto);
+            return ApiResult.setSuccess();
+        } catch (Exception e) {
+            e.printStackTrace();
+            return ApiResult.setFailMessage("服务授权撤销失败");
+        }
+    }
+
+
+}

+ 8 - 6
src/main/java/com/dragoninfo/dcuc/authweb/restcontroller/api/authservice/v2/controller/WorkFlowApiV2Controller.java

@@ -3,7 +3,7 @@ package com.dragoninfo.dcuc.authweb.restcontroller.api.authservice.v2.controller
 import com.dragoninfo.dcuc.app.facade.IApplyInfoFacade;
 import com.dragoninfo.dcuc.app.facade.IServiceResourceFacade;
 import com.dragoninfo.dcuc.auth.auth.dto.ServiceAuthFlowDTO;
-import com.dragoninfo.dcuc.auth.auth.facade.IServiceAuthFacade;
+import com.dragoninfo.dcuc.auth.auth.facade.IServiceAuthFlowFacade;
 import com.dragoninfo.dcuc.authweb.restcontroller.api.authservice.v1.vo.ResourceAuthInfoVo;
 import com.dragoninfo.dcuc.authweb.restcontroller.api.authservice.v1.vo.ServiceAuthFlowAcceptVo;
 import com.dragoninfo.dcuc.common.Constants;
@@ -36,7 +36,7 @@ import javax.servlet.http.HttpServletRequest;
 public class WorkFlowApiV2Controller {
 
     @Autowired
-    private IServiceAuthFacade serviceAuthFacade;
+    private IServiceAuthFlowFacade serviceAuthFlowFacade;
 
     @Autowired
     private IApplyInfoFacade applyInfoFacade;
@@ -61,23 +61,24 @@ public class WorkFlowApiV2Controller {
         String tonken = request.getHeader(Constants.DCUC_USER_TOKEN);
         String user = StringUtils.isNotBlank(idcard) ? idcard : tonken;
         //放入流程标识码
-        if (serviceAuthFacade.checkApplicantId(serviceAuthFlowVo.getApplicantId())) {
+        if (serviceAuthFlowFacade.checkApplicantId(serviceAuthFlowVo.getApplicantId())) {
             return ApiResult.setFailMessage(String.format("申请单号 %s 不是唯一", serviceAuthFlowVo.getApplicantId()));
         }
         serviceAuthFlowVo.setProcessType(BS_TYPE);
-       // serviceAuthFlowVo.setProcessTypeName(BS_NAME);
         serviceAuthFlowVo.setBusinessCode(BS_CODE);
         ServiceAuthFlowDTO dto = new ServiceAuthFlowDTO();
         setAppServiceInfo(dto, serviceAuthFlowVo);
         dto.setProcessName(BS_NAME);
         BeanUtils.copyProperties(serviceAuthFlowVo, dto, "serviceCodes", "serviceNames");
         dto.setUser(user);
-        ResponseDTO responseDTO = serviceAuthFacade.serviceAuthFlowSave(dto);
+        ResponseDTO responseDTO = serviceAuthFlowFacade.serviceAuthFlowSave(dto);
         String statusCode = responseDTO.getStatusCode();
         if (ResponseStatus.SUCCESS_CODE.equals(statusCode)) {
             return ApiResult.setSuccess();
         } else {
-            return ApiResult.setFailMessage(responseDTO.getMessage());
+            ApiResult apiResult = ApiResult.setFailMessage(responseDTO.getMessage());
+            apiResult.setResult(responseDTO.getResult());
+            return apiResult;
         }
     }
 
@@ -92,4 +93,5 @@ public class WorkFlowApiV2Controller {
         dto.setServiceCodes(resourceInfo.getVisitResourceCode());
         dto.setServiceNames(resourceInfo.getVisitResourceName());
     }
+
 }

+ 25 - 0
src/main/java/com/dragoninfo/dcuc/authweb/restcontroller/api/authservice/v2/vo/AuthResultDelVO.java

@@ -0,0 +1,25 @@
+package com.dragoninfo.dcuc.authweb.restcontroller.api.authservice.v2.vo;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+/**
+ * @Author yica
+ * @Date 2021/5/13 10:27
+ **/
+@ApiModel(value = "资源信息")
+@Data
+public class AuthResultDelVO {
+
+    @ApiModelProperty(value = "应用code")
+    private String appCode;
+
+    @ApiModelProperty(value = "服务code")
+    private String serviceCode;
+
+    @ApiModelProperty(value = "理由")
+    private String reason;
+
+
+}

+ 107 - 0
src/main/java/com/dragoninfo/dcuc/authweb/restcontroller/api/authservice/v3/controller/WorkFlowApiV3Controller.java

@@ -0,0 +1,107 @@
+package com.dragoninfo.dcuc.authweb.restcontroller.api.authservice.v3.controller;
+
+import com.dragoninfo.dcuc.auth.auth.dto.ServiceAuthFlowDTO;
+import com.dragoninfo.dcuc.auth.auth.enumresources.WorkFlowApplyTypeEnum;
+import com.dragoninfo.dcuc.auth.auth.enumresources.WorkFlowTypeEnum;
+import com.dragoninfo.dcuc.auth.auth.facade.IServiceAuthFlowFacade;
+import com.dragoninfo.dcuc.authweb.restcontroller.api.authservice.v1.vo.ResourceAuthInfoVo;
+import com.dragoninfo.dcuc.authweb.restcontroller.api.authservice.v1.vo.ServiceAuthFlowAcceptVo;
+import com.dragoninfo.dcuc.common.Constants;
+import com.dragoninfo.dcuc.common.entity.ApiResult;
+import com.dragonsoft.duceap.base.entity.http.ResponseDTO;
+import com.dragonsoft.duceap.base.entity.http.ResponseStatus;
+import com.dragonsoft.duceap.commons.util.string.StringUtils;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.ResponseBody;
+
+import javax.servlet.http.HttpServletRequest;
+
+/**
+ * @author mazq
+ * @date 2021/2/24
+ */
+@Api(tags = {"服务授权审批工单处理接口"})
+@Controller
+@RequestMapping(value = "/api/auth-service/v3/workflow/")
+public class WorkFlowApiV3Controller {
+
+    @Autowired
+    private IServiceAuthFlowFacade serviceAuthFacade;
+
+   //流程code
+    private  final static String BS_CODE="service-auth-apply";
+    //名称(名称随便)
+    private  final static String BS_NAME="权限新增";
+    //流程业务类型
+    private  final static String BS_TYPE="auth-update";
+    //权限移除流程code
+    private  final static String BS_REMOVE_CODE="service-auth-remove";
+    //权限移除流程业务类型
+    private  final static String BS_REMOVE_TYPE="auth-update";
+    //权限移除流程业务类型
+    private  final static String BS_REMOVE_NAME="权限移除";
+
+    /**
+     * 服务授权工作单保存
+     */
+    @ApiOperation(value = "服务授权工单保存")
+    @ApiImplicitParams({@ApiImplicitParam(name = "serviceAuthFlowVo", value = "服务授权工单保存Vo")})
+    @PostMapping("service")
+    @ResponseBody
+    public ApiResult serviceAuthFlowSave(@RequestBody ServiceAuthFlowAcceptVo serviceAuthFlowVo, HttpServletRequest request) {
+        String idcard = request.getHeader(Constants.IDCARD);
+        String tonken = request.getHeader(Constants.DCUC_USER_TOKEN);
+        String user = StringUtils.isNotBlank(idcard) ? idcard : tonken;
+        if (StringUtils.isEmpty(serviceAuthFlowVo.getFlowType())){
+            return ApiResult.setFailMessage("工作单类型不能为空");
+        }
+        //放入流程标识码
+        if (serviceAuthFacade.checkApplicantId(serviceAuthFlowVo.getApplicantId())) {
+            return ApiResult.setFailMessage(String.format("申请单号 %s 不是唯一", serviceAuthFlowVo.getApplicantId()));
+        }
+        ServiceAuthFlowDTO dto = new ServiceAuthFlowDTO();
+        setAppServiceInfo(dto, serviceAuthFlowVo);
+        //销权
+//        if (WorkFlowTypeEnum.SERVICE_AUTH_CANCEL.getValue().equals(serviceAuthFlowVo.getFlowType())){
+//            dto.setProcessName(BS_REMOVE_NAME);
+//            dto.setProcessType(BS_REMOVE_TYPE);
+//            dto.setBusinessCode(BS_REMOVE_CODE);
+//        }else {
+            //授权
+            dto.setProcessName(BS_NAME);
+            dto.setProcessType(BS_TYPE);
+            dto.setBusinessCode(BS_CODE);
+//        }
+        BeanUtils.copyProperties(serviceAuthFlowVo, dto, "serviceCodes", "serviceNames");
+        dto.setUser(user);
+        ResponseDTO responseDTO = serviceAuthFacade.serviceAuthFlowSave(dto);
+        String statusCode = responseDTO.getStatusCode();
+        if (ResponseStatus.SUCCESS_CODE.equals(statusCode)) {
+            return ApiResult.setSuccess();
+        } else {
+            return ApiResult.setFailMessage(responseDTO.getMessage());
+        }
+    }
+
+
+    /**
+     * 设置申请单appCode和serviceCode信息
+     */
+    private void setAppServiceInfo(ServiceAuthFlowDTO dto, ServiceAuthFlowAcceptVo serviceAuthFlowVo) {
+        ResourceAuthInfoVo resourceInfo = serviceAuthFlowVo.getResourceInfo();
+        dto.setAppName(resourceInfo.getVisitorName());
+        dto.setAppCode(resourceInfo.getVisitorCode());
+        dto.setServiceCodes(resourceInfo.getVisitResourceCode());
+        dto.setServiceNames(resourceInfo.getVisitResourceName());
+    }
+
+}

+ 3 - 3
src/main/java/com/dragoninfo/dcuc/authweb/restcontroller/app/ResourceAuthController.java

@@ -1,7 +1,7 @@
 package com.dragoninfo.dcuc.authweb.restcontroller.app;
 
 import com.dragoninfo.dcuc.auth.auth.dto.ServiceAuthFlowDTO;
-import com.dragoninfo.dcuc.auth.auth.facade.IServiceAuthFacade;
+import com.dragoninfo.dcuc.auth.auth.facade.IServiceAuthFlowFacade;
 import com.dragoninfo.dcuc.authweb.restcontroller.app.vo.ServiceAuthFlowVo;
 import com.dragoninfo.duceap.core.response.Result;
 import com.dragonsoft.duceap.core.entity.page.PageImpl;
@@ -33,7 +33,7 @@ import java.util.List;
 public class ResourceAuthController {
 
     @Autowired
-    private IServiceAuthFacade iServiceAuthFacade;
+    private IServiceAuthFlowFacade serviceAuthFlowFacade;
 
     /**
      * 服务授权工单列表
@@ -43,7 +43,7 @@ public class ResourceAuthController {
     @ApiImplicitParam(name = "searchable", value = "查询条件")
     @PostMapping(value = "serviceAuthFlow/search", produces = MediaType.APPLICATION_JSON_VALUE)
     public Result<Page<ServiceAuthFlowVo>> serviceAuthFlowPage(Searchable searchable) {
-        Page<ServiceAuthFlowDTO> page = iServiceAuthFacade.serviceAuthFlowPage(searchable.toSearchDTO());
+        Page<ServiceAuthFlowDTO> page = serviceAuthFlowFacade.serviceAuthFlowPage(searchable.toSearchDTO());
         List<ServiceAuthFlowDTO> content = page.getContent();
         List<ServiceAuthFlowVo> vos = new ArrayList<>();
         for (ServiceAuthFlowDTO dto : content) {

+ 3 - 1
src/main/java/com/dragoninfo/dcuc/authweb/restcontroller/auth/ServiceAuthResultController.java

@@ -89,7 +89,9 @@ public class ServiceAuthResultController {
     @ApiImplicitParam(name = "searchDTO", value = "服务授权vo")
     @DeleteMapping(value = "auth/{id}")
     public Result delService(@PathVariable("id") String id) {
-        ResponseDTO responseDTO = serviceAuthResultFacade.delServiceAuthResult(id);
+        ServiceAuthResultDTO serviceAuthResultDTO=new ServiceAuthResultDTO();
+        serviceAuthResultDTO.setId(id);
+        ResponseDTO responseDTO = serviceAuthResultFacade.delServiceAuthResult(serviceAuthResultDTO);
         if (ResponseDTO.SUCCESS_CODE.equals(responseDTO.getStatusCode())) {
             return Result.success(responseDTO.getMessage());
         }

+ 1 - 1
src/main/java/com/dragoninfo/dcuc/authweb/restcontroller/login/DcucLoginController.java

@@ -55,7 +55,7 @@ public class DcucLoginController {
     }
 
     @GetMapping(value = "/info")
-    public SecurityUser info(@RequestHeader("userToken") String userToken,
+    public SecurityUser info(@RequestHeader(value = "userToken", required = false) String userToken,
                              @RequestHeader(value = "appToken", required = false) String appToken) {
         logger.info("UserToken:{},appToken:{}", userToken, appToken);
 

+ 2 - 3
src/main/resources/application-base.yml

@@ -37,11 +37,10 @@ duceap:
       host: http://10.201.3.20:8070
   security-access:
     jwt:
-      enabled: false
+      enabled: true
       user-token-header-name: userToken
   security:
-    # 注解掉不开启认证登录
-    type: dcuc
+    #    type: dcuc ## 注解掉不开启认证登录
     dcuc:
       cas-server-url-prefix: http://192.168.10.2:8877/sso
       server-name: 10.11.1.151:8000