1098226878 лет назад: 4
Родитель
Сommit
526446a3b6
22 измененных файлов с 1776 добавлено и 36 удалено
  1. 9 0
      java110-bean/src/main/java/com/java110/po/owner/OwnerAppUserPo.java
  2. 10 1
      java110-bean/src/main/java/com/java110/po/owner/OwnerPo.java
  3. 169 0
      java110-db/src/main/resources/mapper/user/BuildingOwnerV1ServiceDaoImplMapper.xml
  4. 196 0
      java110-db/src/main/resources/mapper/user/OwnerAppUserV1ServiceDaoImplMapper.xml
  5. 26 13
      java110-generator/src/main/java/com/java110/code/TableToJson.java
  6. 53 22
      java110-generator/src/main/resources/newBack/template_1.json
  7. 68 0
      java110-interface/src/main/java/com/java110/intf/user/IBuildingOwnerV1InnerServiceSMO.java
  8. 68 0
      java110-interface/src/main/java/com/java110/intf/user/IOwnerAppUserV1InnerServiceSMO.java
  9. 70 0
      service-user/src/main/java/com/java110/user/cmd/buildingOwner/DeleteBuildingOwnerCmd.java
  10. 83 0
      service-user/src/main/java/com/java110/user/cmd/buildingOwner/ListBuildingOwnerCmd.java
  11. 81 0
      service-user/src/main/java/com/java110/user/cmd/buildingOwner/SaveBuildingOwnerCmd.java
  12. 75 0
      service-user/src/main/java/com/java110/user/cmd/buildingOwner/UpdateBuildingOwnerCmd.java
  13. 70 0
      service-user/src/main/java/com/java110/user/cmd/ownerAppUser/DeleteOwnerAppUserCmd.java
  14. 83 0
      service-user/src/main/java/com/java110/user/cmd/ownerAppUser/ListOwnerAppUserCmd.java
  15. 84 0
      service-user/src/main/java/com/java110/user/cmd/ownerAppUser/SaveOwnerAppUserCmd.java
  16. 75 0
      service-user/src/main/java/com/java110/user/cmd/ownerAppUser/UpdateOwnerAppUserCmd.java
  17. 77 0
      service-user/src/main/java/com/java110/user/dao/IBuildingOwnerV1ServiceDao.java
  18. 77 0
      service-user/src/main/java/com/java110/user/dao/IOwnerAppUserV1ServiceDao.java
  19. 112 0
      service-user/src/main/java/com/java110/user/dao/impl/BuildingOwnerV1ServiceDaoImpl.java
  20. 112 0
      service-user/src/main/java/com/java110/user/dao/impl/OwnerAppUserV1ServiceDaoImpl.java
  21. 89 0
      service-user/src/main/java/com/java110/user/smo/impl/BuildingOwnerV1InnerServiceSMOImpl.java
  22. 89 0
      service-user/src/main/java/com/java110/user/smo/impl/OwnerAppUserV1InnerServiceSMOImpl.java

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

