1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- package com.dragoninfo.dcuc.authweb.restcontroller.auth;
- import com.dragoninfo.dcuc.app.facade.IResourceFacade;
- import com.dragoninfo.dcuc.auth.auth.dto.ServiceAuthFlowDTO;
- import com.dragoninfo.dcuc.auth.auth.facade.IServiceAuthFacade;
- 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 IServiceAuthFacade serviceAuthFacade;
- @ApiOperation(value = "服务授权列表")
- @ApiImplicitParam(name = "searchDTO", value = "查询条件")
- @PostMapping(value = "search")
- public Result page(SearchDTO searchDTO){
- Page<ServiceAuthFlowDTO> serviceAuthFlowDTOS = serviceAuthFacade.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.getApplicantOrgName());
- vo.setOrderNo(item.getDesc());
- vo.setServiceCodes(item.getServiceCodes());
- vo.setApplyTime(item.getApplyTime());
- vos.add(vo);
- });
- return Result.success(serviceAuthFlowDTOS.getTotalElements(),vos);
- }
- }
|