Authored by mali

返回宽度和高度的上传图片接口

@@ -245,10 +245,6 @@ public class UploadServiceImpl implements IUploadService { @@ -245,10 +245,6 @@ public class UploadServiceImpl implements IUploadService {
245 * @throws PlatformException 245 * @throws PlatformException
246 */ 246 */
247 private void checkFilePixels(File uploadFile, Integer limitType, FileInfo fileInfo) throws PlatformException { 247 private void checkFilePixels(File uploadFile, Integer limitType, FileInfo fileInfo) throws PlatformException {
248 - if (null == limitType) {  
249 - return;  
250 - }  
251 -  
252 logger.info("method checkFilePixels exceute."); 248 logger.info("method checkFilePixels exceute.");
253 249
254 BufferedImage sourceImg = null; 250 BufferedImage sourceImg = null;
@@ -266,12 +262,16 @@ public class UploadServiceImpl implements IUploadService { @@ -266,12 +262,16 @@ public class UploadServiceImpl implements IUploadService {
266 fileInfo.setHeight(sourceImg.getHeight()); 262 fileInfo.setHeight(sourceImg.getHeight());
267 fileInfo.setWidth(sourceImg.getWidth()); 263 fileInfo.setWidth(sourceImg.getWidth());
268 } 264 }
269 -  
270 } catch (IOException e) { 265 } catch (IOException e) {
271 logger.warn("ImageIO read find wrong", e); 266 logger.warn("ImageIO read find wrong", e);
272 267
273 throw new PlatformException("上传文件失败", e, 400); 268 throw new PlatformException("上传文件失败", e, 400);
274 } 269 }
  270 +
  271 + if (null == limitType) {
  272 + return;
  273 + }
  274 +
275 if (null != sourceImg && limitType != 1) { 275 if (null != sourceImg && limitType != 1) {
276 List<Integer> list = picLengthLimitMap.get(limitType); 276 List<Integer> list = picLengthLimitMap.get(limitType);
277 if (CollectionUtils.isEmpty(list)) { 277 if (CollectionUtils.isEmpty(list)) {