浏览代码

Merge branch 'test' of ssh://anderx@git.jishutao.com:55555/jishutao/jitao-server.git into test

anderx 7 年之前
父节点
当前提交
c9bada296f

+ 5 - 3
src/main/java/com/goafanti/common/controller/BaseApiController.java

@@ -223,22 +223,24 @@ public class BaseApiController extends BaseController {
 	@SuppressWarnings("resource")
 	protected String handleBaseFiles(Result res, String path, boolean isPrivate, byte[] bs, String sign,
 			String uid,String fn) {
-		String fileName = FileUtils.mosaicFileName(fn, isPrivate, path, StringUtils.isBlank(uid) ? TokenManager.getUserId() : uid);
+		String fileName = FileUtils.mosaicFileName("", isPrivate, path, StringUtils.isBlank(uid) ? TokenManager.getUserId() : uid);
 		OutputStream fos = null;
 		if (bs != null && bs.length>0) {
 			try {
 				if (isPrivate) {
-					File filePath = new File(uploadPrivatePath);
+					File filePath = new File(uploadPrivatePath + fileName);
 					if(!filePath.exists()){
 						filePath.mkdirs();
 					}
+					fileName += "/"+ fn; 
 					System.out.println("------------"+ uploadPrivatePath + fileName);
 					fos = new FileOutputStream(new File(uploadPrivatePath + fileName));
 				} else {
-					File filePath = new File(uploadPath);
+					File filePath = new File(uploadPath + fileName);
 					if(!filePath.exists()){
 						filePath.mkdirs();
 					}
+					fileName += "/" + fn; 
 					System.out.println("------------"+ uploadPath + fileName);
 					fos = new FileOutputStream(new File(uploadPath + fileName));
 				}

+ 1 - 1
src/main/java/com/goafanti/common/utils/FileUtils.java

@@ -118,7 +118,7 @@ public class FileUtils {
 		if (isPrivate) {
 			fileName = path + uid + "/" + fn;
 		} else {
-			fileName = path + uid + "/" + System.nanoTime() + fn ;
+			fileName = path + uid + "/" + System.nanoTime()  + fn ;
 		}
 		return fileName;
 	}

+ 8 - 1
src/main/java/com/goafanti/user/controller/UserApiController.java

@@ -960,13 +960,20 @@ public class UserApiController extends BaseApiController {
 		return res;
 	}
 	
+	/**
+	 * 解码base64位图片
+	 * @param picturebase
+	 * @param filename
+	 * @param sign
+	 * @return
+	 */
 	@RequestMapping(value="/uploadPicture64")
 	public Result uploadPicture64(String picturebase, String filename,String sign){
  		Result res = new Result();
  		byte[] bs=Base64.getDecoder().decode(picturebase);
 		AttachmentType attachmentType = AttachmentType.getField(sign);
         if (attachmentType == AttachmentType.USER_PICTURE) {
-        	filename = filename.substring(filename.indexOf("."));
+        	filename = System.nanoTime() + filename.substring(filename.indexOf("."));
         	res.setData(handleBaseFiles(res, "/user/", false,bs, sign, TokenManager.getUserId(),filename));
         } else {
             res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "", "附件标示"));

+ 1 - 1
src/main/webapp/WEB-INF/views/portal/facilitator.html

@@ -17,7 +17,7 @@
     <div id="facili" >
     	<div class="facImg">
     		<div>
-    			<div><img th:src="${org.companyLogoUrl}==null or ${org.companyLogoUrl}==''?${portalHost+'/img/fac/fea1.png'}:${avatarUploadHost+org.companyLogoUrl}" alt=""></div>
+    			<img th:src="${org.companyLogoUrl}==null or ${org.companyLogoUrl}==''?${portalHost+'/img/fac/fea1.png'}:${avatarUploadHost+org.companyLogoUrl}" alt="">
     		</div>
     		<div>
     			<h3 th:text="${org.identifyName}">湖南阿凡提有限公司</h3>

+ 1 - 1
src/main/webapp/WEB-INF/views/portal/search.html

@@ -19,7 +19,7 @@
 					<input type="text" class="form-control demandSearch" placeholder="请输入关键字">
 					<span class="input-group-btn">
 						<button class="btn btn-default searchBtn" type="button">
-							<img src="../img/newMenu/search-icon.jpg" alt=""> 搜索
+							<img th:src="${portalHost} +'/img/newMenu/search-icon.jpg'" alt=""> 搜索
 						</button>
 					</span>
 				</div>

文件差异内容过多而无法显示
+ 1 - 1
src/main/webapp/WEB-INF/views/portal/service/patenteDetails.html


文件差异内容过多而无法显示
+ 1 - 1
src/main/webapp/WEB-INF/views/portal/service/serviceDetails.html