| | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springblade.common.cache.SysCache; |
| | | import org.springblade.common.param.CommonParamSet; |
| | | import org.springblade.core.secure.utils.AuthUtil; |
| | | import org.springblade.modules.community.entity.CommunityEntity; |
| | | import org.springblade.modules.community.excel.CommunityExcel; |
| | |
| | | |
| | | @Override |
| | | public IPage<CommunityVO> selectCommunityPage(IPage<CommunityVO> page, CommunityVO community) { |
| | | List<String> regionChildCodesList = SysCache.getRegionChildCodesByDeptId(AuthUtil.getDeptId()); |
| | | Integer isAdministrator = AuthUtil.isAdministrator()==true?1:2; |
| | | return page.setRecords(baseMapper.selectCommunityPage(page, community,regionChildCodesList,isAdministrator)); |
| | | CommonParamSet commonParamSet = new CommonParamSet<>().invoke(CommunityVO.class, community); |
| | | return page.setRecords(baseMapper.selectCommunityPage(page, |
| | | community, |
| | | commonParamSet.getRegionChildCodesList(), |
| | | commonParamSet.getIsAdministrator())); |
| | | } |
| | | |
| | | /** |
| | |
| | | one.setGeom(communityExcel.getGeom()); |
| | | // 更新 |
| | | updateById(one); |
| | | }else { |
| | | // 新增 |
| | | CommunityEntity communityEntity = new CommunityEntity(); |
| | | communityEntity.setCode(communityExcel.getCommunityCode()); |
| | | communityEntity.setName(communityExcel.getCommunityName()); |
| | | communityEntity.setGeom(communityExcel.getGeom()); |
| | | save(communityEntity); |
| | | } |
| | | } |
| | | } |