智慧校园

This commit is contained in:
张博 2024-10-31 18:36:01 +08:00
parent e40981e095
commit c75aed3a02
1 changed files with 6 additions and 1 deletions

View File

@ -57,6 +57,7 @@ public class TenRelationController extends AbstractController {
@PostMapping("/status")
public R upStatus(@RequestBody List<Map<String,Object>> params) {
List<String> errMsg = new ArrayList<>();
params.forEach(item -> {
TenRelation tenRelation = relationService.getById(item.get("id").toString());
tenRelation.setStatus(Integer.parseInt(item.get("status").toString()));
@ -78,7 +79,11 @@ public class TenRelationController extends AbstractController {
dataInfo.add(info);
opParams.put("dataInfo",dataInfo);
JSONObject jsonObject = opFeignClient.submitData(opParams);
if(jsonObject.getString("shrgStatus").equals("S")) {
if(jsonObject.getJSONArray("errInfo").isEmpty()) {
relationService.updateById(tenRelation);
}
}
});
return R.ok();