| | |
| | | HouseholdEntity householdEntity = new HouseholdEntity(); |
| | | HouseholdEntity entity = new HouseholdEntity(); |
| | | if (parameter instanceof MapperMethod.ParamMap) { |
| | | try { |
| | | entity = (HouseholdEntity) ((MapperMethod.ParamMap) parameter).get("param1"); |
| | | if (entity != null && entity.getId() != null) { |
| | | setHouseholdInfo(householdEntity, entity); |
| | | esParam.setTableId(entity.getId().toString()); |
| | | elasticsearchDocumentService.update(esParam, entity, EsTableConstant.householdList); |
| | | } |
| | | } catch (Exception e) { |
| | | entity = (HouseholdEntity) ((MapperMethod.ParamMap) parameter).get("et"); |
| | | if (entity != null && entity.getId() != null) { |
| | | setHouseholdInfo(householdEntity, entity); |
| | | esParam.setTableId(entity.getId().toString()); |
| | | elasticsearchDocumentService.update(esParam, entity, EsTableConstant.householdList); |
| | | } |
| | | } |
| | | } else { |
| | | entity = (HouseholdEntity) parameter; |
| | |
| | | } |
| | | // 删除处理 |
| | | if (sqlType.equals("DELETE")) { |
| | | if (parameter instanceof MapperMethod.ParamMap) { |
| | | List<Long> list = (List<Long>) ((MapperMethod.ParamMap) parameter).get("param1"); |
| | | esParam.setTableId(list.get(0).toString()); |
| | | elasticsearchDocumentService.removeByQuery(esParam); |
| | | } |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 场所值复制 |