| 
					
				 | 
			
			
				@@ -2,16 +2,15 @@ package cn.iocoder.yudao.module.system.controller.admin.oauth2; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import cn.iocoder.yudao.framework.common.pojo.CommonResult; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import cn.iocoder.yudao.framework.common.pojo.PageResult; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-import cn.iocoder.yudao.module.system.controller.admin.oauth2.vo.client.OAuth2ClientCreateReqVO; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import cn.iocoder.yudao.framework.common.util.object.BeanUtils; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import cn.iocoder.yudao.module.system.controller.admin.oauth2.vo.client.OAuth2ClientPageReqVO; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import cn.iocoder.yudao.module.system.controller.admin.oauth2.vo.client.OAuth2ClientRespVO; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-import cn.iocoder.yudao.module.system.controller.admin.oauth2.vo.client.OAuth2ClientUpdateReqVO; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-import cn.iocoder.yudao.module.system.convert.auth.OAuth2ClientConvert; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import cn.iocoder.yudao.module.system.controller.admin.oauth2.vo.client.OAuth2ClientSaveReqVO; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import cn.iocoder.yudao.module.system.dal.dataobject.oauth2.OAuth2ClientDO; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import cn.iocoder.yudao.module.system.service.oauth2.OAuth2ClientService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-import io.swagger.v3.oas.annotations.tags.Tag; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import io.swagger.v3.oas.annotations.Operation; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import io.swagger.v3.oas.annotations.Parameter; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import io.swagger.v3.oas.annotations.tags.Tag; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import org.springframework.security.access.prepost.PreAuthorize; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import org.springframework.validation.annotation.Validated; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import org.springframework.web.bind.annotation.*; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -33,14 +32,14 @@ public class OAuth2ClientController { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @PostMapping("/create") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @Operation(summary = "创建 OAuth2 客户端") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @PreAuthorize("@ss.hasPermission('system:oauth2-client:create')") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    public CommonResult<Long> createOAuth2Client(@Valid @RequestBody OAuth2ClientCreateReqVO createReqVO) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    public CommonResult<Long> createOAuth2Client(@Valid @RequestBody OAuth2ClientSaveReqVO createReqVO) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         return success(oAuth2ClientService.createOAuth2Client(createReqVO)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @PutMapping("/update") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @Operation(summary = "更新 OAuth2 客户端") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @PreAuthorize("@ss.hasPermission('system:oauth2-client:update')") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    public CommonResult<Boolean> updateOAuth2Client(@Valid @RequestBody OAuth2ClientUpdateReqVO updateReqVO) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    public CommonResult<Boolean> updateOAuth2Client(@Valid @RequestBody OAuth2ClientSaveReqVO updateReqVO) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         oAuth2ClientService.updateOAuth2Client(updateReqVO); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         return success(true); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -59,16 +58,16 @@ public class OAuth2ClientController { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @Parameter(name = "id", description = "编号", required = true, example = "1024") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @PreAuthorize("@ss.hasPermission('system:oauth2-client:query')") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     public CommonResult<OAuth2ClientRespVO> getOAuth2Client(@RequestParam("id") Long id) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        OAuth2ClientDO oAuth2Client = oAuth2ClientService.getOAuth2Client(id); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        return success(OAuth2ClientConvert.INSTANCE.convert(oAuth2Client)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        OAuth2ClientDO client = oAuth2ClientService.getOAuth2Client(id); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        return success(BeanUtils.toBean(client, OAuth2ClientRespVO.class)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @GetMapping("/page") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    @Operation(summary = "获得OAuth2 客户端分页") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    @Operation(summary = "获得 OAuth2 客户端分页") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @PreAuthorize("@ss.hasPermission('system:oauth2-client:query')") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     public CommonResult<PageResult<OAuth2ClientRespVO>> getOAuth2ClientPage(@Valid OAuth2ClientPageReqVO pageVO) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         PageResult<OAuth2ClientDO> pageResult = oAuth2ClientService.getOAuth2ClientPage(pageVO); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        return success(OAuth2ClientConvert.INSTANCE.convertPage(pageResult)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        return success(BeanUtils.toBean(pageResult, OAuth2ClientRespVO.class)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 } 
			 |