|  |  |  | 
|---|
|  |  |  | package com.dy.pipIrrBase.district; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import com.dy.pipIrrBase.district.qo.DistrictQO; | 
|---|
|  |  |  | import com.dy.pipIrrGlobal.daoBa.AreaCode2023Mapper; | 
|---|
|  |  |  | import com.dy.pipIrrGlobal.daoBa.BaDistrictMapper; | 
|---|
|  |  |  | import com.dy.pipIrrGlobal.pojoBa.BaDistrict; | 
|---|
|  |  |  | import com.dy.pipIrrGlobal.util.DistrictLevel; | 
|---|
|  |  |  | import com.dy.pipIrrGlobal.voBa.VoDistrict; | 
|---|
|  |  |  | import lombok.extern.slf4j.Slf4j; | 
|---|
|  |  |  | import org.springframework.beans.factory.annotation.Autowired; | 
|---|
|  |  |  | import org.springframework.stereotype.Service; | 
|---|
|  |  |  | 
|---|
|  |  |  | public class DistrictSv { | 
|---|
|  |  |  |  | 
|---|
|  |  |  | private BaDistrictMapper dao; | 
|---|
|  |  |  | private AreaCode2023Mapper areaCode2023Dao; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Autowired | 
|---|
|  |  |  | private void setDao(BaDistrictMapper dao){ | 
|---|
|  |  |  | this.dao = dao; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Autowired | 
|---|
|  |  |  | private void setDao(AreaCode2023Mapper areaCode2023Dao){ | 
|---|
|  |  |  | this.areaCode2023Dao = areaCode2023Dao; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @Transactional | 
|---|
|  |  |  | public int delete(Long id){ | 
|---|
|  |  |  | return this.dao.deleteLogicById(id) ; | 
|---|
|  |  |  | return this.dao.deleteByPrimaryKey(id) ; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | 
|---|
|  |  |  | public List<Map<String, Object>> getDistrictsBySupperId(Long supperId) { | 
|---|
|  |  |  | return dao.getDistrictsBySupperId(supperId); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 根据区划代码查询指定级别行政区划 | 
|---|
|  |  |  | * @param qo | 
|---|
|  |  |  | * @return | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | public List<VoDistrict> getDistrictS(DistrictQO qo) { | 
|---|
|  |  |  | return areaCode2023Dao.getDistrictS(qo.getAredCode(), qo.getLevel()); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|