zhongrj
2024-01-18 9c60ca4dbaa0d5eda53c68d15ac361f1d3b27837
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
package org.springblade.modules.partyOrganization.service.impl;
 
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springblade.common.cache.SysCache;
import org.springblade.core.mp.base.BaseServiceImpl;
import org.springblade.core.secure.utils.AuthUtil;
import org.springblade.modules.partyOrganization.entity.PartyOrganization;
import org.springblade.modules.partyOrganization.mapper.PartyOrganizationMapper;
import org.springblade.modules.partyOrganization.service.IPartyOrganizationService;
import org.springblade.modules.partyOrganization.vo.PartyOrganizationVO;
import org.springblade.modules.system.entity.Dept;
import org.springblade.modules.system.service.IDeptService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
 
import java.util.List;
 
@Service
public class PartyOrganizationServiceImpl extends BaseServiceImpl<PartyOrganizationMapper, PartyOrganization> implements IPartyOrganizationService {
 
 
    @Override
    public IPage<PartyOrganizationVO> getPage(IPage<PartyOrganizationVO> page, PartyOrganizationVO partyOrganizationVO) {
        List<String> regionChildCodesList = SysCache.getRegionChildCodesByDeptId(AuthUtil.getDeptId());
        Integer isAdministrator = AuthUtil.isAdministrator()==true?1:2;
        return page.setRecords(baseMapper.getPage(page,partyOrganizationVO,regionChildCodesList,isAdministrator));
    }
}