Commit 5004eb00 authored by 赵啸非's avatar 赵啸非

添加好差评

parent 1f318e78
...@@ -2,6 +2,7 @@ package com.mortals.xhx.busiz.handler.impl; ...@@ -2,6 +2,7 @@ package com.mortals.xhx.busiz.handler.impl;
import cn.hutool.core.io.FileUtil; import cn.hutool.core.io.FileUtil;
import cn.hutool.core.map.MapUtil; import cn.hutool.core.map.MapUtil;
import cn.hutool.core.util.StrUtil;
import cn.hutool.http.HttpUtil; import cn.hutool.http.HttpUtil;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
...@@ -50,7 +51,8 @@ public class BusizAssessmentReqHandler extends BaseReqHandler<String, Object> { ...@@ -50,7 +51,8 @@ public class BusizAssessmentReqHandler extends BaseReqHandler<String, Object> {
for (Map.Entry<String, String> entry : params.entrySet()) { for (Map.Entry<String, String> entry : params.entrySet()) {
String key = entry.getKey(); String key = entry.getKey();
if (key.contains("http")) { if (key.contains("http")) {
url.append(entry.getKey()); String replaceStr = StrUtil.replaceFirst(entry.getKey(), "http", "https");
url.append(replaceStr);
url.append("="); url.append("=");
url.append(entry.getValue()); url.append(entry.getValue());
} }
...@@ -85,9 +87,7 @@ public class BusizAssessmentReqHandler extends BaseReqHandler<String, Object> { ...@@ -85,9 +87,7 @@ public class BusizAssessmentReqHandler extends BaseReqHandler<String, Object> {
log.info("发送地址为空!"); log.info("发送地址为空!");
return; return;
} }
//读取窗口id //读取窗口id
Integer windowId = 0;
boolean exist = FileUtil.exist(confPath); boolean exist = FileUtil.exist(confPath);
if (!exist) { if (!exist) {
log.info("配置文件不存在,返回!"); log.info("配置文件不存在,返回!");
...@@ -108,16 +108,5 @@ public class BusizAssessmentReqHandler extends BaseReqHandler<String, Object> { ...@@ -108,16 +108,5 @@ public class BusizAssessmentReqHandler extends BaseReqHandler<String, Object> {
log.info("response :" + response); log.info("response :" + response);
Rest<Void> rest = JSON.parseObject(response, new TypeReference<Rest<Void>>() { Rest<Void> rest = JSON.parseObject(response, new TypeReference<Rest<Void>>() {
}); });
if (rest.getCode() == YesNoEnum.YES.getValue()) {
log.info("创建提示框!");
//创建提示框
Notify.create()
.title("好差评")
.text("好差评成功!")
.hideAfter(10000)
.position(Pos.BOTTOM_LEFT)
.darkStyle()
.showInformation();
}
} }
} }
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