|
@@ -6,6 +6,7 @@ import cn.com.ty.lift.system.user.dao.mapper.AreaCodeMapper;
|
|
|
import cn.com.ty.lift.system.user.service.IAreaCodeService;
|
|
|
import cn.com.ty.lift.system.user.tree.TreeUtil;
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
import java.util.List;
|
|
@@ -17,9 +18,13 @@ import java.util.List;
|
|
|
*/
|
|
|
@Service
|
|
|
public class AreaCodeService extends ServiceImpl<AreaCodeMapper, AreaCode> implements IAreaCodeService {
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private AreaCodeMapper areaCodeMapper;
|
|
|
+
|
|
|
@Override
|
|
|
public List<AreaCode> areaTree() {
|
|
|
- List<AreaCode> allAreaCodeList = this.list();
|
|
|
+ List<AreaCode> allAreaCodeList = areaCodeMapper.getAll();
|
|
|
return TreeUtil.listToTree(allAreaCodeList, ApiConstants.AREA_PARENT_ATTR, ApiConstants.ROOT_AREA_PARENT_ID);
|
|
|
}
|
|
|
}
|