|
@@ -1067,26 +1067,32 @@ public class WmScorePackageSettleNoteServiceImpl extends ServiceImpl<WmScorePack
|
|
|
// 发起结算
|
|
|
HttpHeaders headers = new HttpHeaders();
|
|
|
headers.setContentType(MediaType.APPLICATION_JSON);
|
|
|
+ log.info("阿拉丁结算req: {}", params);
|
|
|
HttpEntity<String> result = new RestTemplate().exchange(gigSettleUrl, HttpMethod.POST, new HttpEntity<>(params, headers), String.class);
|
|
|
- log.warn("阿拉丁结算: {}", result.getBody());
|
|
|
+ log.info("阿拉丁结算resp: {}", result.getBody());
|
|
|
if (!JSONUtil.isJson(result.getBody())) {
|
|
|
return R.failed("结算失败");
|
|
|
}
|
|
|
JSONObject settelObj = JSONUtil.parseObj(result.getBody());
|
|
|
|
|
|
if (Objects.equals(settelObj.getInt("code"), CommonConstants.SUCCESS)) {
|
|
|
+ JSONObject dataJsonObj = settelObj.getJSONObject("data");
|
|
|
+
|
|
|
noteIds.forEach(id -> {
|
|
|
log.info("自由职家结算提交成功");
|
|
|
- //streamId 获取不到
|
|
|
- if (StringUtils.isEmpty(settelObj.getStr("data"))) {
|
|
|
- log.info("自由职家提交成功 streamId 获取不到");
|
|
|
+ //data获取不到
|
|
|
+ if (dataJsonObj == null) {
|
|
|
+ log.info("自由职家提交成功 data 获取不到");
|
|
|
+ return;
|
|
|
}
|
|
|
WmScorePackageSettleNote note = new WmScorePackageSettleNote();
|
|
|
note.setId(id);
|
|
|
note.setUpdateTime(LocalDateTime.now());
|
|
|
note.setSettleNoteStatus(DingEnum.NOTE_STATUS_SUBMIT.getType());
|
|
|
// 新增字段streamId
|
|
|
- note.setStreamId(settelObj.getStr("data"));
|
|
|
+ note.setStreamId(dataJsonObj.getStr("requestId"));
|
|
|
+ // 第三方任务id
|
|
|
+ note.setThirdTaskId(dataJsonObj.getStr("taskId"));
|
|
|
this.baseMapper.updateById(note);
|
|
|
});
|
|
|
|
|
@@ -1413,8 +1419,9 @@ public class WmScorePackageSettleNoteServiceImpl extends ServiceImpl<WmScorePack
|
|
|
// 发起结算
|
|
|
HttpHeaders headers = new HttpHeaders();
|
|
|
headers.setContentType(MediaType.APPLICATION_JSON);
|
|
|
+ log.info("阿拉丁结算req: {}", params);
|
|
|
HttpEntity<String> result = new RestTemplate().exchange(gigSettleUrl, HttpMethod.POST, new HttpEntity<>(params, headers), String.class);
|
|
|
- log.warn("阿拉丁结算: {}", result.getBody());
|
|
|
+ log.warn("阿拉丁结算resp: {}", result.getBody());
|
|
|
if (!JSONUtil.isJson(result.getBody())) {
|
|
|
return R.failed("结算失败");
|
|
|
}
|
|
@@ -1422,15 +1429,19 @@ public class WmScorePackageSettleNoteServiceImpl extends ServiceImpl<WmScorePack
|
|
|
|
|
|
|
|
|
if (Objects.equals(settelObj.getInt("code"), CommonConstants.SUCCESS)) {
|
|
|
+ JSONObject dataJsonObj = settelObj.getJSONObject("data");
|
|
|
log.info("自由职家结算提交成功: {}", note.getSettleNo());
|
|
|
//streamId 获取不到
|
|
|
- if (StringUtils.isEmpty(settelObj.getStr("data"))) {
|
|
|
- log.warn("自由职家结算提交成功 requestId 获取不到: {}", note.getSettleNo());
|
|
|
+ if (dataJsonObj == null) {
|
|
|
+ log.warn("自由职家结算提交成功 data 获取不到: {}", note.getSettleNo());
|
|
|
+ } else {
|
|
|
+ note.setUpdateTime(LocalDateTime.now());
|
|
|
+ note.setSettleNoteStatus(DingEnum.NOTE_STATUS_SUBMIT.getType());
|
|
|
+ // 新增字段streamId
|
|
|
+ note.setStreamId(dataJsonObj.getStr("requestId"));
|
|
|
+ // 第三方任务id
|
|
|
+ note.setThirdTaskId(dataJsonObj.getStr("taskId"));
|
|
|
}
|
|
|
- note.setUpdateTime(LocalDateTime.now());
|
|
|
- note.setSettleNoteStatus(DingEnum.NOTE_STATUS_SUBMIT.getType());
|
|
|
- // 新增字段streamId
|
|
|
- note.setStreamId(settelObj.getStr("data"));
|
|
|
} else {
|
|
|
log.warn("自由职家结算提交失败: {}", note.getSettleNo());
|
|
|
note.setUpdateTime(LocalDateTime.now());
|