浏览代码

小区服务功能测试完成,包括 添加小区 修改小区 小区成员加入 小区成员退出

wuxw 7 年之前
父节点
当前提交
3dbefbc9bc

+ 1 - 1
CommunityService/doc/memberJoinCommunity.json

@@ -19,7 +19,7 @@
     "datas": {
       "businessCommunityMember": {
         "communityMemberId": "-1",
-        "communityId": "123456",
+        "communityId": "7020181217000001",
         "memberId": "345678",
         "memberTypeCd": "390001200001"
       }

+ 1 - 1
CommunityService/src/main/java/com/java110/community/dao/impl/CommunityServiceDaoImpl.java

@@ -308,7 +308,7 @@ public class CommunityServiceDaoImpl extends BaseServiceDao implements ICommunit
      */
     public void saveBusinessCommunityMember(Map businessCommunityMember) throws DAOException{
         logger.debug("小区成员加入 入参 businessCommunityMember : {}",businessCommunityMember);
-
+        businessCommunityMember.put("month", DateUtil.getCurrentMonth());
         int saveFlag = sqlSessionTemplate.insert("communityServiceDaoImpl.saveBusinessCommunityMember",businessCommunityMember);
 
         if(saveFlag < 1){

+ 1 - 1
CommunityService/src/main/java/com/java110/community/listener/AbstractCommunityBusinessServiceDataFlowListener.java

@@ -174,6 +174,6 @@ public abstract class AbstractCommunityBusinessServiceDataFlowListener extends A
         currentCommunityMember.put("memberId",currentCommunityMember.get("member_id"));
         currentCommunityMember.put("memberTypeCd",currentCommunityMember.get("member_type_cd"));
         currentCommunityMember.put("operate",StatusConstant.OPERATE_DEL);
-        getCommunityServiceDaoImpl().saveBusinessCommunityInfo(currentCommunityMember);
+        getCommunityServiceDaoImpl().saveBusinessCommunityMember(currentCommunityMember);
     }
 }

+ 6 - 6
CommunityService/src/main/java/com/java110/community/listener/MemberQuitCommunityListener.java

@@ -59,7 +59,7 @@ public class MemberQuitCommunityListener extends AbstractCommunityBusinessServic
         if(data.containsKey("businessCommunityMember")){
             JSONObject memberCommunity = data.getJSONObject("businessCommunityMember");
             doBusinessCommunityMember(business,memberCommunity);
-            dataFlowContext.addParamOut("memberCommunityId",memberCommunity.getString("memberCommunityId"));
+            dataFlowContext.addParamOut("communityMemberId",memberCommunity.getString("communityMemberId"));
         }
 
     }
@@ -84,7 +84,7 @@ public class MemberQuitCommunityListener extends AbstractCommunityBusinessServic
         if( businessCommunityMember != null && !businessCommunityMember.isEmpty()) {
             flushBusinessCommunityMember(businessCommunityMember,StatusConstant.STATUS_CD_INVALID);
             communityServiceDaoImpl.updateCommunityMemberInstance(businessCommunityMember);
-            dataFlowContext.addParamOut("memberCommunityId",businessCommunityMember.get("member_community_id"));
+            dataFlowContext.addParamOut("communityMemberId",businessCommunityMember.get("member_community_id"));
         }
     }
 
@@ -118,7 +118,7 @@ public class MemberQuitCommunityListener extends AbstractCommunityBusinessServic
 
             flushBusinessCommunityMember(businessCommunityMember,StatusConstant.STATUS_CD_VALID);
             communityServiceDaoImpl.updateCommunityMemberInstance(businessCommunityMember);
-            dataFlowContext.addParamOut("memberCommunityId",memberCommunity.get("member_community_id"));
+            dataFlowContext.addParamOut("communityMemberId",memberCommunity.get("member_community_id"));
         }
     }
 
@@ -131,10 +131,10 @@ public class MemberQuitCommunityListener extends AbstractCommunityBusinessServic
      */
     private void doBusinessCommunityMember(Business business,JSONObject businessCommunity){
 
-        Assert.jsonObjectHaveKey(businessCommunity,"memberCommunityId","doBusinessCommunityMember 节点下没有包含 memberCommunityId 节点");
+        Assert.jsonObjectHaveKey(businessCommunity,"communityMemberId","doBusinessCommunityMember 节点下没有包含 communityMemberId 节点");
 
-        if(businessCommunity.getString("memberCommunityId").startsWith("-")){
-            throw new ListenerExecuteException(ResponseConstant.RESULT_PARAM_ERROR,"memberCommunityId 错误,不能自动生成(必须已经存在的memberCommunityId)"+businessCommunity);
+        if(businessCommunity.getString("communityMemberId").startsWith("-")){
+            throw new ListenerExecuteException(ResponseConstant.RESULT_PARAM_ERROR,"communityMemberId 错误,不能自动生成(必须已经存在的communityMemberId)"+businessCommunity);
         }
         //自动插入DEL
         autoSaveDelBusinessCommunityMember(business,businessCommunity);

+ 5 - 5
java110-config/src/main/resources/mapper/community/CommunityServiceDaoImplMapper.xml

@@ -244,7 +244,7 @@
     <!-- 小区成员加入 instance表中 add by wuxw 2018-10-27 -->
     <insert id="saveCommunityMemberInstance" parameterType="Map">
         insert into s_community_member(community_member_id,b_id,community_id,member_id,member_type_cd,status_cd)
-        select ms.community_member_id,ms.b_id,ms.community_id,ms.member_id,ms.memberTypeCd,'0'
+        select ms.community_member_id,ms.b_id,ms.community_id,ms.member_id,ms.member_type_cd,'0'
         from business_community_member ms where
         ms.operate = 'ADD' and ms.b_id=#{bId}
     </insert>
@@ -253,7 +253,7 @@
     <select id="getBusinessCommunityMember" parameterType="Map" resultType="Map">
         select ms.community_member_id,ms.b_id,ms.community_id,ms.member_id,ms.member_type_cd,ms.operate
         from business_community_member ms where 1 = 1
-        <if test="operate != null and operate != ''">,
+        <if test="operate != null and operate != ''">
             and ms.operate = #{operate}
         </if>
         <if test="bId != null and bId !=''">
@@ -268,16 +268,16 @@
     <!-- 查询小区成员  add by wuxw 2018-07-03 -->
     <select id="getCommunityMember" parameterType="Map" resultType="Map">
         select ms.community_member_id,ms.b_id,ms.community_id,ms.member_id,ms.member_type_cd,ms.status_cd
-        from business_community_member ms
+        from s_community_member ms
         where 1=1
         <if test="statusCd != null and statusCd != ''">
             and ms.status_cd = #{statusCd}
-        </if>,
+        </if>
 
         <if test="bId != null and bId !=''">
             and ms.b_id = #{bId}
         </if>
-        <if test="communityId != null and communityId !=''">
+        <if test="communityMemberId != null and communityMemberId !=''">
             and ms.community_member_id = #{communityMemberId}
         </if>
     </select>