xuhy
2025-02-13 944f7079cea1d7e5b9278f608439109a8d843e28
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
package com.ruoyi.system.service.impl;
 
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
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.ruoyi.system.utils.wx.pojo.AppletUserDecodeData;
import com.ruoyi.system.vo.TenantVO;
import org.springframework.stereotype.Service;
 
import java.util.List;
import java.util.Map;
 
/**
 * <p>
 * 租户 服务实现类
 * </p>
 *
 * @author xiaochen
 * @since 2025-01-17
 */
@Service
public class TTenantServiceImpl extends ServiceImpl<TTenantMapper, TTenant> implements TTenantService {
 
    @Override
    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;
    }
 
}