From 8a266df75e912cc4ff49bc504db5b6b26f152892 Mon Sep 17 00:00:00 2001 From: jiangping <jp@doumee.com> Date: 星期五, 07 六月 2024 17:34:31 +0800 Subject: [PATCH] 提交一把 --- server/platform/src/main/java/com/doumee/api/common/PublicController.java | 14 ++++++++++++++ 1 files changed, 14 insertions(+), 0 deletions(-) diff --git a/server/platform/src/main/java/com/doumee/api/common/PublicController.java b/server/platform/src/main/java/com/doumee/api/common/PublicController.java index 24111aa..bb94a79 100644 --- a/server/platform/src/main/java/com/doumee/api/common/PublicController.java +++ b/server/platform/src/main/java/com/doumee/api/common/PublicController.java @@ -4,6 +4,7 @@ import com.alibaba.fastjson.TypeReference; import com.doumee.api.BaseController; import com.doumee.biz.system.SystemDictDataBiz; +import com.doumee.core.annotation.excel.ExcelToPdfTool; import com.doumee.core.annotation.trace.Trace; import com.doumee.core.constants.ResponseStatus; import com.doumee.core.exception.BusinessException; @@ -82,6 +83,7 @@ } NotifyDataReq data = JSONObject.parseObject(req.get("data"), NotifyDataReq.class); insuranceApplyService.dealSignResult(data); + }catch (Exception e){ log.setRepose("澶勭悊寮傚父锛�"+e.getMessage()); context.put("success",false); @@ -171,6 +173,17 @@ String tempFileName = nowDate + "/" + fileName; String key = folder + tempFileName;// 鏂囦欢鍚� ALiYunUtil obs = new ALiYunUtil(endpoint,access_id, access_key); + int type = 2; + if(StringUtils.endsWith(key,".mp4")){ + type =1; + }else if(StringUtils.endsWith(key,".jpg") + || StringUtils.endsWith(key,".JPG") + || StringUtils.endsWith(key,".png") + || StringUtils.endsWith(key,".PNG") + || StringUtils.endsWith(key,".jpeg") + || StringUtils.endsWith(key,".JPEG")){ + type =0; + } if (obs.uploadOnlineObject(file.getInputStream(),bucketName, key,null)) { // 绉诲姩鎴愬姛,杩斿洖鏂囦欢鍚� // sendSuccessMessage(response, resourcePath+key); @@ -180,6 +193,7 @@ JSONObject fileJSON = new JSONObject(); fileJSON.put("url", resourcePath + key); fileJSON.put("imgaddr", tempFileName); + fileJSON.put("type", type); fileJSON.put("imgname", fileName); fileJSON.put("originname", originname); context.put("data",fileJSON); -- Gitblit v1.9.3