Commit 01e6f22f authored by hezhen's avatar hezhen

修改上传图片

parent 57aac7ac
...@@ -5,6 +5,8 @@ import com.github.wxiaoqi.security.common.util.SystemProperty; ...@@ -5,6 +5,8 @@ import com.github.wxiaoqi.security.common.util.SystemProperty;
public class SystemConfig { public class SystemConfig {
// 项目url
public static final String XXMP_URL = SystemProperty.getConfig("XXMP_URL");
// token到期时间 // token到期时间
public static Integer TOKENOVERTIME = Integer.valueOf(SystemProperty.getConfig("TOKEN_OVER_TIME")); public static Integer TOKENOVERTIME = Integer.valueOf(SystemProperty.getConfig("TOKEN_OVER_TIME"));
// redis缓存时间 // redis缓存时间
...@@ -59,4 +61,6 @@ public class SystemConfig { ...@@ -59,4 +61,6 @@ public class SystemConfig {
// 存放退款证书目录 // 存放退款证书目录
public static String APICLIENT_CERT = SystemProperty.getConfig("APICLIENT_CERT"); public static String APICLIENT_CERT = SystemProperty.getConfig("APICLIENT_CERT");
} }
#项目url #项目url
XXMP_URL=http://zhrstest.qzlife.net XXMP_URL=https://xxtest.upyuns.com
#token到期时间 #token到期时间
TOKEN_OVER_TIME=604800 TOKEN_OVER_TIME=604800
#itoken到期时间(6天) #itoken到期时间(6天)
......
...@@ -5,7 +5,6 @@ import com.github.wxiaoqi.security.common.util.OrderUtil; ...@@ -5,7 +5,6 @@ import com.github.wxiaoqi.security.common.util.OrderUtil;
import com.github.wxiaoqi.security.common.util.process.ResultCode; import com.github.wxiaoqi.security.common.util.process.ResultCode;
import com.github.wxiaoqi.security.common.util.process.SystemConfig; import com.github.wxiaoqi.security.common.util.process.SystemConfig;
import com.github.wxiaoqi.security.common.util.result.JsonResultUtil; import com.github.wxiaoqi.security.common.util.result.JsonResultUtil;
import com.xxfc.platform.universal.controller.OrderRefundController;
import com.xxfc.platform.universal.vo.OrderRefundVo; import com.xxfc.platform.universal.vo.OrderRefundVo;
import com.xxfc.platform.universal.weixin.api.WxPayRefundUtils; import com.xxfc.platform.universal.weixin.api.WxPayRefundUtils;
import com.xxfc.platform.universal.weixin.util.Snowflake; import com.xxfc.platform.universal.weixin.util.Snowflake;
......
package com.xxfc.platform.universal.service; package com.xxfc.platform.universal.service;
import com.github.wxiaoqi.security.common.util.process.SystemConfig;
import com.xxfc.platform.vehicle.constant.RedisKey; import com.xxfc.platform.vehicle.constant.RedisKey;
import org.apache.commons.io.FileUtils; import org.apache.commons.io.FileUtils;
import org.joda.time.DateTime; import org.joda.time.DateTime;
...@@ -51,6 +52,7 @@ public class UploadService { ...@@ -51,6 +52,7 @@ public class UploadService {
String filePath = baseUploadPath + realFileRelPath; String filePath = baseUploadPath + realFileRelPath;
//将文件写入指定位置 //将文件写入指定位置
FileUtils.copyInputStreamToFile(file.getInputStream(), new File(filePath)); FileUtils.copyInputStreamToFile(file.getInputStream(), new File(filePath));
realFileRelPath= SystemConfig.XXMP_URL+realFileRelPath;
return realFileRelPath; return realFileRelPath;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment