| | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.apache.logging.log4j.util.Strings; |
| | | import org.springblade.common.utils.SpringUtils; |
| | | import org.springblade.core.secure.utils.AuthUtil; |
| | | import org.springblade.modules.grid.service.IGridService; |
| | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public Boolean add(HouseRentalVO houseRentalVO) { |
| | | // // 判断添加人是否房屋业主 |
| | | // Long count = iHouseholdService.count(Wrappers.<HouseholdEntity>lambdaQuery() |
| | | // .eq(HouseholdEntity::getHouseCode, houseRentalVO.getHouseCode()) |
| | | // .eq(HouseholdEntity::getAssociatedUserId, AuthUtil.getUserId()) |
| | | // .eq(HouseholdEntity::getRelationship, 1)); |
| | | // if (count == 0) { |
| | | // return false; |
| | | // } |
| | | houseRentalVO.setCreateUser(AuthUtil.getUserId()); |
| | | houseRentalVO.setCreateTime(new Date()); |
| | | houseRentalVO.setUpdateUser(AuthUtil.getUserId()); |
| | | houseRentalVO.setUpdateTime(new Date()); |
| | | // 网格员新增默认是审核通过 |
| | | houseRentalVO.setAuditStatus(1); |
| | | if (!Strings.isBlank(houseRentalVO.getRoleName()) && houseRentalVO.getRoleName().equals("居民")){ |
| | | // 待审核 |
| | | houseRentalVO.setAuditStatus(0); |
| | | } |
| | | //保存自身 |
| | | boolean save = save(houseRentalVO); |
| | | List<String> phoneList = new ArrayList<>(); |