|
@@ -0,0 +1,62 @@
|
|
|
+package com.dragoninfo.dcuc.authweb.restcontroller.auth;
|
|
|
+
|
|
|
+import com.dragoninfo.dcuc.app.dto.ServiceAuthFlowDTO;
|
|
|
+import com.dragoninfo.dcuc.app.facade.IResourceFacade;
|
|
|
+import com.dragoninfo.dcuc.auth.power.facade.IAppFunInfoFacade;
|
|
|
+import com.dragoninfo.dcuc.authweb.restcontroller.auth.vo.ServiceAuthVo;
|
|
|
+import com.dragoninfo.duceap.core.response.Result;
|
|
|
+import com.dragonsoft.duceap.base.entity.search.SearchDTO;
|
|
|
+import com.dragonsoft.duceap.commons.util.string.StringUtils;
|
|
|
+import io.swagger.annotations.Api;
|
|
|
+import io.swagger.annotations.ApiImplicitParam;
|
|
|
+import io.swagger.annotations.ApiOperation;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.data.domain.Page;
|
|
|
+import org.springframework.web.bind.annotation.PostMapping;
|
|
|
+import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
+import org.springframework.web.bind.annotation.RestController;
|
|
|
+
|
|
|
+import java.util.ArrayList;
|
|
|
+import java.util.List;
|
|
|
+
|
|
|
+/**
|
|
|
+ * @Author yica
|
|
|
+ * @Date 2021/2/20 17:17
|
|
|
+ **/
|
|
|
+@Api(tags = {"服务授权管理接口"})
|
|
|
+@RestController
|
|
|
+@RequestMapping(value = "/authsvr/v2/service/")
|
|
|
+public class ServiceAuthController {
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private IResourceFacade resourceFacade;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private IAppFunInfoFacade appFunFacade;
|
|
|
+
|
|
|
+ @ApiOperation(value = "服务授权列表")
|
|
|
+ @ApiImplicitParam(name = "searchDTO", value = "查询条件")
|
|
|
+ @PostMapping(value = "search")
|
|
|
+ public Result page(SearchDTO searchDTO){
|
|
|
+ Page<ServiceAuthFlowDTO> serviceAuthFlowDTOS = resourceFacade.serviceAuthFlowPage(searchDTO);
|
|
|
+ List<ServiceAuthVo> vos=new ArrayList<>();
|
|
|
+ serviceAuthFlowDTOS.getContent().forEach(item->{
|
|
|
+ ServiceAuthVo vo=new ServiceAuthVo();
|
|
|
+ vo.setApplicantName(item.getApplicantName());
|
|
|
+ vo.setAppName(item.getAppName());
|
|
|
+ vo.setApprovalOrgName(item.getApprovalOrgName());
|
|
|
+ vo.setOrderNo(item.getOrderNo());
|
|
|
+ if (StringUtils.isNotEmpty(item.getServiceCodes())){
|
|
|
+ String[] serviceCodes = item.getServiceCodes().split(",");
|
|
|
+ for (String serviceCode : serviceCodes) {
|
|
|
+
|
|
|
+ }
|
|
|
+ // appFunFacade.getByAppAndFuncCode()
|
|
|
+ }
|
|
|
+ vo.setServiceCodes(item.getServiceCodes());
|
|
|
+ vo.setApplyTime(item.getApplyTime());
|
|
|
+ vos.add(vo);
|
|
|
+ });
|
|
|
+ return Result.success(serviceAuthFlowDTOS.getTotalElements(),vos);
|
|
|
+ }
|
|
|
+}
|