|
@@ -1,5 +1,6 @@
|
|
|
package com.qunzhixinxi.hnqz.admin.controller;
|
|
|
|
|
|
+import cn.hutool.core.util.ArrayUtil;
|
|
|
import cn.hutool.core.util.StrUtil;
|
|
|
import cn.hutool.json.JSONArray;
|
|
|
import cn.hutool.json.JSONObject;
|
|
@@ -87,20 +88,24 @@ public class GigThirdApiController {
|
|
|
log.info("浪潮结算回调请求方法参数:parameterMap={}", JSONUtil.toJsonStr(parameterMap));
|
|
|
|
|
|
// 签名
|
|
|
- String verify = parameterMap.get("verify")[0];
|
|
|
+ String[] verifies = parameterMap.get("verify");
|
|
|
+ String verify = ArrayUtil.isEmpty(verifies) ? "" : verifies[0];
|
|
|
// 通知类型
|
|
|
- String channel = parameterMap.get("channel")[0];
|
|
|
+ String[] channels = parameterMap.get("channel");
|
|
|
+ String channel = ArrayUtil.isEmpty(channels) ? "" : channels[0];
|
|
|
// 项目单号
|
|
|
- String batchNo = parameterMap.get("batch_no")[0];
|
|
|
+ String[] batchNos = parameterMap.get("batch_no");
|
|
|
+ String batchNo = ArrayUtil.isEmpty(batchNos) ? "" : batchNos[0];
|
|
|
// 订单状态
|
|
|
- String orderStatus = parameterMap.get("status")[0];
|
|
|
+ String[] statuses = parameterMap.get("status");
|
|
|
+ String orderStatus = ArrayUtil.isEmpty(statuses) ? "" : statuses[0];
|
|
|
// project_accounts
|
|
|
- String projectAccounts = parameterMap.get("project_accounts")[0];
|
|
|
+ String[] projectAccountsArr = parameterMap.get("project_accounts");
|
|
|
// 账号单号
|
|
|
- if (StrUtil.isBlank(projectAccounts)) {
|
|
|
- log.warn("project_accounts为空");
|
|
|
- return "fail";
|
|
|
- }
|
|
|
+// if (StrUtil.isBlank(projectAccounts)) {
|
|
|
+// log.warn("project_accounts为空");
|
|
|
+// return "fail";
|
|
|
+// }
|
|
|
|
|
|
String redisKey = String.format("%s_%s_%s", CacheConstants.ZHEGN_QI_ZHI_XING_NOTIFY_KEY, channel, batchNo);
|
|
|
Boolean absent = redisTemplate.opsForValue().setIfAbsent(redisKey, batchNo, 30, TimeUnit.MINUTES);
|
|
@@ -118,9 +123,7 @@ public class GigThirdApiController {
|
|
|
record.setCreateTime(LocalDateTime.now());
|
|
|
lingcaiaiInputRecordService.save(record);
|
|
|
|
|
|
- gigThirdApiService.lingcaiaiNotify(channel, batchNo, Integer.valueOf(orderStatus));
|
|
|
-
|
|
|
- return "success";
|
|
|
+ return gigThirdApiService.lingcaiaiNotify(channel, batchNo, Integer.valueOf(orderStatus));
|
|
|
}
|
|
|
|
|
|
/**
|