|
@@ -2,6 +2,8 @@ package com.pj.api.pushfee.task;
|
|
|
|
|
|
import cn.hutool.core.date.DateUtil;
|
|
|
import cn.hutool.core.util.StrUtil;
|
|
|
+import cn.hutool.json.JSONObject;
|
|
|
+import cn.hutool.json.JSONUtil;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
import com.pj.api.pushfee.tools.EncryptTools;
|
|
|
import com.pj.api.pushfee.tools.message.api.OdsOrderPayDetailDTO;
|
|
@@ -53,6 +55,7 @@ public class FeeDetailSyncTask {
|
|
|
@Scheduled(fixedRate = 300000)
|
|
|
public void send() {
|
|
|
// if(partConfig.isTestEnv()){
|
|
|
+// log.info("pushfee_info: 测试环境不传输");
|
|
|
// return;
|
|
|
// }
|
|
|
Date startTime;
|
|
@@ -103,15 +106,19 @@ public class FeeDetailSyncTask {
|
|
|
log.info("pushfee_encryptMessage: " + encryptMessage);
|
|
|
|
|
|
//推送数据
|
|
|
+ String response = "";
|
|
|
try {
|
|
|
- String response = tools.http.HttpUtils.doPost(URL, encryptMessage);
|
|
|
+ response = tools.http.HttpUtils.doPost(URL, encryptMessage);
|
|
|
log.info("pushfee_response: " + response);
|
|
|
} catch (IOException e) {
|
|
|
e.printStackTrace();
|
|
|
}
|
|
|
-
|
|
|
- RedisUtil.set("pushFeeStartTime", DateUtil.format(finishTime, "yyyy-MM-dd HH:mm:ss"));
|
|
|
- RedisUtil.set("pushFeeTimeSpan", timeSpan+"");
|
|
|
+ JSONObject jsonObject = JSONUtil.parseObj(response);
|
|
|
+ String code = jsonObject.getStr("code");
|
|
|
+ if(StrUtil.equals("200", code)){
|
|
|
+ RedisUtil.set("pushFeeStartTime", DateUtil.format(finishTime, "yyyy-MM-dd HH:mm:ss"));
|
|
|
+ RedisUtil.set("pushFeeTimeSpan", timeSpan+"");
|
|
|
+ }
|
|
|
log.info("pushfee_startTime: " + RedisUtil.get("pushFeeStartTime"));
|
|
|
}
|
|
|
|