| 
					
				 | 
			
			
				@@ -22,6 +22,7 @@ import cn.newfeifan.mall.module.system.service.user.AdminUserService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import io.swagger.v3.oas.annotations.tags.Tag; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import io.swagger.v3.oas.annotations.Operation; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import lombok.extern.slf4j.Slf4j; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import org.springframework.security.crypto.password.PasswordEncoder; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import org.springframework.validation.annotation.Validated; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import org.springframework.web.bind.annotation.*; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import org.springframework.web.multipart.MultipartFile; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -54,6 +55,8 @@ public class UserProfileController { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     private RoleService roleService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @Resource 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     private SocialUserService socialService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    @Resource 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    private PasswordEncoder passwordEncoder; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @GetMapping("/get") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @Operation(summary = "获得登录用户信息") 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -85,6 +88,12 @@ public class UserProfileController { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         userService.updateUserPassword(getLoginUserId(), reqVO); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         return success(true); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    @PutMapping("/test-pwd") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    @Operation(summary = "测试pwd的接口-无需调用") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    public String testPwd(String pwd) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        //仅供测试 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        return passwordEncoder.encode(pwd); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @RequestMapping(value = "/update-avatar", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             method = {RequestMethod.POST, RequestMethod.PUT}) // 解决 uni-app 不支持 Put 上传文件的问题 
			 |