parent
a1c5a69e25
commit
feb470136f
|
@ -95,9 +95,9 @@ token:
|
||||||
# 令牌自定义标识
|
# 令牌自定义标识
|
||||||
header: Authorization
|
header: Authorization
|
||||||
# 令牌密钥
|
# 令牌密钥
|
||||||
secret: abcdefghijklmnopqrstuvwxyz
|
secret: abcdefghijklmnopqrstuvwxyzws
|
||||||
# 令牌有效期(默认30分钟)
|
# 令牌有效期(默认30分钟)
|
||||||
expireTime: 30
|
expireTime: 120
|
||||||
|
|
||||||
# MyBatis配置
|
# MyBatis配置
|
||||||
mybatis:
|
mybatis:
|
||||||
|
@ -154,6 +154,15 @@ clientIP:
|
||||||
accountsecretKey: 2xib03rq8uqh15x230ea9emjasiu3exv
|
accountsecretKey: 2xib03rq8uqh15x230ea9emjasiu3exv
|
||||||
secretId: ohrruf71orkzv9l9enhi
|
secretId: ohrruf71orkzv9l9enhi
|
||||||
secretKey: bp4iyx52tc9oe46hj0lriyux2m6hpzvu
|
secretKey: bp4iyx52tc9oe46hj0lriyux2m6hpzvu
|
||||||
|
getdpsAddr: https://dps.kdlapi.com/api/getdps
|
||||||
|
getdpsvalidtime: https://dps.kdlapi.com/api/getdpsvalidtime
|
||||||
|
checkdpsvalid: https://dps.kdlapi.com/api/checkdpsvalid
|
||||||
|
accountSM: d1353713811
|
||||||
|
pwdSM: btqffqim
|
||||||
|
accountSecretIdSM: ol1ydp86g518q4y607xe
|
||||||
|
accountsecretKeySM: 6vwfgvti51u2njgntamc1f23lqq7kave
|
||||||
|
secretIdSM: uadb4a2pwopd613sxr89
|
||||||
|
secretKeySM: 2xib03rq8uqh15x230ea9emjasiu3exv
|
||||||
|
|
||||||
eleme:
|
eleme:
|
||||||
isSandbox: false
|
isSandbox: false
|
||||||
|
|
|
@ -1,12 +1,13 @@
|
||||||
package com.ruoyi.common.config;
|
package com.ruoyi.common.config;
|
||||||
|
|
||||||
import com.tencentcloudapi.common.Credential;
|
import com.alibaba.fastjson2.JSONObject;
|
||||||
import com.tencentcloudapi.common.profile.ClientProfile;
|
|
||||||
import com.tencentcloudapi.common.profile.HttpProfile;
|
|
||||||
import com.tencentcloudapi.sms.v20210111.SmsClient;
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
import org.apache.http.client.methods.CloseableHttpResponse;
|
||||||
|
import org.apache.http.client.methods.HttpGet;
|
||||||
|
import org.apache.http.impl.client.CloseableHttpClient;
|
||||||
|
import org.apache.http.impl.client.HttpClients;
|
||||||
|
import org.apache.http.util.EntityUtils;
|
||||||
import org.springframework.beans.factory.annotation.Value;
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
import org.springframework.context.annotation.Bean;
|
|
||||||
import org.springframework.context.annotation.Configuration;
|
import org.springframework.context.annotation.Configuration;
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
|
@ -42,4 +43,124 @@ public class ProxyProperties {
|
||||||
@Value("${clientIP.secretKey}")
|
@Value("${clientIP.secretKey}")
|
||||||
private String secretKey;
|
private String secretKey;
|
||||||
|
|
||||||
|
@Value("${clientIP.getdpsAddr}")
|
||||||
|
private String getdpsAddr;
|
||||||
|
@Value("${clientIP.getdpsvalidtime}")
|
||||||
|
private String getdpsvalidtime;
|
||||||
|
@Value("${clientIP.checkdpsvalid}")
|
||||||
|
private String checkdpsvalid;
|
||||||
|
@Value("${clientIP.accountSM}")
|
||||||
|
private String accountSM;
|
||||||
|
@Value("${clientIP.pwdSM}")
|
||||||
|
private String pwdSM;
|
||||||
|
@Value("${clientIP.accountSecretIdSM}")
|
||||||
|
private String accountSecretIdSM;
|
||||||
|
@Value("${clientIP.accountsecretKeySM}")
|
||||||
|
private String accountsecretKeySM;
|
||||||
|
@Value("${clientIP.secretIdSM}")
|
||||||
|
private String secretIdSM;
|
||||||
|
@Value("${clientIP.secretKeySM}")
|
||||||
|
private String secretKeySM;
|
||||||
|
|
||||||
|
|
||||||
|
private String getUrl() {
|
||||||
|
try {
|
||||||
|
// 请求参数
|
||||||
|
int num = 1; // 提取数量
|
||||||
|
String params = "?secret_id=" + secretIdSM + "&signature=" + secretKeySM + "&num=" + num;
|
||||||
|
|
||||||
|
CloseableHttpClient httpclient = HttpClients.createDefault();
|
||||||
|
try {
|
||||||
|
HttpGet httpget = new HttpGet(getdpsAddr + params);
|
||||||
|
httpget.addHeader("Accept-Encoding", "gzip"); //使用gzip压缩传输数据让访问更快
|
||||||
|
|
||||||
|
System.out.println("Executing request " + httpget.getURI());
|
||||||
|
CloseableHttpResponse response = httpclient.execute(httpget);
|
||||||
|
try {
|
||||||
|
String ip = EntityUtils.toString(response.getEntity());
|
||||||
|
if (checkdpsvalid(ip) && getdpsvalidtime(ip)) {
|
||||||
|
return ip;
|
||||||
|
}
|
||||||
|
getUrl();
|
||||||
|
} finally {
|
||||||
|
response.close();
|
||||||
|
}
|
||||||
|
} finally {
|
||||||
|
httpclient.close();
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
private Boolean getdpsvalidtime(String proxy) {
|
||||||
|
Boolean flag = false;
|
||||||
|
try {
|
||||||
|
// 请求参数
|
||||||
|
String params = "?secret_id=" + secretIdSM + "&proxy=" + proxy + "&signature=" + secretKeySM;
|
||||||
|
CloseableHttpClient httpclient = HttpClients.createDefault();
|
||||||
|
try {
|
||||||
|
HttpGet httpget = new HttpGet(getdpsvalidtime + params);
|
||||||
|
httpget.addHeader("Accept-Encoding", "gzip"); //使用gzip压缩传输数据让访问更快
|
||||||
|
|
||||||
|
System.out.println("Executing request " + httpget.getURI());
|
||||||
|
CloseableHttpResponse response = httpclient.execute(httpget);
|
||||||
|
try {
|
||||||
|
String result = EntityUtils.toString(response.getEntity());
|
||||||
|
JSONObject jsonObject = JSONObject.parseObject(result);
|
||||||
|
String code = jsonObject.getString(("code"));
|
||||||
|
if ("0".equals(code)) {
|
||||||
|
int count = jsonObject.getJSONObject("data").getInteger(proxy);
|
||||||
|
if (count >= 0) {
|
||||||
|
System.out.println(jsonObject.getJSONObject("data").getInteger(proxy).toString());
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} finally {
|
||||||
|
response.close();
|
||||||
|
}
|
||||||
|
} finally {
|
||||||
|
httpclient.close();
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
return flag;
|
||||||
|
}
|
||||||
|
// GET https://dps.kdlapi.com/api/checkdpsvalid?secret_id=o1fjh1re9o28876h7c08
|
||||||
|
// &proxy=113.120.61.166:22989,123.163.183.200:18635
|
||||||
|
// &signature=oxf0n0g59h7wcdyvz2uo68ph2s
|
||||||
|
|
||||||
|
|
||||||
|
private Boolean checkdpsvalid(String proxy) {
|
||||||
|
Boolean flag = false;
|
||||||
|
try {
|
||||||
|
// 请求参数
|
||||||
|
String params = "?secret_id=" + secretIdSM + "&proxy=" + proxy + "&signature=" + secretKeySM;
|
||||||
|
CloseableHttpClient httpclient = HttpClients.createDefault();
|
||||||
|
try {
|
||||||
|
HttpGet httpget = new HttpGet(checkdpsvalid + params);
|
||||||
|
httpget.addHeader("Accept-Encoding", "gzip"); //使用gzip压缩传输数据让访问更快
|
||||||
|
|
||||||
|
System.out.println("Executing request " + httpget.getURI());
|
||||||
|
CloseableHttpResponse response = httpclient.execute(httpget);
|
||||||
|
try {
|
||||||
|
String result = EntityUtils.toString(response.getEntity());
|
||||||
|
JSONObject jsonObject = JSONObject.parseObject(result);
|
||||||
|
String code = jsonObject.getString(("code"));
|
||||||
|
if ("0".equals(code)) {
|
||||||
|
flag = jsonObject.getJSONObject("data").getBooleanValue(proxy);
|
||||||
|
}
|
||||||
|
} finally {
|
||||||
|
response.close();
|
||||||
|
}
|
||||||
|
} finally {
|
||||||
|
httpclient.close();
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
return flag;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -459,7 +459,7 @@ export default {
|
||||||
'el-tooltip',
|
'el-tooltip',
|
||||||
{
|
{
|
||||||
props: {
|
props: {
|
||||||
content: '昨日营销量与昨日单量比值', // 鼠标悬停时要展示的文字提示
|
content: '昨日好评量与昨日回访量比值', // 鼠标悬停时要展示的文字提示
|
||||||
placement: 'top' // 悬停内容展示的位置
|
placement: 'top' // 悬停内容展示的位置
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -199,7 +199,7 @@
|
||||||
<el-table-column label="昨日好评量" prop="lastPositiveReviewsNum" align="center" width="85"/>
|
<el-table-column label="昨日好评量" prop="lastPositiveReviewsNum" align="center" width="85"/>
|
||||||
<el-table-column label="昨日五星量" prop="lastFiveStarReviewsNum" align="center" width="85"/>
|
<el-table-column label="昨日五星量" prop="lastFiveStarReviewsNum" align="center" width="85"/>
|
||||||
<el-table-column label="昨日回访量" prop="lastReturnVisitNum" align="center" width="85"/>
|
<el-table-column label="昨日回访量" prop="lastReturnVisitNum" align="center" width="85"/>
|
||||||
<el-table-column label="昨日营销比(%)" prop="lastReturnVisitRate" align="center" :render-header="renderPrice" width="120" />
|
<el-table-column label="昨日H评比(%)" prop="lastReturnVisitRate" align="center" :render-header="renderPrice" width="120" />
|
||||||
<el-table-column label="今日回访量" prop="todayReturnVisitNum" align="center" width="85" />
|
<el-table-column label="今日回访量" prop="todayReturnVisitNum" align="center" width="85" />
|
||||||
<el-table-column label="评分" prop="score" align="center" width="55" />
|
<el-table-column label="评分" prop="score" align="center" width="55" />
|
||||||
<el-table-column label="归属" prop="saleBindId" align="center" :formatter="idToName" width="65" />
|
<el-table-column label="归属" prop="saleBindId" align="center" :formatter="idToName" width="65" />
|
||||||
|
@ -509,7 +509,7 @@ export default {
|
||||||
'el-tooltip',
|
'el-tooltip',
|
||||||
{
|
{
|
||||||
props: {
|
props: {
|
||||||
content: '昨日营销量与昨日单量比值', // 鼠标悬停时要展示的文字提示
|
content: '昨日好评量与昨日回访量比值', // 鼠标悬停时要展示的文字提示
|
||||||
placement: 'top' // 悬停内容展示的位置
|
placement: 'top' // 悬停内容展示的位置
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -216,7 +216,7 @@
|
||||||
<el-table-column label="昨日好评量" prop="lastPositiveReviewsNum" align="center" width="85"/>
|
<el-table-column label="昨日好评量" prop="lastPositiveReviewsNum" align="center" width="85"/>
|
||||||
<el-table-column label="昨日五星量" prop="lastFiveStarReviewsNum" align="center" width="85"/>
|
<el-table-column label="昨日五星量" prop="lastFiveStarReviewsNum" align="center" width="85"/>
|
||||||
<el-table-column label="昨日回访量" prop="lastReturnVisitNum" align="center" width="85"/>
|
<el-table-column label="昨日回访量" prop="lastReturnVisitNum" align="center" width="85"/>
|
||||||
<el-table-column label="昨日营销比(%)" prop="lastReturnVisitRate" align="center" :render-header="renderPrice" width="120" />
|
<el-table-column label="昨日H评比(%)" prop="lastReturnVisitRate" align="center" :render-header="renderPrice" width="120" />
|
||||||
<el-table-column label="今日回访量" prop="todayReturnVisitNum" align="center" width="85" />
|
<el-table-column label="今日回访量" prop="todayReturnVisitNum" align="center" width="85" />
|
||||||
<el-table-column label="评分" prop="score" align="center" width="55" />
|
<el-table-column label="评分" prop="score" align="center" width="55" />
|
||||||
<el-table-column label="归属" prop="saleBindId" align="center" :formatter="idToName" width="75" />
|
<el-table-column label="归属" prop="saleBindId" align="center" :formatter="idToName" width="75" />
|
||||||
|
@ -582,7 +582,7 @@ export default {
|
||||||
'el-tooltip',
|
'el-tooltip',
|
||||||
{
|
{
|
||||||
props: {
|
props: {
|
||||||
content: '昨日营销量与昨日单量比值', // 鼠标悬停时要展示的文字提示
|
content: '昨日好评量与昨日回访量比值', // 鼠标悬停时要展示的文字提示
|
||||||
placement: 'top' // 悬停内容展示的位置
|
placement: 'top' // 悬停内容展示的位置
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -268,6 +268,7 @@ export default {
|
||||||
submitForm() {
|
submitForm() {
|
||||||
if(this.formIds.length==0){
|
if(this.formIds.length==0){
|
||||||
this.$modal.msgSuccess("请勾选数据!");
|
this.$modal.msgSuccess("请勾选数据!");
|
||||||
|
return
|
||||||
}
|
}
|
||||||
this.form.orderIds = this.formIds;
|
this.form.orderIds = this.formIds;
|
||||||
this.$refs["form"].validate(valid => {
|
this.$refs["form"].validate(valid => {
|
||||||
|
|
|
@ -191,7 +191,7 @@
|
||||||
<el-table-column label="昨日好评量" prop="lastPositiveReviewsNum" align="center" width="85"/>
|
<el-table-column label="昨日好评量" prop="lastPositiveReviewsNum" align="center" width="85"/>
|
||||||
<el-table-column label="昨日五星量" prop="lastFiveStarReviewsNum" align="center" width="85"/>
|
<el-table-column label="昨日五星量" prop="lastFiveStarReviewsNum" align="center" width="85"/>
|
||||||
<el-table-column label="昨日回访量" prop="lastReturnVisitNum" align="center" width="85"/>
|
<el-table-column label="昨日回访量" prop="lastReturnVisitNum" align="center" width="85"/>
|
||||||
<el-table-column label="昨日营销比(%)" prop="lastReturnVisitRate" align="center" :render-header="renderPrice" width="120" />
|
<el-table-column label="昨日H评比(%)" prop="lastReturnVisitRate" align="center" :render-header="renderPrice" width="120" />
|
||||||
<el-table-column label="今日回访量" prop="todayReturnVisitNum" align="center" width="85" />
|
<el-table-column label="今日回访量" prop="todayReturnVisitNum" align="center" width="85" />
|
||||||
<el-table-column label="评分" prop="score" align="center" width="55" />
|
<el-table-column label="评分" prop="score" align="center" width="55" />
|
||||||
<el-table-column label="归属" prop="saleBindId" align="center" :formatter="idToName" width="65" />
|
<el-table-column label="归属" prop="saleBindId" align="center" :formatter="idToName" width="65" />
|
||||||
|
@ -493,7 +493,7 @@ export default {
|
||||||
'el-tooltip',
|
'el-tooltip',
|
||||||
{
|
{
|
||||||
props: {
|
props: {
|
||||||
content: '昨日营销量与昨日单量比值', // 鼠标悬停时要展示的文字提示
|
content: '昨日好评量与昨日回访量比值', // 鼠标悬停时要展示的文字提示
|
||||||
placement: 'top' // 悬停内容展示的位置
|
placement: 'top' // 悬停内容展示的位置
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue