浏览代码

加入账户交易明细

java110 5 年之前
父节点
当前提交
65ae2fe39c
共有 23 个文件被更改,包括 2330 次插入17 次删除
  1. 175 0
      docs/document/services/accountDetail/DeleteAccountDetailInfo.md
  2. 175 0
      docs/document/services/accountDetail/SaveAccountDetailInfo.md
  3. 188 0
      docs/document/services/accountDetail/UpdateAccountDetailInfo.md
  4. 104 0
      java110-bean/src/main/java/com/java110/dto/accountDetail/AccountDetailDto.java
  5. 74 0
      java110-bean/src/main/java/com/java110/po/accountDetail/AccountDetailPo.java
  6. 232 0
      java110-db/src/main/resources/mapper/acct/AccountDetailServiceDaoImplMapper.xml
  7. 20 17
      java110-generator/src/main/resources/back/template_1.json
  8. 42 0
      java110-interface/src/main/java/com/java110/intf/acct/IAccountDetailInnerServiceSMO.java
  9. 18 0
      java110-utils/src/main/java/com/java110/utils/constant/BusinessTypeConstant.java
  10. 31 0
      java110-utils/src/main/java/com/java110/utils/constant/ServiceCodeAccountDetailConstant.java
  11. 81 0
      service-acct/src/main/java/com/java110/acct/dao/IAccountDetailServiceDao.java
  12. 130 0
      service-acct/src/main/java/com/java110/acct/dao/impl/AccountDetailServiceDaoImpl.java
  13. 96 0
      service-acct/src/main/java/com/java110/acct/listener/accountDetail/AbstractAccountDetailBusinessServiceDataFlowListener.java
  14. 176 0
      service-acct/src/main/java/com/java110/acct/listener/accountDetail/DeleteAccountDetailInfoListener.java
  15. 176 0
      service-acct/src/main/java/com/java110/acct/listener/accountDetail/SaveAccountDetailInfoListener.java
  16. 190 0
      service-acct/src/main/java/com/java110/acct/listener/accountDetail/UpdateAccountDetailInfoListener.java
  17. 91 0
      service-acct/src/main/java/com/java110/acct/smo/impl/AccountDetailInnerServiceSMOImpl.java
  18. 38 0
      service-api/src/main/java/com/java110/api/bmo/account/IAccountDetailBMO.java
  19. 61 0
      service-api/src/main/java/com/java110/api/bmo/account/impl/AccountDetailBMOImpl.java
  20. 49 0
      service-api/src/main/java/com/java110/api/listener/account/DeleteAccountDetailListener.java
  21. 82 0
      service-api/src/main/java/com/java110/api/listener/account/ListAccountDetailsListener.java
  22. 50 0
      service-api/src/main/java/com/java110/api/listener/account/SaveAccountDetailListener.java
  23. 51 0
      service-api/src/main/java/com/java110/api/listener/account/UpdateAccountDetailListener.java

+ 175 - 0
docs/document/services/accountDetail/DeleteAccountDetailInfo.md

@@ -0,0 +1,175 @@
+package com.java110.acct.listener.accountDetail;
+
+import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
+import com.java110.utils.constant.BusinessTypeConstant;
+import com.java110.utils.constant.ResponseConstant;
+import com.java110.utils.constant.StatusConstant;
+import com.java110.utils.exception.ListenerExecuteException;
+import com.java110.utils.util.Assert;
+import com.java110.core.annotation.Java110Listener;
+import com.java110.core.context.DataFlowContext;
+import com.java110.entity.center.Business;
+import com.java110.acct.dao.IAccountDetailServiceDao;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 删除账户交易信息 侦听
+ *
+ * 处理节点
+ * 1、businessAccountDetail:{} 账户交易基本信息节点
+ * 2、businessAccountDetailAttr:[{}] 账户交易属性信息节点
+ * 3、businessAccountDetailPhoto:[{}] 账户交易照片信息节点
+ * 4、businessAccountDetailCerdentials:[{}] 账户交易证件信息节点
+ * 协议地址 :https://github.com/java110/MicroCommunity/wiki/%E5%88%A0%E9%99%A4%E5%95%86%E6%88%B7%E4%BF%A1%E6%81%AF-%E5%8D%8F%E8%AE%AE
+ * Created by wuxw on 2018/5/18.
+ */
+@Java110Listener("deleteAccountDetailInfoListener")
+@Transactional
+public class DeleteAccountDetailInfoListener extends AbstractAccountDetailBusinessServiceDataFlowListener {
+
+    private final static Logger logger = LoggerFactory.getLogger(DeleteAccountDetailInfoListener.class);
+    @Autowired
+    IAccountDetailServiceDao accountDetailServiceDaoImpl;
+
+    @Override
+    public int getOrder() {
+        return 3;
+    }
+
+    @Override
+    public String getBusinessTypeCd() {
+        return BusinessTypeConstant.BUSINESS_TYPE_DELETE_ACCT_DETAIL;
+    }
+
+    /**
+     * 根据删除信息 查出Instance表中数据 保存至business表 (状态写DEL) 方便撤单时直接更新回去
+     * @param dataFlowContext 数据对象
+     * @param business 当前业务对象
+     */
+    @Override
+    protected void doSaveBusiness(DataFlowContext dataFlowContext, Business business) {
+        JSONObject data = business.getDatas();
+
+        Assert.notEmpty(data,"没有datas 节点,或没有子节点需要处理");
+
+            //处理 businessAccountDetail 节点
+            if(data.containsKey(AccountDetailPo.class.getSimpleName())){
+                Object _obj = data.get(AccountDetailPo.class.getSimpleName());
+                JSONArray businessAccountDetails = null;
+                if(_obj instanceof JSONObject){
+                    businessAccountDetails = new JSONArray();
+                    businessAccountDetails.add(_obj);
+                }else {
+                    businessAccountDetails = (JSONArray)_obj;
+                }
+                //JSONObject businessAccountDetail = data.getJSONObject(AccountDetailPo.class.getSimpleName());
+                for (int _accountDetailIndex = 0; _accountDetailIndex < businessAccountDetails.size();_accountDetailIndex++) {
+                    JSONObject businessAccountDetail = businessAccountDetails.getJSONObject(_accountDetailIndex);
+                    doBusinessAccountDetail(business, businessAccountDetail);
+                    if(_obj instanceof JSONObject) {
+                        dataFlowContext.addParamOut("detailId", businessAccountDetail.getString("detailId"));
+                    }
+                }
+
+        }
+
+
+    }
+
+    /**
+     * 删除 instance数据
+     * @param dataFlowContext 数据对象
+     * @param business 当前业务对象
+     */
+    @Override
+    protected void doBusinessToInstance(DataFlowContext dataFlowContext, Business business) {
+        String bId = business.getbId();
+        //Assert.hasLength(bId,"请求报文中没有包含 bId");
+
+        //账户交易信息
+        Map info = new HashMap();
+        info.put("bId",business.getbId());
+        info.put("operate",StatusConstant.OPERATE_DEL);
+
+        //账户交易信息
+        List<Map> businessAccountDetailInfos = accountDetailServiceDaoImpl.getBusinessAccountDetailInfo(info);
+        if( businessAccountDetailInfos != null && businessAccountDetailInfos.size() >0) {
+            for (int _accountDetailIndex = 0; _accountDetailIndex < businessAccountDetailInfos.size();_accountDetailIndex++) {
+                Map businessAccountDetailInfo = businessAccountDetailInfos.get(_accountDetailIndex);
+                flushBusinessAccountDetailInfo(businessAccountDetailInfo,StatusConstant.STATUS_CD_INVALID);
+                accountDetailServiceDaoImpl.updateAccountDetailInfoInstance(businessAccountDetailInfo);
+                dataFlowContext.addParamOut("detailId",businessAccountDetailInfo.get("detail_id"));
+            }
+        }
+
+    }
+
+    /**
+     * 撤单
+     * 从business表中查询到DEL的数据 将instance中的数据更新回来
+     * @param dataFlowContext 数据对象
+     * @param business 当前业务对象
+     */
+    @Override
+    protected void doRecover(DataFlowContext dataFlowContext, Business business) {
+        String bId = business.getbId();
+        //Assert.hasLength(bId,"请求报文中没有包含 bId");
+        Map info = new HashMap();
+        info.put("bId",bId);
+        info.put("statusCd",StatusConstant.STATUS_CD_INVALID);
+
+        Map delInfo = new HashMap();
+        delInfo.put("bId",business.getbId());
+        delInfo.put("operate",StatusConstant.OPERATE_DEL);
+        //账户交易信息
+        List<Map> accountDetailInfo = accountDetailServiceDaoImpl.getAccountDetailInfo(info);
+        if(accountDetailInfo != null && accountDetailInfo.size() > 0){
+
+            //账户交易信息
+            List<Map> businessAccountDetailInfos = accountDetailServiceDaoImpl.getBusinessAccountDetailInfo(delInfo);
+            //除非程序出错了,这里不会为空
+            if(businessAccountDetailInfos == null ||  businessAccountDetailInfos.size() == 0){
+                throw new ListenerExecuteException(ResponseConstant.RESULT_CODE_INNER_ERROR,"撤单失败(accountDetail),程序内部异常,请检查! "+delInfo);
+            }
+            for (int _accountDetailIndex = 0; _accountDetailIndex < businessAccountDetailInfos.size();_accountDetailIndex++) {
+                Map businessAccountDetailInfo = businessAccountDetailInfos.get(_accountDetailIndex);
+                flushBusinessAccountDetailInfo(businessAccountDetailInfo,StatusConstant.STATUS_CD_VALID);
+                accountDetailServiceDaoImpl.updateAccountDetailInfoInstance(businessAccountDetailInfo);
+            }
+        }
+    }
+
+
+
+    /**
+     * 处理 businessAccountDetail 节点
+     * @param business 总的数据节点
+     * @param businessAccountDetail 账户交易节点
+     */
+    private void doBusinessAccountDetail(Business business,JSONObject businessAccountDetail){
+
+        Assert.jsonObjectHaveKey(businessAccountDetail,"detailId","businessAccountDetail 节点下没有包含 detailId 节点");
+
+        if(businessAccountDetail.getString("detailId").startsWith("-")){
+            throw new ListenerExecuteException(ResponseConstant.RESULT_PARAM_ERROR,"detailId 错误,不能自动生成(必须已经存在的detailId)"+businessAccountDetail);
+        }
+        //自动插入DEL
+        autoSaveDelBusinessAccountDetail(business,businessAccountDetail);
+    }
+    @Override
+    public IAccountDetailServiceDao getAccountDetailServiceDaoImpl() {
+        return accountDetailServiceDaoImpl;
+    }
+
+    public void setAccountDetailServiceDaoImpl(IAccountDetailServiceDao accountDetailServiceDaoImpl) {
+        this.accountDetailServiceDaoImpl = accountDetailServiceDaoImpl;
+    }
+}

+ 175 - 0
docs/document/services/accountDetail/SaveAccountDetailInfo.md

@@ -0,0 +1,175 @@
+package com.java110.acct.listener.accountDetail;
+
+import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
+import com.java110.utils.constant.BusinessTypeConstant;
+import com.java110.utils.constant.StatusConstant;
+import com.java110.utils.util.Assert;
+import com.java110.acct.dao.IAccountDetailServiceDao;
+import com.java110.core.annotation.Java110Listener;
+import com.java110.core.context.DataFlowContext;
+import com.java110.core.factory.GenerateCodeFactory;
+import com.java110.entity.center.Business;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 保存 账户交易信息 侦听
+ * Created by wuxw on 2018/5/18.
+ */
+@Java110Listener("saveAccountDetailInfoListener")
+@Transactional
+public class SaveAccountDetailInfoListener extends AbstractAccountDetailBusinessServiceDataFlowListener{
+
+    private static Logger logger = LoggerFactory.getLogger(SaveAccountDetailInfoListener.class);
+
+    @Autowired
+    private IAccountDetailServiceDao accountDetailServiceDaoImpl;
+
+    @Override
+    public int getOrder() {
+        return 0;
+    }
+
+    @Override
+    public String getBusinessTypeCd() {
+        return BusinessTypeConstant.BUSINESS_TYPE_SAVE_ACCT_DETAIL;
+    }
+
+    /**
+     * 保存账户交易信息 business 表中
+     * @param dataFlowContext 数据对象
+     * @param business 当前业务对象
+     */
+    @Override
+    protected void doSaveBusiness(DataFlowContext dataFlowContext, Business business) {
+        JSONObject data = business.getDatas();
+        Assert.notEmpty(data,"没有datas 节点,或没有子节点需要处理");
+
+        //处理 businessAccountDetail 节点
+        if(data.containsKey(AccountDetailPo.class.getSimpleName())){
+            Object bObj = data.get(AccountDetailPo.class.getSimpleName());
+            JSONArray businessAccountDetails = null;
+            if(bObj instanceof JSONObject){
+                businessAccountDetails = new JSONArray();
+                businessAccountDetails.add(bObj);
+            }else {
+                businessAccountDetails = (JSONArray)bObj;
+            }
+            //JSONObject businessAccountDetail = data.getJSONObject(AccountDetailPo.class.getSimpleName());
+            for (int bAccountDetailIndex = 0; bAccountDetailIndex < businessAccountDetails.size();bAccountDetailIndex++) {
+                JSONObject businessAccountDetail = businessAccountDetails.getJSONObject(bAccountDetailIndex);
+                doBusinessAccountDetail(business, businessAccountDetail);
+                if(bObj instanceof JSONObject) {
+                    dataFlowContext.addParamOut("detailId", businessAccountDetail.getString("detailId"));
+                }
+            }
+        }
+    }
+
+    /**
+     * business 数据转移到 instance
+     * @param dataFlowContext 数据对象
+     * @param business 当前业务对象
+     */
+    @Override
+    protected void doBusinessToInstance(DataFlowContext dataFlowContext, Business business) {
+        JSONObject data = business.getDatas();
+
+        Map info = new HashMap();
+        info.put("bId",business.getbId());
+        info.put("operate",StatusConstant.OPERATE_ADD);
+
+        //账户交易信息
+        List<Map> businessAccountDetailInfo = accountDetailServiceDaoImpl.getBusinessAccountDetailInfo(info);
+        if( businessAccountDetailInfo != null && businessAccountDetailInfo.size() >0) {
+            reFreshShareColumn(info, businessAccountDetailInfo.get(0));
+            accountDetailServiceDaoImpl.saveAccountDetailInfoInstance(info);
+            if(businessAccountDetailInfo.size() == 1) {
+                dataFlowContext.addParamOut("detailId", businessAccountDetailInfo.get(0).get("detail_id"));
+            }
+        }
+    }
+
+
+    /**
+     * 刷 分片字段
+     *
+     * @param info         查询对象
+     * @param businessInfo 小区ID
+     */
+    private void reFreshShareColumn(Map info, Map businessInfo) {
+
+        if (info.containsKey("objId")) {
+            return;
+        }
+
+        if (!businessInfo.containsKey("obj_id")) {
+            return;
+        }
+
+        info.put("objId", businessInfo.get("obj_id"));
+    }
+    /**
+     * 撤单
+     * @param dataFlowContext 数据对象
+     * @param business 当前业务对象
+     */
+    @Override
+    protected void doRecover(DataFlowContext dataFlowContext, Business business) {
+        String bId = business.getbId();
+        //Assert.hasLength(bId,"请求报文中没有包含 bId");
+        Map info = new HashMap();
+        info.put("bId",bId);
+        info.put("statusCd",StatusConstant.STATUS_CD_VALID);
+        Map paramIn = new HashMap();
+        paramIn.put("bId",bId);
+        paramIn.put("statusCd",StatusConstant.STATUS_CD_INVALID);
+        //账户交易信息
+        List<Map> accountDetailInfo = accountDetailServiceDaoImpl.getAccountDetailInfo(info);
+        if(accountDetailInfo != null && accountDetailInfo.size() > 0){
+            reFreshShareColumn(paramIn, accountDetailInfo.get(0));
+            accountDetailServiceDaoImpl.updateAccountDetailInfoInstance(paramIn);
+        }
+    }
+
+
+
+    /**
+     * 处理 businessAccountDetail 节点
+     * @param business 总的数据节点
+     * @param businessAccountDetail 账户交易节点
+     */
+    private void doBusinessAccountDetail(Business business,JSONObject businessAccountDetail){
+
+        Assert.jsonObjectHaveKey(businessAccountDetail,"detailId","businessAccountDetail 节点下没有包含 detailId 节点");
+
+        if(businessAccountDetail.getString("detailId").startsWith("-")){
+            //刷新缓存
+            //flushAccountDetailId(business.getDatas());
+
+            businessAccountDetail.put("detailId",GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_detailId));
+
+        }
+
+        businessAccountDetail.put("bId",business.getbId());
+        businessAccountDetail.put("operate", StatusConstant.OPERATE_ADD);
+        //保存账户交易信息
+        accountDetailServiceDaoImpl.saveBusinessAccountDetailInfo(businessAccountDetail);
+
+    }
+    @Override
+    public IAccountDetailServiceDao getAccountDetailServiceDaoImpl() {
+        return accountDetailServiceDaoImpl;
+    }
+
+    public void setAccountDetailServiceDaoImpl(IAccountDetailServiceDao accountDetailServiceDaoImpl) {
+        this.accountDetailServiceDaoImpl = accountDetailServiceDaoImpl;
+    }
+}

+ 188 - 0
docs/document/services/accountDetail/UpdateAccountDetailInfo.md

@@ -0,0 +1,188 @@
+package com.java110.acct.listener.accountDetail;
+
+import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
+import com.java110.utils.constant.BusinessTypeConstant;
+import com.java110.utils.constant.ResponseConstant;
+import com.java110.utils.constant.StatusConstant;
+import com.java110.utils.exception.ListenerExecuteException;
+import com.java110.utils.util.Assert;
+import com.java110.core.annotation.Java110Listener;
+import com.java110.core.context.DataFlowContext;
+import com.java110.entity.center.Business;
+import com.java110.acct.dao.IAccountDetailServiceDao;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 修改账户交易信息 侦听
+ *
+ * 处理节点
+ * 1、businessAccountDetail:{} 账户交易基本信息节点
+ * 2、businessAccountDetailAttr:[{}] 账户交易属性信息节点
+ * 3、businessAccountDetailPhoto:[{}] 账户交易照片信息节点
+ * 4、businessAccountDetailCerdentials:[{}] 账户交易证件信息节点
+ * 协议地址 :https://github.com/java110/MicroCommunity/wiki/%E4%BF%AE%E6%94%B9%E5%95%86%E6%88%B7%E4%BF%A1%E6%81%AF-%E5%8D%8F%E8%AE%AE
+ * Created by wuxw on 2018/5/18.
+ */
+@Java110Listener("updateAccountDetailInfoListener")
+@Transactional
+public class UpdateAccountDetailInfoListener extends AbstractAccountDetailBusinessServiceDataFlowListener {
+
+    private static Logger logger = LoggerFactory.getLogger(UpdateAccountDetailInfoListener.class);
+    @Autowired
+    private IAccountDetailServiceDao accountDetailServiceDaoImpl;
+
+    @Override
+    public int getOrder() {
+        return 2;
+    }
+
+    @Override
+    public String getBusinessTypeCd() {
+        return BusinessTypeConstant.BUSINESS_TYPE_UPDATE_ACCT_DETAIL;
+    }
+
+    /**
+     * business过程
+     * @param dataFlowContext 上下文对象
+     * @param business 业务对象
+     */
+    @Override
+    protected void doSaveBusiness(DataFlowContext dataFlowContext, Business business) {
+
+        JSONObject data = business.getDatas();
+
+        Assert.notEmpty(data,"没有datas 节点,或没有子节点需要处理");
+
+
+            //处理 businessAccountDetail 节点
+            if(data.containsKey(AccountDetailPo.class.getSimpleName())){
+                Object _obj = data.get(AccountDetailPo.class.getSimpleName());
+                JSONArray businessAccountDetails = null;
+                if(_obj instanceof JSONObject){
+                    businessAccountDetails = new JSONArray();
+                    businessAccountDetails.add(_obj);
+                }else {
+                    businessAccountDetails = (JSONArray)_obj;
+                }
+                //JSONObject businessAccountDetail = data.getJSONObject(AccountDetailPo.class.getSimpleName());
+                for (int _accountDetailIndex = 0; _accountDetailIndex < businessAccountDetails.size();_accountDetailIndex++) {
+                    JSONObject businessAccountDetail = businessAccountDetails.getJSONObject(_accountDetailIndex);
+                    doBusinessAccountDetail(business, businessAccountDetail);
+                    if(_obj instanceof JSONObject) {
+                        dataFlowContext.addParamOut("detailId", businessAccountDetail.getString("detailId"));
+                    }
+                }
+            }
+    }
+
+
+    /**
+     * business to instance 过程
+     * @param dataFlowContext 数据对象
+     * @param business 当前业务对象
+     */
+    @Override
+    protected void doBusinessToInstance(DataFlowContext dataFlowContext, Business business) {
+
+        JSONObject data = business.getDatas();
+
+        Map info = new HashMap();
+        info.put("bId",business.getbId());
+        info.put("operate",StatusConstant.OPERATE_ADD);
+
+        //账户交易信息
+        List<Map> businessAccountDetailInfos = accountDetailServiceDaoImpl.getBusinessAccountDetailInfo(info);
+        if( businessAccountDetailInfos != null && businessAccountDetailInfos.size() >0) {
+            for (int _accountDetailIndex = 0; _accountDetailIndex < businessAccountDetailInfos.size();_accountDetailIndex++) {
+                Map businessAccountDetailInfo = businessAccountDetailInfos.get(_accountDetailIndex);
+                flushBusinessAccountDetailInfo(businessAccountDetailInfo,StatusConstant.STATUS_CD_VALID);
+                accountDetailServiceDaoImpl.updateAccountDetailInfoInstance(businessAccountDetailInfo);
+                if(businessAccountDetailInfo.size() == 1) {
+                    dataFlowContext.addParamOut("detailId", businessAccountDetailInfo.get("detail_id"));
+                }
+            }
+        }
+
+    }
+
+    /**
+     * 撤单
+     * @param dataFlowContext 数据对象
+     * @param business 当前业务对象
+     */
+    @Override
+    protected void doRecover(DataFlowContext dataFlowContext, Business business) {
+
+        String bId = business.getbId();
+        //Assert.hasLength(bId,"请求报文中没有包含 bId");
+        Map info = new HashMap();
+        info.put("bId",bId);
+        info.put("statusCd",StatusConstant.STATUS_CD_VALID);
+        Map delInfo = new HashMap();
+        delInfo.put("bId",business.getbId());
+        delInfo.put("operate",StatusConstant.OPERATE_DEL);
+        //账户交易信息
+        List<Map> accountDetailInfo = accountDetailServiceDaoImpl.getAccountDetailInfo(info);
+        if(accountDetailInfo != null && accountDetailInfo.size() > 0){
+
+            //账户交易信息
+            List<Map> businessAccountDetailInfos = accountDetailServiceDaoImpl.getBusinessAccountDetailInfo(delInfo);
+            //除非程序出错了,这里不会为空
+            if(businessAccountDetailInfos == null || businessAccountDetailInfos.size() == 0){
+                throw new ListenerExecuteException(ResponseConstant.RESULT_CODE_INNER_ERROR,"撤单失败(accountDetail),程序内部异常,请检查! "+delInfo);
+            }
+            for (int _accountDetailIndex = 0; _accountDetailIndex < businessAccountDetailInfos.size();_accountDetailIndex++) {
+                Map businessAccountDetailInfo = businessAccountDetailInfos.get(_accountDetailIndex);
+                flushBusinessAccountDetailInfo(businessAccountDetailInfo,StatusConstant.STATUS_CD_VALID);
+                accountDetailServiceDaoImpl.updateAccountDetailInfoInstance(businessAccountDetailInfo);
+            }
+        }
+
+    }
+
+
+
+    /**
+     * 处理 businessAccountDetail 节点
+     * @param business 总的数据节点
+     * @param businessAccountDetail 账户交易节点
+     */
+    private void doBusinessAccountDetail(Business business,JSONObject businessAccountDetail){
+
+        Assert.jsonObjectHaveKey(businessAccountDetail,"detailId","businessAccountDetail 节点下没有包含 detailId 节点");
+
+        if(businessAccountDetail.getString("detailId").startsWith("-")){
+            throw new ListenerExecuteException(ResponseConstant.RESULT_PARAM_ERROR,"detailId 错误,不能自动生成(必须已经存在的detailId)"+businessAccountDetail);
+        }
+        //自动保存DEL
+        autoSaveDelBusinessAccountDetail(business,businessAccountDetail);
+
+        businessAccountDetail.put("bId",business.getbId());
+        businessAccountDetail.put("operate", StatusConstant.OPERATE_ADD);
+        //保存账户交易信息
+        accountDetailServiceDaoImpl.saveBusinessAccountDetailInfo(businessAccountDetail);
+
+    }
+
+
+
+    @Override
+    public IAccountDetailServiceDao getAccountDetailServiceDaoImpl() {
+        return accountDetailServiceDaoImpl;
+    }
+
+    public void setAccountDetailServiceDaoImpl(IAccountDetailServiceDao accountDetailServiceDaoImpl) {
+        this.accountDetailServiceDaoImpl = accountDetailServiceDaoImpl;
+    }
+
+
+
+}

+ 104 - 0
java110-bean/src/main/java/com/java110/dto/accountDetail/AccountDetailDto.java

@@ -0,0 +1,104 @@
+package com.java110.dto.accountDetail;
+
+import com.java110.dto.PageDto;
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * @ClassName FloorDto
+ * @Description 账户交易数据层封装
+ * @Author wuxw
+ * @Date 2019/4/24 8:52
+ * @Version 1.0
+ * add by wuxw 2019/4/24
+ **/
+public class AccountDetailDto extends PageDto implements Serializable {
+
+    private String detailType;
+private String amount;
+private String orderId;
+private String objId;
+private String detailId;
+private String acctId;
+private String relAcctId;
+private String remark;
+private String objType;
+
+
+    private Date createTime;
+
+    private String statusCd = "0";
+
+
+    public String getDetailType() {
+        return detailType;
+    }
+public void setDetailType(String detailType) {
+        this.detailType = detailType;
+    }
+public String getAmount() {
+        return amount;
+    }
+public void setAmount(String amount) {
+        this.amount = amount;
+    }
+public String getOrderId() {
+        return orderId;
+    }
+public void setOrderId(String orderId) {
+        this.orderId = orderId;
+    }
+public String getObjId() {
+        return objId;
+    }
+public void setObjId(String objId) {
+        this.objId = objId;
+    }
+public String getDetailId() {
+        return detailId;
+    }
+public void setDetailId(String detailId) {
+        this.detailId = detailId;
+    }
+public String getAcctId() {
+        return acctId;
+    }
+public void setAcctId(String acctId) {
+        this.acctId = acctId;
+    }
+public String getRelAcctId() {
+        return relAcctId;
+    }
+public void setRelAcctId(String relAcctId) {
+        this.relAcctId = relAcctId;
+    }
+public String getRemark() {
+        return remark;
+    }
+public void setRemark(String remark) {
+        this.remark = remark;
+    }
+public String getObjType() {
+        return objType;
+    }
+public void setObjType(String objType) {
+        this.objType = objType;
+    }
+
+
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+
+    public String getStatusCd() {
+        return statusCd;
+    }
+
+    public void setStatusCd(String statusCd) {
+        this.statusCd = statusCd;
+    }
+}

+ 74 - 0
java110-bean/src/main/java/com/java110/po/accountDetail/AccountDetailPo.java

@@ -0,0 +1,74 @@
+package com.java110.po.accountDetail;
+
+import java.io.Serializable;
+import java.util.Date;
+
+public class AccountDetailPo implements Serializable {
+
+    private String detailType;
+private String amount;
+private String orderId;
+private String objId;
+private String detailId;
+private String acctId;
+private String relAcctId;
+private String remark;
+private String objType;
+public String getDetailType() {
+        return detailType;
+    }
+public void setDetailType(String detailType) {
+        this.detailType = detailType;
+    }
+public String getAmount() {
+        return amount;
+    }
+public void setAmount(String amount) {
+        this.amount = amount;
+    }
+public String getOrderId() {
+        return orderId;
+    }
+public void setOrderId(String orderId) {
+        this.orderId = orderId;
+    }
+public String getObjId() {
+        return objId;
+    }
+public void setObjId(String objId) {
+        this.objId = objId;
+    }
+public String getDetailId() {
+        return detailId;
+    }
+public void setDetailId(String detailId) {
+        this.detailId = detailId;
+    }
+public String getAcctId() {
+        return acctId;
+    }
+public void setAcctId(String acctId) {
+        this.acctId = acctId;
+    }
+public String getRelAcctId() {
+        return relAcctId;
+    }
+public void setRelAcctId(String relAcctId) {
+        this.relAcctId = relAcctId;
+    }
+public String getRemark() {
+        return remark;
+    }
+public void setRemark(String remark) {
+        this.remark = remark;
+    }
+public String getObjType() {
+        return objType;
+    }
+public void setObjType(String objType) {
+        this.objType = objType;
+    }
+
+
+
+}

+ 232 - 0
java110-db/src/main/resources/mapper/acct/AccountDetailServiceDaoImplMapper.xml

@@ -0,0 +1,232 @@
+<?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="accountDetailServiceDaoImpl">
+
+    <!-- 保存账户交易信息 add by wuxw 2018-07-03 -->
+       <insert id="saveBusinessAccountDetailInfo" parameterType="Map">
+           insert into business_account_detail(
+detail_type,amount,operate,order_id,obj_id,detail_id,acct_id,rel_acct_id,remark,b_id,obj_type
+) values (
+#{detailType},#{amount},#{operate},#{orderId},#{objId},#{detailId},#{acctId},#{relAcctId},#{remark},#{bId},#{objType}
+)
+       </insert>
+
+
+       <!-- 查询账户交易信息(Business) add by wuxw 2018-07-03 -->
+       <select id="getBusinessAccountDetailInfo" parameterType="Map" resultType="Map">
+           select  t.detail_type,t.detail_type detailType,t.amount,t.operate,t.order_id,t.order_id orderId,t.obj_id,t.obj_id objId,t.detail_id,t.detail_id detailId,t.acct_id,t.acct_id acctId,t.rel_acct_id,t.rel_acct_id relAcctId,t.remark,t.b_id,t.b_id bId,t.obj_type,t.obj_type objType 
+from business_account_detail t 
+where 1 =1 
+<if test="detailType !=null and detailType != ''">
+   and t.detail_type= #{detailType}
+</if> 
+<if test="amount !=null and amount != ''">
+   and t.amount= #{amount}
+</if> 
+<if test="operate !=null and operate != ''">
+   and t.operate= #{operate}
+</if> 
+<if test="orderId !=null and orderId != ''">
+   and t.order_id= #{orderId}
+</if> 
+<if test="objId !=null and objId != ''">
+   and t.obj_id= #{objId}
+</if> 
+<if test="detailId !=null and detailId != ''">
+   and t.detail_id= #{detailId}
+</if> 
+<if test="acctId !=null and acctId != ''">
+   and t.acct_id= #{acctId}
+</if> 
+<if test="relAcctId !=null and relAcctId != ''">
+   and t.rel_acct_id= #{relAcctId}
+</if> 
+<if test="remark !=null and remark != ''">
+   and t.remark= #{remark}
+</if> 
+<if test="bId !=null and bId != ''">
+   and t.b_id= #{bId}
+</if> 
+<if test="objType !=null and objType != ''">
+   and t.obj_type= #{objType}
+</if> 
+
+       </select>
+
+
+
+
+
+    <!-- 保存账户交易信息至 instance表中 add by wuxw 2018-07-03 -->
+    <insert id="saveAccountDetailInfoInstance" parameterType="Map">
+        insert into account_detail(
+detail_type,amount,order_id,obj_id,detail_id,acct_id,rel_acct_id,remark,status_cd,b_id,obj_type
+) select t.detail_type,t.amount,t.order_id,t.obj_id,t.detail_id,t.acct_id,t.rel_acct_id,t.remark,'0',t.b_id,t.obj_type from business_account_detail t where 1=1
+<if test="detailType !=null and detailType != ''">
+   and t.detail_type= #{detailType}
+</if> 
+<if test="amount !=null and amount != ''">
+   and t.amount= #{amount}
+</if> 
+   and t.operate= 'ADD'
+<if test="orderId !=null and orderId != ''">
+   and t.order_id= #{orderId}
+</if> 
+<if test="objId !=null and objId != ''">
+   and t.obj_id= #{objId}
+</if> 
+<if test="detailId !=null and detailId != ''">
+   and t.detail_id= #{detailId}
+</if> 
+<if test="acctId !=null and acctId != ''">
+   and t.acct_id= #{acctId}
+</if> 
+<if test="relAcctId !=null and relAcctId != ''">
+   and t.rel_acct_id= #{relAcctId}
+</if> 
+<if test="remark !=null and remark != ''">
+   and t.remark= #{remark}
+</if> 
+<if test="bId !=null and bId != ''">
+   and t.b_id= #{bId}
+</if> 
+<if test="objType !=null and objType != ''">
+   and t.obj_type= #{objType}
+</if> 
+
+    </insert>
+
+
+
+    <!-- 查询账户交易信息 add by wuxw 2018-07-03 -->
+    <select id="getAccountDetailInfo" parameterType="Map" resultType="Map">
+        select  t.detail_type,t.detail_type detailType,t.amount,t.order_id,t.order_id orderId,t.obj_id,t.obj_id objId,t.detail_id,t.detail_id detailId,t.acct_id,t.acct_id acctId,t.rel_acct_id,t.rel_acct_id relAcctId,t.remark,t.status_cd,t.status_cd statusCd,t.b_id,t.b_id bId,t.obj_type,t.obj_type objType 
+from account_detail t 
+where 1 =1 
+<if test="detailType !=null and detailType != ''">
+   and t.detail_type= #{detailType}
+</if> 
+<if test="amount !=null and amount != ''">
+   and t.amount= #{amount}
+</if> 
+<if test="orderId !=null and orderId != ''">
+   and t.order_id= #{orderId}
+</if> 
+<if test="objId !=null and objId != ''">
+   and t.obj_id= #{objId}
+</if> 
+<if test="detailId !=null and detailId != ''">
+   and t.detail_id= #{detailId}
+</if> 
+<if test="acctId !=null and acctId != ''">
+   and t.acct_id= #{acctId}
+</if> 
+<if test="relAcctId !=null and relAcctId != ''">
+   and t.rel_acct_id= #{relAcctId}
+</if> 
+<if test="remark !=null and remark != ''">
+   and t.remark= #{remark}
+</if> 
+<if test="statusCd !=null and statusCd != ''">
+   and t.status_cd= #{statusCd}
+</if> 
+<if test="bId !=null and bId != ''">
+   and t.b_id= #{bId}
+</if> 
+<if test="objType !=null and objType != ''">
+   and t.obj_type= #{objType}
+</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="updateAccountDetailInfoInstance" parameterType="Map">
+        update  account_detail t set t.status_cd = #{statusCd}
+<if test="newBId != null and newBId != ''">
+,t.b_id = #{newBId}
+</if> 
+<if test="detailType !=null and detailType != ''">
+, t.detail_type= #{detailType}
+</if> 
+<if test="amount !=null and amount != ''">
+, t.amount= #{amount}
+</if> 
+<if test="orderId !=null and orderId != ''">
+, t.order_id= #{orderId}
+</if> 
+<if test="objId !=null and objId != ''">
+, t.obj_id= #{objId}
+</if> 
+<if test="acctId !=null and acctId != ''">
+, t.acct_id= #{acctId}
+</if> 
+<if test="relAcctId !=null and relAcctId != ''">
+, t.rel_acct_id= #{relAcctId}
+</if> 
+<if test="remark !=null and remark != ''">
+, t.remark= #{remark}
+</if> 
+<if test="objType !=null and objType != ''">
+, t.obj_type= #{objType}
+</if> 
+ where 1=1 <if test="detailId !=null and detailId != ''">
+and t.detail_id= #{detailId}
+</if> 
+<if test="bId !=null and bId != ''">
+and t.b_id= #{bId}
+</if> 
+
+    </update>
+
+    <!-- 查询账户交易数量 add by wuxw 2018-07-03 -->
+     <select id="queryAccountDetailsCount" parameterType="Map" resultType="Map">
+        select  count(1) count 
+from account_detail t 
+where 1 =1 
+<if test="detailType !=null and detailType != ''">
+   and t.detail_type= #{detailType}
+</if> 
+<if test="amount !=null and amount != ''">
+   and t.amount= #{amount}
+</if> 
+<if test="orderId !=null and orderId != ''">
+   and t.order_id= #{orderId}
+</if> 
+<if test="objId !=null and objId != ''">
+   and t.obj_id= #{objId}
+</if> 
+<if test="detailId !=null and detailId != ''">
+   and t.detail_id= #{detailId}
+</if> 
+<if test="acctId !=null and acctId != ''">
+   and t.acct_id= #{acctId}
+</if> 
+<if test="relAcctId !=null and relAcctId != ''">
+   and t.rel_acct_id= #{relAcctId}
+</if> 
+<if test="remark !=null and remark != ''">
+   and t.remark= #{remark}
+</if> 
+<if test="statusCd !=null and statusCd != ''">
+   and t.status_cd= #{statusCd}
+</if> 
+<if test="bId !=null and bId != ''">
+   and t.b_id= #{bId}
+</if> 
+<if test="objType !=null and objType != ''">
+   and t.obj_type= #{objType}
+</if> 
+
+
+     </select>
+
+</mapper>

+ 20 - 17
java110-generator/src/main/resources/back/template_1.json

@@ -1,38 +1,41 @@
 {
   "autoMove": true,
-  "id": "acctId",
-  "name": "account",
-  "desc": "账户",
+  "id": "detailId",
+  "name": "accountDetail",
+  "desc": "账户交易",
   "shareParam": "objId",
   "shareColumn": "obj_id",
   "shareName": "acct",
-  "newBusinessTypeCd": "BUSINESS_TYPE_SAVE_ACCT",
-  "updateBusinessTypeCd": "BUSINESS_TYPE_UPDATE_ACCT",
-  "deleteBusinessTypeCd": "BUSINESS_TYPE_DELETE_ACCT",
-  "newBusinessTypeCdValue": "121100030001",
-  "updateBusinessTypeCdValue": "121100040001",
-  "deleteBusinessTypeCdValue": "121100050001",
-  "businessTableName": "business_account",
-  "tableName": "account",
+  "newBusinessTypeCd": "BUSINESS_TYPE_SAVE_ACCT_DETAIL",
+  "updateBusinessTypeCd": "BUSINESS_TYPE_UPDATE_ACCT_DETAIL",
+  "deleteBusinessTypeCd": "BUSINESS_TYPE_DELETE_ACCT_DETAIL",
+  "newBusinessTypeCdValue": "121100030002",
+  "updateBusinessTypeCdValue": "121100040002",
+  "deleteBusinessTypeCdValue": "121100050002",
+  "businessTableName": "business_account_detail",
+  "tableName": "account_detail",
   "param": {
+    "detailId": "detail_id",
     "acctId": "acct_id",
-    "acctName": "acct_name",
-    "acctType": "acct_type",
+    "detailType": "detail_type",
     "bId": "b_id",
+    "relAcctId": "rel_acct_id",
     "amount": "amount",
     "objType": "obj_type",
     "objId": "obj_id",
+    "orderId": "order_id",
+    "remark": "remark",
     "statusCd": "status_cd",
     "operate": "operate"
   },
   "required": [
     {
-      "code": "acctName",
-      "msg": "账户名称不能为空"
+      "code": "acctId",
+      "msg": "账户不能为空"
     },
     {
-      "code": "acctType",
-      "msg": "账户类型不能为空"
+      "code": "detailType",
+      "msg": "类型不能为空"
     },
     {
       "code": "amount",

+ 42 - 0
java110-interface/src/main/java/com/java110/intf/acct/IAccountDetailInnerServiceSMO.java

@@ -0,0 +1,42 @@
+package com.java110.intf.acct;
+
+import com.java110.config.feign.FeignConfiguration;
+import com.java110.dto.accountDetail.AccountDetailDto;
+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;
+
+/**
+ * @ClassName IAccountDetailInnerServiceSMO
+ * @Description 账户交易接口类
+ * @Author wuxw
+ * @Date 2019/4/24 9:04
+ * @Version 1.0
+ * add by wuxw 2019/4/24
+ **/
+@FeignClient(name = "acct-service", configuration = {FeignConfiguration.class})
+@RequestMapping("/accountDetailApi")
+public interface IAccountDetailInnerServiceSMO {
+
+    /**
+     * <p>查询小区楼信息</p>
+     *
+     *
+     * @param accountDetailDto 数据对象分享
+     * @return AccountDetailDto 对象数据
+     */
+    @RequestMapping(value = "/queryAccountDetails", method = RequestMethod.POST)
+    List<AccountDetailDto> queryAccountDetails(@RequestBody AccountDetailDto accountDetailDto);
+
+    /**
+     * 查询<p>小区楼</p>总记录数
+     *
+     * @param accountDetailDto 数据对象分享
+     * @return 小区下的小区楼记录数
+     */
+    @RequestMapping(value = "/queryAccountDetailsCount", method = RequestMethod.POST)
+    int queryAccountDetailsCount(@RequestBody AccountDetailDto accountDetailDto);
+}

+ 18 - 0
java110-utils/src/main/java/com/java110/utils/constant/BusinessTypeConstant.java

@@ -1590,4 +1590,22 @@ public class BusinessTypeConstant {
     public static final String BUSINESS_TYPE_DELETE_ACCT="121100050001";
 
 
+    /**
+     *  添加账户明细
+     *  3保存
+     */
+    public static final String BUSINESS_TYPE_SAVE_ACCT_DETAIL="121100030002";
+
+    /**
+     *  修改账户明细
+     *  3保存
+     */
+    public static final String BUSINESS_TYPE_UPDATE_ACCT_DETAIL="121100040002";
+
+    /**
+     * 删除账户明细
+     */
+    public static final String BUSINESS_TYPE_DELETE_ACCT_DETAIL="121100050002";
+
+
 }

+ 31 - 0
java110-utils/src/main/java/com/java110/utils/constant/ServiceCodeAccountDetailConstant.java

@@ -0,0 +1,31 @@
+package com.java110.utils.constant;
+
+/**
+ * 账户交易常量类
+ * Created by wuxw on 2017/5/20.
+ */
+public class ServiceCodeAccountDetailConstant {
+
+    /**
+     * 添加 账户交易
+     */
+    public static final String ADD_ACCOUNTDETAIL = "account.saveAccountDetail";
+
+
+    /**
+     * 修改 账户交易
+     */
+    public static final String UPDATE_ACCOUNTDETAIL = "account.updateAccountDetail";
+    /**
+     * 删除 账户交易
+     */
+    public static final String DELETE_ACCOUNTDETAIL = "account.deleteAccountDetail";
+
+
+    /**
+     * 查询 账户交易
+     */
+    public static final String LIST_ACCOUNTDETAILS = "account.listAccountDetails";
+
+
+}

+ 81 - 0
service-acct/src/main/java/com/java110/acct/dao/IAccountDetailServiceDao.java

@@ -0,0 +1,81 @@
+package com.java110.acct.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;
+
+/**
+ * 账户交易组件内部之间使用,没有给外围系统提供服务能力
+ * 账户交易服务接口类,要求全部以字符串传输,方便微服务化
+ * 新建客户,修改客户,删除客户,查询客户等功能
+ *
+ * Created by wuxw on 2016/12/27.
+ */
+public interface IAccountDetailServiceDao {
+
+    /**
+     * 保存 账户交易信息
+     * @param businessAccountDetailInfo 账户交易信息 封装
+     * @throws DAOException 操作数据库异常
+     */
+    void saveBusinessAccountDetailInfo(Map businessAccountDetailInfo) throws DAOException;
+
+
+
+    /**
+     * 查询账户交易信息(business过程)
+     * 根据bId 查询账户交易信息
+     * @param info bId 信息
+     * @return 账户交易信息
+     * @throws DAOException DAO异常
+     */
+    List<Map> getBusinessAccountDetailInfo(Map info) throws DAOException;
+
+
+
+
+    /**
+     * 保存 账户交易信息 Business数据到 Instance中
+     * @param info
+     * @throws DAOException DAO异常
+     */
+    void saveAccountDetailInfoInstance(Map info) throws DAOException;
+
+
+
+
+    /**
+     * 查询账户交易信息(instance过程)
+     * 根据bId 查询账户交易信息
+     * @param info bId 信息
+     * @return 账户交易信息
+     * @throws DAOException DAO异常
+     */
+    List<Map> getAccountDetailInfo(Map info) throws DAOException;
+
+
+
+    /**
+     * 修改账户交易信息
+     * @param info 修改信息
+     * @throws DAOException DAO异常
+     */
+    void updateAccountDetailInfoInstance(Map info) throws DAOException;
+
+
+    /**
+     * 查询账户交易总数
+     *
+     * @param info 账户交易信息
+     * @return 账户交易数量
+     */
+    int queryAccountDetailsCount(Map info);
+
+}

+ 130 - 0
service-acct/src/main/java/com/java110/acct/dao/impl/AccountDetailServiceDaoImpl.java

@@ -0,0 +1,130 @@
+package com.java110.acct.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.acct.dao.IAccountDetailServiceDao;
+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;
+
+/**
+ * 账户交易服务 与数据库交互
+ * Created by wuxw on 2017/4/5.
+ */
+@Service("accountDetailServiceDaoImpl")
+//@Transactional
+public class AccountDetailServiceDaoImpl extends BaseServiceDao implements IAccountDetailServiceDao {
+
+    private static Logger logger = LoggerFactory.getLogger(AccountDetailServiceDaoImpl.class);
+
+    /**
+     * 账户交易信息封装
+     * @param businessAccountDetailInfo 账户交易信息 封装
+     * @throws DAOException DAO异常
+     */
+    @Override
+    public void saveBusinessAccountDetailInfo(Map businessAccountDetailInfo) throws DAOException {
+        businessAccountDetailInfo.put("month", DateUtil.getCurrentMonth());
+        // 查询business_user 数据是否已经存在
+        logger.debug("保存账户交易信息 入参 businessAccountDetailInfo : {}",businessAccountDetailInfo);
+        int saveFlag = sqlSessionTemplate.insert("accountDetailServiceDaoImpl.saveBusinessAccountDetailInfo",businessAccountDetailInfo);
+
+        if(saveFlag < 1){
+            throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR,"保存账户交易数据失败:"+ JSONObject.toJSONString(businessAccountDetailInfo));
+        }
+    }
+
+
+    /**
+     * 查询账户交易信息
+     * @param info bId 信息
+     * @return 账户交易信息
+     * @throws DAOException DAO异常
+     */
+    @Override
+    public List<Map> getBusinessAccountDetailInfo(Map info) throws DAOException {
+
+        logger.debug("查询账户交易信息 入参 info : {}",info);
+
+        List<Map> businessAccountDetailInfos = sqlSessionTemplate.selectList("accountDetailServiceDaoImpl.getBusinessAccountDetailInfo",info);
+
+        return businessAccountDetailInfos;
+    }
+
+
+
+    /**
+     * 保存账户交易信息 到 instance
+     * @param info   bId 信息
+     * @throws DAOException DAO异常
+     */
+    @Override
+    public void saveAccountDetailInfoInstance(Map info) throws DAOException {
+        logger.debug("保存账户交易信息Instance 入参 info : {}",info);
+
+        int saveFlag = sqlSessionTemplate.insert("accountDetailServiceDaoImpl.saveAccountDetailInfoInstance",info);
+
+        if(saveFlag < 1){
+            throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR,"保存账户交易信息Instance数据失败:"+ JSONObject.toJSONString(info));
+        }
+    }
+
+
+    /**
+     * 查询账户交易信息(instance)
+     * @param info bId 信息
+     * @return List<Map>
+     * @throws DAOException DAO异常
+     */
+    @Override
+    public List<Map> getAccountDetailInfo(Map info) throws DAOException {
+        logger.debug("查询账户交易信息 入参 info : {}",info);
+
+        List<Map> businessAccountDetailInfos = sqlSessionTemplate.selectList("accountDetailServiceDaoImpl.getAccountDetailInfo",info);
+
+        return businessAccountDetailInfos;
+    }
+
+
+    /**
+     * 修改账户交易信息
+     * @param info 修改信息
+     * @throws DAOException DAO异常
+     */
+    @Override
+    public void updateAccountDetailInfoInstance(Map info) throws DAOException {
+        logger.debug("修改账户交易信息Instance 入参 info : {}",info);
+
+        int saveFlag = sqlSessionTemplate.update("accountDetailServiceDaoImpl.updateAccountDetailInfoInstance",info);
+
+        if(saveFlag < 1){
+            throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR,"修改账户交易信息Instance数据失败:"+ JSONObject.toJSONString(info));
+        }
+    }
+
+     /**
+     * 查询账户交易数量
+     * @param info 账户交易信息
+     * @return 账户交易数量
+     */
+    @Override
+    public int queryAccountDetailsCount(Map info) {
+        logger.debug("查询账户交易数据 入参 info : {}",info);
+
+        List<Map> businessAccountDetailInfos = sqlSessionTemplate.selectList("accountDetailServiceDaoImpl.queryAccountDetailsCount", info);
+        if (businessAccountDetailInfos.size() < 1) {
+            return 0;
+        }
+
+        return Integer.parseInt(businessAccountDetailInfos.get(0).get("count").toString());
+    }
+
+
+}

+ 96 - 0
service-acct/src/main/java/com/java110/acct/listener/accountDetail/AbstractAccountDetailBusinessServiceDataFlowListener.java

@@ -0,0 +1,96 @@
+package com.java110.acct.listener.accountDetail;
+
+import com.alibaba.fastjson.JSONObject;
+import com.java110.acct.dao.IAccountDetailServiceDao;
+import com.java110.core.event.service.AbstractBusinessServiceDataFlowListener;
+import com.java110.entity.center.Business;
+import com.java110.utils.constant.ResponseConstant;
+import com.java110.utils.constant.StatusConstant;
+import com.java110.utils.exception.ListenerExecuteException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 账户交易 服务侦听 父类
+ * Created by wuxw on 2018/7/4.
+ */
+public abstract class AbstractAccountDetailBusinessServiceDataFlowListener extends AbstractBusinessServiceDataFlowListener {
+    private static Logger logger = LoggerFactory.getLogger(AbstractAccountDetailBusinessServiceDataFlowListener.class);
+
+
+    /**
+     * 获取 DAO工具类
+     *
+     * @return
+     */
+    public abstract IAccountDetailServiceDao getAccountDetailServiceDaoImpl();
+
+    /**
+     * 刷新 businessAccountDetailInfo 数据
+     * 主要将 数据库 中字段和 接口传递字段建立关系
+     *
+     * @param businessAccountDetailInfo
+     */
+    protected void flushBusinessAccountDetailInfo(Map businessAccountDetailInfo, String statusCd) {
+        businessAccountDetailInfo.put("newBId", businessAccountDetailInfo.get("b_id"));
+        businessAccountDetailInfo.put("detailType", businessAccountDetailInfo.get("detail_type"));
+        businessAccountDetailInfo.put("amount", businessAccountDetailInfo.get("amount"));
+        businessAccountDetailInfo.put("operate", businessAccountDetailInfo.get("operate"));
+        businessAccountDetailInfo.put("orderId", businessAccountDetailInfo.get("order_id"));
+        businessAccountDetailInfo.put("objId", businessAccountDetailInfo.get("obj_id"));
+        businessAccountDetailInfo.put("detailId", businessAccountDetailInfo.get("detail_id"));
+        businessAccountDetailInfo.put("acctId", businessAccountDetailInfo.get("acct_id"));
+        businessAccountDetailInfo.put("relAcctId", businessAccountDetailInfo.get("rel_acct_id"));
+        businessAccountDetailInfo.put("remark", businessAccountDetailInfo.get("remark"));
+        businessAccountDetailInfo.put("objType", businessAccountDetailInfo.get("obj_type"));
+        businessAccountDetailInfo.remove("bId");
+        businessAccountDetailInfo.put("statusCd", statusCd);
+    }
+
+
+    /**
+     * 当修改数据时,查询instance表中的数据 自动保存删除数据到business中
+     *
+     * @param businessAccountDetail 账户交易信息
+     */
+    protected void autoSaveDelBusinessAccountDetail(Business business, JSONObject businessAccountDetail) {
+//自动插入DEL
+        Map info = new HashMap();
+        info.put("detailId", businessAccountDetail.getString("detailId"));
+        info.put("statusCd", StatusConstant.STATUS_CD_VALID);
+        List<Map> currentAccountDetailInfos = getAccountDetailServiceDaoImpl().getAccountDetailInfo(info);
+        if (currentAccountDetailInfos == null || currentAccountDetailInfos.size() != 1) {
+            throw new ListenerExecuteException(ResponseConstant.RESULT_PARAM_ERROR, "未找到需要修改数据信息,入参错误或数据有问题,请检查" + info);
+        }
+
+        Map currentAccountDetailInfo = currentAccountDetailInfos.get(0);
+
+        currentAccountDetailInfo.put("bId", business.getbId());
+
+        currentAccountDetailInfo.put("detailType", currentAccountDetailInfo.get("detail_type"));
+        currentAccountDetailInfo.put("amount", currentAccountDetailInfo.get("amount"));
+        currentAccountDetailInfo.put("operate", currentAccountDetailInfo.get("operate"));
+        currentAccountDetailInfo.put("orderId", currentAccountDetailInfo.get("order_id"));
+        currentAccountDetailInfo.put("objId", currentAccountDetailInfo.get("obj_id"));
+        currentAccountDetailInfo.put("detailId", currentAccountDetailInfo.get("detail_id"));
+        currentAccountDetailInfo.put("acctId", currentAccountDetailInfo.get("acct_id"));
+        currentAccountDetailInfo.put("relAcctId", currentAccountDetailInfo.get("rel_acct_id"));
+        currentAccountDetailInfo.put("remark", currentAccountDetailInfo.get("remark"));
+        currentAccountDetailInfo.put("objType", currentAccountDetailInfo.get("obj_type"));
+
+
+        currentAccountDetailInfo.put("operate", StatusConstant.OPERATE_DEL);
+        getAccountDetailServiceDaoImpl().saveBusinessAccountDetailInfo(currentAccountDetailInfo);
+        for (Object key : currentAccountDetailInfo.keySet()) {
+            if (businessAccountDetail.get(key) == null) {
+                businessAccountDetail.put(key.toString(), currentAccountDetailInfo.get(key));
+            }
+        }
+    }
+
+
+}

+ 176 - 0
service-acct/src/main/java/com/java110/acct/listener/accountDetail/DeleteAccountDetailInfoListener.java

@@ -0,0 +1,176 @@
+package com.java110.acct.listener.accountDetail;
+
+import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
+import com.java110.po.accountDetail.AccountDetailPo;
+import com.java110.utils.constant.BusinessTypeConstant;
+import com.java110.utils.constant.ResponseConstant;
+import com.java110.utils.constant.StatusConstant;
+import com.java110.utils.exception.ListenerExecuteException;
+import com.java110.utils.util.Assert;
+import com.java110.core.annotation.Java110Listener;
+import com.java110.core.context.DataFlowContext;
+import com.java110.entity.center.Business;
+import com.java110.acct.dao.IAccountDetailServiceDao;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 删除账户交易信息 侦听
+ *
+ * 处理节点
+ * 1、businessAccountDetail:{} 账户交易基本信息节点
+ * 2、businessAccountDetailAttr:[{}] 账户交易属性信息节点
+ * 3、businessAccountDetailPhoto:[{}] 账户交易照片信息节点
+ * 4、businessAccountDetailCerdentials:[{}] 账户交易证件信息节点
+ * 协议地址 :https://github.com/java110/MicroCommunity/wiki/%E5%88%A0%E9%99%A4%E5%95%86%E6%88%B7%E4%BF%A1%E6%81%AF-%E5%8D%8F%E8%AE%AE
+ * Created by wuxw on 2018/5/18.
+ */
+@Java110Listener("deleteAccountDetailInfoListener")
+@Transactional
+public class DeleteAccountDetailInfoListener extends AbstractAccountDetailBusinessServiceDataFlowListener {
+
+    private final static Logger logger = LoggerFactory.getLogger(DeleteAccountDetailInfoListener.class);
+    @Autowired
+    IAccountDetailServiceDao accountDetailServiceDaoImpl;
+
+    @Override
+    public int getOrder() {
+        return 3;
+    }
+
+    @Override
+    public String getBusinessTypeCd() {
+        return BusinessTypeConstant.BUSINESS_TYPE_DELETE_ACCT_DETAIL;
+    }
+
+    /**
+     * 根据删除信息 查出Instance表中数据 保存至business表 (状态写DEL) 方便撤单时直接更新回去
+     * @param dataFlowContext 数据对象
+     * @param business 当前业务对象
+     */
+    @Override
+    protected void doSaveBusiness(DataFlowContext dataFlowContext, Business business) {
+        JSONObject data = business.getDatas();
+
+        Assert.notEmpty(data,"没有datas 节点,或没有子节点需要处理");
+
+            //处理 businessAccountDetail 节点
+            if(data.containsKey(AccountDetailPo.class.getSimpleName())){
+                Object _obj = data.get(AccountDetailPo.class.getSimpleName());
+                JSONArray businessAccountDetails = null;
+                if(_obj instanceof JSONObject){
+                    businessAccountDetails = new JSONArray();
+                    businessAccountDetails.add(_obj);
+                }else {
+                    businessAccountDetails = (JSONArray)_obj;
+                }
+                //JSONObject businessAccountDetail = data.getJSONObject(AccountDetailPo.class.getSimpleName());
+                for (int _accountDetailIndex = 0; _accountDetailIndex < businessAccountDetails.size();_accountDetailIndex++) {
+                    JSONObject businessAccountDetail = businessAccountDetails.getJSONObject(_accountDetailIndex);
+                    doBusinessAccountDetail(business, businessAccountDetail);
+                    if(_obj instanceof JSONObject) {
+                        dataFlowContext.addParamOut("detailId", businessAccountDetail.getString("detailId"));
+                    }
+                }
+
+        }
+
+
+    }
+
+    /**
+     * 删除 instance数据
+     * @param dataFlowContext 数据对象
+     * @param business 当前业务对象
+     */
+    @Override
+    protected void doBusinessToInstance(DataFlowContext dataFlowContext, Business business) {
+        String bId = business.getbId();
+        //Assert.hasLength(bId,"请求报文中没有包含 bId");
+
+        //账户交易信息
+        Map info = new HashMap();
+        info.put("bId",business.getbId());
+        info.put("operate",StatusConstant.OPERATE_DEL);
+
+        //账户交易信息
+        List<Map> businessAccountDetailInfos = accountDetailServiceDaoImpl.getBusinessAccountDetailInfo(info);
+        if( businessAccountDetailInfos != null && businessAccountDetailInfos.size() >0) {
+            for (int _accountDetailIndex = 0; _accountDetailIndex < businessAccountDetailInfos.size();_accountDetailIndex++) {
+                Map businessAccountDetailInfo = businessAccountDetailInfos.get(_accountDetailIndex);
+                flushBusinessAccountDetailInfo(businessAccountDetailInfo,StatusConstant.STATUS_CD_INVALID);
+                accountDetailServiceDaoImpl.updateAccountDetailInfoInstance(businessAccountDetailInfo);
+                dataFlowContext.addParamOut("detailId",businessAccountDetailInfo.get("detail_id"));
+            }
+        }
+
+    }
+
+    /**
+     * 撤单
+     * 从business表中查询到DEL的数据 将instance中的数据更新回来
+     * @param dataFlowContext 数据对象
+     * @param business 当前业务对象
+     */
+    @Override
+    protected void doRecover(DataFlowContext dataFlowContext, Business business) {
+        String bId = business.getbId();
+        //Assert.hasLength(bId,"请求报文中没有包含 bId");
+        Map info = new HashMap();
+        info.put("bId",bId);
+        info.put("statusCd",StatusConstant.STATUS_CD_INVALID);
+
+        Map delInfo = new HashMap();
+        delInfo.put("bId",business.getbId());
+        delInfo.put("operate",StatusConstant.OPERATE_DEL);
+        //账户交易信息
+        List<Map> accountDetailInfo = accountDetailServiceDaoImpl.getAccountDetailInfo(info);
+        if(accountDetailInfo != null && accountDetailInfo.size() > 0){
+
+            //账户交易信息
+            List<Map> businessAccountDetailInfos = accountDetailServiceDaoImpl.getBusinessAccountDetailInfo(delInfo);
+            //除非程序出错了,这里不会为空
+            if(businessAccountDetailInfos == null ||  businessAccountDetailInfos.size() == 0){
+                throw new ListenerExecuteException(ResponseConstant.RESULT_CODE_INNER_ERROR,"撤单失败(accountDetail),程序内部异常,请检查! "+delInfo);
+            }
+            for (int _accountDetailIndex = 0; _accountDetailIndex < businessAccountDetailInfos.size();_accountDetailIndex++) {
+                Map businessAccountDetailInfo = businessAccountDetailInfos.get(_accountDetailIndex);
+                flushBusinessAccountDetailInfo(businessAccountDetailInfo,StatusConstant.STATUS_CD_VALID);
+                accountDetailServiceDaoImpl.updateAccountDetailInfoInstance(businessAccountDetailInfo);
+            }
+        }
+    }
+
+
+
+    /**
+     * 处理 businessAccountDetail 节点
+     * @param business 总的数据节点
+     * @param businessAccountDetail 账户交易节点
+     */
+    private void doBusinessAccountDetail(Business business,JSONObject businessAccountDetail){
+
+        Assert.jsonObjectHaveKey(businessAccountDetail,"detailId","businessAccountDetail 节点下没有包含 detailId 节点");
+
+        if(businessAccountDetail.getString("detailId").startsWith("-")){
+            throw new ListenerExecuteException(ResponseConstant.RESULT_PARAM_ERROR,"detailId 错误,不能自动生成(必须已经存在的detailId)"+businessAccountDetail);
+        }
+        //自动插入DEL
+        autoSaveDelBusinessAccountDetail(business,businessAccountDetail);
+    }
+    @Override
+    public IAccountDetailServiceDao getAccountDetailServiceDaoImpl() {
+        return accountDetailServiceDaoImpl;
+    }
+
+    public void setAccountDetailServiceDaoImpl(IAccountDetailServiceDao accountDetailServiceDaoImpl) {
+        this.accountDetailServiceDaoImpl = accountDetailServiceDaoImpl;
+    }
+}

+ 176 - 0
service-acct/src/main/java/com/java110/acct/listener/accountDetail/SaveAccountDetailInfoListener.java

@@ -0,0 +1,176 @@
+package com.java110.acct.listener.accountDetail;
+
+import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
+import com.java110.po.accountDetail.AccountDetailPo;
+import com.java110.utils.constant.BusinessTypeConstant;
+import com.java110.utils.constant.StatusConstant;
+import com.java110.utils.util.Assert;
+import com.java110.acct.dao.IAccountDetailServiceDao;
+import com.java110.core.annotation.Java110Listener;
+import com.java110.core.context.DataFlowContext;
+import com.java110.core.factory.GenerateCodeFactory;
+import com.java110.entity.center.Business;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 保存 账户交易信息 侦听
+ * Created by wuxw on 2018/5/18.
+ */
+@Java110Listener("saveAccountDetailInfoListener")
+@Transactional
+public class SaveAccountDetailInfoListener extends AbstractAccountDetailBusinessServiceDataFlowListener{
+
+    private static Logger logger = LoggerFactory.getLogger(SaveAccountDetailInfoListener.class);
+
+    @Autowired
+    private IAccountDetailServiceDao accountDetailServiceDaoImpl;
+
+    @Override
+    public int getOrder() {
+        return 0;
+    }
+
+    @Override
+    public String getBusinessTypeCd() {
+        return BusinessTypeConstant.BUSINESS_TYPE_SAVE_ACCT_DETAIL;
+    }
+
+    /**
+     * 保存账户交易信息 business 表中
+     * @param dataFlowContext 数据对象
+     * @param business 当前业务对象
+     */
+    @Override
+    protected void doSaveBusiness(DataFlowContext dataFlowContext, Business business) {
+        JSONObject data = business.getDatas();
+        Assert.notEmpty(data,"没有datas 节点,或没有子节点需要处理");
+
+        //处理 businessAccountDetail 节点
+        if(data.containsKey(AccountDetailPo.class.getSimpleName())){
+            Object bObj = data.get(AccountDetailPo.class.getSimpleName());
+            JSONArray businessAccountDetails = null;
+            if(bObj instanceof JSONObject){
+                businessAccountDetails = new JSONArray();
+                businessAccountDetails.add(bObj);
+            }else {
+                businessAccountDetails = (JSONArray)bObj;
+            }
+            //JSONObject businessAccountDetail = data.getJSONObject(AccountDetailPo.class.getSimpleName());
+            for (int bAccountDetailIndex = 0; bAccountDetailIndex < businessAccountDetails.size();bAccountDetailIndex++) {
+                JSONObject businessAccountDetail = businessAccountDetails.getJSONObject(bAccountDetailIndex);
+                doBusinessAccountDetail(business, businessAccountDetail);
+                if(bObj instanceof JSONObject) {
+                    dataFlowContext.addParamOut("detailId", businessAccountDetail.getString("detailId"));
+                }
+            }
+        }
+    }
+
+    /**
+     * business 数据转移到 instance
+     * @param dataFlowContext 数据对象
+     * @param business 当前业务对象
+     */
+    @Override
+    protected void doBusinessToInstance(DataFlowContext dataFlowContext, Business business) {
+        JSONObject data = business.getDatas();
+
+        Map info = new HashMap();
+        info.put("bId",business.getbId());
+        info.put("operate",StatusConstant.OPERATE_ADD);
+
+        //账户交易信息
+        List<Map> businessAccountDetailInfo = accountDetailServiceDaoImpl.getBusinessAccountDetailInfo(info);
+        if( businessAccountDetailInfo != null && businessAccountDetailInfo.size() >0) {
+            reFreshShareColumn(info, businessAccountDetailInfo.get(0));
+            accountDetailServiceDaoImpl.saveAccountDetailInfoInstance(info);
+            if(businessAccountDetailInfo.size() == 1) {
+                dataFlowContext.addParamOut("detailId", businessAccountDetailInfo.get(0).get("detail_id"));
+            }
+        }
+    }
+
+
+    /**
+     * 刷 分片字段
+     *
+     * @param info         查询对象
+     * @param businessInfo 小区ID
+     */
+    private void reFreshShareColumn(Map info, Map businessInfo) {
+
+        if (info.containsKey("objId")) {
+            return;
+        }
+
+        if (!businessInfo.containsKey("obj_id")) {
+            return;
+        }
+
+        info.put("objId", businessInfo.get("obj_id"));
+    }
+    /**
+     * 撤单
+     * @param dataFlowContext 数据对象
+     * @param business 当前业务对象
+     */
+    @Override
+    protected void doRecover(DataFlowContext dataFlowContext, Business business) {
+        String bId = business.getbId();
+        //Assert.hasLength(bId,"请求报文中没有包含 bId");
+        Map info = new HashMap();
+        info.put("bId",bId);
+        info.put("statusCd",StatusConstant.STATUS_CD_VALID);
+        Map paramIn = new HashMap();
+        paramIn.put("bId",bId);
+        paramIn.put("statusCd",StatusConstant.STATUS_CD_INVALID);
+        //账户交易信息
+        List<Map> accountDetailInfo = accountDetailServiceDaoImpl.getAccountDetailInfo(info);
+        if(accountDetailInfo != null && accountDetailInfo.size() > 0){
+            reFreshShareColumn(paramIn, accountDetailInfo.get(0));
+            accountDetailServiceDaoImpl.updateAccountDetailInfoInstance(paramIn);
+        }
+    }
+
+
+
+    /**
+     * 处理 businessAccountDetail 节点
+     * @param business 总的数据节点
+     * @param businessAccountDetail 账户交易节点
+     */
+    private void doBusinessAccountDetail(Business business,JSONObject businessAccountDetail){
+
+        Assert.jsonObjectHaveKey(businessAccountDetail,"detailId","businessAccountDetail 节点下没有包含 detailId 节点");
+
+        if(businessAccountDetail.getString("detailId").startsWith("-")){
+            //刷新缓存
+            //flushAccountDetailId(business.getDatas());
+
+            businessAccountDetail.put("detailId",GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_detailId));
+
+        }
+
+        businessAccountDetail.put("bId",business.getbId());
+        businessAccountDetail.put("operate", StatusConstant.OPERATE_ADD);
+        //保存账户交易信息
+        accountDetailServiceDaoImpl.saveBusinessAccountDetailInfo(businessAccountDetail);
+
+    }
+    @Override
+    public IAccountDetailServiceDao getAccountDetailServiceDaoImpl() {
+        return accountDetailServiceDaoImpl;
+    }
+
+    public void setAccountDetailServiceDaoImpl(IAccountDetailServiceDao accountDetailServiceDaoImpl) {
+        this.accountDetailServiceDaoImpl = accountDetailServiceDaoImpl;
+    }
+}

+ 190 - 0
service-acct/src/main/java/com/java110/acct/listener/accountDetail/UpdateAccountDetailInfoListener.java

@@ -0,0 +1,190 @@
+package com.java110.acct.listener.accountDetail;
+
+import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
+import com.java110.acct.dao.IAccountDetailServiceDao;
+import com.java110.core.annotation.Java110Listener;
+import com.java110.core.context.DataFlowContext;
+import com.java110.entity.center.Business;
+import com.java110.po.accountDetail.AccountDetailPo;
+import com.java110.utils.constant.BusinessTypeConstant;
+import com.java110.utils.constant.ResponseConstant;
+import com.java110.utils.constant.StatusConstant;
+import com.java110.utils.exception.ListenerExecuteException;
+import com.java110.utils.util.Assert;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 修改账户交易信息 侦听
+ * <p>
+ * 处理节点
+ * 1、businessAccountDetail:{} 账户交易基本信息节点
+ * 2、businessAccountDetailAttr:[{}] 账户交易属性信息节点
+ * 3、businessAccountDetailPhoto:[{}] 账户交易照片信息节点
+ * 4、businessAccountDetailCerdentials:[{}] 账户交易证件信息节点
+ * 协议地址 :https://github.com/java110/MicroCommunity/wiki/%E4%BF%AE%E6%94%B9%E5%95%86%E6%88%B7%E4%BF%A1%E6%81%AF-%E5%8D%8F%E8%AE%AE
+ * Created by wuxw on 2018/5/18.
+ */
+@Java110Listener("updateAccountDetailInfoListener")
+@Transactional
+public class UpdateAccountDetailInfoListener extends AbstractAccountDetailBusinessServiceDataFlowListener {
+
+    private static Logger logger = LoggerFactory.getLogger(UpdateAccountDetailInfoListener.class);
+    @Autowired
+    private IAccountDetailServiceDao accountDetailServiceDaoImpl;
+
+    @Override
+    public int getOrder() {
+        return 2;
+    }
+
+    @Override
+    public String getBusinessTypeCd() {
+        return BusinessTypeConstant.BUSINESS_TYPE_UPDATE_ACCT_DETAIL;
+    }
+
+    /**
+     * business过程
+     *
+     * @param dataFlowContext 上下文对象
+     * @param business        业务对象
+     */
+    @Override
+    protected void doSaveBusiness(DataFlowContext dataFlowContext, Business business) {
+
+        JSONObject data = business.getDatas();
+
+        Assert.notEmpty(data, "没有datas 节点,或没有子节点需要处理");
+
+
+        //处理 businessAccountDetail 节点
+        if (data.containsKey(AccountDetailPo.class.getSimpleName())) {
+            Object _obj = data.get(AccountDetailPo.class.getSimpleName());
+            JSONArray businessAccountDetails = null;
+            if (_obj instanceof JSONObject) {
+                businessAccountDetails = new JSONArray();
+                businessAccountDetails.add(_obj);
+            } else {
+                businessAccountDetails = (JSONArray) _obj;
+            }
+            //JSONObject businessAccountDetail = data.getJSONObject(AccountDetailPo.class.getSimpleName());
+            for (int _accountDetailIndex = 0; _accountDetailIndex < businessAccountDetails.size(); _accountDetailIndex++) {
+                JSONObject businessAccountDetail = businessAccountDetails.getJSONObject(_accountDetailIndex);
+                doBusinessAccountDetail(business, businessAccountDetail);
+                if (_obj instanceof JSONObject) {
+                    dataFlowContext.addParamOut("detailId", businessAccountDetail.getString("detailId"));
+                }
+            }
+        }
+    }
+
+
+    /**
+     * business to instance 过程
+     *
+     * @param dataFlowContext 数据对象
+     * @param business        当前业务对象
+     */
+    @Override
+    protected void doBusinessToInstance(DataFlowContext dataFlowContext, Business business) {
+
+        JSONObject data = business.getDatas();
+
+        Map info = new HashMap();
+        info.put("bId", business.getbId());
+        info.put("operate", StatusConstant.OPERATE_ADD);
+
+        //账户交易信息
+        List<Map> businessAccountDetailInfos = accountDetailServiceDaoImpl.getBusinessAccountDetailInfo(info);
+        if (businessAccountDetailInfos != null && businessAccountDetailInfos.size() > 0) {
+            for (int _accountDetailIndex = 0; _accountDetailIndex < businessAccountDetailInfos.size(); _accountDetailIndex++) {
+                Map businessAccountDetailInfo = businessAccountDetailInfos.get(_accountDetailIndex);
+                flushBusinessAccountDetailInfo(businessAccountDetailInfo, StatusConstant.STATUS_CD_VALID);
+                accountDetailServiceDaoImpl.updateAccountDetailInfoInstance(businessAccountDetailInfo);
+                if (businessAccountDetailInfo.size() == 1) {
+                    dataFlowContext.addParamOut("detailId", businessAccountDetailInfo.get("detail_id"));
+                }
+            }
+        }
+
+    }
+
+    /**
+     * 撤单
+     *
+     * @param dataFlowContext 数据对象
+     * @param business        当前业务对象
+     */
+    @Override
+    protected void doRecover(DataFlowContext dataFlowContext, Business business) {
+
+        String bId = business.getbId();
+        //Assert.hasLength(bId,"请求报文中没有包含 bId");
+        Map info = new HashMap();
+        info.put("bId", bId);
+        info.put("statusCd", StatusConstant.STATUS_CD_VALID);
+        Map delInfo = new HashMap();
+        delInfo.put("bId", business.getbId());
+        delInfo.put("operate", StatusConstant.OPERATE_DEL);
+        //账户交易信息
+        List<Map> accountDetailInfo = accountDetailServiceDaoImpl.getAccountDetailInfo(info);
+        if (accountDetailInfo != null && accountDetailInfo.size() > 0) {
+
+            //账户交易信息
+            List<Map> businessAccountDetailInfos = accountDetailServiceDaoImpl.getBusinessAccountDetailInfo(delInfo);
+            //除非程序出错了,这里不会为空
+            if (businessAccountDetailInfos == null || businessAccountDetailInfos.size() == 0) {
+                throw new ListenerExecuteException(ResponseConstant.RESULT_CODE_INNER_ERROR, "撤单失败(accountDetail),程序内部异常,请检查! " + delInfo);
+            }
+            for (int _accountDetailIndex = 0; _accountDetailIndex < businessAccountDetailInfos.size(); _accountDetailIndex++) {
+                Map businessAccountDetailInfo = businessAccountDetailInfos.get(_accountDetailIndex);
+                flushBusinessAccountDetailInfo(businessAccountDetailInfo, StatusConstant.STATUS_CD_VALID);
+                accountDetailServiceDaoImpl.updateAccountDetailInfoInstance(businessAccountDetailInfo);
+            }
+        }
+
+    }
+
+
+    /**
+     * 处理 businessAccountDetail 节点
+     *
+     * @param business              总的数据节点
+     * @param businessAccountDetail 账户交易节点
+     */
+    private void doBusinessAccountDetail(Business business, JSONObject businessAccountDetail) {
+
+        Assert.jsonObjectHaveKey(businessAccountDetail, "detailId", "businessAccountDetail 节点下没有包含 detailId 节点");
+
+        if (businessAccountDetail.getString("detailId").startsWith("-")) {
+            throw new ListenerExecuteException(ResponseConstant.RESULT_PARAM_ERROR, "detailId 错误,不能自动生成(必须已经存在的detailId)" + businessAccountDetail);
+        }
+        //自动保存DEL
+        autoSaveDelBusinessAccountDetail(business, businessAccountDetail);
+
+        businessAccountDetail.put("bId", business.getbId());
+        businessAccountDetail.put("operate", StatusConstant.OPERATE_ADD);
+        //保存账户交易信息
+        accountDetailServiceDaoImpl.saveBusinessAccountDetailInfo(businessAccountDetail);
+
+    }
+
+
+    @Override
+    public IAccountDetailServiceDao getAccountDetailServiceDaoImpl() {
+        return accountDetailServiceDaoImpl;
+    }
+
+    public void setAccountDetailServiceDaoImpl(IAccountDetailServiceDao accountDetailServiceDaoImpl) {
+        this.accountDetailServiceDaoImpl = accountDetailServiceDaoImpl;
+    }
+
+
+}

+ 91 - 0
service-acct/src/main/java/com/java110/acct/smo/impl/AccountDetailInnerServiceSMOImpl.java

@@ -0,0 +1,91 @@
+package com.java110.acct.smo.impl;
+
+
+import com.java110.acct.dao.IAccountDetailServiceDao;
+import com.java110.core.base.smo.BaseServiceSMO;
+import com.java110.dto.PageDto;
+import com.java110.dto.accountDetail.AccountDetailDto;
+import com.java110.dto.user.UserDto;
+import com.java110.intf.acct.IAccountDetailInnerServiceSMO;
+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.ArrayList;
+import java.util.List;
+
+/**
+ * @ClassName FloorInnerServiceSMOImpl
+ * @Description 账户交易内部服务实现类
+ * @Author wuxw
+ * @Date 2019/4/24 9:20
+ * @Version 1.0
+ * add by wuxw 2019/4/24
+ **/
+@RestController
+public class AccountDetailInnerServiceSMOImpl extends BaseServiceSMO implements IAccountDetailInnerServiceSMO {
+
+    @Autowired
+    private IAccountDetailServiceDao accountDetailServiceDaoImpl;
+
+    @Override
+    public List<AccountDetailDto> queryAccountDetails(@RequestBody AccountDetailDto accountDetailDto) {
+
+        //校验是否传了 分页信息
+
+        int page = accountDetailDto.getPage();
+
+        if (page != PageDto.DEFAULT_PAGE) {
+            accountDetailDto.setPage((page - 1) * accountDetailDto.getRow());
+        }
+
+        List<AccountDetailDto> accountDetails = BeanConvertUtil.covertBeanList(accountDetailServiceDaoImpl.getAccountDetailInfo(BeanConvertUtil.beanCovertMap(accountDetailDto)), AccountDetailDto.class);
+
+
+        return accountDetails;
+    }
+
+    /**
+     * 从用户列表中查询用户,将用户中的信息 刷新到 floor对象中
+     *
+     * @param accountDetail 小区账户交易信息
+     * @param users         用户列表
+     */
+    private void refreshAccountDetail(AccountDetailDto accountDetail, List<UserDto> users) {
+        for (UserDto user : users) {
+            if (accountDetail.getDetailId().equals(user.getUserId())) {
+                BeanConvertUtil.covertBean(user, accountDetail);
+            }
+        }
+    }
+
+    /**
+     * 获取批量userId
+     *
+     * @param accountDetails 小区楼信息
+     * @return 批量userIds 信息
+     */
+    private String[] getUserIds(List<AccountDetailDto> accountDetails) {
+        List<String> userIds = new ArrayList<String>();
+        for (AccountDetailDto accountDetail : accountDetails) {
+            userIds.add(accountDetail.getDetailId());
+        }
+
+        return userIds.toArray(new String[userIds.size()]);
+    }
+
+    @Override
+    public int queryAccountDetailsCount(@RequestBody AccountDetailDto accountDetailDto) {
+        return accountDetailServiceDaoImpl.queryAccountDetailsCount(BeanConvertUtil.beanCovertMap(accountDetailDto));
+    }
+
+    public IAccountDetailServiceDao getAccountDetailServiceDaoImpl() {
+        return accountDetailServiceDaoImpl;
+    }
+
+    public void setAccountDetailServiceDaoImpl(IAccountDetailServiceDao accountDetailServiceDaoImpl) {
+        this.accountDetailServiceDaoImpl = accountDetailServiceDaoImpl;
+    }
+
+}

+ 38 - 0
service-api/src/main/java/com/java110/api/bmo/account/IAccountDetailBMO.java

@@ -0,0 +1,38 @@
+package com.java110.api.bmo.account;
+
+import com.alibaba.fastjson.JSONObject;
+import com.java110.api.bmo.IApiBaseBMO;
+import com.java110.core.context.DataFlowContext;
+
+public interface IAccountDetailBMO extends IApiBaseBMO {
+
+
+    /**
+     * 添加账户交易
+     * @param paramInJson
+     * @param dataFlowContext
+     * @return
+     */
+     void addAccountDetail(JSONObject paramInJson, DataFlowContext dataFlowContext);
+
+    /**
+     * 添加账户交易信息
+     *
+     * @param paramInJson     接口调用放传入入参
+     * @param dataFlowContext 数据上下文
+     * @return 订单服务能够接受的报文
+     */
+     void updateAccountDetail(JSONObject paramInJson, DataFlowContext dataFlowContext);
+
+    /**
+     * 删除账户交易
+     *
+     * @param paramInJson     接口调用放传入入参
+     * @param dataFlowContext 数据上下文
+     * @return 订单服务能够接受的报文
+     */
+     void deleteAccountDetail(JSONObject paramInJson, DataFlowContext dataFlowContext);
+
+
+
+}

+ 61 - 0
service-api/src/main/java/com/java110/api/bmo/account/impl/AccountDetailBMOImpl.java

