Prechádzať zdrojové kódy

Merge branch 'mazq-0316-zongxianpeizhixiugai' into 'develop'

feature(配置修改): 配置修改

See merge request dcuc/auth-back!79
黄资权 4 rokov pred
rodič
commit
7c384d9297

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

@@ -12,9 +12,11 @@ import com.dragoninfo.dcuc.auth.auth.facade.IServiceAuthFacade;
 import com.dragoninfo.dcuc.authweb.restcontroller.api.authservice.v1.vo.ResourceAuthInfoVo;
 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.ServiceAuthFlowAcceptVo;
 import com.dragoninfo.dcuc.authweb.restcontroller.api.authservice.v1.vo.WorkFlowResutlAcceptVo;
 import com.dragoninfo.dcuc.authweb.restcontroller.api.authservice.v1.vo.WorkFlowResutlAcceptVo;
+import com.dragoninfo.dcuc.common.Constants;
 import com.dragoninfo.dcuc.common.entity.ApiResult;
 import com.dragoninfo.dcuc.common.entity.ApiResult;
 import com.dragonsoft.duceap.base.entity.http.ResponseDTO;
 import com.dragonsoft.duceap.base.entity.http.ResponseDTO;
 import com.dragonsoft.duceap.base.entity.http.ResponseStatus;
 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.Api;
 import io.swagger.annotations.ApiImplicitParam;
 import io.swagger.annotations.ApiImplicitParam;
 import io.swagger.annotations.ApiImplicitParams;
 import io.swagger.annotations.ApiImplicitParams;
@@ -29,6 +31,8 @@ import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.ResponseBody;
 import org.springframework.web.bind.annotation.ResponseBody;
 
 
+import javax.servlet.http.HttpServletRequest;
+
 /**
 /**
  * @author mazq
  * @author mazq
  * @date 2021/2/24
  * @date 2021/2/24
@@ -54,8 +58,10 @@ public class WorkFlowApiController {
     @ApiImplicitParams({@ApiImplicitParam(name = "serviceAuthFlowVo", value = "服务授权工单保存Vo")})
     @ApiImplicitParams({@ApiImplicitParam(name = "serviceAuthFlowVo", value = "服务授权工单保存Vo")})
     @PostMapping("service")
     @PostMapping("service")
     @ResponseBody
     @ResponseBody
-    public ApiResult serviceAuthFlowSave(@RequestBody @Validated ServiceAuthFlowAcceptVo serviceAuthFlowVo) {
-
+    public ApiResult serviceAuthFlowSave(@RequestBody @Validated 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;
         ResourceAuthInfoVo resourceInfo = serviceAuthFlowVo.getResourceInfo();
         ResourceAuthInfoVo resourceInfo = serviceAuthFlowVo.getResourceInfo();
         String visitorCode = resourceInfo.getVisitorCode();
         String visitorCode = resourceInfo.getVisitorCode();
         ApplyInfo applyInfo = applyInfoFacade.getAppByCode(visitorCode);
         ApplyInfo applyInfo = applyInfoFacade.getAppByCode(visitorCode);
@@ -75,6 +81,7 @@ public class WorkFlowApiController {
         ServiceAuthFlowDTO dto = new ServiceAuthFlowDTO();
         ServiceAuthFlowDTO dto = new ServiceAuthFlowDTO();
         setAppServiceInfo(dto, serviceAuthFlowVo);
         setAppServiceInfo(dto, serviceAuthFlowVo);
         BeanUtils.copyProperties(serviceAuthFlowVo, dto, "serviceCodes", "serviceNames");
         BeanUtils.copyProperties(serviceAuthFlowVo, dto, "serviceCodes", "serviceNames");
+        dto.setUser(user);
         ResponseDTO responseDTO = serviceAuthFacade.serviceAuthFlowSave(dto);
         ResponseDTO responseDTO = serviceAuthFacade.serviceAuthFlowSave(dto);
         String statusCode = responseDTO.getStatusCode();
         String statusCode = responseDTO.getStatusCode();
         if (ResponseStatus.SUCCESS_CODE.equals(statusCode)) {
         if (ResponseStatus.SUCCESS_CODE.equals(statusCode)) {