| | |
| | | package com.ruoyi.system.service.impl; |
| | | |
| | | import com.ruoyi.common.basic.PageInfo; |
| | | import com.ruoyi.common.constant.DictConstants; |
| | | import com.ruoyi.common.utils.DictUtils; |
| | | import com.ruoyi.system.mapper.TTenantMapper; |
| | | import com.ruoyi.system.model.TTenant; |
| | | import com.ruoyi.system.query.TTenantQuery; |
| | | import com.ruoyi.system.service.TTenantService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.system.vo.SysUserVO; |
| | | import com.ruoyi.system.vo.TenantVO; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | |
| | | public class TTenantServiceImpl extends ServiceImpl<TTenantMapper, TTenant> implements TTenantService { |
| | | |
| | | @Override |
| | | public PageInfo<TTenant> pageList(TTenantQuery query) { |
| | | PageInfo<TTenant> pageInfo = new PageInfo<>(query.getPageNum(), query.getPageSize()); |
| | | List<TTenant> list = this.baseMapper.pageList(query,pageInfo); |
| | | public PageInfo<TenantVO> pageList(TTenantQuery query) { |
| | | PageInfo<TenantVO> pageInfo = new PageInfo<>(query.getPageNum(), query.getPageSize()); |
| | | List<TenantVO> list = this.baseMapper.pageList(query,pageInfo); |
| | | for (TenantVO tenantVO : list) { |
| | | tenantVO.setTenantAttributesName(DictUtils.getDictLabel(DictConstants.DICT_TYPE_TENANT_ATTRIBUTE,tenantVO.getTenantAttributes())); |
| | | tenantVO.setTenantTypeName(DictUtils.getDictLabel(DictConstants.DICT_TYPE_TENANT_TYPE,tenantVO.getTenantType())); |
| | | } |
| | | pageInfo.setRecords(list); |
| | | return pageInfo; |
| | | } |