|
|
|
@ -72,10 +72,15 @@ public class SendBigDataTask {
|
|
|
|
|
*/
|
|
|
|
|
private static final int FINISH_SEND_TAG = 1;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 集群模式标识
|
|
|
|
|
*/
|
|
|
|
|
public static final String CLUSTER_TAG = "999";
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 用于随机选的环境代替字符, 如果添加环境就进行自动添加
|
|
|
|
|
*/
|
|
|
|
|
public static final String BASE_URL_CHAR_NUMBER = "12345678910";
|
|
|
|
|
public static final String BASE_URL_CHAR_NUMBER = "1234567891011";
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 下游发送url
|
|
|
|
@ -89,6 +94,12 @@ public class SendBigDataTask {
|
|
|
|
|
@Value(value = "${req.db.host}")
|
|
|
|
|
private String host;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 集群模式完整路径
|
|
|
|
|
*/
|
|
|
|
|
@Value(value = "${req.db.cluster}")
|
|
|
|
|
private String cluster;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 加密请求需要的各种配置信息
|
|
|
|
|
*/
|
|
|
|
@ -448,17 +459,22 @@ public class SendBigDataTask {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private String preSendReqAddress(String tag) {
|
|
|
|
|
StringBuilder builder = new StringBuilder();
|
|
|
|
|
// 集群模式
|
|
|
|
|
if(CLUSTER_TAG.equalsIgnoreCase(tag)){
|
|
|
|
|
return cluster;
|
|
|
|
|
}
|
|
|
|
|
// 处理环境选择问题, 只接受单个 a, b, c 中的任意一个输入,如果不输入就进行随机返回
|
|
|
|
|
tag = (StringUtils.isNotBlank(tag) && StringUtils.countMatches(BASE_URL_CHAR_NUMBER, tag.trim()) >= 1)?
|
|
|
|
|
tag.trim(): String.valueOf(RandomUtil.randomChar(BASE_URL_CHAR_NUMBER));
|
|
|
|
|
// 拼接成需要的URL进行返回
|
|
|
|
|
StringBuilder builder = new StringBuilder();
|
|
|
|
|
builder.append(host)
|
|
|
|
|
.append(tag)
|
|
|
|
|
.append(url);
|
|
|
|
|
// 返回拼接结果
|
|
|
|
|
return builder.toString();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//发给文件系统短信内容
|
|
|
|
|
private void sendSmsContent(RemoteRecord resource,TbSendSmsContentDto tbSendSmsContentDto){
|
|
|
|
|
// 组装成JSON
|
|
|
|
|