java110
2021-09-18 8624ebe7d8d806cbfe15e1033fee3d90ad90e422
调整添加小区逻辑
9个文件已修改
35个文件已添加
4036 ■■■■■ 已修改文件
java110-bean/src/main/java/com/java110/po/community/CommunityAttrPo.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
java110-bean/src/main/java/com/java110/po/community/CommunityMemberPo.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
java110-bean/src/main/java/com/java110/po/fee/PayFeeConfigPo.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
java110-bean/src/main/java/com/java110/po/workflow/WorkflowPo.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
java110-db/src/main/resources/mapper/common/WorkflowV1ServiceDaoImplMapper.xml 133 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
java110-db/src/main/resources/mapper/community/CommunityAttrV1ServiceDaoImplMapper.xml 97 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
java110-db/src/main/resources/mapper/community/CommunityMemberV1ServiceDaoImplMapper.xml 110 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
java110-db/src/main/resources/mapper/community/CommunityV1ServiceDaoImplMapper.xml 169 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
java110-db/src/main/resources/mapper/fee/PayFeeConfigV1ServiceDaoImplMapper.xml 195 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
java110-generator/src/main/java/com/java110/code/TableToJson.java 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
java110-generator/src/main/java/com/java110/code/newBack/BackCoderGeneratorStart.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
java110-generator/src/main/java/com/java110/code/newBack/GeneratorApiListener.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
java110-generator/src/main/resources/newBack/template_1.json 57 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
java110-interface/src/main/java/com/java110/intf/common/IWorkflowV1InnerServiceSMO.java 68 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
java110-interface/src/main/java/com/java110/intf/community/ICommunityAttrV1InnerServiceSMO.java 68 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
java110-interface/src/main/java/com/java110/intf/community/ICommunityMemberV1InnerServiceSMO.java 68 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
java110-interface/src/main/java/com/java110/intf/community/ICommunityV1InnerServiceSMO.java 68 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
java110-interface/src/main/java/com/java110/intf/fee/IPayFeeConfigV1InnerServiceSMO.java 67 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service-common/src/main/java/com/java110/common/CommonServiceApplicationStart.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service-common/src/main/java/com/java110/common/cmd/workflow/DeleteWorkflowCmd.java 71 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service-common/src/main/java/com/java110/common/cmd/workflow/ListWorkflowCmd.java 84 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service-common/src/main/java/com/java110/common/cmd/workflow/SaveWorkflowCmd.java 81 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service-common/src/main/java/com/java110/common/cmd/workflow/UpdateWorkflowCmd.java 75 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service-common/src/main/java/com/java110/common/dao/IWorkflowV1ServiceDao.java 77 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service-common/src/main/java/com/java110/common/dao/impl/WorkflowV1ServiceDaoImpl.java 112 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service-common/src/main/java/com/java110/common/smo/impl/WorkflowV1InnerServiceSMOImpl.java 89 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service-community/src/main/java/com/java110/community/bmo/community/ICommunityBMO.java 184 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service-community/src/main/java/com/java110/community/bmo/community/impl/CommunityBMOImpl.java 616 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service-community/src/main/java/com/java110/community/cmd/community/DeleteCommunityCmd.java 71 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service-community/src/main/java/com/java110/community/cmd/community/ListCommunityCmd.java 84 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service-community/src/main/java/com/java110/community/cmd/community/SaveCommunityCmd.java 148 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service-community/src/main/java/com/java110/community/cmd/community/UpdateCommunityCmd.java 73 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service-community/src/main/java/com/java110/community/dao/ICommunityAttrV1ServiceDao.java 77 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service-community/src/main/java/com/java110/community/dao/ICommunityMemberV1ServiceDao.java 77 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service-community/src/main/java/com/java110/community/dao/ICommunityV1ServiceDao.java 77 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service-community/src/main/java/com/java110/community/dao/impl/CommunityAttrV1ServiceDaoImpl.java 112 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service-community/src/main/java/com/java110/community/dao/impl/CommunityMemberV1ServiceDaoImpl.java 112 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service-community/src/main/java/com/java110/community/dao/impl/CommunityV1ServiceDaoImpl.java 112 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service-community/src/main/java/com/java110/community/smo/impl/CommunityAttrV1InnerServiceSMOImpl.java 88 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service-community/src/main/java/com/java110/community/smo/impl/CommunityMemberV1InnerServiceSMOImpl.java 89 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service-community/src/main/java/com/java110/community/smo/impl/CommunityV1InnerServiceSMOImpl.java 89 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service-fee/src/main/java/com/java110/fee/dao/IPayFeeConfigV1ServiceDao.java 77 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service-fee/src/main/java/com/java110/fee/dao/impl/PayFeeConfigV1ServiceDaoImpl.java 112 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service-fee/src/main/java/com/java110/fee/smo/impl/PayFeeConfigV1InnerServiceSMOImpl.java 89 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
java110-bean/src/main/java/com/java110/po/community/CommunityAttrPo.java
@@ -16,6 +16,7 @@
    private String communityId;
    private String specCd;
    private String value;
    private String statusCd;
    public String getAttrId() {
        return attrId;
@@ -48,4 +49,12 @@
    public void setValue(String value) {
        this.value = value;
    }
    public String getStatusCd() {
        return statusCd;
    }
    public void setStatusCd(String statusCd) {
        this.statusCd = statusCd;
    }
}
java110-bean/src/main/java/com/java110/po/community/CommunityMemberPo.java
@@ -19,6 +19,7 @@
    private String auditStatusCd;
    private String startTime;
    private String endTime;
    private String statusCd;
    public String getCommunityMemberId() {
        return communityMemberId;
@@ -75,4 +76,12 @@
    public void setEndTime(String endTime) {
        this.endTime = endTime;
    }
    public String getStatusCd() {
        return statusCd;
    }
    public void setStatusCd(String statusCd) {
        this.statusCd = statusCd;
    }
}
java110-bean/src/main/java/com/java110/po/fee/PayFeeConfigPo.java
@@ -32,6 +32,7 @@
    private String paymentCd;
    private String paymentCycle;
    private String statusCd;
    public String getConfigId() {
        return configId;
@@ -152,4 +153,12 @@
    public void setComputingFormulaText(String computingFormulaText) {
        this.computingFormulaText = computingFormulaText;
    }
    public String getStatusCd() {
        return statusCd;
    }
    public void setStatusCd(String statusCd) {
        this.statusCd = statusCd;
    }
}
java110-bean/src/main/java/com/java110/po/workflow/WorkflowPo.java
@@ -12,6 +12,7 @@
    private String flowName;
    private String flowType;
    private String processDefinitionKey;
    private String statusCd;
    public String getSkipLevel() {
        return skipLevel;
@@ -76,4 +77,12 @@
    public void setProcessDefinitionKey(String processDefinitionKey) {
        this.processDefinitionKey = processDefinitionKey;
    }
    public String getStatusCd() {
        return statusCd;
    }
    public void setStatusCd(String statusCd) {
        this.statusCd = statusCd;
    }
}
java110-db/src/main/resources/mapper/common/WorkflowV1ServiceDaoImplMapper.xml
New file
@@ -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="workflowV1ServiceDaoImpl">
    <!-- 保存工作流程信息 add by wuxw 2018-07-03 -->
    <insert id="saveWorkflowInfo" parameterType="Map">
        insert into workflow(
skip_level,describle,community_id,store_id,flow_id,flow_name,flow_type,process_definition_key
) values (
#{skipLevel},#{describle},#{communityId},#{storeId},#{flowId},#{flowName},#{flowType},#{processDefinitionKey}
)
    </insert>
    <!-- 查询工作流程信息 add by wuxw 2018-07-03 -->
    <select id="getWorkflowInfo" parameterType="Map" resultType="Map">
        select  t.skip_level,t.skip_level skipLevel,t.describle,t.status_cd,t.status_cd statusCd,t.community_id,t.community_id communityId,t.store_id,t.store_id storeId,t.flow_id,t.flow_id flowId,t.flow_name,t.flow_name flowName,t.flow_type,t.flow_type flowType,t.process_definition_key,t.process_definition_key processDefinitionKey
from workflow t
where 1 =1
<if test="skipLevel !=null and skipLevel != ''">
   and t.skip_level= #{skipLevel}
</if>
<if test="describle !=null and describle != ''">
   and t.describle= #{describle}
</if>
<if test="statusCd !=null and statusCd != ''">
   and t.status_cd= #{statusCd}
</if>
<if test="communityId !=null and communityId != ''">
   and t.community_id= #{communityId}
</if>
<if test="storeId !=null and storeId != ''">
   and t.store_id= #{storeId}
</if>
<if test="flowId !=null and flowId != ''">
   and t.flow_id= #{flowId}
</if>
<if test="flowName !=null and flowName != ''">
   and t.flow_name= #{flowName}
</if>
<if test="flowType !=null and flowType != ''">
   and t.flow_type= #{flowType}
</if>
<if test="processDefinitionKey !=null and processDefinitionKey != ''">
   and t.process_definition_key= #{processDefinitionKey}
</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="updateWorkflowInfo" parameterType="Map">
        update  workflow t set t.status_cd = #{statusCd}
<if test="newBId != null and newBId != ''">
,t.b_id = #{newBId}
</if>
<if test="skipLevel !=null and skipLevel != ''">
, t.skip_level= #{skipLevel}
</if>
<if test="describle !=null and describle != ''">
, t.describle= #{describle}
</if>
<if test="communityId !=null and communityId != ''">
, t.community_id= #{communityId}
</if>
<if test="storeId !=null and storeId != ''">
, t.store_id= #{storeId}
</if>
<if test="flowName !=null and flowName != ''">
, t.flow_name= #{flowName}
</if>
<if test="flowType !=null and flowType != ''">
, t.flow_type= #{flowType}
</if>
<if test="processDefinitionKey !=null and processDefinitionKey != ''">
, t.process_definition_key= #{processDefinitionKey}
</if>
 where 1=1 <if test="flowId !=null and flowId != ''">
and t.flow_id= #{flowId}
</if>
    </update>
    <!-- 查询工作流程数量 add by wuxw 2018-07-03 -->
     <select id="queryWorkflowsCount" parameterType="Map" resultType="Map">
        select  count(1) count
from workflow t
where 1 =1
<if test="skipLevel !=null and skipLevel != ''">
   and t.skip_level= #{skipLevel}
</if>
<if test="describle !=null and describle != ''">
   and t.describle= #{describle}
</if>
<if test="statusCd !=null and statusCd != ''">
   and t.status_cd= #{statusCd}
</if>
<if test="communityId !=null and communityId != ''">
   and t.community_id= #{communityId}
</if>
<if test="storeId !=null and storeId != ''">
   and t.store_id= #{storeId}
</if>
<if test="flowId !=null and flowId != ''">
   and t.flow_id= #{flowId}
</if>
<if test="flowName !=null and flowName != ''">
   and t.flow_name= #{flowName}
</if>
<if test="flowType !=null and flowType != ''">
   and t.flow_type= #{flowType}
</if>
<if test="processDefinitionKey !=null and processDefinitionKey != ''">
   and t.process_definition_key= #{processDefinitionKey}
</if>
     </select>
</mapper>
java110-db/src/main/resources/mapper/community/CommunityAttrV1ServiceDaoImplMapper.xml
New file
@@ -0,0 +1,97 @@
<?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="communityAttrV1ServiceDaoImpl">
    <!-- 保存小区属性信息 add by wuxw 2018-07-03 -->
    <insert id="saveCommunityAttrInfo" parameterType="Map">
        insert into s_community_attr(
attr_id,spec_cd,community_id,value
) values (
#{attrId},#{specCd},#{communityId},#{value}
)
    </insert>
    <!-- 查询小区属性信息 add by wuxw 2018-07-03 -->
    <select id="getCommunityAttrInfo" parameterType="Map" resultType="Map">
        select  t.attr_id,t.attr_id attrId,t.spec_cd,t.spec_cd specCd,t.status_cd,t.status_cd statusCd,t.community_id,t.community_id communityId,t.value
from s_community_attr t
where 1 =1
<if test="attrId !=null and attrId != ''">
   and t.attr_id= #{attrId}
</if>
<if test="specCd !=null and specCd != ''">
   and t.spec_cd= #{specCd}
</if>
<if test="statusCd !=null and statusCd != ''">
   and t.status_cd= #{statusCd}
</if>
<if test="communityId !=null and communityId != ''">
   and t.community_id= #{communityId}
</if>
<if test="value !=null and value != ''">
   and t.value= #{value}
</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="updateCommunityAttrInfo" parameterType="Map">
        update  s_community_attr t set t.status_cd = #{statusCd}
<if test="newBId != null and newBId != ''">
,t.b_id = #{newBId}
</if>
<if test="specCd !=null and specCd != ''">
, t.spec_cd= #{specCd}
</if>
<if test="communityId !=null and communityId != ''">
, t.community_id= #{communityId}
</if>
<if test="value !=null and value != ''">
, t.value= #{value}
</if>
 where 1=1 <if test="attrId !=null and attrId != ''">
and t.attr_id= #{attrId}
</if>
    </update>
    <!-- 查询小区属性数量 add by wuxw 2018-07-03 -->
     <select id="queryCommunityAttrsCount" parameterType="Map" resultType="Map">
        select  count(1) count
from s_community_attr t
where 1 =1
<if test="attrId !=null and attrId != ''">
   and t.attr_id= #{attrId}
</if>
<if test="specCd !=null and specCd != ''">
   and t.spec_cd= #{specCd}
</if>
<if test="statusCd !=null and statusCd != ''">
   and t.status_cd= #{statusCd}
</if>
<if test="communityId !=null and communityId != ''">
   and t.community_id= #{communityId}
</if>
<if test="value !=null and value != ''">
   and t.value= #{value}
</if>
     </select>
</mapper>
java110-db/src/main/resources/mapper/community/CommunityMemberV1ServiceDaoImplMapper.xml
New file
@@ -0,0 +1,110 @@
<?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="communityMemberV1ServiceDaoImpl">
    <!-- 保存小区成员信息 add by wuxw 2018-07-03 -->
    <insert id="saveCommunityMemberInfo" parameterType="Map">
        insert into s_community_member(
        member_type_cd,start_time,end_time,community_id,community_member_id,member_id
        ) values (
        #{memberTypeCd},#{startTime},#{endTime},#{communityId},#{communityMemberId},#{memberId}
        )
    </insert>
    <!-- 查询小区成员信息 add by wuxw 2018-07-03 -->
    <select id="getCommunityMemberInfo" parameterType="Map" resultType="Map">
        select t.member_type_cd,t.member_type_cd memberTypeCd,t.status_cd,t.status_cd statusCd,t.start_time,t.start_time
        startTime,t.end_time,t.end_time endTime,t.community_id,t.community_id
        communityId,t.community_member_id,t.community_member_id communityMemberId,t.member_id,t.member_id memberId
        from s_community_member t
        where 1 =1
        <if test="memberTypeCd !=null and memberTypeCd != ''">
            and t.member_type_cd= #{memberTypeCd}
        </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="endTime !=null and endTime != ''">
            and t.end_time= #{endTime}
        </if>
        <if test="communityId !=null and communityId != ''">
            and t.community_id= #{communityId}
        </if>
        <if test="communityMemberId !=null and communityMemberId != ''">
            and t.community_member_id= #{communityMemberId}
        </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="updateCommunityMemberInfo" parameterType="Map">
        update s_community_member t set t.status_cd = #{statusCd}
        <if test="newBId != null and newBId != ''">
            ,t.b_id = #{newBId}
        </if>
        <if test="memberTypeCd !=null and memberTypeCd != ''">
            , t.member_type_cd= #{memberTypeCd}
        </if>
        <if test="startTime !=null and startTime != ''">
            , t.start_time= #{startTime}
        </if>
        <if test="endTime !=null and endTime != ''">
            , t.end_time= #{endTime}
        </if>
        <if test="communityId !=null and communityId != ''">
            , t.community_id= #{communityId}
        </if>
        <if test="communityMemberId !=null and communityMemberId != ''">
            , t.community_member_id= #{communityMemberId}
        </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="queryCommunityMembersCount" parameterType="Map" resultType="Map">
        select count(1) count
        from s_community_member t
        where 1 =1
        <if test="memberTypeCd !=null and memberTypeCd != ''">
            and t.member_type_cd= #{memberTypeCd}
        </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="endTime !=null and endTime != ''">
            and t.end_time= #{endTime}
        </if>
        <if test="communityId !=null and communityId != ''">
            and t.community_id= #{communityId}
        </if>
        <if test="communityMemberId !=null and communityMemberId != ''">
            and t.community_member_id= #{communityMemberId}
        </if>
        <if test="memberId !=null and memberId != ''">
            and t.member_id= #{memberId}
        </if>
    </select>
</mapper>
java110-db/src/main/resources/mapper/community/CommunityV1ServiceDaoImplMapper.xml
New file
@@ -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="communityV1ServiceDaoImpl">
    <!-- 保存小区管理信息 add by wuxw 2018-07-03 -->
    <insert id="saveCommunityInfo" parameterType="Map">
        insert into s_community(
fee_price,address,city_code,map_y,pay_fee_month,map_x,nearby_landmarks,name,tel,state,community_id,community_area
) values (
#{feePrice},#{address},#{cityCode},#{mapY},#{payFeeMonth},#{mapX},#{nearbyLandmarks},#{name},#{tel},#{state},#{communityId},#{communityArea}
)
    </insert>
    <!-- 查询小区管理信息 add by wuxw 2018-07-03 -->
    <select id="getCommunityInfo" parameterType="Map" resultType="Map">
        select  t.fee_price,t.fee_price feePrice,t.address,t.city_code,t.city_code cityCode,t.status_cd,t.status_cd statusCd,t.map_y,t.map_y mapY,t.pay_fee_month,t.pay_fee_month payFeeMonth,t.map_x,t.map_x mapX,t.nearby_landmarks,t.nearby_landmarks nearbyLandmarks,t.name,t.tel,t.state,t.community_id,t.community_id communityId,t.community_area,t.community_area communityArea
from s_community t
where 1 =1
<if test="feePrice !=null and feePrice != ''">
   and t.fee_price= #{feePrice}
</if>
<if test="address !=null and address != ''">
   and t.address= #{address}
</if>
<if test="cityCode !=null and cityCode != ''">
   and t.city_code= #{cityCode}
</if>
<if test="statusCd !=null and statusCd != ''">
   and t.status_cd= #{statusCd}
</if>
<if test="mapY !=null and mapY != ''">
   and t.map_y= #{mapY}
</if>
<if test="payFeeMonth !=null and payFeeMonth != ''">
   and t.pay_fee_month= #{payFeeMonth}
</if>
<if test="mapX !=null and mapX != ''">
   and t.map_x= #{mapX}
</if>
<if test="nearbyLandmarks !=null and nearbyLandmarks != ''">
   and t.nearby_landmarks= #{nearbyLandmarks}
</if>
<if test="name !=null and name != ''">
   and t.name= #{name}
</if>
<if test="tel !=null and tel != ''">
   and t.tel= #{tel}
</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="communityArea !=null and communityArea != ''">
   and t.community_area= #{communityArea}
</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="updateCommunityInfo" parameterType="Map">
        update  s_community t set t.status_cd = #{statusCd}
<if test="newBId != null and newBId != ''">
,t.b_id = #{newBId}
</if>
<if test="feePrice !=null and feePrice != ''">
, t.fee_price= #{feePrice}
</if>
<if test="address !=null and address != ''">
, t.address= #{address}
</if>
<if test="cityCode !=null and cityCode != ''">
, t.city_code= #{cityCode}
</if>
<if test="mapY !=null and mapY != ''">
, t.map_y= #{mapY}
</if>
<if test="payFeeMonth !=null and payFeeMonth != ''">
, t.pay_fee_month= #{payFeeMonth}
</if>
<if test="mapX !=null and mapX != ''">
, t.map_x= #{mapX}
</if>
<if test="nearbyLandmarks !=null and nearbyLandmarks != ''">
, t.nearby_landmarks= #{nearbyLandmarks}
</if>
<if test="name !=null and name != ''">
, t.name= #{name}
</if>
<if test="tel !=null and tel != ''">
, t.tel= #{tel}
</if>
<if test="state !=null and state != ''">
, t.state= #{state}
</if>
<if test="communityArea !=null and communityArea != ''">
, t.community_area= #{communityArea}
</if>
 where 1=1 <if test="communityId !=null and communityId != ''">
and t.community_id= #{communityId}
</if>
    </update>
    <!-- 查询小区管理数量 add by wuxw 2018-07-03 -->
     <select id="queryCommunitysCount" parameterType="Map" resultType="Map">
        select  count(1) count
from s_community t
where 1 =1
<if test="feePrice !=null and feePrice != ''">
   and t.fee_price= #{feePrice}
</if>
<if test="address !=null and address != ''">
   and t.address= #{address}
</if>
<if test="cityCode !=null and cityCode != ''">
   and t.city_code= #{cityCode}
</if>
<if test="statusCd !=null and statusCd != ''">
   and t.status_cd= #{statusCd}
</if>
<if test="mapY !=null and mapY != ''">
   and t.map_y= #{mapY}
</if>
<if test="payFeeMonth !=null and payFeeMonth != ''">
   and t.pay_fee_month= #{payFeeMonth}
</if>
<if test="mapX !=null and mapX != ''">
   and t.map_x= #{mapX}
</if>
<if test="nearbyLandmarks !=null and nearbyLandmarks != ''">
   and t.nearby_landmarks= #{nearbyLandmarks}
</if>
<if test="name !=null and name != ''">
   and t.name= #{name}
</if>
<if test="tel !=null and tel != ''">
   and t.tel= #{tel}
</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="communityArea !=null and communityArea != ''">
   and t.community_area= #{communityArea}
</if>
     </select>
</mapper>
java110-db/src/main/resources/mapper/fee/PayFeeConfigV1ServiceDaoImplMapper.xml
New file
@@ -0,0 +1,195 @@
<?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="payFeeConfigV1ServiceDaoImpl">
    <!-- 保存收费项目信息 add by wuxw 2018-07-03 -->
    <insert id="savePayFeeConfigInfo" parameterType="Map">
        insert into pay_fee_config(
        fee_type_cd,computing_formula,additional_amount,bill_type,computing_formula_text,square_price,payment_cd,is_default,config_id,fee_flag,fee_name,payment_cycle,start_time,end_time,community_id
        ) values (
        #{feeTypeCd},#{computingFormula},#{additionalAmount},#{billType},#{computingFormulaText},#{squarePrice},#{paymentCd},#{isDefault},#{configId},#{feeFlag},#{feeName},#{paymentCycle},#{startTime},#{endTime},#{communityId}
        )
    </insert>
    <!-- 查询收费项目信息 add by wuxw 2018-07-03 -->
    <select id="getPayFeeConfigInfo" parameterType="Map" resultType="Map">
        select t.fee_type_cd,t.fee_type_cd feeTypeCd,t.computing_formula,t.computing_formula
        computingFormula,t.additional_amount,t.additional_amount additionalAmount,t.bill_type,t.bill_type
        billType,t.computing_formula_text,t.computing_formula_text computingFormulaText,t.status_cd,t.status_cd
        statusCd,t.square_price,t.square_price squarePrice,t.payment_cd,t.payment_cd paymentCd,t.is_default,t.is_default
        isDefault,t.config_id,t.config_id configId,t.fee_flag,t.fee_flag feeFlag,t.fee_name,t.fee_name
        feeName,t.payment_cycle,t.payment_cycle paymentCycle,t.start_time,t.start_time startTime,t.end_time,t.end_time
        endTime,t.community_id,t.community_id communityId
        from pay_fee_config t
        where 1 =1
        <if test="feeTypeCd !=null and feeTypeCd != ''">
            and t.fee_type_cd= #{feeTypeCd}
        </if>
        <if test="computingFormula !=null and computingFormula != ''">
            and t.computing_formula= #{computingFormula}
        </if>
        <if test="additionalAmount !=null and additionalAmount != ''">
            and t.additional_amount= #{additionalAmount}
        </if>
        <if test="billType !=null and billType != ''">
            and t.bill_type= #{billType}
        </if>
        <if test="computingFormulaText !=null and computingFormulaText != ''">
            and t.computing_formula_text= #{computingFormulaText}
        </if>
        <if test="statusCd !=null and statusCd != ''">
            and t.status_cd= #{statusCd}
        </if>
        <if test="squarePrice !=null and squarePrice != ''">
            and t.square_price= #{squarePrice}
        </if>
        <if test="paymentCd !=null and paymentCd != ''">
            and t.payment_cd= #{paymentCd}
        </if>
        <if test="isDefault !=null and isDefault != ''">
            and t.is_default= #{isDefault}
        </if>
        <if test="configId !=null and configId != ''">
            and t.config_id= #{configId}
        </if>
        <if test="feeFlag !=null and feeFlag != ''">
            and t.fee_flag= #{feeFlag}
        </if>
        <if test="feeName !=null and feeName != ''">
            and t.fee_name= #{feeName}
        </if>
        <if test="paymentCycle !=null and paymentCycle != ''">
            and t.payment_cycle= #{paymentCycle}
        </if>
        <if test="startTime !=null and startTime != ''">
            and t.start_time= #{startTime}
        </if>
        <if test="endTime !=null and endTime != ''">
            and t.end_time= #{endTime}
        </if>
        <if test="communityId !=null and communityId != ''">
            and t.community_id= #{communityId}
        </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="updatePayFeeConfigInfo" parameterType="Map">
        update pay_fee_config t set t.status_cd = #{statusCd}
        <if test="newBId != null and newBId != ''">
            ,t.b_id = #{newBId}
        </if>
        <if test="feeTypeCd !=null and feeTypeCd != ''">
            , t.fee_type_cd= #{feeTypeCd}
        </if>
        <if test="computingFormula !=null and computingFormula != ''">
            , t.computing_formula= #{computingFormula}
        </if>
        <if test="additionalAmount !=null and additionalAmount != ''">
            , t.additional_amount= #{additionalAmount}
        </if>
        <if test="billType !=null and billType != ''">
            , t.bill_type= #{billType}
        </if>
        <if test="computingFormulaText !=null and computingFormulaText != ''">
            , t.computing_formula_text= #{computingFormulaText}
        </if>
        <if test="squarePrice !=null and squarePrice != ''">
            , t.square_price= #{squarePrice}
        </if>
        <if test="paymentCd !=null and paymentCd != ''">
            , t.payment_cd= #{paymentCd}
        </if>
        <if test="isDefault !=null and isDefault != ''">
            , t.is_default= #{isDefault}
        </if>
        <if test="feeFlag !=null and feeFlag != ''">
            , t.fee_flag= #{feeFlag}
        </if>
        <if test="feeName !=null and feeName != ''">
            , t.fee_name= #{feeName}
        </if>
        <if test="paymentCycle !=null and paymentCycle != ''">
            , t.payment_cycle= #{paymentCycle}
        </if>
        <if test="startTime !=null and startTime != ''">
            , t.start_time= #{startTime}
        </if>
        <if test="endTime !=null and endTime != ''">
            , t.end_time= #{endTime}
        </if>
        <if test="communityId !=null and communityId != ''">
            , t.community_id= #{communityId}
        </if>
        where 1=1
        <if test="configId !=null and configId != ''">
            and t.config_id= #{configId}
        </if>
    </update>
    <!-- 查询收费项目数量 add by wuxw 2018-07-03 -->
    <select id="queryPayFeeConfigsCount" parameterType="Map" resultType="Map">
        select count(1) count
        from pay_fee_config t
        where 1 =1
        <if test="feeTypeCd !=null and feeTypeCd != ''">
            and t.fee_type_cd= #{feeTypeCd}
        </if>
        <if test="computingFormula !=null and computingFormula != ''">
            and t.computing_formula= #{computingFormula}
        </if>
        <if test="additionalAmount !=null and additionalAmount != ''">
            and t.additional_amount= #{additionalAmount}
        </if>
        <if test="billType !=null and billType != ''">
            and t.bill_type= #{billType}
        </if>
        <if test="computingFormulaText !=null and computingFormulaText != ''">
            and t.computing_formula_text= #{computingFormulaText}
        </if>
        <if test="statusCd !=null and statusCd != ''">
            and t.status_cd= #{statusCd}
        </if>
        <if test="squarePrice !=null and squarePrice != ''">
            and t.square_price= #{squarePrice}
        </if>
        <if test="paymentCd !=null and paymentCd != ''">
            and t.payment_cd= #{paymentCd}
        </if>
        <if test="isDefault !=null and isDefault != ''">
            and t.is_default= #{isDefault}
        </if>
        <if test="configId !=null and configId != ''">
            and t.config_id= #{configId}
        </if>
        <if test="feeFlag !=null and feeFlag != ''">
            and t.fee_flag= #{feeFlag}
        </if>
        <if test="feeName !=null and feeName != ''">
            and t.fee_name= #{feeName}
        </if>
        <if test="paymentCycle !=null and paymentCycle != ''">
            and t.payment_cycle= #{paymentCycle}
        </if>
        <if test="startTime !=null and startTime != ''">
            and t.start_time= #{startTime}
        </if>
        <if test="endTime !=null and endTime != ''">
            and t.end_time= #{endTime}
        </if>
        <if test="communityId !=null and communityId != ''">
            and t.community_id= #{communityId}
        </if>
    </select>
</mapper>
java110-generator/src/main/java/com/java110/code/TableToJson.java
@@ -7,12 +7,18 @@
public class TableToJson {
    //show create table c_orders  用这个语句获取
    public static final String createTableSql = "CREATE TABLE `fee_print_page_template` (\n" +
            "  `template_id` varchar(30) NOT NULL COMMENT '页面ID',\n" +
            "  `name` varchar(128) NOT NULL COMMENT '名称',\n" +
            "  `url` varchar(512) NOT NULL COMMENT '收据页面',\n" +
    public static final String createTableSql = "CREATE TABLE `workflow` (\n" +
            "  `flow_id` varchar(30) NOT NULL COMMENT '流程ID',\n" +
            "  `flow_name` varchar(200) NOT NULL COMMENT '流程名称',\n" +
            "  `describle` longtext COMMENT '描述',\n" +
            "  `skip_level` varchar(12) NOT NULL COMMENT '跳过',\n" +
            "  `community_id` varchar(30) NOT NULL COMMENT '小区ID,分片',\n" +
            "  `b_id` varchar(30) NOT NULL COMMENT '业务Id',\n" +
            "  `store_id` varchar(30) NOT NULL COMMENT '商户ID,用来做分区',\n" +
            "  `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',\n" +
            "  `status_cd` varchar(2) NOT NULL DEFAULT '0' COMMENT '数据状态 1表示 失效 0 有效'\n" +
            "  `status_cd` varchar(2) NOT NULL DEFAULT '0' COMMENT '数据状态,详细参考t_dict表,0, 在用 1失效',\n" +
            "  `flow_type` varchar(12) NOT NULL COMMENT '流程类型,10001 投诉建议 20002 报修 30003 采购',\n" +
            "  `process_definition_key` varchar(64) DEFAULT NULL COMMENT '工作流部署ID'\n" +
            ")";
    public static void main(String[] args) {
java110-generator/src/main/java/com/java110/code/newBack/BackCoderGeneratorStart.java
@@ -70,7 +70,7 @@
        generatorInnerServiceSMOImpl.generator(data);
        GeneratorDtoBean generatorDtoBean = new GeneratorDtoBean();
        generatorDtoBean.generator(data);
        //generatorDtoBean.generator(data);
        GeneratorIInnerServiceSMO generatorIInnerServiceSMO = new GeneratorIInnerServiceSMO();
        generatorIInnerServiceSMO.generator(data);
java110-generator/src/main/java/com/java110/code/newBack/GeneratorApiListener.java
@@ -14,7 +14,7 @@
     * @param data
     */
    public void generator(Data data) throws Exception {
        genneratorPo(data);             //API DataVo对象
        //genneratorPo(data);             //API DataVo对象
        genneratorSaveCmd(data);            //Api BmoImpl
        genneratorUpdateBmoImpl(data);            //Api BmoImpl
        genneratorDeleteBmoImpl(data);            //Api BmoImpl
java110-generator/src/main/resources/newBack/template_1.json
@@ -1,26 +1,51 @@
{
  "name": "feePrintPageTemplate",
  "shareColumn": "template_id",
  "id": "templateId",
  "shareName": "fee",
  "autoMove": true,
  "desc": "收据模板",
  "shareParam": "templateId",
  "tableName": "fee_print_page_template",
  "param": {
    "name": "name",
    "skipLevel": "skip_level",
    "describle": "describle",
    "statusCd": "status_cd",
    "templateId": "template_id",
    "url": "url"
    "communityId": "community_id",
    "storeId": "store_id",
    "flowId": "flow_id",
    "flowName": "flow_name",
    "flowType": "flow_type",
    "processDefinitionKey": "process_definition_key"
  },
  "name": "workflow",
  "shareColumn": "community_id",
  "id": "flowId",
  "shareName": "common",
  "autoMove": true,
  "required": [
    {
      "msg": "名称不能为空",
      "code": "name"
      "msg": "流程ID不能为空",
      "code": "flowId"
    },
    {
      "msg": "收据页面不能为空",
      "code": "url"
      "msg": "流程名称不能为空",
      "code": "flowName"
    },
    {
      "msg": "跳过不能为空",
      "code": "skipLevel"
    },
    {
      "msg": "小区ID不能为空",
      "code": "communityId"
    },
    {
      "msg": "商户ID,用来做分区不能为空",
      "code": "storeId"
    },
    {
      "msg": "数据状态不能为空",
      "code": "statusCd"
    },
    {
      "msg": "流程类型不能为空",
      "code": "flowType"
    }
  ]
  ],
  "desc": "工作流程",
  "shareParam": "communityId",
  "tableName": "workflow"
}
java110-interface/src/main/java/com/java110/intf/common/IWorkflowV1InnerServiceSMO.java
New file
@@ -0,0 +1,68 @@
/*
 * Copyright 2017-2020 吴学文 and java110 team.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.java110.intf.common;
import com.java110.config.feign.FeignConfiguration;
import com.java110.dto.workflow.WorkflowDto;
import com.java110.po.workflow.WorkflowPo;
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-18 13:35:13 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 = "common-service", configuration = {FeignConfiguration.class})
@RequestMapping("/workflowV1Api")
public interface IWorkflowV1InnerServiceSMO {
    @RequestMapping(value = "/saveWorkflow", method = RequestMethod.POST)
    public int saveWorkflow(@RequestBody  WorkflowPo workflowPo);
    @RequestMapping(value = "/updateWorkflow", method = RequestMethod.POST)
    public int updateWorkflow(@RequestBody  WorkflowPo workflowPo);
    @RequestMapping(value = "/deleteWorkflow", method = RequestMethod.POST)
    public int deleteWorkflow(@RequestBody  WorkflowPo workflowPo);
    /**
     * <p>查询小区楼信息</p>
     *
     *
     * @param workflowDto 数据对象分享
     * @return WorkflowDto 对象数据
     */
    @RequestMapping(value = "/queryWorkflows", method = RequestMethod.POST)
    List<WorkflowDto> queryWorkflows(@RequestBody WorkflowDto workflowDto);
    /**
     * 查询<p>小区楼</p>总记录数
     *
     * @param workflowDto 数据对象分享
     * @return 小区下的小区楼记录数
     */
    @RequestMapping(value = "/queryWorkflowsCount", method = RequestMethod.POST)
    int queryWorkflowsCount(@RequestBody WorkflowDto workflowDto);
}
java110-interface/src/main/java/com/java110/intf/community/ICommunityAttrV1InnerServiceSMO.java
New file
@@ -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.community.CommunityAttrDto;
import com.java110.po.community.CommunityAttrPo;
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-18 13:17:11 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("/communityAttrV1Api")
public interface ICommunityAttrV1InnerServiceSMO {
    @RequestMapping(value = "/saveCommunityAttr", method = RequestMethod.POST)
    public int saveCommunityAttr(@RequestBody CommunityAttrPo communityAttrPo);
    @RequestMapping(value = "/updateCommunityAttr", method = RequestMethod.POST)
    public int updateCommunityAttr(@RequestBody  CommunityAttrPo communityAttrPo);
    @RequestMapping(value = "/deleteCommunityAttr", method = RequestMethod.POST)
    public int deleteCommunityAttr(@RequestBody  CommunityAttrPo communityAttrPo);
    /**
     * <p>查询小区楼信息</p>
     *
     *
     * @param communityAttrDto 数据对象分享
     * @return CommunityAttrDto 对象数据
     */
    @RequestMapping(value = "/queryCommunityAttrs", method = RequestMethod.POST)
    List<CommunityAttrDto> queryCommunityAttrs(@RequestBody CommunityAttrDto communityAttrDto);
    /**
     * 查询<p>小区楼</p>总记录数
     *
     * @param communityAttrDto 数据对象分享
     * @return 小区下的小区楼记录数
     */
    @RequestMapping(value = "/queryCommunityAttrsCount", method = RequestMethod.POST)
    int queryCommunityAttrsCount(@RequestBody CommunityAttrDto communityAttrDto);
}
java110-interface/src/main/java/com/java110/intf/community/ICommunityMemberV1InnerServiceSMO.java
New file
@@ -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.CommunityMemberDto;
import com.java110.po.community.CommunityMemberPo;
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-18 13:07:56 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("/communityMemberV1Api")
public interface ICommunityMemberV1InnerServiceSMO {
    @RequestMapping(value = "/saveCommunityMember", method = RequestMethod.POST)
    public int saveCommunityMember(@RequestBody CommunityMemberPo communityMemberPo);
    @RequestMapping(value = "/updateCommunityMember", method = RequestMethod.POST)
    public int updateCommunityMember(@RequestBody  CommunityMemberPo communityMemberPo);
    @RequestMapping(value = "/deleteCommunityMember", method = RequestMethod.POST)
    public int deleteCommunityMember(@RequestBody  CommunityMemberPo communityMemberPo);
    /**
     * <p>查询小区楼信息</p>
     *
     *
     * @param communityMemberDto 数据对象分享
     * @return CommunityMemberDto 对象数据
     */
    @RequestMapping(value = "/queryCommunityMembers", method = RequestMethod.POST)
    List<CommunityMemberDto> queryCommunityMembers(@RequestBody CommunityMemberDto communityMemberDto);
    /**
     * 查询<p>小区楼</p>总记录数
     *
     * @param communityMemberDto 数据对象分享
     * @return 小区下的小区楼记录数
     */
    @RequestMapping(value = "/queryCommunityMembersCount", method = RequestMethod.POST)
    int queryCommunityMembersCount(@RequestBody CommunityMemberDto communityMemberDto);
}
java110-interface/src/main/java/com/java110/intf/community/ICommunityV1InnerServiceSMO.java
New file
@@ -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.community.CommunityDto;
import com.java110.po.community.CommunityPo;
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-18 12:54:57 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("/communityV1Api")
public interface ICommunityV1InnerServiceSMO {
    @RequestMapping(value = "/saveCommunity", method = RequestMethod.POST)
    public int saveCommunity(@RequestBody  CommunityPo communityPo);
    @RequestMapping(value = "/updateCommunity", method = RequestMethod.POST)
    public int updateCommunity(@RequestBody  CommunityPo communityPo);
    @RequestMapping(value = "/deleteCommunity", method = RequestMethod.POST)
    public int deleteCommunity(@RequestBody  CommunityPo communityPo);
    /**
     * <p>查询小区楼信息</p>
     *
     *
     * @param communityDto 数据对象分享
     * @return CommunityDto 对象数据
     */
    @RequestMapping(value = "/queryCommunitys", method = RequestMethod.POST)
    List<CommunityDto> queryCommunitys(@RequestBody CommunityDto communityDto);
    /**
     * 查询<p>小区楼</p>总记录数
     *
     * @param communityDto 数据对象分享
     * @return 小区下的小区楼记录数
     */
    @RequestMapping(value = "/queryCommunitysCount", method = RequestMethod.POST)
    int queryCommunitysCount(@RequestBody CommunityDto communityDto);
}
java110-interface/src/main/java/com/java110/intf/fee/IPayFeeConfigV1InnerServiceSMO.java
New file
@@ -0,0 +1,67 @@
/*
 * 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.fee;
import com.java110.config.feign.FeignConfiguration;
import com.java110.dto.fee.FeeConfigDto;
import com.java110.po.fee.PayFeeConfigPo;
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-18 13:28:12 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 = "fee-service", configuration = {FeignConfiguration.class})
@RequestMapping("/payFeeConfigV1Api")
public interface IPayFeeConfigV1InnerServiceSMO {
    @RequestMapping(value = "/savePayFeeConfig", method = RequestMethod.POST)
    public int savePayFeeConfig(@RequestBody PayFeeConfigPo payFeeConfigPo);
    @RequestMapping(value = "/updatePayFeeConfig", method = RequestMethod.POST)
    public int updatePayFeeConfig(@RequestBody PayFeeConfigPo payFeeConfigPo);
    @RequestMapping(value = "/deletePayFeeConfig", method = RequestMethod.POST)
    public int deletePayFeeConfig(@RequestBody PayFeeConfigPo payFeeConfigPo);
    /**
     * <p>查询小区楼信息</p>
     *
     * @param payFeeConfigDto 数据对象分享
     * @return PayFeeConfigDto 对象数据
     */
    @RequestMapping(value = "/queryPayFeeConfigs", method = RequestMethod.POST)
    List<FeeConfigDto> queryPayFeeConfigs(@RequestBody FeeConfigDto payFeeConfigDto);
    /**
     * 查询<p>小区楼</p>总记录数
     *
     * @param payFeeConfigDto 数据对象分享
     * @return 小区下的小区楼记录数
     */
    @RequestMapping(value = "/queryPayFeeConfigsCount", method = RequestMethod.POST)
    int queryPayFeeConfigsCount(@RequestBody FeeConfigDto payFeeConfigDto);
}
service-common/src/main/java/com/java110/common/CommonServiceApplicationStart.java
@@ -15,8 +15,10 @@
 */
package com.java110.common;
import com.java110.core.annotation.Java110CmdDiscovery;
import com.java110.core.annotation.Java110ListenerDiscovery;
import com.java110.core.client.RestTemplate;
import com.java110.core.event.cmd.ServiceCmdEventPublishing;
import com.java110.core.event.service.BusinessServiceDataFlowEventPublishing;
import com.java110.service.init.ServiceStartInit;
import org.slf4j.Logger;
@@ -58,6 +60,8 @@
@EnableDiscoveryClient
@Java110ListenerDiscovery(listenerPublishClass = BusinessServiceDataFlowEventPublishing.class,
        basePackages = {"com.java110.common.listener"})
@Java110CmdDiscovery(cmdPublishClass = ServiceCmdEventPublishing.class,
        basePackages = {"com.java110.common.cmd"})
