1098226878 5 年 前
親
コミット
2d4163038d
共有30 個のファイルを変更した、2455 個の追加 と 55 個の削除を含む
  1. 9 0
      java110-bean/src/main/java/com/java110/po/owner/OwnerPo.java
  2. 9 0
      java110-bean/src/main/java/com/java110/po/unit/UnitPo.java
  3. 133 0
      java110-db/src/main/resources/mapper/community/OwnerRoomRelV1ServiceDaoImplMapper.xml
  4. 169 0
      java110-db/src/main/resources/mapper/community/OwnerV1ServiceDaoImplMapper.xml
  5. 133 0
      java110-db/src/main/resources/mapper/community/UnitV1ServiceDaoImplMapper.xml
  6. 23 55
      java110-generator/src/main/resources/newBack/template_1.json
  7. 68 0
      java110-interface/src/main/java/com/java110/intf/community/IOwnerRoomRelV1InnerServiceSMO.java
  8. 68 0
      java110-interface/src/main/java/com/java110/intf/community/IOwnerV1InnerServiceSMO.java
  9. 68 0
      java110-interface/src/main/java/com/java110/intf/community/IUnitV1InnerServiceSMO.java
  10. 71 0
      service-community/src/main/java/com/java110/community/cmd/owner/DeleteOwnerCmd.java
  11. 85 0
      service-community/src/main/java/com/java110/community/cmd/owner/ListOwnerCmd.java
  12. 85 0
      service-community/src/main/java/com/java110/community/cmd/owner/SaveOwnerCmd.java
  13. 75 0
      service-community/src/main/java/com/java110/community/cmd/owner/UpdateOwnerCmd.java
  14. 71 0
      service-community/src/main/java/com/java110/community/cmd/ownerRoomRel/DeleteOwnerRoomRelCmd.java
  15. 84 0
      service-community/src/main/java/com/java110/community/cmd/ownerRoomRel/ListOwnerRoomRelCmd.java
  16. 82 0
      service-community/src/main/java/com/java110/community/cmd/ownerRoomRel/SaveOwnerRoomRelCmd.java
  17. 75 0
      service-community/src/main/java/com/java110/community/cmd/ownerRoomRel/UpdateOwnerRoomRelCmd.java
  18. 71 0
      service-community/src/main/java/com/java110/community/cmd/unit/DeleteUnitCmd.java
  19. 85 0
      service-community/src/main/java/com/java110/community/cmd/unit/ListUnitCmd.java
  20. 82 0
      service-community/src/main/java/com/java110/community/cmd/unit/SaveUnitCmd.java
  21. 75 0
      service-community/src/main/java/com/java110/community/cmd/unit/UpdateUnitCmd.java
  22. 77 0
      service-community/src/main/java/com/java110/community/dao/IOwnerRoomRelV1ServiceDao.java
  23. 77 0
      service-community/src/main/java/com/java110/community/dao/IOwnerV1ServiceDao.java
  24. 77 0
      service-community/src/main/java/com/java110/community/dao/IUnitV1ServiceDao.java
  25. 112 0
      service-community/src/main/java/com/java110/community/dao/impl/OwnerRoomRelV1ServiceDaoImpl.java
  26. 112 0
      service-community/src/main/java/com/java110/community/dao/impl/OwnerV1ServiceDaoImpl.java
  27. 112 0
      service-community/src/main/java/com/java110/community/dao/impl/UnitV1ServiceDaoImpl.java
  28. 89 0
      service-community/src/main/java/com/java110/community/smo/impl/OwnerRoomRelV1InnerServiceSMOImpl.java
  29. 89 0
      service-community/src/main/java/com/java110/community/smo/impl/OwnerV1InnerServiceSMOImpl.java
  30. 89 0
      service-community/src/main/java/com/java110/community/smo/impl/UnitV1InnerServiceSMOImpl.java

+ 9 - 0
java110-bean/src/main/java/com/java110/po/owner/OwnerPo.java

@@ -24,6 +24,7 @@ public class OwnerPo implements Serializable {
     private String communityId;
     private String idCard;
     private String state;
+    private String statusCd;
 
     public String getMemberId() {
         return memberId;
@@ -120,4 +121,12 @@ public class OwnerPo implements Serializable {
     public void setState(String state) {
         this.state = state;
     }
+
+    public String getStatusCd() {
+        return statusCd;
+    }
+
+    public void setStatusCd(String statusCd) {
+        this.statusCd = statusCd;
+    }
 }

+ 9 - 0
java110-bean/src/main/java/com/java110/po/unit/UnitPo.java

@@ -20,6 +20,7 @@ public class UnitPo implements Serializable {
     private String userId;
     private String remark;
     private String unitArea;
+    private String statusCd;
 
     public String getUnitId() {
         return unitId;
@@ -84,4 +85,12 @@ public class UnitPo implements Serializable {
     public void setUnitArea(String unitArea) {
         this.unitArea = unitArea;
     }
+
+    public String getStatusCd() {
+        return statusCd;
+    }
+
+    public void setStatusCd(String statusCd) {
+        this.statusCd = statusCd;
+    }
 }

+ 133 - 0
java110-db/src/main/resources/mapper/community/OwnerRoomRelV1ServiceDaoImplMapper.xml

@@ -0,0 +1,133 @@
+<?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="ownerRoomRelV1ServiceDaoImpl">
+
+
+
+
+
+    <!-- 保存业主房屋关系表信息 add by wuxw 2018-07-03 -->
+    <insert id="saveOwnerRoomRelInfo" parameterType="Map">
+        insert into building_owner_room_rel(
+rel_id,remark,start_time,state,end_time,owner_id,user_id,room_id
+) values (
+#{relId},#{remark},#{startTime},#{state},#{endTime},#{ownerId},#{userId},#{roomId}
+)
+    </insert>
+
+
+
+    <!-- 查询业主房屋关系表信息 add by wuxw 2018-07-03 -->
+    <select id="getOwnerRoomRelInfo" parameterType="Map" resultType="Map">
+        select  t.rel_id,t.rel_id relId,t.remark,t.status_cd,t.status_cd statusCd,t.start_time,t.start_time startTime,t.state,t.end_time,t.end_time endTime,t.owner_id,t.owner_id ownerId,t.user_id,t.user_id userId,t.room_id,t.room_id roomId 
+from building_owner_room_rel t 
+where 1 =1 
+<if test="relId !=null and relId != ''">
+   and t.rel_id= #{relId}
+</if> 
+<if test="remark !=null and remark != ''">
+   and t.remark= #{remark}
+</if> 
+<if test="statusCd !=null and statusCd != ''">
+   and t.status_cd= #{statusCd}
+</if> 
+<if test="startTime !=null and startTime != ''">
+   and t.start_time= #{startTime}
+</if> 
+<if test="state !=null and state != ''">
+   and t.state= #{state}
+</if> 
+<if test="endTime !=null and endTime != ''">
+   and t.end_time= #{endTime}
+</if> 
+<if test="ownerId !=null and ownerId != ''">
+   and t.owner_id= #{ownerId}
+</if> 
+<if test="userId !=null and userId != ''">
+   and t.user_id= #{userId}
+</if> 
+<if test="roomId !=null and roomId != ''">
+   and t.room_id= #{roomId}
+</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="updateOwnerRoomRelInfo" parameterType="Map">
+        update  building_owner_room_rel t set t.status_cd = #{statusCd}
+<if test="newBId != null and newBId != ''">
+,t.b_id = #{newBId}
+</if> 
+<if test="remark !=null and remark != ''">
+, t.remark= #{remark}
+</if> 
+<if test="startTime !=null and startTime != ''">
+, t.start_time= #{startTime}
+</if> 
+<if test="state !=null and state != ''">
+, t.state= #{state}
+</if> 
+<if test="endTime !=null and endTime != ''">
+, t.end_time= #{endTime}
+</if> 
+<if test="ownerId !=null and ownerId != ''">
+, t.owner_id= #{ownerId}
+</if> 
+<if test="userId !=null and userId != ''">
+, t.user_id= #{userId}
+</if> 
+<if test="roomId !=null and roomId != ''">
+, t.room_id= #{roomId}
+</if> 
+ where 1=1 <if test="relId !=null and relId != ''">
+and t.rel_id= #{relId}
+</if> 
+
+    </update>
+
+    <!-- 查询业主房屋关系表数量 add by wuxw 2018-07-03 -->
+     <select id="queryOwnerRoomRelsCount" parameterType="Map" resultType="Map">
+        select  count(1) count 
+from building_owner_room_rel t 
+where 1 =1 
+<if test="relId !=null and relId != ''">
+   and t.rel_id= #{relId}
+</if> 
+<if test="remark !=null and remark != ''">
+   and t.remark= #{remark}
+</if> 
+<if test="statusCd !=null and statusCd != ''">
+   and t.status_cd= #{statusCd}
+</if> 
+<if test="startTime !=null and startTime != ''">
+   and t.start_time= #{startTime}
+</if> 
+<if test="state !=null and state != ''">
+   and t.state= #{state}
+</if> 
+<if test="endTime !=null and endTime != ''">
+   and t.end_time= #{endTime}
+</if> 
+<if test="ownerId !=null and ownerId != ''">
+   and t.owner_id= #{ownerId}
+</if> 
+<if test="userId !=null and userId != ''">
+   and t.user_id= #{userId}
+</if> 
+<if test="roomId !=null and roomId != ''">
+   and t.room_id= #{roomId}
+</if> 
+
+
+     </select>
+
+</mapper>

+ 169 - 0
java110-db/src/main/resources/mapper/community/OwnerV1ServiceDaoImplMapper.xml

@@ -0,0 +1,169 @@
+<?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="ownerV1ServiceDaoImpl">
+
+
+
+
+
+    <!-- 保存业主信息信息 add by wuxw 2018-07-03 -->
+    <insert id="saveOwnerInfo" parameterType="Map">
+        insert into building_owner(
+id_card,sex,link,owner_type_cd,remark,owner_id,user_id,name,state,community_id,age,member_id
+) values (
+#{idCard},#{sex},#{link},#{ownerTypeCd},#{remark},#{ownerId},#{userId},#{name},#{state},#{communityId},#{age},#{memberId}
+)
+    </insert>
+
+
+
+    <!-- 查询业主信息信息 add by wuxw 2018-07-03 -->
+    <select id="getOwnerInfo" parameterType="Map" resultType="Map">
+        select  t.id_card,t.id_card idCard,t.sex,t.link,t.owner_type_cd,t.owner_type_cd ownerTypeCd,t.remark,t.status_cd,t.status_cd statusCd,t.owner_id,t.owner_id ownerId,t.user_id,t.user_id userId,t.name,t.state,t.community_id,t.community_id communityId,t.age,t.member_id,t.member_id memberId 
+from building_owner t 
+where 1 =1 
+<if test="idCard !=null and idCard != ''">
+   and t.id_card= #{idCard}
+</if> 
+<if test="sex !=null and sex != ''">
+   and t.sex= #{sex}
+</if> 
+<if test="link !=null and link != ''">
+   and t.link= #{link}
+</if> 
+<if test="ownerTypeCd !=null and ownerTypeCd != ''">
+   and t.owner_type_cd= #{ownerTypeCd}
+</if> 
+<if test="remark !=null and remark != ''">
+   and t.remark= #{remark}
+</if> 
+<if test="statusCd !=null and statusCd != ''">
+   and t.status_cd= #{statusCd}
+</if> 
+<if test="ownerId !=null and ownerId != ''">
+   and t.owner_id= #{ownerId}
+</if> 
+<if test="userId !=null and userId != ''">
+   and t.user_id= #{userId}
+</if> 
+<if test="name !=null and name != ''">
+   and t.name= #{name}
+</if> 
+<if test="state !=null and state != ''">
+   and t.state= #{state}
+</if> 
+<if test="communityId !=null and communityId != ''">
+   and t.community_id= #{communityId}
+</if> 
+<if test="age !=null and age != ''">
+   and t.age= #{age}
+</if> 
+<if test="memberId !=null and memberId != ''">
+   and t.member_id= #{memberId}
+</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="updateOwnerInfo" parameterType="Map">
+        update  building_owner t set t.status_cd = #{statusCd}
+<if test="newBId != null and newBId != ''">
+,t.b_id = #{newBId}
+</if> 
+<if test="idCard !=null and idCard != ''">
+, t.id_card= #{idCard}
+</if> 
+<if test="sex !=null and sex != ''">
+, t.sex= #{sex}
+</if> 
+<if test="link !=null and link != ''">
+, t.link= #{link}
+</if> 
+<if test="ownerTypeCd !=null and ownerTypeCd != ''">
+, t.owner_type_cd= #{ownerTypeCd}
+</if> 
+<if test="remark !=null and remark != ''">
+, t.remark= #{remark}
+</if> 
+<if test="ownerId !=null and ownerId != ''">
+, t.owner_id= #{ownerId}
+</if> 
+<if test="userId !=null and userId != ''">
+, t.user_id= #{userId}
+</if> 
+<if test="name !=null and name != ''">
+, t.name= #{name}
+</if> 
+<if test="state !=null and state != ''">
+, t.state= #{state}
+</if> 
+<if test="communityId !=null and communityId != ''">
+, t.community_id= #{communityId}
+</if> 
+<if test="age !=null and age != ''">
+, t.age= #{age}
+</if> 
+ where 1=1 <if test="memberId !=null and memberId != ''">
+and t.member_id= #{memberId}
+</if> 
+
+    </update>
+
+    <!-- 查询业主信息数量 add by wuxw 2018-07-03 -->
+     <select id="queryOwnersCount" parameterType="Map" resultType="Map">
+        select  count(1) count 
+from building_owner t 
+where 1 =1 
+<if test="idCard !=null and idCard != ''">
+   and t.id_card= #{idCard}
+</if> 
+<if test="sex !=null and sex != ''">
+   and t.sex= #{sex}
+</if> 
+<if test="link !=null and link != ''">
+   and t.link= #{link}
+</if> 
+<if test="ownerTypeCd !=null and ownerTypeCd != ''">
+   and t.owner_type_cd= #{ownerTypeCd}
+</if> 
+<if test="remark !=null and remark != ''">
+   and t.remark= #{remark}
+</if> 
+<if test="statusCd !=null and statusCd != ''">
+   and t.status_cd= #{statusCd}
+</if> 
+<if test="ownerId !=null and ownerId != ''">
+   and t.owner_id= #{ownerId}
+</if> 
+<if test="userId !=null and userId != ''">
+   and t.user_id= #{userId}
+</if> 
+<if test="name !=null and name != ''">
+   and t.name= #{name}
+</if> 
+<if test="state !=null and state != ''">
+   and t.state= #{state}
+</if> 
+<if test="communityId !=null and communityId != ''">
+   and t.community_id= #{communityId}
+</if> 
+<if test="age !=null and age != ''">
+   and t.age= #{age}
+</if> 
+<if test="memberId !=null and memberId != ''">
+   and t.member_id= #{memberId}
+</if> 
+
+
+     </select>
+
+</mapper>

+ 133 - 0
java110-db/src/main/resources/mapper/community/UnitV1ServiceDaoImplMapper.xml

@@ -0,0 +1,133 @@
+<?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="unitV1ServiceDaoImpl">
+
+
+
+
+
+    <!-- 保存单元新信息 add by wuxw 2018-07-03 -->
+    <insert id="saveUnitInfo" parameterType="Map">
+        insert into building_unit(
+floor_id,layer_count,unit_area,unit_id,unit_num,lift,remark,user_id
+) values (
+#{floorId},#{layerCount},#{unitArea},#{unitId},#{unitNum},#{lift},#{remark},#{userId}
+)
+    </insert>
+
+
+
+    <!-- 查询单元新信息 add by wuxw 2018-07-03 -->
+    <select id="getUnitInfo" parameterType="Map" resultType="Map">
+        select  t.floor_id,t.floor_id floorId,t.layer_count,t.layer_count layerCount,t.unit_area,t.unit_area unitArea,t.unit_id,t.unit_id unitId,t.unit_num,t.unit_num unitNum,t.lift,t.remark,t.status_cd,t.status_cd statusCd,t.user_id,t.user_id userId 
+from building_unit t 
+where 1 =1 
+<if test="floorId !=null and floorId != ''">
+   and t.floor_id= #{floorId}
+</if> 
+<if test="layerCount !=null and layerCount != ''">
+   and t.layer_count= #{layerCount}
+</if> 
+<if test="unitArea !=null and unitArea != ''">
+   and t.unit_area= #{unitArea}
+</if> 
+<if test="unitId !=null and unitId != ''">
+   and t.unit_id= #{unitId}
+</if> 
+<if test="unitNum !=null and unitNum != ''">
+   and t.unit_num= #{unitNum}
+</if> 
+<if test="lift !=null and lift != ''">
+   and t.lift= #{lift}
+</if> 
+<if test="remark !=null and remark != ''">
+   and t.remark= #{remark}
+</if> 
+<if test="statusCd !=null and statusCd != ''">
+   and t.status_cd= #{statusCd}
+</if> 
+<if test="userId !=null and userId != ''">
+   and t.user_id= #{userId}
+</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="updateUnitInfo" parameterType="Map">
+        update  building_unit t set t.status_cd = #{statusCd}
+<if test="newBId != null and newBId != ''">
+,t.b_id = #{newBId}
+</if> 
+<if test="floorId !=null and floorId != ''">
+, t.floor_id= #{floorId}
+</if> 
+<if test="layerCount !=null and layerCount != ''">
+, t.layer_count= #{layerCount}
+</if> 
+<if test="unitArea !=null and unitArea != ''">
+, t.unit_area= #{unitArea}
+</if> 
+<if test="unitNum !=null and unitNum != ''">
+, t.unit_num= #{unitNum}
+</if> 
+<if test="lift !=null and lift != ''">
+, t.lift= #{lift}
+</if> 
+<if test="remark !=null and remark != ''">
+, t.remark= #{remark}
+</if> 
+<if test="userId !=null and userId != ''">
+, t.user_id= #{userId}
+</if> 
+ where 1=1 <if test="unitId !=null and unitId != ''">
+and t.unit_id= #{unitId}
+</if> 
+
+    </update>
+
+    <!-- 查询单元新数量 add by wuxw 2018-07-03 -->
+     <select id="queryUnitsCount" parameterType="Map" resultType="Map">
+        select  count(1) count 
+from building_unit t 
+where 1 =1 
+<if test="floorId !=null and floorId != ''">
+   and t.floor_id= #{floorId}
+</if> 
+<if test="layerCount !=null and layerCount != ''">
+   and t.layer_count= #{layerCount}
+</if> 
+<if test="unitArea !=null and unitArea != ''">
+   and t.unit_area= #{unitArea}
+</if> 
+<if test="unitId !=null and unitId != ''">
+   and t.unit_id= #{unitId}
+</if> 
+<if test="unitNum !=null and unitNum != ''">
+   and t.unit_num= #{unitNum}
+</if> 
+<if test="lift !=null and lift != ''">
+   and t.lift= #{lift}
+</if> 
+<if test="remark !=null and remark != ''">
+   and t.remark= #{remark}
+</if> 
+<if test="statusCd !=null and statusCd != ''">
+   and t.status_cd= #{statusCd}
+</if> 
+<if test="userId !=null and userId != ''">
+   and t.user_id= #{userId}
+</if> 
+
+
+     </select>
+
+</mapper>

+ 23 - 55
java110-generator/src/main/resources/newBack/template_1.json

@@ -1,87 +1,55 @@
 {
   "param": {
-    "section": "section",
+    "relId": "rel_id",
     "remark": "remark",
     "statusCd": "status_cd",
-    "roomSubType": "room_sub_type",
-    "roomArea": "room_area",
-    "userId": "user_id",
-    "roomId": "room_id",
-    "layer": "layer",
-    "feeCoefficient": "fee_coefficient",
-    "builtUpArea": "built_up_area",
-    "roomNum": "room_num",
-    "unitId": "unit_id",
+    "startTime": "start_time",
     "state": "state",
-    "communityId": "community_id",
-    "apartment": "apartment",
-    "roomType": "room_type",
-    "roomRent": "room_rent"
+    "endTime": "end_time",
+    "ownerId": "owner_id",
+    "userId": "user_id",
+    "roomId": "room_id"
   },
-  "name": "room",
+  "name": "ownerRoomRel",
   "shareColumn": "community_id",
-  "id": "roomId",
+  "id": "relId",
   "shareName": "community",
   "autoMove": true,
   "required": [
     {
-      "msg": "房屋ID不能为空",
-      "code": "roomId"
-    },
-    {
-      "msg": "房屋编号不能为空",
-      "code": "roomNum"
-    },
-    {
-      "msg": "单元ID不能为空",
-      "code": "unitId"
-    },
-    {
-      "msg": "层数不能为空",
-      "code": "layer"
+      "msg": "关系ID不能为空",
+      "code": "relId"
     },
     {
-      "msg": "户型不能为空",
-      "code": "apartment"
+      "msg": "业主ID不能为空",
+      "code": "ownerId"
     },
     {
-      "msg": "建筑面积不能为空",
-      "code": "builtUpArea"
+      "msg": "房间ID不能为空",
+      "code": "roomId"
     },
     {
-      "msg": "算费系数不能为空",
-      "code": "feeCoefficient"
+      "msg": "业务状态不能为空",
+      "code": "state"
     },
     {
       "msg": "用户ID不能为空",
       "code": "userId"
     },
     {
-      "msg": "数据状态,详细参考c_status表,S 保存,0, 在用 1失效不能为空",
+      "msg": "数据状态不能为空",
       "code": "statusCd"
     },
     {
-      "msg": "房屋状态,如房屋出售等,请查看state 表不能为空",
-      "code": "state"
-    },
-    {
-      "msg": "房屋类型不能为空",
-      "code": "roomType"
-    },
-    {
-      "msg": "房屋类型 110 住宅房屋,119 办公室 120 宿舍不能为空",
-      "code": "roomSubType"
-    },
-    {
-      "msg": "室内面积不能为空",
-      "code": "roomArea"
+      "msg": "起租时间不能为空",
+      "code": "startTime"
     },
     {
-      "msg": "租金不能为空",
-      "code": "roomRent"
+      "msg": "起租时间不能为空",
+      "code": "endTime"
     }
   ],
-  "desc": "房屋",
+  "desc": "业主房屋关系表",
   "shareParam": "communityId",
-  "tableName": "building_room"
+  "tableName": "building_owner_room_rel"
 }

+ 68 - 0
java110-interface/src/main/java/com/java110/intf/community/IOwnerRoomRelV1InnerServiceSMO.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.community;
+
+import com.java110.config.feign.FeignConfiguration;
+import com.java110.dto.owner.OwnerRoomRelDto;
+import com.java110.po.owner.OwnerRoomRelPo;
+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;
+
+/**
+ * 类表述: 服务之前调用的接口类,不对外提供接口能力 只用于接口建调用
+ * add by 吴学文 at 2021-09-14 18:57:35 mail: 928255095@qq.com
+ * open source address: https://gitee.com/wuxw7/MicroCommunity
+ * 官网:http://www.homecommunity.cn
+ * 温馨提示:如果您对此文件进行修改 请不要删除原有作者及注释信息,请补充您的 修改的原因以及联系邮箱如下
+ * // modify by 张三 at 2021-09-12 第10行在某种场景下存在某种bug 需要修复,注释10至20行 加入 20行至30行
+ */
+@FeignClient(name = "community-service", configuration = {FeignConfiguration.class})
+@RequestMapping("/ownerRoomRelV1Api")
+public interface IOwnerRoomRelV1InnerServiceSMO {
+
+
+    @RequestMapping(value = "/saveOwnerRoomRel", method = RequestMethod.POST)
+    public int saveOwnerRoomRel(@RequestBody OwnerRoomRelPo ownerRoomRelPo);
+
+    @RequestMapping(value = "/updateOwnerRoomRel", method = RequestMethod.POST)
+    public int updateOwnerRoomRel(@RequestBody  OwnerRoomRelPo ownerRoomRelPo);
+
+    @RequestMapping(value = "/deleteOwnerRoomRel", method = RequestMethod.POST)
+    public int deleteOwnerRoomRel(@RequestBody  OwnerRoomRelPo ownerRoomRelPo);
+
+    /**
+     * <p>查询小区楼信息</p>
+     *
+     *
+     * @param ownerRoomRelDto 数据对象分享
+     * @return OwnerRoomRelDto 对象数据
+     */
+    @RequestMapping(value = "/queryOwnerRoomRels", method = RequestMethod.POST)
+    List<OwnerRoomRelDto> queryOwnerRoomRels(@RequestBody OwnerRoomRelDto ownerRoomRelDto);
+
+    /**
+     * 查询<p>小区楼</p>总记录数
+     *
+     * @param ownerRoomRelDto 数据对象分享
+     * @return 小区下的小区楼记录数
+     */
+    @RequestMapping(value = "/queryOwnerRoomRelsCount", method = RequestMethod.POST)
+    int queryOwnerRoomRelsCount(@RequestBody OwnerRoomRelDto ownerRoomRelDto);
+}

+ 68 - 0
java110-interface/src/main/java/com/java110/intf/community/IOwnerV1InnerServiceSMO.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.community;
+
+import com.java110.config.feign.FeignConfiguration;
+import com.java110.dto.owner.OwnerDto;
+import com.java110.po.owner.OwnerPo;
+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;
+
+/**
+ * 类表述: 服务之前调用的接口类,不对外提供接口能力 只用于接口建调用
+ * add by 吴学文 at 2021-09-14 18:56:16 mail: 928255095@qq.com
+ * open source address: https://gitee.com/wuxw7/MicroCommunity
+ * 官网:http://www.homecommunity.cn
+ * 温馨提示:如果您对此文件进行修改 请不要删除原有作者及注释信息,请补充您的 修改的原因以及联系邮箱如下
+ * // modify by 张三 at 2021-09-12 第10行在某种场景下存在某种bug 需要修复,注释10至20行 加入 20行至30行
+ */
+@FeignClient(name = "community-service", configuration = {FeignConfiguration.class})
+@RequestMapping("/ownerV1Api")
+public interface IOwnerV1InnerServiceSMO {
+
+
+    @RequestMapping(value = "/saveOwner", method = RequestMethod.POST)
+    public int saveOwner(@RequestBody  OwnerPo ownerPo);
+
+    @RequestMapping(value = "/updateOwner", method = RequestMethod.POST)
+    public int updateOwner(@RequestBody  OwnerPo ownerPo);
+
+    @RequestMapping(value = "/deleteOwner", method = RequestMethod.POST)
+    public int deleteOwner(@RequestBody  OwnerPo ownerPo);
+
+    /**
+     * <p>查询小区楼信息</p>
+     *
+     *
+     * @param ownerDto 数据对象分享
+     * @return OwnerDto 对象数据
+     */
+    @RequestMapping(value = "/queryOwners", method = RequestMethod.POST)
+    List<OwnerDto> queryOwners(@RequestBody OwnerDto ownerDto);
+
+    /**
+     * 查询<p>小区楼</p>总记录数
+     *
+     * @param ownerDto 数据对象分享
+     * @return 小区下的小区楼记录数
+     */
+    @RequestMapping(value = "/queryOwnersCount", method = RequestMethod.POST)
+    int queryOwnersCount(@RequestBody OwnerDto ownerDto);
+}

+ 68 - 0
java110-interface/src/main/java/com/java110/intf/community/IUnitV1InnerServiceSMO.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.community;
+
+import com.java110.config.feign.FeignConfiguration;
+import com.java110.dto.UnitDto;
+import com.java110.po.unit.UnitPo;
+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;
+
+/**
+ * 类表述: 服务之前调用的接口类,不对外提供接口能力 只用于接口建调用
+ * add by 吴学文 at 2021-09-14 18:42:46 mail: 928255095@qq.com
+ * open source address: https://gitee.com/wuxw7/MicroCommunity
+ * 官网:http://www.homecommunity.cn
+ * 温馨提示:如果您对此文件进行修改 请不要删除原有作者及注释信息,请补充您的 修改的原因以及联系邮箱如下
+ * // modify by 张三 at 2021-09-12 第10行在某种场景下存在某种bug 需要修复,注释10至20行 加入 20行至30行
+ */
+@FeignClient(name = "community-service", configuration = {FeignConfiguration.class})
+@RequestMapping("/unitV1Api")
+public interface IUnitV1InnerServiceSMO {
+
+
+    @RequestMapping(value = "/saveUnit", method = RequestMethod.POST)
+    public int saveUnit(@RequestBody  UnitPo unitPo);
+
+    @RequestMapping(value = "/updateUnit", method = RequestMethod.POST)
+    public int updateUnit(@RequestBody  UnitPo unitPo);
+
+    @RequestMapping(value = "/deleteUnit", method = RequestMethod.POST)
+    public int deleteUnit(@RequestBody  UnitPo unitPo);
+
+    /**
+     * <p>查询小区楼信息</p>
+     *
+     *
+     * @param unitDto 数据对象分享
+     * @return UnitDto 对象数据
+     */
+    @RequestMapping(value = "/queryUnits", method = RequestMethod.POST)
+    List<UnitDto> queryUnits(@RequestBody UnitDto unitDto);
+
+    /**
+     * 查询<p>小区楼</p>总记录数
+     *
+     * @param unitDto 数据对象分享
+     * @return 小区下的小区楼记录数
+     */
+    @RequestMapping(value = "/queryUnitsCount", method = RequestMethod.POST)
+    int queryUnitsCount(@RequestBody UnitDto unitDto);
+}

+ 71 - 0
service-community/src/main/java/com/java110/community/cmd/owner/DeleteOwnerCmd.java

@@ -0,0 +1,71 @@
+/*
+ * 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.community.cmd.owner;
+
+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.AbstractServiceCmdListener;
+import com.java110.core.event.cmd.CmdEvent;
+import com.java110.core.factory.GenerateCodeFactory;
+import com.java110.intf.community.IOwnerV1InnerServiceSMO;
+import com.java110.po.owner.OwnerPo;
+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.springframework.beans.factory.annotation.Autowired;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+/**
+ * 类表述:删除
+ * 服务编码:owner.deleteOwner
+ * 请求路劲:/app/owner.DeleteOwner
+ * add by 吴学文 at 2021-09-14 18:56:16 mail: 928255095@qq.com
+ * open source address: https://gitee.com/wuxw7/MicroCommunity
+ * 官网:http://www.homecommunity.cn
+ * 温馨提示:如果您对此文件进行修改 请不要删除原有作者及注释信息,请补充您的 修改的原因以及联系邮箱如下
+ * // modify by 张三 at 2021-09-12 第10行在某种场景下存在某种bug 需要修复,注释10至20行 加入 20行至30行
+ */
+@Java110Cmd(serviceCode = "owner.DeleteOwner")
+public class DeleteOwnerCmd extends AbstractServiceCmdListener {
+  private static Logger logger = LoggerFactory.getLogger(DeleteOwnerCmd.class);
+
+    @Autowired
+    private IOwnerV1InnerServiceSMO ownerV1InnerServiceSMOImpl;
+
+    @Override
+    public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) {
+        Assert.hasKeyAndValue(reqJson, "memberId", "memberId不能为空");
+Assert.hasKeyAndValue(reqJson, "communityId", "communityId不能为空");
+
+    }
+
+    @Override
+    @Java110Transactional
+    public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
+
+       OwnerPo ownerPo = BeanConvertUtil.covertBean(reqJson, OwnerPo.class);
+        int flag = ownerV1InnerServiceSMOImpl.deleteOwner(ownerPo);
+
+        if (flag < 1) {
+            throw new CmdException("删除数据失败");
+        }
+
+        cmdDataFlowContext.setResponseEntity(ResultVo.success());
+    }
+}

+ 85 - 0
service-community/src/main/java/com/java110/community/cmd/owner/ListOwnerCmd.java

@@ -0,0 +1,85 @@
+/*
+ * 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.community.cmd.owner;
+
+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.AbstractServiceCmdListener;
+import com.java110.core.event.cmd.CmdEvent;
+import com.java110.core.factory.GenerateCodeFactory;
+import com.java110.intf.community.IOwnerV1InnerServiceSMO;
+import com.java110.po.owner.OwnerPo;
+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.springframework.beans.factory.annotation.Autowired;
+import com.java110.dto.owner.OwnerDto;
+import java.util.List;
+import java.util.ArrayList;
+import org.springframework.http.ResponseEntity;
+import org.springframework.http.HttpStatus;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+
+/**
+ * 类表述:查询
+ * 服务编码:owner.listOwner
+ * 请求路劲:/app/owner.ListOwner
+ * add by 吴学文 at 2021-09-14 18:56:16 mail: 928255095@qq.com
+ * open source address: https://gitee.com/wuxw7/MicroCommunity
+ * 官网:http://www.homecommunity.cn
+ * 温馨提示:如果您对此文件进行修改 请不要删除原有作者及注释信息,请补充您的 修改的原因以及联系邮箱如下
+ * // modify by 张三 at 2021-09-12 第10行在某种场景下存在某种bug 需要修复,注释10至20行 加入 20行至30行
+ */
+@Java110Cmd(serviceCode = "owner.ListOwner")
+public class ListOwnerCmd extends AbstractServiceCmdListener {
+
+  private static Logger logger = LoggerFactory.getLogger(ListOwnerCmd.class);
+    @Autowired
+    private IOwnerV1InnerServiceSMO ownerV1InnerServiceSMOImpl;
+
+    @Override
+    public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) {
+        super.validatePageInfo(reqJson);
+    }
+
+    @Override
+    @Java110Transactional
+    public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
+
+           OwnerDto ownerDto = BeanConvertUtil.covertBean(reqJson, OwnerDto.class);
+
+           int count = ownerV1InnerServiceSMOImpl.queryOwnersCount(ownerDto);
+
+           List<OwnerDto> ownerDtos = null;
+
+           if (count > 0) {
+               ownerDtos = ownerV1InnerServiceSMOImpl.queryOwners(ownerDto);
+           } else {
+               ownerDtos = new ArrayList<>();
+           }
+
+           ResultVo resultVo = new ResultVo((int) Math.ceil((double) count / (double) reqJson.getInteger("row")), count, ownerDtos);
+
+           ResponseEntity<String> responseEntity = new ResponseEntity<String>(resultVo.toString(), HttpStatus.OK);
+
+           cmdDataFlowContext.setResponseEntity(responseEntity);
+    }
+}

+ 85 - 0
service-community/src/main/java/com/java110/community/cmd/owner/SaveOwnerCmd.java

@@ -0,0 +1,85 @@
+/*
+ * 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.community.cmd.owner;
+
+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.AbstractServiceCmdListener;
+import com.java110.core.event.cmd.CmdEvent;
+import com.java110.core.factory.GenerateCodeFactory;
+import com.java110.intf.community.IOwnerV1InnerServiceSMO;
+import com.java110.po.owner.OwnerPo;
+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.springframework.beans.factory.annotation.Autowired;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * 类表述:保存
+ * 服务编码:owner.saveOwner
+ * 请求路劲:/app/owner.SaveOwner
+ * add by 吴学文 at 2021-09-14 18:56:16 mail: 928255095@qq.com
+ * open source address: https://gitee.com/wuxw7/MicroCommunity
+ * 官网:http://www.homecommunity.cn
+ * 温馨提示:如果您对此文件进行修改 请不要删除原有作者及注释信息,请补充您的 修改的原因以及联系邮箱如下
+ * // modify by 张三 at 2021-09-12 第10行在某种场景下存在某种bug 需要修复,注释10至20行 加入 20行至30行
+ */
+@Java110Cmd(serviceCode = "owner.SaveOwner")
+public class SaveOwnerCmd extends AbstractServiceCmdListener {
+
+    private static Logger logger = LoggerFactory.getLogger(SaveOwnerCmd.class);
+
+    public static final String CODE_PREFIX_ID = "10";
+
+    @Autowired
+    private IOwnerV1InnerServiceSMO ownerV1InnerServiceSMOImpl;
+
+    @Override
+    public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) {
+        Assert.hasKeyAndValue(reqJson, "memberId", "请求报文中未包含memberId");
+Assert.hasKeyAndValue(reqJson, "ownerId", "请求报文中未包含ownerId");
+Assert.hasKeyAndValue(reqJson, "name", "请求报文中未包含name");
+Assert.hasKeyAndValue(reqJson, "sex", "请求报文中未包含sex");
+Assert.hasKeyAndValue(reqJson, "age", "请求报文中未包含age");
+Assert.hasKeyAndValue(reqJson, "link", "请求报文中未包含link");
+Assert.hasKeyAndValue(reqJson, "userId", "请求报文中未包含userId");
+Assert.hasKeyAndValue(reqJson, "statusCd", "请求报文中未包含statusCd");
+Assert.hasKeyAndValue(reqJson, "ownerTypeCd", "请求报文中未包含ownerTypeCd");
+Assert.hasKeyAndValue(reqJson, "idCard", "请求报文中未包含idCard");
+Assert.hasKeyAndValue(reqJson, "state", "请求报文中未包含state");
+
+    }
+
+    @Override
+    @Java110Transactional
+    public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
+
+       OwnerPo ownerPo = BeanConvertUtil.covertBean(reqJson, OwnerPo.class);
+        ownerPo.setMemberId(GenerateCodeFactory.getGeneratorId(CODE_PREFIX_ID));
+        int flag = ownerV1InnerServiceSMOImpl.saveOwner(ownerPo);
+
+        if (flag < 1) {
+            throw new CmdException("保存数据失败");
+        }
+
+        cmdDataFlowContext.setResponseEntity(ResultVo.success());
+    }
+}

+ 75 - 0
service-community/src/main/java/com/java110/community/cmd/owner/UpdateOwnerCmd.java

@@ -0,0 +1,75 @@
+/*
+ * 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.community.cmd.owner;
+
+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.AbstractServiceCmdListener;
+import com.java110.core.event.cmd.CmdEvent;
+import com.java110.core.factory.GenerateCodeFactory;
+import com.java110.intf.community.IOwnerV1InnerServiceSMO;
+import com.java110.po.owner.OwnerPo;
+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.springframework.beans.factory.annotation.Autowired;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+
+/**
+ * 类表述:更新
+ * 服务编码:owner.updateOwner
+ * 请求路劲:/app/owner.UpdateOwner
+ * add by 吴学文 at 2021-09-14 18:56:16 mail: 928255095@qq.com
+ * open source address: https://gitee.com/wuxw7/MicroCommunity
+ * 官网:http://www.homecommunity.cn
+ * 温馨提示:如果您对此文件进行修改 请不要删除原有作者及注释信息,请补充您的 修改的原因以及联系邮箱如下
+ * // modify by 张三 at 2021-09-12 第10行在某种场景下存在某种bug 需要修复,注释10至20行 加入 20行至30行
+ */
+@Java110Cmd(serviceCode = "owner.UpdateOwner")
+public class UpdateOwnerCmd extends AbstractServiceCmdListener {
+
+  private static Logger logger = LoggerFactory.getLogger(UpdateOwnerCmd.class);
+
+
+    @Autowired
+    private IOwnerV1InnerServiceSMO ownerV1InnerServiceSMOImpl;
+
+    @Override
+    public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) {
+        Assert.hasKeyAndValue(reqJson, "memberId", "memberId不能为空");
+Assert.hasKeyAndValue(reqJson, "communityId", "communityId不能为空");
+
+    }
+
+    @Override
+    @Java110Transactional
+    public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
+
+       OwnerPo ownerPo = BeanConvertUtil.covertBean(reqJson, OwnerPo.class);
+        int flag = ownerV1InnerServiceSMOImpl.updateOwner(ownerPo);
+
+        if (flag < 1) {
+            throw new CmdException("更新数据失败");
+        }
+
+        cmdDataFlowContext.setResponseEntity(ResultVo.success());
+    }
+}

+ 71 - 0
service-community/src/main/java/com/java110/community/cmd/ownerRoomRel/DeleteOwnerRoomRelCmd.java

@@ -0,0 +1,71 @@
+/*
+ * 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.community.cmd.ownerRoomRel;
+
+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.AbstractServiceCmdListener;
+import com.java110.core.event.cmd.CmdEvent;
+import com.java110.core.factory.GenerateCodeFactory;
+import com.java110.intf.community.IOwnerRoomRelV1InnerServiceSMO;
+import com.java110.po.owner.OwnerRoomRelPo;
+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.springframework.beans.factory.annotation.Autowired;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+/**
+ * 类表述:删除
+ * 服务编码:ownerRoomRel.deleteOwnerRoomRel
+ * 请求路劲:/app/ownerRoomRel.DeleteOwnerRoomRel
+ * add by 吴学文 at 2021-09-14 18:57:35 mail: 928255095@qq.com
+ * open source address: https://gitee.com/wuxw7/MicroCommunity
+ * 官网:http://www.homecommunity.cn
+ * 温馨提示:如果您对此文件进行修改 请不要删除原有作者及注释信息,请补充您的 修改的原因以及联系邮箱如下
+ * // modify by 张三 at 2021-09-12 第10行在某种场景下存在某种bug 需要修复,注释10至20行 加入 20行至30行
+ */
+@Java110Cmd(serviceCode = "ownerRoomRel.DeleteOwnerRoomRel")
+public class DeleteOwnerRoomRelCmd extends AbstractServiceCmdListener {
+  private static Logger logger = LoggerFactory.getLogger(DeleteOwnerRoomRelCmd.class);
+
+    @Autowired
+    private IOwnerRoomRelV1InnerServiceSMO ownerRoomRelV1InnerServiceSMOImpl;
+
+    @Override
+    public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) {
+        Assert.hasKeyAndValue(reqJson, "relId", "relId不能为空");
+Assert.hasKeyAndValue(reqJson, "communityId", "communityId不能为空");
+
+    }
+
+    @Override
+    @Java110Transactional
+    public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
+
+       OwnerRoomRelPo ownerRoomRelPo = BeanConvertUtil.covertBean(reqJson, OwnerRoomRelPo.class);
+        int flag = ownerRoomRelV1InnerServiceSMOImpl.deleteOwnerRoomRel(ownerRoomRelPo);
+
+        if (flag < 1) {
+            throw new CmdException("删除数据失败");
+        }
+
+        cmdDataFlowContext.setResponseEntity(ResultVo.success());
+    }
+}

+ 84 - 0
service-community/src/main/java/com/java110/community/cmd/ownerRoomRel/ListOwnerRoomRelCmd.java

@@ -0,0 +1,84 @@
+/*
+ * 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.community.cmd.ownerRoomRel;
+
+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.AbstractServiceCmdListener;
+import com.java110.core.event.cmd.CmdEvent;
+import com.java110.core.factory.GenerateCodeFactory;
+import com.java110.dto.owner.OwnerRoomRelDto;
+import com.java110.intf.community.IOwnerRoomRelV1InnerServiceSMO;
+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.springframework.beans.factory.annotation.Autowired;
+import java.util.List;
+import java.util.ArrayList;
+import org.springframework.http.ResponseEntity;
+import org.springframework.http.HttpStatus;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+
+/**
+ * 类表述:查询
+ * 服务编码:ownerRoomRel.listOwnerRoomRel
+ * 请求路劲:/app/ownerRoomRel.ListOwnerRoomRel
+ * add by 吴学文 at 2021-09-14 18:57:35 mail: 928255095@qq.com
+ * open source address: https://gitee.com/wuxw7/MicroCommunity
+ * 官网:http://www.homecommunity.cn
+ * 温馨提示:如果您对此文件进行修改 请不要删除原有作者及注释信息,请补充您的 修改的原因以及联系邮箱如下
+ * // modify by 张三 at 2021-09-12 第10行在某种场景下存在某种bug 需要修复,注释10至20行 加入 20行至30行
+ */
+@Java110Cmd(serviceCode = "ownerRoomRel.ListOwnerRoomRel")
+public class ListOwnerRoomRelCmd extends AbstractServiceCmdListener {
+
+  private static Logger logger = LoggerFactory.getLogger(ListOwnerRoomRelCmd.class);
+    @Autowired
+    private IOwnerRoomRelV1InnerServiceSMO ownerRoomRelV1InnerServiceSMOImpl;
+
+    @Override
+    public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) {
+        super.validatePageInfo(reqJson);
+    }
+
+    @Override
+    @Java110Transactional
+    public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
+
+           OwnerRoomRelDto ownerRoomRelDto = BeanConvertUtil.covertBean(reqJson, OwnerRoomRelDto.class);
+
+           int count = ownerRoomRelV1InnerServiceSMOImpl.queryOwnerRoomRelsCount(ownerRoomRelDto);
+
+           List<OwnerRoomRelDto> ownerRoomRelDtos = null;
+
+           if (count > 0) {
+               ownerRoomRelDtos = ownerRoomRelV1InnerServiceSMOImpl.queryOwnerRoomRels(ownerRoomRelDto);
+           } else {
+               ownerRoomRelDtos = new ArrayList<>();
+           }
+
+           ResultVo resultVo = new ResultVo((int) Math.ceil((double) count / (double) reqJson.getInteger("row")), count, ownerRoomRelDtos);
+
+           ResponseEntity<String> responseEntity = new ResponseEntity<String>(resultVo.toString(), HttpStatus.OK);
+
+           cmdDataFlowContext.setResponseEntity(responseEntity);
+    }
+}

+ 82 - 0
service-community/src/main/java/com/java110/community/cmd/ownerRoomRel/SaveOwnerRoomRelCmd.java

@@ -0,0 +1,82 @@
+/*
+ * 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.community.cmd.ownerRoomRel;
+
+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.AbstractServiceCmdListener;
+import com.java110.core.event.cmd.CmdEvent;
+import com.java110.core.factory.GenerateCodeFactory;
+import com.java110.intf.community.IOwnerRoomRelV1InnerServiceSMO;
+import com.java110.po.owner.OwnerRoomRelPo;
+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.springframework.beans.factory.annotation.Autowired;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * 类表述:保存
+ * 服务编码:ownerRoomRel.saveOwnerRoomRel
+ * 请求路劲:/app/ownerRoomRel.SaveOwnerRoomRel
+ * add by 吴学文 at 2021-09-14 18:57:35 mail: 928255095@qq.com
+ * open source address: https://gitee.com/wuxw7/MicroCommunity
+ * 官网:http://www.homecommunity.cn
+ * 温馨提示:如果您对此文件进行修改 请不要删除原有作者及注释信息,请补充您的 修改的原因以及联系邮箱如下
+ * // modify by 张三 at 2021-09-12 第10行在某种场景下存在某种bug 需要修复,注释10至20行 加入 20行至30行
+ */
+@Java110Cmd(serviceCode = "ownerRoomRel.SaveOwnerRoomRel")
+public class SaveOwnerRoomRelCmd extends AbstractServiceCmdListener {
+
+    private static Logger logger = LoggerFactory.getLogger(SaveOwnerRoomRelCmd.class);
+
+    public static final String CODE_PREFIX_ID = "10";
+
+    @Autowired
+    private IOwnerRoomRelV1InnerServiceSMO ownerRoomRelV1InnerServiceSMOImpl;
+
+    @Override
+    public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) {
+        Assert.hasKeyAndValue(reqJson, "relId", "请求报文中未包含relId");
+Assert.hasKeyAndValue(reqJson, "ownerId", "请求报文中未包含ownerId");
+Assert.hasKeyAndValue(reqJson, "roomId", "请求报文中未包含roomId");
+Assert.hasKeyAndValue(reqJson, "state", "请求报文中未包含state");
+Assert.hasKeyAndValue(reqJson, "userId", "请求报文中未包含userId");
+Assert.hasKeyAndValue(reqJson, "statusCd", "请求报文中未包含statusCd");
+Assert.hasKeyAndValue(reqJson, "startTime", "请求报文中未包含startTime");
+Assert.hasKeyAndValue(reqJson, "endTime", "请求报文中未包含endTime");
+
+    }
+
+    @Override
+    @Java110Transactional
+    public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
+
+       OwnerRoomRelPo ownerRoomRelPo = BeanConvertUtil.covertBean(reqJson, OwnerRoomRelPo.class);
+        ownerRoomRelPo.setRelId(GenerateCodeFactory.getGeneratorId(CODE_PREFIX_ID));
+        int flag = ownerRoomRelV1InnerServiceSMOImpl.saveOwnerRoomRel(ownerRoomRelPo);
+
+        if (flag < 1) {
+            throw new CmdException("保存数据失败");
+        }
+
+        cmdDataFlowContext.setResponseEntity(ResultVo.success());
+    }
+}

+ 75 - 0
service-community/src/main/java/com/java110/community/cmd/ownerRoomRel/UpdateOwnerRoomRelCmd.java

@@ -0,0 +1,75 @@
+/*
+ * 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.community.cmd.ownerRoomRel;
+
+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.AbstractServiceCmdListener;
+import com.java110.core.event.cmd.CmdEvent;
+import com.java110.core.factory.GenerateCodeFactory;
+import com.java110.intf.community.IOwnerRoomRelV1InnerServiceSMO;
+import com.java110.po.owner.OwnerRoomRelPo;
+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.springframework.beans.factory.annotation.Autowired;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+
+/**
+ * 类表述:更新
+ * 服务编码:ownerRoomRel.updateOwnerRoomRel
+ * 请求路劲:/app/ownerRoomRel.UpdateOwnerRoomRel
+ * add by 吴学文 at 2021-09-14 18:57:35 mail: 928255095@qq.com
+ * open source address: https://gitee.com/wuxw7/MicroCommunity
+ * 官网:http://www.homecommunity.cn
+ * 温馨提示:如果您对此文件进行修改 请不要删除原有作者及注释信息,请补充您的 修改的原因以及联系邮箱如下
+ * // modify by 张三 at 2021-09-12 第10行在某种场景下存在某种bug 需要修复,注释10至20行 加入 20行至30行
+ */
+@Java110Cmd(serviceCode = "ownerRoomRel.UpdateOwnerRoomRel")
+public class UpdateOwnerRoomRelCmd extends AbstractServiceCmdListener {
+
+  private static Logger logger = LoggerFactory.getLogger(UpdateOwnerRoomRelCmd.class);
+
+
+    @Autowired
+    private IOwnerRoomRelV1InnerServiceSMO ownerRoomRelV1InnerServiceSMOImpl;
+
+    @Override
+    public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) {
+        Assert.hasKeyAndValue(reqJson, "relId", "relId不能为空");
+Assert.hasKeyAndValue(reqJson, "communityId", "communityId不能为空");
+
+    }
+
+    @Override
+    @Java110Transactional
+    public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
+
+       OwnerRoomRelPo ownerRoomRelPo = BeanConvertUtil.covertBean(reqJson, OwnerRoomRelPo.class);
+        int flag = ownerRoomRelV1InnerServiceSMOImpl.updateOwnerRoomRel(ownerRoomRelPo);
+
+        if (flag < 1) {
+            throw new CmdException("更新数据失败");
+        }
+
+        cmdDataFlowContext.setResponseEntity(ResultVo.success());
+    }
+}

+ 71 - 0
service-community/src/main/java/com/java110/community/cmd/unit/DeleteUnitCmd.java

@@ -0,0 +1,71 @@
+/*
+ * 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.community.cmd.unit;
+
+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.AbstractServiceCmdListener;
+import com.java110.core.event.cmd.CmdEvent;
+import com.java110.core.factory.GenerateCodeFactory;
+import com.java110.intf.community.IUnitV1InnerServiceSMO;
+import com.java110.po.unit.UnitPo;
+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.springframework.beans.factory.annotation.Autowired;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+/**
+ * 类表述:删除
+ * 服务编码:unit.deleteUnit
+ * 请求路劲:/app/unit.DeleteUnit
+ * add by 吴学文 at 2021-09-14 18:42:46 mail: 928255095@qq.com
+ * open source address: https://gitee.com/wuxw7/MicroCommunity
+ * 官网:http://www.homecommunity.cn
+ * 温馨提示:如果您对此文件进行修改 请不要删除原有作者及注释信息,请补充您的 修改的原因以及联系邮箱如下
+ * // modify by 张三 at 2021-09-12 第10行在某种场景下存在某种bug 需要修复,注释10至20行 加入 20行至30行
+ */
+@Java110Cmd(serviceCode = "unit.DeleteUnit")
+public class DeleteUnitCmd extends AbstractServiceCmdListener {
+  private static Logger logger = LoggerFactory.getLogger(DeleteUnitCmd.class);
+
+    @Autowired
+    private IUnitV1InnerServiceSMO unitV1InnerServiceSMOImpl;
+
+    @Override
+    public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) {
+        Assert.hasKeyAndValue(reqJson, "unitId", "unitId不能为空");
+Assert.hasKeyAndValue(reqJson, "communityId", "communityId不能为空");
+
+    }
+
+    @Override
+    @Java110Transactional
+    public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
+
+       UnitPo unitPo = BeanConvertUtil.covertBean(reqJson, UnitPo.class);
+        int flag = unitV1InnerServiceSMOImpl.deleteUnit(unitPo);
+
+        if (flag < 1) {
+            throw new CmdException("删除数据失败");
+        }
+
+        cmdDataFlowContext.setResponseEntity(ResultVo.success());
+    }
+}

+ 85 - 0
service-community/src/main/java/com/java110/community/cmd/unit/ListUnitCmd.java

@@ -0,0 +1,85 @@
+/*
+ * 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.community.cmd.unit;
+
+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.AbstractServiceCmdListener;
+import com.java110.core.event.cmd.CmdEvent;
+import com.java110.core.factory.GenerateCodeFactory;
+import com.java110.dto.UnitDto;
+import com.java110.intf.community.IUnitV1InnerServiceSMO;
+import com.java110.po.unit.UnitPo;
+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.springframework.beans.factory.annotation.Autowired;
+import java.util.List;
+import java.util.ArrayList;
+import org.springframework.http.ResponseEntity;
+import org.springframework.http.HttpStatus;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+
+/**
+ * 类表述:查询
+ * 服务编码:unit.listUnit
+ * 请求路劲:/app/unit.ListUnit
+ * add by 吴学文 at 2021-09-14 18:42:46 mail: 928255095@qq.com
+ * open source address: https://gitee.com/wuxw7/MicroCommunity
+ * 官网:http://www.homecommunity.cn
+ * 温馨提示:如果您对此文件进行修改 请不要删除原有作者及注释信息,请补充您的 修改的原因以及联系邮箱如下
+ * // modify by 张三 at 2021-09-12 第10行在某种场景下存在某种bug 需要修复,注释10至20行 加入 20行至30行
+ */
+@Java110Cmd(serviceCode = "unit.ListUnit")
+public class ListUnitCmd extends AbstractServiceCmdListener {
+
+  private static Logger logger = LoggerFactory.getLogger(ListUnitCmd.class);
+    @Autowired
+    private IUnitV1InnerServiceSMO unitV1InnerServiceSMOImpl;
+
+    @Override
+    public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) {
+        super.validatePageInfo(reqJson);
+    }
+
+    @Override
+    @Java110Transactional
+    public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
+
+           UnitDto unitDto = BeanConvertUtil.covertBean(reqJson, UnitDto.class);
+
+           int count = unitV1InnerServiceSMOImpl.queryUnitsCount(unitDto);
+
+           List<UnitDto> unitDtos = null;
+
+           if (count > 0) {
+               unitDtos = unitV1InnerServiceSMOImpl.queryUnits(unitDto);
+           } else {
+               unitDtos = new ArrayList<>();
+           }
+
+           ResultVo resultVo = new ResultVo((int) Math.ceil((double) count / (double) reqJson.getInteger("row")), count, unitDtos);
+
+           ResponseEntity<String> responseEntity = new ResponseEntity<String>(resultVo.toString(), HttpStatus.OK);
+
+           cmdDataFlowContext.setResponseEntity(responseEntity);
+    }
+}

+ 82 - 0
service-community/src/main/java/com/java110/community/cmd/unit/SaveUnitCmd.java

@@ -0,0 +1,82 @@
+/*
+ * 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.community.cmd.unit;
+
+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.AbstractServiceCmdListener;
+import com.java110.core.event.cmd.CmdEvent;
+import com.java110.core.factory.GenerateCodeFactory;
+import com.java110.intf.community.IUnitV1InnerServiceSMO;
+import com.java110.po.unit.UnitPo;
+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.springframework.beans.factory.annotation.Autowired;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * 类表述:保存
+ * 服务编码:unit.saveUnit
+ * 请求路劲:/app/unit.SaveUnit
+ * add by 吴学文 at 2021-09-14 18:42:46 mail: 928255095@qq.com
+ * open source address: https://gitee.com/wuxw7/MicroCommunity
+ * 官网:http://www.homecommunity.cn
+ * 温馨提示:如果您对此文件进行修改 请不要删除原有作者及注释信息,请补充您的 修改的原因以及联系邮箱如下
+ * // modify by 张三 at 2021-09-12 第10行在某种场景下存在某种bug 需要修复,注释10至20行 加入 20行至30行
+ */
+@Java110Cmd(serviceCode = "unit.SaveUnit")
+public class SaveUnitCmd extends AbstractServiceCmdListener {
+
+    private static Logger logger = LoggerFactory.getLogger(SaveUnitCmd.class);
+
+    public static final String CODE_PREFIX_ID = "10";
+
+    @Autowired
+    private IUnitV1InnerServiceSMO unitV1InnerServiceSMOImpl;
+
+    @Override
+    public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) {
+        Assert.hasKeyAndValue(reqJson, "unitId", "请求报文中未包含unitId");
+        Assert.hasKeyAndValue(reqJson, "unitNum", "请求报文中未包含unitNum");
+        Assert.hasKeyAndValue(reqJson, "floorId", "请求报文中未包含floorId");
+        Assert.hasKeyAndValue(reqJson, "layerCount", "请求报文中未包含layerCount");
+        Assert.hasKeyAndValue(reqJson, "lift", "请求报文中未包含lift");
+        Assert.hasKeyAndValue(reqJson, "userId", "请求报文中未包含userId");
+        Assert.hasKeyAndValue(reqJson, "statusCd", "请求报文中未包含statusCd");
+        Assert.hasKeyAndValue(reqJson, "unitArea", "请求报文中未包含unitArea");
+
+    }
+
+    @Override
+    @Java110Transactional
+    public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
+
+        UnitPo unitPo = BeanConvertUtil.covertBean(reqJson, UnitPo.class);
+        unitPo.setUnitId(GenerateCodeFactory.getGeneratorId(CODE_PREFIX_ID));
+        int flag = unitV1InnerServiceSMOImpl.saveUnit(unitPo);
+
+        if (flag < 1) {
+            throw new CmdException("保存数据失败");
+        }
+
+        cmdDataFlowContext.setResponseEntity(ResultVo.success());
+    }
+}

+ 75 - 0
service-community/src/main/java/com/java110/community/cmd/unit/UpdateUnitCmd.java

@@ -0,0 +1,75 @@
+/*
+ * 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.community.cmd.unit;
+
+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.AbstractServiceCmdListener;
+import com.java110.core.event.cmd.CmdEvent;
+import com.java110.core.factory.GenerateCodeFactory;
+import com.java110.intf.community.IUnitV1InnerServiceSMO;
+import com.java110.po.unit.UnitPo;
+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.springframework.beans.factory.annotation.Autowired;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+
+/**
+ * 类表述:更新
+ * 服务编码:unit.updateUnit
+ * 请求路劲:/app/unit.UpdateUnit
+ * add by 吴学文 at 2021-09-14 18:42:46 mail: 928255095@qq.com
+ * open source address: https://gitee.com/wuxw7/MicroCommunity
+ * 官网:http://www.homecommunity.cn
+ * 温馨提示:如果您对此文件进行修改 请不要删除原有作者及注释信息,请补充您的 修改的原因以及联系邮箱如下
+ * // modify by 张三 at 2021-09-12 第10行在某种场景下存在某种bug 需要修复,注释10至20行 加入 20行至30行
+ */
+@Java110Cmd(serviceCode = "unit.UpdateUnit")
+public class UpdateUnitCmd extends AbstractServiceCmdListener {
+
+    private static Logger logger = LoggerFactory.getLogger(UpdateUnitCmd.class);
+
+
+    @Autowired
+    private IUnitV1InnerServiceSMO unitV1InnerServiceSMOImpl;
+
+    @Override
+    public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) {
+        Assert.hasKeyAndValue(reqJson, "unitId", "unitId不能为空");
+        Assert.hasKeyAndValue(reqJson, "communityId", "communityId不能为空");
+
+    }
+
+    @Override
+    @Java110Transactional
+    public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
+
+        UnitPo unitPo = BeanConvertUtil.covertBean(reqJson, UnitPo.class);
+        int flag = unitV1InnerServiceSMOImpl.updateUnit(unitPo);
+
+        if (flag < 1) {
+            throw new CmdException("更新数据失败");
+        }
+
+        cmdDataFlowContext.setResponseEntity(ResultVo.success());
+    }
+}

+ 77 - 0
service-community/src/main/java/com/java110/community/dao/IOwnerRoomRelV1ServiceDao.java

@@ -0,0 +1,77 @@
+/*
+ * 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.community.dao;
+
+
+import com.java110.utils.exception.DAOException;
+import com.java110.entity.merchant.BoMerchant;
+import com.java110.entity.merchant.BoMerchantAttr;
+import com.java110.entity.merchant.Merchant;
+import com.java110.entity.merchant.MerchantAttr;
+
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 类表述:
+ * add by 吴学文 at 2021-09-14 18:57:35 mail: 928255095@qq.com
+ * open source address: https://gitee.com/wuxw7/MicroCommunity
+ * 官网:http://www.homecommunity.cn
+ * 温馨提示:如果您对此文件进行修改 请不要删除原有作者及注释信息,请补充您的 修改的原因以及联系邮箱如下
+ * // modify by 张三 at 2021-09-12 第10行在某种场景下存在某种bug 需要修复,注释10至20行 加入 20行至30行
+ */
+public interface IOwnerRoomRelV1ServiceDao {
+
+
+    /**
+     * 保存 业主房屋关系表信息
+     * @param info
+     * @throws DAOException DAO异常
+     */
+    int saveOwnerRoomRelInfo(Map info) throws DAOException;
+
+
+
+
+    /**
+     * 查询业主房屋关系表信息(instance过程)
+     * 根据bId 查询业主房屋关系表信息
+     * @param info bId 信息
+     * @return 业主房屋关系表信息
+     * @throws DAOException DAO异常
+     */
+    List<Map> getOwnerRoomRelInfo(Map info) throws DAOException;
+
+
+
+    /**
+     * 修改业主房屋关系表信息
+     * @param info 修改信息
+     * @throws DAOException DAO异常
+     */
+    int updateOwnerRoomRelInfo(Map info) throws DAOException;
+
+
+    /**
+     * 查询业主房屋关系表总数
+     *
+     * @param info 业主房屋关系表信息
+     * @return 业主房屋关系表数量
+     */
+    int queryOwnerRoomRelsCount(Map info);
+
+}

+ 77 - 0
service-community/src/main/java/com/java110/community/dao/IOwnerV1ServiceDao.java

@@ -0,0 +1,77 @@
+/*
+ * 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.community.dao;
+
+
+import com.java110.utils.exception.DAOException;
+import com.java110.entity.merchant.BoMerchant;
+import com.java110.entity.merchant.BoMerchantAttr;
+import com.java110.entity.merchant.Merchant;
+import com.java110.entity.merchant.MerchantAttr;
+
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 类表述:
+ * add by 吴学文 at 2021-09-14 18:56:16 mail: 928255095@qq.com
+ * open source address: https://gitee.com/wuxw7/MicroCommunity
+ * 官网:http://www.homecommunity.cn
+ * 温馨提示:如果您对此文件进行修改 请不要删除原有作者及注释信息,请补充您的 修改的原因以及联系邮箱如下
+ * // modify by 张三 at 2021-09-12 第10行在某种场景下存在某种bug 需要修复,注释10至20行 加入 20行至30行
+ */
+public interface IOwnerV1ServiceDao {
+
+
+    /**
+     * 保存 业主信息信息
+     * @param info
+     * @throws DAOException DAO异常
+     */
+    int saveOwnerInfo(Map info) throws DAOException;
+
+
+
+
+    /**
+     * 查询业主信息信息(instance过程)
+     * 根据bId 查询业主信息信息
+     * @param info bId 信息
+     * @return 业主信息信息
+     * @throws DAOException DAO异常
+     */
+    List<Map> getOwnerInfo(Map info) throws DAOException;
+
+
+
+    /**
+     * 修改业主信息信息
+     * @param info 修改信息
+     * @throws DAOException DAO异常
+     */
+    int updateOwnerInfo(Map info) throws DAOException;
+
+
+    /**
+     * 查询业主信息总数
+     *
+     * @param info 业主信息信息
+     * @return 业主信息数量
+     */
+    int queryOwnersCount(Map info);
+
+}

+ 77 - 0
service-community/src/main/java/com/java110/community/dao/IUnitV1ServiceDao.java

@@ -0,0 +1,77 @@
+/*
+ * 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.community.dao;
+
+
+import com.java110.utils.exception.DAOException;
+import com.java110.entity.merchant.BoMerchant;
+import com.java110.entity.merchant.BoMerchantAttr;
+import com.java110.entity.merchant.Merchant;
+import com.java110.entity.merchant.MerchantAttr;
+
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 类表述:
+ * add by 吴学文 at 2021-09-14 18:42:46 mail: 928255095@qq.com
+ * open source address: https://gitee.com/wuxw7/MicroCommunity
+ * 官网:http://www.homecommunity.cn
+ * 温馨提示:如果您对此文件进行修改 请不要删除原有作者及注释信息,请补充您的 修改的原因以及联系邮箱如下
+ * // modify by 张三 at 2021-09-12 第10行在某种场景下存在某种bug 需要修复,注释10至20行 加入 20行至30行
+ */
+public interface IUnitV1ServiceDao {
+
+
+    /**
+     * 保存 单元新信息
+     * @param info
+     * @throws DAOException DAO异常
+     */
+    int saveUnitInfo(Map info) throws DAOException;
+
+
+
+
+    /**
+     * 查询单元新信息(instance过程)
+     * 根据bId 查询单元新信息
+     * @param info bId 信息
+     * @return 单元新信息
+     * @throws DAOException DAO异常
+     */
+    List<Map> getUnitInfo(Map info) throws DAOException;
+
+
+
+    /**
+     * 修改单元新信息
+     * @param info 修改信息
+     * @throws DAOException DAO异常
+     */
+    int updateUnitInfo(Map info) throws DAOException;
+
+
+    /**
+     * 查询单元新总数
+     *
+     * @param info 单元新信息
+     * @return 单元新数量
+     */
+    int queryUnitsCount(Map info);
+
+}

+ 112 - 0
service-community/src/main/java/com/java110/community/dao/impl/OwnerRoomRelV1ServiceDaoImpl.java

@@ -0,0 +1,112 @@
+/*
+ * 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.community.dao.impl;
+
+import com.alibaba.fastjson.JSONObject;
+import com.java110.utils.constant.ResponseConstant;
+import com.java110.utils.exception.DAOException;
+import com.java110.utils.util.DateUtil;
+import com.java110.core.base.dao.BaseServiceDao;
+import com.java110.community.dao.IOwnerRoomRelV1ServiceDao;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 类表述:
+ * add by 吴学文 at 2021-09-14 18:57:35 mail: 928255095@qq.com
+ * open source address: https://gitee.com/wuxw7/MicroCommunity
+ * 官网:http://www.homecommunity.cn
+ * 温馨提示:如果您对此文件进行修改 请不要删除原有作者及注释信息,请补充您的 修改的原因以及联系邮箱如下
+ * // modify by 张三 at 2021-09-12 第10行在某种场景下存在某种bug 需要修复,注释10至20行 加入 20行至30行
+ */
+@Service("ownerRoomRelV1ServiceDaoImpl")
+public class OwnerRoomRelV1ServiceDaoImpl extends BaseServiceDao implements IOwnerRoomRelV1ServiceDao {
+
+    private static Logger logger = LoggerFactory.getLogger(OwnerRoomRelV1ServiceDaoImpl.class);
+
+
+
+
+
+    /**
+     * 保存业主房屋关系表信息 到 instance
+     * @param info   bId 信息
+     * @throws DAOException DAO异常
+     */
+    @Override
+    public int saveOwnerRoomRelInfo(Map info) throws DAOException {
+        logger.debug("保存 saveOwnerRoomRelInfo 入参 info : {}",info);
+
+        int saveFlag = sqlSessionTemplate.insert("ownerRoomRelV1ServiceDaoImpl.saveOwnerRoomRelInfo",info);
+
+        return saveFlag;
+    }
+
+
+    /**
+     * 查询业主房屋关系表信息(instance)
+     * @param info bId 信息
+     * @return List<Map>
+     * @throws DAOException DAO异常
+     */
+    @Override
+    public List<Map> getOwnerRoomRelInfo(Map info) throws DAOException {
+        logger.debug("查询 getOwnerRoomRelInfo 入参 info : {}",info);
+
+        List<Map> businessOwnerRoomRelInfos = sqlSessionTemplate.selectList("ownerRoomRelV1ServiceDaoImpl.getOwnerRoomRelInfo",info);
+
+        return businessOwnerRoomRelInfos;
+    }
+
+
+    /**
+     * 修改业主房屋关系表信息
+     * @param info 修改信息
+     * @throws DAOException DAO异常
+     */
+    @Override
+    public int updateOwnerRoomRelInfo(Map info) throws DAOException {
+        logger.debug("修改 updateOwnerRoomRelInfo 入参 info : {}",info);
+
+        int saveFlag = sqlSessionTemplate.update("ownerRoomRelV1ServiceDaoImpl.updateOwnerRoomRelInfo",info);
+
+        return saveFlag;
+    }
+
+     /**
+     * 查询业主房屋关系表数量
+     * @param info 业主房屋关系表信息
+     * @return 业主房屋关系表数量
+     */
+    @Override
+    public int queryOwnerRoomRelsCount(Map info) {
+        logger.debug("查询 queryOwnerRoomRelsCount 入参 info : {}",info);
+
+        List<Map> businessOwnerRoomRelInfos = sqlSessionTemplate.selectList("ownerRoomRelV1ServiceDaoImpl.queryOwnerRoomRelsCount", info);
+        if (businessOwnerRoomRelInfos.size() < 1) {
+            return 0;
+        }
+
+        return Integer.parseInt(businessOwnerRoomRelInfos.get(0).get("count").toString());
+    }
+
+
+}

+ 112 - 0
service-community/src/main/java/com/java110/community/dao/impl/OwnerV1ServiceDaoImpl.java

@@ -0,0 +1,112 @@
+/*
+ * 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.community.dao.impl;
+
+import com.alibaba.fastjson.JSONObject;
+import com.java110.utils.constant.ResponseConstant;
+import com.java110.utils.exception.DAOException;
+import com.java110.utils.util.DateUtil;
+import com.java110.core.base.dao.BaseServiceDao;
+import com.java110.community.dao.IOwnerV1ServiceDao;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 类表述:
+ * add by 吴学文 at 2021-09-14 18:56:16 mail: 928255095@qq.com
+ * open source address: https://gitee.com/wuxw7/MicroCommunity
+ * 官网:http://www.homecommunity.cn
+ * 温馨提示:如果您对此文件进行修改 请不要删除原有作者及注释信息,请补充您的 修改的原因以及联系邮箱如下
+ * // modify by 张三 at 2021-09-12 第10行在某种场景下存在某种bug 需要修复,注释10至20行 加入 20行至30行
+ */
+@Service("ownerV1ServiceDaoImpl")
+public class OwnerV1ServiceDaoImpl extends BaseServiceDao implements IOwnerV1ServiceDao {
+
+    private static Logger logger = LoggerFactory.getLogger(OwnerV1ServiceDaoImpl.class);
+
+
+
+
+
+    /**
+     * 保存业主信息信息 到 instance
+     * @param info   bId 信息
+     * @throws DAOException DAO异常
+     */
+    @Override
+    public int saveOwnerInfo(Map info) throws DAOException {
+        logger.debug("保存 saveOwnerInfo 入参 info : {}",info);
+
+        int saveFlag = sqlSessionTemplate.insert("ownerV1ServiceDaoImpl.saveOwnerInfo",info);
+
+        return saveFlag;
+    }
+
+
+    /**
+     * 查询业主信息信息(instance)
+     * @param info bId 信息
+     * @return List<Map>
+     * @throws DAOException DAO异常
+     */
+    @Override
+    public List<Map> getOwnerInfo(Map info) throws DAOException {
+        logger.debug("查询 getOwnerInfo 入参 info : {}",info);
+
+        List<Map> businessOwnerInfos = sqlSessionTemplate.selectList("ownerV1ServiceDaoImpl.getOwnerInfo",info);
+
+        return businessOwnerInfos;
+    }
+
+
+    /**
+     * 修改业主信息信息
+     * @param info 修改信息
+     * @throws DAOException DAO异常
+     */
+    @Override
+    public int updateOwnerInfo(Map info) throws DAOException {
+        logger.debug("修改 updateOwnerInfo 入参 info : {}",info);
+
+        int saveFlag = sqlSessionTemplate.update("ownerV1ServiceDaoImpl.updateOwnerInfo",info);
+
+        return saveFlag;
+    }
+
+     /**
+     * 查询业主信息数量
+     * @param info 业主信息信息
+     * @return 业主信息数量
+     */
+    @Override
+    public int queryOwnersCount(Map info) {
+        logger.debug("查询 queryOwnersCount 入参 info : {}",info);
+
+        List<Map> businessOwnerInfos = sqlSessionTemplate.selectList("ownerV1ServiceDaoImpl.queryOwnersCount", info);
+        if (businessOwnerInfos.size() < 1) {
+            return 0;
+        }
+
+        return Integer.parseInt(businessOwnerInfos.get(0).get("count").toString());
+    }
+
+
+}

+ 112 - 0
service-community/src/main/java/com/java110/community/dao/impl/UnitV1ServiceDaoImpl.java

@@ -0,0 +1,112 @@
+/*
+ * 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.community.dao.impl;
+
+import com.alibaba.fastjson.JSONObject;
+import com.java110.utils.constant.ResponseConstant;
+import com.java110.utils.exception.DAOException;
+import com.java110.utils.util.DateUtil;
+import com.java110.core.base.dao.BaseServiceDao;
+import com.java110.community.dao.IUnitV1ServiceDao;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 类表述:
+ * add by 吴学文 at 2021-09-14 18:42:46 mail: 928255095@qq.com
+ * open source address: https://gitee.com/wuxw7/MicroCommunity
+ * 官网:http://www.homecommunity.cn
+ * 温馨提示:如果您对此文件进行修改 请不要删除原有作者及注释信息,请补充您的 修改的原因以及联系邮箱如下
+ * // modify by 张三 at 2021-09-12 第10行在某种场景下存在某种bug 需要修复,注释10至20行 加入 20行至30行
+ */
+@Service("unitV1ServiceDaoImpl")
+public class UnitV1ServiceDaoImpl extends BaseServiceDao implements IUnitV1ServiceDao {
+
+    private static Logger logger = LoggerFactory.getLogger(UnitV1ServiceDaoImpl.class);
+
+
+
+
+
+    /**
+     * 保存单元新信息 到 instance
+     * @param info   bId 信息
+     * @throws DAOException DAO异常
+     */
+    @Override
+    public int saveUnitInfo(Map info) throws DAOException {
+        logger.debug("保存 saveUnitInfo 入参 info : {}",info);
+
+        int saveFlag = sqlSessionTemplate.insert("unitV1ServiceDaoImpl.saveUnitInfo",info);
+
+        return saveFlag;
+    }
+
+
+    /**
+     * 查询单元新信息(instance)
+     * @param info bId 信息
+     * @return List<Map>
+     * @throws DAOException DAO异常
+     */
+    @Override
+    public List<Map> getUnitInfo(Map info) throws DAOException {
+        logger.debug("查询 getUnitInfo 入参 info : {}",info);
+
+        List<Map> businessUnitInfos = sqlSessionTemplate.selectList("unitV1ServiceDaoImpl.getUnitInfo",info);
+
+        return businessUnitInfos;
+    }
+
+
+    /**
+     * 修改单元新信息
+     * @param info 修改信息
+     * @throws DAOException DAO异常
+     */
+    @Override
+    public int updateUnitInfo(Map info) throws DAOException {
+        logger.debug("修改 updateUnitInfo 入参 info : {}",info);
+
+        int saveFlag = sqlSessionTemplate.update("unitV1ServiceDaoImpl.updateUnitInfo",info);
+
+        return saveFlag;
+    }
+
+     /**
+     * 查询单元新数量
+     * @param info 单元新信息
+     * @return 单元新数量
+     */
+    @Override
+    public int queryUnitsCount(Map info) {
+        logger.debug("查询 queryUnitsCount 入参 info : {}",info);
+
+        List<Map> businessUnitInfos = sqlSessionTemplate.selectList("unitV1ServiceDaoImpl.queryUnitsCount", info);
+        if (businessUnitInfos.size() < 1) {
+            return 0;
+        }
+
+        return Integer.parseInt(businessUnitInfos.get(0).get("count").toString());
+    }
+
+
+}