@@ -0,0 +1,61 @@
+package com.java110.api.bmo.account.impl;
+
+import com.alibaba.fastjson.JSONObject;
+import com.java110.api.bmo.ApiBaseBMO;
+import com.java110.api.bmo.account.IAccountDetailBMO;
+import com.java110.core.context.DataFlowContext;
+import com.java110.intf.acct.IAccountDetailInnerServiceSMO;
+import com.java110.po.accountDetail.AccountDetailPo;
+import com.java110.utils.constant.BusinessTypeConstant;
+import com.java110.utils.util.BeanConvertUtil;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+@Service("accountDetailBMOImpl")
+public class AccountDetailBMOImpl extends ApiBaseBMO implements IAccountDetailBMO {
+
+    @Autowired
+    private IAccountDetailInnerServiceSMO accountDetailInnerServiceSMOImpl;
+
+    /**
+     * 添加小区信息
+     *
+     * @param paramInJson     接口调用放传入入参
+     * @param dataFlowContext 数据上下文
+     * @return 订单服务能够接受的报文
+     */
+    public void addAccountDetail(JSONObject paramInJson, DataFlowContext dataFlowContext) {
+
+        paramInJson.put("detailId", "-1");
+        AccountDetailPo accountDetailPo = BeanConvertUtil.covertBean(paramInJson, AccountDetailPo.class);
+        super.insert(dataFlowContext, accountDetailPo, BusinessTypeConstant.BUSINESS_TYPE_SAVE_ACCT_DETAIL);
+    }
+
+
+    /**
+     * 添加活动信息
+     *
+     * @param paramInJson     接口调用放传入入参
+     * @param dataFlowContext 数据上下文
+     * @return 订单服务能够接受的报文
+     */
+    public void updateAccountDetail(JSONObject paramInJson, DataFlowContext dataFlowContext) {
+        AccountDetailPo accountDetailPo = BeanConvertUtil.covertBean(paramInJson, AccountDetailPo.class);
+        super.update(dataFlowContext, accountDetailPo, BusinessTypeConstant.BUSINESS_TYPE_UPDATE_ACCT_DETAIL);
+    }
+
+
+    /**
+     * 添加小区信息
+     *
+     * @param paramInJson     接口调用放传入入参
+     * @param dataFlowContext 数据上下文
+     * @return 订单服务能够接受的报文
+     */
+    public void deleteAccountDetail(JSONObject paramInJson, DataFlowContext dataFlowContext) {
+
+        AccountDetailPo accountDetailPo = BeanConvertUtil.covertBean(paramInJson, AccountDetailPo.class);
+        super.update(dataFlowContext, accountDetailPo, BusinessTypeConstant.BUSINESS_TYPE_DELETE_ACCT_DETAIL);
+    }
+
+}

+ 49 - 0
service-api/src/main/java/com/java110/api/listener/account/DeleteAccountDetailListener.java

@@ -0,0 +1,49 @@
+package com.java110.api.listener.account;
+
+import com.alibaba.fastjson.JSONObject;
+import com.java110.api.bmo.account.IAccountDetailBMO;
+import com.java110.api.listener.AbstractServiceApiPlusListener;
+import com.java110.core.annotation.Java110Listener;
+import com.java110.core.context.DataFlowContext;
+import com.java110.core.event.service.api.ServiceDataFlowEvent;
+import com.java110.utils.constant.ServiceCodeAccountDetailConstant;
+import com.java110.utils.util.Assert;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.HttpMethod;
+
+
+/**
+ * 保存小区侦听
+ * add by wuxw 2019-06-30
+ */
+@Java110Listener("deleteAccountDetailListener")
+public class DeleteAccountDetailListener extends AbstractServiceApiPlusListener {
+
+    @Autowired
+    private IAccountDetailBMO accountDetailBMOImpl;
+
+    @Override
+    protected void validate(ServiceDataFlowEvent event, JSONObject reqJson) {
+        //Assert.hasKeyAndValue(reqJson, "xxx", "xxx");
+
+        Assert.hasKeyAndValue(reqJson, "detailId", "detailId不能为空");
+
+    }
+
+    @Override
+    protected void doSoService(ServiceDataFlowEvent event, DataFlowContext context, JSONObject reqJson) {
+
+        accountDetailBMOImpl.deleteAccountDetail(reqJson, context);
+    }
+
+    @Override
+    public String getServiceCode() {
+        return ServiceCodeAccountDetailConstant.DELETE_ACCOUNTDETAIL;
+    }
+
+    @Override
+    public HttpMethod getHttpMethod() {
+        return HttpMethod.POST;
+    }
+
+}

+ 82 - 0
service-api/src/main/java/com/java110/api/listener/account/ListAccountDetailsListener.java

@@ -0,0 +1,82 @@
+package com.java110.api.listener.account;
+
+import com.alibaba.fastjson.JSONObject;
+import com.java110.api.listener.AbstractServiceApiListener;
+import com.java110.core.annotation.Java110Listener;
+import com.java110.core.context.DataFlowContext;
+import com.java110.core.event.service.api.ServiceDataFlowEvent;
+import com.java110.dto.accountDetail.AccountDetailDto;
+import com.java110.intf.acct.IAccountDetailInnerServiceSMO;
+import com.java110.utils.constant.ServiceCodeAccountDetailConstant;
+import com.java110.utils.util.BeanConvertUtil;
+import com.java110.vo.ResultVo;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.HttpMethod;
+import org.springframework.http.HttpStatus;
+import org.springframework.http.ResponseEntity;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * 查询小区侦听类
+ */
+@Java110Listener("listAccountDetailsListener")
+public class ListAccountDetailsListener extends AbstractServiceApiListener {
+
+    @Autowired
+    private IAccountDetailInnerServiceSMO accountDetailInnerServiceSMOImpl;
+
+    @Override
+    public String getServiceCode() {
+        return ServiceCodeAccountDetailConstant.LIST_ACCOUNTDETAILS;
+    }
+
+    @Override
+    public HttpMethod getHttpMethod() {
+        return HttpMethod.GET;
+    }
+
+
+    @Override
+    public int getOrder() {
+        return DEFAULT_ORDER;
+    }
+
+
+    public IAccountDetailInnerServiceSMO getAccountDetailInnerServiceSMOImpl() {
+        return accountDetailInnerServiceSMOImpl;
+    }
+
+    public void setAccountDetailInnerServiceSMOImpl(IAccountDetailInnerServiceSMO accountDetailInnerServiceSMOImpl) {
+        this.accountDetailInnerServiceSMOImpl = accountDetailInnerServiceSMOImpl;
+    }
+
+    @Override
+    protected void validate(ServiceDataFlowEvent event, JSONObject reqJson) {
+        super.validatePageInfo(reqJson);
+    }
+
+    @Override
+    protected void doSoService(ServiceDataFlowEvent event, DataFlowContext context, JSONObject reqJson) {
+
+        AccountDetailDto accountDetailDto = BeanConvertUtil.covertBean(reqJson, AccountDetailDto.class);
+
+        int count = accountDetailInnerServiceSMOImpl.queryAccountDetailsCount(accountDetailDto);
+
+        List<AccountDetailDto> accountDetailDtos = null;
+
+        if (count > 0) {
+            accountDetailDtos = accountDetailInnerServiceSMOImpl.queryAccountDetails(accountDetailDto);
+        } else {
+            accountDetailDtos = new ArrayList<>();
+        }
+
+        ResultVo resultVo = new ResultVo((int) Math.ceil((double) count / (double) reqJson.getInteger("row")), count, accountDetailDtos);
+
+        ResponseEntity<String> responseEntity = new ResponseEntity<String>(resultVo.toString(), HttpStatus.OK);
+
+        context.setResponseEntity(responseEntity);
+
+    }
+}

+ 50 - 0
service-api/src/main/java/com/java110/api/listener/account/SaveAccountDetailListener.java

@@ -0,0 +1,50 @@
+package com.java110.api.listener.account;
+
+import com.alibaba.fastjson.JSONObject;
+import com.java110.api.bmo.account.IAccountDetailBMO;
+import com.java110.api.listener.AbstractServiceApiPlusListener;
+import com.java110.core.annotation.Java110Listener;
+import com.java110.core.context.DataFlowContext;
+import com.java110.core.event.service.api.ServiceDataFlowEvent;
+import com.java110.utils.constant.ServiceCodeAccountDetailConstant;
+import com.java110.utils.util.Assert;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.HttpMethod;
+
+/**
+ * 保存商户侦听
+ * add by wuxw 2019-06-30
+ */
+@Java110Listener("saveAccountDetailListener")
+public class SaveAccountDetailListener extends AbstractServiceApiPlusListener {
+
+    @Autowired
+    private IAccountDetailBMO accountDetailBMOImpl;
+
+    @Override
+    protected void validate(ServiceDataFlowEvent event, JSONObject reqJson) {
+        //Assert.hasKeyAndValue(reqJson, "xxx", "xxx");
+
+        Assert.hasKeyAndValue(reqJson, "acctId", "请求报文中未包含acctId");
+        Assert.hasKeyAndValue(reqJson, "detailType", "请求报文中未包含detailType");
+        Assert.hasKeyAndValue(reqJson, "amount", "请求报文中未包含amount");
+        Assert.hasKeyAndValue(reqJson, "objId", "请求报文中未包含objId");
+
+    }
+
+    @Override
+    protected void doSoService(ServiceDataFlowEvent event, DataFlowContext context, JSONObject reqJson) {
+        accountDetailBMOImpl.addAccountDetail(reqJson, context);
+    }
+
+    @Override
+    public String getServiceCode() {
+        return ServiceCodeAccountDetailConstant.ADD_ACCOUNTDETAIL;
+    }
+
+    @Override
+    public HttpMethod getHttpMethod() {
+        return HttpMethod.POST;
+    }
+
+}

+ 51 - 0
service-api/src/main/java/com/java110/api/listener/account/UpdateAccountDetailListener.java

@@ -0,0 +1,51 @@
+package com.java110.api.listener.account;
+
+
+import com.alibaba.fastjson.JSONObject;
+import com.java110.api.bmo.account.IAccountDetailBMO;
+import com.java110.api.listener.AbstractServiceApiPlusListener;
+import com.java110.core.annotation.Java110Listener;
+import com.java110.core.context.DataFlowContext;
+import com.java110.core.event.service.api.ServiceDataFlowEvent;
+import com.java110.utils.constant.ServiceCodeAccountDetailConstant;
+import com.java110.utils.util.Assert;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.HttpMethod;
+
+/**
+ * 保存账户交易侦听
+ * add by wuxw 2019-06-30
+ */
+@Java110Listener("updateAccountDetailListener")
+public class UpdateAccountDetailListener extends AbstractServiceApiPlusListener {
+
+    @Autowired
+    private IAccountDetailBMO accountDetailBMOImpl;
+
+    @Override
+    protected void validate(ServiceDataFlowEvent event, JSONObject reqJson) {
+
+        Assert.hasKeyAndValue(reqJson, "detailId", "detailId不能为空");
+        Assert.hasKeyAndValue(reqJson, "acctId", "请求报文中未包含acctId");
+        Assert.hasKeyAndValue(reqJson, "detailType", "请求报文中未包含detailType");
+        Assert.hasKeyAndValue(reqJson, "amount", "请求报文中未包含amount");
+        Assert.hasKeyAndValue(reqJson, "objId", "请求报文中未包含objId");
+
+    }
+
+    @Override
+    protected void doSoService(ServiceDataFlowEvent event, DataFlowContext context, JSONObject reqJson) {
+
+        accountDetailBMOImpl.updateAccountDetail(reqJson, context);
+    }
+
+    @Override
+    public String getServiceCode() {
+        return ServiceCodeAccountDetailConstant.UPDATE_ACCOUNTDETAIL;
+    }
+
+    @Override
+    public HttpMethod getHttpMethod() {
+        return HttpMethod.POST;
+    }
+}