@EnableFeignClients(basePackages = {
        "com.java110.intf.user",
        "com.java110.intf.store",
service-common/src/main/java/com/java110/common/cmd/workflow/DeleteWorkflowCmd.java
New file
@@ -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.common.cmd.workflow;
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.common.IWorkflowV1InnerServiceSMO;
import com.java110.po.workflow.WorkflowPo;
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;
/**
 * 类表述:删除
 * 服务编码:workflow.deleteWorkflow
 * 请求路劲:/app/workflow.DeleteWorkflow
 * add by 吴学文 at 2021-09-18 13:35:13 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 = "workflow.deleteWorkflow")
public class DeleteWorkflowCmd extends AbstractServiceCmdListener {
  private static Logger logger = LoggerFactory.getLogger(DeleteWorkflowCmd.class);
    @Autowired
    private IWorkflowV1InnerServiceSMO workflowV1InnerServiceSMOImpl;
    @Override
    public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) {
        Assert.hasKeyAndValue(reqJson, "flowId", "flowId不能为空");
Assert.hasKeyAndValue(reqJson, "communityId", "communityId不能为空");
    }
    @Override
    @Java110Transactional
    public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
       WorkflowPo workflowPo = BeanConvertUtil.covertBean(reqJson, WorkflowPo.class);
        int flag = workflowV1InnerServiceSMOImpl.deleteWorkflow(workflowPo);
        if (flag < 1) {
            throw new CmdException("删除数据失败");
        }
        cmdDataFlowContext.setResponseEntity(ResultVo.success());
    }
}
service-common/src/main/java/com/java110/common/cmd/workflow/ListWorkflowCmd.java
New file
@@ -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.common.cmd.workflow;
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.common.IWorkflowV1InnerServiceSMO;
import com.java110.po.workflow.WorkflowPo;
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.workflow.WorkflowDto;
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;
/**
 * 类表述:查询
 * 服务编码:workflow.listWorkflow
 * 请求路劲:/app/workflow.ListWorkflow
 * add by 吴学文 at 2021-09-18 13:35:13 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 = "workflow.listWorkflow")
public class ListWorkflowCmd extends AbstractServiceCmdListener {
  private static Logger logger = LoggerFactory.getLogger(ListWorkflowCmd.class);
    @Autowired
    private IWorkflowV1InnerServiceSMO workflowV1InnerServiceSMOImpl;
    @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 {
           WorkflowDto workflowDto = BeanConvertUtil.covertBean(reqJson, WorkflowDto.class);
           int count = workflowV1InnerServiceSMOImpl.queryWorkflowsCount(workflowDto);
           List<WorkflowDto> workflowDtos = null;
           if (count > 0) {
               workflowDtos = workflowV1InnerServiceSMOImpl.queryWorkflows(workflowDto);
           } else {
               workflowDtos = new ArrayList<>();
           }
           ResultVo resultVo = new ResultVo((int) Math.ceil((double) count / (double) reqJson.getInteger("row")), count, workflowDtos);
           ResponseEntity<String> responseEntity = new ResponseEntity<String>(resultVo.toString(), HttpStatus.OK);
           cmdDataFlowContext.setResponseEntity(responseEntity);
    }
}
service-common/src/main/java/com/java110/common/cmd/workflow/SaveWorkflowCmd.java
New file
@@ -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.common.cmd.workflow;
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.common.IWorkflowV1InnerServiceSMO;
import com.java110.po.workflow.WorkflowPo;
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;
/**
 * 类表述:保存
 * 服务编码:workflow.saveWorkflow
 * 请求路劲:/app/workflow.SaveWorkflow
 * add by 吴学文 at 2021-09-18 13:35:13 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 = "workflow.saveWorkflow")
public class SaveWorkflowCmd extends AbstractServiceCmdListener {
    private static Logger logger = LoggerFactory.getLogger(SaveWorkflowCmd.class);
    public static final String CODE_PREFIX_ID = "10";
    @Autowired
    private IWorkflowV1InnerServiceSMO workflowV1InnerServiceSMOImpl;
    @Override
    public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) {
        Assert.hasKeyAndValue(reqJson, "flowId", "请求报文中未包含flowId");
Assert.hasKeyAndValue(reqJson, "flowName", "请求报文中未包含flowName");
Assert.hasKeyAndValue(reqJson, "skipLevel", "请求报文中未包含skipLevel");
Assert.hasKeyAndValue(reqJson, "communityId", "请求报文中未包含communityId");
Assert.hasKeyAndValue(reqJson, "storeId", "请求报文中未包含storeId");
Assert.hasKeyAndValue(reqJson, "statusCd", "请求报文中未包含statusCd");
Assert.hasKeyAndValue(reqJson, "flowType", "请求报文中未包含flowType");
    }
    @Override
    @Java110Transactional
    public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
       WorkflowPo workflowPo = BeanConvertUtil.covertBean(reqJson, WorkflowPo.class);
        workflowPo.setFlowId(GenerateCodeFactory.getGeneratorId(CODE_PREFIX_ID));
        int flag = workflowV1InnerServiceSMOImpl.saveWorkflow(workflowPo);
        if (flag < 1) {
            throw new CmdException("保存数据失败");
        }
        cmdDataFlowContext.setResponseEntity(ResultVo.success());
    }
}
service-common/src/main/java/com/java110/common/cmd/workflow/UpdateWorkflowCmd.java
New file
@@ -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.common.cmd.workflow;
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.common.IWorkflowV1InnerServiceSMO;
import com.java110.po.workflow.WorkflowPo;
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;
/**
 * 类表述:更新
 * 服务编码:workflow.updateWorkflow
 * 请求路劲:/app/workflow.UpdateWorkflow
 * add by 吴学文 at 2021-09-18 13:35:13 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 = "workflow.updateWorkflow")
public class UpdateWorkflowCmd extends AbstractServiceCmdListener {
  private static Logger logger = LoggerFactory.getLogger(UpdateWorkflowCmd.class);
    @Autowired
    private IWorkflowV1InnerServiceSMO workflowV1InnerServiceSMOImpl;
    @Override
    public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) {
        Assert.hasKeyAndValue(reqJson, "flowId", "flowId不能为空");
Assert.hasKeyAndValue(reqJson, "communityId", "communityId不能为空");
    }
    @Override
    @Java110Transactional
    public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
       WorkflowPo workflowPo = BeanConvertUtil.covertBean(reqJson, WorkflowPo.class);
        int flag = workflowV1InnerServiceSMOImpl.updateWorkflow(workflowPo);
        if (flag < 1) {
            throw new CmdException("更新数据失败");
        }
        cmdDataFlowContext.setResponseEntity(ResultVo.success());
    }
}
service-common/src/main/java/com/java110/common/dao/IWorkflowV1ServiceDao.java
New file
@@ -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.common.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-18 13:35:13 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 IWorkflowV1ServiceDao {
    /**
     * 保存 工作流程信息
     * @param info
     * @throws DAOException DAO异常
     */
    int saveWorkflowInfo(Map info) throws DAOException;
    /**
     * 查询工作流程信息(instance过程)
     * 根据bId 查询工作流程信息
     * @param info bId 信息
     * @return 工作流程信息
     * @throws DAOException DAO异常
     */
    List<Map> getWorkflowInfo(Map info) throws DAOException;
    /**
     * 修改工作流程信息
     * @param info 修改信息
     * @throws DAOException DAO异常
     */
    int updateWorkflowInfo(Map info) throws DAOException;
    /**
     * 查询工作流程总数
     *
     * @param info 工作流程信息
     * @return 工作流程数量
     */
    int queryWorkflowsCount(Map info);
}
service-common/src/main/java/com/java110/common/dao/impl/WorkflowV1ServiceDaoImpl.java
New file
@@ -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.common.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.common.dao.IWorkflowV1ServiceDao;
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-18 13:35:13 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("workflowV1ServiceDaoImpl")
public class WorkflowV1ServiceDaoImpl extends BaseServiceDao implements IWorkflowV1ServiceDao {
    private static Logger logger = LoggerFactory.getLogger(WorkflowV1ServiceDaoImpl.class);
    /**
     * 保存工作流程信息 到 instance
     * @param info   bId 信息
     * @throws DAOException DAO异常
     */
    @Override
    public int saveWorkflowInfo(Map info) throws DAOException {
        logger.debug("保存 saveWorkflowInfo 入参 info : {}",info);
        int saveFlag = sqlSessionTemplate.insert("workflowV1ServiceDaoImpl.saveWorkflowInfo",info);
        return saveFlag;
    }
    /**
     * 查询工作流程信息(instance)
     * @param info bId 信息
     * @return List<Map>
     * @throws DAOException DAO异常
     */
    @Override
    public List<Map> getWorkflowInfo(Map info) throws DAOException {
        logger.debug("查询 getWorkflowInfo 入参 info : {}",info);
        List<Map> businessWorkflowInfos = sqlSessionTemplate.selectList("workflowV1ServiceDaoImpl.getWorkflowInfo",info);
        return businessWorkflowInfos;
    }
    /**
     * 修改工作流程信息
     * @param info 修改信息
     * @throws DAOException DAO异常
     */
    @Override
    public int updateWorkflowInfo(Map info) throws DAOException {
        logger.debug("修改 updateWorkflowInfo 入参 info : {}",info);
        int saveFlag = sqlSessionTemplate.update("workflowV1ServiceDaoImpl.updateWorkflowInfo",info);
        return saveFlag;
    }
     /**
     * 查询工作流程数量
     * @param info 工作流程信息
     * @return 工作流程数量
     */
    @Override
    public int queryWorkflowsCount(Map info) {
        logger.debug("查询 queryWorkflowsCount 入参 info : {}",info);
        List<Map> businessWorkflowInfos = sqlSessionTemplate.selectList("workflowV1ServiceDaoImpl.queryWorkflowsCount", info);
        if (businessWorkflowInfos.size() < 1) {
            return 0;
        }
        return Integer.parseInt(businessWorkflowInfos.get(0).get("count").toString());
    }
}
service-common/src/main/java/com/java110/common/smo/impl/WorkflowV1InnerServiceSMOImpl.java
New file
@@ -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.common.smo.impl;
import com.java110.common.dao.IWorkflowV1ServiceDao;
import com.java110.intf.common.IWorkflowV1InnerServiceSMO;
import com.java110.dto.workflow.WorkflowDto;
import com.java110.po.workflow.WorkflowPo;
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-18 13:35:13 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 WorkflowV1InnerServiceSMOImpl extends BaseServiceSMO implements IWorkflowV1InnerServiceSMO {
    @Autowired
    private IWorkflowV1ServiceDao workflowV1ServiceDaoImpl;
    @Override
    public int saveWorkflow(@RequestBody  WorkflowPo workflowPo) {
        int saveFlag = workflowV1ServiceDaoImpl.saveWorkflowInfo(BeanConvertUtil.beanCovertMap(workflowPo));
        return saveFlag;
    }
     @Override
    public int updateWorkflow(@RequestBody  WorkflowPo workflowPo) {
        int saveFlag = workflowV1ServiceDaoImpl.updateWorkflowInfo(BeanConvertUtil.beanCovertMap(workflowPo));
        return saveFlag;
    }
     @Override
    public int deleteWorkflow(@RequestBody  WorkflowPo workflowPo) {
       workflowPo.setStatusCd("1");
       int saveFlag = workflowV1ServiceDaoImpl.updateWorkflowInfo(BeanConvertUtil.beanCovertMap(workflowPo));
       return saveFlag;
    }
    @Override
    public List<WorkflowDto> queryWorkflows(@RequestBody  WorkflowDto workflowDto) {
        //校验是否传了 分页信息
        int page = workflowDto.getPage();
        if (page != PageDto.DEFAULT_PAGE) {
            workflowDto.setPage((page - 1) * workflowDto.getRow());
        }
        List<WorkflowDto> workflows = BeanConvertUtil.covertBeanList(workflowV1ServiceDaoImpl.getWorkflowInfo(BeanConvertUtil.beanCovertMap(workflowDto)), WorkflowDto.class);
        return workflows;
    }
    @Override
    public int queryWorkflowsCount(@RequestBody WorkflowDto workflowDto) {
        return workflowV1ServiceDaoImpl.queryWorkflowsCount(BeanConvertUtil.beanCovertMap(workflowDto));    }
}
service-community/src/main/java/com/java110/community/bmo/community/ICommunityBMO.java
New file
@@ -0,0 +1,184 @@
package com.java110.community.bmo.community;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.java110.core.context.ICmdDataFlowContext;
/**
 * @ClassName ICommunityBMO
 * @Description TODO
 * @Author wuxw
 * @Date 2020/3/9 21:22
 * @Version 1.0
 * add by wuxw 2020/3/9
 **/
public interface ICommunityBMO {
    /**
     * 添加小区信息
     *
     * @param paramInJson     接口调用放传入入参
     * @param dataFlowContext 数据上下文
     * @return 订单服务能够接受的报文
     */
    public void updateCommunity(JSONObject paramInJson, ICmdDataFlowContext dataFlowContext);
    /**
     * 添加小区信息
     *
     * @param paramInJson     接口调用放传入入参
     * @param dataFlowContext 数据上下文
     * @return 订单服务能够接受的报文
     */
    public void updateCommunityMember(JSONObject paramInJson, ICmdDataFlowContext dataFlowContext);
    /**
     * 添加小区成员
     *
     * @param paramInJson 接口请求数据封装
     * @return 封装好的 data数据
     */
    public JSONObject addCommunityMember(JSONObject paramInJson);
    /**
     * 添加小区成员
     *
     * @param paramInJson 接口请求数据封装
     * @return 封装好的 data数据
     */
    public JSONObject updateComplaint(JSONObject paramInJson);
    /**
     * 添加小区成员
     *
     * @param paramInJson
     * @return
     */
    public JSONObject deleteCommunityMember(JSONObject paramInJson);
    /**
     * 添加小区信息
     *
     * @param paramInJson     接口调用放传入入参
     * @param dataFlowContext 数据上下文
     * @return 订单服务能够接受的报文
     */
    public void deleteCommunity(JSONObject paramInJson, ICmdDataFlowContext dataFlowContext);
    /**
     * 退出小区成员
     *
     * @param paramInJson 接口传入入参
     * @return 订单服务能够接受的报文
     */
    public JSONArray exitCommunityMember(JSONObject paramInJson);
    /**
     * 添加小区信息
     *
     * @param paramInJson     接口调用放传入入参
     * @param dataFlowContext 数据上下文
     * @return 订单服务能够接受的报文
     */
    public void addFeeConfigProperty(JSONObject paramInJson, ICmdDataFlowContext dataFlowContext);
    /**
     * 添加停车费
     *
     * @param paramInJson     接口调用放传入入参
     * @param dataFlowContext 数据上下文
     * @return 订单服务能够接受的报文
     */
    public void addFeeConfigRepair(JSONObject paramInJson, ICmdDataFlowContext dataFlowContext);
    /**
     * 添加小区信息
     *
     * @param paramInJson     接口调用放传入入参
     * @param dataFlowContext 数据上下文
     * @return 订单服务能够接受的报文
     */
    public void addFeeConfigParkingSpaceUpSell(JSONObject paramInJson, ICmdDataFlowContext dataFlowContext);
    /**
     * 添加小区信息
     *
     * @param paramInJson     接口调用放传入入参
     * @param dataFlowContext 数据上下文
     * @return 订单服务能够接受的报文
     */
    public void addFeeConfigParkingSpaceDownSell(JSONObject paramInJson, ICmdDataFlowContext dataFlowContext);
    /**
     * 添加小区信息
     *
     * @param paramInJson     接口调用放传入入参
     * @param dataFlowContext 数据上下文
     * @return 订单服务能够接受的报文
     */
    public void addFeeConfigParkingSpaceUpHire(JSONObject paramInJson, ICmdDataFlowContext dataFlowContext);
    /**
     * 添加小区信息
     *
     * @param paramInJson     接口调用放传入入参
     * @param dataFlowContext 数据上下文
     * @return 订单服务能够接受的报文
     */
    public void addFeeConfigParkingSpaceDownHire(JSONObject paramInJson, ICmdDataFlowContext dataFlowContext);
    /**
     * 添加小区信息
     *
     * @param paramInJson     接口调用放传入入参
     * @param dataFlowContext 数据上下文
     * @return 订单服务能够接受的报文
     */
    public void addFeeConfigParkingSpaceTemp(JSONObject paramInJson, ICmdDataFlowContext dataFlowContext);
    /**
     * 添加小区成员 开发者 代理商 运维 商户
     *
     * @param paramInJson 组装 楼小区关系
     * @return 小区成员信息
     */
    public void addCommunityMembers(JSONObject paramInJson, ICmdDataFlowContext dataFlowContext);
    /**
     * 添加小区信息
     *
     * @param paramInJson     接口调用放传入入参
     * @param dataFlowContext 数据上下文
     * @return 订单服务能够接受的报文
     */
    public void addCommunity(JSONObject paramInJson, ICmdDataFlowContext dataFlowContext);
    /**
     * 添加小区信息
     *
     * @param paramInJson     接口调用放传入入参
     * @param dataFlowContext 数据上下文
     * @return 订单服务能够接受的报文
     */
    public void addAttr(JSONObject paramInJson, ICmdDataFlowContext dataFlowContext);
    /**
     * 添加小区信息
     *
     * @param paramInJson     接口调用放传入入参
     * @param dataFlowContext 数据上下文
     * @return 订单服务能够接受的报文
     */
    public void updateAttr(JSONObject paramInJson, ICmdDataFlowContext dataFlowContext);
    /**
     * 添加小区信息
     *
     * @param paramInJson     接口调用放传入入参
     * @param dataFlowContext 数据上下文
     * @return 订单服务能够接受的报文
     */
    public void updateCommunityOne(JSONObject paramInJson, ICmdDataFlowContext dataFlowContext);
}
service-community/src/main/java/com/java110/community/bmo/community/impl/CommunityBMOImpl.java
New file
@@ -0,0 +1,616 @@
package com.java110.community.bmo.community.impl;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.java110.community.bmo.community.ICommunityBMO;
import com.java110.core.context.ICmdDataFlowContext;
import com.java110.core.factory.GenerateCodeFactory;
import com.java110.dto.CommunityMemberDto;
import com.java110.dto.community.CommunityDto;
import com.java110.dto.workflow.WorkflowDto;
import com.java110.intf.common.IWorkflowInnerServiceSMO;
import com.java110.intf.community.ICommunityAttrV1InnerServiceSMO;
import com.java110.intf.community.ICommunityInnerServiceSMO;
import com.java110.intf.community.ICommunityMemberV1InnerServiceSMO;
import com.java110.intf.community.ICommunityV1InnerServiceSMO;
import com.java110.intf.fee.IPayFeeConfigV1InnerServiceSMO;
import com.java110.po.community.CommunityAttrPo;
import com.java110.po.community.CommunityMemberPo;
import com.java110.po.community.CommunityPo;
import com.java110.po.fee.PayFeeConfigPo;
import com.java110.po.workflow.WorkflowPo;
import com.java110.utils.cache.MappingCache;
import com.java110.utils.constant.*;
import com.java110.utils.exception.ListenerExecuteException;
import com.java110.utils.util.Assert;
import com.java110.utils.util.BeanConvertUtil;
import com.java110.utils.util.DateUtil;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
import java.util.Map;
/**
 * @ClassName CommunityBMOImpl
 * @Description TODO
 * @Author wuxw
 * @Date 2020/3/9 21:22
 * @Version 1.0
 * add by wuxw 2020/3/9
 **/
@Service("communityBMOImpl")
public class CommunityBMOImpl implements ICommunityBMO {
    @Autowired
    private ICommunityV1InnerServiceSMO communityV1InnerServiceSMOImpl;
    @Autowired
    private ICommunityInnerServiceSMO communityInnerServiceSMOImpl;
    @Autowired
    private ICommunityMemberV1InnerServiceSMO communityMemberV1InnerServiceSMOImpl;
    @Autowired
    private ICommunityAttrV1InnerServiceSMO communityAttrV1InnerServiceSMOImpl;
    @Autowired
    private IWorkflowInnerServiceSMO workflowInnerServiceSMOImpl;
    @Autowired
    private IPayFeeConfigV1InnerServiceSMO payFeeConfigV1InnerServiceSMOImpl;
    /**
     * 添加小区信息
     *
     * @param paramInJson     接口调用放传入入参
     * @param dataFlowContext 数据上下文
     * @return 订单服务能够接受的报文
     */
    public void updateCommunity(JSONObject paramInJson, ICmdDataFlowContext dataFlowContext) {
        CommunityDto communityDto = new CommunityDto();
        communityDto.setCommunityId(paramInJson.getString("communityId"));
        List<CommunityDto> communityDtos = communityInnerServiceSMOImpl.queryCommunitys(communityDto);
        Assert.listOnlyOne(communityDtos, "未查询到该小区信息【" + communityDto.getCommunityId() + "】");
        communityDto = communityDtos.get(0);
        Map oldCommunityInfo = BeanConvertUtil.beanCovertMap(communityDto);
        oldCommunityInfo.put("state", paramInJson.getString("state"));
        CommunityPo communityPo = BeanConvertUtil.covertBean(oldCommunityInfo, CommunityPo.class);
        int flag = communityV1InnerServiceSMOImpl.updateCommunity(communityPo);
        if (flag < 1) {
            throw new IllegalArgumentException("更新失败");
        }
    }
    /**
     * 添加小区信息
     *
     * @param paramInJson     接口调用放传入入参
     * @param dataFlowContext 数据上下文
     * @return 订单服务能够接受的报文
     */
    public void updateCommunityMember(JSONObject paramInJson, ICmdDataFlowContext dataFlowContext) {
        CommunityMemberDto communityMemberDto = new CommunityMemberDto();
        communityMemberDto.setCommunityMemberId(paramInJson.getString("communityMemberId"));
        List<CommunityMemberDto> communityMemberDtos = communityInnerServiceSMOImpl.getCommunityMembers(communityMemberDto);
        Assert.listOnlyOne(communityMemberDtos, "未查询到该小区成员信息【" + communityMemberDto.getCommunityMemberId() + "】");
        communityMemberDto = communityMemberDtos.get(0);
        Map oldCommunityInfo = BeanConvertUtil.beanCovertMap(communityMemberDto);
        oldCommunityInfo.put("auditStatusCd", paramInJson.getString("state"));
        CommunityMemberPo communityMemberPo = BeanConvertUtil.covertBean(oldCommunityInfo, CommunityMemberPo.class);
        int flag = communityMemberV1InnerServiceSMOImpl.updateCommunityMember(communityMemberPo);
        if (flag < 1) {
            throw new IllegalArgumentException("更新失败");
        }
    }
    /**
     * 添加小区成员
     *
     * @param paramInJson 接口请求数据封装
     * @return 封装好的 data数据
     */
    public JSONObject addCommunityMember(JSONObject paramInJson) {
        JSONObject business = JSONObject.parseObject("{\"datas\":{}}");
        business.put(CommonConstant.HTTP_BUSINESS_TYPE_CD, BusinessTypeConstant.BUSINESS_TYPE_MEMBER_JOINED_COMMUNITY);
        business.put(CommonConstant.HTTP_SEQ, 2);
        business.put(CommonConstant.HTTP_INVOKE_MODEL, CommonConstant.HTTP_INVOKE_MODEL_S);
        JSONObject businessCommunityMember = new JSONObject();
        businessCommunityMember.put("communityMemberId", GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_communityMemberId));
        businessCommunityMember.put("communityId", paramInJson.getString("communityId"));
        businessCommunityMember.put("memberId", paramInJson.getString("memberId"));
        businessCommunityMember.put("memberTypeCd", paramInJson.getString("memberTypeCd"));
        String auditStatusCd = MappingCache.getValue(MappingConstant.DOMAIN_COMMUNITY_MEMBER_AUDIT, paramInJson.getString("memberTypeCd"));
        auditStatusCd = StringUtils.isEmpty(auditStatusCd) ? StateConstant.AGREE_AUDIT : auditStatusCd;
        businessCommunityMember.put("auditStatusCd", auditStatusCd);
        business.getJSONObject(CommonConstant.HTTP_BUSINESS_DATAS).put(CommunityMemberPo.class.getSimpleName(), businessCommunityMember);
        return business;
    }
    /**
     * 添加小区成员
     *
     * @param paramInJson 接口请求数据封装
     * @return 封装好的 data数据
     */
    public JSONObject updateComplaint(JSONObject paramInJson) {
        WorkflowDto workflowDto = new WorkflowDto();
        workflowDto.setCommunityId(paramInJson.getString("communityId"));
        workflowDto.setFlowType(WorkflowDto.FLOW_TYPE_COMPLAINT);
        List<WorkflowDto> workflowDtos = workflowInnerServiceSMOImpl.queryWorkflows(workflowDto);
        if (workflowDtos == null || workflowDtos.size() < 1) {
            return null;
        }
        JSONObject business = JSONObject.parseObject("{\"datas\":{}}");
        business.put(CommonConstant.HTTP_BUSINESS_TYPE_CD, BusinessTypeConstant.BUSINESS_TYPE_UPDATE_WORKFLOW);
        business.put(CommonConstant.HTTP_SEQ, 2);
        business.put(CommonConstant.HTTP_INVOKE_MODEL, CommonConstant.HTTP_INVOKE_MODEL_S);
        JSONObject businessCommunityMember = new JSONObject();
        businessCommunityMember.put("flowId", workflowDtos.get(0).getFlowId());
        businessCommunityMember.put("communityId", paramInJson.getString("communityId"));
        businessCommunityMember.put("storeId", paramInJson.getString("memberId"));
        JSONArray data = new JSONArray();
        data.add(businessCommunityMember);
        business.getJSONObject(CommonConstant.HTTP_BUSINESS_DATAS).put(WorkflowPo.class.getSimpleName(), data);
        return business;
    }
    /**
     * 添加小区成员
     *
     * @param paramInJson
     * @return
     */
    public JSONObject deleteCommunityMember(JSONObject paramInJson) {
        JSONObject business = JSONObject.parseObject("{\"datas\":{}}");
        business.put(CommonConstant.HTTP_BUSINESS_TYPE_CD, BusinessTypeConstant.BUSINESS_TYPE_MEMBER_QUIT_COMMUNITY);
        business.put(CommonConstant.HTTP_SEQ, 2);
        business.put(CommonConstant.HTTP_INVOKE_MODEL, CommonConstant.HTTP_INVOKE_MODEL_S);
        JSONObject businessCommunityMember = new JSONObject();
        businessCommunityMember.put("communityMemberId", paramInJson.getString("communityMemberId"));
        business.getJSONObject(CommonConstant.HTTP_BUSINESS_DATAS).put(CommunityMemberPo.class.getSimpleName(), businessCommunityMember);
        return business;
    }
    /**
     * 退出小区成员
     *
     * @param paramInJson 接口传入入参
     * @return 订单服务能够接受的报文
     */
    public JSONArray exitCommunityMember(JSONObject paramInJson) {
        JSONArray businesses = new JSONArray();
        JSONObject businessCommunityMember = new JSONObject();
        CommunityMemberDto communityMemberDto = new CommunityMemberDto();
        communityMemberDto.setMemberTypeCd(CommunityMemberTypeConstant.AGENT);
        communityMemberDto.setCommunityId(paramInJson.getString("communityId"));
        communityMemberDto.setStatusCd(StatusConstant.STATUS_CD_VALID);
        List<CommunityMemberDto> communityMemberDtoList = communityInnerServiceSMOImpl.getCommunityMembers(communityMemberDto);
        if (communityMemberDtoList == null || communityMemberDtoList.size() != 1) {
            throw new ListenerExecuteException(ResponseConstant.RESULT_CODE_ERROR, "小区和代理商存在关系存在异常,请检查");
        }
        businessCommunityMember.put("communityMemberId", communityMemberDtoList.get(0).getCommunityMemberId());
        businessCommunityMember = new JSONObject();
        communityMemberDto = new CommunityMemberDto();
        communityMemberDto.setMemberTypeCd(CommunityMemberTypeConstant.DEV);
        communityMemberDto.setCommunityId(paramInJson.getString("communityId"));
        communityMemberDto.setStatusCd(StatusConstant.STATUS_CD_VALID);
        communityMemberDtoList = communityInnerServiceSMOImpl.getCommunityMembers(communityMemberDto);
        if (communityMemberDtoList == null || communityMemberDtoList.size() != 1) {
            throw new ListenerExecuteException(ResponseConstant.RESULT_CODE_ERROR, "小区和开发者存在关系存在异常,请检查");
        }
        businessCommunityMember.put("communityMemberId", communityMemberDtoList.get(0).getCommunityMemberId());
        businessCommunityMember = new JSONObject();
        communityMemberDto = new CommunityMemberDto();
        communityMemberDto.setMemberTypeCd(CommunityMemberTypeConstant.OPT);
        communityMemberDto.setCommunityId(paramInJson.getString("communityId"));
        communityMemberDto.setStatusCd(StatusConstant.STATUS_CD_VALID);
        communityMemberDtoList = communityInnerServiceSMOImpl.getCommunityMembers(communityMemberDto);
        if (communityMemberDtoList == null || communityMemberDtoList.size() != 1) {
            throw new ListenerExecuteException(ResponseConstant.RESULT_CODE_ERROR, "小区和运维团队存在关系存在异常,请检查");
        }
        businessCommunityMember.put("communityMemberId", communityMemberDtoList.get(0).getCommunityMemberId());
        return businesses;
    }
    /**
     * 添加小区信息
     *
     * @param paramInJson     接口调用放传入入参
     * @param dataFlowContext 数据上下文
     * @return 订单服务能够接受的报文
     */
    public void deleteCommunity(JSONObject paramInJson, ICmdDataFlowContext dataFlowContext) {
        CommunityPo communityPo = BeanConvertUtil.covertBean(paramInJson, CommunityPo.class);
        int flag = communityV1InnerServiceSMOImpl.deleteCommunity(communityPo);
        if (flag < 1) {
            throw new IllegalArgumentException("删除小区失败");
        }
    }
    /**
     * 添加小区信息
     *
     * @param paramInJson     接口调用放传入入参
     * @param dataFlowContext 数据上下文
     * @return 订单服务能够接受的报文
     */
    public void addFeeConfigProperty(JSONObject paramInJson, ICmdDataFlowContext dataFlowContext) {
        paramInJson.put("configId", GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_configId));
        JSONObject businessFeeConfig = new JSONObject();
        businessFeeConfig.putAll(paramInJson);
        businessFeeConfig.put("feeTypeCd", FeeTypeConstant.FEE_TYPE_PROPERTY);
        businessFeeConfig.put("feeName", "物业费[系统默认]");
        businessFeeConfig.put("feeFlag", "1003006");
        businessFeeConfig.put("startTime", DateUtil.getNow(DateUtil.DATE_FORMATE_STRING_A));
        businessFeeConfig.put("endTime", DateUtil.LAST_TIME);
        businessFeeConfig.put("computingFormula", "1001");
        businessFeeConfig.put("squarePrice", "0.00");
        businessFeeConfig.put("paymentCd", "1200");
        businessFeeConfig.put("additionalAmount", "0.00");
        businessFeeConfig.put("communityId", paramInJson.getString("communityId"));
        businessFeeConfig.put("configId", paramInJson.getString("configId"));
        businessFeeConfig.put("billType", "002");//按月出账
        businessFeeConfig.put("paymentCycle", "1");//按月出账
        businessFeeConfig.put("isDefault", "T");
        PayFeeConfigPo payFeeConfigPo = BeanConvertUtil.covertBean(businessFeeConfig, PayFeeConfigPo.class);
        int flag = payFeeConfigV1InnerServiceSMOImpl.savePayFeeConfig(payFeeConfigPo);
        if (flag < 1) {
            throw new IllegalArgumentException("添加小区失败");
        }
    }
    /**
     * 添加小区信息
     *
     * @param paramInJson     接口调用放传入入参
     * @param dataFlowContext 数据上下文
     * @return 订单服务能够接受的报文
     */
    public void addFeeConfigRepair(JSONObject paramInJson, ICmdDataFlowContext dataFlowContext) {
        paramInJson.put("configId", GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_configId));
        JSONObject businessFeeConfig = new JSONObject();
        businessFeeConfig.putAll(paramInJson);
        businessFeeConfig.put("feeTypeCd", FeeTypeConstant.FEE_TYPE_REPAIR);
        businessFeeConfig.put("feeName", "报修费[系统默认]");
        businessFeeConfig.put("feeFlag", "2006012"); //一次性费用
        businessFeeConfig.put("startTime", DateUtil.getNow(DateUtil.DATE_FORMATE_STRING_A));
        businessFeeConfig.put("endTime", DateUtil.LAST_TIME);
        businessFeeConfig.put("computingFormula", "4004");
        businessFeeConfig.put("squarePrice", "0.00");
        businessFeeConfig.put("additionalAmount", "0.00");
        businessFeeConfig.put("communityId", paramInJson.getString("communityId"));
        businessFeeConfig.put("configId", paramInJson.getString("configId"));
        businessFeeConfig.put("billType", "003");//按天出账
        businessFeeConfig.put("paymentCd", "2100");
        businessFeeConfig.put("paymentCycle", "1");//按月出账
        businessFeeConfig.put("isDefault", "T");
        PayFeeConfigPo payFeeConfigPo = BeanConvertUtil.covertBean(businessFeeConfig, PayFeeConfigPo.class);
        int flag = payFeeConfigV1InnerServiceSMOImpl.savePayFeeConfig(payFeeConfigPo);
        if (flag < 1) {
            throw new IllegalArgumentException("删除小区失败");
        }
    }
    /**
     * 添加小区信息
     *
     * @param paramInJson     接口调用放传入入参
     * @param dataFlowContext 数据上下文
     * @return 订单服务能够接受的报文
     */
    public void addFeeConfigParkingSpaceUpSell(JSONObject paramInJson, ICmdDataFlowContext dataFlowContext) {
        paramInJson.put("configId", GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_configId));
        JSONObject businessFeeConfig = new JSONObject();
        businessFeeConfig.putAll(paramInJson);
        businessFeeConfig.put("feeTypeCd", FeeTypeConstant.FEE_TYPE_CAR);
        businessFeeConfig.put("feeName", "地上出售车位费[系统默认]");
        businessFeeConfig.put("feeFlag", "2006012");
        businessFeeConfig.put("startTime", DateUtil.getNow(DateUtil.DATE_FORMATE_STRING_A));
        businessFeeConfig.put("endTime", DateUtil.LAST_TIME);
        businessFeeConfig.put("computingFormula", "2002");
        businessFeeConfig.put("squarePrice", "0.00");
        businessFeeConfig.put("additionalAmount", "0.00");
        businessFeeConfig.put("communityId", paramInJson.getString("communityId"));
        businessFeeConfig.put("configId", paramInJson.getString("configId"));
        businessFeeConfig.put("billType", "003");//按天出账
        businessFeeConfig.put("paymentCd", "1200");
        businessFeeConfig.put("paymentCycle", "1");//按月出账
        businessFeeConfig.put("isDefault", "T");
        PayFeeConfigPo payFeeConfigPo = BeanConvertUtil.covertBean(businessFeeConfig, PayFeeConfigPo.class);
        int flag = payFeeConfigV1InnerServiceSMOImpl.savePayFeeConfig(payFeeConfigPo);
        if (flag < 1) {
            throw new IllegalArgumentException("删除小区失败");
        }
    }
    /**
     * 添加小区信息
     *
     * @param paramInJson     接口调用放传入入参
     * @param dataFlowContext 数据上下文
     * @return 订单服务能够接受的报文
     */
    public void addFeeConfigParkingSpaceDownSell(JSONObject paramInJson, ICmdDataFlowContext dataFlowContext) {
        paramInJson.put("configId", GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_configId));
        JSONObject businessFeeConfig = new JSONObject();
        businessFeeConfig.putAll(paramInJson);
        businessFeeConfig.put("feeTypeCd", FeeTypeConstant.FEE_TYPE_CAR);
        businessFeeConfig.put("feeName", "地下出售车位费[系统默认]");
        businessFeeConfig.put("feeFlag", "2006012");
        businessFeeConfig.put("startTime", DateUtil.getNow(DateUtil.DATE_FORMATE_STRING_A));
        businessFeeConfig.put("endTime", DateUtil.LAST_TIME);
        businessFeeConfig.put("computingFormula", "2002");
        businessFeeConfig.put("squarePrice", "0.00");
        businessFeeConfig.put("additionalAmount", "0.00");
        businessFeeConfig.put("communityId", paramInJson.getString("communityId"));
        businessFeeConfig.put("configId", paramInJson.getString("configId"));
        businessFeeConfig.put("billType", "003");//按天出账
        businessFeeConfig.put("paymentCd", "1200");
        businessFeeConfig.put("paymentCycle", "1");//按月出账
        businessFeeConfig.put("isDefault", "T");
        PayFeeConfigPo payFeeConfigPo = BeanConvertUtil.covertBean(businessFeeConfig, PayFeeConfigPo.class);
        int flag = payFeeConfigV1InnerServiceSMOImpl.savePayFeeConfig(payFeeConfigPo);
        if (flag < 1) {
            throw new IllegalArgumentException("删除小区失败");
        }
    }
    /**
     * 添加小区信息
     *
     * @param paramInJson     接口调用放传入入参
     * @param dataFlowContext 数据上下文
     * @return 订单服务能够接受的报文
     */
    public void addFeeConfigParkingSpaceUpHire(JSONObject paramInJson, ICmdDataFlowContext dataFlowContext) {
        paramInJson.put("configId", GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_configId));
        JSONObject businessFeeConfig = new JSONObject();
        businessFeeConfig.putAll(paramInJson);
        businessFeeConfig.put("feeTypeCd", FeeTypeConstant.FEE_TYPE_CAR);
        businessFeeConfig.put("feeName", "地上出租车位费[系统默认]");
        businessFeeConfig.put("feeFlag", "1003006");
        businessFeeConfig.put("startTime", DateUtil.getNow(DateUtil.DATE_FORMATE_STRING_A));
        businessFeeConfig.put("endTime", DateUtil.LAST_TIME);
        businessFeeConfig.put("computingFormula", "2002");
        businessFeeConfig.put("squarePrice", "0.00");
        businessFeeConfig.put("additionalAmount", "0.00");
        businessFeeConfig.put("communityId", paramInJson.getString("communityId"));
        businessFeeConfig.put("configId", paramInJson.getString("configId"));
        businessFeeConfig.put("billType", "003");//按天出账
        businessFeeConfig.put("paymentCd", "1200");
        businessFeeConfig.put("paymentCycle", "1");//按月出账
        businessFeeConfig.put("isDefault", "T");
        PayFeeConfigPo payFeeConfigPo = BeanConvertUtil.covertBean(businessFeeConfig, PayFeeConfigPo.class);
        int flag = payFeeConfigV1InnerServiceSMOImpl.savePayFeeConfig(payFeeConfigPo);
        if (flag < 1) {
            throw new IllegalArgumentException("删除小区失败");
        }
    }
    /**
     * 添加小区信息
     *
     * @param paramInJson     接口调用放传入入参
     * @param dataFlowContext 数据上下文
     * @return 订单服务能够接受的报文
     */
    public void addFeeConfigParkingSpaceDownHire(JSONObject paramInJson, ICmdDataFlowContext dataFlowContext) {
        paramInJson.put("configId", GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_configId));
        JSONObject businessFeeConfig = new JSONObject();
        businessFeeConfig.putAll(paramInJson);
        businessFeeConfig.put("feeTypeCd", FeeTypeConstant.FEE_TYPE_CAR);
        businessFeeConfig.put("feeName", "地下出租车位费[系统默认]");
        businessFeeConfig.put("feeFlag", "1003006");
        businessFeeConfig.put("startTime", DateUtil.getNow(DateUtil.DATE_FORMATE_STRING_A));
        businessFeeConfig.put("endTime", DateUtil.LAST_TIME);
        businessFeeConfig.put("computingFormula", "2002");
        businessFeeConfig.put("squarePrice", "0.00");
        businessFeeConfig.put("additionalAmount", "0.00");
        businessFeeConfig.put("communityId", paramInJson.getString("communityId"));
        businessFeeConfig.put("configId", paramInJson.getString("configId"));
        businessFeeConfig.put("billType", "003");//按天出账
        businessFeeConfig.put("paymentCd", "1200");
        businessFeeConfig.put("paymentCycle", "1");//按月出账
        businessFeeConfig.put("isDefault", "T");
        PayFeeConfigPo payFeeConfigPo = BeanConvertUtil.covertBean(businessFeeConfig, PayFeeConfigPo.class);
        int flag = payFeeConfigV1InnerServiceSMOImpl.savePayFeeConfig(payFeeConfigPo);
        if (flag < 1) {
            throw new IllegalArgumentException("删除小区失败");
        }
    }
    /**
     * 添加小区信息
     *
     * @param paramInJson     接口调用放传入入参
     * @param dataFlowContext 数据上下文
     * @return 订单服务能够接受的报文
     */
    public void addFeeConfigParkingSpaceTemp(JSONObject paramInJson, ICmdDataFlowContext dataFlowContext) {
        paramInJson.put("configId", GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_configId));
        JSONObject businessFeeConfig = new JSONObject();
        businessFeeConfig.putAll(paramInJson);
        businessFeeConfig.put("feeTypeCd", FeeTypeConstant.FEE_TYPE_TEMP_DOWN_PARKING_SPACE);
        businessFeeConfig.put("feeName", "临时车费用[系统默认]");
        businessFeeConfig.put("feeFlag", "2006012");
        businessFeeConfig.put("startTime", DateUtil.getNow(DateUtil.DATE_FORMATE_STRING_A));
        businessFeeConfig.put("endTime", DateUtil.LAST_TIME);
        businessFeeConfig.put("computingFormula", "3003");
        businessFeeConfig.put("squarePrice", "0.00");
        businessFeeConfig.put("additionalAmount", "0.00");
        businessFeeConfig.put("communityId", paramInJson.getString("communityId"));
        businessFeeConfig.put("configId", paramInJson.getString("configId"));
        businessFeeConfig.put("billType", "004");//按天出账
        businessFeeConfig.put("paymentCd", "1200");
        businessFeeConfig.put("paymentCycle", "1");//按月出账
        businessFeeConfig.put("isDefault", "T");
        PayFeeConfigPo payFeeConfigPo = BeanConvertUtil.covertBean(businessFeeConfig, PayFeeConfigPo.class);
        int flag = payFeeConfigV1InnerServiceSMOImpl.savePayFeeConfig(payFeeConfigPo);
        if (flag < 1) {
            throw new IllegalArgumentException("删除小区失败");
        }
    }
    /**
     * 添加小区成员 开发者 代理商 运维 商户
     *
     * @param paramInJson 组装 楼小区关系
     * @return 小区成员信息
     */
    public void addCommunityMembers(JSONObject paramInJson, ICmdDataFlowContext dataFlowContext) {
        JSONObject businessCommunityMember = new JSONObject();
        businessCommunityMember.put("communityMemberId", GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_communityMemberId));
        businessCommunityMember.put("communityId", paramInJson.getString("communityId"));
        businessCommunityMember.put("memberId", paramInJson.getString("storeId"));
        businessCommunityMember.put("memberTypeCd", CommunityMemberTypeConstant.AGENT);
        businessCommunityMember.put("auditStatusCd", StateConstant.AGREE_AUDIT);
        CommunityMemberPo communityMemberPo = BeanConvertUtil.covertBean(businessCommunityMember, CommunityMemberPo.class);
        int flag = communityMemberV1InnerServiceSMOImpl.saveCommunityMember(communityMemberPo);
        if (flag < 1) {
            throw new IllegalArgumentException("添加小区成员失败");
        }
        //添加运维商户
        //添加开发商户
        businessCommunityMember = new JSONObject();
        businessCommunityMember.put("communityMemberId", GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_communityMemberId));
        businessCommunityMember.put("communityId", paramInJson.getString("communityId"));
        businessCommunityMember.put("memberId", "400000000000000001");
        businessCommunityMember.put("memberTypeCd", CommunityMemberTypeConstant.OPT);
        businessCommunityMember.put("auditStatusCd", StateConstant.AGREE_AUDIT);
        communityMemberPo = BeanConvertUtil.covertBean(businessCommunityMember, CommunityMemberPo.class);
        flag = communityMemberV1InnerServiceSMOImpl.saveCommunityMember(communityMemberPo);
        if (flag < 1) {
            throw new IllegalArgumentException("添加小区成员失败");
        }
        businessCommunityMember = new JSONObject();
        businessCommunityMember.put("communityMemberId", GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_communityMemberId));
        businessCommunityMember.put("communityId", paramInJson.getString("communityId"));
        businessCommunityMember.put("memberId", "400000000000000002");
        businessCommunityMember.put("memberTypeCd", CommunityMemberTypeConstant.DEV);
        businessCommunityMember.put("auditStatusCd", StateConstant.AGREE_AUDIT);
        communityMemberPo = BeanConvertUtil.covertBean(businessCommunityMember, CommunityMemberPo.class);
        flag = communityMemberV1InnerServiceSMOImpl.saveCommunityMember(communityMemberPo);
        if (flag < 1) {
            throw new IllegalArgumentException("添加小区成员失败");
        }
    }
    /**
     * 添加小区信息
     *
     * @param paramInJson     接口调用放传入入参
     * @param dataFlowContext 数据上下文
     * @return 订单服务能够接受的报文
     */
    public void addCommunity(JSONObject paramInJson, ICmdDataFlowContext dataFlowContext) {
        paramInJson.put("communityId", GenerateCodeFactory.getCommunityId());
        paramInJson.put("state", "1000");
        paramInJson.put("communityArea", "0");
        CommunityPo communityPo = BeanConvertUtil.covertBean(paramInJson, CommunityPo.class);
        int flag = communityV1InnerServiceSMOImpl.saveCommunity(communityPo);
        if (flag < 1) {
            throw new IllegalArgumentException("添加小区失败");
        }
    }
    /**
     * 添加小区信息
     *
     * @param paramInJson     接口调用放传入入参
     * @param dataFlowContext 数据上下文
     * @return 订单服务能够接受的报文
     */
    public void addAttr(JSONObject paramInJson, ICmdDataFlowContext dataFlowContext) {
        paramInJson.put("attrId", GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_attrId));
        CommunityAttrPo communityAttrPo = BeanConvertUtil.covertBean(paramInJson, CommunityAttrPo.class);
        int flag = communityAttrV1InnerServiceSMOImpl.saveCommunityAttr(communityAttrPo);
        if (flag < 1) {
            throw new IllegalArgumentException("添加小区属性");
        }
    }
    /**
     * 添加小区信息
     *
     * @param paramInJson     接口调用放传入入参
     * @param dataFlowContext 数据上下文
     * @return 订单服务能够接受的报文
     */
    public void updateAttr(JSONObject paramInJson, ICmdDataFlowContext dataFlowContext) {
        CommunityAttrPo communityAttrPo = BeanConvertUtil.covertBean(paramInJson, CommunityAttrPo.class);
        int flag = communityAttrV1InnerServiceSMOImpl.updateCommunityAttr(communityAttrPo);
        if (flag < 1) {
            throw new IllegalArgumentException("修改小区属性");
        }
    }
    /**
     * 添加小区信息
     *
     * @param paramInJson     接口调用放传入入参
     * @param dataFlowContext 数据上下文
     * @return 订单服务能够接受的报文
     */
    public void updateCommunityOne(JSONObject paramInJson, ICmdDataFlowContext dataFlowContext) {
        CommunityPo communityPo = BeanConvertUtil.covertBean(paramInJson, CommunityPo.class);
        int flag = communityV1InnerServiceSMOImpl.updateCommunity(communityPo);
        if (flag < 1) {
            throw new IllegalArgumentException("修改小区失败");
        }
    }
}
service-community/src/main/java/com/java110/community/cmd/community/DeleteCommunityCmd.java
New file
@@ -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.community;
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.community.ICommunityV1InnerServiceSMO;
import com.java110.po.community.CommunityPo;
import com.java110.utils.exception.CmdException;
import com.java110.utils.util.Assert;
import com.java110.utils.util.BeanConvertUtil;
import com.java110.vo.ResultVo;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
/**
 * 类表述:删除
 * 服务编码:community.deleteCommunity
 * 请求路劲:/app/community.DeleteCommunity
 * add by 吴学文 at 2021-09-18 12:54:57 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 = "community.deleteCommunity")
public class DeleteCommunityCmd extends AbstractServiceCmdListener {
    private static Logger logger = LoggerFactory.getLogger(DeleteCommunityCmd.class);
    @Autowired
    private ICommunityV1InnerServiceSMO communityV1InnerServiceSMOImpl;
    @Override
    public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) {
        Assert.hasKeyAndValue(reqJson, "communityId", "communityId不能为空");
        Assert.hasKeyAndValue(reqJson, "communityId", "communityId不能为空");
    }
    @Override
    @Java110Transactional
    public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
        CommunityPo communityPo = BeanConvertUtil.covertBean(reqJson, CommunityPo.class);
        int flag = communityV1InnerServiceSMOImpl.deleteCommunity(communityPo);
        if (flag < 1) {
            throw new CmdException("删除数据失败");
        }
        cmdDataFlowContext.setResponseEntity(ResultVo.success());
    }
}
service-community/src/main/java/com/java110/community/cmd/community/ListCommunityCmd.java
New file
@@ -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.community;
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.ICommunityV1InnerServiceSMO;
import com.java110.po.community.CommunityPo;
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.community.CommunityDto;
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;
/**
 * 类表述:查询
 * 服务编码:community.listCommunity
 * 请求路劲:/app/community.ListCommunity
 * add by 吴学文 at 2021-09-18 12:54:57 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 = "community.listCommunity")
public class ListCommunityCmd extends AbstractServiceCmdListener {
  private static Logger logger = LoggerFactory.getLogger(ListCommunityCmd.class);
    @Autowired
    private ICommunityV1InnerServiceSMO communityV1InnerServiceSMOImpl;
    @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 {
           CommunityDto communityDto = BeanConvertUtil.covertBean(reqJson, CommunityDto.class);
           int count = communityV1InnerServiceSMOImpl.queryCommunitysCount(communityDto);
           List<CommunityDto> communityDtos = null;
           if (count > 0) {
               communityDtos = communityV1InnerServiceSMOImpl.queryCommunitys(communityDto);
           } else {
               communityDtos = new ArrayList<>();
           }
           ResultVo resultVo = new ResultVo((int) Math.ceil((double) count / (double) reqJson.getInteger("row")), count, communityDtos);
           ResponseEntity<String> responseEntity = new ResponseEntity<String>(resultVo.toString(), HttpStatus.OK);
           cmdDataFlowContext.setResponseEntity(responseEntity);
    }
}
service-community/src/main/java/com/java110/community/cmd/community/SaveCommunityCmd.java
New file
@@ -0,0 +1,148 @@
/*
 * 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.community;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.java110.community.bmo.community.ICommunityBMO;
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.workflow.WorkflowDto;
import com.java110.intf.common.IWorkflowV1InnerServiceSMO;
import com.java110.intf.community.ICommunityV1InnerServiceSMO;
import com.java110.po.workflow.WorkflowPo;
import com.java110.utils.constant.BusinessTypeConstant;
import com.java110.utils.exception.CmdException;
import com.java110.utils.util.Assert;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
/**
 * 类表述:保存
 * 服务编码:community.saveCommunity
 * 请求路劲:/app/community.SaveCommunity
 * add by 吴学文 at 2021-09-18 12:54:57 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 = "community.saveCommunity")
public class SaveCommunityCmd extends AbstractServiceCmdListener {
    private static Logger logger = LoggerFactory.getLogger(SaveCommunityCmd.class);
    public static final String CODE_PREFIX_ID = "10";
    @Autowired
    private ICommunityBMO communityBMOImpl;
    @Autowired
    private ICommunityV1InnerServiceSMO communityV1InnerServiceSMOImpl;
    @Autowired
    private IWorkflowV1InnerServiceSMO workflowV1InnerServiceSMOImpl;
    @Override
    public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) {
        Assert.hasKeyAndValue(reqJson, "name", "必填,请填写小区名称");
        Assert.hasKeyAndValue(reqJson, "address", "必填,请填写小区地址");
        Assert.hasKeyAndValue(reqJson, "cityCode", "请求报文中未包含cityCode");
        Assert.hasKeyAndValue(reqJson, "payFeeMonth", "请求报文中未包含payFeeMonth");
        Assert.hasKeyAndValue(reqJson, "feePrice", "请求报文中未包含feePrice");
        //属性校验
        Assert.judgeAttrValue(reqJson);
    }
    @Override
    @Java110Transactional
    public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
        communityBMOImpl.addCommunity(reqJson, cmdDataFlowContext);
        communityBMOImpl.addCommunityMembers(reqJson, cmdDataFlowContext);
        //产生物业费配置信息
        communityBMOImpl.addFeeConfigProperty(reqJson, cmdDataFlowContext);
        communityBMOImpl.addFeeConfigRepair(reqJson, cmdDataFlowContext); // 报修费用
        communityBMOImpl.addFeeConfigParkingSpaceTemp(reqJson, cmdDataFlowContext);//地下出租
        dealAttr(reqJson, cmdDataFlowContext);
        WorkflowPo workflowPo = null;
        workflowPo = new WorkflowPo();
        workflowPo.setCommunityId(reqJson.getString("communityId"));
        workflowPo.setFlowId(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_flowId));
        workflowPo.setFlowName("投诉建议流程");
        workflowPo.setFlowType(WorkflowDto.FLOW_TYPE_COMPLAINT);
        workflowPo.setSkipLevel(WorkflowDto.DEFAULT_SKIP_LEVEL);
        workflowPo.setStoreId(reqJson.getString("storeId"));
        int flag = workflowV1InnerServiceSMOImpl.saveWorkflow(workflowPo);
        if (flag < 1) {
            throw new IllegalArgumentException("添加流程失败");
        }
        WorkflowPo workflowPo1 = null;
        workflowPo1 = new WorkflowPo();
        workflowPo1.setCommunityId(reqJson.getString("communityId"));
        workflowPo1.setFlowId(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_flowId));
        workflowPo1.setFlowName("物品领用");
        workflowPo1.setFlowType(WorkflowDto.FLOW_TYPE_COLLECTION);
        workflowPo1.setSkipLevel(WorkflowDto.DEFAULT_SKIP_LEVEL);
        workflowPo1.setStoreId(reqJson.getString("storeId"));
        flag = workflowV1InnerServiceSMOImpl.saveWorkflow(workflowPo1);
        if (flag < 1) {
            throw new IllegalArgumentException("添加流程失败");
        }
        WorkflowPo workflowPo2 = new WorkflowPo();
        workflowPo2.setCommunityId(reqJson.getString("communityId")); //被调拨小区
        workflowPo2.setFlowId(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_flowId));
        workflowPo2.setFlowName("物品被调拨");
        workflowPo2.setFlowType(WorkflowDto.FLOW_TYPE_ALLOCATION_STOREHOUSE_GO);
        workflowPo2.setSkipLevel(WorkflowDto.DEFAULT_SKIP_LEVEL);
        workflowPo2.setStoreId(reqJson.getString("storeId"));
        flag = workflowV1InnerServiceSMOImpl.saveWorkflow(workflowPo2);
        if (flag < 1) {
            throw new IllegalArgumentException("添加流程失败");
        }
    }
    private void dealAttr(JSONObject paramObj, ICmdDataFlowContext context) {
        if (!paramObj.containsKey("attrs")) {
            return;
        }
        JSONArray attrs = paramObj.getJSONArray("attrs");
        if (attrs.size() < 1) {
            return;
        }
        JSONObject attr = null;
        for (int attrIndex = 0; attrIndex < attrs.size(); attrIndex++) {
            attr = attrs.getJSONObject(attrIndex);
            attr.put("communityId", paramObj.getString("communityId"));
            communityBMOImpl.addAttr(attr, context);
        }
    }
}
service-community/src/main/java/com/java110/community/cmd/community/UpdateCommunityCmd.java
New file
@@ -0,0 +1,73 @@
/*
 * Copyright 2017-2020 吴学文 and java110 team.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.java110.community.cmd.community;
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.community.ICommunityV1InnerServiceSMO;
import com.java110.po.community.CommunityPo;
import com.java110.utils.exception.CmdException;
import com.java110.utils.util.Assert;
import com.java110.utils.util.BeanConvertUtil;
import com.java110.vo.ResultVo;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
/**
 * 类表述:更新
 * 服务编码:community.updateCommunity
 * 请求路劲:/app/community.UpdateCommunity
 * add by 吴学文 at 2021-09-18 12:54:57 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 = "community.updateCommunity")
public class UpdateCommunityCmd extends AbstractServiceCmdListener {
    private static Logger logger = LoggerFactory.getLogger(UpdateCommunityCmd.class);
    @Autowired
    private ICommunityV1InnerServiceSMO communityV1InnerServiceSMOImpl;
    @Override
    public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) {
        Assert.hasKeyAndValue(reqJson, "communityId", "communityId不能为空");
    }
    @Override
    @Java110Transactional
    public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
        CommunityPo communityPo = BeanConvertUtil.covertBean(reqJson, CommunityPo.class);
        int flag = communityV1InnerServiceSMOImpl.updateCommunity(communityPo);
        if (flag < 1) {
            throw new CmdException("更新数据失败");
        }
        cmdDataFlowContext.setResponseEntity(ResultVo.success());
    }
}
service-community/src/main/java/com/java110/community/dao/ICommunityAttrV1ServiceDao.java
New file
@@ -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-18 13:17:11 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 ICommunityAttrV1ServiceDao {
    /**
     * 保存 小区属性信息
     * @param info
     * @throws DAOException DAO异常
     */
    int saveCommunityAttrInfo(Map info) throws DAOException;
    /**
     * 查询小区属性信息(instance过程)
     * 根据bId 查询小区属性信息
     * @param info bId 信息
     * @return 小区属性信息
     * @throws DAOException DAO异常
     */
    List<Map> getCommunityAttrInfo(Map info) throws DAOException;
    /**
     * 修改小区属性信息
     * @param info 修改信息
     * @throws DAOException DAO异常
     */
    int updateCommunityAttrInfo(Map info) throws DAOException;
    /**
     * 查询小区属性总数
     *
     * @param info 小区属性信息
     * @return 小区属性数量
     */
    int queryCommunityAttrsCount(Map info);
}
service-community/src/main/java/com/java110/community/dao/ICommunityMemberV1ServiceDao.java
New file
@@ -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-18 13:07:56 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 ICommunityMemberV1ServiceDao {
    /**
     * 保存 小区成员信息
     * @param info
     * @throws DAOException DAO异常
     */
    int saveCommunityMemberInfo(Map info) throws DAOException;
    /**
     * 查询小区成员信息(instance过程)
     * 根据bId 查询小区成员信息
     * @param info bId 信息
     * @return 小区成员信息
     * @throws DAOException DAO异常
     */
    List<Map> getCommunityMemberInfo(Map info) throws DAOException;
    /**
     * 修改小区成员信息
     * @param info 修改信息
     * @throws DAOException DAO异常
     */
    int updateCommunityMemberInfo(Map info) throws DAOException;
    /**
     * 查询小区成员总数
     *
     * @param info 小区成员信息
     * @return 小区成员数量
     */
    int queryCommunityMembersCount(Map info);
}
service-community/src/main/java/com/java110/community/dao/ICommunityV1ServiceDao.java
New file
@@ -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-18 12:54:57 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 ICommunityV1ServiceDao {
    /**
     * 保存 小区管理信息
     * @param info
     * @throws DAOException DAO异常
     */
    int saveCommunityInfo(Map info) throws DAOException;
    /**
     * 查询小区管理信息(instance过程)
     * 根据bId 查询小区管理信息
     * @param info bId 信息
     * @return 小区管理信息
     * @throws DAOException DAO异常
     */
    List<Map> getCommunityInfo(Map info) throws DAOException;
    /**
     * 修改小区管理信息
     * @param info 修改信息
     * @throws DAOException DAO异常
     */
    int updateCommunityInfo(Map info) throws DAOException;
    /**
     * 查询小区管理总数
     *
     * @param info 小区管理信息
     * @return 小区管理数量
     */
    int queryCommunitysCount(Map info);
}
service-community/src/main/java/com/java110/community/dao/impl/CommunityAttrV1ServiceDaoImpl.java
New file
@@ -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.ICommunityAttrV1ServiceDao;
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-18 13:17:11 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("communityAttrV1ServiceDaoImpl")
public class CommunityAttrV1ServiceDaoImpl extends BaseServiceDao implements ICommunityAttrV1ServiceDao {
    private static Logger logger = LoggerFactory.getLogger(CommunityAttrV1ServiceDaoImpl.class);
    /**
     * 保存小区属性信息 到 instance
     * @param info   bId 信息
     * @throws DAOException DAO异常
     */
    @Override
    public int saveCommunityAttrInfo(Map info) throws DAOException {
        logger.debug("保存 saveCommunityAttrInfo 入参 info : {}",info);
        int saveFlag = sqlSessionTemplate.insert("communityAttrV1ServiceDaoImpl.saveCommunityAttrInfo",info);
        return saveFlag;
    }
    /**
     * 查询小区属性信息(instance)
     * @param info bId 信息
     * @return List<Map>
     * @throws DAOException DAO异常
     */
    @Override
    public List<Map> getCommunityAttrInfo(Map info) throws DAOException {
        logger.debug("查询 getCommunityAttrInfo 入参 info : {}",info);
        List<Map> businessCommunityAttrInfos = sqlSessionTemplate.selectList("communityAttrV1ServiceDaoImpl.getCommunityAttrInfo",info);
        return businessCommunityAttrInfos;
    }
    /**
     * 修改小区属性信息
     * @param info 修改信息
     * @throws DAOException DAO异常
     */
    @Override
    public int updateCommunityAttrInfo(Map info) throws DAOException {
        logger.debug("修改 updateCommunityAttrInfo 入参 info : {}",info);
        int saveFlag = sqlSessionTemplate.update("communityAttrV1ServiceDaoImpl.updateCommunityAttrInfo",info);
        return saveFlag;
    }
     /**
     * 查询小区属性数量
     * @param info 小区属性信息
     * @return 小区属性数量
     */
    @Override
    public int queryCommunityAttrsCount(Map info) {
        logger.debug("查询 queryCommunityAttrsCount 入参 info : {}",info);
        List<Map> businessCommunityAttrInfos = sqlSessionTemplate.selectList("communityAttrV1ServiceDaoImpl.queryCommunityAttrsCount", info);
        if (businessCommunityAttrInfos.size() < 1) {
            return 0;
        }
        return Integer.parseInt(businessCommunityAttrInfos.get(0).get("count").toString());
    }
}
service-community/src/main/java/com/java110/community/dao/impl/CommunityMemberV1ServiceDaoImpl.java
New file
@@ -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.ICommunityMemberV1ServiceDao;
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-18 13:07:56 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("communityMemberV1ServiceDaoImpl")
public class CommunityMemberV1ServiceDaoImpl extends BaseServiceDao implements ICommunityMemberV1ServiceDao {
    private static Logger logger = LoggerFactory.getLogger(CommunityMemberV1ServiceDaoImpl.class);
    /**
     * 保存小区成员信息 到 instance
     * @param info   bId 信息
     * @throws DAOException DAO异常
     */
    @Override
    public int saveCommunityMemberInfo(Map info) throws DAOException {
        logger.debug("保存 saveCommunityMemberInfo 入参 info : {}",info);
        int saveFlag = sqlSessionTemplate.insert("communityMemberV1ServiceDaoImpl.saveCommunityMemberInfo",info);
        return saveFlag;
    }
    /**
     * 查询小区成员信息(instance)
     * @param info bId 信息
     * @return List<Map>
     * @throws DAOException DAO异常
     */
    @Override
    public List<Map> getCommunityMemberInfo(Map info) throws DAOException {
        logger.debug("查询 getCommunityMemberInfo 入参 info : {}",info);
        List<Map> businessCommunityMemberInfos = sqlSessionTemplate.selectList("communityMemberV1ServiceDaoImpl.getCommunityMemberInfo",info);
        return businessCommunityMemberInfos;
    }
    /**
     * 修改小区成员信息
     * @param info 修改信息
     * @throws DAOException DAO异常
     */
    @Override
    public int updateCommunityMemberInfo(Map info) throws DAOException {
        logger.debug("修改 updateCommunityMemberInfo 入参 info : {}",info);
        int saveFlag = sqlSessionTemplate.update("communityMemberV1ServiceDaoImpl.updateCommunityMemberInfo",info);
        return saveFlag;
    }
     /**
     * 查询小区成员数量
     * @param info 小区成员信息
     * @return 小区成员数量
     */
    @Override
    public int queryCommunityMembersCount(Map info) {
        logger.debug("查询 queryCommunityMembersCount 入参 info : {}",info);
        List<Map> businessCommunityMemberInfos = sqlSessionTemplate.selectList("communityMemberV1ServiceDaoImpl.queryCommunityMembersCount", info);
        if (businessCommunityMemberInfos.size() < 1) {
            return 0;
        }
        return Integer.parseInt(businessCommunityMemberInfos.get(0).get("count").toString());
    }
}
service-community/src/main/java/com/java110/community/dao/impl/CommunityV1ServiceDaoImpl.java
New file
@@ -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.ICommunityV1ServiceDao;
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-18 12:54:57 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("communityV1ServiceDaoImpl")
public class CommunityV1ServiceDaoImpl extends BaseServiceDao implements ICommunityV1ServiceDao {
    private static Logger logger = LoggerFactory.getLogger(CommunityV1ServiceDaoImpl.class);
    /**
     * 保存小区管理信息 到 instance
     * @param info   bId 信息
     * @throws DAOException DAO异常
     */
    @Override
    public int saveCommunityInfo(Map info) throws DAOException {
        logger.debug("保存 saveCommunityInfo 入参 info : {}",info);
        int saveFlag = sqlSessionTemplate.insert("communityV1ServiceDaoImpl.saveCommunityInfo",info);
        return saveFlag;
    }
    /**
     * 查询小区管理信息(instance)
     * @param info bId 信息
     * @return List<Map>
     * @throws DAOException DAO异常
     */
    @Override
    public List<Map> getCommunityInfo(Map info) throws DAOException {
        logger.debug("查询 getCommunityInfo 入参 info : {}",info);
        List<Map> businessCommunityInfos = sqlSessionTemplate.selectList("communityV1ServiceDaoImpl.getCommunityInfo",info);
        return businessCommunityInfos;
    }
    /**
     * 修改小区管理信息
     * @param info 修改信息
     * @throws DAOException DAO异常
     */
    @Override
    public int updateCommunityInfo(Map info) throws DAOException {
        logger.debug("修改 updateCommunityInfo 入参 info : {}",info);
        int saveFlag = sqlSessionTemplate.update("communityV1ServiceDaoImpl.updateCommunityInfo",info);
        return saveFlag;
    }
     /**
     * 查询小区管理数量
     * @param info 小区管理信息
     * @return 小区管理数量
     */
    @Override
    public int queryCommunitysCount(Map info) {
        logger.debug("查询 queryCommunitysCount 入参 info : {}",info);
        List<Map> businessCommunityInfos = sqlSessionTemplate.selectList("communityV1ServiceDaoImpl.queryCommunitysCount", info);
        if (businessCommunityInfos.size() < 1) {
            return 0;
        }
        return Integer.parseInt(businessCommunityInfos.get(0).get("count").toString());
    }
}
service-community/src/main/java/com/java110/community/smo/impl/CommunityAttrV1InnerServiceSMOImpl.java
New file
@@ -0,0 +1,88 @@
/*
 * Copyright 2017-2020 吴学文 and java110 team.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.java110.community.smo.impl;
import com.java110.community.dao.ICommunityAttrV1ServiceDao;
import com.java110.core.base.smo.BaseServiceSMO;
import com.java110.dto.PageDto;
import com.java110.dto.community.CommunityAttrDto;
import com.java110.intf.community.ICommunityAttrV1InnerServiceSMO;
import com.java110.po.community.CommunityAttrPo;
import com.java110.utils.util.BeanConvertUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
/**
 * 类表述: 服务之前调用的接口实现类,不对外提供接口能力 只用于接口建调用
 * add by 吴学文 at 2021-09-18 13:17:11 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 CommunityAttrV1InnerServiceSMOImpl extends BaseServiceSMO implements ICommunityAttrV1InnerServiceSMO {
    @Autowired
    private ICommunityAttrV1ServiceDao communityAttrV1ServiceDaoImpl;
    @Override
    public int saveCommunityAttr(@RequestBody CommunityAttrPo communityAttrPo) {
        int saveFlag = communityAttrV1ServiceDaoImpl.saveCommunityAttrInfo(BeanConvertUtil.beanCovertMap(communityAttrPo));
        return saveFlag;
    }
    @Override
    public int updateCommunityAttr(@RequestBody CommunityAttrPo communityAttrPo) {
        int saveFlag = communityAttrV1ServiceDaoImpl.updateCommunityAttrInfo(BeanConvertUtil.beanCovertMap(communityAttrPo));
        return saveFlag;
    }
    @Override
    public int deleteCommunityAttr(@RequestBody CommunityAttrPo communityAttrPo) {
        communityAttrPo.setStatusCd("1");
        int saveFlag = communityAttrV1ServiceDaoImpl.updateCommunityAttrInfo(BeanConvertUtil.beanCovertMap(communityAttrPo));
        return saveFlag;
    }
    @Override
    public List<CommunityAttrDto> queryCommunityAttrs(@RequestBody CommunityAttrDto communityAttrDto) {
        //校验是否传了 分页信息
        int page = communityAttrDto.getPage();
        if (page != PageDto.DEFAULT_PAGE) {
            communityAttrDto.setPage((page - 1) * communityAttrDto.getRow());
        }
        List<CommunityAttrDto> communityAttrs = BeanConvertUtil.covertBeanList(communityAttrV1ServiceDaoImpl.getCommunityAttrInfo(BeanConvertUtil.beanCovertMap(communityAttrDto)), CommunityAttrDto.class);
        return communityAttrs;
    }
    @Override
    public int queryCommunityAttrsCount(@RequestBody CommunityAttrDto communityAttrDto) {
        return communityAttrV1ServiceDaoImpl.queryCommunityAttrsCount(BeanConvertUtil.beanCovertMap(communityAttrDto));
    }
}
service-community/src/main/java/com/java110/community/smo/impl/CommunityMemberV1InnerServiceSMOImpl.java
New file
@@ -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.ICommunityMemberV1ServiceDao;
import com.java110.dto.CommunityMemberDto;
import com.java110.intf.community.ICommunityMemberV1InnerServiceSMO;
import com.java110.po.community.CommunityMemberPo;
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-18 13:07:56 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 CommunityMemberV1InnerServiceSMOImpl extends BaseServiceSMO implements ICommunityMemberV1InnerServiceSMO {
    @Autowired
    private ICommunityMemberV1ServiceDao communityMemberV1ServiceDaoImpl;
    @Override
    public int saveCommunityMember(@RequestBody CommunityMemberPo communityMemberPo) {
        int saveFlag = communityMemberV1ServiceDaoImpl.saveCommunityMemberInfo(BeanConvertUtil.beanCovertMap(communityMemberPo));
        return saveFlag;
    }
     @Override
    public int updateCommunityMember(@RequestBody  CommunityMemberPo communityMemberPo) {
        int saveFlag = communityMemberV1ServiceDaoImpl.updateCommunityMemberInfo(BeanConvertUtil.beanCovertMap(communityMemberPo));
        return saveFlag;
    }
     @Override
    public int deleteCommunityMember(@RequestBody  CommunityMemberPo communityMemberPo) {
       communityMemberPo.setStatusCd("1");
       int saveFlag = communityMemberV1ServiceDaoImpl.updateCommunityMemberInfo(BeanConvertUtil.beanCovertMap(communityMemberPo));
       return saveFlag;
    }
    @Override
    public List<CommunityMemberDto> queryCommunityMembers(@RequestBody  CommunityMemberDto communityMemberDto) {
        //校验是否传了 分页信息
        int page = communityMemberDto.getPage();
        if (page != PageDto.DEFAULT_PAGE) {
            communityMemberDto.setPage((page - 1) * communityMemberDto.getRow());
        }
        List<CommunityMemberDto> communityMembers = BeanConvertUtil.covertBeanList(communityMemberV1ServiceDaoImpl.getCommunityMemberInfo(BeanConvertUtil.beanCovertMap(communityMemberDto)), CommunityMemberDto.class);
        return communityMembers;
    }
    @Override
    public int queryCommunityMembersCount(@RequestBody CommunityMemberDto communityMemberDto) {
        return communityMemberV1ServiceDaoImpl.queryCommunityMembersCount(BeanConvertUtil.beanCovertMap(communityMemberDto));    }
}
service-community/src/main/java/com/java110/community/smo/impl/CommunityV1InnerServiceSMOImpl.java
New file
@@ -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.ICommunityV1ServiceDao;
import com.java110.intf.community.ICommunityV1InnerServiceSMO;
import com.java110.dto.community.CommunityDto;
import com.java110.po.community.CommunityPo;
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-18 12:54:57 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 CommunityV1InnerServiceSMOImpl extends BaseServiceSMO implements ICommunityV1InnerServiceSMO {
    @Autowired
    private ICommunityV1ServiceDao communityV1ServiceDaoImpl;
    @Override
    public int saveCommunity(@RequestBody  CommunityPo communityPo) {
        int saveFlag = communityV1ServiceDaoImpl.saveCommunityInfo(BeanConvertUtil.beanCovertMap(communityPo));
        return saveFlag;
    }
     @Override
    public int updateCommunity(@RequestBody  CommunityPo communityPo) {
        int saveFlag = communityV1ServiceDaoImpl.updateCommunityInfo(BeanConvertUtil.beanCovertMap(communityPo));
        return saveFlag;
    }
     @Override
    public int deleteCommunity(@RequestBody  CommunityPo communityPo) {
       communityPo.setStatusCd("1");
       int saveFlag = communityV1ServiceDaoImpl.updateCommunityInfo(BeanConvertUtil.beanCovertMap(communityPo));
       return saveFlag;
    }
    @Override
    public List<CommunityDto> queryCommunitys(@RequestBody  CommunityDto communityDto) {
        //校验是否传了 分页信息
        int page = communityDto.getPage();
        if (page != PageDto.DEFAULT_PAGE) {
            communityDto.setPage((page - 1) * communityDto.getRow());
        }
        List<CommunityDto> communitys = BeanConvertUtil.covertBeanList(communityV1ServiceDaoImpl.getCommunityInfo(BeanConvertUtil.beanCovertMap(communityDto)), CommunityDto.class);
        return communitys;
    }
    @Override
    public int queryCommunitysCount(@RequestBody CommunityDto communityDto) {
        return communityV1ServiceDaoImpl.queryCommunitysCount(BeanConvertUtil.beanCovertMap(communityDto));    }
}
service-fee/src/main/java/com/java110/fee/dao/IPayFeeConfigV1ServiceDao.java
New file
@@ -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.fee.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-18 13:28:12 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 IPayFeeConfigV1ServiceDao {
    /**
     * 保存 收费项目信息
     * @param info
     * @throws DAOException DAO异常
     */
    int savePayFeeConfigInfo(Map info) throws DAOException;
    /**
     * 查询收费项目信息(instance过程)
     * 根据bId 查询收费项目信息
     * @param info bId 信息
     * @return 收费项目信息
     * @throws DAOException DAO异常
     */
    List<Map> getPayFeeConfigInfo(Map info) throws DAOException;
    /**
     * 修改收费项目信息
     * @param info 修改信息
     * @throws DAOException DAO异常
     */
    int updatePayFeeConfigInfo(Map info) throws DAOException;
    /**
     * 查询收费项目总数
     *
     * @param info 收费项目信息
     * @return 收费项目数量
     */
    int queryPayFeeConfigsCount(Map info);
}
service-fee/src/main/java/com/java110/fee/dao/impl/PayFeeConfigV1ServiceDaoImpl.java
New file
@@ -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.fee.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.fee.dao.IPayFeeConfigV1ServiceDao;
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-18 13:28:12 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("payFeeConfigV1ServiceDaoImpl")
public class PayFeeConfigV1ServiceDaoImpl extends BaseServiceDao implements IPayFeeConfigV1ServiceDao {
    private static Logger logger = LoggerFactory.getLogger(PayFeeConfigV1ServiceDaoImpl.class);
    /**
     * 保存收费项目信息 到 instance
     * @param info   bId 信息
     * @throws DAOException DAO异常
     */
    @Override
    public int savePayFeeConfigInfo(Map info) throws DAOException {
        logger.debug("保存 savePayFeeConfigInfo 入参 info : {}",info);
        int saveFlag = sqlSessionTemplate.insert("payFeeConfigV1ServiceDaoImpl.savePayFeeConfigInfo",info);
        return saveFlag;
    }
    /**
     * 查询收费项目信息(instance)
     * @param info bId 信息
     * @return List<Map>
     * @throws DAOException DAO异常
     */
    @Override
    public List<Map> getPayFeeConfigInfo(Map info) throws DAOException {
        logger.debug("查询 getPayFeeConfigInfo 入参 info : {}",info);
        List<Map> businessPayFeeConfigInfos = sqlSessionTemplate.selectList("payFeeConfigV1ServiceDaoImpl.getPayFeeConfigInfo",info);
        return businessPayFeeConfigInfos;
    }
    /**
     * 修改收费项目信息
     * @param info 修改信息
     * @throws DAOException DAO异常
     */
    @Override
    public int updatePayFeeConfigInfo(Map info) throws DAOException {
        logger.debug("修改 updatePayFeeConfigInfo 入参 info : {}",info);
        int saveFlag = sqlSessionTemplate.update("payFeeConfigV1ServiceDaoImpl.updatePayFeeConfigInfo",info);
        return saveFlag;
    }
     /**
     * 查询收费项目数量
     * @param info 收费项目信息
     * @return 收费项目数量
     */
    @Override
    public int queryPayFeeConfigsCount(Map info) {
        logger.debug("查询 queryPayFeeConfigsCount 入参 info : {}",info);
        List<Map> businessPayFeeConfigInfos = sqlSessionTemplate.selectList("payFeeConfigV1ServiceDaoImpl.queryPayFeeConfigsCount", info);
        if (businessPayFeeConfigInfos.size() < 1) {
            return 0;
        }
        return Integer.parseInt(businessPayFeeConfigInfos.get(0).get("count").toString());
    }
}
service-fee/src/main/java/com/java110/fee/smo/impl/PayFeeConfigV1InnerServiceSMOImpl.java
New file
@@ -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.fee.smo.impl;
import com.java110.core.base.smo.BaseServiceSMO;
import com.java110.dto.PageDto;
import com.java110.dto.fee.FeeConfigDto;
import com.java110.fee.dao.IPayFeeConfigV1ServiceDao;
import com.java110.intf.fee.IPayFeeConfigV1InnerServiceSMO;
import com.java110.po.fee.PayFeeConfigPo;
import com.java110.utils.util.BeanConvertUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
/**
 * 类表述: 服务之前调用的接口实现类,不对外提供接口能力 只用于接口建调用
 * add by 吴学文 at 2021-09-18 13:28:12 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 PayFeeConfigV1InnerServiceSMOImpl extends BaseServiceSMO implements IPayFeeConfigV1InnerServiceSMO {
    @Autowired
    private IPayFeeConfigV1ServiceDao payFeeConfigV1ServiceDaoImpl;
    @Override
    public int savePayFeeConfig(@RequestBody PayFeeConfigPo payFeeConfigPo) {
        int saveFlag = payFeeConfigV1ServiceDaoImpl.savePayFeeConfigInfo(BeanConvertUtil.beanCovertMap(payFeeConfigPo));
        return saveFlag;
    }
    @Override
    public int updatePayFeeConfig(@RequestBody PayFeeConfigPo payFeeConfigPo) {
        int saveFlag = payFeeConfigV1ServiceDaoImpl.updatePayFeeConfigInfo(BeanConvertUtil.beanCovertMap(payFeeConfigPo));
        return saveFlag;
    }
    @Override
    public int deletePayFeeConfig(@RequestBody PayFeeConfigPo payFeeConfigPo) {
        payFeeConfigPo.setStatusCd("1");
        int saveFlag = payFeeConfigV1ServiceDaoImpl.updatePayFeeConfigInfo(BeanConvertUtil.beanCovertMap(payFeeConfigPo));
        return saveFlag;
    }
    @Override
    public List<FeeConfigDto> queryPayFeeConfigs(@RequestBody FeeConfigDto payFeeConfigDto) {
        //校验是否传了 分页信息
        int page = payFeeConfigDto.getPage();
        if (page != PageDto.DEFAULT_PAGE) {
            payFeeConfigDto.setPage((page - 1) * payFeeConfigDto.getRow());
        }
        List<FeeConfigDto> payFeeConfigs = BeanConvertUtil.covertBeanList(
                payFeeConfigV1ServiceDaoImpl.getPayFeeConfigInfo(BeanConvertUtil.beanCovertMap(payFeeConfigDto)), FeeConfigDto.class);
        return payFeeConfigs;
    }
    @Override
    public int queryPayFeeConfigsCount(@RequestBody FeeConfigDto payFeeConfigDto) {
        return payFeeConfigV1ServiceDaoImpl.queryPayFeeConfigsCount(BeanConvertUtil.beanCovertMap(payFeeConfigDto));
    }
}