+ 89 - 0
service-community/src/main/java/com/java110/community/smo/impl/OwnerRoomRelV1InnerServiceSMOImpl.java

@@ -0,0 +1,89 @@
+/*
+ * 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.community.smo.impl;
+
+
+import com.java110.community.dao.IOwnerRoomRelV1ServiceDao;
+import com.java110.dto.owner.OwnerRoomRelDto;
+import com.java110.intf.community.IOwnerRoomRelV1InnerServiceSMO;
+import com.java110.po.owner.OwnerRoomRelPo;
+import com.java110.utils.util.BeanConvertUtil;
+import com.java110.core.base.smo.BaseServiceSMO;
+import com.java110.dto.user.UserDto;
+import com.java110.dto.PageDto;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * 类表述: 服务之前调用的接口实现类,不对外提供接口能力 只用于接口建调用
+ * add by 吴学文 at 2021-09-14 18:57:35 mail: 928255095@qq.com
+ * open source address: https://gitee.com/wuxw7/MicroCommunity
+ * 官网:http://www.homecommunity.cn
+ * 温馨提示:如果您对此文件进行修改 请不要删除原有作者及注释信息,请补充您的 修改的原因以及联系邮箱如下
+ * // modify by 张三 at 2021-09-12 第10行在某种场景下存在某种bug 需要修复,注释10至20行 加入 20行至30行
+ */
+@RestController
+public class OwnerRoomRelV1InnerServiceSMOImpl extends BaseServiceSMO implements IOwnerRoomRelV1InnerServiceSMO {
+
+    @Autowired
+    private IOwnerRoomRelV1ServiceDao ownerRoomRelV1ServiceDaoImpl;
+
+
+    @Override
+    public int saveOwnerRoomRel(@RequestBody OwnerRoomRelPo ownerRoomRelPo) {
+        int saveFlag = ownerRoomRelV1ServiceDaoImpl.saveOwnerRoomRelInfo(BeanConvertUtil.beanCovertMap(ownerRoomRelPo));
+        return saveFlag;
+    }
+
+     @Override
+    public int updateOwnerRoomRel(@RequestBody  OwnerRoomRelPo ownerRoomRelPo) {
+        int saveFlag = ownerRoomRelV1ServiceDaoImpl.updateOwnerRoomRelInfo(BeanConvertUtil.beanCovertMap(ownerRoomRelPo));
+        return saveFlag;
+    }
+
+     @Override
+    public int deleteOwnerRoomRel(@RequestBody  OwnerRoomRelPo ownerRoomRelPo) {
+       ownerRoomRelPo.setStatusCd("1");
+       int saveFlag = ownerRoomRelV1ServiceDaoImpl.updateOwnerRoomRelInfo(BeanConvertUtil.beanCovertMap(ownerRoomRelPo));
+       return saveFlag;
+    }
+
+    @Override
+    public List<OwnerRoomRelDto> queryOwnerRoomRels(@RequestBody  OwnerRoomRelDto ownerRoomRelDto) {
+
+        //校验是否传了 分页信息
+
+        int page = ownerRoomRelDto.getPage();
+
+        if (page != PageDto.DEFAULT_PAGE) {
+            ownerRoomRelDto.setPage((page - 1) * ownerRoomRelDto.getRow());
+        }
+
+        List<OwnerRoomRelDto> ownerRoomRels = BeanConvertUtil.covertBeanList(ownerRoomRelV1ServiceDaoImpl.getOwnerRoomRelInfo(BeanConvertUtil.beanCovertMap(ownerRoomRelDto)), OwnerRoomRelDto.class);
+
+        return ownerRoomRels;
+    }
+
+
+    @Override
+    public int queryOwnerRoomRelsCount(@RequestBody OwnerRoomRelDto ownerRoomRelDto) {
+        return ownerRoomRelV1ServiceDaoImpl.queryOwnerRoomRelsCount(BeanConvertUtil.beanCovertMap(ownerRoomRelDto));    }
+
+}

+ 89 - 0
service-community/src/main/java/com/java110/community/smo/impl/OwnerV1InnerServiceSMOImpl.java

@@ -0,0 +1,89 @@
+/*
+ * 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.community.smo.impl;
+
+
+import com.java110.community.dao.IOwnerV1ServiceDao;
+import com.java110.intf.community.IOwnerV1InnerServiceSMO;
+import com.java110.dto.owner.OwnerDto;
+import com.java110.po.owner.OwnerPo;
+import com.java110.utils.util.BeanConvertUtil;
+import com.java110.core.base.smo.BaseServiceSMO;
+import com.java110.dto.user.UserDto;
+import com.java110.dto.PageDto;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * 类表述: 服务之前调用的接口实现类,不对外提供接口能力 只用于接口建调用
+ * add by 吴学文 at 2021-09-14 18:56:16 mail: 928255095@qq.com
+ * open source address: https://gitee.com/wuxw7/MicroCommunity
+ * 官网:http://www.homecommunity.cn
+ * 温馨提示:如果您对此文件进行修改 请不要删除原有作者及注释信息,请补充您的 修改的原因以及联系邮箱如下
+ * // modify by 张三 at 2021-09-12 第10行在某种场景下存在某种bug 需要修复,注释10至20行 加入 20行至30行
+ */
+@RestController
+public class OwnerV1InnerServiceSMOImpl extends BaseServiceSMO implements IOwnerV1InnerServiceSMO {
+
+    @Autowired
+    private IOwnerV1ServiceDao ownerV1ServiceDaoImpl;
+
+
+    @Override
+    public int saveOwner(@RequestBody  OwnerPo ownerPo) {
+        int saveFlag = ownerV1ServiceDaoImpl.saveOwnerInfo(BeanConvertUtil.beanCovertMap(ownerPo));
+        return saveFlag;
+    }
+
+     @Override
+    public int updateOwner(@RequestBody  OwnerPo ownerPo) {
+        int saveFlag = ownerV1ServiceDaoImpl.updateOwnerInfo(BeanConvertUtil.beanCovertMap(ownerPo));
+        return saveFlag;
+    }
+
+     @Override
+    public int deleteOwner(@RequestBody  OwnerPo ownerPo) {
+       ownerPo.setStatusCd("1");
+       int saveFlag = ownerV1ServiceDaoImpl.updateOwnerInfo(BeanConvertUtil.beanCovertMap(ownerPo));
+       return saveFlag;
+    }
+
+    @Override
+    public List<OwnerDto> queryOwners(@RequestBody  OwnerDto ownerDto) {
+
+        //校验是否传了 分页信息
+
+        int page = ownerDto.getPage();
+
+        if (page != PageDto.DEFAULT_PAGE) {
+            ownerDto.setPage((page - 1) * ownerDto.getRow());
+        }
+
+        List<OwnerDto> owners = BeanConvertUtil.covertBeanList(ownerV1ServiceDaoImpl.getOwnerInfo(BeanConvertUtil.beanCovertMap(ownerDto)), OwnerDto.class);
+
+        return owners;
+    }
+
+
+    @Override
+    public int queryOwnersCount(@RequestBody OwnerDto ownerDto) {
+        return ownerV1ServiceDaoImpl.queryOwnersCount(BeanConvertUtil.beanCovertMap(ownerDto));    }
+
+}

+ 89 - 0
service-community/src/main/java/com/java110/community/smo/impl/UnitV1InnerServiceSMOImpl.java

@@ -0,0 +1,89 @@
+/*
+ * 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.community.smo.impl;
+
+
+import com.java110.community.dao.IUnitV1ServiceDao;
+import com.java110.dto.UnitDto;
+import com.java110.intf.community.IUnitV1InnerServiceSMO;
+import com.java110.po.unit.UnitPo;
+import com.java110.utils.util.BeanConvertUtil;
+import com.java110.core.base.smo.BaseServiceSMO;
+import com.java110.dto.user.UserDto;
+import com.java110.dto.PageDto;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * 类表述: 服务之前调用的接口实现类,不对外提供接口能力 只用于接口建调用
+ * add by 吴学文 at 2021-09-14 18:42:46 mail: 928255095@qq.com
+ * open source address: https://gitee.com/wuxw7/MicroCommunity
+ * 官网:http://www.homecommunity.cn
+ * 温馨提示:如果您对此文件进行修改 请不要删除原有作者及注释信息,请补充您的 修改的原因以及联系邮箱如下
+ * // modify by 张三 at 2021-09-12 第10行在某种场景下存在某种bug 需要修复,注释10至20行 加入 20行至30行
+ */
+@RestController
+public class UnitV1InnerServiceSMOImpl extends BaseServiceSMO implements IUnitV1InnerServiceSMO {
+
+    @Autowired
+    private IUnitV1ServiceDao unitV1ServiceDaoImpl;
+
+
+    @Override
+    public int saveUnit(@RequestBody  UnitPo unitPo) {
+        int saveFlag = unitV1ServiceDaoImpl.saveUnitInfo(BeanConvertUtil.beanCovertMap(unitPo));
+        return saveFlag;
+    }
+
+     @Override
+    public int updateUnit(@RequestBody  UnitPo unitPo) {
+        int saveFlag = unitV1ServiceDaoImpl.updateUnitInfo(BeanConvertUtil.beanCovertMap(unitPo));
+        return saveFlag;
+    }
+
+     @Override
+    public int deleteUnit(@RequestBody  UnitPo unitPo) {
+       unitPo.setStatusCd("1");
+       int saveFlag = unitV1ServiceDaoImpl.updateUnitInfo(BeanConvertUtil.beanCovertMap(unitPo));
+       return saveFlag;
+    }
+
+    @Override
+    public List<UnitDto> queryUnits(@RequestBody  UnitDto unitDto) {
+
+        //校验是否传了 分页信息
+
+        int page = unitDto.getPage();
+
+        if (page != PageDto.DEFAULT_PAGE) {
+            unitDto.setPage((page - 1) * unitDto.getRow());
+        }
+
+        List<UnitDto> units = BeanConvertUtil.covertBeanList(unitV1ServiceDaoImpl.getUnitInfo(BeanConvertUtil.beanCovertMap(unitDto)), UnitDto.class);
+
+        return units;
+    }
+
+
+    @Override
+    public int queryUnitsCount(@RequestBody UnitDto unitDto) {
+        return unitV1ServiceDaoImpl.queryUnitsCount(BeanConvertUtil.beanCovertMap(unitDto));    }
+
+}