package com.bofeng.service; import com.bofeng.dao.SysAreaMapper; import com.bofeng.entity.SysArea; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import java.util.List; @Service @Transactional(readOnly = true) public class SysAreaService { @Autowired private SysAreaMapper sysAreaMapper; public List selectProvince() { List lst = sysAreaMapper.selectProvince(); if (lst != null && lst.size() > 0) { return lst; } return null; } public List selectCityByProvince(Long areaId) { List lst = sysAreaMapper.selectCityByProvince(areaId); if (lst != null && lst.size() > 0) { return lst; } return null; } public List selectAreaByCity(Long areaId) { List lst = sysAreaMapper.selectAreaByCity(areaId); if (lst != null && lst.size() > 0) { return lst; } return null; } }