|  |  | @ -10,6 +10,7 @@ package com.epmet.controller; | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.cloud.CloudStorageConfig; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.cloud.OssFactory; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.commons.tools.annotation.LoginUser; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.commons.tools.constant.NumConstant; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.commons.tools.constant.StrConstant; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.commons.tools.exception.EpmetErrorCode; | 
			
		
	
	
		
			
				
					|  |  | @ -17,6 +18,7 @@ import com.epmet.commons.tools.exception.RenException; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.commons.tools.page.PageData; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.commons.tools.redis.RedisKeys; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.commons.tools.redis.RedisUtils; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.commons.tools.security.dto.TokenDto; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.commons.tools.utils.Result; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.commons.tools.validator.ValidatorUtils; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.commons.tools.validator.group.AliyunGroup; | 
			
		
	
	
		
			
				
					|  |  | @ -404,8 +406,10 @@ public class OssController { | 
			
		
	
		
			
				
					|  |  |  | 	 * @date 2021.08.03 16:23 | 
			
		
	
		
			
				
					|  |  |  | 	*/ | 
			
		
	
		
			
				
					|  |  |  | 	@PostMapping("upload-resi-event-file") | 
			
		
	
		
			
				
					|  |  |  | 	public Result<UploadImgResultDTO> uploadResiEventFile(@RequestPart(value = "file") MultipartFile file, @RequestParam("customerId") String customerId) { | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  | 	public Result<UploadImgResultDTO> uploadResiEventFile(@LoginUser TokenDto tokenDto, @RequestPart(value = "file") MultipartFile file, @RequestParam(value = "customerId",required = false) String customerId) { | 
			
		
	
		
			
				
					|  |  |  | 		if (StringUtils.isBlank(customerId)){ | 
			
		
	
		
			
				
					|  |  |  | 			customerId = tokenDto.getCustomerId(); | 
			
		
	
		
			
				
					|  |  |  | 		} | 
			
		
	
		
			
				
					|  |  |  | 		// 体积限制
 | 
			
		
	
		
			
				
					|  |  |  | 		int sizeMb = 10; | 
			
		
	
		
			
				
					|  |  |  | 		int sizeThreshold = sizeMb * 1024 * 1024; // 大小限制10m
 | 
			
		
	
	
		
			
				
					|  |  | 
 |