@@ -27,6 +27,7 @@ public class OwnerAppUserPo implements Serializable {
     private String userId;
     private String nickName;
     private String headImgUrl;
+    private String statusCd;
 
     public String getAppUserId() {
         return appUserId;
@@ -148,4 +149,12 @@ public class OwnerAppUserPo implements Serializable {
     public void setHeadImgUrl(String headImgUrl) {
         this.headImgUrl = headImgUrl;
     }
+
+    public String getStatusCd() {
+        return statusCd;
+    }
+
+    public void setStatusCd(String statusCd) {
+        this.statusCd = statusCd;
+    }
 }

+ 10 - 1
java110-bean/src/main/java/com/java110/po/owner/OwnerPo.java

@@ -24,7 +24,8 @@ public class OwnerPo implements Serializable {
     private String communityId;
     private String idCard;
     private String state;
-    private String statusCd;
+    private String statusCd="0";
+    private String bId;
 
     public String getMemberId() {
         return memberId;
@@ -129,4 +130,12 @@ public class OwnerPo implements Serializable {
     public void setStatusCd(String statusCd) {
         this.statusCd = statusCd;
     }
+
+    public String getbId() {
+        return bId;
+    }
+
+    public void setbId(String bId) {
+        this.bId = bId;
+    }
 }

+ 169 - 0
java110-db/src/main/resources/mapper/user/BuildingOwnerV1ServiceDaoImplMapper.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="buildingOwnerV1ServiceDaoImpl">
+
+
+
+
+
+    <!-- 保存业主信息信息 add by wuxw 2018-07-03 -->
+    <insert id="saveBuildingOwnerInfo" 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,b_id
+) values (
+#{idCard},#{sex},#{link},#{ownerTypeCd},#{remark},#{ownerId},#{userId},#{name},#{state},#{communityId},#{age},#{memberId},#{bId}
+)
+    </insert>
+
+
+
+    <!-- 查询业主信息信息 add by wuxw 2018-07-03 -->
+    <select id="getBuildingOwnerInfo" 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="updateBuildingOwnerInfo" 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="queryBuildingOwnersCount" 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>

+ 196 - 0
java110-db/src/main/resources/mapper/user/OwnerAppUserV1ServiceDaoImplMapper.xml

@@ -0,0 +1,196 @@
+<?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="ownerAppUserV1ServiceDaoImpl">
+
+
+
+
+
+    <!-- 保存业主用户小区关系信息 add by wuxw 2018-07-03 -->
+    <insert id="saveOwnerAppUserInfo" parameterType="Map">
+        insert into owner_app_user(
+id_card,open_id,link,remark,user_id,app_type,app_user_name,nickname,headimgurl,community_name,state,app_user_id,community_id,app_type_cd,member_id,b_id
+) values (
+#{idCard},#{openId},#{link},#{remark},#{userId},#{appType},#{appUserName},#{nickname},#{headimgurl},#{communityName},#{state},#{appUserId},#{communityId},#{appTypeCd},#{memberId},#{bId}
+)
+    </insert>
+
+
+
+    <!-- 查询业主用户小区关系信息 add by wuxw 2018-07-03 -->
+    <select id="getOwnerAppUserInfo" parameterType="Map" resultType="Map">
+        select  t.id_card,t.id_card idCard,t.open_id,t.open_id openId,t.link,t.remark,t.status_cd,t.status_cd statusCd,t.user_id,t.user_id userId,t.app_type,t.app_type appType,t.app_user_name,t.app_user_name appUserName,t.nickname,t.headimgurl,t.community_name,t.community_name communityName,t.state,t.app_user_id,t.app_user_id appUserId,t.community_id,t.community_id communityId,t.app_type_cd,t.app_type_cd appTypeCd,t.member_id,t.member_id memberId 
+from owner_app_user t 
+where 1 =1 
+<if test="idCard !=null and idCard != ''">
+   and t.id_card= #{idCard}
+</if> 
+<if test="openId !=null and openId != ''">
+   and t.open_id= #{openId}
+</if> 
+<if test="link !=null and link != ''">
+   and t.link= #{link}
+</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> 
+<if test="appType !=null and appType != ''">
+   and t.app_type= #{appType}
+</if> 
+<if test="appUserName !=null and appUserName != ''">
+   and t.app_user_name= #{appUserName}
+</if> 
+<if test="nickname !=null and nickname != ''">
+   and t.nickname= #{nickname}
+</if> 
+<if test="headimgurl !=null and headimgurl != ''">
+   and t.headimgurl= #{headimgurl}
+</if> 
+<if test="communityName !=null and communityName != ''">
+   and t.community_name= #{communityName}
+</if> 
+<if test="state !=null and state != ''">
+   and t.state= #{state}
+</if> 
+<if test="appUserId !=null and appUserId != ''">
+   and t.app_user_id= #{appUserId}
+</if> 
+<if test="communityId !=null and communityId != ''">
+   and t.community_id= #{communityId}
+</if> 
+<if test="appTypeCd !=null and appTypeCd != ''">
+   and t.app_type_cd= #{appTypeCd}
+</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="updateOwnerAppUserInfo" parameterType="Map">
+        update  owner_app_user 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="openId !=null and openId != ''">
+, t.open_id= #{openId}
+</if> 
+<if test="link !=null and link != ''">
+, t.link= #{link}
+</if> 
+<if test="remark !=null and remark != ''">
+, t.remark= #{remark}
+</if> 
+<if test="userId !=null and userId != ''">
+, t.user_id= #{userId}
+</if> 
+<if test="appType !=null and appType != ''">
+, t.app_type= #{appType}
+</if> 
+<if test="appUserName !=null and appUserName != ''">
+, t.app_user_name= #{appUserName}
+</if> 
+<if test="nickname !=null and nickname != ''">
+, t.nickname= #{nickname}
+</if> 
+<if test="headimgurl !=null and headimgurl != ''">
+, t.headimgurl= #{headimgurl}
+</if> 
+<if test="communityName !=null and communityName != ''">
+, t.community_name= #{communityName}
+</if> 
+<if test="state !=null and state != ''">
+, t.state= #{state}
+</if> 
+<if test="communityId !=null and communityId != ''">
+, t.community_id= #{communityId}
+</if> 
+<if test="appTypeCd !=null and appTypeCd != ''">
+, t.app_type_cd= #{appTypeCd}
+</if> 
+<if test="memberId !=null and memberId != ''">
+, t.member_id= #{memberId}
+</if> 
+ where 1=1 <if test="appUserId !=null and appUserId != ''">
+and t.app_user_id= #{appUserId}
+</if> 
+
+    </update>
+
+    <!-- 查询业主用户小区关系数量 add by wuxw 2018-07-03 -->
+     <select id="queryOwnerAppUsersCount" parameterType="Map" resultType="Map">
+        select  count(1) count 
+from owner_app_user t 
+where 1 =1 
+<if test="idCard !=null and idCard != ''">
+   and t.id_card= #{idCard}
+</if> 
+<if test="openId !=null and openId != ''">
+   and t.open_id= #{openId}
+</if> 
+<if test="link !=null and link != ''">
+   and t.link= #{link}
+</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> 
+<if test="appType !=null and appType != ''">
+   and t.app_type= #{appType}
+</if> 
+<if test="appUserName !=null and appUserName != ''">
+   and t.app_user_name= #{appUserName}
+</if> 
+<if test="nickname !=null and nickname != ''">
+   and t.nickname= #{nickname}
+</if> 
+<if test="headimgurl !=null and headimgurl != ''">
+   and t.headimgurl= #{headimgurl}
+</if> 
+<if test="communityName !=null and communityName != ''">
+   and t.community_name= #{communityName}
+</if> 
+<if test="state !=null and state != ''">
+   and t.state= #{state}
+</if> 
+<if test="appUserId !=null and appUserId != ''">
+   and t.app_user_id= #{appUserId}
+</if> 
+<if test="communityId !=null and communityId != ''">
+   and t.community_id= #{communityId}
+</if> 
+<if test="appTypeCd !=null and appTypeCd != ''">
+   and t.app_type_cd= #{appTypeCd}
+</if> 
+<if test="memberId !=null and memberId != ''">
+   and t.member_id= #{memberId}
+</if> 
+
+
+     </select>
+
+</mapper>

+ 26 - 13
java110-generator/src/main/java/com/java110/code/TableToJson.java

@@ -7,15 +7,28 @@ import com.java110.utils.util.StringUtil;
 public class TableToJson {
 
     //show create table c_orders  用这个语句获取
-    public static final String createTableSql = "CREATE TABLE `u_org_staff_rel` (\n" +
-            "  `rel_id` varchar(30) NOT NULL COMMENT '组织员工ID',\n" +
+    public static final String createTableSql = "CREATE TABLE `owner_app_user` (\n" +
+            "  `app_user_id` varchar(30) NOT NULL COMMENT 'app用户ID',\n" +
+            "  `member_id` varchar(30) NOT NULL COMMENT '业主成员ID',\n" +
             "  `b_id` varchar(30) NOT NULL COMMENT '业务Id',\n" +
-            "  `org_id` varchar(30) NOT NULL COMMENT '组织ID',\n" +
-            "  `staff_id` varchar(30) NOT NULL COMMENT '员工ID',\n" +
-            "  `rel_cd` varchar(30) NOT NULL COMMENT '关系角色,10000 普通员工, 20000部门经理 查看t_dict表',\n" +
+            "  `community_id` varchar(30) NOT NULL COMMENT '小区Id',\n" +
+            "  `community_name` varchar(100) NOT NULL COMMENT '小区名称',\n" +
+            "  `app_user_name` varchar(100) NOT NULL COMMENT 'app用户名称',\n" +
+            "  `id_card` varchar(20) NOT NULL COMMENT '身份证号',\n" +
+            "  `link` varchar(11) NOT NULL COMMENT '联系人手机号',\n" +
+            "  `open_id` varchar(30) NOT NULL COMMENT 'app 开放ID',\n" +
+            "  `app_type_cd` varchar(12) NOT NULL COMMENT '应用类型 10010 微信小程序',\n" +
+            "  `state` varchar(12) NOT NULL COMMENT '状态类型,10000 审核中,12000 审核成功,13000 审核失败',\n" +
+            "  `remark` varchar(200) DEFAULT NULL COMMENT '备注',\n" +
             "  `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',\n" +
-            "  `status_cd` varchar(2) NOT NULL DEFAULT '0' COMMENT '数据状态,详细参考c_status表,0在用,1失效',\n" +
-            "  `store_id` varchar(30) NOT NULL COMMENT '商户ID'\n" +
+            "  `status_cd` varchar(2) NOT NULL DEFAULT '0' COMMENT '数据状态,详细参考c_status表,0, 在用 1失效',\n" +
+            "  `user_id` varchar(30) DEFAULT NULL COMMENT '用户ID',\n" +
+            "  `app_type` varchar(12) NOT NULL DEFAULT 'APP' COMMENT '绑定业主手机端类型',\n" +
+            "  `nickname` varchar(255) DEFAULT NULL COMMENT '昵称',\n" +
+            "  `headimgurl` varchar(255) DEFAULT NULL COMMENT '微信头像',\n" +
+            "  UNIQUE KEY `app_user_id` (`app_user_id`) USING BTREE,\n" +
+            "  UNIQUE KEY `idx_owner_app_user_id` (`app_user_id`) USING BTREE,\n" +
+            "  KEY `idx_owner_app_user_b_id` (`b_id`) USING BTREE\n" +
             ")";
 
     public static void main(String[] args) {
@@ -28,12 +41,12 @@ public class TableToJson {
         String[] rowSqls = newSql.split("',");
         JSONObject param = new JSONObject();
         param.put("autoMove", true);
-        param.put("desc", "员工部门关系");
-        param.put("id", "relId");
-        param.put("name", "orgStaffRel");
-        param.put("shareColumn", "store_id");
-        param.put("shareName", "store");
-        param.put("shareParam", "storeId");
+        param.put("desc", "业主用户小区关系");
+        param.put("id", "appUserId");
+        param.put("name", "ownerAppUser");
+        param.put("shareColumn", "community_id");
+        param.put("shareName", "user");
+        param.put("shareParam", "communityId");
         param.put("tableName", tableName);
         JSONObject paramColumn = new JSONObject();
         JSONArray requireds = new JSONArray();

+ 53 - 22
java110-generator/src/main/resources/newBack/template_1.json

@@ -1,40 +1,71 @@
 {
   "param": {
-    "relId": "rel_id",
+    "idCard": "id_card",
+    "openId": "open_id",
+    "link": "link",
+    "remark": "remark",
     "statusCd": "status_cd",
-    "storeId": "store_id",
-    "orgId": "org_id",
-    "staffId": "staff_id",
-    "relCd": "rel_cd"
+    "userId": "user_id",
+    "appType": "app_type",
+    "appUserName": "app_user_name",
+    "nickname": "nickname",
+    "headimgurl": "headimgurl",
+    "communityName": "community_name",
+    "state": "state",
+    "appUserId": "app_user_id",
+    "communityId": "community_id",
+    "appTypeCd": "app_type_cd",
+    "memberId": "member_id"
   },
-  "name": "orgStaffRel",
-  "shareColumn": "store_id",
-  "id": "relId",
-  "shareName": "store",
+  "name": "ownerAppUser",
+  "shareColumn": "community_id",
+  "id": "appUserId",
+  "shareName": "user",
   "autoMove": true,
   "required": [
     {
-      "msg": "组织员工ID不能为空",
-      "code": "relId"
+      "msg": "app用户ID不能为空",
+      "code": "appUserId"
     },
     {
-      "msg": "组织ID不能为空",
-      "code": "orgId"
+      "msg": "业主成员ID不能为空",
+      "code": "memberId"
     },
     {
-      "msg": "员工ID不能为空",
-      "code": "staffId"
+      "msg": "小区Id不能为空",
+      "code": "communityId"
     },
     {
-      "msg": "关系角色不能为空",
-      "code": "relCd"
+      "msg": "小区名称不能为空",
+      "code": "communityName"
     },
     {
-      "msg": "商户ID'不能为空",
-      "code": "storeId"
+      "msg": "app用户名称不能为空",
+      "code": "appUserName"
+    },
+    {
+      "msg": "身份证号不能为空",
+      "code": "idCard"
+    },
+    {
+      "msg": "联系人手机号不能为空",
+      "code": "link"
+    },
+    {
+      "msg": "app不能为空",
+      "code": "openId"
+    },
+    {
+      "msg": "应用类型不能为空",
+      "code": "appTypeCd"
+    },
+
+    {
+      "msg": "绑定业主手机端类型不能为空",
+      "code": "appType"
     }
   ],
-  "desc": "员工部门关系",
-  "shareParam": "storeId",
-  "tableName": "u_org_staff_rel"
+  "desc": "业主用户小区关系",
+  "shareParam": "communityId",
+  "tableName": "owner_app_user"
 }

+ 68 - 0
java110-interface/src/main/java/com/java110/intf/user/IBuildingOwnerV1InnerServiceSMO.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.user;
+
+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-10-08 17:43:55 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 = "user-service", configuration = {FeignConfiguration.class})
+@RequestMapping("/buildingOwnerV1Api")
+public interface IBuildingOwnerV1InnerServiceSMO {
+
+
+    @RequestMapping(value = "/saveBuildingOwner", method = RequestMethod.POST)
+    public int saveBuildingOwner(@RequestBody OwnerPo OwnerPo);
+
+    @RequestMapping(value = "/updateBuildingOwner", method = RequestMethod.POST)
+    public int updateBuildingOwner(@RequestBody  OwnerPo OwnerPo);
+
+    @RequestMapping(value = "/deleteBuildingOwner", method = RequestMethod.POST)
+    public int deleteBuildingOwner(@RequestBody  OwnerPo OwnerPo);
+
+    /**
+     * <p>查询小区楼信息</p>
+     *
+     *
+     * @param OwnerDto 数据对象分享
+     * @return OwnerDto 对象数据
+     */
+    @RequestMapping(value = "/queryBuildingOwners", method = RequestMethod.POST)
+    List<OwnerDto> queryBuildingOwners(@RequestBody OwnerDto OwnerDto);
+
+    /**
+     * 查询<p>小区楼</p>总记录数
+     *
+     * @param OwnerDto 数据对象分享
+     * @return 小区下的小区楼记录数
+     */
+    @RequestMapping(value = "/queryBuildingOwnersCount", method = RequestMethod.POST)
+    int queryBuildingOwnersCount(@RequestBody OwnerDto OwnerDto);
+}

+ 68 - 0
java110-interface/src/main/java/com/java110/intf/user/IOwnerAppUserV1InnerServiceSMO.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.user;
+
+import com.java110.config.feign.FeignConfiguration;
+import com.java110.dto.owner.OwnerAppUserDto;
+import com.java110.po.owner.OwnerAppUserPo;
+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-10-08 17:56:49 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 = "user-service", configuration = {FeignConfiguration.class})
+@RequestMapping("/ownerAppUserV1Api")
+public interface IOwnerAppUserV1InnerServiceSMO {
+
+
+    @RequestMapping(value = "/saveOwnerAppUser", method = RequestMethod.POST)
+    public int saveOwnerAppUser(@RequestBody OwnerAppUserPo ownerAppUserPo);
+
+    @RequestMapping(value = "/updateOwnerAppUser", method = RequestMethod.POST)
+    public int updateOwnerAppUser(@RequestBody  OwnerAppUserPo ownerAppUserPo);
+
+    @RequestMapping(value = "/deleteOwnerAppUser", method = RequestMethod.POST)
+    public int deleteOwnerAppUser(@RequestBody  OwnerAppUserPo ownerAppUserPo);
+
+    /**
+     * <p>查询小区楼信息</p>
+     *
+     *
+     * @param ownerAppUserDto 数据对象分享
+     * @return OwnerAppUserDto 对象数据
+     */
+    @RequestMapping(value = "/queryOwnerAppUsers", method = RequestMethod.POST)
+    List<OwnerAppUserDto> queryOwnerAppUsers(@RequestBody OwnerAppUserDto ownerAppUserDto);
+
+    /**
+     * 查询<p>小区楼</p>总记录数
+     *
+     * @param ownerAppUserDto 数据对象分享
+     * @return 小区下的小区楼记录数
+     */
+    @RequestMapping(value = "/queryOwnerAppUsersCount", method = RequestMethod.POST)
+    int queryOwnerAppUsersCount(@RequestBody OwnerAppUserDto ownerAppUserDto);
+}

+ 70 - 0
service-user/src/main/java/com/java110/user/cmd/buildingOwner/DeleteBuildingOwnerCmd.java

@@ -0,0 +1,70 @@
+/*
+ * 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.user.cmd.buildingOwner;
+
+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.intf.user.IBuildingOwnerV1InnerServiceSMO;
+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;
+/**
+ * 类表述:删除
+ * 服务编码:buildingOwner.deleteBuildingOwner
+ * 请求路劲:/app/buildingOwner.DeleteBuildingOwner
+ * add by 吴学文 at 2021-10-08 17:43:55 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 = "buildingOwner.deleteBuildingOwner")
+public class DeleteBuildingOwnerCmd extends AbstractServiceCmdListener {
+  private static Logger logger = LoggerFactory.getLogger(DeleteBuildingOwnerCmd.class);
+
+    @Autowired
+    private IBuildingOwnerV1InnerServiceSMO buildingOwnerV1InnerServiceSMOImpl;
+
+    @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 = buildingOwnerV1InnerServiceSMOImpl.deleteBuildingOwner(OwnerPo);
+
+        if (flag < 1) {
+            throw new CmdException("删除数据失败");
+        }
+
+        cmdDataFlowContext.setResponseEntity(ResultVo.success());
+    }
+}

+ 83 - 0
service-user/src/main/java/com/java110/user/cmd/buildingOwner/ListBuildingOwnerCmd.java

@@ -0,0 +1,83 @@
+/*
+ * 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.user.cmd.buildingOwner;
+
+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.OwnerDto;
+import com.java110.intf.user.IBuildingOwnerV1InnerServiceSMO;
+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;
+
+
+/**
+ * 类表述:查询
+ * 服务编码:buildingOwner.listBuildingOwner
+ * 请求路劲:/app/buildingOwner.ListBuildingOwner
+ * add by 吴学文 at 2021-10-08 17:43:55 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 = "buildingOwner.listBuildingOwner")
+public class ListBuildingOwnerCmd extends AbstractServiceCmdListener {
+
+  private static Logger logger = LoggerFactory.getLogger(ListBuildingOwnerCmd.class);
+    @Autowired
+    private IBuildingOwnerV1InnerServiceSMO buildingOwnerV1InnerServiceSMOImpl;
+
+    @Override
+    public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) {
+        super.validatePageInfo(reqJson);
+    }
+
+    @Override
+    public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
+
+           OwnerDto OwnerDto = BeanConvertUtil.covertBean(reqJson, OwnerDto.class);
+
+           int count = buildingOwnerV1InnerServiceSMOImpl.queryBuildingOwnersCount(OwnerDto);
+
+           List<OwnerDto> OwnerDtos = null;
+
+           if (count > 0) {
+               OwnerDtos = buildingOwnerV1InnerServiceSMOImpl.queryBuildingOwners(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);
+    }
+}

+ 81 - 0
service-user/src/main/java/com/java110/user/cmd/buildingOwner/SaveBuildingOwnerCmd.java

@@ -0,0 +1,81 @@
+/*
+ * 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.user.cmd.buildingOwner;
+
+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.user.IBuildingOwnerV1InnerServiceSMO;
+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;
+
+/**
+ * 类表述:保存
+ * 服务编码:buildingOwner.saveBuildingOwner
+ * 请求路劲:/app/buildingOwner.SaveBuildingOwner
+ * add by 吴学文 at 2021-10-08 17:43:55 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 = "buildingOwner.saveBuildingOwner")
+public class SaveBuildingOwnerCmd extends AbstractServiceCmdListener {
+
+    private static Logger logger = LoggerFactory.getLogger(SaveBuildingOwnerCmd.class);
+
+    public static final String CODE_PREFIX_ID = "10";
+
+    @Autowired
+    private IBuildingOwnerV1InnerServiceSMO buildingOwnerV1InnerServiceSMOImpl;
+
+    @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");
+
+    }
+
+    @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 = buildingOwnerV1InnerServiceSMOImpl.saveBuildingOwner(OwnerPo);
+
+        if (flag < 1) {
+            throw new CmdException("保存数据失败");
+        }
+
+        cmdDataFlowContext.setResponseEntity(ResultVo.success());
+    }
+}

+ 75 - 0
service-user/src/main/java/com/java110/user/cmd/buildingOwner/UpdateBuildingOwnerCmd.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.user.cmd.buildingOwner;
+
+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.user.IBuildingOwnerV1InnerServiceSMO;
+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;
+
+
+/**
+ * 类表述:更新
+ * 服务编码:buildingOwner.updateBuildingOwner
+ * 请求路劲:/app/buildingOwner.UpdateBuildingOwner
+ * add by 吴学文 at 2021-10-08 17:43:55 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 = "buildingOwner.updateBuildingOwner")
+public class UpdateBuildingOwnerCmd extends AbstractServiceCmdListener {
+
+  private static Logger logger = LoggerFactory.getLogger(UpdateBuildingOwnerCmd.class);
+
+
+    @Autowired
+    private IBuildingOwnerV1InnerServiceSMO buildingOwnerV1InnerServiceSMOImpl;
+
+    @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 = buildingOwnerV1InnerServiceSMOImpl.updateBuildingOwner(OwnerPo);
+
+        if (flag < 1) {
+            throw new CmdException("更新数据失败");
+        }
+
+        cmdDataFlowContext.setResponseEntity(ResultVo.success());
+    }
+}

+ 70 - 0
service-user/src/main/java/com/java110/user/cmd/ownerAppUser/DeleteOwnerAppUserCmd.java

@@ -0,0 +1,70 @@
+/*
+ * 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.user.cmd.ownerAppUser;
+
+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.intf.user.IOwnerAppUserV1InnerServiceSMO;
+import com.java110.po.owner.OwnerAppUserPo;
+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;
+/**
+ * 类表述:删除
+ * 服务编码:ownerAppUser.deleteOwnerAppUser
+ * 请求路劲:/app/ownerAppUser.DeleteOwnerAppUser
+ * add by 吴学文 at 2021-10-08 17:56:49 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 = "ownerAppUser.deleteOwnerAppUser")
+public class DeleteOwnerAppUserCmd extends AbstractServiceCmdListener {
+  private static Logger logger = LoggerFactory.getLogger(DeleteOwnerAppUserCmd.class);
+
+    @Autowired
+    private IOwnerAppUserV1InnerServiceSMO ownerAppUserV1InnerServiceSMOImpl;
+
+    @Override
+    public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) {
+        Assert.hasKeyAndValue(reqJson, "appUserId", "appUserId不能为空");
+Assert.hasKeyAndValue(reqJson, "communityId", "communityId不能为空");
+
+    }
+
+    @Override
+    @Java110Transactional
+    public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
+
+       OwnerAppUserPo ownerAppUserPo = BeanConvertUtil.covertBean(reqJson, OwnerAppUserPo.class);
+        int flag = ownerAppUserV1InnerServiceSMOImpl.deleteOwnerAppUser(ownerAppUserPo);
+
+        if (flag < 1) {
+            throw new CmdException("删除数据失败");
+        }
+
+        cmdDataFlowContext.setResponseEntity(ResultVo.success());
+    }
+}

+ 83 - 0
service-user/src/main/java/com/java110/user/cmd/ownerAppUser/ListOwnerAppUserCmd.java

@@ -0,0 +1,83 @@
+/*
+ * 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.user.cmd.ownerAppUser;
+
+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.OwnerAppUserDto;
+import com.java110.intf.user.IOwnerAppUserV1InnerServiceSMO;
+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;
+
+
+/**
+ * 类表述:查询
+ * 服务编码:ownerAppUser.listOwnerAppUser
+ * 请求路劲:/app/ownerAppUser.ListOwnerAppUser
+ * add by 吴学文 at 2021-10-08 17:56:49 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 = "ownerAppUser.listOwnerAppUser")
+public class ListOwnerAppUserCmd extends AbstractServiceCmdListener {
+
+  private static Logger logger = LoggerFactory.getLogger(ListOwnerAppUserCmd.class);
+    @Autowired
+    private IOwnerAppUserV1InnerServiceSMO ownerAppUserV1InnerServiceSMOImpl;
+
+    @Override
+    public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) {
+        super.validatePageInfo(reqJson);
+    }
+
+    @Override
+    public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
+
+           OwnerAppUserDto ownerAppUserDto = BeanConvertUtil.covertBean(reqJson, OwnerAppUserDto.class);
+
+           int count = ownerAppUserV1InnerServiceSMOImpl.queryOwnerAppUsersCount(ownerAppUserDto);
+
+           List<OwnerAppUserDto> ownerAppUserDtos = null;
+
+           if (count > 0) {
+               ownerAppUserDtos = ownerAppUserV1InnerServiceSMOImpl.queryOwnerAppUsers(ownerAppUserDto);
+           } else {
+               ownerAppUserDtos = new ArrayList<>();
+           }
+
+           ResultVo resultVo = new ResultVo((int) Math.ceil((double) count / (double) reqJson.getInteger("row")), count, ownerAppUserDtos);
+
+           ResponseEntity<String> responseEntity = new ResponseEntity<String>(resultVo.toString(), HttpStatus.OK);
+
+           cmdDataFlowContext.setResponseEntity(responseEntity);
+    }
+}

+ 84 - 0
service-user/src/main/java/com/java110/user/cmd/ownerAppUser/SaveOwnerAppUserCmd.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.user.cmd.ownerAppUser;
+
+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.user.IOwnerAppUserV1InnerServiceSMO;
+import com.java110.po.owner.OwnerAppUserPo;
+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;
+
+/**
+ * 类表述:保存
+ * 服务编码:ownerAppUser.saveOwnerAppUser
+ * 请求路劲:/app/ownerAppUser.SaveOwnerAppUser
+ * add by 吴学文 at 2021-10-08 17:56:49 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 = "ownerAppUser.saveOwnerAppUser")
+public class SaveOwnerAppUserCmd extends AbstractServiceCmdListener {
+
+    private static Logger logger = LoggerFactory.getLogger(SaveOwnerAppUserCmd.class);
+
+    public static final String CODE_PREFIX_ID = "10";
+
+    @Autowired
+    private IOwnerAppUserV1InnerServiceSMO ownerAppUserV1InnerServiceSMOImpl;
+
+    @Override
+    public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) {
+        Assert.hasKeyAndValue(reqJson, "appUserId", "请求报文中未包含appUserId");
+Assert.hasKeyAndValue(reqJson, "memberId", "请求报文中未包含memberId");
+Assert.hasKeyAndValue(reqJson, "communityId", "请求报文中未包含communityId");
+Assert.hasKeyAndValue(reqJson, "communityName", "请求报文中未包含communityName");
+Assert.hasKeyAndValue(reqJson, "appUserName", "请求报文中未包含appUserName");
+Assert.hasKeyAndValue(reqJson, "idCard", "请求报文中未包含idCard");
+Assert.hasKeyAndValue(reqJson, "link", "请求报文中未包含link");
+Assert.hasKeyAndValue(reqJson, "openId", "请求报文中未包含openId");
+Assert.hasKeyAndValue(reqJson, "appTypeCd", "请求报文中未包含appTypeCd");
+Assert.hasKeyAndValue(reqJson, "appType", "请求报文中未包含appType");
+
+    }
+
+    @Override
+    @Java110Transactional
+    public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
+
+       OwnerAppUserPo ownerAppUserPo = BeanConvertUtil.covertBean(reqJson, OwnerAppUserPo.class);
+        ownerAppUserPo.setAppUserId(GenerateCodeFactory.getGeneratorId(CODE_PREFIX_ID));
+        int flag = ownerAppUserV1InnerServiceSMOImpl.saveOwnerAppUser(ownerAppUserPo);
+
+        if (flag < 1) {
+            throw new CmdException("保存数据失败");
+        }
+
+        cmdDataFlowContext.setResponseEntity(ResultVo.success());
+    }
+}

+ 75 - 0
service-user/src/main/java/com/java110/user/cmd/ownerAppUser/UpdateOwnerAppUserCmd.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.user.cmd.ownerAppUser;
+
+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.user.IOwnerAppUserV1InnerServiceSMO;
+import com.java110.po.owner.OwnerAppUserPo;
+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;
+
+
+/**
+ * 类表述:更新
+ * 服务编码:ownerAppUser.updateOwnerAppUser
+ * 请求路劲:/app/ownerAppUser.UpdateOwnerAppUser
+ * add by 吴学文 at 2021-10-08 17:56:49 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 = "ownerAppUser.updateOwnerAppUser")
+public class UpdateOwnerAppUserCmd extends AbstractServiceCmdListener {
+
+  private static Logger logger = LoggerFactory.getLogger(UpdateOwnerAppUserCmd.class);
+
+
+    @Autowired
+    private IOwnerAppUserV1InnerServiceSMO ownerAppUserV1InnerServiceSMOImpl;
+
+    @Override
+    public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) {
+        Assert.hasKeyAndValue(reqJson, "appUserId", "appUserId不能为空");
+Assert.hasKeyAndValue(reqJson, "communityId", "communityId不能为空");
+
+    }
+
+    @Override
+    @Java110Transactional
+    public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
+
+       OwnerAppUserPo ownerAppUserPo = BeanConvertUtil.covertBean(reqJson, OwnerAppUserPo.class);
+        int flag = ownerAppUserV1InnerServiceSMOImpl.updateOwnerAppUser(ownerAppUserPo);
+
+        if (flag < 1) {
+            throw new CmdException("更新数据失败");
+        }
+
+        cmdDataFlowContext.setResponseEntity(ResultVo.success());
+    }
+}

+ 77 - 0
service-user/src/main/java/com/java110/user/dao/IBuildingOwnerV1ServiceDao.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.user.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-10-08 17:43:55 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 IBuildingOwnerV1ServiceDao {
+
+
+    /**
+     * 保存 业主信息信息
+     * @param info
+     * @throws DAOException DAO异常
+     */
+    int saveBuildingOwnerInfo(Map info) throws DAOException;
+
+
+
+
+    /**
+     * 查询业主信息信息(instance过程)
+     * 根据bId 查询业主信息信息
+     * @param info bId 信息
+     * @return 业主信息信息
+     * @throws DAOException DAO异常
+     */
+    List<Map> getBuildingOwnerInfo(Map info) throws DAOException;
+
+
+
+    /**
+     * 修改业主信息信息
+     * @param info 修改信息
+     * @throws DAOException DAO异常
+     */
+    int updateBuildingOwnerInfo(Map info) throws DAOException;
+
+
+    /**
+     * 查询业主信息总数
+     *
+     * @param info 业主信息信息
+     * @return 业主信息数量
+     */
+    int queryBuildingOwnersCount(Map info);
+
+}

+ 77 - 0
service-user/src/main/java/com/java110/user/dao/IOwnerAppUserV1ServiceDao.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.user.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-10-08 17:56:48 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 IOwnerAppUserV1ServiceDao {
+
+
+    /**
+     * 保存 业主用户小区关系信息
+     * @param info
+     * @throws DAOException DAO异常
+     */
+    int saveOwnerAppUserInfo(Map info) throws DAOException;
+
+
+
+
+    /**
+     * 查询业主用户小区关系信息(instance过程)
+     * 根据bId 查询业主用户小区关系信息
+     * @param info bId 信息
+     * @return 业主用户小区关系信息
+     * @throws DAOException DAO异常
+     */
+    List<Map> getOwnerAppUserInfo(Map info) throws DAOException;
+
+
+
+    /**
+     * 修改业主用户小区关系信息
+     * @param info 修改信息
+     * @throws DAOException DAO异常
+     */
+    int updateOwnerAppUserInfo(Map info) throws DAOException;
+
+
+    /**
+     * 查询业主用户小区关系总数
+     *
+     * @param info 业主用户小区关系信息
+     * @return 业主用户小区关系数量
+     */
+    int queryOwnerAppUsersCount(Map info);
+
+}

+ 112 - 0
service-user/src/main/java/com/java110/user/dao/impl/BuildingOwnerV1ServiceDaoImpl.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.user.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.user.dao.IBuildingOwnerV1ServiceDao;
+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-10-08 17:43:55 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("buildingOwnerV1ServiceDaoImpl")
+public class BuildingOwnerV1ServiceDaoImpl extends BaseServiceDao implements IBuildingOwnerV1ServiceDao {
+
+    private static Logger logger = LoggerFactory.getLogger(BuildingOwnerV1ServiceDaoImpl.class);
+
+
+
+
+
+    /**
+     * 保存业主信息信息 到 instance
+     * @param info   bId 信息
+     * @throws DAOException DAO异常
+     */
+    @Override
+    public int saveBuildingOwnerInfo(Map info) throws DAOException {
+        logger.debug("保存 saveBuildingOwnerInfo 入参 info : {}",info);
+
+        int saveFlag = sqlSessionTemplate.insert("buildingOwnerV1ServiceDaoImpl.saveBuildingOwnerInfo",info);
+
+        return saveFlag;
+    }
+
+
+    /**
+     * 查询业主信息信息(instance)
+     * @param info bId 信息
+     * @return List<Map>
+     * @throws DAOException DAO异常
+     */
+    @Override
+    public List<Map> getBuildingOwnerInfo(Map info) throws DAOException {
+        logger.debug("查询 getBuildingOwnerInfo 入参 info : {}",info);
+
+        List<Map> businessBuildingOwnerInfos = sqlSessionTemplate.selectList("buildingOwnerV1ServiceDaoImpl.getBuildingOwnerInfo",info);
+
+        return businessBuildingOwnerInfos;
+    }
+
+
+    /**
+     * 修改业主信息信息
+     * @param info 修改信息
+     * @throws DAOException DAO异常
+     */
+    @Override
+    public int updateBuildingOwnerInfo(Map info) throws DAOException {
+        logger.debug("修改 updateBuildingOwnerInfo 入参 info : {}",info);
+
+        int saveFlag = sqlSessionTemplate.update("buildingOwnerV1ServiceDaoImpl.updateBuildingOwnerInfo",info);
+
+        return saveFlag;
+    }
+
+     /**
+     * 查询业主信息数量
+     * @param info 业主信息信息
+     * @return 业主信息数量
+     */
+    @Override
+    public int queryBuildingOwnersCount(Map info) {
+        logger.debug("查询 queryBuildingOwnersCount 入参 info : {}",info);
+
+        List<Map> businessBuildingOwnerInfos = sqlSessionTemplate.selectList("buildingOwnerV1ServiceDaoImpl.queryBuildingOwnersCount", info);
+        if (businessBuildingOwnerInfos.size() < 1) {
+            return 0;
+        }
+
+        return Integer.parseInt(businessBuildingOwnerInfos.get(0).get("count").toString());
+    }
+
+
+}

+ 112 - 0
service-user/src/main/java/com/java110/user/dao/impl/OwnerAppUserV1ServiceDaoImpl.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.user.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.user.dao.IOwnerAppUserV1ServiceDao;
+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-10-08 17:56:48 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("ownerAppUserV1ServiceDaoImpl")
+public class OwnerAppUserV1ServiceDaoImpl extends BaseServiceDao implements IOwnerAppUserV1ServiceDao {
+
+    private static Logger logger = LoggerFactory.getLogger(OwnerAppUserV1ServiceDaoImpl.class);
+
+
+
+
+
+    /**
+     * 保存业主用户小区关系信息 到 instance
+     * @param info   bId 信息
+     * @throws DAOException DAO异常
+     */
+    @Override
+    public int saveOwnerAppUserInfo(Map info) throws DAOException {
+        logger.debug("保存 saveOwnerAppUserInfo 入参 info : {}",info);
+
+        int saveFlag = sqlSessionTemplate.insert("ownerAppUserV1ServiceDaoImpl.saveOwnerAppUserInfo",info);
+
+        return saveFlag;
+    }
+
+
+    /**
+     * 查询业主用户小区关系信息(instance)
+     * @param info bId 信息
+     * @return List<Map>
+     * @throws DAOException DAO异常
+     */
+    @Override
+    public List<Map> getOwnerAppUserInfo(Map info) throws DAOException {
+        logger.debug("查询 getOwnerAppUserInfo 入参 info : {}",info);
+
+        List<Map> businessOwnerAppUserInfos = sqlSessionTemplate.selectList("ownerAppUserV1ServiceDaoImpl.getOwnerAppUserInfo",info);
+
+        return businessOwnerAppUserInfos;
+    }
+
+
+    /**
+     * 修改业主用户小区关系信息
+     * @param info 修改信息
+     * @throws DAOException DAO异常
+     */
+    @Override
+    public int updateOwnerAppUserInfo(Map info) throws DAOException {
+        logger.debug("修改 updateOwnerAppUserInfo 入参 info : {}",info);
+
+        int saveFlag = sqlSessionTemplate.update("ownerAppUserV1ServiceDaoImpl.updateOwnerAppUserInfo",info);
+
+        return saveFlag;
+    }
+
+     /**
+     * 查询业主用户小区关系数量
+     * @param info 业主用户小区关系信息
+     * @return 业主用户小区关系数量
+     */
+    @Override
+    public int queryOwnerAppUsersCount(Map info) {
+        logger.debug("查询 queryOwnerAppUsersCount 入参 info : {}",info);
+
+        List<Map> businessOwnerAppUserInfos = sqlSessionTemplate.selectList("ownerAppUserV1ServiceDaoImpl.queryOwnerAppUsersCount", info);
+        if (businessOwnerAppUserInfos.size() < 1) {
+            return 0;
+        }
+
+        return Integer.parseInt(businessOwnerAppUserInfos.get(0).get("count").toString());
+    }
+
+
+}

+ 89 - 0
service-user/src/main/java/com/java110/user/smo/impl/BuildingOwnerV1InnerServiceSMOImpl.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.user.smo.impl;
+
+
+import com.java110.dto.owner.OwnerDto;
+import com.java110.po.owner.OwnerPo;
+import com.java110.user.dao.IBuildingOwnerV1ServiceDao;
+import com.java110.intf.user.IBuildingOwnerV1InnerServiceSMO;
+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-10-08 17:43:55 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 BuildingOwnerV1InnerServiceSMOImpl extends BaseServiceSMO implements IBuildingOwnerV1InnerServiceSMO {
+
+    @Autowired
+    private IBuildingOwnerV1ServiceDao buildingOwnerV1ServiceDaoImpl;
+
+
+    @Override
+    public int saveBuildingOwner(@RequestBody OwnerPo OwnerPo) {
+        int saveFlag = buildingOwnerV1ServiceDaoImpl.saveBuildingOwnerInfo(BeanConvertUtil.beanCovertMap(OwnerPo));
+        return saveFlag;
+    }
+
+     @Override
+    public int updateBuildingOwner(@RequestBody  OwnerPo OwnerPo) {
+        int saveFlag = buildingOwnerV1ServiceDaoImpl.updateBuildingOwnerInfo(BeanConvertUtil.beanCovertMap(OwnerPo));
+        return saveFlag;
+    }
+
+     @Override
+    public int deleteBuildingOwner(@RequestBody  OwnerPo OwnerPo) {
+       OwnerPo.setStatusCd("1");
+       int saveFlag = buildingOwnerV1ServiceDaoImpl.updateBuildingOwnerInfo(BeanConvertUtil.beanCovertMap(OwnerPo));
+       return saveFlag;
+    }
+
+    @Override
+    public List<OwnerDto> queryBuildingOwners(@RequestBody OwnerDto OwnerDto) {
+
+        //校验是否传了 分页信息
+
+        int page = OwnerDto.getPage();
+
+        if (page != PageDto.DEFAULT_PAGE) {
+            OwnerDto.setPage((page - 1) * OwnerDto.getRow());
+        }
+
+        List<OwnerDto> buildingOwners = BeanConvertUtil.covertBeanList(buildingOwnerV1ServiceDaoImpl.getBuildingOwnerInfo(BeanConvertUtil.beanCovertMap(OwnerDto)), OwnerDto.class);
+
+        return buildingOwners;
+    }
+
+
+    @Override
+    public int queryBuildingOwnersCount(@RequestBody OwnerDto OwnerDto) {
+        return buildingOwnerV1ServiceDaoImpl.queryBuildingOwnersCount(BeanConvertUtil.beanCovertMap(OwnerDto));    }
+
+}

+ 89 - 0
service-user/src/main/java/com/java110/user/smo/impl/OwnerAppUserV1InnerServiceSMOImpl.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.user.smo.impl;
+
+
+import com.java110.dto.owner.OwnerAppUserDto;
+import com.java110.po.owner.OwnerAppUserPo;
+import com.java110.user.dao.IOwnerAppUserV1ServiceDao;
+import com.java110.intf.user.IOwnerAppUserV1InnerServiceSMO;
+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-10-08 17:56:49 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 OwnerAppUserV1InnerServiceSMOImpl extends BaseServiceSMO implements IOwnerAppUserV1InnerServiceSMO {
+
+    @Autowired
+    private IOwnerAppUserV1ServiceDao ownerAppUserV1ServiceDaoImpl;
+
+
+    @Override
+    public int saveOwnerAppUser(@RequestBody OwnerAppUserPo ownerAppUserPo) {
+        int saveFlag = ownerAppUserV1ServiceDaoImpl.saveOwnerAppUserInfo(BeanConvertUtil.beanCovertMap(ownerAppUserPo));
+        return saveFlag;
+    }
+
+     @Override
+    public int updateOwnerAppUser(@RequestBody  OwnerAppUserPo ownerAppUserPo) {
+        int saveFlag = ownerAppUserV1ServiceDaoImpl.updateOwnerAppUserInfo(BeanConvertUtil.beanCovertMap(ownerAppUserPo));
+        return saveFlag;
+    }
+
+     @Override
+    public int deleteOwnerAppUser(@RequestBody  OwnerAppUserPo ownerAppUserPo) {
+       ownerAppUserPo.setStatusCd("1");
+       int saveFlag = ownerAppUserV1ServiceDaoImpl.updateOwnerAppUserInfo(BeanConvertUtil.beanCovertMap(ownerAppUserPo));
+       return saveFlag;
+    }
+
+    @Override
+    public List<OwnerAppUserDto> queryOwnerAppUsers(@RequestBody  OwnerAppUserDto ownerAppUserDto) {
+
+        //校验是否传了 分页信息
+
+        int page = ownerAppUserDto.getPage();
+
+        if (page != PageDto.DEFAULT_PAGE) {
+            ownerAppUserDto.setPage((page - 1) * ownerAppUserDto.getRow());
+        }
+
+        List<OwnerAppUserDto> ownerAppUsers = BeanConvertUtil.covertBeanList(ownerAppUserV1ServiceDaoImpl.getOwnerAppUserInfo(BeanConvertUtil.beanCovertMap(ownerAppUserDto)), OwnerAppUserDto.class);
+
+        return ownerAppUsers;
+    }
+
+
+    @Override
+    public int queryOwnerAppUsersCount(@RequestBody OwnerAppUserDto ownerAppUserDto) {
+        return ownerAppUserV1ServiceDaoImpl.queryOwnerAppUsersCount(BeanConvertUtil.beanCovertMap(ownerAppUserDto));    }
+
+}