guoshilong
2024-01-06 a9715f58421815588d3e65f79365bc4d088ba885
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
package org.springblade.modules.partyOrganization.service.impl;
 
import com.baomidou.mybatisplus.core.metadata.IPage;
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;
 
@Service
public class PartyOrganizationServiceImpl extends BaseServiceImpl<PartyOrganizationMapper, PartyOrganization> implements IPartyOrganizationService {
 
    @Autowired
    private IDeptService deptService;
    @Override
    public IPage<PartyOrganizationVO> getPage(IPage<PartyOrganizationVO> page, PartyOrganizationVO partyOrganizationVO) {
 
        Dept dept = deptService.getById(AuthUtil.getDeptId());
        if (null!=dept){
            partyOrganizationVO.setAreaId(dept.getRegionCode());
        }
        return page.setRecords(baseMapper.getPage(page,partyOrganizationVO));
    }
}