|
@@ -270,9 +270,10 @@ public class HouseController extends BaseController {
|
|
image.setFloor(1);
|
|
image.setFloor(1);
|
|
image.setType(imageType);
|
|
image.setType(imageType);
|
|
//将图片保存到本地指定目录filePath eg: /root/data/kanfang/d_9iRDUgn3l/input_img/xxx.jpg
|
|
//将图片保存到本地指定目录filePath eg: /root/data/kanfang/d_9iRDUgn3l/input_img/xxx.jpg
|
|
- int resolutionRate = FileUtils.downloanAndGetResolutionRate(file.getInputStream(), fileFullPath , false);
|
|
|
|
|
|
+ int resolutionRate = FileUtils.downloanAndGetResolutionRate(file.getInputStream(), fileFullPath , true);
|
|
//照片分辨率
|
|
//照片分辨率
|
|
ImageResolutionRate maxResolutionRate = ImageResolutionRate.getResolutionRateByRate(resolutionRate);
|
|
ImageResolutionRate maxResolutionRate = ImageResolutionRate.getResolutionRateByRate(resolutionRate);
|
|
|
|
+ log.info("照片{}的像素为:{}" , fileFullPath , resolutionRate);
|
|
image.setResolutionRate(null != maxResolutionRate ? maxResolutionRate.name() : "TWO_K");
|
|
image.setResolutionRate(null != maxResolutionRate ? maxResolutionRate.name() : "TWO_K");
|
|
int insert = imageService2.save(image);
|
|
int insert = imageService2.save(image);
|
|
if(insert != 1){
|
|
if(insert != 1){
|