From 4a1e7c9d58fab8a3786b7d97e829a70de325b3fa Mon Sep 17 00:00:00 2001
From: wuxw <928255095@qq.com>
Date: 星期六, 08 三月 2025 11:54:26 +0800
Subject: [PATCH] 加入地区

---
 service-common/src/main/java/com/java110/common/smo/impl/CityAreaV1InnerServiceSMOImpl.java |   87 ++++
 service-common/src/main/java/com/java110/common/cmd/area/DeleteCityAreaCmd.java             |   88 ++++
 service-common/src/main/java/com/java110/common/cmd/area/UpdateCityAreaCmd.java             |   73 ++++
 service-common/src/main/java/com/java110/common/dao/ICityAreaV1ServiceDao.java              |   72 ++++
 service-common/src/main/java/com/java110/common/cmd/area/SaveCityAreaCmd.java               |   79 ++++
 service-common/src/main/java/com/java110/common/dao/impl/CityAreaV1ServiceDaoImpl.java      |  108 ++++++
 java110-bean/src/main/java/com/java110/dto/area/AreaDto.java                                |   10 
 java110-bean/src/main/java/com/java110/dto/cityArea/CityAreaDto.java                        |  113 ++++++
 java110-db/src/main/resources/mapper/common/CityAreaV1ServiceDaoImplMapper.xml              |  129 +++++++
 java110-interface/src/main/java/com/java110/intf/common/ICityAreaV1InnerServiceSMO.java     |   68 +++
 java110-bean/src/main/java/com/java110/po/cityArea/CityAreaPo.java                          |   96 +++++
 service-common/src/main/java/com/java110/common/cmd/area/QueryAreaTreeCmd.java              |  123 ++++++
 java110-bean/src/main/java/com/java110/vo/api/area/ApiAreaDataVo.java                       |    6 
 java110-db/src/main/resources/mapper/common/AreaServiceDaoImplMapper.xml                    |    3 
 14 files changed, 1,049 insertions(+), 6 deletions(-)

