调整租户的查询分页方式

This commit is contained in:
jishenghua
2025-02-22 15:33:29 +08:00
parent f7dbf030f2
commit 73110d1170
15 changed files with 1465 additions and 30 deletions

View File

@@ -14,6 +14,7 @@ import com.jsh.erp.datasource.mappers.UserMapperEx;
import com.jsh.erp.exception.JshException;
import com.jsh.erp.service.log.LogService;
import com.jsh.erp.service.user.UserService;
import com.jsh.erp.utils.PageUtils;
import com.jsh.erp.utils.StringUtil;
import com.jsh.erp.utils.Tools;
import org.slf4j.Logger;
@@ -75,22 +76,23 @@ public class TenantService {
return list;
}
public IPage<TenantEx> select(IPage<TenantEx> page, String loginName, String type, String enabled, String remark)throws Exception {
IPage<TenantEx> iPage = null;
public List<TenantEx> select(String loginName, String type, String enabled, String remark)throws Exception {
List<TenantEx> list = null;
try{
if(BusinessConstants.DEFAULT_MANAGER.equals(userService.getCurrentUser().getLoginName())) {
iPage = tenantMapperEx.selectByConditionTenant(page, loginName, type, enabled, remark);
if (null != iPage.getRecords()) {
for (TenantEx tenantEx : iPage.getRecords()) {
PageUtils.startPage();
list = tenantMapperEx.selectByConditionTenant(loginName, type, enabled, remark);
if (null != list) {
for (TenantEx tenantEx : list) {
tenantEx.setCreateTimeStr(Tools.getCenternTime(tenantEx.getCreateTime()));
tenantEx.setExpireTimeStr(Tools.getCenternTime(tenantEx.getExpireTime()));
}
}
}
}catch(Exception e){
} catch(Exception e){
JshException.readFail(logger, e);
}
return iPage;
return list;
}
@Transactional(value = "transactionManager", rollbackFor = Exception.class)