From 0dc15775095a25797daf376e47999f0c11486e75 Mon Sep 17 00:00:00 2001
From: luofl <1442745593@qq.com>
Date: 星期一, 07 四月 2025 22:17:13 +0800
Subject: [PATCH] 修改bug
---
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TTenantServiceImpl.java | 26 ++++++++++++++++++++++----
1 files changed, 22 insertions(+), 4 deletions(-)
diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TTenantServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TTenantServiceImpl.java
index 4b0d864..8f869f1 100644
--- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TTenantServiceImpl.java
+++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TTenantServiceImpl.java
@@ -7,7 +7,7 @@
import com.ruoyi.common.constant.DictConstants;
import com.ruoyi.common.utils.DictUtils;
import com.ruoyi.common.utils.StringUtils;
-import com.ruoyi.system.mapper.SysUserMapper;
+import com.ruoyi.system.dto.TTenantDTO;
import com.ruoyi.system.mapper.TContractMapper;
import com.ruoyi.system.mapper.THouseMapper;
import com.ruoyi.system.mapper.TTenantMapper;
@@ -23,7 +23,6 @@
import com.ruoyi.system.vo.TBillVO;
import com.ruoyi.system.vo.TenantVO;
import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.security.core.token.TokenService;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
@@ -49,7 +48,15 @@
@Override
public PageInfo<TenantVO> pageList(TTenantQuery query) {
PageInfo<TenantVO> pageInfo = new PageInfo<>(query.getPageNum(), query.getPageSize());
- List<TenantVO> list = this.baseMapper.pageList(query,pageInfo);
+ /* String businessDeptId = SecurityUtils.getBusinessDeptId();
+ List<TenantVO> list = null;
+ if (StringUtils.isBlank(businessDeptId) || "0".equals(businessDeptId)) {
+ list = this.baseMapper.pageList(query, pageInfo);
+ } else {
+ query.setBusinessDeptId(businessDeptId);
+ list = this.baseMapper.pageListByBusinessDeptId(query,pageInfo);
+ }*/
+ List<TenantVO> list = this.baseMapper.pageList(query, pageInfo);
for (TenantVO tenantVO : list) {
tenantVO.setTenantAttributesName(StringUtils.isNotBlank(tenantVO.getTenantAttributes())?DictUtils.getDictLabel(DictConstants.DICT_TYPE_TENANT_ATTRIBUTE,tenantVO.getTenantAttributes()):"");
tenantVO.setTenantTypeName(StringUtils.isNotBlank(tenantVO.getTenantType())?DictUtils.getDictLabel(DictConstants.DICT_TYPE_TENANT_TYPE,tenantVO.getTenantType()):"");
@@ -126,7 +133,7 @@
if (contract!=null){
tBillVO.setHouse(houseMapper.selectById(contract.getHouseId()));
}
- tBillVO.setPayFeesStatus(DictUtils.getDictLabel(DictConstants.DICT_TYPE_LEASE_STATUS,tBillVO.getPayFeesStatus()));
+ tBillVO.setPayFeesStatus(tBillVO.getPayFeesStatus());
}
pageInfo.setRecords(list);
return pageInfo;
@@ -139,4 +146,15 @@
pageInfo.setRecords(list);
return pageInfo;
}
+
+ @Override
+ public boolean isExit(TTenantDTO dto) {
+ if(StringUtils.isNotEmpty(dto.getId())){
+ // 修改
+ return this.count(Wrappers.lambdaQuery(TTenant.class).ne(TTenant::getId, dto.getId()).eq(TTenant::getPhone, dto.getPhone())) > 0;
+ }else {
+ // 新增
+ return this.count(Wrappers.lambdaQuery(TTenant.class).eq(TTenant::getPhone, dto.getPhone())) > 0;
+ }
+ }
}
--
Gitblit v1.7.1