getPrefixToFileUrl
This commit is contained in:
		
							parent
							
								
									8ea2c80f91
								
							
						
					
					
						commit
						d5e0fa0e61
					
				| 
						 | 
					@ -70,7 +70,7 @@ public class AllocCanteenModifyDTO {
 | 
				
			||||||
   }
 | 
					   }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
   public String getImgUrl() {
 | 
					   public String getImgUrl() {
 | 
				
			||||||
      return SysUtil.getCutPath(this.imgUrl);
 | 
					      return SysUtil.getPrefixToFileUrl(this.imgUrl);
 | 
				
			||||||
   }
 | 
					   }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
   public String getPayCodeUrl() {
 | 
					   public String getPayCodeUrl() {
 | 
				
			||||||
| 
						 | 
					@ -202,7 +202,7 @@ public class AllocCanteenModifyDTO {
 | 
				
			||||||
   }
 | 
					   }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
   public void setImgUrl(final String imgUrl) {
 | 
					   public void setImgUrl(final String imgUrl) {
 | 
				
			||||||
      this.imgUrl = imgUrl;
 | 
					      this.imgUrl = SysUtil.setPrefixToFileUrl(imgUrl);
 | 
				
			||||||
   }
 | 
					   }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
   public void setCapacity(final Integer capacity) {
 | 
					   public void setCapacity(final Integer capacity) {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -58,7 +58,7 @@ public class AllocCanteenSaveDTO {
 | 
				
			||||||
   private Map<String, String> extendMap;
 | 
					   private Map<String, String> extendMap;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
   public String getImgUrl() {
 | 
					   public String getImgUrl() {
 | 
				
			||||||
      return SysUtil.getCutFileUrl(this.imgUrl);
 | 
					      return SysUtil.getPrefixToFileUrl(this.imgUrl);
 | 
				
			||||||
   }
 | 
					   }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
   public String getPayCodeUrl() {
 | 
					   public String getPayCodeUrl() {
 | 
				
			||||||
| 
						 | 
					@ -178,7 +178,7 @@ public class AllocCanteenSaveDTO {
 | 
				
			||||||
   }
 | 
					   }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
   public void setImgUrl(final String imgUrl) {
 | 
					   public void setImgUrl(final String imgUrl) {
 | 
				
			||||||
      this.imgUrl = imgUrl;
 | 
					      this.imgUrl = SysUtil.setPrefixToFileUrl(imgUrl);
 | 
				
			||||||
   }
 | 
					   }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
   public void setCapacity(final Integer capacity) {
 | 
					   public void setCapacity(final Integer capacity) {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -119,7 +119,7 @@ public class AllocCanteen {
 | 
				
			||||||
   }
 | 
					   }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
   public String getImgUrl() {
 | 
					   public String getImgUrl() {
 | 
				
			||||||
      return SysUtil.getCutPath(this.imgUrl);
 | 
					      return SysUtil.getPrefixToFileUrl(this.imgUrl);
 | 
				
			||||||
   }
 | 
					   }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
   public String getPayCodeUrl() {
 | 
					   public String getPayCodeUrl() {
 | 
				
			||||||
| 
						 | 
					@ -309,7 +309,7 @@ public class AllocCanteen {
 | 
				
			||||||
   }
 | 
					   }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
   public void setImgUrl(final String imgUrl) {
 | 
					   public void setImgUrl(final String imgUrl) {
 | 
				
			||||||
      this.imgUrl = imgUrl;
 | 
					      this.imgUrl = SysUtil.setPrefixToFileUrl(imgUrl);
 | 
				
			||||||
   }
 | 
					   }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
   public void setCapacity(final Integer capacity) {
 | 
					   public void setCapacity(final Integer capacity) {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -38,12 +38,35 @@ public class SysUtil {
 | 
				
			||||||
      return sysUtilProxy.getPrefix(prefixOn, prefixOff);
 | 
					      return sysUtilProxy.getPrefix(prefixOn, prefixOff);
 | 
				
			||||||
   }
 | 
					   }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					   public static String getIpPort() {
 | 
				
			||||||
 | 
					      return getPrefix().substring(0, getPrefix().lastIndexOf("/"));
 | 
				
			||||||
 | 
					   }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
   public static String getBucket() {
 | 
					   public static String getBucket() {
 | 
				
			||||||
      return bucket;
 | 
					      return bucket;
 | 
				
			||||||
   }
 | 
					   }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					   public static String getPrefixToFileUrl(String fileUrl) {
 | 
				
			||||||
 | 
					      log.info("出参_补图_原路径:{},前缀:{},存储桶:{}, ip_port:{}", new Object[]{fileUrl, getPrefix(), getBucket(), getIpPort()});
 | 
				
			||||||
 | 
					      if (!CharSequenceUtil.isBlank(fileUrl) && !fileUrl.startsWith(getPrefix())) {
 | 
				
			||||||
 | 
					         return getPrefix() + "/" + fileUrl;
 | 
				
			||||||
 | 
					      } else {
 | 
				
			||||||
 | 
					         return fileUrl;
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					   }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					   public static String setPrefixToFileUrl(String fileUrl) {
 | 
				
			||||||
 | 
					      log.info("出参_补图_原路径:{},前缀:{},存储桶:{}, ip_port:{}", new Object[]{fileUrl, getPrefix(), getBucket(), getIpPort()});
 | 
				
			||||||
 | 
					      if (!CharSequenceUtil.isBlank(fileUrl) && !fileUrl.startsWith(getPrefix())) {
 | 
				
			||||||
 | 
					         return getPrefix() + "/" + fileUrl;
 | 
				
			||||||
 | 
					      } else {
 | 
				
			||||||
 | 
					         return fileUrl;
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					   }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
   public static String getCutFileUrl(String fileUrl) {
 | 
					   public static String getCutFileUrl(String fileUrl) {
 | 
				
			||||||
      log.info("出参_补图_原路径:{},前缀:{},存储桶:{}", new Object[]{fileUrl, getPrefix(), getBucket()});
 | 
					      log.info("出参_补图_原路径:{},前缀:{},存储桶:{}, ip_port:{}", new Object[]{fileUrl, getPrefix(), getBucket(), getIpPort()});
 | 
				
			||||||
      String cutFileUrl = null;
 | 
					      String cutFileUrl = null;
 | 
				
			||||||
      try {
 | 
					      try {
 | 
				
			||||||
         cutFileUrl = getCutFileUrl(fileUrl, getPrefix(), getBucket());
 | 
					         cutFileUrl = getCutFileUrl(fileUrl, getPrefix(), getBucket());
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -235,7 +235,7 @@ public class FaceRegisterServiceImpl implements FaceRegisterService {
 | 
				
			||||||
         if ("1".equals(faceMetadataModel.getIfRainbowSoftFaceUrl())){
 | 
					         if ("1".equals(faceMetadataModel.getIfRainbowSoftFaceUrl())){
 | 
				
			||||||
            System.out.println("开始采集虹软人脸");
 | 
					            System.out.println("开始采集虹软人脸");
 | 
				
			||||||
            ArcFaceHelper arcFaceHelper = new ArcFaceHelper();
 | 
					            ArcFaceHelper arcFaceHelper = new ArcFaceHelper();
 | 
				
			||||||
            FaceResult faceResult = arcFaceHelper.getFaceFeatures("http://192.168.0.14:9090" + registerParamDTO.getMinioPicPath());
 | 
					            FaceResult faceResult = arcFaceHelper.getFaceFeatures(SysUtil.getIpPort() + registerParamDTO.getMinioPicPath());
 | 
				
			||||||
            System.err.println("采集结束");
 | 
					            System.err.println("采集结束");
 | 
				
			||||||
            if (faceResult != null){
 | 
					            if (faceResult != null){
 | 
				
			||||||
               MultiModelFaceVO faceVO = new MultiModelFaceVO();
 | 
					               MultiModelFaceVO faceVO = new MultiModelFaceVO();
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue