123456789101112131415161718192021222324252627282930313233343536373839404142 |
- 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<SysArea> selectProvince() {
- List<SysArea> lst = sysAreaMapper.selectProvince();
- if (lst != null && lst.size() > 0) {
- return lst;
- }
- return null;
- }
- public List<SysArea> selectCityByProvince(Long areaId) {
- List<SysArea> lst = sysAreaMapper.selectCityByProvince(areaId);
- if (lst != null && lst.size() > 0) {
- return lst;
- }
- return null;
- }
- public List<SysArea> selectAreaByCity(Long areaId) {
- List<SysArea> lst = sysAreaMapper.selectAreaByCity(areaId);
- if (lst != null && lst.size() > 0) {
- return lst;
- }
- return null;
- }
- }
|