错误代码回滚

626相关方人员数据对接
liujun 2024-06-20 16:14:51 +08:00
parent 22b0f9233d
commit 6d9a283acc
1 changed files with 17 additions and 30 deletions

View File

@ -992,37 +992,24 @@ public class XgfUserServiceImpl implements XgfUserService {
@Override @Override
public void repulse(PageData flows, XgfFlowDto info) throws Exception { public void repulse(PageData flows, XgfFlowDto info) throws Exception {
// add by liu jun 相关方可指定打回至指定节点 -1 为默认打回至相关方端 PageData condition = new PageData();
if ("-1".equals(info.getBACK_STEP())){ condition.put("XGF_USER_ID", flows.getString("FLOWS_ID"));
PageData condition = new PageData(); PageData entity = xgfUserMapper.findById(condition);
condition.put("XGF_USER_ID", flows.getString("FLOWS_ID")); entity.put("STATUS", "0");
PageData entity = xgfUserMapper.findById(condition); entity.put("VALID_FLAG", "0");
entity.put("STATUS", "0"); entity.put("CHECK_STATUS", "-2");
entity.put("VALID_FLAG", "0"); PageData key = new PageData();
entity.put("CHECK_STATUS", "-2"); key.putAll(entity);
PageData key = new PageData(); key.put("USER_ID", condition.get("XGF_USER_ID"));
key.putAll(entity); key.put("STATUS", "1");
key.put("USER_ID", condition.get("XGF_USER_ID")); key.put("OPINION", flows.get("OPINION"));
key.put("STATUS", "1"); Map result = HttpClientService.doPost(prevention_xgf_url + "openApi/user/approve", key);
key.put("OPINION", flows.get("OPINION")); if (result == null || !"succeed".equals(result.get("result"))) {
Map result = HttpClientService.doPost(prevention_xgf_url + "openApi/user/approve", key); throw new RuntimeException("请求失败");
if (result == null || !"succeed".equals(result.get("result"))) {
throw new RuntimeException("请求失败");
}
xgfUserMapper.edit(entity);
this.clearInfo(flows);
xgfFlowsMapper.edit(flows);
} else {
// 1、判断不能自己打回到自己
PageData condition = new PageData();
condition.put("FLOWS_ID",flows.getString("FLOWS_ID"));
PageData flowEntity = xgfFlowsMapper.findById(condition);
if (flowEntity != null && flowEntity.size() > 0 && flowEntity.getString("FLOWS_STEP").equals(info.getBACK_STEP())){
throw new RuntimeException("不能自己打回到自己");
}
flowEntity.put("FLOWS_STEP", info.getBACK_STEP());
xgfFlowsMapper.edit(flowEntity);
} }
xgfUserMapper.edit(entity);
this.clearInfo(flows);
xgfFlowsMapper.edit(flows);
} }
@Override @Override