diff --git a/java110-bean/src/main/java/com/java110/dto/area/AreaDto.java b/java110-bean/src/main/java/com/java110/dto/area/AreaDto.java
index d60ea94..9e0f5f8 100755
--- a/java110-bean/src/main/java/com/java110/dto/area/AreaDto.java
+++ b/java110-bean/src/main/java/com/java110/dto/area/AreaDto.java
@@ -15,7 +15,11 @@
  **/
 public class AreaDto extends PageDto implements Serializable {
 
-    private int id;
+    public static final String AREA_LEVEL_ONE = "101"; // 涓�绾�
+    public static final String AREA_LEVEL_TWO = "202"; // 浜岀骇
+    public static final String AREA_LEVEL_THREE = "303"; // 涓夌骇
+
+    private String id;
     private String areaCode;
     private String[] areaCodes;
     private String areaName;
@@ -31,11 +35,11 @@
     private String cityName;
 
 
-    public int getId() {
+    public String getId() {
         return id;
     }
 
-    public void setId(int id) {
+    public void setId(String id) {
         this.id = id;
     }
 
diff --git a/java110-bean/src/main/java/com/java110/dto/cityArea/CityAreaDto.java b/java110-bean/src/main/java/com/java110/dto/cityArea/CityAreaDto.java
new file mode 100644
index 0000000..2e1d783
--- /dev/null
+++ b/java110-bean/src/main/java/com/java110/dto/cityArea/CityAreaDto.java
@@ -0,0 +1,113 @@
+package com.java110.dto.cityArea;
+
+import com.java110.dto.PageDto;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * @ClassName FloorDto
+ * @Description 鍦板尯鏁版嵁灞傚皝瑁�
+ * @Author wuxw
+ * @Date 2019/4/24 8:52
+ * @Version 1.0
+ * add by wuxw 2019/4/24
+ **/
+public class CityAreaDto extends PageDto implements Serializable {
+
+    private String areaCode;
+    private String areaName;
+    private String areaLevel;
+    private String lon;
+    private String id;
+    private String parentAreaCode;
+    private String parentAreaName;
+    private String lat;
+
+
+    private Date createTime;
+
+    private String statusCd = "0";
+
+
+    public String getAreaCode() {
+        return areaCode;
+    }
+
+    public void setAreaCode(String areaCode) {
+        this.areaCode = areaCode;
+    }
+
+    public String getAreaName() {
+        return areaName;
+    }
+
+    public void setAreaName(String areaName) {
+        this.areaName = areaName;
+    }
+
+    public String getAreaLevel() {
+        return areaLevel;
+    }
+
+    public void setAreaLevel(String areaLevel) {
+        this.areaLevel = areaLevel;
+    }
+
+    public String getLon() {
+        return lon;
+    }
+
+    public void setLon(String lon) {
+        this.lon = lon;
+    }
+
+    public String getId() {
+        return id;
+    }
+
+    public void setId(String id) {
+        this.id = id;
+    }
+
+    public String getParentAreaCode() {
+        return parentAreaCode;
+    }
+
+    public void setParentAreaCode(String parentAreaCode) {
+        this.parentAreaCode = parentAreaCode;
+    }
+
+    public String getParentAreaName() {
+        return parentAreaName;
+    }
+
+    public void setParentAreaName(String parentAreaName) {
+        this.parentAreaName = parentAreaName;
+    }
+
+    public String getLat() {
+        return lat;
+    }
+
+    public void setLat(String lat) {
+        this.lat = lat;
+    }
+
+
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+
+    public String getStatusCd() {
+        return statusCd;
+    }
+
+    public void setStatusCd(String statusCd) {
+        this.statusCd = statusCd;
+    }
+}
diff --git a/java110-bean/src/main/java/com/java110/po/cityArea/CityAreaPo.java b/java110-bean/src/main/java/com/java110/po/cityArea/CityAreaPo.java
new file mode 100644
index 0000000..b51f66f
--- /dev/null
+++ b/java110-bean/src/main/java/com/java110/po/cityArea/CityAreaPo.java
@@ -0,0 +1,96 @@
+/*
+ * Copyright 2017-2020 鍚村鏂� and java110 team.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.java110.po.cityArea;
+
+import java.io.Serializable;
+
+/**
+ * 绫昏〃杩帮細 Po 鏁版嵁妯″瀷瀹炰綋瀵硅薄 鍩烘湰淇濇寔涓庢暟鎹簱妯″瀷涓�鐩� 鐢ㄤ簬 澧炲姞淇敼鍒犻櫎 绛夋椂鐨勬暟鎹浇浣�
+ * add by 鍚村鏂� at 2025-03-07 19:47:09 mail: 928255095@qq.com
+ * open source address: https://gitee.com/wuxw7/MicroCommunity
+ * 瀹樼綉锛歨ttp://www.homecommunity.cn
+ * 娓╅Θ鎻愮ず锛氬鏋滄偍瀵规鏂囦欢杩涜淇敼 璇蜂笉瑕佸垹闄ゅ師鏈変綔鑰呭強娉ㄩ噴淇℃伅锛岃琛ュ厖鎮ㄧ殑 淇敼鐨勫師鍥犱互鍙婅仈绯婚偖绠卞涓�
+ * // modify by 寮犱笁 at 2021-09-12 绗�10琛屽湪鏌愮鍦烘櫙涓嬪瓨鍦ㄦ煇绉峛ug 闇�瑕佷慨澶嶏紝娉ㄩ噴10鑷�20琛� 鍔犲叆 20琛岃嚦30琛�
+ */
+public class CityAreaPo implements Serializable {
+
+    private String areaCode;
+private String areaName;
+private String areaLevel;
+private String lon;
+private String statusCd = "0";
+private String id;
+private String parentAreaCode;
+private String parentAreaName;
+private String lat;
+public String getAreaCode() {
+        return areaCode;
+    }
+public void setAreaCode(String areaCode) {
+        this.areaCode = areaCode;
+    }
+public String getAreaName() {
+        return areaName;
+    }
+public void setAreaName(String areaName) {
+        this.areaName = areaName;
+    }
+public String getAreaLevel() {
+        return areaLevel;
+    }
+public void setAreaLevel(String areaLevel) {
+        this.areaLevel = areaLevel;
+    }
+public String getLon() {
+        return lon;
+    }
+public void setLon(String lon) {
+        this.lon = lon;
+    }
+public String getStatusCd() {
+        return statusCd;
+    }
+public void setStatusCd(String statusCd) {
+        this.statusCd = statusCd;
+    }
+public String getId() {
+        return id;
+    }
+public void setId(String id) {
+        this.id = id;
+    }
+public String getParentAreaCode() {
+        return parentAreaCode;
+    }
+public void setParentAreaCode(String parentAreaCode) {
+        this.parentAreaCode = parentAreaCode;
+    }
+public String getParentAreaName() {
+        return parentAreaName;
+    }
+public void setParentAreaName(String parentAreaName) {
+        this.parentAreaName = parentAreaName;
+    }
+public String getLat() {
+        return lat;
+    }
+public void setLat(String lat) {
+        this.lat = lat;
+    }
+
+
+
+}
diff --git a/java110-bean/src/main/java/com/java110/vo/api/area/ApiAreaDataVo.java b/java110-bean/src/main/java/com/java110/vo/api/area/ApiAreaDataVo.java
index dbc5c59..3738307 100755
--- a/java110-bean/src/main/java/com/java110/vo/api/area/ApiAreaDataVo.java
+++ b/java110-bean/src/main/java/com/java110/vo/api/area/ApiAreaDataVo.java
@@ -4,7 +4,7 @@
 
 public class ApiAreaDataVo implements Serializable {
 
-    private int id;
+    private String id;
     private String areaCode;
     private String areaName;
     private String areaLevel;
@@ -14,11 +14,11 @@
     private String lat;
 
 
-    public int getId() {
+    public String getId() {
         return id;
     }
 
-    public void setId(int id) {
+    public void setId(String id) {
         this.id = id;
     }
 
diff --git a/java110-db/src/main/resources/mapper/common/AreaServiceDaoImplMapper.xml b/java110-db/src/main/resources/mapper/common/AreaServiceDaoImplMapper.xml
index 7a05635..ed96253 100755
--- a/java110-db/src/main/resources/mapper/common/AreaServiceDaoImplMapper.xml
+++ b/java110-db/src/main/resources/mapper/common/AreaServiceDaoImplMapper.xml
@@ -17,6 +17,9 @@
         from city_area t
         where 1=1
         and t.status_cd = '0'
+        <if test="id != null and id !=''">
+            and t.id = #{id}
+        </if>
         <if test="areaCode != null and areaCode !=''">
             and t.area_code = #{areaCode}
         </if>
diff --git a/java110-db/src/main/resources/mapper/common/CityAreaV1ServiceDaoImplMapper.xml b/java110-db/src/main/resources/mapper/common/CityAreaV1ServiceDaoImplMapper.xml
new file mode 100644
index 0000000..caddc83
--- /dev/null
+++ b/java110-db/src/main/resources/mapper/common/CityAreaV1ServiceDaoImplMapper.xml
@@ -0,0 +1,129 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="cityAreaV1ServiceDaoImpl">
+
+
+    <!-- 淇濆瓨鍦板尯淇℃伅 add by wuxw 2018-07-03 -->
+    <insert id="saveCityAreaInfo" parameterType="Map">
+        insert into city_area(
+        area_code,area_name,area_level,lon,id,parent_area_code,parent_area_name,lat
+        ) values (
+        #{areaCode},#{areaName},#{areaLevel},#{lon},#{id},#{parentAreaCode},#{parentAreaName},#{lat}
+        )
+    </insert>
+
+
+    <!-- 鏌ヨ鍦板尯淇℃伅 add by wuxw 2018-07-03 -->
+    <select id="getCityAreaInfo" parameterType="Map" resultType="Map">
+        select t.area_code areaCode,t.area_name areaName,t.area_level areaLevel,t.lon,t.status_cd
+        statusCd,t.id,t.parent_area_code parentAreaCode,t.parent_area_name parentAreaName,t.lat,t.create_time createTime
+        from city_area t
+        where 1 =1
+        <if test="areaCode !=null and areaCode != ''">
+            and t.area_code= #{areaCode}
+        </if>
+        <if test="areaName !=null and areaName != ''">
+            and t.area_name= #{areaName}
+        </if>
+        <if test="areaLevel !=null and areaLevel != ''">
+            and t.area_level= #{areaLevel}
+        </if>
+        <if test="lon !=null and lon != ''">
+            and t.lon= #{lon}
+        </if>
+        <if test="statusCd !=null and statusCd != ''">
+            and t.status_cd= #{statusCd}
+        </if>
+        <if test="id !=null and id != ''">
+            and t.id= #{id}
+        </if>
+        <if test="parentAreaCode !=null and parentAreaCode != ''">
+            and t.parent_area_code= #{parentAreaCode}
+        </if>
+        <if test="parentAreaName !=null and parentAreaName != ''">
+            and t.parent_area_name= #{parentAreaName}
+        </if>
+        <if test="lat !=null and lat != ''">
+            and t.lat= #{lat}
+        </if>
+        order by t.create_time desc
+        <if test="page != -1 and page != null ">
+            limit #{page}, #{row}
+        </if>
+
+    </select>
+
+
+    <!-- 淇敼鍦板尯淇℃伅 add by wuxw 2018-07-03 -->
+    <update id="updateCityAreaInfo" parameterType="Map">
+        update city_area t set t.status_cd = #{statusCd}
+        <if test="newBId != null and newBId != ''">
+            ,t.b_id = #{newBId}
+        </if>
+        <if test="areaCode !=null and areaCode != ''">
+            , t.area_code= #{areaCode}
+        </if>
+        <if test="areaName !=null and areaName != ''">
+            , t.area_name= #{areaName}
+        </if>
+        <if test="areaLevel !=null and areaLevel != ''">
+            , t.area_level= #{areaLevel}
+        </if>
+        <if test="lon !=null and lon != ''">
+            , t.lon= #{lon}
+        </if>
+        <if test="parentAreaCode !=null and parentAreaCode != ''">
+            , t.parent_area_code= #{parentAreaCode}
+        </if>
+        <if test="parentAreaName !=null and parentAreaName != ''">
+            , t.parent_area_name= #{parentAreaName}
+        </if>
+        <if test="lat !=null and lat != ''">
+            , t.lat= #{lat}
+        </if>
+        where 1=1
+        <if test="id !=null and id != ''">
+            and t.id= #{id}
+        </if>
+
+    </update>
+
+    <!-- 鏌ヨ鍦板尯鏁伴噺 add by wuxw 2018-07-03 -->
+    <select id="queryCityAreasCount" parameterType="Map" resultType="Map">
+        select count(1) count
+        from city_area t
+        where 1 =1
+        <if test="areaCode !=null and areaCode != ''">
+            and t.area_code= #{areaCode}
+        </if>
+        <if test="areaName !=null and areaName != ''">
+            and t.area_name= #{areaName}
+        </if>
+        <if test="areaLevel !=null and areaLevel != ''">
+            and t.area_level= #{areaLevel}
+        </if>
+        <if test="lon !=null and lon != ''">
+            and t.lon= #{lon}
+        </if>
+        <if test="statusCd !=null and statusCd != ''">
+            and t.status_cd= #{statusCd}
+        </if>
+        <if test="id !=null and id != ''">
+            and t.id= #{id}
+        </if>
+        <if test="parentAreaCode !=null and parentAreaCode != ''">
+            and t.parent_area_code= #{parentAreaCode}
+        </if>
+        <if test="parentAreaName !=null and parentAreaName != ''">
+            and t.parent_area_name= #{parentAreaName}
+        </if>
+        <if test="lat !=null and lat != ''">
+            and t.lat= #{lat}
+        </if>
+
+
+    </select>
+
+</mapper>
diff --git a/java110-interface/src/main/java/com/java110/intf/common/ICityAreaV1InnerServiceSMO.java b/java110-interface/src/main/java/com/java110/intf/common/ICityAreaV1InnerServiceSMO.java
new file mode 100644
index 0000000..09af2b8
--- /dev/null
+++ b/java110-interface/src/main/java/com/java110/intf/common/ICityAreaV1InnerServiceSMO.java
@@ -0,0 +1,68 @@
+/*
+ * Copyright 2017-2020 鍚村鏂� and java110 team.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.java110.intf.common;
+
+import com.java110.config.feign.FeignConfiguration;
+import com.java110.dto.cityArea.CityAreaDto;
+import com.java110.po.cityArea.CityAreaPo;
+import org.springframework.cloud.openfeign.FeignClient;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+
+import java.util.List;
+
+/**
+ * 绫昏〃杩帮細 鏈嶅姟涔嬪墠璋冪敤鐨勬帴鍙g被锛屼笉瀵瑰鎻愪緵鎺ュ彛鑳藉姏 鍙敤浜庢帴鍙e缓璋冪敤
+ * add by 鍚村鏂� at 2025-03-07 19:47:09 mail: 928255095@qq.com
+ * open source address: https://gitee.com/wuxw7/MicroCommunity
+ * 瀹樼綉锛歨ttp://www.homecommunity.cn
+ * 娓╅Θ鎻愮ず锛氬鏋滄偍瀵规鏂囦欢杩涜淇敼 璇蜂笉瑕佸垹闄ゅ師鏈変綔鑰呭強娉ㄩ噴淇℃伅锛岃琛ュ厖鎮ㄧ殑 淇敼鐨勫師鍥犱互鍙婅仈绯婚偖绠卞涓�
+ * // modify by 寮犱笁 at 2021-09-12 绗�10琛屽湪鏌愮鍦烘櫙涓嬪瓨鍦ㄦ煇绉峛ug 闇�瑕佷慨澶嶏紝娉ㄩ噴10鑷�20琛� 鍔犲叆 20琛岃嚦30琛�
+ */
+@FeignClient(name = "common-service", configuration = {FeignConfiguration.class})
+@RequestMapping("/cityAreaV1Api")
+public interface ICityAreaV1InnerServiceSMO {
+
+
+    @RequestMapping(value = "/saveCityArea", method = RequestMethod.POST)
+     int saveCityArea(@RequestBody CityAreaPo cityAreaPo);
+
+    @RequestMapping(value = "/updateCityArea", method = RequestMethod.POST)
+     int updateCityArea(@RequestBody  CityAreaPo cityAreaPo);
+
+    @RequestMapping(value = "/deleteCityArea", method = RequestMethod.POST)
+     int deleteCityArea(@RequestBody  CityAreaPo cityAreaPo);
+
+    /**
+     * <p>鏌ヨ灏忓尯妤间俊鎭�</p>
+     *
+     *
+     * @param cityAreaDto 鏁版嵁瀵硅薄鍒嗕韩
+     * @return CityAreaDto 瀵硅薄鏁版嵁
+     */
+    @RequestMapping(value = "/queryCityAreas", method = RequestMethod.POST)
+    List<CityAreaDto> queryCityAreas(@RequestBody CityAreaDto cityAreaDto);
+
+    /**
+     * 鏌ヨ<p>灏忓尯妤�</p>鎬昏褰曟暟
+     *
+     * @param cityAreaDto 鏁版嵁瀵硅薄鍒嗕韩
+     * @return 灏忓尯涓嬬殑灏忓尯妤艰褰曟暟
+     */
+    @RequestMapping(value = "/queryCityAreasCount", method = RequestMethod.POST)
+    int queryCityAreasCount(@RequestBody CityAreaDto cityAreaDto);
+}
diff --git a/service-common/src/main/java/com/java110/common/cmd/area/DeleteCityAreaCmd.java b/service-common/src/main/java/com/java110/common/cmd/area/DeleteCityAreaCmd.java
new file mode 100644
index 0000000..a61f0ef
--- /dev/null
+++ b/service-common/src/main/java/com/java110/common/cmd/area/DeleteCityAreaCmd.java
@@ -0,0 +1,88 @@
+/*
+ * Copyright 2017-2020 鍚村鏂� and java110 team.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.java110.common.cmd.area;
+
+import com.alibaba.fastjson.JSONObject;
+import com.java110.core.annotation.Java110Cmd;
+import com.java110.core.annotation.Java110Transactional;
+import com.java110.core.context.ICmdDataFlowContext;
+import com.java110.core.event.cmd.Cmd;
+import com.java110.core.event.cmd.CmdEvent;
+import com.java110.dto.area.AreaDto;
+import com.java110.dto.cityArea.CityAreaDto;
+import com.java110.intf.common.ICityAreaV1InnerServiceSMO;
+import com.java110.po.cityArea.CityAreaPo;
+import com.java110.utils.exception.CmdException;
+import com.java110.utils.util.Assert;
+import com.java110.utils.util.BeanConvertUtil;
+import com.java110.vo.ResultVo;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+
+import java.util.List;
+
+/**
+ * 绫昏〃杩帮細鍒犻櫎
+ * 鏈嶅姟缂栫爜锛歝ityArea.deleteCityArea
+ * 璇锋眰璺姴锛�/app/cityArea.DeleteCityArea
+ * add by 鍚村鏂� at 2025-03-07 19:47:09 mail: 928255095@qq.com
+ * open source address: https://gitee.com/wuxw7/MicroCommunity
+ * 瀹樼綉锛歨ttp://www.homecommunity.cn
+ * 娓╅Θ鎻愮ず锛氬鏋滄偍瀵规鏂囦欢杩涜淇敼 璇蜂笉瑕佸垹闄ゅ師鏈変綔鑰呭強娉ㄩ噴淇℃伅锛岃琛ュ厖鎮ㄧ殑 淇敼鐨勫師鍥犱互鍙婅仈绯婚偖绠卞涓�
+ * // modify by 寮犱笁 at 2021-09-12 绗�10琛屽湪鏌愮鍦烘櫙涓嬪瓨鍦ㄦ煇绉峛ug 闇�瑕佷慨澶嶏紝娉ㄩ噴10鑷�20琛� 鍔犲叆 20琛岃嚦30琛�
+ */
+@Java110Cmd(serviceCode = "area.deleteCityArea")
+public class DeleteCityAreaCmd extends Cmd {
+  private static Logger logger = LoggerFactory.getLogger(DeleteCityAreaCmd.class);
+
+    @Autowired
+    private ICityAreaV1InnerServiceSMO cityAreaV1InnerServiceSMOImpl;
+
+    @Override
+    public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) {
+        Assert.hasKeyAndValue(reqJson, "id", "id涓嶈兘涓虹┖");
+
+        CityAreaDto cityAreaDto = new CityAreaDto();
+        cityAreaDto.setId(reqJson.getString("id"));
+        List<CityAreaDto> cityAreaDtos = cityAreaV1InnerServiceSMOImpl.queryCityAreas(cityAreaDto);
+
+        Assert.listOnlyOne(cityAreaDtos,"鍦板尯涓嶅瓨鍦�");
+        if(AreaDto.AREA_LEVEL_THREE.equals(cityAreaDtos.get(0).getAreaLevel())){
+            return;
+        }
+        cityAreaDto = new CityAreaDto();
+        cityAreaDto.setParentAreaCode(cityAreaDtos.get(0).getAreaCode());
+        int count = cityAreaV1InnerServiceSMOImpl.queryCityAreasCount(cityAreaDto);
+        if(count> 1){
+            throw new CmdException("瀛樺湪瀛愯妭鐐癸紝鍏堝垹闄ゅ瓙鑺傜偣");
+        }
+    }
+
+    @Override
+    @Java110Transactional
+    public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
+
+       CityAreaPo cityAreaPo = BeanConvertUtil.covertBean(reqJson, CityAreaPo.class);
+        int flag = cityAreaV1InnerServiceSMOImpl.deleteCityArea(cityAreaPo);
+
+        if (flag < 1) {
+            throw new CmdException("鍒犻櫎鏁版嵁澶辫触");
+        }
+
+        cmdDataFlowContext.setResponseEntity(ResultVo.success());
+    }
+}
diff --git a/service-common/src/main/java/com/java110/common/cmd/area/QueryAreaTreeCmd.java b/service-common/src/main/java/com/java110/common/cmd/area/QueryAreaTreeCmd.java
new file mode 100644
index 0000000..b43b4d3
--- /dev/null
+++ b/service-common/src/main/java/com/java110/common/cmd/area/QueryAreaTreeCmd.java
@@ -0,0 +1,123 @@
+package com.java110.common.cmd.area;
+
+import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
+import com.java110.core.annotation.Java110Cmd;
+import com.java110.core.context.ICmdDataFlowContext;
+import com.java110.core.event.cmd.Cmd;
+import com.java110.core.event.cmd.CmdEvent;
+import com.java110.dto.area.AreaDto;
+import com.java110.intf.common.IAreaInnerServiceSMO;
+import com.java110.utils.exception.CmdException;
+import com.java110.utils.util.ListUtil;
+import com.java110.vo.ResultVo;
+import org.springframework.beans.factory.annotation.Autowired;
+
+import java.util.List;
+
+/**
+ * 鏌ヨ鍦板尯鏍戝舰缁撴瀯
+ */
+@Java110Cmd(serviceCode = "area.queryAreaTree")
+public class QueryAreaTreeCmd extends Cmd {
+
+    @Autowired
+    private IAreaInnerServiceSMO areaInnerServiceSMOImpl;
+
+    @Override
+    public void validate(CmdEvent event, ICmdDataFlowContext context, JSONObject reqJson) throws CmdException {
+
+    }
+
+    @Override
+    public void doCmd(CmdEvent event, ICmdDataFlowContext context, JSONObject reqJson) throws CmdException {
+
+        AreaDto areaDto = new AreaDto();
+        List<AreaDto> areaDtos = areaInnerServiceSMOImpl.getArea(areaDto);
+
+        JSONObject areaData = new JSONObject();
+        areaData.put("id", "0");
+        areaData.put("areaCode", "0");
+
+        areaData.put("text", "鍦板尯");
+        areaData.put("icon", "/img/org.png");
+        areaData.put("children", new JSONArray());
+        JSONArray areas = areaData.getJSONArray("children");
+        if (ListUtil.isNull(areaDtos)) {
+            context.setResponseEntity(ResultVo.createResponseEntity(areas));
+            return;
+        }
+
+        JSONObject areaInfo = null;
+        for (AreaDto tmpAreaDto : areaDtos) {
+            if (AreaDto.AREA_LEVEL_ONE.equals(tmpAreaDto.getAreaLevel())) {
+                areaInfo = new JSONObject();
+                areaInfo.put("id", tmpAreaDto.getId());
+                areaInfo.put("areaCode", tmpAreaDto.getAreaCode());
+                areaInfo.put("areaLevel", tmpAreaDto.getAreaLevel());
+                areaInfo.put("text", tmpAreaDto.getAreaName());
+                areaInfo.put("icon", "/img/org.png");
+                areaInfo.put("children", new JSONArray());
+                areas.add(areaInfo);
+            }
+        }
+
+        JSONObject area = null;
+        for (int cIndex = 0; cIndex < areas.size(); cIndex++) {
+            area = areas.getJSONObject(cIndex);
+            // find floor data in unitDtos
+            findTwoLevel(area, areaDtos);
+        }
+        context.setResponseEntity(ResultVo.createResponseEntity(areaData));
+
+    }
+
+    private void findTwoLevel(JSONObject area, List<AreaDto> areaDtos) {
+
+        JSONArray childrens = area.getJSONArray("children");
+        JSONObject childrenInfo = null;
+        for (AreaDto tmpAreaDto : areaDtos) {
+            if (!AreaDto.AREA_LEVEL_TWO.equals(tmpAreaDto.getAreaLevel())) {
+                continue;
+            }
+            if (area.getString("areaCode").equals(tmpAreaDto.getParentAreaCode())) {
+                childrenInfo = new JSONObject();
+                childrenInfo.put("id", tmpAreaDto.getId());
+                childrenInfo.put("areaCode", tmpAreaDto.getAreaCode());
+                childrenInfo.put("areaLevel", tmpAreaDto.getAreaLevel());
+                childrenInfo.put("text", tmpAreaDto.getAreaName());
+                childrenInfo.put("children", new JSONArray());
+                childrenInfo.put("icon", "/img/floor.png");
+                childrens.add(childrenInfo);
+            }
+        }
+
+
+        JSONObject floor = null;
+        for (int cIndex = 0; cIndex < childrens.size(); cIndex++) {
+            floor = childrens.getJSONObject(cIndex);
+            // find floor data in unitDtos
+            findThreeLevel(floor, areaDtos);
+        }
+    }
+
+    private void findThreeLevel(JSONObject twoArea, List<AreaDto> areaDtos) {
+        JSONArray childrens = twoArea.getJSONArray("children");
+        JSONObject childrenInfo = null;
+        for (AreaDto tmpAreaDto : areaDtos) {
+            if (!AreaDto.AREA_LEVEL_THREE.equals(tmpAreaDto.getAreaLevel())) {
+                continue;
+            }
+            if (twoArea.getString("areaCode").equals(tmpAreaDto.getParentAreaCode())) {
+                childrenInfo = new JSONObject();
+                childrenInfo.put("id", tmpAreaDto.getId());
+                childrenInfo.put("areaCode", tmpAreaDto.getAreaCode());
+                childrenInfo.put("areaLevel", tmpAreaDto.getAreaLevel());
+                childrenInfo.put("text", tmpAreaDto.getAreaName());
+                childrenInfo.put("children", new JSONArray());
+                childrenInfo.put("icon", "/img/unit.png");
+                childrens.add(childrenInfo);
+            }
+        }
+    }
+}
diff --git a/service-common/src/main/java/com/java110/common/cmd/area/SaveCityAreaCmd.java b/service-common/src/main/java/com/java110/common/cmd/area/SaveCityAreaCmd.java
new file mode 100644
index 0000000..d2057be
--- /dev/null
+++ b/service-common/src/main/java/com/java110/common/cmd/area/SaveCityAreaCmd.java
@@ -0,0 +1,79 @@
+/*
+ * Copyright 2017-2020 鍚村鏂� and java110 team.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.java110.common.cmd.area;
+
+import com.alibaba.fastjson.JSONObject;
+import com.java110.core.annotation.Java110Cmd;
+import com.java110.core.annotation.Java110Transactional;
+import com.java110.core.context.ICmdDataFlowContext;
+import com.java110.core.event.cmd.Cmd;
+import com.java110.core.event.cmd.CmdEvent;
+import com.java110.core.factory.GenerateCodeFactory;
+import com.java110.intf.common.ICityAreaV1InnerServiceSMO;
+import com.java110.po.cityArea.CityAreaPo;
+import com.java110.utils.exception.CmdException;
+import com.java110.utils.util.Assert;
+import com.java110.utils.util.BeanConvertUtil;
+import com.java110.vo.ResultVo;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+
+/**
+ * 绫昏〃杩帮細淇濆瓨
+ * 鏈嶅姟缂栫爜锛歝ityArea.saveCityArea
+ * 璇锋眰璺姴锛�/app/cityArea.SaveCityArea
+ * add by 鍚村鏂� at 2025-03-07 19:47:09 mail: 928255095@qq.com
+ * open source address: https://gitee.com/wuxw7/MicroCommunity
+ * 瀹樼綉锛歨ttp://www.homecommunity.cn
+ * 娓╅Θ鎻愮ず锛氬鏋滄偍瀵规鏂囦欢杩涜淇敼 璇蜂笉瑕佸垹闄ゅ師鏈変綔鑰呭強娉ㄩ噴淇℃伅锛岃琛ュ厖鎮ㄧ殑 淇敼鐨勫師鍥犱互鍙婅仈绯婚偖绠卞涓�
+ * // modify by 寮犱笁 at 2021-09-12 绗�10琛屽湪鏌愮鍦烘櫙涓嬪瓨鍦ㄦ煇绉峛ug 闇�瑕佷慨澶嶏紝娉ㄩ噴10鑷�20琛� 鍔犲叆 20琛岃嚦30琛�
+ */
+@Java110Cmd(serviceCode = "area.saveCityArea")
+public class SaveCityAreaCmd extends Cmd {
+
+    private static Logger logger = LoggerFactory.getLogger(SaveCityAreaCmd.class);
+
+    public static final String CODE_PREFIX_ID = "10";
+
+    @Autowired
+    private ICityAreaV1InnerServiceSMO cityAreaV1InnerServiceSMOImpl;
+
+    @Override
+    public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) {
+        Assert.hasKeyAndValue(reqJson, "areaCode", "璇锋眰鎶ユ枃涓湭鍖呭惈areaCode");
+        Assert.hasKeyAndValue(reqJson, "areaName", "璇锋眰鎶ユ枃涓湭鍖呭惈areaName");
+        Assert.hasKeyAndValue(reqJson, "areaLevel", "璇锋眰鎶ユ枃涓湭鍖呭惈areaLevel");
+        Assert.hasKeyAndValue(reqJson, "parentAreaCode", "璇锋眰鎶ユ枃涓湭鍖呭惈parentAreaCode");
+        Assert.hasKeyAndValue(reqJson, "parentAreaName", "璇锋眰鎶ユ枃涓湭鍖呭惈parentAreaName");
+
+    }
+
+    @Override
+    @Java110Transactional
+    public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
+
+        CityAreaPo cityAreaPo = BeanConvertUtil.covertBean(reqJson, CityAreaPo.class);
+        cityAreaPo.setId(GenerateCodeFactory.getGeneratorId(CODE_PREFIX_ID));
+        int flag = cityAreaV1InnerServiceSMOImpl.saveCityArea(cityAreaPo);
+
+        if (flag < 1) {
+            throw new CmdException("淇濆瓨鏁版嵁澶辫触");
+        }
+
+        cmdDataFlowContext.setResponseEntity(ResultVo.success());
+    }
+}
diff --git a/service-common/src/main/java/com/java110/common/cmd/area/UpdateCityAreaCmd.java b/service-common/src/main/java/com/java110/common/cmd/area/UpdateCityAreaCmd.java
new file mode 100644
index 0000000..8701cea
--- /dev/null
+++ b/service-common/src/main/java/com/java110/common/cmd/area/UpdateCityAreaCmd.java
@@ -0,0 +1,73 @@
+/*
+ * Copyright 2017-2020 鍚村鏂� and java110 team.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.java110.common.cmd.area;
+
+import com.alibaba.fastjson.JSONObject;
+import com.java110.core.annotation.Java110Cmd;
+import com.java110.core.annotation.Java110Transactional;
+import com.java110.core.context.ICmdDataFlowContext;
+import com.java110.core.event.cmd.Cmd;
+import com.java110.core.event.cmd.CmdEvent;
+import com.java110.intf.common.ICityAreaV1InnerServiceSMO;
+import com.java110.po.cityArea.CityAreaPo;
+import com.java110.utils.exception.CmdException;
+import com.java110.utils.util.Assert;
+import com.java110.utils.util.BeanConvertUtil;
+import com.java110.vo.ResultVo;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+
+
+/**
+ * 绫昏〃杩帮細鏇存柊
+ * 鏈嶅姟缂栫爜锛歝ityArea.updateCityArea
+ * 璇锋眰璺姴锛�/app/cityArea.UpdateCityArea
+ * add by 鍚村鏂� at 2025-03-07 19:47:09 mail: 928255095@qq.com
+ * open source address: https://gitee.com/wuxw7/MicroCommunity
+ * 瀹樼綉锛歨ttp://www.homecommunity.cn
+ * 娓╅Θ鎻愮ず锛氬鏋滄偍瀵规鏂囦欢杩涜淇敼 璇蜂笉瑕佸垹闄ゅ師鏈変綔鑰呭強娉ㄩ噴淇℃伅锛岃琛ュ厖鎮ㄧ殑 淇敼鐨勫師鍥犱互鍙婅仈绯婚偖绠卞涓�
+ * // modify by 寮犱笁 at 2021-09-12 绗�10琛屽湪鏌愮鍦烘櫙涓嬪瓨鍦ㄦ煇绉峛ug 闇�瑕佷慨澶嶏紝娉ㄩ噴10鑷�20琛� 鍔犲叆 20琛岃嚦30琛�
+ */
+@Java110Cmd(serviceCode = "area.updateCityArea")
+public class UpdateCityAreaCmd extends Cmd {
+
+    private static Logger logger = LoggerFactory.getLogger(UpdateCityAreaCmd.class);
+
+
+    @Autowired
+    private ICityAreaV1InnerServiceSMO cityAreaV1InnerServiceSMOImpl;
+
+    @Override
+    public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) {
+        Assert.hasKeyAndValue(reqJson, "id", "id涓嶈兘涓虹┖");
+
+    }
+
+    @Override
+    @Java110Transactional
+    public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
+
+        CityAreaPo cityAreaPo = BeanConvertUtil.covertBean(reqJson, CityAreaPo.class);
+        int flag = cityAreaV1InnerServiceSMOImpl.updateCityArea(cityAreaPo);
+
+        if (flag < 1) {
+            throw new CmdException("鏇存柊鏁版嵁澶辫触");
+        }
+
+        cmdDataFlowContext.setResponseEntity(ResultVo.success());
+    }
+}
diff --git a/service-common/src/main/java/com/java110/common/dao/ICityAreaV1ServiceDao.java b/service-common/src/main/java/com/java110/common/dao/ICityAreaV1ServiceDao.java
new file mode 100644
index 0000000..6254370
--- /dev/null
+++ b/service-common/src/main/java/com/java110/common/dao/ICityAreaV1ServiceDao.java
@@ -0,0 +1,72 @@
+/*
+ * Copyright 2017-2020 鍚村鏂� and java110 team.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.java110.common.dao;
+
+
+import com.java110.utils.exception.DAOException;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 绫昏〃杩帮細
+ * add by 鍚村鏂� at 2025-03-07 19:47:09 mail: 928255095@qq.com
+ * open source address: https://gitee.com/wuxw7/MicroCommunity
+ * 瀹樼綉锛歨ttp://www.homecommunity.cn
+ * 娓╅Θ鎻愮ず锛氬鏋滄偍瀵规鏂囦欢杩涜淇敼 璇蜂笉瑕佸垹闄ゅ師鏈変綔鑰呭強娉ㄩ噴淇℃伅锛岃琛ュ厖鎮ㄧ殑 淇敼鐨勫師鍥犱互鍙婅仈绯婚偖绠卞涓�
+ * // modify by 寮犱笁 at 2021-09-12 绗�10琛屽湪鏌愮鍦烘櫙涓嬪瓨鍦ㄦ煇绉峛ug 闇�瑕佷慨澶嶏紝娉ㄩ噴10鑷�20琛� 鍔犲叆 20琛岃嚦30琛�
+ */
+public interface ICityAreaV1ServiceDao {
+
+
+    /**
+     * 淇濆瓨 鍦板尯淇℃伅
+     * @param info
+     * @throws DAOException DAO寮傚父
+     */
+    int saveCityAreaInfo(Map info) throws DAOException;
+
+
+
+
+    /**
+     * 鏌ヨ鍦板尯淇℃伅锛坕nstance杩囩▼锛�
+     * 鏍规嵁bId 鏌ヨ鍦板尯淇℃伅
+     * @param info bId 淇℃伅
+     * @return 鍦板尯淇℃伅
+     * @throws DAOException DAO寮傚父
+     */
+    List<Map> getCityAreaInfo(Map info) throws DAOException;
+
+
+
+    /**
+     * 淇敼鍦板尯淇℃伅
+     * @param info 淇敼淇℃伅
+     * @throws DAOException DAO寮傚父
+     */
+    int updateCityAreaInfo(Map info) throws DAOException;
+
+
+    /**
+     * 鏌ヨ鍦板尯鎬绘暟
+     *
+     * @param info 鍦板尯淇℃伅
+     * @return 鍦板尯鏁伴噺
+     */
+    int queryCityAreasCount(Map info);
+
+}
diff --git a/service-common/src/main/java/com/java110/common/dao/impl/CityAreaV1ServiceDaoImpl.java b/service-common/src/main/java/com/java110/common/dao/impl/CityAreaV1ServiceDaoImpl.java
new file mode 100644
index 0000000..e1e1217
--- /dev/null
+++ b/service-common/src/main/java/com/java110/common/dao/impl/CityAreaV1ServiceDaoImpl.java
@@ -0,0 +1,108 @@
+/*
+ * Copyright 2017-2020 鍚村鏂� and java110 team.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.java110.common.dao.impl;
+
+import com.java110.common.dao.ICityAreaV1ServiceDao;
+import com.java110.core.base.dao.BaseServiceDao;
+import com.java110.utils.exception.DAOException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 绫昏〃杩帮細
+ * add by 鍚村鏂� at 2025-03-07 19:47:09 mail: 928255095@qq.com
+ * open source address: https://gitee.com/wuxw7/MicroCommunity
+ * 瀹樼綉锛歨ttp://www.homecommunity.cn
+ * 娓╅Θ鎻愮ず锛氬鏋滄偍瀵规鏂囦欢杩涜淇敼 璇蜂笉瑕佸垹闄ゅ師鏈変綔鑰呭強娉ㄩ噴淇℃伅锛岃琛ュ厖鎮ㄧ殑 淇敼鐨勫師鍥犱互鍙婅仈绯婚偖绠卞涓�
+ * // modify by 寮犱笁 at 2021-09-12 绗�10琛屽湪鏌愮鍦烘櫙涓嬪瓨鍦ㄦ煇绉峛ug 闇�瑕佷慨澶嶏紝娉ㄩ噴10鑷�20琛� 鍔犲叆 20琛岃嚦30琛�
+ */
+@Service("cityAreaV1ServiceDaoImpl")
+public class CityAreaV1ServiceDaoImpl extends BaseServiceDao implements ICityAreaV1ServiceDao {
+
+    private static Logger logger = LoggerFactory.getLogger(CityAreaV1ServiceDaoImpl.class);
+
+
+
+
+
+    /**
+     * 淇濆瓨鍦板尯淇℃伅 鍒� instance
+     * @param info   bId 淇℃伅
+     * @throws DAOException DAO寮傚父
+     */
+    @Override
+    public int saveCityAreaInfo(Map info) throws DAOException {
+        logger.debug("淇濆瓨 saveCityAreaInfo 鍏ュ弬 info : {}",info);
+
+        int saveFlag = sqlSessionTemplate.insert("cityAreaV1ServiceDaoImpl.saveCityAreaInfo",info);
+
+        return saveFlag;
+    }
+
+
+    /**
+     * 鏌ヨ鍦板尯淇℃伅锛坕nstance锛�
+     * @param info bId 淇℃伅
+     * @return List<Map>
+     * @throws DAOException DAO寮傚父
+     */
+    @Override
+    public List<Map> getCityAreaInfo(Map info) throws DAOException {
+        logger.debug("鏌ヨ getCityAreaInfo 鍏ュ弬 info : {}",info);
+
+        List<Map> infos = sqlSessionTemplate.selectList("cityAreaV1ServiceDaoImpl.getCityAreaInfo",info);
+
+        return infos;
+    }
+
+
+    /**
+     * 淇敼鍦板尯淇℃伅
+     * @param info 淇敼淇℃伅
+     * @throws DAOException DAO寮傚父
+     */
+    @Override
+    public int updateCityAreaInfo(Map info) throws DAOException {
+        logger.debug("淇敼 updateCityAreaInfo 鍏ュ弬 info : {}",info);
+
+        int saveFlag = sqlSessionTemplate.update("cityAreaV1ServiceDaoImpl.updateCityAreaInfo",info);
+
+        return saveFlag;
+    }
+
+     /**
+     * 鏌ヨ鍦板尯鏁伴噺
+     * @param info 鍦板尯淇℃伅
+     * @return 鍦板尯鏁伴噺
+     */
+    @Override
+    public int queryCityAreasCount(Map info) {
+        logger.debug("鏌ヨ queryCityAreasCount 鍏ュ弬 info : {}",info);
+
+        List<Map> infos = sqlSessionTemplate.selectList("cityAreaV1ServiceDaoImpl.queryCityAreasCount", info);
+        if (infos.size() < 1) {
+            return 0;
+        }
+
+        return Integer.parseInt(infos.get(0).get("count").toString());
+    }
+
+
+}
diff --git a/service-common/src/main/java/com/java110/common/smo/impl/CityAreaV1InnerServiceSMOImpl.java b/service-common/src/main/java/com/java110/common/smo/impl/CityAreaV1InnerServiceSMOImpl.java
new file mode 100644
index 0000000..47fce90
--- /dev/null
+++ b/service-common/src/main/java/com/java110/common/smo/impl/CityAreaV1InnerServiceSMOImpl.java
@@ -0,0 +1,87 @@
+/*
+ * Copyright 2017-2020 鍚村鏂� and java110 team.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.java110.common.smo.impl;
+
+
+import com.java110.common.dao.ICityAreaV1ServiceDao;
+import com.java110.core.base.smo.BaseServiceSMO;
+import com.java110.dto.PageDto;
+import com.java110.dto.cityArea.CityAreaDto;
+import com.java110.intf.common.ICityAreaV1InnerServiceSMO;
+import com.java110.po.cityArea.CityAreaPo;
+import com.java110.utils.util.BeanConvertUtil;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.List;
+
+/**
+ * 绫昏〃杩帮細 鏈嶅姟涔嬪墠璋冪敤鐨勬帴鍙e疄鐜扮被锛屼笉瀵瑰鎻愪緵鎺ュ彛鑳藉姏 鍙敤浜庢帴鍙e缓璋冪敤
+ * add by 鍚村鏂� at 2025-03-07 19:47:09 mail: 928255095@qq.com
+ * open source address: https://gitee.com/wuxw7/MicroCommunity
+ * 瀹樼綉锛歨ttp://www.homecommunity.cn
+ * 娓╅Θ鎻愮ず锛氬鏋滄偍瀵规鏂囦欢杩涜淇敼 璇蜂笉瑕佸垹闄ゅ師鏈変綔鑰呭強娉ㄩ噴淇℃伅锛岃琛ュ厖鎮ㄧ殑 淇敼鐨勫師鍥犱互鍙婅仈绯婚偖绠卞涓�
+ * // modify by 寮犱笁 at 2021-09-12 绗�10琛屽湪鏌愮鍦烘櫙涓嬪瓨鍦ㄦ煇绉峛ug 闇�瑕佷慨澶嶏紝娉ㄩ噴10鑷�20琛� 鍔犲叆 20琛岃嚦30琛�
+ */
+@RestController
+public class CityAreaV1InnerServiceSMOImpl extends BaseServiceSMO implements ICityAreaV1InnerServiceSMO {
+
+    @Autowired
+    private ICityAreaV1ServiceDao cityAreaV1ServiceDaoImpl;
+
+
+    @Override
+    public int saveCityArea(@RequestBody  CityAreaPo cityAreaPo) {
+        int saveFlag = cityAreaV1ServiceDaoImpl.saveCityAreaInfo(BeanConvertUtil.beanCovertMap(cityAreaPo));
+        return saveFlag;
+    }
+
+     @Override
+    public int updateCityArea(@RequestBody  CityAreaPo cityAreaPo) {
+        int saveFlag = cityAreaV1ServiceDaoImpl.updateCityAreaInfo(BeanConvertUtil.beanCovertMap(cityAreaPo));
+        return saveFlag;
+    }
+
+     @Override
+    public int deleteCityArea(@RequestBody  CityAreaPo cityAreaPo) {
+       cityAreaPo.setStatusCd("1");
+       int saveFlag = cityAreaV1ServiceDaoImpl.updateCityAreaInfo(BeanConvertUtil.beanCovertMap(cityAreaPo));
+       return saveFlag;
+    }
+
+    @Override
+    public List<CityAreaDto> queryCityAreas(@RequestBody  CityAreaDto cityAreaDto) {
+
+        //鏍¢獙鏄惁浼犱簡 鍒嗛〉淇℃伅
+
+        int page = cityAreaDto.getPage();
+
+        if (page != PageDto.DEFAULT_PAGE) {
+            cityAreaDto.setPage((page - 1) * cityAreaDto.getRow());
+        }
+
+        List<CityAreaDto> cityAreas = BeanConvertUtil.covertBeanList(cityAreaV1ServiceDaoImpl.getCityAreaInfo(BeanConvertUtil.beanCovertMap(cityAreaDto)), CityAreaDto.class);
+
+        return cityAreas;
+    }
+
+
+    @Override
+    public int queryCityAreasCount(@RequestBody CityAreaDto cityAreaDto) {
+        return cityAreaV1ServiceDaoImpl.queryCityAreasCount(BeanConvertUtil.beanCovertMap(cityAreaDto));    }
+
+}

--
Gitblit v1.8.0