Commit 5bd09534 by 284718418@qq.com

配置问文件

parent 77aab22b
...@@ -31,6 +31,7 @@ import org.eclipse.jetty.util.StringUtil; ...@@ -31,6 +31,7 @@ import org.eclipse.jetty.util.StringUtil;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartFile;
...@@ -65,6 +66,9 @@ import javax.servlet.http.HttpServletResponse; ...@@ -65,6 +66,9 @@ import javax.servlet.http.HttpServletResponse;
@Transactional @Transactional
@RequestMapping(value = "/insure", produces = {"application/json"}) @RequestMapping(value = "/insure", produces = {"application/json"})
public class InsureContorll { public class InsureContorll {
@Value("${BASE_API_URL}")
private String base_api_url;
private static final Logger log = LoggerFactory.getLogger(InsureContorll.class); private static final Logger log = LoggerFactory.getLogger(InsureContorll.class);
/*测试用*/ /*测试用*/
private static String appid = "1002303100602312445"; private static String appid = "1002303100602312445";
...@@ -411,7 +415,7 @@ public class InsureContorll { ...@@ -411,7 +415,7 @@ public class InsureContorll {
bodyMap.put("file_url", url); bodyMap.put("file_url", url);
bodyMap.put("from_source", "API"); bodyMap.put("from_source", "API");
bodyMap.put("import_review_callback", ""); bodyMap.put("import_review_callback", "");
bodyMap.put("import_callback", "http://test-8timer-api.youlingrc.com/callBack/policy/CallBack"); bodyMap.put("import_callback", base_api_url+"/callBack/policy/CallBack");
bodyMap.put("third_uuid", "IS_" + insurePolicy.getOrgCode() + "_" + dtf2.format(now)); bodyMap.put("third_uuid", "IS_" + insurePolicy.getOrgCode() + "_" + dtf2.format(now));
String responData = HttpUtils.sendPost(batchUrl, setParams(JSONObject.toJSONString(bodyMap), appidq, secretq), bodyMap); String responData = HttpUtils.sendPost(batchUrl, setParams(JSONObject.toJSONString(bodyMap), appidq, secretq), bodyMap);
Map<String, Object> dataMap = JSONObject.parseObject(responData); Map<String, Object> dataMap = JSONObject.parseObject(responData);
...@@ -583,7 +587,7 @@ public class InsureContorll { ...@@ -583,7 +587,7 @@ public class InsureContorll {
bodyMap.put("file_url", url); bodyMap.put("file_url", url);
bodyMap.put("from_source", "API"); bodyMap.put("from_source", "API");
bodyMap.put("import_review_callback", ""); bodyMap.put("import_review_callback", "");
bodyMap.put("import_callback", "http://test-8timer-api.youlingrc.com/callBack/policy/CallBack"); bodyMap.put("import_callback", base_api_url+"/callBack/policy/CallBack");
bodyMap.put("third_uuid", "RP_" + insurePolicy.getOrgCode() + "_" + dtf2.format(now)); bodyMap.put("third_uuid", "RP_" + insurePolicy.getOrgCode() + "_" + dtf2.format(now));
String responData = HttpUtils.sendPost(batchUrl, setParams(JSONObject.toJSONString(bodyMap), appidq, secretq), bodyMap); String responData = HttpUtils.sendPost(batchUrl, setParams(JSONObject.toJSONString(bodyMap), appidq, secretq), bodyMap);
Map<String, Object> dataMap = JSONObject.parseObject(responData); Map<String, Object> dataMap = JSONObject.parseObject(responData);
......
...@@ -211,6 +211,8 @@ config-8timer: ...@@ -211,6 +211,8 @@ config-8timer:
zip: zip:
path: '/data/crm-zip/' path: '/data/crm-zip/'
# base_api_url
BASE_API_URL: 'http://api.8timer.cn'
#sftp 配置 #sftp 配置
sftp: sftp:
client: client:
......
...@@ -210,6 +210,9 @@ config-8timer: ...@@ -210,6 +210,9 @@ config-8timer:
#导出zip临时地址 #导出zip临时地址
zip: zip:
path: '/data/crm-zip/' path: '/data/crm-zip/'
# base_api_url
BASE_API_URL: 'http://test-8timer-api.youlingrc.com'
#sftp 配置 #sftp 配置
sftp: sftp:
client: client:
......
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