| | |
| | | |
| | | /** |
| | | * 住户-标签 自定义新增或修改 |
| | | * |
| | | * @param householdLabel |
| | | * @return |
| | | */ |
| | |
| | | householdLabel.setLabelName(labelEntity.getLabelName()); |
| | | // 判断同一个住户同一个标签是否已存在,已存在则更新,不存在则新增 |
| | | QueryWrapper<UserHouseLabelEntity> queryWrapper = new QueryWrapper<>(); |
| | | queryWrapper.eq("household_id",householdLabel.getHouseholdId()) |
| | | .eq("label_id",householdLabel.getLabelId()); |
| | | queryWrapper.eq("household_id", householdLabel.getHouseholdId()) |
| | | .eq("label_id", householdLabel.getLabelId()); |
| | | UserHouseLabelEntity one = getOne(queryWrapper); |
| | | if (null != one){ |
| | | if (null != one) { |
| | | householdLabel.setId(one.getId()); |
| | | // 更新 |
| | | return updateById(householdLabel); |
| | |
| | | public IPage<HouseholdLabelVO> statisticalLabels(IPage<HouseholdLabelVO> page, HouseholdLabelVO householdLabel) { |
| | | return page.setRecords(baseMapper.statisticalLabels(page, householdLabel)); |
| | | } |
| | | |
| | | @Override |
| | | public IPage<HouseholdLabelVO> getCommunityStatisticalLabels(IPage<HouseholdLabelVO> page, HouseholdLabelVO householdLabel) { |
| | | return page.setRecords(baseMapper.getCommunityStatisticalLabels(page, householdLabel)); |
| | | } |
| | | } |