瀏覽代碼

将代理商 物业 商户 合并为 参与组织

吴学文 7 年之前
父節點
當前提交
5ddc9f4c7f
共有 100 個文件被更改,包括 1 次插入 和 10221 次删除
  1. 0 29
      AgentService/doc/deleteAgentAttr.json
  2. 0 29
      AgentService/doc/deleteAgentCerdentials.json
  3. 0 29
      AgentService/doc/deleteAgentPhoto.json
  4. 0 29
      AgentService/doc/deleteAgentUser.json
  5. 0 35
      AgentService/doc/saveAgentCerdentials.json
  6. 0 41
      AgentService/doc/saveAgentInfo.json
  7. 0 32
      AgentService/doc/saveAgentPhoto.json
  8. 0 32
      AgentService/doc/saveAgentUser.json
  9. 0 34
      AgentService/doc/updateAgentCerdentials.json
  10. 0 40
      AgentService/doc/updateAgentInfo.json
  11. 0 32
      AgentService/doc/updateAgentPhoto.json
  12. 0 10
      AgentService/docker/Dockerfile
  13. 0 14
      AgentService/docker/bin/start_agent.sh
  14. 0 12
      AgentService/docker/docker-compose.yml
  15. 0 11
      AgentService/docker/onStart.sh
  16. 0 74
      AgentService/pom.xml
  17. 0 52
      AgentService/src/main/java/com/java110/agent/AgentServiceApplicationStart.java
  18. 0 105
      AgentService/src/main/java/com/java110/agent/api/AgentApi.java
  19. 0 340
      AgentService/src/main/java/com/java110/agent/dao/IAgentServiceDao.java
  20. 0 652
      AgentService/src/main/java/com/java110/agent/dao/impl/AgentServiceDaoImpl.java
  21. 0 16
      AgentService/src/main/java/com/java110/agent/kafka/AgentServiceBean.java
  22. 0 91
      AgentService/src/main/java/com/java110/agent/kafka/AgentServiceKafka.java
  23. 0 375
      AgentService/src/main/java/com/java110/agent/listener/AbstractAgentBusinessServiceDataFlowListener.java
  24. 0 153
      AgentService/src/main/java/com/java110/agent/listener/DeleteAgentAttrListener.java
  25. 0 156
      AgentService/src/main/java/com/java110/agent/listener/DeleteAgentCerdentialsListener.java
  26. 0 149
      AgentService/src/main/java/com/java110/agent/listener/DeleteAgentPhotoListener.java
  27. 0 152
      AgentService/src/main/java/com/java110/agent/listener/DeleteAgentUserListener.java
  28. 0 151
      AgentService/src/main/java/com/java110/agent/listener/SaveAgentCerdentialsListener.java
  29. 0 219
      AgentService/src/main/java/com/java110/agent/listener/SaveAgentInfoListener.java
  30. 0 139
      AgentService/src/main/java/com/java110/agent/listener/SaveAgentPhotoListener.java
  31. 0 244
      AgentService/src/main/java/com/java110/agent/listener/SaveAgentUserListener.java
  32. 0 155
      AgentService/src/main/java/com/java110/agent/listener/UpdateAgentCerdentialsListener.java
  33. 0 231
      AgentService/src/main/java/com/java110/agent/listener/UpdateAgentInfoListener.java
  34. 0 161
      AgentService/src/main/java/com/java110/agent/listener/UpdateAgentPhotoListener.java
  35. 0 17
      AgentService/src/main/java/com/java110/agent/smo/IAgentServiceSMO.java
  36. 0 110
      AgentService/src/main/java/com/java110/agent/smo/impl/AgentServiceSMOImpl.java
  37. 0 94
      AgentService/src/main/resources/application-dev.yml
  38. 0 94
      AgentService/src/main/resources/application-prod.yml
  39. 0 94
      AgentService/src/main/resources/application-test.yml
  40. 0 3
      AgentService/src/main/resources/application.yml
  41. 0 15
      AgentService/src/main/resources/banner.txt
  42. 0 0
      FeeService/README.md
  43. 1 1
      PayService/pom.xml
  44. 0 0
      FeeService/src/test/java/com/java110/pay/AppTest.java
  45. 0 56
      PropertyService/Readme.md
  46. 0 29
      PropertyService/doc/deletePropertyAttr.json
  47. 0 29
      PropertyService/doc/deletePropertyCerdentials.json
  48. 0 33
      PropertyService/doc/deletePropertyHouse.json
  49. 0 29
      PropertyService/doc/deletePropertyPhoto.json
  50. 0 29
      PropertyService/doc/deletePropertyUser.json
  51. 0 35
      PropertyService/doc/savePropertyCerdentials.json
  52. 0 34
      PropertyService/doc/savePropertyFee.json
  53. 0 42
      PropertyService/doc/savePropertyHouse.json
  54. 0 41
      PropertyService/doc/savePropertyInfo.json
  55. 0 32
      PropertyService/doc/savePropertyPhoto.json
  56. 0 32
      PropertyService/doc/savePropertyUser.json
  57. 0 34
      PropertyService/doc/updatePropertyCerdentials.json
  58. 0 35
      PropertyService/doc/updatePropertyFee.json
  59. 0 41
      PropertyService/doc/updatePropertyHouse.json
  60. 0 40
      PropertyService/doc/updatePropertyInfo.json
  61. 0 32
      PropertyService/doc/updatePropertyPhoto.json
  62. 0 10
      PropertyService/docker/Dockerfile
  63. 0 14
      PropertyService/docker/bin/start_property.sh
  64. 0 12
      PropertyService/docker/docker-compose.yml
  65. 0 11
      PropertyService/docker/onStart.sh
  66. 0 80
      PropertyService/pom.xml
  67. 0 56
      PropertyService/src/main/java/com/java110/property/PropertyServiceApplicationStart.java
  68. 0 106
      PropertyService/src/main/java/com/java110/property/api/PropertyApi.java
  69. 0 340
      PropertyService/src/main/java/com/java110/property/dao/IPropertyServiceDao.java
  70. 0 652
      PropertyService/src/main/java/com/java110/property/dao/impl/PropertyServiceDaoImpl.java
  71. 0 16
      PropertyService/src/main/java/com/java110/property/kafka/PropertyServiceBean.java
  72. 0 91
      PropertyService/src/main/java/com/java110/property/kafka/PropertyServiceKafka.java
  73. 0 378
      PropertyService/src/main/java/com/java110/property/listener/AbstractPropertyBusinessServiceDataFlowListener.java
  74. 0 153
      PropertyService/src/main/java/com/java110/property/listener/DeletePropertyAttrListener.java
  75. 0 157
      PropertyService/src/main/java/com/java110/property/listener/DeletePropertyCerdentialsListener.java
  76. 0 199
      PropertyService/src/main/java/com/java110/property/listener/DeletePropertyHouseListener.java
  77. 0 149
      PropertyService/src/main/java/com/java110/property/listener/DeletePropertyPhotoListener.java
  78. 0 153
      PropertyService/src/main/java/com/java110/property/listener/DeletePropertyUserListener.java
  79. 0 152
      PropertyService/src/main/java/com/java110/property/listener/SavePropertyCerdentialsListener.java
  80. 0 137
      PropertyService/src/main/java/com/java110/property/listener/SavePropertyFeeListener.java
  81. 0 243
      PropertyService/src/main/java/com/java110/property/listener/SavePropertyHouseListener.java
  82. 0 219
      PropertyService/src/main/java/com/java110/property/listener/SavePropertyInfoListener.java
  83. 0 139
      PropertyService/src/main/java/com/java110/property/listener/SavePropertyPhotoListener.java
  84. 0 244
      PropertyService/src/main/java/com/java110/property/listener/SavePropertyUserListener.java
  85. 0 155
      PropertyService/src/main/java/com/java110/property/listener/UpdatePropertyCerdentialsListener.java
  86. 0 163
      PropertyService/src/main/java/com/java110/property/listener/UpdatePropertyFeeListener.java
  87. 0 221
      PropertyService/src/main/java/com/java110/property/listener/UpdatePropertyHouseListener.java
  88. 0 231
      PropertyService/src/main/java/com/java110/property/listener/UpdatePropertyInfoListener.java
  89. 0 161
      PropertyService/src/main/java/com/java110/property/listener/UpdatePropertyPhotoListener.java
  90. 0 17
      PropertyService/src/main/java/com/java110/property/smo/IPropertyServiceSMO.java
  91. 0 110
      PropertyService/src/main/java/com/java110/property/smo/impl/PropertyServiceSMOImpl.java
  92. 0 94
      PropertyService/src/main/resources/application-dev.yml
  93. 0 94
      PropertyService/src/main/resources/application-prod.yml
  94. 0 94
      PropertyService/src/main/resources/application-test.yml
  95. 0 3
      PropertyService/src/main/resources/application.yml
  96. 0 15
      PropertyService/src/main/resources/banner.txt
  97. 0 20
      PropertyService/src/test/java/com/java110/AppTest.java
  98. 0 64
      SimpleListenerService/pom.xml
  99. 0 13
      SimpleListenerService/src/main/java/com/java110/App.java
  100. 0 0
      SimpleListenerService/src/test/java/com/java110/AppTest.java

+ 0 - 29
AgentService/doc/deleteAgentAttr.json

@@ -1,29 +0,0 @@
-{
-  "orders": {
-    "appId": "外系统ID,分配得到",
-    "transactionId": "100000000020180409224736000001",
-    "userId": "用户ID",
-    "orderTypeCd": "订单类型,查询,受理",
-    "requestTime": "20180409224736",
-    "remark": "备注",
-    "sign": "这个服务是否要求MD5签名",
-    "attrs": [{
-      "specCd": "配置的字段ID",
-      "value": "具体值"
-    }]
-  },
-  "business": {
-    "serviceCode": "delete.agent.attr",
-    "serviceName": "删除代理商属性",
-    "remark": "备注",
-    "datas": {
-      "businessAgentAttr": [{
-        "attrId":"112018121800000002"
-      }]
-    },
-    "attrs": [{
-      "specCd": "配置的字段ID",
-      "value": "具体值"
-    }]
-  }
-}

+ 0 - 29
AgentService/doc/deleteAgentCerdentials.json

@@ -1,29 +0,0 @@
-{
-  "orders": {
-    "appId": "外系统ID,分配得到",
-    "transactionId": "100000000020180409224736000001",
-    "userId": "用户ID",
-    "orderTypeCd": "订单类型,查询,受理",
-    "requestTime": "20180409224736",
-    "remark": "备注",
-    "sign": "这个服务是否要求MD5签名",
-    "attrs": [{
-      "specCd": "配置的字段ID",
-      "value": "具体值"
-    }]
-  },
-  "business": {
-    "serviceCode": "delete.agent.cerdentials",
-    "serviceName": "删除商户证件信息",
-    "remark": "备注",
-    "datas": {
-      "businessAgentCerdentials":[{
-        "agentCerdentialsId":"9220181218000002"
-      }]
-    },
-    "attrs": [{
-      "specCd": "配置的字段ID",
-      "value": "具体值"
-    }]
-  }
-}

+ 0 - 29
AgentService/doc/deleteAgentPhoto.json

@@ -1,29 +0,0 @@
-{
-  "orders": {
-    "appId": "外系统ID,分配得到",
-    "transactionId": "100000000020180409224736000001",
-    "userId": "用户ID",
-    "orderTypeCd": "订单类型,查询,受理",
-    "requestTime": "20180409224736",
-    "remark": "备注",
-    "sign": "这个服务是否要求MD5签名",
-    "attrs": [{
-      "specCd": "配置的字段ID",
-      "value": "具体值"
-    }]
-  },
-  "business": {
-    "serviceCode": "delete.agent.photo",
-    "serviceName": "删除物业照片信息",
-    "remark": "备注",
-    "datas": {
-      "businessAgentPhoto":[{
-        "agentPhotoId":"12320181218000001"
-      }]
-    },
-    "attrs": [{
-      "specCd": "配置的字段ID",
-      "value": "具体值"
-    }]
-  }
-}

+ 0 - 29
AgentService/doc/deleteAgentUser.json

@@ -1,29 +0,0 @@
-{
-  "orders": {
-    "appId": "外系统ID,分配得到",
-    "transactionId": "100000000020180409224736000001",
-    "userId": "用户ID",
-    "orderTypeCd": "订单类型,查询,受理",
-    "requestTime": "20180409224736",
-    "remark": "备注",
-    "sign": "这个服务是否要求MD5签名",
-    "attrs": [{
-      "specCd": "配置的字段ID",
-      "value": "具体值"
-    }]
-  },
-  "business": {
-    "serviceCode": "delete.agent.user",
-    "serviceName": "删除住户信息",
-    "remark": "备注",
-    "datas": {
-      "businessAgentUser":[{
-        "agentUserId":"9320181219000001"
-      }]
-    },
-    "attrs": [{
-      "specCd": "配置的字段ID",
-      "value": "具体值"
-    }]
-  }
-}

+ 0 - 35
AgentService/doc/saveAgentCerdentials.json

@@ -1,35 +0,0 @@
-{
-  "orders": {
-    "appId": "外系统ID,分配得到",
-    "transactionId": "100000000020180409224736000001",
-    "userId": "用户ID",
-    "orderTypeCd": "订单类型,查询,受理",
-    "requestTime": "20180409224736",
-    "remark": "备注",
-    "sign": "这个服务是否要求MD5签名",
-    "attrs": [{
-      "specCd": "配置的字段ID",
-      "value": "具体值"
-    }]
-  },
-  "business": {
-    "serviceCode": "save.agent.cerdentials",
-    "serviceName": "保存商户信息",
-    "remark": "备注",
-    "datas": {
-      "businessAgentCerdentials":[{
-        "agentCerdentialsId":"-1",
-        "agentId":"9020181218000001",
-        "credentialsCd":"1",
-        "value":"632126XXXXXXXX2011",
-        "validityPeriod":"有效期,长期有效请写3000/01/01",
-        "positivePhoto":"正面照片地址,1234567.jpg",
-        "negativePhoto":"反面照片地址,没有不填写"
-      }]
-    },
-    "attrs": [{
-      "specCd": "配置的字段ID",
-      "value": "具体值"
-    }]
-  }
-}

+ 0 - 41
AgentService/doc/saveAgentInfo.json

@@ -1,41 +0,0 @@
-{
-  "orders": {
-    "appId": "外系统ID,分配得到",
-    "transactionId": "100000000020180409224736000001",
-    "userId": "用户ID",
-    "orderTypeCd": "订单类型,查询,受理",
-    "requestTime": "20180409224736",
-    "remark": "备注",
-    "sign": "这个服务是否要求MD5签名",
-    "attrs": [{
-      "specCd": "配置的字段ID",
-      "value": "具体值"
-    }]
-  },
-  "business": {
-    "serviceCode": "save.agent.info",
-    "serviceName": "保存物业信息",
-    "remark": "备注",
-    "datas": {
-      "businessAgent": {
-        "agentId": "-1",
-        "name": "方博家园",
-        "address": "青海省西宁市城中区129号",
-        "tel": "17797173942",
-        "nearbyLandmarks": "王府井旁30米",
-        "mapX": "101.801909",
-        "mapY": "36.597263"
-      },
-      "businessAgentAttr": [{
-        "agentId": "-1",
-        "attrId":"-1",
-        "specCd":"1001",
-        "value":"01"
-      }]
-    },
-    "attrs": [{
-      "specCd": "配置的字段ID",
-      "value": "具体值"
-    }]
-  }
-}

+ 0 - 32
AgentService/doc/saveAgentPhoto.json

@@ -1,32 +0,0 @@
-{
-  "orders": {
-    "appId": "外系统ID,分配得到",
-    "transactionId": "100000000020180409224736000001",
-    "userId": "用户ID",
-    "orderTypeCd": "订单类型,查询,受理",
-    "requestTime": "20180409224736",
-    "remark": "备注",
-    "sign": "这个服务是否要求MD5签名",
-    "attrs": [{
-      "specCd": "配置的字段ID",
-      "value": "具体值"
-    }]
-  },
-  "business": {
-    "serviceCode": "save.agent.photo",
-    "serviceName": "保存小区信息",
-    "remark": "备注",
-    "datas": {
-      "businessAgentPhoto":[{
-        "agentPhotoId":"-1",
-        "agentId":"123213",
-        "agentPhotoTypeCd":"T",
-        "photo":"12345678.jpg"
-      }]
-    },
-    "attrs": [{
-      "specCd": "配置的字段ID",
-      "value": "具体值"
-    }]
-  }
-}

+ 0 - 32
AgentService/doc/saveAgentUser.json

@@ -1,32 +0,0 @@
-{
-  "orders": {
-    "appId": "外系统ID,分配得到",
-    "transactionId": "100000000020180409224736000001",
-    "userId": "用户ID",
-    "orderTypeCd": "订单类型,查询,受理",
-    "requestTime": "20180409224736",
-    "remark": "备注",
-    "sign": "这个服务是否要求MD5签名",
-    "attrs": [{
-      "specCd": "配置的字段ID",
-      "value": "具体值"
-    }]
-  },
-  "business": {
-    "serviceCode": "save.agent.user",
-    "serviceName": "保存商户信息",
-    "remark": "备注",
-    "datas": {
-      "businessAgentUser":[{
-        "agentUserId":"-1",
-        "agentId":"9020181218000001",
-        "relCd":"600311000001",
-        "userId":"123"
-      }]
-    },
-    "attrs": [{
-      "specCd": "配置的字段ID",
-      "value": "具体值"
-    }]
-  }
-}

+ 0 - 34
AgentService/doc/updateAgentCerdentials.json

@@ -1,34 +0,0 @@
-{
-  "orders": {
-    "appId": "外系统ID,分配得到",
-    "transactionId": "100000000020180409224736000001",
-    "userId": "用户ID",
-    "orderTypeCd": "订单类型,查询,受理",
-    "requestTime": "20180409224736",
-    "remark": "备注",
-    "sign": "这个服务是否要求MD5签名",
-    "attrs": [{
-      "specCd": "配置的字段ID",
-      "value": "具体值"
-    }]
-  },
-  "business": {
-    "serviceCode": "update.agent.cerdentials",
-    "serviceName": "修改物业证件信息",
-    "remark": "备注",
-    "datas": {
-      "businessAgentCerdentials":[{
-        "agentCerdentialsId":"9220181218000002",
-        "agentId":"9020181218000001",
-        "value":"632126XXXXXXXX2012",
-        "validityPeriod":"3000-2-1",
-        "positivePhoto":"1234567.jpg",
-        "negativePhoto":"11.jpg"
-      }]
-    },
-    "attrs": [{
-      "specCd": "配置的字段ID",
-      "value": "具体值"
-    }]
-  }
-}

+ 0 - 40
AgentService/doc/updateAgentInfo.json

@@ -1,40 +0,0 @@
-{
-  "orders": {
-    "appId": "外系统ID,分配得到",
-    "transactionId": "100000000020180409224736000001",
-    "userId": "用户ID",
-    "orderTypeCd": "订单类型,查询,受理",
-    "requestTime": "20180409224736",
-    "remark": "备注",
-    "sign": "这个服务是否要求MD5签名",
-    "attrs": [{
-      "specCd": "配置的字段ID",
-      "value": "具体值"
-    }]
-  },
-  "business": {
-    "serviceCode": "update.agent.info",
-    "serviceName": "修改商户信息",
-    "remark": "备注",
-    "datas": {
-      "businessAgent": {
-        "agentId": "123123",
-        "name": "方博家园",
-        "address": "青海省西宁市城中区129号",
-        "tel": "17797173942",
-        "nearbyLandmarks": "王府井旁30米",
-        "mapX": "101.801909",
-        "mapY": "36.597263"
-      },
-      "businessAgentAttr": [{
-        "agentId": "12313",
-        "attrId":"123123",
-        "value":"01"
-      }]
-    },
-    "attrs": [{
-      "specCd": "配置的字段ID",
-      "value": "具体值"
-    }]
-  }
-}

+ 0 - 32
AgentService/doc/updateAgentPhoto.json

@@ -1,32 +0,0 @@
-{
-  "orders": {
-    "appId": "外系统ID,分配得到",
-    "transactionId": "100000000020180409224736000001",
-    "userId": "用户ID",
-    "orderTypeCd": "订单类型,查询,受理",
-    "requestTime": "20180409224736",
-    "remark": "备注",
-    "sign": "这个服务是否要求MD5签名",
-    "attrs": [{
-      "specCd": "配置的字段ID",
-      "value": "具体值"
-    }]
-  },
-  "business": {
-    "serviceCode": "update.agent.photo",
-    "serviceName": "修改物业照片信息",
-    "remark": "备注",
-    "datas": {
-      "businessAgentPhoto":[{
-        "agentPhotoId":"12320181218000001",
-        "agentId":"9020181218000001",
-        "agentPhotoTypeCd":"T",
-        "photo":"123456789.jpg"
-      }]
-    },
-    "attrs": [{
-      "specCd": "配置的字段ID",
-      "value": "具体值"
-    }]
-  }
-}

+ 0 - 10
AgentService/docker/Dockerfile

@@ -1,10 +0,0 @@
-FROM registry.cn-beijing.aliyuncs.com/sxd/ubuntu-java8:1.0
-MAINTAINER wuxw <928255095@qq.com>
-
-
-ADD bin/start_agent.sh /root/
-
-
-RUN chmod u+x /root/start_agent.sh
-
-CMD ["/root/start_agent.sh","dev"]

+ 0 - 14
AgentService/docker/bin/start_agent.sh

@@ -1,14 +0,0 @@
-#!/bin/bash
-#### debug model prod
-#nohup java -Xdebug -Xrunjdwp:server=y,transport=dt_socket,address=8000,suspend=n -jar -Dspring.profiles.active=dev target/AgentService.jar > agent.log 2>&1 &
-
-#### normal prod model
-#nohup java -jar -Dspring.profiles.active=prod target/AgentService.jar > agent.log 2>&1 &
-
-#### normal test model
-#nohup java -jar -Dspring.profiles.active=test target/AgentService.jar > agent.log 2>&1 &
-
-#### normal dev model
-nohup java -jar -Dspring.profiles.active=$1 target/AgentService.jar > agent.log 2>&1 &
-
-tail -100f agent.log

+ 0 - 12
AgentService/docker/docker-compose.yml

@@ -1,12 +0,0 @@
-version: '2'
-services:
-   agentserivce:
-       container_name: agentserivce-1
-       build:
-          context: .
-          dockerfile: Dockerfile
-       restart: always
-       ports:
-       - "8009:8009"
-       volumes:
-       - ../target/AgentService.jar:/root/target/AgentService.jar

+ 0 - 11
AgentService/docker/onStart.sh

@@ -1,11 +0,0 @@
-#!/bin/bash
-
-cp -r ../bin .
-
-cp  -r ../target .
-
-docker build -t java110/agent .
-
-docker run -ti --name agent_test -p8006:8006 -idt java110/agent:latest
-
-docker logs -f agent_test

+ 0 - 74
AgentService/pom.xml

@@ -1,74 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <parent>
-        <artifactId>MicroCommunity</artifactId>
-        <groupId>com.java110</groupId>
-        <version>1.0-SNAPSHOT</version>
-    </parent>
-    <modelVersion>4.0.0</modelVersion>
-
-    <artifactId>AgentService</artifactId>
-    <packaging>jar</packaging>
-
-    <name>AgentService</name>
-    <!-- FIXME change it to the project's website -->
-    <url>http://www.example.com</url>
-
-    <properties>
-        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-        <maven.compiler.source>1.7</maven.compiler.source>
-        <maven.compiler.target>1.7</maven.compiler.target>
-    </properties>
-
-    <dependencies>
-        <dependency>
-            <groupId>com.java110</groupId>
-            <artifactId>java110-service</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>com.java110</groupId>
-            <artifactId>java110-event</artifactId>
-        </dependency>
-    </dependencies>
-
-    <build>
-        <finalName>AgentService</finalName>
-        <plugins>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-dependency-plugin</artifactId>
-                <version>2.10</version>
-                <executions>
-                    <execution>
-                        <id>unpack</id>
-                        <phase>generate-resources</phase>
-                        <goals>
-                            <goal>unpack</goal>
-                        </goals>
-                        <configuration>
-                            <artifactItems>
-                                <artifactItem>
-                                    <groupId>com.java110</groupId>
-                                    <artifactId>java110-config</artifactId>
-                                    <version>${microcommunity.version}</version>
-                                    <type>jar</type>
-                                    <overWrite>true</overWrite>
-                                    <outputDirectory>${project.build.directory}/classes</outputDirectory>
-                                </artifactItem>
-                            </artifactItems>
-                        </configuration>
-                    </execution>
-                </executions>
-            </plugin>
-            <plugin>
-                <groupId>org.springframework.boot</groupId>
-                <artifactId>spring-boot-maven-plugin</artifactId>
-                <configuration>
-                    <mainClass>com.java110.agent.AgentServiceApplicationStart</mainClass>
-                </configuration>
-            </plugin>
-        </plugins>
-    </build>
-</project>

+ 0 - 52
AgentService/src/main/java/com/java110/agent/AgentServiceApplicationStart.java

@@ -1,52 +0,0 @@
-package com.java110.agent;
-
-import com.java110.core.annotation.Java110ListenerDiscovery;
-import com.java110.event.service.BusinessServiceDataFlowEventPublishing;
-import com.java110.service.init.ServiceStartInit;
-import org.springframework.boot.SpringApplication;
-import org.springframework.boot.autoconfigure.SpringBootApplication;
-import org.springframework.boot.web.client.RestTemplateBuilder;
-import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
-import org.springframework.cloud.client.loadbalancer.LoadBalanced;
-import org.springframework.context.ApplicationContext;
-import org.springframework.context.annotation.Bean;
-import org.springframework.http.converter.StringHttpMessageConverter;
-import org.springframework.web.client.RestTemplate;
-
-import java.nio.charset.Charset;
-
-
-/**
- * spring boot 初始化启动类
- *
- * @version v0.1
- * @auther com.java110.wuxw
- * @mail 928255095@qq.com
- * @date 2016年8月6日
- * @tag
- */
-@SpringBootApplication(scanBasePackages={"com.java110.service","com.java110.agent","com.java110.core","com.java110.cache"})
-@EnableDiscoveryClient
-@Java110ListenerDiscovery(listenerPublishClass = BusinessServiceDataFlowEventPublishing.class,
-        basePackages = {"com.java110.agent.listener"})
-public class AgentServiceApplicationStart {
-
-    /**
-     * 实例化RestTemplate,通过@LoadBalanced注解开启均衡负载能力.
-     * @return restTemplate
-     */
-    @Bean
-    @LoadBalanced
-    public RestTemplate restTemplate() {
-        StringHttpMessageConverter m = new StringHttpMessageConverter(Charset.forName("UTF-8"));
-        RestTemplate restTemplate = new RestTemplateBuilder().additionalMessageConverters(m).build();
-        return restTemplate;
-    }
-
-    public static void main(String[] args) throws Exception{
-        ApplicationContext context = SpringApplication.run(AgentServiceApplicationStart.class, args);
-        ServiceStartInit.initSystemConfig(context);
-        //加载业务侦听
-        //SystemStartLoadBusinessConfigure.initSystemConfig(LISTENER_PATH);
-    }
-}

+ 0 - 105
AgentService/src/main/java/com/java110/agent/api/AgentApi.java

@@ -1,105 +0,0 @@
-package com.java110.agent.api;
-
-import com.alibaba.fastjson.JSONObject;
-import com.java110.common.constant.ResponseConstant;
-import com.java110.common.exception.InitConfigDataException;
-import com.java110.common.exception.InitDataFlowContextException;
-import com.java110.core.base.controller.BaseController;
-import com.java110.core.context.BusinessServiceDataFlow;
-import com.java110.core.factory.DataTransactionFactory;
-import com.java110.agent.smo.IAgentServiceSMO;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestMethod;
-import org.springframework.web.bind.annotation.RestController;
-
-import javax.servlet.http.HttpServletRequest;
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * 用户服务类
- * Created by wuxw on 2018/5/14.
- */
-@RestController
-public class AgentApi extends BaseController {
-
-    private final static Logger logger = LoggerFactory.getLogger(AgentApi.class);
-
-    @Autowired
-    IAgentServiceSMO agentServiceSMOImpl;
-
-    @RequestMapping(path = "/agentApi/service",method= RequestMethod.GET)
-    public String serviceGet(HttpServletRequest request) {
-        return DataTransactionFactory.createBusinessResponseJson(ResponseConstant.RESULT_CODE_ERROR,"不支持Get方法请求").toJSONString();
-    }
-
-    /**
-     * 用户服务统一处理接口
-     * @param orderInfo
-     * @param request
-     * @return
-     */
-    @RequestMapping(path = "/agentApi/service",method= RequestMethod.POST)
-    public String servicePost(@RequestBody String orderInfo, HttpServletRequest request) {
-        BusinessServiceDataFlow businessServiceDataFlow = null;
-        JSONObject responseJson = null;
-        try {
-            Map<String, String> headers = new HashMap<String, String>();
-            getRequestInfo(request, headers);
-            //预校验
-            preValiateOrderInfo(orderInfo);
-            businessServiceDataFlow = this.writeDataToDataFlowContext(orderInfo, headers);
-            responseJson = agentServiceSMOImpl.service(businessServiceDataFlow);
-        }catch (InitDataFlowContextException e){
-            logger.error("请求报文错误,初始化 BusinessServiceDataFlow失败"+orderInfo,e);
-            responseJson = DataTransactionFactory.createNoBusinessTypeBusinessResponseJson(orderInfo,ResponseConstant.RESULT_PARAM_ERROR,e.getMessage(),null);
-        }catch (InitConfigDataException e){
-            logger.error("请求报文错误,加载配置信息失败"+orderInfo,e);
-            responseJson = DataTransactionFactory.createNoBusinessTypeBusinessResponseJson(orderInfo,ResponseConstant.RESULT_PARAM_ERROR,e.getMessage(),null);
-        }catch (Exception e){
-            logger.error("请求订单异常",e);
-            responseJson = DataTransactionFactory.createBusinessResponseJson(businessServiceDataFlow,ResponseConstant.RESULT_CODE_ERROR,e.getMessage()+e,
-                    null);
-        }finally {
-            return responseJson.toJSONString();
-        }
-    }
-
-    /**
-     * 这里预校验,请求报文中不能有 dataFlowId
-     * @param orderInfo
-     */
-    private void preValiateOrderInfo(String orderInfo) {
-       /* if(JSONObject.parseObject(orderInfo).getJSONObject("orders").containsKey("dataFlowId")){
-            throw new BusinessException(ResponseConstant.RESULT_CODE_ERROR,"报文中不能存在dataFlowId节点");
-        }*/
-    }
-
-    /**
-     * 获取请求信息
-     * @param request
-     * @param headers
-     * @throws RuntimeException
-     */
-    private void getRequestInfo(HttpServletRequest request,Map headers) throws Exception{
-        try{
-            super.initHeadParam(request,headers);
-            super.initUrlParam(request,headers);
-        }catch (Exception e){
-            logger.error("加载头信息失败",e);
-            throw new InitConfigDataException(ResponseConstant.RESULT_PARAM_ERROR,"加载头信息失败");
-        }
-    }
-
-    public IAgentServiceSMO getAgentServiceSMOImpl() {
-        return agentServiceSMOImpl;
-    }
-
-    public void setAgentServiceSMOImpl(IAgentServiceSMO agentServiceSMOImpl) {
-        this.agentServiceSMOImpl = agentServiceSMOImpl;
-    }
-}

+ 0 - 340
AgentService/src/main/java/com/java110/agent/dao/IAgentServiceDao.java

@@ -1,340 +0,0 @@
-package com.java110.agent.dao;
-
-
-import com.java110.common.exception.DAOException;
-
-import java.util.List;
-import java.util.Map;
-
-/**
- * 代理商组件内部之间使用,没有给外围系统提供服务能力
- * 代理商服务接口类,要求全部以字符串传输,方便微服务化
- * 新建客户,修改客户,删除客户,查询客户等功能
- *
- * Created by wuxw on 2016/12/27.
- */
-public interface IAgentServiceDao {
-
-    /**
-     * 保存 代理商信息
-     * @param businessAgentInfo 代理商信息 封装
-     * @throws DAOException 操作数据库异常
-     */
-    public void saveBusinessAgentInfo(Map businessAgentInfo) throws DAOException;
-
-    /**
-     * 保存代理商属性
-     * @param businessAgentAttr 代理商属性信息封装
-     * @throws DAOException 操作数据库异常
-     */
-    public void saveBusinessAgentAttr(Map businessAgentAttr) throws DAOException;
-
-
-    /**
-     * 保存代理商照片信息
-     * @param businessAgentPhoto 代理商照片
-     * @throws DAOException 操作数据库异常
-     */
-    public void saveBusinessAgentPhoto(Map businessAgentPhoto) throws DAOException;
-
-    /**
-     * 保存代理商证件信息
-     * @param businessAgentCerdentials 代理商证件
-     * @throws DAOException 操作数据库异常
-     */
-    public void saveBusinessAgentCerdentials(Map businessAgentCerdentials) throws DAOException;
-
-
-    /**
-     * 保存代理商用户信息
-     * @param info
-     * @throws DAOException
-     */
-    public void saveBusinessAgentUser(Map info) throws DAOException;
-
-    /**
-     * 保存代理商费用信息
-     * @param info
-     * @throws DAOException
-     */
-    public void saveBusinessAgentFee(Map info) throws DAOException;
-
-    /**
-     * 保存 住户信息
-     * @param businessAgentHouse 住户信息 封装
-     * @throws DAOException 操作数据库异常
-     */
-    public void saveBusinessAgentHouse(Map businessAgentHouse) throws DAOException;
-
-    /**
-     * 保存住户属性
-     * @param businessAgentHouseAttr 住户信息封装
-     * @throws DAOException 操作数据库异常
-     */
-    public void saveBusinessAgentHouseAttr(Map businessAgentHouseAttr) throws DAOException;
-
-
-    /**
-     * 查询代理商信息(business过程)
-     * 根据bId 查询代理商信息
-     * @param info bId 信息
-     * @return 代理商信息
-     * @throws DAOException
-     */
-    public Map getBusinessAgentInfo(Map info) throws DAOException;
-
-
-    /**
-     * 查询代理商属性信息(business过程)
-     * @param info bId 信息
-     * @return 代理商属性
-     * @throws DAOException
-     */
-    public List<Map> getBusinessAgentAttrs(Map info) throws DAOException;
-
-    /**
-     * 查询住户信息(business过程)
-     * 根据bId 查询代理商信息
-     * @param info bId 信息
-     * @return 代理商信息
-     * @throws DAOException
-     */
-    public Map getBusinessAgentHouse(Map info) throws DAOException;
-
-
-    /**
-     * 查询住户属性信息(business过程)
-     * @param info bId 信息
-     * @return 代理商属性
-     * @throws DAOException
-     */
-    public List<Map> getBusinessAgentHouseAttrs(Map info) throws DAOException;
-
-
-
-    /**
-     * 查询代理商照片
-     * @param info bId 信息
-     * @return 代理商照片
-     * @throws DAOException
-     */
-    public List<Map> getBusinessAgentPhoto(Map info) throws DAOException;
-
-
-    /**
-     * 查询代理商证件信息
-     * @param info bId 信息
-     * @return 代理商照片
-     * @throws DAOException
-     */
-    public List<Map> getBusinessAgentCerdentials(Map info) throws DAOException;
-
-    /**
-     * 查询代理商用户信息
-     * @param info bId 信息
-     * @return 代理商照片
-     * @throws DAOException
-     */
-    public List<Map> getBusinessAgentUser(Map info) throws DAOException;
-
-    /**
-     * 查询代理商费用信息
-     * @param info bId 信息
-     * @return 代理商照片
-     * @throws DAOException
-     */
-    public List<Map> getBusinessAgentFee(Map info) throws DAOException;
-    /**
-     * 保存 代理商信息 Business数据到 Instance中
-     * @param info
-     * @throws DAOException
-     */
-    public void saveAgentInfoInstance(Map info) throws DAOException;
-
-
-    /**
-     * 保存 代理商属性信息 Business数据到 Instance中
-     * @param info
-     * @throws DAOException
-     */
-    public void saveAgentAttrsInstance(Map info) throws DAOException;
-
-    /**
-     * 保存 住户信息 Business数据到 Instance中
-     * @param info
-     * @throws DAOException
-     */
-    public void saveAgentHouseInstance(Map info) throws DAOException;
-
-
-    /**
-     * 保存 住户属性信息 Business数据到 Instance中
-     * @param info
-     * @throws DAOException
-     */
-    public void saveAgentHouseAttrsInstance(Map info) throws DAOException;
-
-    /**
-     * 保存 代理商照片信息 Business数据到 Instance中
-     * @param info
-     * @throws DAOException
-     */
-    public void saveAgentPhotoInstance(Map info) throws DAOException;
-
-
-    /**
-     * 保存 代理商证件信息 Business数据到 Instance中
-     * @param info
-     * @throws DAOException
-     */
-    public void saveAgentCerdentialsInstance(Map info) throws DAOException;
-
-
-    /**
-     * 保存 代理商用户信息 Business数据到 Instance中
-     * @param info
-     * @throws DAOException
-     */
-    public void saveAgentUserInstance(Map info) throws DAOException;
-
-    /**
-     * 保存 代理商费用信息 Business数据到 Instance中
-     * @param info
-     * @throws DAOException
-     */
-    public void saveAgentFeeInstance(Map info) throws DAOException;
-
-    /**
-     * 查询代理商信息(instance过程)
-     * 根据bId 查询代理商信息
-     * @param info bId 信息
-     * @return 代理商信息
-     * @throws DAOException
-     */
-    public Map getAgentInfo(Map info) throws DAOException;
-
-
-    /**
-     * 查询代理商属性信息(instance过程)
-     * @param info bId 信息
-     * @return 代理商属性
-     * @throws DAOException
-     */
-    public List<Map> getAgentAttrs(Map info) throws DAOException;
-
-    /**
-     * 查询住户信息(instance过程)
-     * 根据bId 查询代理商信息
-     * @param info bId 信息
-     * @return 代理商信息
-     * @throws DAOException
-     */
-    public Map getAgentHouse(Map info) throws DAOException;
-
-
-    /**
-     * 查询住户属性信息(instance过程)
-     * @param info bId 信息
-     * @return 代理商属性
-     * @throws DAOException
-     */
-    public List<Map> getAgentHouseAttrs(Map info) throws DAOException;
-
-
-    /**
-     * 查询代理商照片(instance 过程)
-     * @param info bId 信息
-     * @return 代理商照片
-     * @throws DAOException
-     */
-    public List<Map> getAgentPhoto(Map info) throws DAOException;
-
-    /**
-     * 查询代理商证件信息(instance 过程)
-     * @param info bId 信息
-     * @return 代理商照片
-     * @throws DAOException
-     */
-    public List<Map> getAgentCerdentials(Map info) throws DAOException;
-
-    /**
-     * 查询代理商用户信息(instance 过程)
-     * @param info bId 信息
-     * @return 代理商照片
-     * @throws DAOException
-     */
-    public List<Map> getAgentUser(Map info) throws DAOException;
-
-    /**
-     * 查询代理商费用信息(instance 过程)
-     * @param info bId 信息
-     * @return 代理商照片
-     * @throws DAOException
-     */
-    public List<Map> getAgentFee(Map info) throws DAOException;
-
-    /**
-     * 修改代理商信息
-     * @param info 修改信息
-     * @throws DAOException
-     */
-    public void updateAgentInfoInstance(Map info) throws DAOException;
-
-
-    /**
-     * 修改代理商属性信息
-     * @param info 修改信息
-     * @throws DAOException
-     */
-    public void updateAgentAttrInstance(Map info) throws DAOException;
-
-    /**
-     * 修改住户信息
-     * @param info 修改信息
-     * @throws DAOException
-     */
-    public void updateAgentHouseInstance(Map info) throws DAOException;
-
-
-    /**
-     * 修改住户属性信息
-     * @param info 修改信息
-     * @throws DAOException
-     */
-    public void updateAgentHouseAttrInstance(Map info) throws DAOException;
-
-
-    /**
-     * 修改代理商照片信息
-     * @param info 修改信息
-     * @throws DAOException
-     */
-    public void updateAgentPhotoInstance(Map info) throws DAOException;
-
-    /**
-     * 修改代理商证件信息
-     * @param info 修改信息
-     * @throws DAOException
-     */
-    public void updateAgentCerdentailsInstance(Map info) throws DAOException;
-
-
-    /**
-     * 修改代理商用户信息
-     * @param info 修改信息
-     * @throws DAOException
-     */
-    public void updateAgentUserInstance(Map info) throws DAOException;
-
-
-
-    /**
-     * 修改代理商费用信息
-     * @param info 修改信息
-     * @throws DAOException
-     */
-    public void updateAgentFeeInstance(Map info) throws DAOException;
-
-
-
-}

+ 0 - 652
AgentService/src/main/java/com/java110/agent/dao/impl/AgentServiceDaoImpl.java

@@ -1,652 +0,0 @@
-package com.java110.agent.dao.impl;
-
-import com.alibaba.fastjson.JSONObject;
-import com.java110.agent.dao.IAgentServiceDao;
-import com.java110.common.constant.ResponseConstant;
-import com.java110.common.exception.DAOException;
-import com.java110.common.util.DateUtil;
-import com.java110.core.base.dao.BaseServiceDao;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.stereotype.Service;
-
-import java.util.List;
-import java.util.Map;
-
-/**
- * 代理商服务 与数据库交互
- * Created by wuxw on 2017/4/5.
- */
-@Service("agentServiceDaoImpl")
-//@Transactional
-public class AgentServiceDaoImpl extends BaseServiceDao implements IAgentServiceDao {
-
-    private final static Logger logger = LoggerFactory.getLogger(AgentServiceDaoImpl.class);
-
-    /**
-     * 代理商信息封装
-     * @param businessAgentInfo 代理商信息 封装
-     * @throws DAOException
-     */
-    @Override
-    public void saveBusinessAgentInfo(Map businessAgentInfo) throws DAOException {
-        businessAgentInfo.put("month", DateUtil.getCurrentMonth());
-        // 查询business_user 数据是否已经存在
-        logger.debug("保存代理商信息 入参 businessAgentInfo : {}",businessAgentInfo);
-        int saveFlag = sqlSessionTemplate.insert("agentServiceDaoImpl.saveBusinessAgentInfo",businessAgentInfo);
-
-        if(saveFlag < 1){
-            throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR,"保存代理商数据失败:"+ JSONObject.toJSONString(businessAgentInfo));
-        }
-    }
-
-    /**
-     * 代理商属性信息分装
-     * @param businessAgentAttr 代理商属性信息封装
-     * @throws DAOException
-     */
-    @Override
-    public void saveBusinessAgentAttr(Map businessAgentAttr) throws DAOException {
-        businessAgentAttr.put("month", DateUtil.getCurrentMonth());
-        // 查询business_user 数据是否已经存在
-        logger.debug("保存代理商属性信息 入参 businessAgentAttr : {}",businessAgentAttr);
-
-        int saveFlag = sqlSessionTemplate.insert("agentServiceDaoImpl.saveBusinessAgentAttr",businessAgentAttr);
-
-        if(saveFlag < 1){
-            throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR,"保存代理商属性数据失败:"+ JSONObject.toJSONString(businessAgentAttr));
-        }
-    }
-
-    /**
-     * 保存代理商照片信息
-     * @param businessAgentPhoto 代理商照片
-     * @throws DAOException
-     */
-    @Override
-    public void saveBusinessAgentPhoto(Map businessAgentPhoto) throws DAOException {
-        businessAgentPhoto.put("month", DateUtil.getCurrentMonth());
-        logger.debug("保存代理商照片信息 入参 businessAgentPhoto : {}",businessAgentPhoto);
-
-        int saveFlag = sqlSessionTemplate.insert("agentServiceDaoImpl.saveBusinessAgentPhoto",businessAgentPhoto);
-
-        if(saveFlag < 1){
-            throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR,"保存代理商照片数据失败:"+ JSONObject.toJSONString(businessAgentPhoto));
-        }
-    }
-
-    /**
-     * 保存代理商证件信息
-     * @param businessAgentCerdentials 代理商证件
-     * @throws DAOException
-     */
-    @Override
-    public void saveBusinessAgentCerdentials(Map businessAgentCerdentials) throws DAOException {
-        businessAgentCerdentials.put("month", DateUtil.getCurrentMonth());
-        logger.debug("保存代理商证件信息 入参 businessAgentCerdentials : {}",businessAgentCerdentials);
-
-        int saveFlag = sqlSessionTemplate.insert("agentServiceDaoImpl.saveBusinessAgentCerdentials",businessAgentCerdentials);
-
-        if(saveFlag < 1){
-            throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR,"保存代理商证件数据失败:"+ JSONObject.toJSONString(businessAgentCerdentials));
-        }
-    }
-
-    /**
-     * 保存代理商用户信息
-     * @param info
-     * @throws DAOException
-     */
-    public void saveBusinessAgentUser(Map info) throws DAOException{
-        info.put("month", DateUtil.getCurrentMonth());
-        logger.debug("保存代理商用户信息入参 info : {}",info);
-
-        int saveFlag = sqlSessionTemplate.insert("agentServiceDaoImpl.saveBusinessAgentUser",info);
-
-        if(saveFlag < 1){
-            throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR,"保存代理商用户信息数据失败:"+ JSONObject.toJSONString(info));
-        }
-    }
-
-    /**
-     * 保存代理商费用信息
-     * @param info
-     * @throws DAOException
-     */
-    public void saveBusinessAgentFee(Map info) throws DAOException{
-        info.put("month", DateUtil.getCurrentMonth());
-        logger.debug("保存代理商费用信息入参 info : {}",info);
-
-        int saveFlag = sqlSessionTemplate.insert("agentServiceDaoImpl.saveBusinessAgentFee",info);
-
-        if(saveFlag < 1){
-            throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR,"保存代理商费用信息数据失败:"+ JSONObject.toJSONString(info));
-        }
-    }
-
-    /**
-     * 保存 住户信息
-     * @param businessAgentHouse 住户信息 封装
-     * @throws DAOException 操作数据库异常
-     */
-    public void saveBusinessAgentHouse(Map businessAgentHouse) throws DAOException{
-        businessAgentHouse.put("month", DateUtil.getCurrentMonth());
-        // 查询business_user 数据是否已经存在
-        logger.debug("保存住户信息 入参 businessAgentHouse : {}",businessAgentHouse);
-        int saveFlag = sqlSessionTemplate.insert("agentServiceDaoImpl.saveBusinessAgentHouse",businessAgentHouse);
-
-        if(saveFlag < 1){
-            throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR,"保存住户数据失败:"+ JSONObject.toJSONString(businessAgentHouse));
-        }
-    }
-
-    /**
-     * 保存住户属性
-     * @param businessAgentHouseAttr 住户信息封装
-     * @throws DAOException 操作数据库异常
-     */
-    public void saveBusinessAgentHouseAttr(Map businessAgentHouseAttr) throws DAOException{
-        businessAgentHouseAttr.put("month", DateUtil.getCurrentMonth());
-        // 查询business_user 数据是否已经存在
-        logger.debug("保存住户属性信息 入参 businessAgentHouseAttr : {}",businessAgentHouseAttr);
-
-        int saveFlag = sqlSessionTemplate.insert("agentServiceDaoImpl.saveBusinessAgentHouseAttr",businessAgentHouseAttr);
-
-        if(saveFlag < 1){
-            throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR,"保存住户属性数据失败:"+ JSONObject.toJSONString(businessAgentHouseAttr));
-        }
-    }
-
-    /**
-     * 查询代理商信息
-     * @param info bId 信息
-     * @return 代理商信息
-     * @throws DAOException
-     */
-    @Override
-    public Map getBusinessAgentInfo(Map info) throws DAOException {
-
-        logger.debug("查询代理商信息 入参 info : {}",info);
-
-        List<Map> businessAgentInfos = sqlSessionTemplate.selectList("agentServiceDaoImpl.getBusinessAgentInfo",info);
-        if(businessAgentInfos == null){
-            return null;
-        }
-        if(businessAgentInfos.size() >1){
-            throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR,"根据条件查询有多条数据,数据异常,请检查:businessAgentInfos,"+ JSONObject.toJSONString(info));
-        }
-
-        return businessAgentInfos.get(0);
-    }
-
-    /**
-     * 查询代理商属性
-     * @param info bId 信息
-     * @return 代理商属性
-     * @throws DAOException
-     */
-    @Override
-    public List<Map> getBusinessAgentAttrs(Map info) throws DAOException {
-        logger.debug("查询代理商属性信息 入参 info : {}",info);
-
-        List<Map> businessAgentAttrs = sqlSessionTemplate.selectList("agentServiceDaoImpl.getBusinessAgentAttrs",info);
-
-        return businessAgentAttrs;
-    }
-
-    /**
-     * 查询住户信息(business过程)
-     * 根据bId 查询代理商信息
-     * @param info bId 信息
-     * @return 代理商信息
-     * @throws DAOException
-     */
-    public Map getBusinessAgentHouse(Map info) throws DAOException{
-        logger.debug("查询住户信息 入参 info : {}",info);
-
-        List<Map> businessAgentHouses = sqlSessionTemplate.selectList("agentServiceDaoImpl.getBusinessAgentHouse",info);
-        if(businessAgentHouses == null){
-            return null;
-        }
-        if(businessAgentHouses.size() >1){
-            throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR,"根据条件查询有多条数据,数据异常,请检查:businessAgentHouse,"+ JSONObject.toJSONString(info));
-        }
-
-        return businessAgentHouses.get(0);
-    }
-
-
-    /**
-     * 查询住户属性信息(business过程)
-     * @param info bId 信息
-     * @return 代理商属性
-     * @throws DAOException
-     */
-    public List<Map> getBusinessAgentHouseAttrs(Map info) throws DAOException{
-        logger.debug("查询住户属性信息 入参 info : {}",info);
-
-        List<Map> businessAgentHouseAttrs = sqlSessionTemplate.selectList("agentServiceDaoImpl.getBusinessAgentHouseAttrs",info);
-
-        return businessAgentHouseAttrs;
-    }
-
-    /**
-     * 查询代理商照片
-     * @param info bId 信息
-     * @return
-     * @throws DAOException
-     */
-    @Override
-    public List<Map> getBusinessAgentPhoto(Map info) throws DAOException {
-        logger.debug("查询代理商照片信息 入参 info : {}",info);
-
-        List<Map> businessAgentPhotos = sqlSessionTemplate.selectList("agentServiceDaoImpl.getBusinessAgentPhoto",info);
-
-        return businessAgentPhotos;
-    }
-
-    /**
-     * 查询代理商证件
-     * @param info bId 信息
-     * @return
-     * @throws DAOException
-     */
-    @Override
-    public List<Map> getBusinessAgentCerdentials(Map info) throws DAOException {
-        logger.debug("查询代理商证件信息 入参 info : {}",info);
-
-        List<Map> businessAgentCerdentialses = sqlSessionTemplate.selectList("agentServiceDaoImpl.getBusinessAgentCerdentials",info);
-
-        return businessAgentCerdentialses;
-    }
-
-    /**
-     * 查询代理商用户信息
-     * @param info bId 信息
-     * @return 代理商照片
-     * @throws DAOException
-     */
-    public List<Map> getBusinessAgentUser(Map info) throws DAOException{
-        logger.debug("查询代理商用户信息 入参 info : {}",info);
-
-        List<Map> businessAgentUsers = sqlSessionTemplate.selectList("agentServiceDaoImpl.getBusinessAgentUser",info);
-
-        return businessAgentUsers;
-    }
-
-    /**
-     * 查询代理商费用信息
-     * @param info bId 信息
-     * @return 代理商照片
-     * @throws DAOException
-     */
-    public List<Map> getBusinessAgentFee(Map info) throws DAOException{
-        logger.debug("查询代理商用户信息 入参 info : {}",info);
-
-        List<Map> businessAgentUsers = sqlSessionTemplate.selectList("agentServiceDaoImpl.getBusinessAgentFee",info);
-
-        return businessAgentUsers;
-    }
-
-
-    /**
-     * 保存代理商信息 到 instance
-     * @param info   bId 信息
-     * @throws DAOException
-     */
-    @Override
-    public void saveAgentInfoInstance(Map info) throws DAOException {
-        logger.debug("保存代理商信息Instance 入参 info : {}",info);
-
-        int saveFlag = sqlSessionTemplate.insert("agentServiceDaoImpl.saveAgentInfoInstance",info);
-
-        if(saveFlag < 1){
-            throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR,"保存代理商信息Instance数据失败:"+ JSONObject.toJSONString(info));
-        }
-    }
-
-    @Override
-    public void saveAgentAttrsInstance(Map info) throws DAOException {
-        logger.debug("保存代理商属性信息Instance 入参 info : {}",info);
-
-        int saveFlag = sqlSessionTemplate.insert("agentServiceDaoImpl.saveAgentAttrsInstance",info);
-
-        if(saveFlag < 1){
-            throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR,"保存代理商属性信息Instance数据失败:"+ JSONObject.toJSONString(info));
-        }
-    }
-
-    /**
-     * 保存 住户信息 Business数据到 Instance中
-     * @param info
-     * @throws DAOException
-     */
-    public void saveAgentHouseInstance(Map info) throws DAOException{
-        logger.debug("保存住户信息Instance 入参 info : {}",info);
-
-        int saveFlag = sqlSessionTemplate.insert("agentServiceDaoImpl.saveAgentHouseInstance",info);
-
-        if(saveFlag < 1){
-            throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR,"保存住户信息Instance数据失败:"+ JSONObject.toJSONString(info));
-        }
-    }
-
-
-    /**
-     * 保存 住户属性信息 Business数据到 Instance中
-     * @param info
-     * @throws DAOException
-     */
-    public void saveAgentHouseAttrsInstance(Map info) throws DAOException{
-        logger.debug("保存住户属性信息Instance 入参 info : {}",info);
-
-        int saveFlag = sqlSessionTemplate.insert("agentServiceDaoImpl.saveAgentHouseAttrsInstance",info);
-
-        if(saveFlag < 1){
-            throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR,"保存住户属性信息Instance数据失败:"+ JSONObject.toJSONString(info));
-        }
-    }
-
-    @Override
-    public void saveAgentPhotoInstance(Map info) throws DAOException {
-        logger.debug("保存代理商照片信息Instance 入参 info : {}",info);
-
-        int saveFlag = sqlSessionTemplate.insert("agentServiceDaoImpl.saveAgentPhotoInstance",info);
-
-        if(saveFlag < 1){
-            throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR,"保存代理商照片信息Instance数据失败:"+ JSONObject.toJSONString(info));
-        }
-    }
-
-    @Override
-    public void saveAgentCerdentialsInstance(Map info) throws DAOException {
-        logger.debug("保存代理商证件信息Instance 入参 info : {}",info);
-
-        int saveFlag = sqlSessionTemplate.insert("agentServiceDaoImpl.saveAgentCerdentialsInstance",info);
-
-        if(saveFlag < 1){
-            throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR,"保存代理商证件信息Instance数据失败:"+ JSONObject.toJSONString(info));
-        }
-    }
-
-    /**
-     * 保存 代理商用户信息 Business数据到 Instance中
-     * @param info
-     * @throws DAOException
-     */
-    public void saveAgentUserInstance(Map info) throws DAOException{
-        logger.debug("保存代理商用户信息Instance 入参 info : {}",info);
-
-        int saveFlag = sqlSessionTemplate.insert("agentServiceDaoImpl.saveAgentUserInstance",info);
-
-        if(saveFlag < 1){
-            throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR,"保存代理商用户信息Instance数据失败:"+ JSONObject.toJSONString(info));
-        }
-    }
-
-    /**
-     * 保存 代理商费用信息 Business数据到 Instance中
-     * @param info
-     * @throws DAOException
-     */
-    public void saveAgentFeeInstance(Map info) throws DAOException{
-        logger.debug("保存代理商费用信息Instance 入参 info : {}",info);
-
-        int saveFlag = sqlSessionTemplate.insert("agentServiceDaoImpl.saveAgentFeeInstance",info);
-
-        if(saveFlag < 1){
-            throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR,"保存代理商费用信息Instance数据失败:"+ JSONObject.toJSONString(info));
-        }
-    }
-
-
-    /**
-     * 查询代理商信息(instance)
-     * @param info bId 信息
-     * @return
-     * @throws DAOException
-     */
-    @Override
-    public Map getAgentInfo(Map info) throws DAOException {
-        logger.debug("查询代理商信息 入参 info : {}",info);
-
-        List<Map> businessAgentInfos = sqlSessionTemplate.selectList("agentServiceDaoImpl.getAgentInfo",info);
-        if(businessAgentInfos == null || businessAgentInfos.size() == 0){
-            return null;
-        }
-        if(businessAgentInfos.size() >1){
-            throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR,"根据条件查询有多条数据,数据异常,请检查:getAgentInfo,"+ JSONObject.toJSONString(info));
-        }
-
-        return businessAgentInfos.get(0);
-    }
-
-    /**
-     * 代理商属性查询(instance)
-     * @param info bId 信息
-     * @return
-     * @throws DAOException
-     */
-    @Override
-    public List<Map> getAgentAttrs(Map info) throws DAOException {
-        logger.debug("查询代理商属性信息 入参 info : {}",info);
-
-        List<Map> agentAttrs = sqlSessionTemplate.selectList("agentServiceDaoImpl.getAgentAttrs",info);
-
-        return agentAttrs;
-    }
-
-    /**
-     * 查询住户信息(instance过程)
-     * 根据bId 查询代理商信息
-     * @param info bId 信息
-     * @return 代理商信息
-     * @throws DAOException
-     */
-    public Map getAgentHouse(Map info) throws DAOException{
-        logger.debug("查询住户信息 入参 info : {}",info);
-
-        List<Map> businessAgentInfos = sqlSessionTemplate.selectList("agentServiceDaoImpl.getAgentHouse",info);
-        if(businessAgentInfos == null || businessAgentInfos.size() == 0){
-            return null;
-        }
-        if(businessAgentInfos.size() >1){
-            throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR,"根据条件查询有多条数据,数据异常,请检查:getAgentHouse,"+ JSONObject.toJSONString(info));
-        }
-
-        return businessAgentInfos.get(0);
-    }
-
-
-    /**
-     * 查询住户属性信息(instance过程)
-     * @param info bId 信息
-     * @return 代理商属性
-     * @throws DAOException
-     */
-    public List<Map> getAgentHouseAttrs(Map info) throws DAOException{
-        logger.debug("查询住户属性信息 入参 info : {}",info);
-
-        List<Map> agentAttrs = sqlSessionTemplate.selectList("agentServiceDaoImpl.getAgentHouseAttrs",info);
-
-        return agentAttrs;
-    }
-
-    /**
-     * 代理商照片查询(instance)
-     * @param info bId 信息
-     * @return
-     * @throws DAOException
-     */
-    @Override
-    public List<Map> getAgentPhoto(Map info) throws DAOException {
-        logger.debug("查询代理商照片信息 入参 info : {}",info);
-
-        List<Map> agentPhotos = sqlSessionTemplate.selectList("agentServiceDaoImpl.getAgentPhoto",info);
-
-        return agentPhotos;
-    }
-
-    /**
-     * 代理商证件查询(instance)
-     * @param info bId 信息
-     * @return
-     * @throws DAOException
-     */
-    @Override
-    public List<Map> getAgentCerdentials(Map info) throws DAOException {
-        logger.debug("查询代理商证件信息 入参 info : {}",info);
-
-        List<Map> agentCerdentialses = sqlSessionTemplate.selectList("agentServiceDaoImpl.getAgentCerdentials",info);
-
-        return agentCerdentialses;
-    }
-
-    /**
-     * 查询代理商用户信息(instance 过程)
-     * @param info bId 信息
-     * @return 代理商照片
-     * @throws DAOException
-     */
-    public List<Map> getAgentUser(Map info) throws DAOException{
-        logger.debug("查询代理商用户信息 入参 info : {}",info);
-
-        List<Map> agentUsers = sqlSessionTemplate.selectList("agentServiceDaoImpl.getAgentUser",info);
-
-        return agentUsers;
-    }
-
-    public List<Map> getAgentFee(Map info) throws DAOException{
-        logger.debug("查询代理商费用信息 入参 info : {}",info);
-        List<Map> agentFees = sqlSessionTemplate.selectList("agentServiceDaoImpl.getAgentFee",info);
-        return agentFees;
-    }
-
-    /**
-     * 修改代理商信息
-     * @param info 修改信息
-     * @throws DAOException
-     */
-    @Override
-    public void updateAgentInfoInstance(Map info) throws DAOException {
-        logger.debug("修改代理商信息Instance 入参 info : {}",info);
-
-        int saveFlag = sqlSessionTemplate.update("agentServiceDaoImpl.updateAgentInfoInstance",info);
-
-        if(saveFlag < 1){
-            throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR,"修改代理商信息Instance数据失败:"+ JSONObject.toJSONString(info));
-        }
-    }
-
-    /**
-     * 修改代理商属性信息(instance)
-     * @param info 修改信息
-     * @throws DAOException
-     */
-    @Override
-    public void updateAgentAttrInstance(Map info) throws DAOException {
-        logger.debug("修改代理商属性信息Instance 入参 info : {}",info);
-
-        int saveFlag = sqlSessionTemplate.update("agentServiceDaoImpl.updateAgentAttrInstance",info);
-
-        if(saveFlag < 1){
-            throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR,"修改代理商属性信息Instance数据失败:"+ JSONObject.toJSONString(info));
-        }
-    }
-
-    /**
-     * 修改住户信息
-     * @param info 修改信息
-     * @throws DAOException
-     */
-    public void updateAgentHouseInstance(Map info) throws DAOException{
-        logger.debug("修改住户信息Instance 入参 info : {}",info);
-
-        int saveFlag = sqlSessionTemplate.update("agentServiceDaoImpl.updateAgentHouseInstance",info);
-
-        if(saveFlag < 1){
-            throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR,"修改住户信息Instance数据失败:"+ JSONObject.toJSONString(info));
-        }
-    }
-
-
-    /**
-     * 修改住户属性信息
-     * @param info 修改信息
-     * @throws DAOException
-     */
-    public void updateAgentHouseAttrInstance(Map info) throws DAOException{
-        logger.debug("修改住户属性信息Instance 入参 info : {}",info);
-
-        int saveFlag = sqlSessionTemplate.update("agentServiceDaoImpl.updateAgentHouseAttrInstance",info);
-
-        if(saveFlag < 1){
-            throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR,"修改住户属性信息Instance数据失败:"+ JSONObject.toJSONString(info));
-        }
-    }
-
-    /**
-     * 修改 代理商照片信息
-     * @param info 修改信息
-     * @throws DAOException
-     */
-    @Override
-    public void updateAgentPhotoInstance(Map info) throws DAOException {
-        logger.debug("修改代理商照片信息Instance 入参 info : {}",info);
-
-        int saveFlag = sqlSessionTemplate.update("agentServiceDaoImpl.updateAgentPhotoInstance",info);
-
-        if(saveFlag < 1){
-            throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR,"修改代理商照片信息Instance数据失败:"+ JSONObject.toJSONString(info));
-        }
-    }
-
-    /**
-     * 修改代理商证件信息
-     * @param info 修改信息
-     * @throws DAOException
-     */
-    @Override
-    public void updateAgentCerdentailsInstance(Map info) throws DAOException {
-        logger.debug("修改代理商证件信息Instance 入参 info : {}",info);
-
-        int saveFlag = sqlSessionTemplate.update("agentServiceDaoImpl.updateAgentCerdentailsInstance",info);
-
-        if(saveFlag < 1){
-            throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR,"修改代理商证件信息Instance数据失败:"+ JSONObject.toJSONString(info));
-        }
-    }
-
-    /**
-     * 修改代理商用户信息
-     * @param info 修改信息
-     * @throws DAOException
-     */
-    public void updateAgentUserInstance(Map info) throws DAOException{
-        logger.debug("修改代理商用户信息Instance 入参 info : {}",info);
-
-        int saveFlag = sqlSessionTemplate.update("agentServiceDaoImpl.updateAgentUserInstance",info);
-
-        if(saveFlag < 1){
-            throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR,"修改代理商用户信息Instance数据失败:"+ JSONObject.toJSONString(info));
-        }
-    }
-
-
-
-    /**
-     * 修改代理商费用信息
-     * @param info 修改信息
-     * @throws DAOException
-     */
-    public void updateAgentFeeInstance(Map info) throws DAOException{
-        logger.debug("修改代理商费用信息Instance 入参 info : {}",info);
-
-        int saveFlag = sqlSessionTemplate.update("agentServiceDaoImpl.updateAgentFeeInstance",info);
-
-        if(saveFlag < 1){
-            throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR,"修改代理商费用信息Instance数据失败:"+ JSONObject.toJSONString(info));
-        }
-    }
-
-}

+ 0 - 16
AgentService/src/main/java/com/java110/agent/kafka/AgentServiceBean.java

@@ -1,16 +0,0 @@
-package com.java110.agent.kafka;
-
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Configuration;
-
-/**
- * Created by wuxw on 2018/4/15.
- */
-@Configuration
-public class AgentServiceBean {
-    @Bean
-    public AgentServiceKafka listener() {
-        return new AgentServiceKafka();
-    }
-
-}

+ 0 - 91
AgentService/src/main/java/com/java110/agent/kafka/AgentServiceKafka.java

@@ -1,91 +0,0 @@
-package com.java110.agent.kafka;
-
-import com.alibaba.fastjson.JSONObject;
-import com.java110.common.constant.KafkaConstant;
-import com.java110.common.constant.ResponseConstant;
-import com.java110.common.constant.StatusConstant;
-import com.java110.common.exception.InitConfigDataException;
-import com.java110.common.exception.InitDataFlowContextException;
-import com.java110.common.kafka.KafkaFactory;
-import com.java110.core.base.controller.BaseController;
-import com.java110.core.context.BusinessServiceDataFlow;
-import com.java110.core.factory.DataTransactionFactory;
-import com.java110.agent.smo.IAgentServiceSMO;
-import org.apache.kafka.clients.consumer.ConsumerRecord;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.kafka.annotation.KafkaListener;
-
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * kafka侦听
- * Created by wuxw on 2018/4/15.
- */
-public class AgentServiceKafka extends BaseController {
-
-    private final static Logger logger = LoggerFactory.getLogger(AgentServiceKafka.class);
-
-    @Autowired
-    private IAgentServiceSMO agentServiceSMOImpl;
-
-    @KafkaListener(topics = {"agentServiceTopic"})
-    public void listen(ConsumerRecord<?, ?> record) {
-        logger.info("kafka的key: " + record.key());
-        logger.info("kafka的value: " + record.value().toString());
-        String orderInfo = record.value().toString();
-        BusinessServiceDataFlow businessServiceDataFlow = null;
-        JSONObject responseJson = null;
-        try {
-            Map<String, String> headers = new HashMap<String, String>();
-            //预校验
-            preValiateOrderInfo(orderInfo);
-            businessServiceDataFlow = this.writeDataToDataFlowContext(orderInfo, headers);
-            responseJson = agentServiceSMOImpl.service(businessServiceDataFlow);
-        }catch (InitDataFlowContextException e){
-            logger.error("请求报文错误,初始化 BusinessServiceDataFlow失败"+orderInfo,e);
-            responseJson = DataTransactionFactory.createNoBusinessTypeBusinessResponseJson(orderInfo,ResponseConstant.RESULT_PARAM_ERROR,e.getMessage(),null);
-        }catch (InitConfigDataException e){
-            logger.error("请求报文错误,加载配置信息失败"+orderInfo,e);
-            responseJson = DataTransactionFactory.createNoBusinessTypeBusinessResponseJson(orderInfo,ResponseConstant.RESULT_PARAM_ERROR,e.getMessage(),null);
-        }catch (Exception e){
-            logger.error("请求订单异常",e);
-            responseJson = DataTransactionFactory.createBusinessResponseJson(businessServiceDataFlow,ResponseConstant.RESULT_CODE_ERROR,e.getMessage()+e,
-                    null);
-        }finally {
-            logger.debug("当前请求报文:" + orderInfo +", 当前返回报文:" +responseJson.toJSONString());
-            //只有business 和 instance 过程才做通知消息
-            if(!StatusConstant.REQUEST_BUSINESS_TYPE_BUSINESS.equals(responseJson.getString("businessType"))
-                    && !StatusConstant.REQUEST_BUSINESS_TYPE_INSTANCE.equals(responseJson.getString("businessType"))){
-                return ;
-            }
-            try {
-                KafkaFactory.sendKafkaMessage(KafkaConstant.TOPIC_NOTIFY_CENTER_SERVICE_NAME, "", responseJson.toJSONString());
-            }catch (Exception e){
-                logger.error("用户服务通知centerService失败"+responseJson,e);
-                //这里保存异常信息
-            }
-        }
-    }
-
-
-    /**
-     * 这里预校验,请求报文中不能有 dataFlowId
-     * @param orderInfo
-     */
-    private void preValiateOrderInfo(String orderInfo) {
-       /* if(JSONObject.parseObject(orderInfo).getJSONObject("orders").containsKey("dataFlowId")){
-            throw new BusinessException(ResponseConstant.RESULT_CODE_ERROR,"报文中不能存在dataFlowId节点");
-        }*/
-    }
-
-    public IAgentServiceSMO getAgentServiceSMOImpl() {
-        return agentServiceSMOImpl;
-    }
-
-    public void setAgentServiceSMOImpl(IAgentServiceSMO agentServiceSMOImpl) {
-        this.agentServiceSMOImpl = agentServiceSMOImpl;
-    }
-}

+ 0 - 375
AgentService/src/main/java/com/java110/agent/listener/AbstractAgentBusinessServiceDataFlowListener.java

@@ -1,375 +0,0 @@
-package com.java110.agent.listener;
-
-import com.alibaba.fastjson.JSONObject;
-import com.java110.common.constant.ResponseConstant;
-import com.java110.common.constant.StatusConstant;
-import com.java110.common.exception.ListenerExecuteException;
-import com.java110.entity.center.Business;
-import com.java110.event.service.AbstractBusinessServiceDataFlowListener;
-import com.java110.agent.dao.IAgentServiceDao;
-
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-/**
- *
- * 代理商 服务侦听 父类
- * Created by wuxw on 2018/7/4.
- */
-public abstract class AbstractAgentBusinessServiceDataFlowListener extends AbstractBusinessServiceDataFlowListener{
-
-
-    /**
-     * 获取 DAO工具类
-     * @return
-     */
-    public abstract IAgentServiceDao getAgentServiceDaoImpl();
-
-    /**
-     * 刷新 businessAgentInfo 数据
-     * 主要将 数据库 中字段和 接口传递字段建立关系
-     * @param businessAgentInfo
-     */
-    protected void flushBusinessAgentInfo(Map businessAgentInfo,String statusCd){
-        businessAgentInfo.put("newBId",businessAgentInfo.get("b_id"));
-        businessAgentInfo.put("agentId",businessAgentInfo.get("agent_id"));
-        businessAgentInfo.put("nearbyLandmarks",businessAgentInfo.get("nearby_landmarks"));
-        businessAgentInfo.put("mapX",businessAgentInfo.get("map_x"));
-        businessAgentInfo.put("mapY",businessAgentInfo.get("map_y"));
-        businessAgentInfo.put("statusCd", statusCd);
-    }
-
-    /**
-        刷新 businessAgentAttr 数据
-     * 主要将 数据库 中字段和 接口传递字段建立关系
-     * @param businessAgentAttr
-     * @param statusCd
-     */
-    protected void flushBusinessAgentAttr(Map businessAgentAttr,String statusCd){
-        businessAgentAttr.put("attrId",businessAgentAttr.get("attr_id"));
-        businessAgentAttr.put("specCd",businessAgentAttr.get("spec_cd"));
-        businessAgentAttr.put("agentId",businessAgentAttr.get("agent_id"));
-        businessAgentAttr.put("newBId",businessAgentAttr.get("b_id"));
-        businessAgentAttr.put("statusCd",statusCd);
-    }
-
-    /**
-     * 刷新 businessAgentInfo 数据
-     * 主要将 数据库 中字段和 接口传递字段建立关系
-     * @param businessAgentHouse
-     */
-    protected void flushBusinessAgentHouse(Map businessAgentHouse,String statusCd){
-        businessAgentHouse.put("newBId",businessAgentHouse.get("b_id"));
-        businessAgentHouse.put("agentId",businessAgentHouse.get("agent_id"));
-        businessAgentHouse.put("houseId",businessAgentHouse.get("house_id"));
-        businessAgentHouse.put("houseNum",businessAgentHouse.get("house_num"));
-        businessAgentHouse.put("houseName",businessAgentHouse.get("house_name"));
-        businessAgentHouse.put("housePhone",businessAgentHouse.get("house_phone"));
-        businessAgentHouse.put("houseArea",businessAgentHouse.get("house_area"));
-        businessAgentHouse.put("feeTypeCd",businessAgentHouse.get("fee_type_cd"));
-        businessAgentHouse.put("feePrice",businessAgentHouse.get("fee_price"));
-        businessAgentHouse.put("statusCd", statusCd);
-    }
-
-    /**
-     刷新 businessAgentAttr 数据
-     * 主要将 数据库 中字段和 接口传递字段建立关系
-     * @param businessAgentHouesAttr
-     * @param statusCd
-     */
-    protected void flushBusinessAgentHouseAttr(Map businessAgentHouesAttr,String statusCd){
-        businessAgentHouesAttr.put("attrId",businessAgentHouesAttr.get("attr_id"));
-        businessAgentHouesAttr.put("specCd",businessAgentHouesAttr.get("spec_cd"));
-        businessAgentHouesAttr.put("houseId",businessAgentHouesAttr.get("house_id"));
-        businessAgentHouesAttr.put("newBId",businessAgentHouesAttr.get("b_id"));
-        businessAgentHouesAttr.put("statusCd",statusCd);
-    }
-
-    /**
-     * 刷新 businessAgentPhoto 数据
-     * @param businessAgentPhoto
-     * @param statusCd
-     */
-    protected void flushBusinessAgentPhoto(Map businessAgentPhoto,String statusCd){
-        businessAgentPhoto.put("agentId",businessAgentPhoto.get("agent_id"));
-        businessAgentPhoto.put("agentPhotoId",businessAgentPhoto.get("agent_photo_id"));
-        businessAgentPhoto.put("agentPhotoTypeCd",businessAgentPhoto.get("agent_photo_type_cd"));
-        businessAgentPhoto.put("newBId",businessAgentPhoto.get("b_id"));
-        businessAgentPhoto.put("statusCd",statusCd);
-    }
-
-    /**
-     * 刷新 businessAgentPhoto 数据
-     * @param businessAgentUser
-     * @param statusCd
-     */
-    protected void flushBusinessAgentUser(Map businessAgentUser,String statusCd){
-        businessAgentUser.put("agentId",businessAgentUser.get("agent_id"));
-        businessAgentUser.put("agentUserId",businessAgentUser.get("agent_user_id"));
-        businessAgentUser.put("userId",businessAgentUser.get("user_id"));
-        businessAgentUser.put("relCd",businessAgentUser.get("rel_cd"));
-        businessAgentUser.put("newBId",businessAgentUser.get("b_id"));
-        businessAgentUser.put("statusCd",statusCd);
-    }
-
-
-    /**
-     * 刷新 businessAgentPhoto 数据
-     * @param businessAgentFee
-     * @param statusCd
-     */
-    protected void flushBusinessAgentFee(Map businessAgentFee,String statusCd){
-        businessAgentFee.put("agentId",businessAgentFee.get("agent_id"));
-        businessAgentFee.put("feeId",businessAgentFee.get("fee_id"));
-        businessAgentFee.put("agentId",businessAgentFee.get("agent_id"));
-        businessAgentFee.put("feeTypeCd",businessAgentFee.get("fee_type_cd"));
-
-        businessAgentFee.put("feeMoney",businessAgentFee.get("fee_money"));
-        businessAgentFee.put("feeTime",businessAgentFee.get("fee_time"));
-        businessAgentFee.put("startTime",businessAgentFee.get("start_time"));
-        businessAgentFee.put("endTime",businessAgentFee.get("end_time"));
-        businessAgentFee.put("newBId",businessAgentFee.get("b_id"));
-        businessAgentFee.put("statusCd",statusCd);
-    }
-
-    /**
-     * 刷新 businessAgentCerdentials 数据
-     * @param businessAgentCerdentials
-     * @param statusCd
-     */
-    protected void flushBusinessAgentCredentials(Map businessAgentCerdentials ,String statusCd){
-        businessAgentCerdentials.put("agentId",businessAgentCerdentials.get("agent_id"));
-        businessAgentCerdentials.put("agentCerdentialsId",businessAgentCerdentials.get("agent_cerdentials_id"));
-        businessAgentCerdentials.put("credentialsCd",businessAgentCerdentials.get("credentials_cd"));
-        businessAgentCerdentials.put("validityPeriod",businessAgentCerdentials.get("validity_period"));
-        businessAgentCerdentials.put("positivePhoto",businessAgentCerdentials.get("positive_photo"));
-        businessAgentCerdentials.put("negativePhoto",businessAgentCerdentials.get("negative_photo"));
-        businessAgentCerdentials.put("newBId",businessAgentCerdentials.get("b_id"));
-        businessAgentCerdentials.put("statusCd",statusCd);
-    }
-
-
-
-    /**
-     * 刷新 businessMemberAgent 数据
-     * 主要将 数据库 中字段和 接口传递字段建立关系
-     * @param businessMemberAgent
-     */
-    protected void flushBusinessMemberAgent(Map businessMemberAgent,String statusCd){
-        businessMemberAgent.put("newBId",businessMemberAgent.get("b_id"));
-        businessMemberAgent.put("agentId",businessMemberAgent.get("agent_id"));
-        businessMemberAgent.put("memberAgentId",businessMemberAgent.get("member_agent_id"));
-        businessMemberAgent.put("memberId",businessMemberAgent.get("member_id"));
-        businessMemberAgent.put("statusCd", statusCd);
-    }
-
-    /**
-     * 当修改数据时,查询instance表中的数据 自动保存删除数据到business中
-     * @param businessAgent 代理商信息
-     */
-    protected void autoSaveDelBusinessAgent(Business business, JSONObject businessAgent){
-//自动插入DEL
-        Map info = new HashMap();
-        info.put("agentId",businessAgent.getString("agentId"));
-        info.put("statusCd",StatusConstant.STATUS_CD_VALID);
-        Map currentAgentInfo = getAgentServiceDaoImpl().getAgentInfo(info);
-        if(currentAgentInfo == null || currentAgentInfo.isEmpty()){
-            throw new ListenerExecuteException(ResponseConstant.RESULT_PARAM_ERROR,"未找到需要修改数据信息,入参错误或数据有问题,请检查"+info);
-        }
-        currentAgentInfo.put("bId",business.getbId());
-        currentAgentInfo.put("agentId",currentAgentInfo.get("agent_id"));
-        currentAgentInfo.put("nearbyLandmarks",currentAgentInfo.get("nearby_landmarks"));
-        currentAgentInfo.put("mapX",currentAgentInfo.get("map_x"));
-        currentAgentInfo.put("mapY",currentAgentInfo.get("map_y"));
-        currentAgentInfo.put("operate",StatusConstant.OPERATE_DEL);
-        getAgentServiceDaoImpl().saveBusinessAgentInfo(currentAgentInfo);
-    }
-
-    /**
-     * 当修改数据时,查询instance表中的数据 自动保存删除数据到business中
-     * @param business 当前业务
-     * @param agentAttr 代理商属性
-     */
-    protected void autoSaveDelBusinessAgentAttr(Business business, JSONObject agentAttr){
-        Map info = new HashMap();
-        info.put("attrId",agentAttr.getString("attrId"));
-        info.put("agentId",agentAttr.getString("agentId"));
-        info.put("statusCd",StatusConstant.STATUS_CD_VALID);
-        List<Map> currentAgentAttrs = getAgentServiceDaoImpl().getAgentAttrs(info);
-        if(currentAgentAttrs == null || currentAgentAttrs.size() != 1){
-            throw new ListenerExecuteException(ResponseConstant.RESULT_PARAM_ERROR,"未找到需要修改数据信息,入参错误或数据有问题,请检查"+info);
-        }
-        Map currentAgentAttr = currentAgentAttrs.get(0);
-        currentAgentAttr.put("bId",business.getbId());
-        currentAgentAttr.put("attrId",currentAgentAttr.get("attr_id"));
-        currentAgentAttr.put("agentId",currentAgentAttr.get("agent_id"));
-        currentAgentAttr.put("specCd",currentAgentAttr.get("spec_cd"));
-        currentAgentAttr.put("operate",StatusConstant.OPERATE_DEL);
-        getAgentServiceDaoImpl().saveBusinessAgentAttr(currentAgentAttr);
-        //这个不允许修改,这里直接写入查出来的
-        agentAttr.put("specCd",currentAgentAttr.get("spec_cd"));
-    }
-
-    /**
-     * 当修改数据时,查询instance表中的数据 自动保存删除数据到business中
-     * @param businessAgentHouse 代理商信息
-     */
-    protected void autoSaveDelBusinessAgentHouse(Business business, JSONObject businessAgentHouse){
-//自动插入DEL
-        Map info = new HashMap();
-        info.put("houseId",businessAgentHouse.getString("houseId"));
-        info.put("statusCd",StatusConstant.STATUS_CD_VALID);
-        Map currentAgentHouse = getAgentServiceDaoImpl().getAgentHouse(info);
-        if(currentAgentHouse == null || currentAgentHouse.isEmpty()){
-            throw new ListenerExecuteException(ResponseConstant.RESULT_PARAM_ERROR,"未找到需要修改数据信息,入参错误或数据有问题,请检查"+info);
-        }
-        currentAgentHouse.put("bId",business.getbId());
-        currentAgentHouse.put("agentId",currentAgentHouse.get("agent_id"));
-        currentAgentHouse.put("houseId",currentAgentHouse.get("house_id"));
-        currentAgentHouse.put("houseNum",currentAgentHouse.get("house_num"));
-        currentAgentHouse.put("houseName",currentAgentHouse.get("house_name"));
-        currentAgentHouse.put("housePhone",currentAgentHouse.get("house_phone"));
-        currentAgentHouse.put("houseArea",currentAgentHouse.get("house_area"));
-        currentAgentHouse.put("feeTypeCd",currentAgentHouse.get("fee_type_cd"));
-        currentAgentHouse.put("feePrice",currentAgentHouse.get("fee_price"));
-        currentAgentHouse.put("operate",StatusConstant.OPERATE_DEL);
-        getAgentServiceDaoImpl().saveBusinessAgentHouse(currentAgentHouse);
-    }
-
-    /**
-     * 当修改数据时,查询instance表中的数据 自动保存删除数据到business中
-     * @param business 当前业务
-     * @param agentHouseAttr 代理商属性
-     */
-    protected void autoSaveDelBusinessAgentHouseAttr(Business business, JSONObject agentHouseAttr){
-        Map info = new HashMap();
-        info.put("attrId",agentHouseAttr.getString("attrId"));
-        info.put("houseId",agentHouseAttr.getString("houseId"));
-        info.put("statusCd",StatusConstant.STATUS_CD_VALID);
-        List<Map> currentAgentHouseAttrs = getAgentServiceDaoImpl().getAgentHouseAttrs(info);
-        if(currentAgentHouseAttrs == null || currentAgentHouseAttrs.size() != 1){
-            throw new ListenerExecuteException(ResponseConstant.RESULT_PARAM_ERROR,"未找到需要修改数据信息,入参错误或数据有问题,请检查"+info);
-        }
-        Map currentAgentHouseAttr = currentAgentHouseAttrs.get(0);
-        currentAgentHouseAttr.put("bId",business.getbId());
-        currentAgentHouseAttr.put("attrId",currentAgentHouseAttr.get("attr_id"));
-        currentAgentHouseAttr.put("houseId",currentAgentHouseAttr.get("house_id"));
-        currentAgentHouseAttr.put("specCd",currentAgentHouseAttr.get("spec_cd"));
-        currentAgentHouseAttr.put("operate",StatusConstant.OPERATE_DEL);
-        getAgentServiceDaoImpl().saveBusinessAgentHouseAttr(currentAgentHouseAttr);
-        //这个不允许修改,这里直接写入查出来的
-        agentHouseAttr.put("specCd",currentAgentHouseAttr.get("spec_cd"));
-    }
-
-    /**
-     * 当修改数据时,查询instance表中的数据 自动保存删除数据到business中
-     * @param business
-     * @param businessAgentPhoto 代理商照片
-     */
-    protected void autoSaveDelBusinessAgentPhoto(Business business,JSONObject businessAgentPhoto){
-       Map info = new HashMap();
-        info.put("agentPhotoId",businessAgentPhoto.getString("agentPhotoId"));
-        info.put("agentId",businessAgentPhoto.getString("agentId"));
-        info.put("statusCd",StatusConstant.STATUS_CD_VALID);
-        List<Map> currentAgentPhotos = getAgentServiceDaoImpl().getAgentPhoto(info);
-        if(currentAgentPhotos == null || currentAgentPhotos.size() != 1){
-            throw new ListenerExecuteException(ResponseConstant.RESULT_PARAM_ERROR,"未找到需要修改数据信息,入参错误或数据有问题,请检查"+info);
-        }
-        Map currentAgentPhoto = currentAgentPhotos.get(0);
-        currentAgentPhoto.put("bId",business.getbId());
-        currentAgentPhoto.put("agentPhotoId",currentAgentPhoto.get("agent_photo_id"));
-        currentAgentPhoto.put("agentId",currentAgentPhoto.get("agent_id"));
-        currentAgentPhoto.put("agentPhotoTypeCd",currentAgentPhoto.get("agent_photo_type_cd"));
-        currentAgentPhoto.put("operate",StatusConstant.OPERATE_DEL);
-        getAgentServiceDaoImpl().saveBusinessAgentPhoto(currentAgentPhoto);
-    }
-
-    /**
-     * 当修改数据时,查询instance表中的数据 自动保存删除数据到business中
-     * @param business
-     * @param businessAgentUser 代理商用户
-     */
-    protected void autoSaveDelBusinessAgentUser(Business business,JSONObject businessAgentUser){
-        Map info = new HashMap();
-        info.put("agentUserId",businessAgentUser.getString("agentUserId"));
-        info.put("agentId",businessAgentUser.getString("agentId"));
-        info.put("statusCd",StatusConstant.STATUS_CD_VALID);
-        List<Map> currentAgentUsers = getAgentServiceDaoImpl().getAgentUser(info);
-        if(currentAgentUsers == null || currentAgentUsers.size() != 1){
-            throw new ListenerExecuteException(ResponseConstant.RESULT_PARAM_ERROR,"未找到需要修改数据信息,入参错误或数据有问题,请检查"+info);
-        }
-        Map currentAgentUser = currentAgentUsers.get(0);
-        currentAgentUser.put("bId",business.getbId());
-        currentAgentUser.put("agentUserId",currentAgentUser.get("agent_user_id"));
-        currentAgentUser.put("agentId",currentAgentUser.get("agent_id"));
-        currentAgentUser.put("userId",currentAgentUser.get("user_id"));
-        currentAgentUser.put("relCd",currentAgentUser.get("rel_cd"));
-        currentAgentUser.put("operate",StatusConstant.OPERATE_DEL);
-        getAgentServiceDaoImpl().saveBusinessAgentUser(currentAgentUser);
-    }
-
-    /**
-     * 当修改数据时,查询instance表中的数据 自动保存删除数据到business中
-     * @param business
-     * @param businessAgentFee 代理商费用
-     */
-    protected void autoSaveDelBusinessAgentFee(Business business,JSONObject businessAgentFee){
-        Map info = new HashMap();
-        info.put("feeId",businessAgentFee.getString("feeId"));
-        info.put("agentId",businessAgentFee.getString("agentId"));
-        info.put("statusCd",StatusConstant.STATUS_CD_VALID);
-        List<Map> currentAgentFees = getAgentServiceDaoImpl().getAgentFee(info);
-        if(currentAgentFees == null || currentAgentFees.size() != 1){
-            throw new ListenerExecuteException(ResponseConstant.RESULT_PARAM_ERROR,"未找到需要修改数据信息,入参错误或数据有问题,请检查"+info);
-        }
-        Map currentAgentFee = currentAgentFees.get(0);
-        currentAgentFee.put("bId",business.getbId());
-        currentAgentFee.put("feeId",currentAgentFee.get("fee_id"));
-        currentAgentFee.put("agentId",currentAgentFee.get("agent_id"));
-        currentAgentFee.put("feeTypeCd",currentAgentFee.get("fee_type_cd"));
-
-        currentAgentFee.put("feeMoney",currentAgentFee.get("fee_money"));
-        currentAgentFee.put("feeTime",currentAgentFee.get("fee_time"));
-        currentAgentFee.put("startTime",currentAgentFee.get("start_time"));
-        currentAgentFee.put("endTime",currentAgentFee.get("end_time"));
-        currentAgentFee.put("operate",StatusConstant.OPERATE_DEL);
-        getAgentServiceDaoImpl().saveBusinessAgentFee(currentAgentFee);
-
-        businessAgentFee.put("feeTypeCd",currentAgentFee.get("fee_type_cd"));
-    }
-
-
-    /**
-     * 当修改数据时,查询instance表中的数据 自动保存删除数据到business中
-     * @param business
-     * @param businessAgentCerdentials 代理商证件
-     */
-    protected void autoSaveDelBusinessAgentCerdentials(Business business,JSONObject businessAgentCerdentials){
-        Map info = new HashMap();
-        info.put("agentCerdentialsId",businessAgentCerdentials.getString("agentCerdentialsId"));
-        info.put("agentId",businessAgentCerdentials.getString("agentId"));
-        info.put("statusCd",StatusConstant.STATUS_CD_VALID);
-        List<Map> currentAgentCerdentailses = getAgentServiceDaoImpl().getAgentCerdentials(info);
-        if(currentAgentCerdentailses == null || currentAgentCerdentailses.size() != 1){
-            throw new ListenerExecuteException(ResponseConstant.RESULT_PARAM_ERROR,"未找到需要修改数据信息,入参错误或数据有问题,请检查"+info);
-        }
-        Map currentAgentCerdentials = currentAgentCerdentailses.get(0);
-
-        currentAgentCerdentials.put("bId",business.getbId());
-        currentAgentCerdentials.put("agentCerdentialsId",currentAgentCerdentials.get("agent_cerdentials_id"));
-        currentAgentCerdentials.put("agentId",currentAgentCerdentials.get("agent_id"));
-        currentAgentCerdentials.put("credentialsCd",currentAgentCerdentials.get("credentials_cd"));
-        currentAgentCerdentials.put("validityPeriod",currentAgentCerdentials.get("validity_period"));
-        currentAgentCerdentials.put("positivePhoto",currentAgentCerdentials.get("positive_photo"));
-        currentAgentCerdentials.put("negativePhoto",currentAgentCerdentials.get("negative_photo"));
-        currentAgentCerdentials.put("operate",StatusConstant.OPERATE_DEL);
-        getAgentServiceDaoImpl().saveBusinessAgentCerdentials(currentAgentCerdentials);
-
-        //证件类型不让修改
-        businessAgentCerdentials.put("credentialsCd",currentAgentCerdentials.get("credentials_cd"));
-    }
-
-
-
-}

+ 0 - 153
AgentService/src/main/java/com/java110/agent/listener/DeleteAgentAttrListener.java

@@ -1,153 +0,0 @@
-package com.java110.agent.listener;
-
-import com.alibaba.fastjson.JSONArray;
-import com.alibaba.fastjson.JSONObject;
-import com.java110.agent.dao.IAgentServiceDao;
-import com.java110.common.constant.BusinessTypeConstant;
-import com.java110.common.constant.ResponseConstant;
-import com.java110.common.constant.StatusConstant;
-import com.java110.common.exception.ListenerExecuteException;
-import com.java110.common.util.Assert;
-import com.java110.core.annotation.Java110Listener;
-import com.java110.core.context.DataFlowContext;
-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;
-
-/**
- * 删除代理商信息 侦听
- *
- * 处理节点
- * 1、businessAgentHouse:{} 代理商住户信息节点
- * 2、businessAgentAttr:[{}] 代理商属性信息节点
- * Created by wuxw on 2018/5/18.
- */
-@Java110Listener("deleteAgentAttrListener")
-@Transactional
-public class DeleteAgentAttrListener extends AbstractAgentBusinessServiceDataFlowListener {
-
-    private final static Logger logger = LoggerFactory.getLogger(DeleteAgentAttrListener.class);
-    @Autowired
-    IAgentServiceDao agentServiceDaoImpl;
-
-    @Override
-    public int getOrder() {
-        return 3;
-    }
-
-    @Override
-    public String getBusinessTypeCd() {
-        return BusinessTypeConstant.BUSINESS_TYPE_DELETE_AGENT_ATTR;
-    }
-
-    /**
-     * 根据删除信息 查出Instance表中数据 保存至business表 (状态写DEL) 方便撤单时直接更新回去
-     * @param dataFlowContext 数据对象
-     * @param business 当前业务对象
-     */
-    @Override
-    protected void doSaveBusiness(DataFlowContext dataFlowContext, Business business) {
-        JSONObject data = business.getDatas();
-
-        Assert.notEmpty(data,"没有datas 节点,或没有子节点需要处理");
-
-        if(data.containsKey("businessAgentAttr")){
-            JSONArray businessAgentAttrs = data.getJSONArray("businessAgentAttr");
-            doSaveBusinessAgentAttrs(business,businessAgentAttrs);
-        }
-    }
-
-    /**
-     * 删除 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> businessAgentAttrs = agentServiceDaoImpl.getBusinessAgentAttrs(info);
-        if(businessAgentAttrs != null && businessAgentAttrs.size() > 0) {
-            for(Map businessAgentAttr : businessAgentAttrs) {
-                flushBusinessAgentAttr(businessAgentAttr,StatusConstant.STATUS_CD_INVALID);
-                agentServiceDaoImpl.updateAgentAttrInstance(businessAgentAttr);
-            }
-        }
-    }
-
-    /**
-     * 撤单
-     * 从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> agentAttrs = agentServiceDaoImpl.getAgentAttrs(info);
-        if(agentAttrs != null && agentAttrs.size()>0){
-
-            List<Map> businessAgentAttrs = agentServiceDaoImpl.getBusinessAgentAttrs(delInfo);
-            //除非程序出错了,这里不会为空
-            if(businessAgentAttrs == null || businessAgentAttrs.size() ==0 ){
-                throw new ListenerExecuteException(ResponseConstant.RESULT_CODE_INNER_ERROR,"撤单失败(agent_attr),程序内部异常,请检查! "+delInfo);
-            }
-            for(Map businessAgentAttr : businessAgentAttrs) {
-                flushBusinessAgentAttr(businessAgentAttr,StatusConstant.STATUS_CD_VALID);
-                agentServiceDaoImpl.updateAgentAttrInstance(businessAgentAttr);
-            }
-        }
-    }
-
-
-
-    /**
-     * 保存代理商属性信息
-     * @param business 当前业务
-     * @param businessAgentAttrs 代理商属性
-     */
-    private void doSaveBusinessAgentAttrs(Business business,JSONArray businessAgentAttrs){
-        JSONObject data = business.getDatas();
-
-        for(int agentAttrIndex = 0 ; agentAttrIndex < businessAgentAttrs.size();agentAttrIndex ++){
-            JSONObject agentAttr = businessAgentAttrs.getJSONObject(agentAttrIndex);
-            Assert.jsonObjectHaveKey(agentAttr,"attrId","businessAgentAttr 节点下没有包含 attrId 节点");
-            if(agentAttr.getString("attrId").startsWith("-")){
-                throw new ListenerExecuteException(ResponseConstant.RESULT_PARAM_ERROR,"attrId 错误,不能自动生成(必须已经存在的attrId)"+agentAttr);
-            }
-
-            autoSaveDelBusinessAgentAttr(business,agentAttr);
-        }
-    }
-
-    public IAgentServiceDao getAgentServiceDaoImpl() {
-        return agentServiceDaoImpl;
-    }
-
-    public void setAgentServiceDaoImpl(IAgentServiceDao agentServiceDaoImpl) {
-        this.agentServiceDaoImpl = agentServiceDaoImpl;
-    }
-}

+ 0 - 156
AgentService/src/main/java/com/java110/agent/listener/DeleteAgentCerdentialsListener.java

@@ -1,156 +0,0 @@
-package com.java110.agent.listener;
-
-import com.alibaba.fastjson.JSONArray;
-import com.alibaba.fastjson.JSONObject;
-import com.java110.agent.dao.IAgentServiceDao;
-import com.java110.common.constant.BusinessTypeConstant;
-import com.java110.common.constant.ResponseConstant;
-import com.java110.common.constant.StatusConstant;
-import com.java110.common.exception.ListenerExecuteException;
-import com.java110.common.util.Assert;
-import com.java110.core.annotation.Java110Listener;
-import com.java110.core.context.DataFlowContext;
-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;
-
-/**
- * 删除代理商信息 侦听
- *
- * 处理节点
- * 1、businessAgent:{} 代理商基本信息节点
- * 2、businessAgentAttr:[{}] 代理商属性信息节点
- * 3、businessAgentPhoto:[{}] 代理商照片信息节点
- * 4、businessAgentCerdentials:[{}] 代理商证件信息节点
- * 协议地址 :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("deleteAgentCerdentialsListener")
-@Transactional
-public class DeleteAgentCerdentialsListener extends AbstractAgentBusinessServiceDataFlowListener {
-
-    private final static Logger logger = LoggerFactory.getLogger(DeleteAgentCerdentialsListener.class);
-    @Autowired
-    IAgentServiceDao agentServiceDaoImpl;
-
-    @Override
-    public int getOrder() {
-        return 3;
-    }
-
-    @Override
-    public String getBusinessTypeCd() {
-        return BusinessTypeConstant.BUSINESS_TYPE_DELETE_AGENT_CERDENTIALS;
-    }
-
-    /**
-     * 根据删除信息 查出Instance表中数据 保存至business表 (状态写DEL) 方便撤单时直接更新回去
-     * @param dataFlowContext 数据对象
-     * @param business 当前业务对象
-     */
-    @Override
-    protected void doSaveBusiness(DataFlowContext dataFlowContext, Business business) {
-        JSONObject data = business.getDatas();
-
-        Assert.notEmpty(data,"没有datas 节点,或没有子节点需要处理");
-
-        if(data.containsKey("businessAgentCerdentials")){
-            JSONArray businessAgentCerdentialses = data.getJSONArray("businessAgentCerdentials");
-            doBusinessAgentCerdentials(business,businessAgentCerdentialses);
-        }
-    }
-
-    /**
-     * 删除 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> businessAgentCerdentialses = agentServiceDaoImpl.getBusinessAgentCerdentials(info);
-        if(businessAgentCerdentialses != null && businessAgentCerdentialses.size()>0){
-            for(Map businessAgentCerdentials : businessAgentCerdentialses) {
-                flushBusinessAgentCredentials(businessAgentCerdentials,StatusConstant.STATUS_CD_INVALID);
-                agentServiceDaoImpl.updateAgentCerdentailsInstance(businessAgentCerdentials);
-            }
-        }
-    }
-
-    /**
-     * 撤单
-     * 从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> agentCerdentialses = agentServiceDaoImpl.getAgentCerdentials(info);
-        if(agentCerdentialses != null && agentCerdentialses.size()>0){
-            List<Map> businessAgentCerdentialses = agentServiceDaoImpl.getBusinessAgentCerdentials(delInfo);
-            //除非程序出错了,这里不会为空
-            if(businessAgentCerdentialses == null || businessAgentCerdentialses.size() ==0 ){
-                throw new ListenerExecuteException(ResponseConstant.RESULT_CODE_INNER_ERROR,"撤单失败(agent_cerdentials),程序内部异常,请检查! "+delInfo);
-            }
-            for(Map businessAgentCerdentials : businessAgentCerdentialses) {
-                flushBusinessAgentCredentials(businessAgentCerdentials,StatusConstant.STATUS_CD_VALID);
-                agentServiceDaoImpl.updateAgentCerdentailsInstance(businessAgentCerdentials);
-            }
-        }
-    }
-
-
-
-    /**
-     * 保存 代理商证件 信息
-     * @param business 当前业务
-     * @param businessAgentCerdentialses 代理商证件
-     */
-    private void doBusinessAgentCerdentials(Business business, JSONArray businessAgentCerdentialses) {
-
-
-        for(int businessAgentCerdentialsIndex = 0 ; businessAgentCerdentialsIndex < businessAgentCerdentialses.size() ; businessAgentCerdentialsIndex ++) {
-            JSONObject businessAgentCerdentials = businessAgentCerdentialses.getJSONObject(businessAgentCerdentialsIndex);
-            Assert.jsonObjectHaveKey(businessAgentCerdentials, "agentCerdentialsId", "businessAgentPhoto 节点下没有包含 agentCerdentialsId 节点");
-
-            if (businessAgentCerdentials.getString("agentCerdentialsId").startsWith("-")) {
-                throw new ListenerExecuteException(ResponseConstant.RESULT_PARAM_ERROR,"agentPhotoId 错误,不能自动生成(必须已经存在的agentPhotoId)"+businessAgentCerdentials);
-            }
-
-            autoSaveDelBusinessAgentCerdentials(business,businessAgentCerdentials);
-        }
-    }
-
-    public IAgentServiceDao getAgentServiceDaoImpl() {
-        return agentServiceDaoImpl;
-    }
-
-    public void setAgentServiceDaoImpl(IAgentServiceDao agentServiceDaoImpl) {
-        this.agentServiceDaoImpl = agentServiceDaoImpl;
-    }
-}

+ 0 - 149
AgentService/src/main/java/com/java110/agent/listener/DeleteAgentPhotoListener.java

@@ -1,149 +0,0 @@
-package com.java110.agent.listener;
-
-import com.alibaba.fastjson.JSONArray;
-import com.alibaba.fastjson.JSONObject;
-import com.java110.common.constant.BusinessTypeConstant;
-import com.java110.common.constant.ResponseConstant;
-import com.java110.common.constant.ServiceCodeConstant;
-import com.java110.common.constant.StatusConstant;
-import com.java110.common.exception.ListenerExecuteException;
-import com.java110.common.util.Assert;
-import com.java110.core.annotation.Java110Listener;
-import com.java110.core.context.DataFlowContext;
-import com.java110.entity.center.Business;
-import com.java110.agent.dao.IAgentServiceDao;
-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;
-
-/**
- * 删除代理商信息 侦听
- *
- * 处理节点
- * 3、businessAgentPhoto:[{}] 代理商照片信息节点
- * Created by wuxw on 2018/5/18.
- */
-@Java110Listener("deleteAgentPhotoListener")
-@Transactional
-public class DeleteAgentPhotoListener extends AbstractAgentBusinessServiceDataFlowListener {
-
-    private final static Logger logger = LoggerFactory.getLogger(DeleteAgentPhotoListener.class);
-    @Autowired
-    IAgentServiceDao agentServiceDaoImpl;
-
-    @Override
-    public int getOrder() {
-        return 3;
-    }
-
-    @Override
-    public String getBusinessTypeCd() {
-        return BusinessTypeConstant.BUSINESS_TYPE_DELETE_AGENT_PHOTO;
-    }
-
-    /**
-     * 根据删除信息 查出Instance表中数据 保存至business表 (状态写DEL) 方便撤单时直接更新回去
-     * @param dataFlowContext 数据对象
-     * @param business 当前业务对象
-     */
-    @Override
-    protected void doSaveBusiness(DataFlowContext dataFlowContext, Business business) {
-        JSONObject data = business.getDatas();
-
-        Assert.notEmpty(data,"没有datas 节点,或没有子节点需要处理");
-        if(data.containsKey("businessAgentPhoto")){
-            JSONArray businessAgentPhotos = data.getJSONArray("businessAgentPhoto");
-            doBusinessAgentPhoto(business,businessAgentPhotos);
-        }
-    }
-
-    /**
-     * 删除 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> businessAgentPhotos = agentServiceDaoImpl.getBusinessAgentPhoto(info);
-        if(businessAgentPhotos != null && businessAgentPhotos.size() >0){
-            for(Map businessAgentPhoto : businessAgentPhotos) {
-                flushBusinessAgentPhoto(businessAgentPhoto,StatusConstant.STATUS_CD_INVALID);
-                agentServiceDaoImpl.updateAgentPhotoInstance(businessAgentPhoto);
-            }
-        }
-    }
-
-    /**
-     * 撤单
-     * 从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> agentPhotos = agentServiceDaoImpl.getAgentPhoto(info);
-        if(agentPhotos != null && agentPhotos.size()>0){
-            List<Map> businessAgentPhotos = agentServiceDaoImpl.getBusinessAgentPhoto(delInfo);
-            //除非程序出错了,这里不会为空
-            if(businessAgentPhotos == null || businessAgentPhotos.size() ==0 ){
-                throw new ListenerExecuteException(ResponseConstant.RESULT_CODE_INNER_ERROR,"撤单失败(agent_photo),程序内部异常,请检查! "+delInfo);
-            }
-            for(Map businessAgentPhoto : businessAgentPhotos) {
-                flushBusinessAgentPhoto(businessAgentPhoto,StatusConstant.STATUS_CD_VALID);
-                agentServiceDaoImpl.updateAgentPhotoInstance(businessAgentPhoto);
-            }
-        }
-
-    }
-
-    /**
-     * 保存代理商照片
-     * @param business 业务对象
-     * @param businessAgentPhotos 代理商照片
-     */
-    private void doBusinessAgentPhoto(Business business, JSONArray businessAgentPhotos) {
-
-        for(int businessAgentPhotoIndex = 0 ;businessAgentPhotoIndex < businessAgentPhotos.size();businessAgentPhotoIndex++) {
-            JSONObject businessAgentPhoto = businessAgentPhotos.getJSONObject(businessAgentPhotoIndex);
-            Assert.jsonObjectHaveKey(businessAgentPhoto, "agentPhotoId", "businessAgentPhoto 节点下没有包含 agentPhotoId 节点");
-
-            if (businessAgentPhoto.getString("agentPhotoId").startsWith("-")) {
-                throw new ListenerExecuteException(ResponseConstant.RESULT_PARAM_ERROR,"agentPhotoId 错误,不能自动生成(必须已经存在的agentPhotoId)"+businessAgentPhoto);
-            }
-
-            autoSaveDelBusinessAgentPhoto(business,businessAgentPhoto);
-        }
-    }
-
-    public IAgentServiceDao getAgentServiceDaoImpl() {
-        return agentServiceDaoImpl;
-    }
-
-    public void setAgentServiceDaoImpl(IAgentServiceDao agentServiceDaoImpl) {
-        this.agentServiceDaoImpl = agentServiceDaoImpl;
-    }
-}

+ 0 - 152
AgentService/src/main/java/com/java110/agent/listener/DeleteAgentUserListener.java

@@ -1,152 +0,0 @@
-package com.java110.agent.listener;
-
-import com.alibaba.fastjson.JSONArray;
-import com.alibaba.fastjson.JSONObject;
-import com.java110.agent.dao.IAgentServiceDao;
-import com.java110.common.constant.BusinessTypeConstant;
-import com.java110.common.constant.ResponseConstant;
-import com.java110.common.constant.StatusConstant;
-import com.java110.common.exception.ListenerExecuteException;
-import com.java110.common.util.Assert;
-import com.java110.core.annotation.Java110Listener;
-import com.java110.core.context.DataFlowContext;
-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;
-
-/**
- * 删除代理商信息 侦听
- *
- * 处理节点
- * 3、businessAgentUser:[{}] 代理商照片信息节点
- * Created by wuxw on 2018/5/18.
- */
-@Java110Listener("deleteAgentUserListener")
-@Transactional
-public class DeleteAgentUserListener extends AbstractAgentBusinessServiceDataFlowListener {
-
-    private final static Logger logger = LoggerFactory.getLogger(DeleteAgentUserListener.class);
-    @Autowired
-    IAgentServiceDao agentServiceDaoImpl;
-
-    @Override
-    public int getOrder() {
-        return 3;
-    }
-
-    @Override
-    public String getBusinessTypeCd() {
-        return BusinessTypeConstant.BUSINESS_TYPE_DELETE_AGENT_USER;
-    }
-
-    /**
-     * 根据删除信息 查出Instance表中数据 保存至business表 (状态写DEL) 方便撤单时直接更新回去
-     * @param dataFlowContext 数据对象
-     * @param business 当前业务对象
-     */
-    @Override
-    protected void doSaveBusiness(DataFlowContext dataFlowContext, Business business) {
-        JSONObject data = business.getDatas();
-
-        Assert.notEmpty(data,"没有datas 节点,或没有子节点需要处理");
-
-        if(data.containsKey("businessAgentUser")){
-            JSONArray businessAgentUsers = data.getJSONArray("businessAgentUser");
-            doBusinessAgentUser(business,businessAgentUsers);
-        }
-
-    }
-
-    /**
-     * 删除 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> businessAgentUsers = agentServiceDaoImpl.getBusinessAgentUser(info);
-        if(businessAgentUsers != null && businessAgentUsers.size() >0){
-            for(Map businessAgentUser : businessAgentUsers) {
-                flushBusinessAgentUser(businessAgentUser,StatusConstant.STATUS_CD_INVALID);
-                agentServiceDaoImpl.updateAgentUserInstance(businessAgentUser);
-            }
-        }
-    }
-
-    /**
-     * 撤单
-     * 从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> agentUsers = agentServiceDaoImpl.getAgentUser(info);
-        if(agentUsers != null && agentUsers.size()>0){
-            List<Map> businessAgentUsers = agentServiceDaoImpl.getBusinessAgentUser(delInfo);
-            //除非程序出错了,这里不会为空
-            if(businessAgentUsers == null || businessAgentUsers.size() ==0 ){
-                throw new ListenerExecuteException(ResponseConstant.RESULT_CODE_INNER_ERROR,"撤单失败(agent_photo),程序内部异常,请检查! "+delInfo);
-            }
-            for(Map businessAgentUser : businessAgentUsers) {
-                flushBusinessAgentUser(businessAgentUser,StatusConstant.STATUS_CD_VALID);
-                agentServiceDaoImpl.updateAgentUserInstance(businessAgentUser);
-            }
-        }
-    }
-
-    /**
-     * 保存代理商照片
-     * @param business 业务对象
-     * @param businessAgentUsers 代理商照片
-     */
-    private void doBusinessAgentUser(Business business, JSONArray businessAgentUsers) {
-
-        for(int businessAgentUserIndex = 0 ;businessAgentUserIndex < businessAgentUsers.size();businessAgentUserIndex++) {
-            JSONObject businessAgentUser = businessAgentUsers.getJSONObject(businessAgentUserIndex);
-            Assert.jsonObjectHaveKey(businessAgentUser, "agentUserId", "businessAgentUser 节点下没有包含 agentUserId 节点");
-
-            if (businessAgentUser.getString("agentUserId").startsWith("-")) {
-                throw new ListenerExecuteException(ResponseConstant.RESULT_PARAM_ERROR,"agentUserId 错误,不能自动生成(必须已经存在的agentUserId)"+businessAgentUser);
-            }
-
-            autoSaveDelBusinessAgentUser(business,businessAgentUser);
-        }
-    }
-
-    public IAgentServiceDao getAgentServiceDaoImpl() {
-        return agentServiceDaoImpl;
-    }
-
-    public void setAgentServiceDaoImpl(IAgentServiceDao agentServiceDaoImpl) {
-        this.agentServiceDaoImpl = agentServiceDaoImpl;
-    }
-}

+ 0 - 151
AgentService/src/main/java/com/java110/agent/listener/SaveAgentCerdentialsListener.java

@@ -1,151 +0,0 @@
-package com.java110.agent.listener;
-
-import com.alibaba.fastjson.JSONArray;
-import com.alibaba.fastjson.JSONObject;
-import com.java110.agent.dao.IAgentServiceDao;
-import com.java110.common.constant.BusinessTypeConstant;
-import com.java110.common.constant.ResponseConstant;
-import com.java110.common.constant.StatusConstant;
-import com.java110.common.exception.ListenerExecuteException;
-import com.java110.common.util.Assert;
-import com.java110.common.util.DateUtil;
-import com.java110.common.util.StringUtil;
-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.text.ParseException;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-/**
- * 保存 用户信息 侦听
- * Created by wuxw on 2018/5/18.
- */
-@Java110Listener("saveAgentCerdentialsListener")
-@Transactional
-public class SaveAgentCerdentialsListener extends AbstractAgentBusinessServiceDataFlowListener {
-
-    private final static Logger logger = LoggerFactory.getLogger(SaveAgentCerdentialsListener.class);
-
-    @Autowired
-    IAgentServiceDao agentServiceDaoImpl;
-
-    @Override
-    public int getOrder() {
-        return 0;
-    }
-
-    @Override
-    public String getBusinessTypeCd() {
-        return BusinessTypeConstant.BUSINESS_TYPE_SAVE_AGENT_CERDENTIALS;
-    }
-
-    /**
-     * 保存代理商信息 business 表中
-     * @param dataFlowContext 数据对象
-     * @param business 当前业务对象
-     */
-    @Override
-    protected void doSaveBusiness(DataFlowContext dataFlowContext, Business business) {
-        JSONObject data = business.getDatas();
-        Assert.notEmpty(data,"没有datas 节点,或没有子节点需要处理");
-
-        if(!data.containsKey("businessAgentCerdentials")){
-            throw new ListenerExecuteException(ResponseConstant.RESULT_PARAM_ERROR,"没有businessAgentCerdentials节点");
-        }
-        JSONArray businessAgentCerdentialses = data.getJSONArray("businessAgentCerdentials");
-        doBusinessAgentCerdentials(business,businessAgentCerdentialses);
-    }
-
-    /**
-     * 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> businessAgentCerdentialses = agentServiceDaoImpl.getBusinessAgentCerdentials(info);
-        if(businessAgentCerdentialses != null && businessAgentCerdentialses.size()>0){
-            agentServiceDaoImpl.saveAgentCerdentialsInstance(info);
-        }
-    }
-
-    /**
-     * 撤单
-     * @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> agentCerdentialses = agentServiceDaoImpl.getAgentCerdentials(info);
-        if(agentCerdentialses != null && agentCerdentialses.size()>0){
-            agentServiceDaoImpl.updateAgentCerdentailsInstance(paramIn);
-        }
-    }
-
-
-    /**
-     * 保存 代理商证件 信息
-     * @param business 当前业务
-     * @param businessAgentCerdentialses 代理商证件
-     */
-    private void doBusinessAgentCerdentials(Business business, JSONArray businessAgentCerdentialses) {
-        for(int businessAgentCerdentialsIndex = 0 ; businessAgentCerdentialsIndex < businessAgentCerdentialses.size() ; businessAgentCerdentialsIndex ++) {
-            JSONObject businessAgentCerdentials = businessAgentCerdentialses.getJSONObject(businessAgentCerdentialsIndex);
-            Assert.jsonObjectHaveKey(businessAgentCerdentials, "agentId", "businessAgentPhoto 节点下没有包含 agentId 节点");
-
-            if (businessAgentCerdentials.getString("agentCerdentialsId").startsWith("-")) {
-                String agentAgentId = GenerateCodeFactory.getAgentCerdentialsId();
-                businessAgentCerdentials.put("agentCerdentialsId", agentAgentId);
-            }
-            Date validityPeriod = null;
-            try {
-                if(StringUtil.isNullOrNone(businessAgentCerdentials.getString("validityPeriod"))){
-                    validityPeriod = DateUtil.getLastDate();
-                }else {
-                    validityPeriod = DateUtil.getDateFromString(businessAgentCerdentials.getString("validityPeriod"), DateUtil.DATE_FORMATE_STRING_B);
-                }
-            } catch (ParseException e) {
-                throw new ListenerExecuteException(ResponseConstant.RESULT_PARAM_ERROR,"传入参数 validityPeriod 格式不正确,请填写 "+DateUtil.DATE_FORMATE_STRING_B +" 格式,"+businessAgentCerdentials);
-            }
-            businessAgentCerdentials.put("validityPeriod",validityPeriod);
-            businessAgentCerdentials.put("bId", business.getbId());
-            businessAgentCerdentials.put("operate", StatusConstant.OPERATE_ADD);
-            //保存代理商信息
-            agentServiceDaoImpl.saveBusinessAgentCerdentials(businessAgentCerdentials);
-        }
-    }
-
-
-    public IAgentServiceDao getAgentServiceDaoImpl() {
-        return agentServiceDaoImpl;
-    }
-
-    public void setAgentServiceDaoImpl(IAgentServiceDao agentServiceDaoImpl) {
-        this.agentServiceDaoImpl = agentServiceDaoImpl;
-    }
-}

+ 0 - 219
AgentService/src/main/java/com/java110/agent/listener/SaveAgentInfoListener.java

@@ -1,219 +0,0 @@
-package com.java110.agent.listener;
-
-import com.alibaba.fastjson.JSONArray;
-import com.alibaba.fastjson.JSONObject;
-import com.java110.agent.dao.IAgentServiceDao;
-import com.java110.common.constant.BusinessTypeConstant;
-import com.java110.common.constant.StatusConstant;
-import com.java110.common.util.Assert;
-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("saveAgentInfoListener")
-@Transactional
-public class SaveAgentInfoListener extends AbstractAgentBusinessServiceDataFlowListener {
-
-    private final static Logger logger = LoggerFactory.getLogger(SaveAgentInfoListener.class);
-
-    @Autowired
-    IAgentServiceDao agentServiceDaoImpl;
-
-    @Override
-    public int getOrder() {
-        return 0;
-    }
-
-    @Override
-    public String getBusinessTypeCd() {
-        return BusinessTypeConstant.BUSINESS_TYPE_SAVE_AGENT_INFO;
-    }
-
-    /**
-     * 保存代理商信息 business 表中
-     * @param dataFlowContext 数据对象
-     * @param business 当前业务对象
-     */
-    @Override
-    protected void doSaveBusiness(DataFlowContext dataFlowContext, Business business) {
-        JSONObject data = business.getDatas();
-        Assert.notEmpty(data,"没有datas 节点,或没有子节点需要处理");
-
-        //处理 businessAgent 节点
-        if(data.containsKey("businessAgent")){
-            JSONObject businessAgent = data.getJSONObject("businessAgent");
-            doBusinessAgent(business,businessAgent);
-            dataFlowContext.addParamOut("agentId",businessAgent.getString("agentId"));
-        }
-
-        if(data.containsKey("businessAgentAttr")){
-            JSONArray businessAgentAttrs = data.getJSONArray("businessAgentAttr");
-            doSaveBusinessAgentAttrs(business,businessAgentAttrs);
-        }
-    }
-
-    /**
-     * 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);
-
-        //代理商信息
-        Map businessAgentInfo = agentServiceDaoImpl.getBusinessAgentInfo(info);
-        if( businessAgentInfo != null && !businessAgentInfo.isEmpty()) {
-            agentServiceDaoImpl.saveAgentInfoInstance(info);
-            dataFlowContext.addParamOut("agentId",businessAgentInfo.get("agent_id"));
-        }
-        //代理商属性
-        List<Map> businessAgentAttrs = agentServiceDaoImpl.getBusinessAgentAttrs(info);
-        if(businessAgentAttrs != null && businessAgentAttrs.size() > 0) {
-            agentServiceDaoImpl.saveAgentAttrsInstance(info);
-        }
-    }
-
-    /**
-     * 撤单
-     * @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);
-        //代理商信息
-        Map agentInfo = agentServiceDaoImpl.getAgentInfo(info);
-        if(agentInfo != null && !agentInfo.isEmpty()){
-            paramIn.put("agentId",agentInfo.get("agent_id").toString());
-            agentServiceDaoImpl.updateAgentInfoInstance(paramIn);
-            dataFlowContext.addParamOut("agentId",agentInfo.get("agent_id"));
-        }
-
-        //代理商属性
-        List<Map> agentAttrs = agentServiceDaoImpl.getAgentAttrs(info);
-        if(agentAttrs != null && agentAttrs.size()>0){
-            agentServiceDaoImpl.updateAgentAttrInstance(paramIn);
-        }
-    }
-
-
-
-    /**
-     * 处理 businessAgent 节点
-     * @param business 总的数据节点
-     * @param businessAgent 代理商节点
-     */
-    private void doBusinessAgent(Business business,JSONObject businessAgent){
-
-        Assert.jsonObjectHaveKey(businessAgent,"agentId","businessAgent 节点下没有包含 agentId 节点");
-
-        if(businessAgent.getString("agentId").startsWith("-")){
-            //刷新缓存
-            flushAgentId(business.getDatas());
-        }
-
-        businessAgent.put("bId",business.getbId());
-        businessAgent.put("operate", StatusConstant.OPERATE_ADD);
-        //保存代理商信息
-        agentServiceDaoImpl.saveBusinessAgentInfo(businessAgent);
-
-    }
-
-
-
-    /**
-     * 保存代理商属性信息
-     * @param business 当前业务
-     * @param businessAgentAttrs 代理商属性
-     */
-    private void doSaveBusinessAgentAttrs(Business business,JSONArray businessAgentAttrs){
-        JSONObject data = business.getDatas();
-        JSONObject businessAgent = data.getJSONObject("businessAgent");
-        for(int agentAttrIndex = 0 ; agentAttrIndex < businessAgentAttrs.size();agentAttrIndex ++){
-            JSONObject agentAttr = businessAgentAttrs.getJSONObject(agentAttrIndex);
-            Assert.jsonObjectHaveKey(agentAttr,"attrId","businessAgentAttr 节点下没有包含 attrId 节点");
-
-            if(agentAttr.getString("attrId").startsWith("-")){
-                String attrId = GenerateCodeFactory.getAttrId();
-                agentAttr.put("attrId",attrId);
-            }
-
-            agentAttr.put("bId",business.getbId());
-            agentAttr.put("agentId",businessAgent.getString("agentId"));
-            agentAttr.put("operate", StatusConstant.OPERATE_ADD);
-
-            agentServiceDaoImpl.saveBusinessAgentAttr(agentAttr);
-        }
-    }
-
-
-
-    /**
-     * 刷新 代理商ID
-     * @param data
-     */
-    private void flushAgentId(JSONObject data) {
-
-        String agentId = GenerateCodeFactory.getAgentId();
-        JSONObject businessAgent = data.getJSONObject("businessAgent");
-        businessAgent.put("agentId",agentId);
-        //刷代理商属性
-        if(data.containsKey("businessAgentAttr")) {
-            JSONArray businessAgentAttrs = data.getJSONArray("businessAgentAttr");
-            for(int businessAgentAttrIndex = 0;businessAgentAttrIndex < businessAgentAttrs.size();businessAgentAttrIndex++) {
-                JSONObject businessAgentAttr = businessAgentAttrs.getJSONObject(businessAgentAttrIndex);
-                businessAgentAttr.put("agentId", agentId);
-            }
-        }
-//        //刷 是代理商照片 的 agentId
-//        if(data.containsKey("businessAgentPhoto")) {
-//            JSONArray businessAgentPhotos = data.getJSONArray("businessAgentPhoto");
-//            for(int businessAgentPhotoIndex = 0;businessAgentPhotoIndex < businessAgentPhotos.size();businessAgentPhotoIndex++) {
-//                JSONObject businessAgentPhoto = businessAgentPhotos.getJSONObject(businessAgentPhotoIndex);
-//                businessAgentPhoto.put("agentId", agentId);
-//            }
-//        }
-//        //刷 代理商证件 的agentId
-//        if(data.containsKey("businessAgentCerdentials")) {
-//            JSONArray businessAgentCerdentialses = data.getJSONArray("businessAgentCerdentials");
-//            for(int businessAgentCerdentialsIndex = 0;businessAgentCerdentialsIndex < businessAgentCerdentialses.size();businessAgentCerdentialsIndex++) {
-//                JSONObject businessAgentCerdentials = businessAgentCerdentialses.getJSONObject(businessAgentCerdentialsIndex);
-//                businessAgentCerdentials.put("agentId", agentId);
-//            }
-//        }
-    }
-
-
-    public IAgentServiceDao getAgentServiceDaoImpl() {
-        return agentServiceDaoImpl;
-    }
-
-    public void setAgentServiceDaoImpl(IAgentServiceDao agentServiceDaoImpl) {
-        this.agentServiceDaoImpl = agentServiceDaoImpl;
-    }
-}

+ 0 - 139
AgentService/src/main/java/com/java110/agent/listener/SaveAgentPhotoListener.java

@@ -1,139 +0,0 @@
-package com.java110.agent.listener;
-
-import com.alibaba.fastjson.JSONArray;
-import com.alibaba.fastjson.JSONObject;
-import com.java110.agent.dao.IAgentServiceDao;
-import com.java110.common.constant.BusinessTypeConstant;
-import com.java110.common.constant.ResponseConstant;
-import com.java110.common.constant.StatusConstant;
-import com.java110.common.exception.ListenerExecuteException;
-import com.java110.common.util.Assert;
-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("saveAgentPhotoListener")
-@Transactional
-public class SaveAgentPhotoListener extends AbstractAgentBusinessServiceDataFlowListener {
-
-    private final static Logger logger = LoggerFactory.getLogger(SaveAgentPhotoListener.class);
-
-    @Autowired
-    IAgentServiceDao agentServiceDaoImpl;
-
-    @Override
-    public int getOrder() {
-        return 0;
-    }
-
-    @Override
-    public String getBusinessTypeCd() {
-        return BusinessTypeConstant.BUSINESS_TYPE_SAVE_AGENT_PHOTO;
-    }
-
-    /**
-     * 保存代理商信息 business 表中
-     * @param dataFlowContext 数据对象
-     * @param business 当前业务对象
-     */
-    @Override
-    protected void doSaveBusiness(DataFlowContext dataFlowContext, Business business) {
-        JSONObject data = business.getDatas();
-        Assert.notEmpty(data,"没有datas 节点,或没有子节点需要处理");
-
-        if(!data.containsKey("businessAgentPhoto")){
-            throw new ListenerExecuteException(ResponseConstant.RESULT_PARAM_ERROR,"没有businessAgentPhoto节点");
-        }
-
-        JSONArray businessAgentPhotos = data.getJSONArray("businessAgentPhoto");
-        doBusinessAgentPhoto(business,businessAgentPhotos);
-    }
-
-    /**
-     * 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> businessAgentPhotos = agentServiceDaoImpl.getBusinessAgentPhoto(info);
-        if(businessAgentPhotos != null && businessAgentPhotos.size() >0){
-            agentServiceDaoImpl.saveAgentPhotoInstance(info);
-        }
-    }
-
-    /**
-     * 撤单
-     * @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> agentPhotos = agentServiceDaoImpl.getAgentPhoto(info);
-        if(agentPhotos != null && agentPhotos.size()>0){
-            agentServiceDaoImpl.updateAgentPhotoInstance(paramIn);
-        }
-    }
-
-    /**
-     * 保存代理商照片
-     * @param business 业务对象
-     * @param businessAgentPhotos 代理商照片
-     */
-    private void doBusinessAgentPhoto(Business business, JSONArray businessAgentPhotos) {
-
-        for(int businessAgentPhotoIndex = 0 ;businessAgentPhotoIndex < businessAgentPhotos.size();businessAgentPhotoIndex++) {
-            JSONObject businessAgentPhoto = businessAgentPhotos.getJSONObject(businessAgentPhotoIndex);
-            Assert.jsonObjectHaveKey(businessAgentPhoto, "agentId", "businessAgentPhoto 节点下没有包含 agentId 节点");
-
-            if (businessAgentPhoto.getString("agentPhotoId").startsWith("-")) {
-                String agentPhotoId = GenerateCodeFactory.getAgentPhotoId();
-                businessAgentPhoto.put("agentPhotoId", agentPhotoId);
-            }
-            businessAgentPhoto.put("bId", business.getbId());
-            businessAgentPhoto.put("operate", StatusConstant.OPERATE_ADD);
-            //保存代理商信息
-            agentServiceDaoImpl.saveBusinessAgentPhoto(businessAgentPhoto);
-        }
-    }
-
-
-
-    public IAgentServiceDao getAgentServiceDaoImpl() {
-        return agentServiceDaoImpl;
-    }
-
-    public void setAgentServiceDaoImpl(IAgentServiceDao agentServiceDaoImpl) {
-        this.agentServiceDaoImpl = agentServiceDaoImpl;
-    }
-}

+ 0 - 244
AgentService/src/main/java/com/java110/agent/listener/SaveAgentUserListener.java

@@ -1,244 +0,0 @@
-package com.java110.agent.listener;
-
-import com.alibaba.fastjson.JSONArray;
-import com.alibaba.fastjson.JSONObject;
-import com.java110.agent.dao.IAgentServiceDao;
-import com.java110.common.constant.BusinessTypeConstant;
-import com.java110.common.constant.ResponseConstant;
-import com.java110.common.constant.StatusConstant;
-import com.java110.common.exception.ListenerExecuteException;
-import com.java110.common.util.Assert;
-import com.java110.common.util.DateUtil;
-import com.java110.common.util.StringUtil;
-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.text.ParseException;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-/**
- * 保存 用户信息 侦听
- * Created by wuxw on 2018/5/18.
- */
-@Java110Listener("saveAgentUserListener")
-@Transactional
-public class SaveAgentUserListener extends AbstractAgentBusinessServiceDataFlowListener {
-
-    private final static Logger logger = LoggerFactory.getLogger(SaveAgentUserListener.class);
-
-    @Autowired
-    IAgentServiceDao agentServiceDaoImpl;
-
-    @Override
-    public int getOrder() {
-        return 0;
-    }
-
-    @Override
-    public String getBusinessTypeCd() {
-        return BusinessTypeConstant.BUSINESS_TYPE_SAVE_AGENT_USER;
-    }
-
-    /**
-     * 保存代理商信息 business 表中
-     * @param dataFlowContext 数据对象
-     * @param business 当前业务对象
-     */
-    @Override
-    protected void doSaveBusiness(DataFlowContext dataFlowContext, Business business) {
-        JSONObject data = business.getDatas();
-        Assert.notEmpty(data,"没有datas 节点,或没有子节点需要处理");
-
-        //处理 businessAgent 节点
-        if(!data.containsKey("businessAgentUser")){
-            throw new ListenerExecuteException(ResponseConstant.RESULT_PARAM_ERROR,"没有businessAgentUser节点");
-        }
-
-
-        JSONArray businessAgentUsers = data.getJSONArray("businessAgentUser");
-        doBusinessAgentUser(business,businessAgentUsers);
-    }
-
-    /**
-     * 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> businessAgentUsers = agentServiceDaoImpl.getBusinessAgentUser(info);
-        if(businessAgentUsers != null && businessAgentUsers.size() >0){
-            agentServiceDaoImpl.saveAgentUserInstance(info);
-        }
-    }
-
-    /**
-     * 撤单
-     * @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> agentUsers = agentServiceDaoImpl.getAgentUser(info);
-        if(agentUsers != null && agentUsers.size()>0){
-            agentServiceDaoImpl.updateAgentUserInstance(paramIn);
-        }
-    }
-
-
-    /**
-     * 处理 businessAgent 节点
-     * @param business 总的数据节点
-     * @param businessAgentUsers 代理商用户节点
-     */
-    private void doBusinessAgentUser(Business business,JSONArray businessAgentUsers){
-
-
-        for(int businessAgentUserIndex = 0 ;businessAgentUserIndex < businessAgentUsers.size();businessAgentUserIndex++) {
-            JSONObject businessAgentUser = businessAgentUsers.getJSONObject(businessAgentUserIndex);
-            Assert.jsonObjectHaveKey(businessAgentUser,"agentId","businessAgentUser 节点下没有包含 agentId 节点");
-            Assert.jsonObjectHaveKey(businessAgentUser,"userId","businessAgentUser 节点下没有包含 userId 节点");
-
-            if(businessAgentUser.getString("agentUserId").startsWith("-")){
-                String agentUserId = GenerateCodeFactory.getAgentUserId();
-                businessAgentUser.put("agentUserId", agentUserId);
-            }
-            businessAgentUser.put("bId",business.getbId());
-            businessAgentUser.put("operate", StatusConstant.OPERATE_ADD);
-            //保存代理商信息
-            agentServiceDaoImpl.saveBusinessAgentUser(businessAgentUser);
-        }
-
-    }
-
-
-
-    /**
-     * 保存代理商属性信息
-     * @param business 当前业务
-     * @param businessAgentAttrs 代理商属性
-     */
-    private void doSaveBusinessAgentAttrs(Business business,JSONArray businessAgentAttrs){
-        JSONObject data = business.getDatas();
-        JSONObject businessAgent = data.getJSONObject("businessAgent");
-        for(int agentAttrIndex = 0 ; agentAttrIndex < businessAgentAttrs.size();agentAttrIndex ++){
-            JSONObject agentAttr = businessAgentAttrs.getJSONObject(agentAttrIndex);
-            Assert.jsonObjectHaveKey(agentAttr,"attrId","businessAgentAttr 节点下没有包含 attrId 节点");
-
-            if(agentAttr.getString("attrId").startsWith("-")){
-                String attrId = GenerateCodeFactory.getAttrId();
-                agentAttr.put("attrId",attrId);
-            }
-
-            agentAttr.put("bId",business.getbId());
-            agentAttr.put("agentId",businessAgent.getString("agentId"));
-            agentAttr.put("operate", StatusConstant.OPERATE_ADD);
-
-            agentServiceDaoImpl.saveBusinessAgentAttr(agentAttr);
-        }
-    }
-
-
-    /**
-     * 保存 代理商证件 信息
-     * @param business 当前业务
-     * @param businessAgentCerdentialses 代理商证件
-     */
-    private void doBusinessAgentCerdentials(Business business, JSONArray businessAgentCerdentialses) {
-        for(int businessAgentCerdentialsIndex = 0 ; businessAgentCerdentialsIndex < businessAgentCerdentialses.size() ; businessAgentCerdentialsIndex ++) {
-            JSONObject businessAgentCerdentials = businessAgentCerdentialses.getJSONObject(businessAgentCerdentialsIndex);
-            Assert.jsonObjectHaveKey(businessAgentCerdentials, "agentId", "businessAgentPhoto 节点下没有包含 agentId 节点");
-
-            if (businessAgentCerdentials.getString("agentCerdentialsId").startsWith("-")) {
-                String agentPhotoId = GenerateCodeFactory.getAgentCerdentialsId();
-                businessAgentCerdentials.put("agentCerdentialsId", agentPhotoId);
-            }
-            Date validityPeriod = null;
-            try {
-                if(StringUtil.isNullOrNone(businessAgentCerdentials.getString("validityPeriod"))){
-                    validityPeriod = DateUtil.getLastDate();
-                }else {
-                    validityPeriod = DateUtil.getDateFromString(businessAgentCerdentials.getString("validityPeriod"), DateUtil.DATE_FORMATE_STRING_B);
-                }
-            } catch (ParseException e) {
-                throw new ListenerExecuteException(ResponseConstant.RESULT_PARAM_ERROR,"传入参数 validityPeriod 格式不正确,请填写 "+DateUtil.DATE_FORMATE_STRING_B +" 格式,"+businessAgentCerdentials);
-            }
-            businessAgentCerdentials.put("validityPeriod",validityPeriod);
-            businessAgentCerdentials.put("bId", business.getbId());
-            businessAgentCerdentials.put("operate", StatusConstant.OPERATE_ADD);
-            //保存代理商信息
-            agentServiceDaoImpl.saveBusinessAgentCerdentials(businessAgentCerdentials);
-        }
-    }
-
-
-
-    /**
-     * 刷新 代理商ID
-     * @param data
-     */
-    private void flushAgentId(JSONObject data) {
-
-        String agentId = GenerateCodeFactory.getAgentId();
-        JSONObject businessAgent = data.getJSONObject("businessAgent");
-        businessAgent.put("agentId",agentId);
-        //刷代理商属性
-        if(data.containsKey("businessAgentAttr")) {
-            JSONArray businessAgentAttrs = data.getJSONArray("businessAgentAttr");
-            for(int businessAgentAttrIndex = 0;businessAgentAttrIndex < businessAgentAttrs.size();businessAgentAttrIndex++) {
-                JSONObject businessAgentAttr = businessAgentAttrs.getJSONObject(businessAgentAttrIndex);
-                businessAgentAttr.put("agentId", agentId);
-            }
-        }
-        //刷 是代理商照片 的 agentId
-        if(data.containsKey("businessAgentPhoto")) {
-            JSONArray businessAgentPhotos = data.getJSONArray("businessAgentPhoto");
-            for(int businessAgentPhotoIndex = 0;businessAgentPhotoIndex < businessAgentPhotos.size();businessAgentPhotoIndex++) {
-                JSONObject businessAgentPhoto = businessAgentPhotos.getJSONObject(businessAgentPhotoIndex);
-                businessAgentPhoto.put("agentId", agentId);
-            }
-        }
-        //刷 代理商证件 的agentId
-        if(data.containsKey("businessAgentCerdentials")) {
-            JSONArray businessAgentCerdentialses = data.getJSONArray("businessAgentCerdentials");
-            for(int businessAgentCerdentialsIndex = 0;businessAgentCerdentialsIndex < businessAgentCerdentialses.size();businessAgentCerdentialsIndex++) {
-                JSONObject businessAgentCerdentials = businessAgentCerdentialses.getJSONObject(businessAgentCerdentialsIndex);
-                businessAgentCerdentials.put("agentId", agentId);
-            }
-        }
-    }
-
-
-    public IAgentServiceDao getAgentServiceDaoImpl() {
-        return agentServiceDaoImpl;
-    }
-
-    public void setAgentServiceDaoImpl(IAgentServiceDao agentServiceDaoImpl) {
-        this.agentServiceDaoImpl = agentServiceDaoImpl;
-    }
-}

+ 0 - 155
AgentService/src/main/java/com/java110/agent/listener/UpdateAgentCerdentialsListener.java

@@ -1,155 +0,0 @@
-package com.java110.agent.listener;
-
-import com.alibaba.fastjson.JSONArray;
-import com.alibaba.fastjson.JSONObject;
-import com.java110.agent.dao.IAgentServiceDao;
-import com.java110.common.constant.BusinessTypeConstant;
-import com.java110.common.constant.ResponseConstant;
-import com.java110.common.constant.StatusConstant;
-import com.java110.common.exception.ListenerExecuteException;
-import com.java110.common.util.Assert;
-import com.java110.core.annotation.Java110Listener;
-import com.java110.core.context.DataFlowContext;
-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;
-
-/**
- * 修改代理商信息 侦听
- *
- * 处理节点
- * 4、businessAgentCerdentials:[{}] 代理商证件信息节点
- * Created by wuxw on 2018/5/18.
- */
-@Java110Listener("updateAgentCerdentialsListener")
-@Transactional
-public class UpdateAgentCerdentialsListener extends AbstractAgentBusinessServiceDataFlowListener {
-
-    private final static Logger logger = LoggerFactory.getLogger(UpdateAgentCerdentialsListener.class);
-    @Autowired
-    IAgentServiceDao agentServiceDaoImpl;
-
-    @Override
-    public int getOrder() {
-        return 2;
-    }
-
-    @Override
-    public String getBusinessTypeCd() {
-        return BusinessTypeConstant.BUSINESS_TYPE_UPDATE_AGENT_CERDENTIALS;
-    }
-
-    /**
-     * business过程
-     * @param dataFlowContext
-     * @param business
-     */
-    @Override
-    protected void doSaveBusiness(DataFlowContext dataFlowContext, Business business) {
-
-        JSONObject data = business.getDatas();
-
-        Assert.notEmpty(data,"没有datas 节点,或没有子节点需要处理");
-
-        if(data.containsKey("businessAgentCerdentials")){
-            JSONArray businessAgentCerdentialses = data.getJSONArray("businessAgentCerdentials");
-            doBusinessAgentCerdentials(business,businessAgentCerdentialses);
-        }
-    }
-
-
-    /**
-     * 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> businessAgentCerdentialses = agentServiceDaoImpl.getBusinessAgentCerdentials(info);
-        if(businessAgentCerdentialses != null && businessAgentCerdentialses.size()>0){
-            for(Map businessAgentCerdentials : businessAgentCerdentialses) {
-                flushBusinessAgentCredentials(businessAgentCerdentials,StatusConstant.STATUS_CD_VALID);
-                agentServiceDaoImpl.updateAgentCerdentailsInstance(businessAgentCerdentials);
-            }
-        }
-    }
-
-    /**
-     * 撤单
-     * @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> agentCerdentialses = agentServiceDaoImpl.getAgentCerdentials(info);
-        if(agentCerdentialses != null && agentCerdentialses.size()>0){
-            List<Map> businessAgentCerdentialses = agentServiceDaoImpl.getBusinessAgentCerdentials(delInfo);
-            //除非程序出错了,这里不会为空
-            if(businessAgentCerdentialses == null || businessAgentCerdentialses.size() ==0 ){
-                throw new ListenerExecuteException(ResponseConstant.RESULT_CODE_INNER_ERROR,"撤单失败(agent_cerdentials),程序内部异常,请检查! "+delInfo);
-            }
-            for(Map businessAgentCerdentials : businessAgentCerdentialses) {
-                flushBusinessAgentCredentials(businessAgentCerdentials,StatusConstant.STATUS_CD_VALID);
-                agentServiceDaoImpl.updateAgentCerdentailsInstance(businessAgentCerdentials);
-            }
-        }
-    }
-
-    /**
-     * 保存 代理商证件 信息
-     * @param business 当前业务
-     * @param businessAgentCerdentialses 代理商证件
-     */
-    private void doBusinessAgentCerdentials(Business business, JSONArray businessAgentCerdentialses) {
-
-        for(int businessAgentCerdentialsIndex = 0 ; businessAgentCerdentialsIndex < businessAgentCerdentialses.size() ; businessAgentCerdentialsIndex ++) {
-            JSONObject businessAgentCerdentials = businessAgentCerdentialses.getJSONObject(businessAgentCerdentialsIndex);
-            Assert.jsonObjectHaveKey(businessAgentCerdentials, "agentId", "businessAgentPhoto 节点下没有包含 agentId 节点");
-
-            if (businessAgentCerdentials.getString("agentCerdentialsId").startsWith("-")) {
-                throw new ListenerExecuteException(ResponseConstant.RESULT_PARAM_ERROR,"agentPhotoId 错误,不能自动生成(必须已经存在的agentCerdentialsId)"+businessAgentCerdentials);
-            }
-
-            autoSaveDelBusinessAgentCerdentials(business,businessAgentCerdentials);
-
-            businessAgentCerdentials.put("bId", business.getbId());
-            businessAgentCerdentials.put("operate", StatusConstant.OPERATE_ADD);
-            //保存代理商信息
-            agentServiceDaoImpl.saveBusinessAgentCerdentials(businessAgentCerdentials);
-        }
-    }
-
-    public IAgentServiceDao getAgentServiceDaoImpl() {
-        return agentServiceDaoImpl;
-    }
-
-    public void setAgentServiceDaoImpl(IAgentServiceDao agentServiceDaoImpl) {
-        this.agentServiceDaoImpl = agentServiceDaoImpl;
-    }
-
-
-
-}

+ 0 - 231
AgentService/src/main/java/com/java110/agent/listener/UpdateAgentInfoListener.java

@@ -1,231 +0,0 @@
-package com.java110.agent.listener;
-
-import com.alibaba.fastjson.JSONArray;
-import com.alibaba.fastjson.JSONObject;
-import com.java110.agent.dao.IAgentServiceDao;
-import com.java110.common.constant.BusinessTypeConstant;
-import com.java110.common.constant.ResponseConstant;
-import com.java110.common.constant.StatusConstant;
-import com.java110.common.exception.ListenerExecuteException;
-import com.java110.common.util.Assert;
-import com.java110.core.annotation.Java110Listener;
-import com.java110.core.context.DataFlowContext;
-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;
-
-/**
- * 修改代理商信息 侦听
- *
- * 处理节点
- * 1、businessAgentInfo:{} 代理商基本信息节点
- * 2、businessAgentAttr:[{}] 代理商属性信息节点
- * Created by wuxw on 2018/5/18.
- */
-@Java110Listener("updateAgentInfoListener")
-@Transactional
-public class UpdateAgentInfoListener extends AbstractAgentBusinessServiceDataFlowListener {
-
-    private final static Logger logger = LoggerFactory.getLogger(UpdateAgentInfoListener.class);
-    @Autowired
-    IAgentServiceDao agentServiceDaoImpl;
-
-    @Override
-    public int getOrder() {
-        return 2;
-    }
-
-    @Override
-    public String getBusinessTypeCd() {
-        return BusinessTypeConstant.BUSINESS_TYPE_UPDATE_AGENT_INFO;
-    }
-
-    /**
-     * business过程
-     * @param dataFlowContext
-     * @param business
-     */
-    @Override
-    protected void doSaveBusiness(DataFlowContext dataFlowContext, Business business) {
-
-        JSONObject data = business.getDatas();
-
-        Assert.notEmpty(data,"没有datas 节点,或没有子节点需要处理");
-
-        //处理 businessAgent 节点
-        if(data.containsKey("businessAgent")){
-            JSONObject businessAgent = data.getJSONObject("businessAgent");
-            doBusinessAgent(business,businessAgent);
-            dataFlowContext.addParamOut("agentId",businessAgent.getString("agentId"));
-        }
-
-        if(data.containsKey("businessAgentAttr")){
-            JSONArray businessAgentAttrs = data.getJSONArray("businessAgentAttr");
-            doSaveBusinessAgentAttrs(business,businessAgentAttrs);
-        }
-    }
-
-
-    /**
-     * 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);
-
-        //代理商信息
-        Map businessAgentInfo = agentServiceDaoImpl.getBusinessAgentInfo(info);
-        if( businessAgentInfo != null && !businessAgentInfo.isEmpty()) {
-            flushBusinessAgentInfo(businessAgentInfo,StatusConstant.STATUS_CD_VALID);
-            agentServiceDaoImpl.updateAgentInfoInstance(businessAgentInfo);
-            dataFlowContext.addParamOut("agentId",businessAgentInfo.get("agent_id"));
-        }
-        //代理商属性
-        List<Map> businessAgentAttrs = agentServiceDaoImpl.getBusinessAgentAttrs(info);
-        if(businessAgentAttrs != null && businessAgentAttrs.size() > 0) {
-            for(Map businessAgentAttr : businessAgentAttrs) {
-                flushBusinessAgentAttr(businessAgentAttr,StatusConstant.STATUS_CD_VALID);
-                agentServiceDaoImpl.updateAgentAttrInstance(businessAgentAttr);
-            }
-        }
-        //代理商照片
-        List<Map> businessAgentPhotos = agentServiceDaoImpl.getBusinessAgentPhoto(info);
-        if(businessAgentPhotos != null && businessAgentPhotos.size() >0){
-            for(Map businessAgentPhoto : businessAgentPhotos) {
-                flushBusinessAgentPhoto(businessAgentPhoto,StatusConstant.STATUS_CD_VALID);
-                agentServiceDaoImpl.updateAgentPhotoInstance(businessAgentPhoto);
-            }
-        }
-        //代理商证件
-        List<Map> businessAgentCerdentialses = agentServiceDaoImpl.getBusinessAgentCerdentials(info);
-        if(businessAgentCerdentialses != null && businessAgentCerdentialses.size()>0){
-            for(Map businessAgentCerdentials : businessAgentCerdentialses) {
-                flushBusinessAgentCredentials(businessAgentCerdentials,StatusConstant.STATUS_CD_VALID);
-                agentServiceDaoImpl.updateAgentCerdentailsInstance(businessAgentCerdentials);
-            }
-        }
-    }
-
-    /**
-     * 撤单
-     * @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);
-        //代理商信息
-        Map agentInfo = agentServiceDaoImpl.getAgentInfo(info);
-        if(agentInfo != null && !agentInfo.isEmpty()){
-
-            //代理商信息
-            Map businessAgentInfo = agentServiceDaoImpl.getBusinessAgentInfo(delInfo);
-            //除非程序出错了,这里不会为空
-            if(businessAgentInfo == null || businessAgentInfo.isEmpty()){
-                throw new ListenerExecuteException(ResponseConstant.RESULT_CODE_INNER_ERROR,"撤单失败(agent),程序内部异常,请检查! "+delInfo);
-            }
-
-            flushBusinessAgentInfo(businessAgentInfo,StatusConstant.STATUS_CD_VALID);
-            agentServiceDaoImpl.updateAgentInfoInstance(businessAgentInfo);
-            dataFlowContext.addParamOut("agentId",agentInfo.get("agent_id"));
-        }
-
-        //代理商属性
-        List<Map> agentAttrs = agentServiceDaoImpl.getAgentAttrs(info);
-        if(agentAttrs != null && agentAttrs.size()>0){
-
-            List<Map> businessAgentAttrs = agentServiceDaoImpl.getBusinessAgentAttrs(delInfo);
-            //除非程序出错了,这里不会为空
-            if(businessAgentAttrs == null || businessAgentAttrs.size() ==0 ){
-                throw new ListenerExecuteException(ResponseConstant.RESULT_CODE_INNER_ERROR,"撤单失败(agent_attr),程序内部异常,请检查! "+delInfo);
-            }
-            for(Map businessAgentAttr : businessAgentAttrs) {
-                flushBusinessAgentAttr(businessAgentAttr,StatusConstant.STATUS_CD_VALID);
-                agentServiceDaoImpl.updateAgentAttrInstance(businessAgentAttr);
-            }
-        }
-    }
-
-    /**
-     * 处理 businessAgent 节点
-     * @param business 总的数据节点
-     * @param businessAgent 代理商节点
-     */
-    private void doBusinessAgent(Business business,JSONObject businessAgent){
-
-        Assert.jsonObjectHaveKey(businessAgent,"agentId","businessAgent 节点下没有包含 agentId 节点");
-
-        if(businessAgent.getString("agentId").startsWith("-")){
-            throw new ListenerExecuteException(ResponseConstant.RESULT_PARAM_ERROR,"agentId 错误,不能自动生成(必须已经存在的agentId)"+businessAgent);
-        }
-        //自动保存DEL
-        autoSaveDelBusinessAgent(business,businessAgent);
-
-        businessAgent.put("bId",business.getbId());
-        businessAgent.put("operate", StatusConstant.OPERATE_ADD);
-        //保存代理商信息
-        agentServiceDaoImpl.saveBusinessAgentInfo(businessAgent);
-
-    }
-
-
-
-    /**
-     * 保存代理商属性信息
-     * @param business 当前业务
-     * @param businessAgentAttrs 代理商属性
-     */
-    private void doSaveBusinessAgentAttrs(Business business,JSONArray businessAgentAttrs){
-        JSONObject data = business.getDatas();
-
-
-        for(int agentAttrIndex = 0 ; agentAttrIndex < businessAgentAttrs.size();agentAttrIndex ++){
-            JSONObject agentAttr = businessAgentAttrs.getJSONObject(agentAttrIndex);
-            Assert.jsonObjectHaveKey(agentAttr,"attrId","businessAgentAttr 节点下没有包含 attrId 节点");
-            if(agentAttr.getString("attrId").startsWith("-")){
-                throw new ListenerExecuteException(ResponseConstant.RESULT_PARAM_ERROR,"attrId 错误,不能自动生成(必须已经存在的attrId)"+agentAttr);
-            }
-            //自动保存DEL数据
-            autoSaveDelBusinessAgentAttr(business,agentAttr);
-
-            agentAttr.put("bId",business.getbId());
-            agentAttr.put("agentId",agentAttr.getString("agentId"));
-            agentAttr.put("operate", StatusConstant.OPERATE_ADD);
-
-            agentServiceDaoImpl.saveBusinessAgentAttr(agentAttr);
-        }
-    }
-
-
-    public IAgentServiceDao getAgentServiceDaoImpl() {
-        return agentServiceDaoImpl;
-    }
-
-    public void setAgentServiceDaoImpl(IAgentServiceDao agentServiceDaoImpl) {
-        this.agentServiceDaoImpl = agentServiceDaoImpl;
-    }
-
-
-
-}

+ 0 - 161
AgentService/src/main/java/com/java110/agent/listener/UpdateAgentPhotoListener.java

@@ -1,161 +0,0 @@
-package com.java110.agent.listener;
-
-import com.alibaba.fastjson.JSONArray;
-import com.alibaba.fastjson.JSONObject;
-import com.java110.agent.dao.IAgentServiceDao;
-import com.java110.common.constant.BusinessTypeConstant;
-import com.java110.common.constant.ResponseConstant;
-import com.java110.common.constant.StatusConstant;
-import com.java110.common.exception.ListenerExecuteException;
-import com.java110.common.util.Assert;
-import com.java110.core.annotation.Java110Listener;
-import com.java110.core.context.DataFlowContext;
-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;
-
-/**
- * 修改代理商信息 侦听
- *
- * 处理节点
- * 1、businessAgentPhoto:{} 代理商照片节点
- * Created by wuxw on 2018/5/18.
- */
-@Java110Listener("updateAgentPhotoListener")
-@Transactional
-public class UpdateAgentPhotoListener extends AbstractAgentBusinessServiceDataFlowListener {
-
-    private final static Logger logger = LoggerFactory.getLogger(UpdateAgentPhotoListener.class);
-    @Autowired
-    IAgentServiceDao agentServiceDaoImpl;
-
-    @Override
-    public int getOrder() {
-        return 2;
-    }
-
-    @Override
-    public String getBusinessTypeCd() {
-        return BusinessTypeConstant.BUSINESS_TYPE_UPDATE_AGENT_PHOTO;
-    }
-
-    /**
-     * business过程
-     * @param dataFlowContext
-     * @param business
-     */
-    @Override
-    protected void doSaveBusiness(DataFlowContext dataFlowContext, Business business) {
-
-        JSONObject data = business.getDatas();
-
-        Assert.notEmpty(data,"没有datas 节点,或没有子节点需要处理");
-
-        if(data.containsKey("businessAgentPhoto")){
-            JSONArray businessAgentPhotos = data.getJSONArray("businessAgentPhoto");
-            doBusinessAgentPhoto(business,businessAgentPhotos);
-        }
-    }
-
-
-    /**
-     * 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> businessAgentPhotos = agentServiceDaoImpl.getBusinessAgentPhoto(info);
-        if(businessAgentPhotos != null && businessAgentPhotos.size() >0){
-            for(Map businessAgentPhoto : businessAgentPhotos) {
-                flushBusinessAgentPhoto(businessAgentPhoto,StatusConstant.STATUS_CD_VALID);
-                agentServiceDaoImpl.updateAgentPhotoInstance(businessAgentPhoto);
-            }
-        }
-
-    }
-
-    /**
-     * 撤单
-     * @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> agentPhotos = agentServiceDaoImpl.getAgentPhoto(info);
-        if(agentPhotos != null && agentPhotos.size()>0){
-            List<Map> businessAgentPhotos = agentServiceDaoImpl.getBusinessAgentPhoto(delInfo);
-            //除非程序出错了,这里不会为空
-            if(businessAgentPhotos == null || businessAgentPhotos.size() ==0 ){
-                throw new ListenerExecuteException(ResponseConstant.RESULT_CODE_INNER_ERROR,"撤单失败(agent_photo),程序内部异常,请检查! "+delInfo);
-            }
-            for(Map businessAgentPhoto : businessAgentPhotos) {
-                flushBusinessAgentPhoto(businessAgentPhoto,StatusConstant.STATUS_CD_VALID);
-                agentServiceDaoImpl.updateAgentPhotoInstance(businessAgentPhoto);
-            }
-        }
-    }
-
-    /**
-     * 保存代理商照片
-     * @param business 业务对象
-     * @param businessAgentPhotos 代理商照片
-     */
-    private void doBusinessAgentPhoto(Business business, JSONArray businessAgentPhotos) {
-
-
-        for(int businessAgentPhotoIndex = 0 ;businessAgentPhotoIndex < businessAgentPhotos.size();businessAgentPhotoIndex++) {
-            JSONObject businessAgentPhoto = businessAgentPhotos.getJSONObject(businessAgentPhotoIndex);
-            Assert.jsonObjectHaveKey(businessAgentPhoto, "agentId", "businessAgentPhoto 节点下没有包含 agentId 节点");
-
-            if (businessAgentPhoto.getString("agentPhotoId").startsWith("-")) {
-                throw new ListenerExecuteException(ResponseConstant.RESULT_PARAM_ERROR,"agentPhotoId 错误,不能自动生成(必须已经存在的agentPhotoId)"+businessAgentPhoto);
-            }
-
-            //自动保存DEL信息
-            autoSaveDelBusinessAgentPhoto(business,businessAgentPhoto);
-
-            businessAgentPhoto.put("bId", business.getbId());
-            businessAgentPhoto.put("operate", StatusConstant.OPERATE_ADD);
-            //保存代理商信息
-            agentServiceDaoImpl.saveBusinessAgentPhoto(businessAgentPhoto);
-        }
-    }
-
-
-    public IAgentServiceDao getAgentServiceDaoImpl() {
-        return agentServiceDaoImpl;
-    }
-
-    public void setAgentServiceDaoImpl(IAgentServiceDao agentServiceDaoImpl) {
-        this.agentServiceDaoImpl = agentServiceDaoImpl;
-    }
-
-
-
-}

+ 0 - 17
AgentService/src/main/java/com/java110/agent/smo/IAgentServiceSMO.java

@@ -1,17 +0,0 @@
-package com.java110.agent.smo;
-
-import com.alibaba.fastjson.JSONObject;
-import com.java110.common.exception.SMOException;
-import com.java110.core.context.BusinessServiceDataFlow;
-
-/**
- *
- * 用户信息管理,服务
- * Created by wuxw on 2017/4/5.
- */
-public interface IAgentServiceSMO {
-
-
-    public JSONObject service(BusinessServiceDataFlow businessServiceDataFlow) throws SMOException;
-
-}

+ 0 - 110
AgentService/src/main/java/com/java110/agent/smo/impl/AgentServiceSMOImpl.java

@@ -1,110 +0,0 @@
-package com.java110.agent.smo.impl;
-
-import com.alibaba.fastjson.JSONArray;
-import com.alibaba.fastjson.JSONObject;
-import com.java110.common.cache.MappingCache;
-import com.java110.common.constant.KafkaConstant;
-import com.java110.common.constant.MappingConstant;
-import com.java110.common.constant.ResponseConstant;
-import com.java110.common.exception.SMOException;
-import com.java110.common.kafka.KafkaFactory;
-import com.java110.common.util.Assert;
-import com.java110.common.util.DateUtil;
-import com.java110.core.base.smo.BaseServiceSMO;
-import com.java110.core.context.BusinessServiceDataFlow;
-import com.java110.core.factory.DataFlowFactory;
-import com.java110.entity.center.DataFlowLinksCost;
-import com.java110.entity.center.DataFlowLog;
-import com.java110.event.service.BusinessServiceDataFlowEventPublishing;
-import com.java110.agent.smo.IAgentServiceSMO;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Transactional;
-
-import java.util.Date;
-import java.util.List;
-
-/**
- * 用户服务信息管理业务信息实现
- * Created by wuxw on 2017/4/5.
- */
-@Service("agentServiceSMOImpl")
-@Transactional
-public class AgentServiceSMOImpl extends BaseServiceSMO implements IAgentServiceSMO {
-
-    private final static Logger logger = LoggerFactory.getLogger(AgentServiceSMOImpl.class);
-
-        @Override
-        public JSONObject service(BusinessServiceDataFlow businessServiceDataFlow) throws SMOException {
-            try {
-                Assert.hasLength(businessServiceDataFlow.getbId(),"bId 不能为空");
-
-                BusinessServiceDataFlowEventPublishing.multicastEvent(businessServiceDataFlow);
-                Assert.notEmpty(businessServiceDataFlow.getResJson(),"用户服务["+businessServiceDataFlow.getCurrentBusiness().getServiceCode()+"]没有返回内容");
-            } catch (Exception e) {
-                logger.error("用户信息处理异常",e);
-                throw new SMOException(ResponseConstant.RESULT_PARAM_ERROR,"用户信息处理异常"+e.getMessage());
-            }finally {
-                if(businessServiceDataFlow == null){
-                    return null;
-                }
-
-                //这里记录日志
-                Date endDate = DateUtil.getCurrentDate();
-
-                businessServiceDataFlow.setEndDate(endDate);
-                //添加耗时
-                DataFlowFactory.addCostTime(businessServiceDataFlow, "service", "业务处理总耗时",
-                        businessServiceDataFlow.getStartDate(), businessServiceDataFlow.getEndDate());
-                //保存耗时
-                saveCostTimeLogMessage(businessServiceDataFlow);
-                //保存日志
-                saveLogMessage(businessServiceDataFlow);
-            }
-            return businessServiceDataFlow.getResJson();
-    }
-
-    /**
-     * 保存日志信息
-     * @param businessServiceDataFlow
-     */
-    private void saveLogMessage(BusinessServiceDataFlow businessServiceDataFlow){
-
-        try{
-            if(MappingConstant.VALUE_ON.equals(MappingCache.getValue(MappingConstant.KEY_LOG_ON_OFF))){
-                for(DataFlowLog dataFlowLog :businessServiceDataFlow.getLogDatas()) {
-                    KafkaFactory.sendKafkaMessage(KafkaConstant.TOPIC_LOG_NAME, "", JSONObject.toJSONString(dataFlowLog));
-                }
-            }
-        }catch (Exception e){
-            logger.error("报错日志出错了,",e);
-        }
-    }
-
-    /**
-     * 保存耗时信息
-     * @param businessServiceDataFlow
-     */
-    private void saveCostTimeLogMessage(BusinessServiceDataFlow businessServiceDataFlow){
-        try{
-            if(MappingConstant.VALUE_ON.equals(MappingCache.getValue(MappingConstant.KEY_COST_TIME_ON_OFF))){
-                List<DataFlowLinksCost> dataFlowLinksCosts = businessServiceDataFlow.getLinksCostDates();
-                JSONObject costDate = new JSONObject();
-                JSONArray costDates = new JSONArray();
-                JSONObject newObj = null;
-                for(DataFlowLinksCost dataFlowLinksCost : dataFlowLinksCosts){
-                    newObj = JSONObject.parseObject(JSONObject.toJSONString(dataFlowLinksCost));
-                    newObj.put("dataFlowId",businessServiceDataFlow.getDataFlowId());
-                    newObj.put("transactionId",businessServiceDataFlow.getTransactionId());
-                    costDates.add(newObj);
-                }
-                costDate.put("costDates",costDates);
-
-                KafkaFactory.sendKafkaMessage(KafkaConstant.TOPIC_COST_TIME_LOG_NAME,"",costDate.toJSONString());
-            }
-        }catch (Exception e){
-            logger.error("报错日志出错了,",e);
-        }
-    }
-}

+ 0 - 94
AgentService/src/main/resources/application-dev.yml

@@ -1,94 +0,0 @@
-jedis:
-  pool:
-    config:
-      maxTotal: 100
-      maxIdle: 20
-      maxWaitMillis: 20000
-    host: dev.redis.java110.com
-    port: 6379
-
-eureka:
-  instance:
-    leaseRenewalIntervalInSeconds: 10
-    leaseExpirationDurationInSeconds: 30
-    preferIpAddress: true
-    instanceId: ${spring.cloud.client.ipAddress}:${server.port}
-  client:
-    serviceUrl:
-      defaultZone: http://dev.java110.com:8761/eureka/
-      #defaultZone: http://localhost:8761/eureka/
-server:
-  port: 8010
-  tomcat:
-    uri-encoding: UTF-8
-
-spring:
-  http:
-    encoding:
-      charset: UTF-8
-      enabled: true
-      force: true
-  application:
-    name: agent-service
-  redis:
-    database: 0
-    host: dev.redis.java110.com
-    port: 6379
-    pool:
-      max-active: 300
-      max-wait: 10000
-      max-idle: 100
-      min-idle: 0
-      timeout: 0
-  datasource:
-    connectionProperties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000
-    minIdle: 5
-    validationQuery: SELECT 1 FROM DUAL
-    initialSize: 5
-    maxWait: 60000
-    filters: stat,wall,log4j
-    poolPreparedStatements: true
-    type: com.alibaba.druid.pool.DruidDataSource
-    url: jdbc:mysql://dev.db.java110.com:3306/TT?useUnicode=true&characterEncoding=utf-8
-    maxPoolPreparedStatementPerConnectionSize: 20
-    password: TT@12345678
-    testOnBorrow: false
-    testWhileIdle: true
-    minEvictableIdleTimeMillis: 300000
-    timeBetweenEvictionRunsMillis: 60000
-    testOnReturn: false
-    driverClassName: com.mysql.jdbc.Driver
-    maxActive: 20
-    username: TT
-
-#============== kafka ===================
-kafka:
-  consumer:
-    zookeeper:
-      connect: dev.zk.java110.com:2181
-    servers: dev.kafka.java110.com:9092
-    enable:
-      auto:
-        commit: true
-    session:
-      timeout: 6000
-    auto:
-      commit:
-        interval: 100
-      offset:
-        reset: latest
-    topic: test
-    group:
-      id: agentBusinessStatus
-    concurrency: 10
-
-  producer:
-    zookeeper:
-      connect: dev.zk.java110.com:2181
-    servers: dev.kafka.java110.com:9092
-    retries: 0
-    batch:
-      size: 4096
-    linger: 1
-    buffer:
-      memory: 40960

+ 0 - 94
AgentService/src/main/resources/application-prod.yml

@@ -1,94 +0,0 @@
-jedis:
-  pool:
-    config:
-      maxTotal: 100
-      maxIdle: 20
-      maxWaitMillis: 20000
-    host: prod.redis.java110.com
-    port: 6379
-
-eureka:
-  instance:
-    leaseRenewalIntervalInSeconds: 10
-    leaseExpirationDurationInSeconds: 30
-    preferIpAddress: true
-    instanceId: ${spring.cloud.client.ipAddress}:${server.port}
-  client:
-    serviceUrl:
-      defaultZone: http://prod.java110.com:8761/eureka/
-      #defaultZone: http://localhost:8761/eureka/
-server:
-  port: 8010
-  tomcat:
-    uri-encoding: UTF-8
-
-spring:
-  http:
-    encoding:
-      charset: UTF-8
-      enabled: true
-      force: true
-  application:
-    name: agent-service
-  redis:
-    database: 0
-    host: prod.redis.java110.com
-    port: 6379
-    pool:
-      max-active: 300
-      max-wait: 10000
-      max-idle: 100
-      min-idle: 0
-      timeout: 0
-  datasource:
-    connectionProperties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000
-    minIdle: 5
-    validationQuery: SELECT 1 FROM DUAL
-    initialSize: 5
-    maxWait: 60000
-    filters: stat,wall,log4j
-    poolPreparedStatements: true
-    type: com.alibaba.druid.pool.DruidDataSource
-    url: jdbc:mysql://prod.db.java110.com:3306/TT?useUnicode=true&characterEncoding=utf-8
-    maxPoolPreparedStatementPerConnectionSize: 20
-    password: TT@12345678
-    testOnBorrow: false
-    testWhileIdle: true
-    minEvictableIdleTimeMillis: 300000
-    timeBetweenEvictionRunsMillis: 60000
-    testOnReturn: false
-    driverClassName: com.mysql.jdbc.Driver
-    maxActive: 20
-    username: TT
-
-#============== kafka ===================
-kafka:
-  consumer:
-    zookeeper:
-      connect: prod.zk.java110.com:2181
-    servers: prod.kafka.java110.com:9092
-    enable:
-      auto:
-        commit: true
-    session:
-      timeout: 6000
-    auto:
-      commit:
-        interval: 100
-      offset:
-        reset: latest
-    topic: test
-    group:
-      id: agentBusinessStatus
-    concurrency: 10
-
-  producer:
-    zookeeper:
-      connect: prod.zk.java110.com:2181
-    servers: prod.kafka.java110.com:9092
-    retries: 0
-    batch:
-      size: 4096
-    linger: 1
-    buffer:
-      memory: 40960

+ 0 - 94
AgentService/src/main/resources/application-test.yml

@@ -1,94 +0,0 @@
-jedis:
-  pool:
-    config:
-      maxTotal: 100
-      maxIdle: 20
-      maxWaitMillis: 20000
-    host: test.redis.java110.com
-    port: 6379
-
-eureka:
-  instance:
-    leaseRenewalIntervalInSeconds: 10
-    leaseExpirationDurationInSeconds: 30
-    preferIpAddress: true
-    instanceId: ${spring.cloud.client.ipAddress}:${server.port}
-  client:
-    serviceUrl:
-      defaultZone: http://test.java110.com:8761/eureka/
-      #defaultZone: http://localhost:8761/eureka/
-server:
-  port: 8010
-  tomcat:
-    uri-encoding: UTF-8
-
-spring:
-  http:
-    encoding:
-      charset: UTF-8
-      enabled: true
-      force: true
-  application:
-    name: agent-service
-  redis:
-    database: 0
-    host: test.redis.java110.com
-    port: 6379
-    pool:
-      max-active: 300
-      max-wait: 10000
-      max-idle: 100
-      min-idle: 0
-      timeout: 0
-  datasource:
-    connectionProperties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000
-    minIdle: 5
-    validationQuery: SELECT 1 FROM DUAL
-    initialSize: 5
-    maxWait: 60000
-    filters: stat,wall,log4j
-    poolPreparedStatements: true
-    type: com.alibaba.druid.pool.DruidDataSource
-    url: jdbc:mysql://test.db.java110.com:3306/TT?useUnicode=true&characterEncoding=utf-8
-    maxPoolPreparedStatementPerConnectionSize: 20
-    password: TT@12345678
-    testOnBorrow: false
-    testWhileIdle: true
-    minEvictableIdleTimeMillis: 300000
-    timeBetweenEvictionRunsMillis: 60000
-    testOnReturn: false
-    driverClassName: com.mysql.jdbc.Driver
-    maxActive: 20
-    username: TT
-
-#============== kafka ===================
-kafka:
-  consumer:
-    zookeeper:
-      connect: test.zk.java110.com:2181
-    servers: test.kafka.java110.com:9092
-    enable:
-      auto:
-        commit: true
-    session:
-      timeout: 6000
-    auto:
-      commit:
-        interval: 100
-      offset:
-        reset: latest
-    topic: test
-    group:
-      id: agentBusinessStatus
-    concurrency: 10
-
-  producer:
-    zookeeper:
-      connect: test.zk.java110.com:2181
-    servers: test.kafka.java110.com:9092
-    retries: 0
-    batch:
-      size: 4096
-    linger: 1
-    buffer:
-      memory: 40960

+ 0 - 3
AgentService/src/main/resources/application.yml

@@ -1,3 +0,0 @@
-spring:
-  profiles:
-    active: dev

+ 0 - 15
AgentService/src/main/resources/banner.txt

@@ -1,15 +0,0 @@
-${AnsiColor.BRIGHT_RED}
-     __                    ____ ___________
-    |__|____ ___  _______ /_   /_   \   _  \
-    |  \__  \\  \/ /\__  \ |   ||   /  /_\  \
-    |  |/ __ \\   /  / __ \|   ||   \  \_/   \
-/\__|  (____  /\_/  (____  /___||___|\_____  /
-\______|    \/           \/                \/
- ____ ___                    _________                  .__
-|    |   \______ ___________/   _____/ ______________  _|__| ____  ____
-|    |   /  ___// __ \_  __ \_____  \_/ __ \_  __ \  \/ /  |/ ___\/ __ \
-|    |  /\___ \\  ___/|  | \/        \  ___/|  | \/\   /|  \  \__\  ___/
-|______//____  >\___  >__| /_______  /\___  >__|    \_/ |__|\___  >___  >
-             \/     \/             \/     \/                    \/    \/
-
- java110 UserService starting, more information scan https://github.com/java110/MicroCommunity

PayService/README.md → FeeService/README.md


+ 1 - 1
PayService/pom.xml

@@ -7,7 +7,7 @@
     </parent>
     <modelVersion>4.0.0</modelVersion>
 
-    <artifactId>PayService</artifactId>
+    <artifactId>FeeService</artifactId>
     <packaging>jar</packaging>
 
     <name>PayService</name>

PayService/src/test/java/com/java110/pay/AppTest.java → FeeService/src/test/java/com/java110/pay/AppTest.java


+ 0 - 56
PropertyService/Readme.md

@@ -1,56 +0,0 @@
-### 变更历史(change history)
-版本|变更内容|变更时间|变更人员
-:-: | :-: | :-: | :-:
-v0.01|初稿|2018-07-24|wuxw
-
-## serviceCode 包括
-
-### 保存物业基本信息
-
-save.property.info
-
-### 保存照片信息
-save.property.photo
-
-### 保存证件信息
-save.property.cerdentials
-
-### 保存物业员工信息
-save.property.user
-
-### 保存物业费用信息
-save.property.fee
-
-### 保存物业住户信息
-save.property.house
-
-
-### 修改物业基本信息
-
-update.property.info
-
-### 修改照片信息
-update.property.photo
-
-### 修改证件信息
-update.property.cerdentials
-
-### 修改物业费用信息
-update.property.fee
-
-### 修改物业住户信息
-update.property.house
-
-
-### 删除照片信息
-delete.property.photo
-
-### 删除证件信息
-delete.property.cerdentials
-
-### 删除物业员工信息
-delete.property.user
-
-
-### 删除物业住户信息
-delete.property.house

+ 0 - 29
PropertyService/doc/deletePropertyAttr.json

@@ -1,29 +0,0 @@
-{
-  "orders": {
-    "appId": "外系统ID,分配得到",
-    "transactionId": "100000000020180409224736000001",
-    "userId": "用户ID",
-    "orderTypeCd": "订单类型,查询,受理",
-    "requestTime": "20180409224736",
-    "remark": "备注",
-    "sign": "这个服务是否要求MD5签名",
-    "attrs": [{
-      "specCd": "配置的字段ID",
-      "value": "具体值"
-    }]
-  },
-  "business": {
-    "serviceCode": "delete.property.attr",
-    "serviceName": "删除物业属性",
-    "remark": "备注",
-    "datas": {
-      "businessPropertyAttr": [{
-        "attrId":"112018121800000002"
-      }]
-    },
-    "attrs": [{
-      "specCd": "配置的字段ID",
-      "value": "具体值"
-    }]
-  }
-}

+ 0 - 29
PropertyService/doc/deletePropertyCerdentials.json

@@ -1,29 +0,0 @@
-{
-  "orders": {
-    "appId": "外系统ID,分配得到",
-    "transactionId": "100000000020180409224736000001",
-    "userId": "用户ID",
-    "orderTypeCd": "订单类型,查询,受理",
-    "requestTime": "20180409224736",
-    "remark": "备注",
-    "sign": "这个服务是否要求MD5签名",
-    "attrs": [{
-      "specCd": "配置的字段ID",
-      "value": "具体值"
-    }]
-  },
-  "business": {
-    "serviceCode": "delete.property.cerdentials",
-    "serviceName": "删除商户证件信息",
-    "remark": "备注",
-    "datas": {
-      "businessPropertyCerdentials":[{
-        "propertyCerdentialsId":"9220181218000002"
-      }]
-    },
-    "attrs": [{
-      "specCd": "配置的字段ID",
-      "value": "具体值"
-    }]
-  }
-}

+ 0 - 33
PropertyService/doc/deletePropertyHouse.json

@@ -1,33 +0,0 @@
-{
-  "orders": {
-    "appId": "外系统ID,分配得到",
-    "transactionId": "100000000020180409224736000001",
-    "userId": "用户ID",
-    "orderTypeCd": "订单类型,查询,受理",
-    "requestTime": "20180409224736",
-    "remark": "备注",
-    "sign": "这个服务是否要求MD5签名",
-    "attrs": [{
-      "specCd": "配置的字段ID",
-      "value": "具体值"
-    }]
-  },
-  "business": {
-    "serviceCode": "delete.property.house",
-    "serviceName": "删除住户",
-    "remark": "备注",
-    "datas": {
-      "businessPropertyHouse":{
-        "houseId":"9520181222000005"
-      },
-      "businessPropertyHouseAttr": [{
-        "houseId": "9520181222000005",
-        "attrId":"112018122200000006"
-      }]
-    },
-    "attrs": [{
-      "specCd": "配置的字段ID",
-      "value": "具体值"
-    }]
-  }
-}

+ 0 - 29
PropertyService/doc/deletePropertyPhoto.json

@@ -1,29 +0,0 @@
-{
-  "orders": {
-    "appId": "外系统ID,分配得到",
-    "transactionId": "100000000020180409224736000001",
-    "userId": "用户ID",
-    "orderTypeCd": "订单类型,查询,受理",
-    "requestTime": "20180409224736",
-    "remark": "备注",
-    "sign": "这个服务是否要求MD5签名",
-    "attrs": [{
-      "specCd": "配置的字段ID",
-      "value": "具体值"
-    }]
-  },
-  "business": {
-    "serviceCode": "delete.property.photo",
-    "serviceName": "删除物业照片信息",
-    "remark": "备注",
-    "datas": {
-      "businessPropertyPhoto":[{
-        "propertyPhotoId":"12320181218000001"
-      }]
-    },
-    "attrs": [{
-      "specCd": "配置的字段ID",
-      "value": "具体值"
-    }]
-  }
-}

+ 0 - 29
PropertyService/doc/deletePropertyUser.json

@@ -1,29 +0,0 @@
-{
-  "orders": {
-    "appId": "外系统ID,分配得到",
-    "transactionId": "100000000020180409224736000001",
-    "userId": "用户ID",
-    "orderTypeCd": "订单类型,查询,受理",
-    "requestTime": "20180409224736",
-    "remark": "备注",
-    "sign": "这个服务是否要求MD5签名",
-    "attrs": [{
-      "specCd": "配置的字段ID",
-      "value": "具体值"
-    }]
-  },
-  "business": {
-    "serviceCode": "delete.property.user",
-    "serviceName": "删除住户信息",
-    "remark": "备注",
-    "datas": {
-      "businessPropertyUser":[{
-        "propertyUserId":"9320181219000001"
-      }]
-    },
-    "attrs": [{
-      "specCd": "配置的字段ID",
-      "value": "具体值"
-    }]
-  }
-}

+ 0 - 35
PropertyService/doc/savePropertyCerdentials.json

@@ -1,35 +0,0 @@
-{
-  "orders": {
-    "appId": "外系统ID,分配得到",
-    "transactionId": "100000000020180409224736000001",
-    "userId": "用户ID",
-    "orderTypeCd": "订单类型,查询,受理",
-    "requestTime": "20180409224736",
-    "remark": "备注",
-    "sign": "这个服务是否要求MD5签名",
-    "attrs": [{
-      "specCd": "配置的字段ID",
-      "value": "具体值"
-    }]
-  },
-  "business": {
-    "serviceCode": "save.property.cerdentials",
-    "serviceName": "保存商户信息",
-    "remark": "备注",
-    "datas": {
-      "businessPropertyCerdentials":[{
-        "propertyCerdentialsId":"-1",
-        "propertyId":"9020181218000001",
-        "credentialsCd":"1",
-        "value":"632126XXXXXXXX2011",
-        "validityPeriod":"有效期,长期有效请写3000/01/01",
-        "positivePhoto":"正面照片地址,1234567.jpg",
-        "negativePhoto":"反面照片地址,没有不填写"
-      }]
-    },
-    "attrs": [{
-      "specCd": "配置的字段ID",
-      "value": "具体值"
-    }]
-  }
-}

+ 0 - 34
PropertyService/doc/savePropertyFee.json

@@ -1,34 +0,0 @@
-{
-  "orders": {
-    "appId": "外系统ID,分配得到",
-    "transactionId": "100000000020180409224736000001",
-    "userId": "用户ID",
-    "orderTypeCd": "订单类型,查询,受理",
-    "requestTime": "20180409224736",
-    "remark": "备注",
-    "sign": "这个服务是否要求MD5签名",
-    "attrs": [{
-      "specCd": "配置的字段ID",
-      "value": "具体值"
-    }]
-  },
-  "business": {
-    "serviceCode": "update.property.fee",
-    "serviceName": "保存物业费用",
-    "remark": "备注",
-    "datas": {
-      "businessPropertyFee":[{
-        "feeId":"9420181221000001",
-        "propertyId":"9020181218000001",
-        "feeMoney":"10",
-        "feeTime":"0.5",
-        "startTime": "2018-05-01",
-        "endTime": "2020-11-31"
-      }]
-    },
-    "attrs": [{
-      "specCd": "配置的字段ID",
-      "value": "具体值"
-    }]
-  }
-}

+ 0 - 42
PropertyService/doc/savePropertyHouse.json

@@ -1,42 +0,0 @@
-{
-  "orders": {
-    "appId": "外系统ID,分配得到",
-    "transactionId": "100000000020180409224736000001",
-    "userId": "用户ID",
-    "orderTypeCd": "订单类型,查询,受理",
-    "requestTime": "20180409224736",
-    "remark": "备注",
-    "sign": "这个服务是否要求MD5签名",
-    "attrs": [{
-      "specCd": "配置的字段ID",
-      "value": "具体值"
-    }]
-  },
-  "business": {
-    "serviceCode": "save.property.house",
-    "serviceName": "保存物业费用",
-    "remark": "备注",
-    "datas": {
-      "businessPropertyHouse":{
-        "houseId":"-1",
-        "propertyId":"123213",
-        "houseNum":"T",
-        "houseName":"10",
-        "housePhone":"17797173942",
-        "houseArea": "01918",
-        "feeTypeCd": "111",
-        "feePrice": "10.09"
-      },
-      "businessPropertyHouseAttr": [{
-        "houseId": "-1",
-        "attrId":"-1",
-        "specCd":"1001",
-        "value":"01"
-      }]
-    },
-    "attrs": [{
-      "specCd": "配置的字段ID",
-      "value": "具体值"
-    }]
-  }
-}

+ 0 - 41
PropertyService/doc/savePropertyInfo.json

@@ -1,41 +0,0 @@
-{
-  "orders": {
-    "appId": "外系统ID,分配得到",
-    "transactionId": "100000000020180409224736000001",
-    "userId": "用户ID",
-    "orderTypeCd": "订单类型,查询,受理",
-    "requestTime": "20180409224736",
-    "remark": "备注",
-    "sign": "这个服务是否要求MD5签名",
-    "attrs": [{
-      "specCd": "配置的字段ID",
-      "value": "具体值"
-    }]
-  },
-  "business": {
-    "serviceCode": "save.property.info",
-    "serviceName": "保存物业信息",
-    "remark": "备注",
-    "datas": {
-      "businessProperty": {
-        "propertyId": "-1",
-        "name": "方博家园",
-        "address": "青海省西宁市城中区129号",
-        "tel": "17797173942",
-        "nearbyLandmarks": "王府井旁30米",
-        "mapX": "101.801909",
-        "mapY": "36.597263"
-      },
-      "businessPropertyAttr": [{
-        "propertyId": "-1",
-        "attrId":"-1",
-        "specCd":"1001",
-        "value":"01"
-      }]
-    },
-    "attrs": [{
-      "specCd": "配置的字段ID",
-      "value": "具体值"
-    }]
-  }
-}

+ 0 - 32
PropertyService/doc/savePropertyPhoto.json

@@ -1,32 +0,0 @@
-{
-  "orders": {
-    "appId": "外系统ID,分配得到",
-    "transactionId": "100000000020180409224736000001",
-    "userId": "用户ID",
-    "orderTypeCd": "订单类型,查询,受理",
-    "requestTime": "20180409224736",
-    "remark": "备注",
-    "sign": "这个服务是否要求MD5签名",
-    "attrs": [{
-      "specCd": "配置的字段ID",
-      "value": "具体值"
-    }]
-  },
-  "business": {
-    "serviceCode": "save.property.photo",
-    "serviceName": "保存小区信息",
-    "remark": "备注",
-    "datas": {
-      "businessPropertyPhoto":[{
-        "propertyPhotoId":"-1",
-        "propertyId":"123213",
-        "propertyPhotoTypeCd":"T",
-        "photo":"12345678.jpg"
-      }]
-    },
-    "attrs": [{
-      "specCd": "配置的字段ID",
-      "value": "具体值"
-    }]
-  }
-}

+ 0 - 32
PropertyService/doc/savePropertyUser.json

@@ -1,32 +0,0 @@
-{
-  "orders": {
-    "appId": "外系统ID,分配得到",
-    "transactionId": "100000000020180409224736000001",
-    "userId": "用户ID",
-    "orderTypeCd": "订单类型,查询,受理",
-    "requestTime": "20180409224736",
-    "remark": "备注",
-    "sign": "这个服务是否要求MD5签名",
-    "attrs": [{
-      "specCd": "配置的字段ID",
-      "value": "具体值"
-    }]
-  },
-  "business": {
-    "serviceCode": "save.property.user",
-    "serviceName": "保存商户信息",
-    "remark": "备注",
-    "datas": {
-      "businessPropertyUser":[{
-        "propertyUserId":"-1",
-        "propertyId":"9020181218000001",
-        "relCd":"600311000001",
-        "userId":"123"
-      }]
-    },
-    "attrs": [{
-      "specCd": "配置的字段ID",
-      "value": "具体值"
-    }]
-  }
-}

+ 0 - 34
PropertyService/doc/updatePropertyCerdentials.json

@@ -1,34 +0,0 @@
-{
-  "orders": {
-    "appId": "外系统ID,分配得到",
-    "transactionId": "100000000020180409224736000001",
-    "userId": "用户ID",
-    "orderTypeCd": "订单类型,查询,受理",
-    "requestTime": "20180409224736",
-    "remark": "备注",
-    "sign": "这个服务是否要求MD5签名",
-    "attrs": [{
-      "specCd": "配置的字段ID",
-      "value": "具体值"
-    }]
-  },
-  "business": {
-    "serviceCode": "update.property.cerdentials",
-    "serviceName": "修改物业证件信息",
-    "remark": "备注",
-    "datas": {
-      "businessPropertyCerdentials":[{
-        "propertyCerdentialsId":"9220181218000002",
-        "propertyId":"9020181218000001",
-        "value":"632126XXXXXXXX2012",
-        "validityPeriod":"3000-2-1",
-        "positivePhoto":"1234567.jpg",
-        "negativePhoto":"11.jpg"
-      }]
-    },
-    "attrs": [{
-      "specCd": "配置的字段ID",
-      "value": "具体值"
-    }]
-  }
-}

+ 0 - 35
PropertyService/doc/updatePropertyFee.json

@@ -1,35 +0,0 @@
-{
-  "orders": {
-    "appId": "外系统ID,分配得到",
-    "transactionId": "100000000020180409224736000001",
-    "userId": "用户ID",
-    "orderTypeCd": "订单类型,查询,受理",
-    "requestTime": "20180409224736",
-    "remark": "备注",
-    "sign": "这个服务是否要求MD5签名",
-    "attrs": [{
-      "specCd": "配置的字段ID",
-      "value": "具体值"
-    }]
-  },
-  "business": {
-    "serviceCode": "save.property.fee",
-    "serviceName": "保存物业费用",
-    "remark": "备注",
-    "datas": {
-      "businessPropertyFee":[{
-        "feeId":"-1",
-        "propertyId":"123213",
-        "feeTypeCd":"T",
-        "feeMoney":"10",
-        "feeTime":"0.5",
-        "startTime": "2018-01-01",
-        "endTime": "2020-12-31"
-      }]
-    },
-    "attrs": [{
-      "specCd": "配置的字段ID",
-      "value": "具体值"
-    }]
-  }
-}

+ 0 - 41
PropertyService/doc/updatePropertyHouse.json

@@ -1,41 +0,0 @@
-{
-  "orders": {
-    "appId": "外系统ID,分配得到",
-    "transactionId": "100000000020180409224736000001",
-    "userId": "用户ID",
-    "orderTypeCd": "订单类型,查询,受理",
-    "requestTime": "20180409224736",
-    "remark": "备注",
-    "sign": "这个服务是否要求MD5签名",
-    "attrs": [{
-      "specCd": "配置的字段ID",
-      "value": "具体值"
-    }]
-  },
-  "business": {
-    "serviceCode": "update.property.house",
-    "serviceName": "保存物业费用",
-    "remark": "备注",
-    "datas": {
-      "businessPropertyHouse":{
-        "houseId":"9520181222000005",
-        "propertyId":"123213",
-        "houseNum":"123123",
-        "houseName":"吴XX住宅",
-        "housePhone":"17797173943",
-        "houseArea": "01919",
-        "feeTypeCd": "112",
-        "feePrice": "11.09"
-      },
-      "businessPropertyHouseAttr": [{
-        "houseId": "9520181222000005",
-        "attrId":"112018122200000006",
-        "value":"02"
-      }]
-    },
-    "attrs": [{
-      "specCd": "配置的字段ID",
-      "value": "具体值"
-    }]
-  }
-}

+ 0 - 40
PropertyService/doc/updatePropertyInfo.json

@@ -1,40 +0,0 @@
-{
-  "orders": {
-    "appId": "外系统ID,分配得到",
-    "transactionId": "100000000020180409224736000001",
-    "userId": "用户ID",
-    "orderTypeCd": "订单类型,查询,受理",
-    "requestTime": "20180409224736",
-    "remark": "备注",
-    "sign": "这个服务是否要求MD5签名",
-    "attrs": [{
-      "specCd": "配置的字段ID",
-      "value": "具体值"
-    }]
-  },
-  "business": {
-    "serviceCode": "update.property.info",
-    "serviceName": "修改商户信息",
-    "remark": "备注",
-    "datas": {
-      "businessProperty": {
-        "propertyId": "123123",
-        "name": "方博家园",
-        "address": "青海省西宁市城中区129号",
-        "tel": "17797173942",
-        "nearbyLandmarks": "王府井旁30米",
-        "mapX": "101.801909",
-        "mapY": "36.597263"
-      },
-      "businessPropertyAttr": [{
-        "propertyId": "12313",
-        "attrId":"123123",
-        "value":"01"
-      }]
-    },
-    "attrs": [{
-      "specCd": "配置的字段ID",
-      "value": "具体值"
-    }]
-  }
-}

+ 0 - 32
PropertyService/doc/updatePropertyPhoto.json

@@ -1,32 +0,0 @@
-{
-  "orders": {
-    "appId": "外系统ID,分配得到",
-    "transactionId": "100000000020180409224736000001",
-    "userId": "用户ID",
-    "orderTypeCd": "订单类型,查询,受理",
-    "requestTime": "20180409224736",
-    "remark": "备注",
-    "sign": "这个服务是否要求MD5签名",
-    "attrs": [{
-      "specCd": "配置的字段ID",
-      "value": "具体值"
-    }]
-  },
-  "business": {
-    "serviceCode": "update.property.photo",
-    "serviceName": "修改物业照片信息",
-    "remark": "备注",
-    "datas": {
-      "businessPropertyPhoto":[{
-        "propertyPhotoId":"12320181218000001",
-        "propertyId":"9020181218000001",
-        "propertyPhotoTypeCd":"T",
-        "photo":"123456789.jpg"
-      }]
-    },
-    "attrs": [{
-      "specCd": "配置的字段ID",
-      "value": "具体值"
-    }]
-  }
-}

+ 0 - 10
PropertyService/docker/Dockerfile

@@ -1,10 +0,0 @@
-FROM registry.cn-beijing.aliyuncs.com/sxd/ubuntu-java8:1.0
-MAINTAINER wuxw <928255095@qq.com>
-
-
-ADD bin/start_property.sh /root/
-
-
-RUN chmod u+x /root/start_property.sh
-
-CMD ["/root/start_property.sh","dev"]

+ 0 - 14
PropertyService/docker/bin/start_property.sh

@@ -1,14 +0,0 @@
-#!/bin/bash
-#### debug model prod
-#nohup java -Xdebug -Xrunjdwp:server=y,transport=dt_socket,address=8000,suspend=n -jar -Dspring.profiles.active=dev target/PropertyService.jar > property.log 2>&1 &
-
-#### normal prod model
-#nohup java -jar -Dspring.profiles.active=prod target/PropertyService.jar > property.log 2>&1 &
-
-#### normal test model
-#nohup java -jar -Dspring.profiles.active=test target/PropertyService.jar > property.log 2>&1 &
-
-#### normal dev model
-nohup java -jar -Dspring.profiles.active=$1 target/PropertyService.jar > property.log 2>&1 &
-
-tail -100f property.log

+ 0 - 12
PropertyService/docker/docker-compose.yml

@@ -1,12 +0,0 @@
-version: '2'
-services:
-   propertyserivce:
-       container_name: propertyserivce-1
-       build:
-          context: .
-          dockerfile: Dockerfile
-       restart: always
-       ports:
-       - "8009:8009"
-       volumes:
-       - ../target/PropertyService.jar:/root/target/PropertyService.jar

+ 0 - 11
PropertyService/docker/onStart.sh

@@ -1,11 +0,0 @@
-#!/bin/bash
-
-cp -r ../bin .
-
-cp  -r ../target .
-
-docker build -t java110/property .
-
-docker run -ti --name property_test -p8006:8006 -idt java110/property:latest
-
-docker logs -f property_test

+ 0 - 80
PropertyService/pom.xml

@@ -1,80 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <parent>
-        <artifactId>MicroCommunity</artifactId>
-        <groupId>com.java110</groupId>
-        <version>1.0-SNAPSHOT</version>
-    </parent>
-    <modelVersion>4.0.0</modelVersion>
-
-    <artifactId>PropertyService</artifactId>
-    <packaging>jar</packaging>
-
-    <name>PropertyService</name>
-    <!-- FIXME change it to the project's website -->
-    <url>http://www.example.com</url>
-
-    <properties>
-        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-        <maven.compiler.source>1.7</maven.compiler.source>
-        <maven.compiler.target>1.7</maven.compiler.target>
-    </properties>
-
-    <dependencies>
-        <dependency>
-            <groupId>junit</groupId>
-            <artifactId>junit</artifactId>
-            <version>4.11</version>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>com.java110</groupId>
-            <artifactId>java110-service</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>com.java110</groupId>
-            <artifactId>java110-event</artifactId>
-        </dependency>
-    </dependencies>
-
-    <build>
-        <finalName>PropertyService</finalName>
-        <plugins>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-dependency-plugin</artifactId>
-                <version>2.10</version>
-                <executions>
-                    <execution>
-                        <id>unpack</id>
-                        <phase>generate-resources</phase>
-                        <goals>
-                            <goal>unpack</goal>
-                        </goals>
-                        <configuration>
-                            <artifactItems>
-                                <artifactItem>
-                                    <groupId>com.java110</groupId>
-                                    <artifactId>java110-config</artifactId>
-                                    <version>${microcommunity.version}</version>
-                                    <type>jar</type>
-                                    <overWrite>true</overWrite>
-                                    <outputDirectory>${project.build.directory}/classes</outputDirectory>
-                                </artifactItem>
-                            </artifactItems>
-                        </configuration>
-                    </execution>
-                </executions>
-            </plugin>
-            <plugin>
-                <groupId>org.springframework.boot</groupId>
-                <artifactId>spring-boot-maven-plugin</artifactId>
-                <configuration>
-                    <mainClass>com.java110.property.PropertyServiceApplicationStart</mainClass>
-                </configuration>
-            </plugin>
-        </plugins>
-    </build>
-</project>

+ 0 - 56
PropertyService/src/main/java/com/java110/property/PropertyServiceApplicationStart.java

@@ -1,56 +0,0 @@
-package com.java110.property;
-
-import com.java110.core.annotation.Java110ListenerDiscovery;
-import com.java110.event.service.BusinessServiceDataFlowEventPublishing;
-import com.java110.service.init.ServiceStartInit;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.boot.SpringApplication;
-import org.springframework.boot.autoconfigure.SpringBootApplication;
-import org.springframework.boot.web.client.RestTemplateBuilder;
-import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
-import org.springframework.cloud.client.loadbalancer.LoadBalanced;
-import org.springframework.context.ApplicationContext;
-import org.springframework.context.annotation.Bean;
-import org.springframework.http.converter.StringHttpMessageConverter;
-import org.springframework.web.client.RestTemplate;
-
-import java.nio.charset.Charset;
-
-
-/**
- * spring boot 初始化启动类
- *
- * @version v0.1
- * @auther com.java110.wuxw
- * @mail 928255095@qq.com
- * @date 2016年8月6日
- * @tag
- */
-@SpringBootApplication(scanBasePackages={"com.java110.service","com.java110.property","com.java110.core","com.java110.cache"})
-@EnableDiscoveryClient
-@Java110ListenerDiscovery(listenerPublishClass = BusinessServiceDataFlowEventPublishing.class,
-        basePackages = {"com.java110.property.listener"})
-public class PropertyServiceApplicationStart {
-    private final static Logger logger = LoggerFactory.getLogger(PropertyServiceApplicationStart.class);
-
-
-    /**
-     * 实例化RestTemplate,通过@LoadBalanced注解开启均衡负载能力.
-     * @return restTemplate
-     */
-    @Bean
-    @LoadBalanced
-    public RestTemplate restTemplate() {
-        StringHttpMessageConverter m = new StringHttpMessageConverter(Charset.forName("UTF-8"));
-        RestTemplate restTemplate = new RestTemplateBuilder().additionalMessageConverters(m).build();
-        return restTemplate;
-    }
-
-    public static void main(String[] args) throws Exception{
-        ApplicationContext context = SpringApplication.run(PropertyServiceApplicationStart.class, args);
-        ServiceStartInit.initSystemConfig(context);
-        //加载业务侦听
-        //SystemStartLoadBusinessConfigure.initSystemConfig(LISTENER_PATH);
-    }
-}

+ 0 - 106
PropertyService/src/main/java/com/java110/property/api/PropertyApi.java

@@ -1,106 +0,0 @@
-package com.java110.property.api;
-
-import com.alibaba.fastjson.JSONObject;
-import com.java110.property.smo.IPropertyServiceSMO;
-import com.java110.common.constant.ResponseConstant;
-import com.java110.common.exception.InitConfigDataException;
-import com.java110.common.exception.InitDataFlowContextException;
-import com.java110.core.base.controller.BaseController;
-import com.java110.core.context.BusinessServiceDataFlow;
-import com.java110.core.factory.DataTransactionFactory;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestMethod;
-import org.springframework.web.bind.annotation.RestController;
-
-import javax.servlet.http.HttpServletRequest;
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * 物业服务类
- * Created by wuxw on 2018/5/14.
- */
-@RestController
-public class PropertyApi extends BaseController {
-
-    private final static Logger logger = LoggerFactory.getLogger(PropertyApi.class);
-
-
-    @Autowired
-    IPropertyServiceSMO propertyServiceSMOImpl;
-
-    @RequestMapping(path = "/propertyApi/service",method= RequestMethod.GET)
-    public String serviceGet(HttpServletRequest request) {
-        return DataTransactionFactory.createBusinessResponseJson(ResponseConstant.RESULT_CODE_ERROR,"不支持Get方法请求").toJSONString();
-    }
-
-    /**
-     * 物业服务统一处理接口
-     * @param orderInfo
-     * @param request
-     * @return
-     */
-    @RequestMapping(path = "/propertyApi/service",method= RequestMethod.POST)
-    public String servicePost(@RequestBody String orderInfo, HttpServletRequest request) {
-        BusinessServiceDataFlow businessServiceDataFlow = null;
-        JSONObject responseJson = null;
-        try {
-            Map<String, String> headers = new HashMap<String, String>();
-            getRequestInfo(request, headers);
-            //预校验
-            preValiateOrderInfo(orderInfo);
-            businessServiceDataFlow = this.writeDataToDataFlowContext(orderInfo, headers);
-            responseJson = propertyServiceSMOImpl.service(businessServiceDataFlow);
-        }catch (InitDataFlowContextException e){
-            logger.error("请求报文错误,初始化 BusinessServiceDataFlow失败"+orderInfo,e);
-            responseJson = DataTransactionFactory.createNoBusinessTypeBusinessResponseJson(orderInfo,ResponseConstant.RESULT_PARAM_ERROR,e.getMessage(),null);
-        }catch (InitConfigDataException e){
-            logger.error("请求报文错误,加载配置信息失败"+orderInfo,e);
-            responseJson = DataTransactionFactory.createNoBusinessTypeBusinessResponseJson(orderInfo,ResponseConstant.RESULT_PARAM_ERROR,e.getMessage(),null);
-        }catch (Exception e){
-            logger.error("请求订单异常",e);
-            responseJson = DataTransactionFactory.createBusinessResponseJson(businessServiceDataFlow,ResponseConstant.RESULT_CODE_ERROR,e.getMessage()+e,
-                    null);
-        }finally {
-            return responseJson.toJSONString();
-        }
-    }
-
-    /**
-     * 这里预校验,请求报文中不能有 dataFlowId
-     * @param orderInfo
-     */
-    private void preValiateOrderInfo(String orderInfo) {
-       /* if(JSONObject.parseObject(orderInfo).getJSONObject("orders").containsKey("dataFlowId")){
-            throw new BusinessException(ResponseConstant.RESULT_CODE_ERROR,"报文中不能存在dataFlowId节点");
-        }*/
-    }
-
-    /**
-     * 获取请求信息
-     * @param request
-     * @param headers
-     * @throws RuntimeException
-     */
-    private void getRequestInfo(HttpServletRequest request,Map headers) throws Exception{
-        try{
-            super.initHeadParam(request,headers);
-            super.initUrlParam(request,headers);
-        }catch (Exception e){
-            logger.error("加载头信息失败",e);
-            throw new InitConfigDataException(ResponseConstant.RESULT_PARAM_ERROR,"加载头信息失败");
-        }
-    }
-
-    public IPropertyServiceSMO getPropertyServiceSMOImpl() {
-        return propertyServiceSMOImpl;
-    }
-
-    public void setPropertyServiceSMOImpl(IPropertyServiceSMO propertyServiceSMOImpl) {
-        this.propertyServiceSMOImpl = propertyServiceSMOImpl;
-    }
-}

+ 0 - 340
PropertyService/src/main/java/com/java110/property/dao/IPropertyServiceDao.java

@@ -1,340 +0,0 @@
-package com.java110.property.dao;
-
-
-import com.java110.common.exception.DAOException;
-
-import java.util.List;
-import java.util.Map;
-
-/**
- * 物业组件内部之间使用,没有给外围系统提供服务能力
- * 物业服务接口类,要求全部以字符串传输,方便微服务化
- * 新建客户,修改客户,删除客户,查询客户等功能
- *
- * Created by wuxw on 2016/12/27.
- */
-public interface IPropertyServiceDao {
-
-    /**
-     * 保存 物业信息
-     * @param businessPropertyInfo 物业信息 封装
-     * @throws DAOException 操作数据库异常
-     */
-    public void saveBusinessPropertyInfo(Map businessPropertyInfo) throws DAOException;
-
-    /**
-     * 保存物业属性
-     * @param businessPropertyAttr 物业属性信息封装
-     * @throws DAOException 操作数据库异常
-     */
-    public void saveBusinessPropertyAttr(Map businessPropertyAttr) throws DAOException;
-
-
-    /**
-     * 保存物业照片信息
-     * @param businessPropertyPhoto 物业照片
-     * @throws DAOException 操作数据库异常
-     */
-    public void saveBusinessPropertyPhoto(Map businessPropertyPhoto) throws DAOException;
-
-    /**
-     * 保存物业证件信息
-     * @param businessPropertyCerdentials 物业证件
-     * @throws DAOException 操作数据库异常
-     */
-    public void saveBusinessPropertyCerdentials(Map businessPropertyCerdentials) throws DAOException;
-
-
-    /**
-     * 保存物业用户信息
-     * @param info
-     * @throws DAOException
-     */
-    public void saveBusinessPropertyUser(Map info) throws DAOException;
-
-    /**
-     * 保存物业费用信息
-     * @param info
-     * @throws DAOException
-     */
-    public void saveBusinessPropertyFee(Map info) throws DAOException;
-
-    /**
-     * 保存 住户信息
-     * @param businessPropertyHouse 住户信息 封装
-     * @throws DAOException 操作数据库异常
-     */
-    public void saveBusinessPropertyHouse(Map businessPropertyHouse) throws DAOException;
-
-    /**
-     * 保存住户属性
-     * @param businessPropertyHouseAttr 住户信息封装
-     * @throws DAOException 操作数据库异常
-     */
-    public void saveBusinessPropertyHouseAttr(Map businessPropertyHouseAttr) throws DAOException;
-
-
-    /**
-     * 查询物业信息(business过程)
-     * 根据bId 查询物业信息
-     * @param info bId 信息
-     * @return 物业信息
-     * @throws DAOException
-     */
-    public Map getBusinessPropertyInfo(Map info) throws DAOException;
-
-
-    /**
-     * 查询物业属性信息(business过程)
-     * @param info bId 信息
-     * @return 物业属性
-     * @throws DAOException
-     */
-    public List<Map> getBusinessPropertyAttrs(Map info) throws DAOException;
-
-    /**
-     * 查询住户信息(business过程)
-     * 根据bId 查询物业信息
-     * @param info bId 信息
-     * @return 物业信息
-     * @throws DAOException
-     */
-    public Map getBusinessPropertyHouse(Map info) throws DAOException;
-
-
-    /**
-     * 查询住户属性信息(business过程)
-     * @param info bId 信息
-     * @return 物业属性
-     * @throws DAOException
-     */
-    public List<Map> getBusinessPropertyHouseAttrs(Map info) throws DAOException;
-
-
-
-    /**
-     * 查询物业照片
-     * @param info bId 信息
-     * @return 物业照片
-     * @throws DAOException
-     */
-    public List<Map> getBusinessPropertyPhoto(Map info) throws DAOException;
-
-
-    /**
-     * 查询物业证件信息
-     * @param info bId 信息
-     * @return 物业照片
-     * @throws DAOException
-     */
-    public List<Map> getBusinessPropertyCerdentials(Map info) throws DAOException;
-
-    /**
-     * 查询物业用户信息
-     * @param info bId 信息
-     * @return 物业照片
-     * @throws DAOException
-     */
-    public List<Map> getBusinessPropertyUser(Map info) throws DAOException;
-
-    /**
-     * 查询物业费用信息
-     * @param info bId 信息
-     * @return 物业照片
-     * @throws DAOException
-     */
-    public List<Map> getBusinessPropertyFee(Map info) throws DAOException;
-    /**
-     * 保存 物业信息 Business数据到 Instance中
-     * @param info
-     * @throws DAOException
-     */
-    public void savePropertyInfoInstance(Map info) throws DAOException;
-
-
-    /**
-     * 保存 物业属性信息 Business数据到 Instance中
-     * @param info
-     * @throws DAOException
-     */
-    public void savePropertyAttrsInstance(Map info) throws DAOException;
-
-    /**
-     * 保存 住户信息 Business数据到 Instance中
-     * @param info
-     * @throws DAOException
-     */
-    public void savePropertyHouseInstance(Map info) throws DAOException;
-
-
-    /**
-     * 保存 住户属性信息 Business数据到 Instance中
-     * @param info
-     * @throws DAOException
-     */
-    public void savePropertyHouseAttrsInstance(Map info) throws DAOException;
-
-    /**
-     * 保存 物业照片信息 Business数据到 Instance中
-     * @param info
-     * @throws DAOException
-     */
-    public void savePropertyPhotoInstance(Map info) throws DAOException;
-
-
-    /**
-     * 保存 物业证件信息 Business数据到 Instance中
-     * @param info
-     * @throws DAOException
-     */
-    public void savePropertyCerdentialsInstance(Map info) throws DAOException;
-
-
-    /**
-     * 保存 物业用户信息 Business数据到 Instance中
-     * @param info
-     * @throws DAOException
-     */
-    public void savePropertyUserInstance(Map info) throws DAOException;
-
-    /**
-     * 保存 物业费用信息 Business数据到 Instance中
-     * @param info
-     * @throws DAOException
-     */
-    public void savePropertyFeeInstance(Map info) throws DAOException;
-
-    /**
-     * 查询物业信息(instance过程)
-     * 根据bId 查询物业信息
-     * @param info bId 信息
-     * @return 物业信息
-     * @throws DAOException
-     */
-    public Map getPropertyInfo(Map info) throws DAOException;
-
-
-    /**
-     * 查询物业属性信息(instance过程)
-     * @param info bId 信息
-     * @return 物业属性
-     * @throws DAOException
-     */
-    public List<Map> getPropertyAttrs(Map info) throws DAOException;
-
-    /**
-     * 查询住户信息(instance过程)
-     * 根据bId 查询物业信息
-     * @param info bId 信息
-     * @return 物业信息
-     * @throws DAOException
-     */
-    public Map getPropertyHouse(Map info) throws DAOException;
-
-
-    /**
-     * 查询住户属性信息(instance过程)
-     * @param info bId 信息
-     * @return 物业属性
-     * @throws DAOException
-     */
-    public List<Map> getPropertyHouseAttrs(Map info) throws DAOException;
-
-
-    /**
-     * 查询物业照片(instance 过程)
-     * @param info bId 信息
-     * @return 物业照片
-     * @throws DAOException
-     */
-    public List<Map> getPropertyPhoto(Map info) throws DAOException;
-
-    /**
-     * 查询物业证件信息(instance 过程)
-     * @param info bId 信息
-     * @return 物业照片
-     * @throws DAOException
-     */
-    public List<Map> getPropertyCerdentials(Map info) throws DAOException;
-
-    /**
-     * 查询物业用户信息(instance 过程)
-     * @param info bId 信息
-     * @return 物业照片
-     * @throws DAOException
-     */
-    public List<Map> getPropertyUser(Map info) throws DAOException;
-
-    /**
-     * 查询物业费用信息(instance 过程)
-     * @param info bId 信息
-     * @return 物业照片
-     * @throws DAOException
-     */
-    public List<Map> getPropertyFee(Map info) throws DAOException;
-
-    /**
-     * 修改物业信息
-     * @param info 修改信息
-     * @throws DAOException
-     */
-    public void updatePropertyInfoInstance(Map info) throws DAOException;
-
-
-    /**
-     * 修改物业属性信息
-     * @param info 修改信息
-     * @throws DAOException
-     */
-    public void updatePropertyAttrInstance(Map info) throws DAOException;
-
-    /**
-     * 修改住户信息
-     * @param info 修改信息
-     * @throws DAOException
-     */
-    public void updatePropertyHouseInstance(Map info) throws DAOException;
-
-
-    /**
-     * 修改住户属性信息
-     * @param info 修改信息
-     * @throws DAOException
-     */
-    public void updatePropertyHouseAttrInstance(Map info) throws DAOException;
-
-
-    /**
-     * 修改物业照片信息
-     * @param info 修改信息
-     * @throws DAOException
-     */
-    public void updatePropertyPhotoInstance(Map info) throws DAOException;
-
-    /**
-     * 修改物业证件信息
-     * @param info 修改信息
-     * @throws DAOException
-     */
-    public void updatePropertyCerdentailsInstance(Map info) throws DAOException;
-
-
-    /**
-     * 修改物业用户信息
-     * @param info 修改信息
-     * @throws DAOException
-     */
-    public void updatePropertyUserInstance(Map info) throws DAOException;
-
-
-
-    /**
-     * 修改物业费用信息
-     * @param info 修改信息
-     * @throws DAOException
-     */
-    public void updatePropertyFeeInstance(Map info) throws DAOException;
-
-
-
-}

+ 0 - 652
PropertyService/src/main/java/com/java110/property/dao/impl/PropertyServiceDaoImpl.java

@@ -1,652 +0,0 @@
-package com.java110.property.dao.impl;
-
-import com.alibaba.fastjson.JSONObject;
-import com.java110.property.dao.IPropertyServiceDao;
-import com.java110.common.constant.ResponseConstant;
-import com.java110.common.exception.DAOException;
-import com.java110.common.util.DateUtil;
-import com.java110.core.base.dao.BaseServiceDao;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.stereotype.Service;
-
-import java.util.List;
-import java.util.Map;
-
-/**
- * 物业服务 与数据库交互
- * Created by wuxw on 2017/4/5.
- */
-@Service("propertyServiceDaoImpl")
-//@Transactional
-public class PropertyServiceDaoImpl extends BaseServiceDao implements IPropertyServiceDao {
-
-    private final static Logger logger = LoggerFactory.getLogger(PropertyServiceDaoImpl.class);
-
-    /**
-     * 物业信息封装
-     * @param businessPropertyInfo 物业信息 封装
-     * @throws DAOException
-     */
-    @Override
-    public void saveBusinessPropertyInfo(Map businessPropertyInfo) throws DAOException {
-        businessPropertyInfo.put("month", DateUtil.getCurrentMonth());
-        // 查询business_user 数据是否已经存在
-        logger.debug("保存物业信息 入参 businessPropertyInfo : {}",businessPropertyInfo);
-        int saveFlag = sqlSessionTemplate.insert("propertyServiceDaoImpl.saveBusinessPropertyInfo",businessPropertyInfo);
-
-        if(saveFlag < 1){
-            throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR,"保存物业数据失败:"+ JSONObject.toJSONString(businessPropertyInfo));
-        }
-    }
-
-    /**
-     * 物业属性信息分装
-     * @param businessPropertyAttr 物业属性信息封装
-     * @throws DAOException
-     */
-    @Override
-    public void saveBusinessPropertyAttr(Map businessPropertyAttr) throws DAOException {
-        businessPropertyAttr.put("month", DateUtil.getCurrentMonth());
-        // 查询business_user 数据是否已经存在
-        logger.debug("保存物业属性信息 入参 businessPropertyAttr : {}",businessPropertyAttr);
-
-        int saveFlag = sqlSessionTemplate.insert("propertyServiceDaoImpl.saveBusinessPropertyAttr",businessPropertyAttr);
-
-        if(saveFlag < 1){
-            throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR,"保存物业属性数据失败:"+ JSONObject.toJSONString(businessPropertyAttr));
-        }
-    }
-
-    /**
-     * 保存物业照片信息
-     * @param businessPropertyPhoto 物业照片
-     * @throws DAOException
-     */
-    @Override
-    public void saveBusinessPropertyPhoto(Map businessPropertyPhoto) throws DAOException {
-        businessPropertyPhoto.put("month", DateUtil.getCurrentMonth());
-        logger.debug("保存物业照片信息 入参 businessPropertyPhoto : {}",businessPropertyPhoto);
-
-        int saveFlag = sqlSessionTemplate.insert("propertyServiceDaoImpl.saveBusinessPropertyPhoto",businessPropertyPhoto);
-
-        if(saveFlag < 1){
-            throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR,"保存物业照片数据失败:"+ JSONObject.toJSONString(businessPropertyPhoto));
-        }
-    }
-
-    /**
-     * 保存物业证件信息
-     * @param businessPropertyCerdentials 物业证件
-     * @throws DAOException
-     */
-    @Override
-    public void saveBusinessPropertyCerdentials(Map businessPropertyCerdentials) throws DAOException {
-        businessPropertyCerdentials.put("month", DateUtil.getCurrentMonth());
-        logger.debug("保存物业证件信息 入参 businessPropertyCerdentials : {}",businessPropertyCerdentials);
-
-        int saveFlag = sqlSessionTemplate.insert("propertyServiceDaoImpl.saveBusinessPropertyCerdentials",businessPropertyCerdentials);
-
-        if(saveFlag < 1){
-            throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR,"保存物业证件数据失败:"+ JSONObject.toJSONString(businessPropertyCerdentials));
-        }
-    }
-
-    /**
-     * 保存物业用户信息
-     * @param info
-     * @throws DAOException
-     */
-    public void saveBusinessPropertyUser(Map info) throws DAOException{
-        info.put("month", DateUtil.getCurrentMonth());
-        logger.debug("保存物业用户信息入参 info : {}",info);
-
-        int saveFlag = sqlSessionTemplate.insert("propertyServiceDaoImpl.saveBusinessPropertyUser",info);
-
-        if(saveFlag < 1){
-            throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR,"保存物业用户信息数据失败:"+ JSONObject.toJSONString(info));
-        }
-    }
-
-    /**
-     * 保存物业费用信息
-     * @param info
-     * @throws DAOException
-     */
-    public void saveBusinessPropertyFee(Map info) throws DAOException{
-        info.put("month", DateUtil.getCurrentMonth());
-        logger.debug("保存物业费用信息入参 info : {}",info);
-
-        int saveFlag = sqlSessionTemplate.insert("propertyServiceDaoImpl.saveBusinessPropertyFee",info);
-
-        if(saveFlag < 1){
-            throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR,"保存物业费用信息数据失败:"+ JSONObject.toJSONString(info));
-        }
-    }
-
-    /**
-     * 保存 住户信息
-     * @param businessPropertyHouse 住户信息 封装
-     * @throws DAOException 操作数据库异常
-     */
-    public void saveBusinessPropertyHouse(Map businessPropertyHouse) throws DAOException{
-        businessPropertyHouse.put("month", DateUtil.getCurrentMonth());
-        // 查询business_user 数据是否已经存在
-        logger.debug("保存住户信息 入参 businessPropertyHouse : {}",businessPropertyHouse);
-        int saveFlag = sqlSessionTemplate.insert("propertyServiceDaoImpl.saveBusinessPropertyHouse",businessPropertyHouse);
-
-        if(saveFlag < 1){
-            throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR,"保存住户数据失败:"+ JSONObject.toJSONString(businessPropertyHouse));
-        }
-    }
-
-    /**
-     * 保存住户属性
-     * @param businessPropertyHouseAttr 住户信息封装
-     * @throws DAOException 操作数据库异常
-     */
-    public void saveBusinessPropertyHouseAttr(Map businessPropertyHouseAttr) throws DAOException{
-        businessPropertyHouseAttr.put("month", DateUtil.getCurrentMonth());
-        // 查询business_user 数据是否已经存在
-        logger.debug("保存住户属性信息 入参 businessPropertyHouseAttr : {}",businessPropertyHouseAttr);
-
-        int saveFlag = sqlSessionTemplate.insert("propertyServiceDaoImpl.saveBusinessPropertyHouseAttr",businessPropertyHouseAttr);
-
-        if(saveFlag < 1){
-            throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR,"保存住户属性数据失败:"+ JSONObject.toJSONString(businessPropertyHouseAttr));
-        }
-    }
-
-    /**
-     * 查询物业信息
-     * @param info bId 信息
-     * @return 物业信息
-     * @throws DAOException
-     */
-    @Override
-    public Map getBusinessPropertyInfo(Map info) throws DAOException {
-
-        logger.debug("查询物业信息 入参 info : {}",info);
-
-        List<Map> businessPropertyInfos = sqlSessionTemplate.selectList("propertyServiceDaoImpl.getBusinessPropertyInfo",info);
-        if(businessPropertyInfos == null){
-            return null;
-        }
-        if(businessPropertyInfos.size() >1){
-            throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR,"根据条件查询有多条数据,数据异常,请检查:businessPropertyInfos,"+ JSONObject.toJSONString(info));
-        }
-
-        return businessPropertyInfos.get(0);
-    }
-
-    /**
-     * 查询物业属性
-     * @param info bId 信息
-     * @return 物业属性
-     * @throws DAOException
-     */
-    @Override
-    public List<Map> getBusinessPropertyAttrs(Map info) throws DAOException {
-        logger.debug("查询物业属性信息 入参 info : {}",info);
-
-        List<Map> businessPropertyAttrs = sqlSessionTemplate.selectList("propertyServiceDaoImpl.getBusinessPropertyAttrs",info);
-
-        return businessPropertyAttrs;
-    }
-
-    /**
-     * 查询住户信息(business过程)
-     * 根据bId 查询物业信息
-     * @param info bId 信息
-     * @return 物业信息
-     * @throws DAOException
-     */
-    public Map getBusinessPropertyHouse(Map info) throws DAOException{
-        logger.debug("查询住户信息 入参 info : {}",info);
-
-        List<Map> businessPropertyHouses = sqlSessionTemplate.selectList("propertyServiceDaoImpl.getBusinessPropertyHouse",info);
-        if(businessPropertyHouses == null){
-            return null;
-        }
-        if(businessPropertyHouses.size() >1){
-            throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR,"根据条件查询有多条数据,数据异常,请检查:businessPropertyHouse,"+ JSONObject.toJSONString(info));
-        }
-
-        return businessPropertyHouses.get(0);
-    }
-
-
-    /**
-     * 查询住户属性信息(business过程)
-     * @param info bId 信息
-     * @return 物业属性
-     * @throws DAOException
-     */
-    public List<Map> getBusinessPropertyHouseAttrs(Map info) throws DAOException{
-        logger.debug("查询住户属性信息 入参 info : {}",info);
-
-        List<Map> businessPropertyHouseAttrs = sqlSessionTemplate.selectList("propertyServiceDaoImpl.getBusinessPropertyHouseAttrs",info);
-
-        return businessPropertyHouseAttrs;
-    }
-
-    /**
-     * 查询物业照片
-     * @param info bId 信息
-     * @return
-     * @throws DAOException
-     */
-    @Override
-    public List<Map> getBusinessPropertyPhoto(Map info) throws DAOException {
-        logger.debug("查询物业照片信息 入参 info : {}",info);
-
-        List<Map> businessPropertyPhotos = sqlSessionTemplate.selectList("propertyServiceDaoImpl.getBusinessPropertyPhoto",info);
-
-        return businessPropertyPhotos;
-    }
-
-    /**
-     * 查询物业证件
-     * @param info bId 信息
-     * @return
-     * @throws DAOException
-     */
-    @Override
-    public List<Map> getBusinessPropertyCerdentials(Map info) throws DAOException {
-        logger.debug("查询物业证件信息 入参 info : {}",info);
-
-        List<Map> businessPropertyCerdentialses = sqlSessionTemplate.selectList("propertyServiceDaoImpl.getBusinessPropertyCerdentials",info);
-
-        return businessPropertyCerdentialses;
-    }
-
-    /**
-     * 查询物业用户信息
-     * @param info bId 信息
-     * @return 物业照片
-     * @throws DAOException
-     */
-    public List<Map> getBusinessPropertyUser(Map info) throws DAOException{
-        logger.debug("查询物业用户信息 入参 info : {}",info);
-
-        List<Map> businessPropertyUsers = sqlSessionTemplate.selectList("propertyServiceDaoImpl.getBusinessPropertyUser",info);
-
-        return businessPropertyUsers;
-    }
-
-    /**
-     * 查询物业费用信息
-     * @param info bId 信息
-     * @return 物业照片
-     * @throws DAOException
-     */
-    public List<Map> getBusinessPropertyFee(Map info) throws DAOException{
-        logger.debug("查询物业用户信息 入参 info : {}",info);
-
-        List<Map> businessPropertyUsers = sqlSessionTemplate.selectList("propertyServiceDaoImpl.getBusinessPropertyFee",info);
-
-        return businessPropertyUsers;
-    }
-
-
-    /**
-     * 保存物业信息 到 instance
-     * @param info   bId 信息
-     * @throws DAOException
-     */
-    @Override
-    public void savePropertyInfoInstance(Map info) throws DAOException {
-        logger.debug("保存物业信息Instance 入参 info : {}",info);
-
-        int saveFlag = sqlSessionTemplate.insert("propertyServiceDaoImpl.savePropertyInfoInstance",info);
-
-        if(saveFlag < 1){
-            throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR,"保存物业信息Instance数据失败:"+ JSONObject.toJSONString(info));
-        }
-    }
-
-    @Override
-    public void savePropertyAttrsInstance(Map info) throws DAOException {
-        logger.debug("保存物业属性信息Instance 入参 info : {}",info);
-
-        int saveFlag = sqlSessionTemplate.insert("propertyServiceDaoImpl.savePropertyAttrsInstance",info);
-
-        if(saveFlag < 1){
-            throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR,"保存物业属性信息Instance数据失败:"+ JSONObject.toJSONString(info));
-        }
-    }
-
-    /**
-     * 保存 住户信息 Business数据到 Instance中
-     * @param info
-     * @throws DAOException
-     */
-    public void savePropertyHouseInstance(Map info) throws DAOException{
-        logger.debug("保存住户信息Instance 入参 info : {}",info);
-
-        int saveFlag = sqlSessionTemplate.insert("propertyServiceDaoImpl.savePropertyHouseInstance",info);
-
-        if(saveFlag < 1){
-            throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR,"保存住户信息Instance数据失败:"+ JSONObject.toJSONString(info));
-        }
-    }
-
-
-    /**
-     * 保存 住户属性信息 Business数据到 Instance中
-     * @param info
-     * @throws DAOException
-     */
-    public void savePropertyHouseAttrsInstance(Map info) throws DAOException{
-        logger.debug("保存住户属性信息Instance 入参 info : {}",info);
-
-        int saveFlag = sqlSessionTemplate.insert("propertyServiceDaoImpl.savePropertyHouseAttrsInstance",info);
-
-        if(saveFlag < 1){
-            throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR,"保存住户属性信息Instance数据失败:"+ JSONObject.toJSONString(info));
-        }
-    }
-
-    @Override
-    public void savePropertyPhotoInstance(Map info) throws DAOException {
-        logger.debug("保存物业照片信息Instance 入参 info : {}",info);
-
-        int saveFlag = sqlSessionTemplate.insert("propertyServiceDaoImpl.savePropertyPhotoInstance",info);
-
-        if(saveFlag < 1){
-            throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR,"保存物业照片信息Instance数据失败:"+ JSONObject.toJSONString(info));
-        }
-    }
-
-    @Override
-    public void savePropertyCerdentialsInstance(Map info) throws DAOException {
-        logger.debug("保存物业证件信息Instance 入参 info : {}",info);
-
-        int saveFlag = sqlSessionTemplate.insert("propertyServiceDaoImpl.savePropertyCerdentialsInstance",info);
-
-        if(saveFlag < 1){
-            throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR,"保存物业证件信息Instance数据失败:"+ JSONObject.toJSONString(info));
-        }
-    }
-
-    /**
-     * 保存 物业用户信息 Business数据到 Instance中
-     * @param info
-     * @throws DAOException
-     */
-    public void savePropertyUserInstance(Map info) throws DAOException{
-        logger.debug("保存物业用户信息Instance 入参 info : {}",info);
-
-        int saveFlag = sqlSessionTemplate.insert("propertyServiceDaoImpl.savePropertyUserInstance",info);
-
-        if(saveFlag < 1){
-            throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR,"保存物业用户信息Instance数据失败:"+ JSONObject.toJSONString(info));
-        }
-    }
-
-    /**
-     * 保存 物业费用信息 Business数据到 Instance中
-     * @param info
-     * @throws DAOException
-     */
-    public void savePropertyFeeInstance(Map info) throws DAOException{
-        logger.debug("保存物业费用信息Instance 入参 info : {}",info);
-
-        int saveFlag = sqlSessionTemplate.insert("propertyServiceDaoImpl.savePropertyFeeInstance",info);
-
-        if(saveFlag < 1){
-            throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR,"保存物业费用信息Instance数据失败:"+ JSONObject.toJSONString(info));
-        }
-    }
-
-
-    /**
-     * 查询物业信息(instance)
-     * @param info bId 信息
-     * @return
-     * @throws DAOException
-     */
-    @Override
-    public Map getPropertyInfo(Map info) throws DAOException {
-        logger.debug("查询物业信息 入参 info : {}",info);
-
-        List<Map> businessPropertyInfos = sqlSessionTemplate.selectList("propertyServiceDaoImpl.getPropertyInfo",info);
-        if(businessPropertyInfos == null || businessPropertyInfos.size() == 0){
-            return null;
-        }
-        if(businessPropertyInfos.size() >1){
-            throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR,"根据条件查询有多条数据,数据异常,请检查:getPropertyInfo,"+ JSONObject.toJSONString(info));
-        }
-
-        return businessPropertyInfos.get(0);
-    }
-
-    /**
-     * 物业属性查询(instance)
-     * @param info bId 信息
-     * @return
-     * @throws DAOException
-     */
-    @Override
-    public List<Map> getPropertyAttrs(Map info) throws DAOException {
-        logger.debug("查询物业属性信息 入参 info : {}",info);
-
-        List<Map> propertyAttrs = sqlSessionTemplate.selectList("propertyServiceDaoImpl.getPropertyAttrs",info);
-
-        return propertyAttrs;
-    }
-
-    /**
-     * 查询住户信息(instance过程)
-     * 根据bId 查询物业信息
-     * @param info bId 信息
-     * @return 物业信息
-     * @throws DAOException
-     */
-    public Map getPropertyHouse(Map info) throws DAOException{
-        logger.debug("查询住户信息 入参 info : {}",info);
-
-        List<Map> businessPropertyInfos = sqlSessionTemplate.selectList("propertyServiceDaoImpl.getPropertyHouse",info);
-        if(businessPropertyInfos == null || businessPropertyInfos.size() == 0){
-            return null;
-        }
-        if(businessPropertyInfos.size() >1){
-            throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR,"根据条件查询有多条数据,数据异常,请检查:getPropertyHouse,"+ JSONObject.toJSONString(info));
-        }
-
-        return businessPropertyInfos.get(0);
-    }
-
-
-    /**
-     * 查询住户属性信息(instance过程)
-     * @param info bId 信息
-     * @return 物业属性
-     * @throws DAOException
-     */
-    public List<Map> getPropertyHouseAttrs(Map info) throws DAOException{
-        logger.debug("查询住户属性信息 入参 info : {}",info);
-
-        List<Map> propertyAttrs = sqlSessionTemplate.selectList("propertyServiceDaoImpl.getPropertyHouseAttrs",info);
-
-        return propertyAttrs;
-    }
-
-    /**
-     * 物业照片查询(instance)
-     * @param info bId 信息
-     * @return
-     * @throws DAOException
-     */
-    @Override
-    public List<Map> getPropertyPhoto(Map info) throws DAOException {
-        logger.debug("查询物业照片信息 入参 info : {}",info);
-
-        List<Map> propertyPhotos = sqlSessionTemplate.selectList("propertyServiceDaoImpl.getPropertyPhoto",info);
-
-        return propertyPhotos;
-    }
-
-    /**
-     * 物业证件查询(instance)
-     * @param info bId 信息
-     * @return
-     * @throws DAOException
-     */
-    @Override
-    public List<Map> getPropertyCerdentials(Map info) throws DAOException {
-        logger.debug("查询物业证件信息 入参 info : {}",info);
-
-        List<Map> propertyCerdentialses = sqlSessionTemplate.selectList("propertyServiceDaoImpl.getPropertyCerdentials",info);
-
-        return propertyCerdentialses;
-    }
-
-    /**
-     * 查询物业用户信息(instance 过程)
-     * @param info bId 信息
-     * @return 物业照片
-     * @throws DAOException
-     */
-    public List<Map> getPropertyUser(Map info) throws DAOException{
-        logger.debug("查询物业用户信息 入参 info : {}",info);
-
-        List<Map> propertyUsers = sqlSessionTemplate.selectList("propertyServiceDaoImpl.getPropertyUser",info);
-
-        return propertyUsers;
-    }
-
-    public List<Map> getPropertyFee(Map info) throws DAOException{
-        logger.debug("查询物业费用信息 入参 info : {}",info);
-        List<Map> propertyFees = sqlSessionTemplate.selectList("propertyServiceDaoImpl.getPropertyFee",info);
-        return propertyFees;
-    }
-
-    /**
-     * 修改物业信息
-     * @param info 修改信息
-     * @throws DAOException
-     */
-    @Override
-    public void updatePropertyInfoInstance(Map info) throws DAOException {
-        logger.debug("修改物业信息Instance 入参 info : {}",info);
-
-        int saveFlag = sqlSessionTemplate.update("propertyServiceDaoImpl.updatePropertyInfoInstance",info);
-
-        if(saveFlag < 1){
-            throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR,"修改物业信息Instance数据失败:"+ JSONObject.toJSONString(info));
-        }
-    }
-
-    /**
-     * 修改物业属性信息(instance)
-     * @param info 修改信息
-     * @throws DAOException
-     */
-    @Override
-    public void updatePropertyAttrInstance(Map info) throws DAOException {
-        logger.debug("修改物业属性信息Instance 入参 info : {}",info);
-
-        int saveFlag = sqlSessionTemplate.update("propertyServiceDaoImpl.updatePropertyAttrInstance",info);
-
-        if(saveFlag < 1){
-            throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR,"修改物业属性信息Instance数据失败:"+ JSONObject.toJSONString(info));
-        }
-    }
-
-    /**
-     * 修改住户信息
-     * @param info 修改信息
-     * @throws DAOException
-     */
-    public void updatePropertyHouseInstance(Map info) throws DAOException{
-        logger.debug("修改住户信息Instance 入参 info : {}",info);
-
-        int saveFlag = sqlSessionTemplate.update("propertyServiceDaoImpl.updatePropertyHouseInstance",info);
-
-        if(saveFlag < 1){
-            throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR,"修改住户信息Instance数据失败:"+ JSONObject.toJSONString(info));
-        }
-    }
-
-
-    /**
-     * 修改住户属性信息
-     * @param info 修改信息
-     * @throws DAOException
-     */
-    public void updatePropertyHouseAttrInstance(Map info) throws DAOException{
-        logger.debug("修改住户属性信息Instance 入参 info : {}",info);
-
-        int saveFlag = sqlSessionTemplate.update("propertyServiceDaoImpl.updatePropertyHouseAttrInstance",info);
-
-        if(saveFlag < 1){
-            throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR,"修改住户属性信息Instance数据失败:"+ JSONObject.toJSONString(info));
-        }
-    }
-
-    /**
-     * 修改 物业照片信息
-     * @param info 修改信息
-     * @throws DAOException
-     */
-    @Override
-    public void updatePropertyPhotoInstance(Map info) throws DAOException {
-        logger.debug("修改物业照片信息Instance 入参 info : {}",info);
-
-        int saveFlag = sqlSessionTemplate.update("propertyServiceDaoImpl.updatePropertyPhotoInstance",info);
-
-        if(saveFlag < 1){
-            throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR,"修改物业照片信息Instance数据失败:"+ JSONObject.toJSONString(info));
-        }
-    }
-
-    /**
-     * 修改物业证件信息
-     * @param info 修改信息
-     * @throws DAOException
-     */
-    @Override
-    public void updatePropertyCerdentailsInstance(Map info) throws DAOException {
-        logger.debug("修改物业证件信息Instance 入参 info : {}",info);
-
-        int saveFlag = sqlSessionTemplate.update("propertyServiceDaoImpl.updatePropertyCerdentailsInstance",info);
-
-        if(saveFlag < 1){
-            throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR,"修改物业证件信息Instance数据失败:"+ JSONObject.toJSONString(info));
-        }
-    }
-
-    /**
-     * 修改物业用户信息
-     * @param info 修改信息
-     * @throws DAOException
-     */
-    public void updatePropertyUserInstance(Map info) throws DAOException{
-        logger.debug("修改物业用户信息Instance 入参 info : {}",info);
-
-        int saveFlag = sqlSessionTemplate.update("propertyServiceDaoImpl.updatePropertyUserInstance",info);
-
-        if(saveFlag < 1){
-            throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR,"修改物业用户信息Instance数据失败:"+ JSONObject.toJSONString(info));
-        }
-    }
-
-
-
-    /**
-     * 修改物业费用信息
-     * @param info 修改信息
-     * @throws DAOException
-     */
-    public void updatePropertyFeeInstance(Map info) throws DAOException{
-        logger.debug("修改物业费用信息Instance 入参 info : {}",info);
-
-        int saveFlag = sqlSessionTemplate.update("propertyServiceDaoImpl.updatePropertyFeeInstance",info);
-
-        if(saveFlag < 1){
-            throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR,"修改物业费用信息Instance数据失败:"+ JSONObject.toJSONString(info));
-        }
-    }
-
-}

+ 0 - 16
PropertyService/src/main/java/com/java110/property/kafka/PropertyServiceBean.java

@@ -1,16 +0,0 @@
-package com.java110.property.kafka;
-
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Configuration;
-
-/**
- * Created by wuxw on 2018/4/15.
- */
-@Configuration
-public class PropertyServiceBean {
-    @Bean
-    public PropertyServiceKafka listener() {
-        return new PropertyServiceKafka();
-    }
-
-}

+ 0 - 91
PropertyService/src/main/java/com/java110/property/kafka/PropertyServiceKafka.java

@@ -1,91 +0,0 @@
-package com.java110.property.kafka;
-
-import com.alibaba.fastjson.JSONObject;
-import com.java110.property.smo.IPropertyServiceSMO;
-import com.java110.common.constant.KafkaConstant;
-import com.java110.common.constant.ResponseConstant;
-import com.java110.common.constant.StatusConstant;
-import com.java110.common.exception.InitConfigDataException;
-import com.java110.common.exception.InitDataFlowContextException;
-import com.java110.common.kafka.KafkaFactory;
-import com.java110.core.base.controller.BaseController;
-import com.java110.core.context.BusinessServiceDataFlow;
-import com.java110.core.factory.DataTransactionFactory;
-import org.apache.kafka.clients.consumer.ConsumerRecord;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.kafka.annotation.KafkaListener;
-
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * kafka侦听
- * Created by wuxw on 2018/4/15.
- */
-public class PropertyServiceKafka extends BaseController {
-
-    private final static Logger logger = LoggerFactory.getLogger(PropertyServiceKafka.class);
-
-    @Autowired
-    private IPropertyServiceSMO propertyServiceSMOImpl;
-
-    @KafkaListener(topics = {"propertyServiceTopic"})
-    public void listen(ConsumerRecord<?, ?> record) {
-        logger.info("kafka的key: " + record.key());
-        logger.info("kafka的value: " + record.value().toString());
-        String orderInfo = record.value().toString();
-        BusinessServiceDataFlow businessServiceDataFlow = null;
-        JSONObject responseJson = null;
-        try {
-            Map<String, String> headers = new HashMap<String, String>();
-            //预校验
-            preValiateOrderInfo(orderInfo);
-            businessServiceDataFlow = this.writeDataToDataFlowContext(orderInfo, headers);
-            responseJson = propertyServiceSMOImpl.service(businessServiceDataFlow);
-        }catch (InitDataFlowContextException e){
-            logger.error("请求报文错误,初始化 BusinessServiceDataFlow失败"+orderInfo,e);
-            responseJson = DataTransactionFactory.createNoBusinessTypeBusinessResponseJson(orderInfo,ResponseConstant.RESULT_PARAM_ERROR,e.getMessage(),null);
-        }catch (InitConfigDataException e){
-            logger.error("请求报文错误,加载配置信息失败"+orderInfo,e);
-            responseJson = DataTransactionFactory.createNoBusinessTypeBusinessResponseJson(orderInfo,ResponseConstant.RESULT_PARAM_ERROR,e.getMessage(),null);
-        }catch (Exception e){
-            logger.error("请求订单异常",e);
-            responseJson = DataTransactionFactory.createBusinessResponseJson(businessServiceDataFlow,ResponseConstant.RESULT_CODE_ERROR,e.getMessage()+e,
-                    null);
-        }finally {
-            logger.debug("当前请求报文:" + orderInfo +", 当前返回报文:" +responseJson.toJSONString());
-            //只有business 和 instance 过程才做通知消息
-            if(!StatusConstant.REQUEST_BUSINESS_TYPE_BUSINESS.equals(responseJson.getString("businessType"))
-                    && !StatusConstant.REQUEST_BUSINESS_TYPE_INSTANCE.equals(responseJson.getString("businessType"))){
-                return ;
-            }
-            try {
-                KafkaFactory.sendKafkaMessage(KafkaConstant.TOPIC_NOTIFY_CENTER_SERVICE_NAME, "", responseJson.toJSONString());
-            }catch (Exception e){
-                logger.error("用户服务通知centerService失败"+responseJson,e);
-                //这里保存异常信息
-            }
-        }
-    }
-
-
-    /**
-     * 这里预校验,请求报文中不能有 dataFlowId
-     * @param orderInfo
-     */
-    private void preValiateOrderInfo(String orderInfo) {
-       /* if(JSONObject.parseObject(orderInfo).getJSONObject("orders").containsKey("dataFlowId")){
-            throw new BusinessException(ResponseConstant.RESULT_CODE_ERROR,"报文中不能存在dataFlowId节点");
-        }*/
-    }
-
-    public IPropertyServiceSMO getPropertyServiceSMOImpl() {
-        return propertyServiceSMOImpl;
-    }
-
-    public void setPropertyServiceSMOImpl(IPropertyServiceSMO propertyServiceSMOImpl) {
-        this.propertyServiceSMOImpl = propertyServiceSMOImpl;
-    }
-}

+ 0 - 378
PropertyService/src/main/java/com/java110/property/listener/AbstractPropertyBusinessServiceDataFlowListener.java

@@ -1,378 +0,0 @@
-package com.java110.property.listener;
-
-import com.alibaba.fastjson.JSONObject;
-import com.java110.property.dao.IPropertyServiceDao;
-import com.java110.common.constant.ResponseConstant;
-import com.java110.common.constant.StatusConstant;
-import com.java110.common.exception.ListenerExecuteException;
-import com.java110.entity.center.Business;
-import com.java110.event.service.AbstractBusinessServiceDataFlowListener;
-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 AbstractPropertyBusinessServiceDataFlowListener extends AbstractBusinessServiceDataFlowListener{
-    private final static Logger logger = LoggerFactory.getLogger(AbstractPropertyBusinessServiceDataFlowListener.class);
-
-
-    /**
-     * 获取 DAO工具类
-     * @return
-     */
-    public abstract IPropertyServiceDao getPropertyServiceDaoImpl();
-
-    /**
-     * 刷新 businessPropertyInfo 数据
-     * 主要将 数据库 中字段和 接口传递字段建立关系
-     * @param businessPropertyInfo
-     */
-    protected void flushBusinessPropertyInfo(Map businessPropertyInfo,String statusCd){
-        businessPropertyInfo.put("newBId",businessPropertyInfo.get("b_id"));
-        businessPropertyInfo.put("propertyId",businessPropertyInfo.get("property_id"));
-        businessPropertyInfo.put("nearbyLandmarks",businessPropertyInfo.get("nearby_landmarks"));
-        businessPropertyInfo.put("mapX",businessPropertyInfo.get("map_x"));
-        businessPropertyInfo.put("mapY",businessPropertyInfo.get("map_y"));
-        businessPropertyInfo.put("statusCd", statusCd);
-    }
-
-    /**
-        刷新 businessPropertyAttr 数据
-     * 主要将 数据库 中字段和 接口传递字段建立关系
-     * @param businessPropertyAttr
-     * @param statusCd
-     */
-    protected void flushBusinessPropertyAttr(Map businessPropertyAttr,String statusCd){
-        businessPropertyAttr.put("attrId",businessPropertyAttr.get("attr_id"));
-        businessPropertyAttr.put("specCd",businessPropertyAttr.get("spec_cd"));
-        businessPropertyAttr.put("propertyId",businessPropertyAttr.get("property_id"));
-        businessPropertyAttr.put("newBId",businessPropertyAttr.get("b_id"));
-        businessPropertyAttr.put("statusCd",statusCd);
-    }
-
-    /**
-     * 刷新 businessPropertyInfo 数据
-     * 主要将 数据库 中字段和 接口传递字段建立关系
-     * @param businessPropertyHouse
-     */
-    protected void flushBusinessPropertyHouse(Map businessPropertyHouse,String statusCd){
-        businessPropertyHouse.put("newBId",businessPropertyHouse.get("b_id"));
-        businessPropertyHouse.put("propertyId",businessPropertyHouse.get("property_id"));
-        businessPropertyHouse.put("houseId",businessPropertyHouse.get("house_id"));
-        businessPropertyHouse.put("houseNum",businessPropertyHouse.get("house_num"));
-        businessPropertyHouse.put("houseName",businessPropertyHouse.get("house_name"));
-        businessPropertyHouse.put("housePhone",businessPropertyHouse.get("house_phone"));
-        businessPropertyHouse.put("houseArea",businessPropertyHouse.get("house_area"));
-        businessPropertyHouse.put("feeTypeCd",businessPropertyHouse.get("fee_type_cd"));
-        businessPropertyHouse.put("feePrice",businessPropertyHouse.get("fee_price"));
-        businessPropertyHouse.put("statusCd", statusCd);
-    }
-
-    /**
-     刷新 businessPropertyAttr 数据
-     * 主要将 数据库 中字段和 接口传递字段建立关系
-     * @param businessPropertyHouesAttr
-     * @param statusCd
-     */
-    protected void flushBusinessPropertyHouseAttr(Map businessPropertyHouesAttr,String statusCd){
-        businessPropertyHouesAttr.put("attrId",businessPropertyHouesAttr.get("attr_id"));
-        businessPropertyHouesAttr.put("specCd",businessPropertyHouesAttr.get("spec_cd"));
-        businessPropertyHouesAttr.put("houseId",businessPropertyHouesAttr.get("house_id"));
-        businessPropertyHouesAttr.put("newBId",businessPropertyHouesAttr.get("b_id"));
-        businessPropertyHouesAttr.put("statusCd",statusCd);
-    }
-
-    /**
-     * 刷新 businessPropertyPhoto 数据
-     * @param businessPropertyPhoto
-     * @param statusCd
-     */
-    protected void flushBusinessPropertyPhoto(Map businessPropertyPhoto,String statusCd){
-        businessPropertyPhoto.put("propertyId",businessPropertyPhoto.get("property_id"));
-        businessPropertyPhoto.put("propertyPhotoId",businessPropertyPhoto.get("property_photo_id"));
-        businessPropertyPhoto.put("propertyPhotoTypeCd",businessPropertyPhoto.get("property_photo_type_cd"));
-        businessPropertyPhoto.put("newBId",businessPropertyPhoto.get("b_id"));
-        businessPropertyPhoto.put("statusCd",statusCd);
-    }
-
-    /**
-     * 刷新 businessPropertyPhoto 数据
-     * @param businessPropertyUser
-     * @param statusCd
-     */
-    protected void flushBusinessPropertyUser(Map businessPropertyUser,String statusCd){
-        businessPropertyUser.put("propertyId",businessPropertyUser.get("property_id"));
-        businessPropertyUser.put("propertyUserId",businessPropertyUser.get("property_user_id"));
-        businessPropertyUser.put("userId",businessPropertyUser.get("user_id"));
-        businessPropertyUser.put("relCd",businessPropertyUser.get("rel_cd"));
-        businessPropertyUser.put("newBId",businessPropertyUser.get("b_id"));
-        businessPropertyUser.put("statusCd",statusCd);
-    }
-
-
-    /**
-     * 刷新 businessPropertyPhoto 数据
-     * @param businessPropertyFee
-     * @param statusCd
-     */
-    protected void flushBusinessPropertyFee(Map businessPropertyFee,String statusCd){
-        businessPropertyFee.put("propertyId",businessPropertyFee.get("property_id"));
-        businessPropertyFee.put("feeId",businessPropertyFee.get("fee_id"));
-        businessPropertyFee.put("propertyId",businessPropertyFee.get("property_id"));
-        businessPropertyFee.put("feeTypeCd",businessPropertyFee.get("fee_type_cd"));
-
-        businessPropertyFee.put("feeMoney",businessPropertyFee.get("fee_money"));
-        businessPropertyFee.put("feeTime",businessPropertyFee.get("fee_time"));
-        businessPropertyFee.put("startTime",businessPropertyFee.get("start_time"));
-        businessPropertyFee.put("endTime",businessPropertyFee.get("end_time"));
-        businessPropertyFee.put("newBId",businessPropertyFee.get("b_id"));
-        businessPropertyFee.put("statusCd",statusCd);
-    }
-
-    /**
-     * 刷新 businessPropertyCerdentials 数据
-     * @param businessPropertyCerdentials
-     * @param statusCd
-     */
-    protected void flushBusinessPropertyCredentials(Map businessPropertyCerdentials ,String statusCd){
-        businessPropertyCerdentials.put("propertyId",businessPropertyCerdentials.get("property_id"));
-        businessPropertyCerdentials.put("propertyCerdentialsId",businessPropertyCerdentials.get("property_cerdentials_id"));
-        businessPropertyCerdentials.put("credentialsCd",businessPropertyCerdentials.get("credentials_cd"));
-        businessPropertyCerdentials.put("validityPeriod",businessPropertyCerdentials.get("validity_period"));
-        businessPropertyCerdentials.put("positivePhoto",businessPropertyCerdentials.get("positive_photo"));
-        businessPropertyCerdentials.put("negativePhoto",businessPropertyCerdentials.get("negative_photo"));
-        businessPropertyCerdentials.put("newBId",businessPropertyCerdentials.get("b_id"));
-        businessPropertyCerdentials.put("statusCd",statusCd);
-    }
-
-
-
-    /**
-     * 刷新 businessMemberProperty 数据
-     * 主要将 数据库 中字段和 接口传递字段建立关系
-     * @param businessMemberProperty
-     */
-    protected void flushBusinessMemberProperty(Map businessMemberProperty,String statusCd){
-        businessMemberProperty.put("newBId",businessMemberProperty.get("b_id"));
-        businessMemberProperty.put("propertyId",businessMemberProperty.get("property_id"));
-        businessMemberProperty.put("memberPropertyId",businessMemberProperty.get("member_property_id"));
-        businessMemberProperty.put("memberId",businessMemberProperty.get("member_id"));
-        businessMemberProperty.put("statusCd", statusCd);
-    }
-
-    /**
-     * 当修改数据时,查询instance表中的数据 自动保存删除数据到business中
-     * @param businessProperty 物业信息
-     */
-    protected void autoSaveDelBusinessProperty(Business business, JSONObject businessProperty){
-//自动插入DEL
-        Map info = new HashMap();
-        info.put("propertyId",businessProperty.getString("propertyId"));
-        info.put("statusCd",StatusConstant.STATUS_CD_VALID);
-        Map currentPropertyInfo = getPropertyServiceDaoImpl().getPropertyInfo(info);
-        if(currentPropertyInfo == null || currentPropertyInfo.isEmpty()){
-            throw new ListenerExecuteException(ResponseConstant.RESULT_PARAM_ERROR,"未找到需要修改数据信息,入参错误或数据有问题,请检查"+info);
-        }
-        currentPropertyInfo.put("bId",business.getbId());
-        currentPropertyInfo.put("propertyId",currentPropertyInfo.get("property_id"));
-        currentPropertyInfo.put("nearbyLandmarks",currentPropertyInfo.get("nearby_landmarks"));
-        currentPropertyInfo.put("mapX",currentPropertyInfo.get("map_x"));
-        currentPropertyInfo.put("mapY",currentPropertyInfo.get("map_y"));
-        currentPropertyInfo.put("operate",StatusConstant.OPERATE_DEL);
-        getPropertyServiceDaoImpl().saveBusinessPropertyInfo(currentPropertyInfo);
-    }
-
-    /**
-     * 当修改数据时,查询instance表中的数据 自动保存删除数据到business中
-     * @param business 当前业务
-     * @param propertyAttr 物业属性
-     */
-    protected void autoSaveDelBusinessPropertyAttr(Business business, JSONObject propertyAttr){
-        Map info = new HashMap();
-        info.put("attrId",propertyAttr.getString("attrId"));
-        info.put("propertyId",propertyAttr.getString("propertyId"));
-        info.put("statusCd",StatusConstant.STATUS_CD_VALID);
-        List<Map> currentPropertyAttrs = getPropertyServiceDaoImpl().getPropertyAttrs(info);
-        if(currentPropertyAttrs == null || currentPropertyAttrs.size() != 1){
-            throw new ListenerExecuteException(ResponseConstant.RESULT_PARAM_ERROR,"未找到需要修改数据信息,入参错误或数据有问题,请检查"+info);
-        }
-        Map currentPropertyAttr = currentPropertyAttrs.get(0);
-        currentPropertyAttr.put("bId",business.getbId());
-        currentPropertyAttr.put("attrId",currentPropertyAttr.get("attr_id"));
-        currentPropertyAttr.put("propertyId",currentPropertyAttr.get("property_id"));
-        currentPropertyAttr.put("specCd",currentPropertyAttr.get("spec_cd"));
-        currentPropertyAttr.put("operate",StatusConstant.OPERATE_DEL);
-        getPropertyServiceDaoImpl().saveBusinessPropertyAttr(currentPropertyAttr);
-        //这个不允许修改,这里直接写入查出来的
-        propertyAttr.put("specCd",currentPropertyAttr.get("spec_cd"));
-    }
-
-    /**
-     * 当修改数据时,查询instance表中的数据 自动保存删除数据到business中
-     * @param businessPropertyHouse 物业信息
-     */
-    protected void autoSaveDelBusinessPropertyHouse(Business business, JSONObject businessPropertyHouse){
-//自动插入DEL
-        Map info = new HashMap();
-        info.put("houseId",businessPropertyHouse.getString("houseId"));
-        info.put("statusCd",StatusConstant.STATUS_CD_VALID);
-        Map currentPropertyHouse = getPropertyServiceDaoImpl().getPropertyHouse(info);
-        if(currentPropertyHouse == null || currentPropertyHouse.isEmpty()){
-            throw new ListenerExecuteException(ResponseConstant.RESULT_PARAM_ERROR,"未找到需要修改数据信息,入参错误或数据有问题,请检查"+info);
-        }
-        currentPropertyHouse.put("bId",business.getbId());
-        currentPropertyHouse.put("propertyId",currentPropertyHouse.get("property_id"));
-        currentPropertyHouse.put("houseId",currentPropertyHouse.get("house_id"));
-        currentPropertyHouse.put("houseNum",currentPropertyHouse.get("house_num"));
-        currentPropertyHouse.put("houseName",currentPropertyHouse.get("house_name"));
-        currentPropertyHouse.put("housePhone",currentPropertyHouse.get("house_phone"));
-        currentPropertyHouse.put("houseArea",currentPropertyHouse.get("house_area"));
-        currentPropertyHouse.put("feeTypeCd",currentPropertyHouse.get("fee_type_cd"));
-        currentPropertyHouse.put("feePrice",currentPropertyHouse.get("fee_price"));
-        currentPropertyHouse.put("operate",StatusConstant.OPERATE_DEL);
-        getPropertyServiceDaoImpl().saveBusinessPropertyHouse(currentPropertyHouse);
-    }
-
-    /**
-     * 当修改数据时,查询instance表中的数据 自动保存删除数据到business中
-     * @param business 当前业务
-     * @param propertyHouseAttr 物业属性
-     */
-    protected void autoSaveDelBusinessPropertyHouseAttr(Business business, JSONObject propertyHouseAttr){
-        Map info = new HashMap();
-        info.put("attrId",propertyHouseAttr.getString("attrId"));
-        info.put("houseId",propertyHouseAttr.getString("houseId"));
-        info.put("statusCd",StatusConstant.STATUS_CD_VALID);
-        List<Map> currentPropertyHouseAttrs = getPropertyServiceDaoImpl().getPropertyHouseAttrs(info);
-        if(currentPropertyHouseAttrs == null || currentPropertyHouseAttrs.size() != 1){
-            throw new ListenerExecuteException(ResponseConstant.RESULT_PARAM_ERROR,"未找到需要修改数据信息,入参错误或数据有问题,请检查"+info);
-        }
-        Map currentPropertyHouseAttr = currentPropertyHouseAttrs.get(0);
-        currentPropertyHouseAttr.put("bId",business.getbId());
-        currentPropertyHouseAttr.put("attrId",currentPropertyHouseAttr.get("attr_id"));
-        currentPropertyHouseAttr.put("houseId",currentPropertyHouseAttr.get("house_id"));
-        currentPropertyHouseAttr.put("specCd",currentPropertyHouseAttr.get("spec_cd"));
-        currentPropertyHouseAttr.put("operate",StatusConstant.OPERATE_DEL);
-        getPropertyServiceDaoImpl().saveBusinessPropertyHouseAttr(currentPropertyHouseAttr);
-        //这个不允许修改,这里直接写入查出来的
-        propertyHouseAttr.put("specCd",currentPropertyHouseAttr.get("spec_cd"));
-    }
-
-    /**
-     * 当修改数据时,查询instance表中的数据 自动保存删除数据到business中
-     * @param business
-     * @param businessPropertyPhoto 物业照片
-     */
-    protected void autoSaveDelBusinessPropertyPhoto(Business business,JSONObject businessPropertyPhoto){
-       Map info = new HashMap();
-        info.put("propertyPhotoId",businessPropertyPhoto.getString("propertyPhotoId"));
-        info.put("propertyId",businessPropertyPhoto.getString("propertyId"));
-        info.put("statusCd",StatusConstant.STATUS_CD_VALID);
-        List<Map> currentPropertyPhotos = getPropertyServiceDaoImpl().getPropertyPhoto(info);
-        if(currentPropertyPhotos == null || currentPropertyPhotos.size() != 1){
-            throw new ListenerExecuteException(ResponseConstant.RESULT_PARAM_ERROR,"未找到需要修改数据信息,入参错误或数据有问题,请检查"+info);
-        }
-        Map currentPropertyPhoto = currentPropertyPhotos.get(0);
-        currentPropertyPhoto.put("bId",business.getbId());
-        currentPropertyPhoto.put("propertyPhotoId",currentPropertyPhoto.get("property_photo_id"));
-        currentPropertyPhoto.put("propertyId",currentPropertyPhoto.get("property_id"));
-        currentPropertyPhoto.put("propertyPhotoTypeCd",currentPropertyPhoto.get("property_photo_type_cd"));
-        currentPropertyPhoto.put("operate",StatusConstant.OPERATE_DEL);
-        getPropertyServiceDaoImpl().saveBusinessPropertyPhoto(currentPropertyPhoto);
-    }
-
-    /**
-     * 当修改数据时,查询instance表中的数据 自动保存删除数据到business中
-     * @param business
-     * @param businessPropertyUser 物业用户
-     */
-    protected void autoSaveDelBusinessPropertyUser(Business business,JSONObject businessPropertyUser){
-        Map info = new HashMap();
-        info.put("propertyUserId",businessPropertyUser.getString("propertyUserId"));
-        info.put("propertyId",businessPropertyUser.getString("propertyId"));
-        info.put("statusCd",StatusConstant.STATUS_CD_VALID);
-        List<Map> currentPropertyUsers = getPropertyServiceDaoImpl().getPropertyUser(info);
-        if(currentPropertyUsers == null || currentPropertyUsers.size() != 1){
-            throw new ListenerExecuteException(ResponseConstant.RESULT_PARAM_ERROR,"未找到需要修改数据信息,入参错误或数据有问题,请检查"+info);
-        }
-        Map currentPropertyUser = currentPropertyUsers.get(0);
-        currentPropertyUser.put("bId",business.getbId());
-        currentPropertyUser.put("propertyUserId",currentPropertyUser.get("property_user_id"));
-        currentPropertyUser.put("propertyId",currentPropertyUser.get("property_id"));
-        currentPropertyUser.put("userId",currentPropertyUser.get("user_id"));
-        currentPropertyUser.put("relCd",currentPropertyUser.get("rel_cd"));
-        currentPropertyUser.put("operate",StatusConstant.OPERATE_DEL);
-        getPropertyServiceDaoImpl().saveBusinessPropertyUser(currentPropertyUser);
-    }
-
-    /**
-     * 当修改数据时,查询instance表中的数据 自动保存删除数据到business中
-     * @param business
-     * @param businessPropertyFee 物业费用
-     */
-    protected void autoSaveDelBusinessPropertyFee(Business business,JSONObject businessPropertyFee){
-        Map info = new HashMap();
-        info.put("feeId",businessPropertyFee.getString("feeId"));
-        info.put("propertyId",businessPropertyFee.getString("propertyId"));
-        info.put("statusCd",StatusConstant.STATUS_CD_VALID);
-        List<Map> currentPropertyFees = getPropertyServiceDaoImpl().getPropertyFee(info);
-        if(currentPropertyFees == null || currentPropertyFees.size() != 1){
-            throw new ListenerExecuteException(ResponseConstant.RESULT_PARAM_ERROR,"未找到需要修改数据信息,入参错误或数据有问题,请检查"+info);
-        }
-        Map currentPropertyFee = currentPropertyFees.get(0);
-        currentPropertyFee.put("bId",business.getbId());
-        currentPropertyFee.put("feeId",currentPropertyFee.get("fee_id"));
-        currentPropertyFee.put("propertyId",currentPropertyFee.get("property_id"));
-        currentPropertyFee.put("feeTypeCd",currentPropertyFee.get("fee_type_cd"));
-
-        currentPropertyFee.put("feeMoney",currentPropertyFee.get("fee_money"));
-        currentPropertyFee.put("feeTime",currentPropertyFee.get("fee_time"));
-        currentPropertyFee.put("startTime",currentPropertyFee.get("start_time"));
-        currentPropertyFee.put("endTime",currentPropertyFee.get("end_time"));
-        currentPropertyFee.put("operate",StatusConstant.OPERATE_DEL);
-        getPropertyServiceDaoImpl().saveBusinessPropertyFee(currentPropertyFee);
-
-        businessPropertyFee.put("feeTypeCd",currentPropertyFee.get("fee_type_cd"));
-    }
-
-
-    /**
-     * 当修改数据时,查询instance表中的数据 自动保存删除数据到business中
-     * @param business
-     * @param businessPropertyCerdentials 物业证件
-     */
-    protected void autoSaveDelBusinessPropertyCerdentials(Business business,JSONObject businessPropertyCerdentials){
-        Map info = new HashMap();
-        info.put("propertyCerdentialsId",businessPropertyCerdentials.getString("propertyCerdentialsId"));
-        info.put("propertyId",businessPropertyCerdentials.getString("propertyId"));
-        info.put("statusCd",StatusConstant.STATUS_CD_VALID);
-        List<Map> currentPropertyCerdentailses = getPropertyServiceDaoImpl().getPropertyCerdentials(info);
-        if(currentPropertyCerdentailses == null || currentPropertyCerdentailses.size() != 1){
-            throw new ListenerExecuteException(ResponseConstant.RESULT_PARAM_ERROR,"未找到需要修改数据信息,入参错误或数据有问题,请检查"+info);
-        }
-        Map currentPropertyCerdentials = currentPropertyCerdentailses.get(0);
-
-        currentPropertyCerdentials.put("bId",business.getbId());
-        currentPropertyCerdentials.put("propertyCerdentialsId",currentPropertyCerdentials.get("property_cerdentials_id"));
-        currentPropertyCerdentials.put("propertyId",currentPropertyCerdentials.get("property_id"));
-        currentPropertyCerdentials.put("credentialsCd",currentPropertyCerdentials.get("credentials_cd"));
-        currentPropertyCerdentials.put("validityPeriod",currentPropertyCerdentials.get("validity_period"));
-        currentPropertyCerdentials.put("positivePhoto",currentPropertyCerdentials.get("positive_photo"));
-        currentPropertyCerdentials.put("negativePhoto",currentPropertyCerdentials.get("negative_photo"));
-        currentPropertyCerdentials.put("operate",StatusConstant.OPERATE_DEL);
-        getPropertyServiceDaoImpl().saveBusinessPropertyCerdentials(currentPropertyCerdentials);
-
-        //证件类型不让修改
-        businessPropertyCerdentials.put("credentialsCd",currentPropertyCerdentials.get("credentials_cd"));
-    }
-
-
-
-}

+ 0 - 153
PropertyService/src/main/java/com/java110/property/listener/DeletePropertyAttrListener.java

@@ -1,153 +0,0 @@
-package com.java110.property.listener;
-
-import com.alibaba.fastjson.JSONArray;
-import com.alibaba.fastjson.JSONObject;
-import com.java110.common.constant.BusinessTypeConstant;
-import com.java110.common.constant.ResponseConstant;
-import com.java110.common.constant.StatusConstant;
-import com.java110.common.exception.ListenerExecuteException;
-import com.java110.common.util.Assert;
-import com.java110.core.annotation.Java110Listener;
-import com.java110.core.context.DataFlowContext;
-import com.java110.entity.center.Business;
-import com.java110.property.dao.IPropertyServiceDao;
-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、businessPropertyHouse:{} 物业住户信息节点
- * 2、businessPropertyAttr:[{}] 物业属性信息节点
- * Created by wuxw on 2018/5/18.
- */
-@Java110Listener("deletePropertyAttrListener")
-@Transactional
-public class DeletePropertyAttrListener extends AbstractPropertyBusinessServiceDataFlowListener {
-
-    private final static Logger logger = LoggerFactory.getLogger(DeletePropertyAttrListener.class);
-    @Autowired
-    IPropertyServiceDao propertyServiceDaoImpl;
-
-    @Override
-    public int getOrder() {
-        return 3;
-    }
-
-    @Override
-    public String getBusinessTypeCd() {
-        return BusinessTypeConstant.BUSINESS_TYPE_DELETE_PROPERTY_ATTR;
-    }
-
-    /**
-     * 根据删除信息 查出Instance表中数据 保存至business表 (状态写DEL) 方便撤单时直接更新回去
-     * @param dataFlowContext 数据对象
-     * @param business 当前业务对象
-     */
-    @Override
-    protected void doSaveBusiness(DataFlowContext dataFlowContext, Business business) {
-        JSONObject data = business.getDatas();
-
-        Assert.notEmpty(data,"没有datas 节点,或没有子节点需要处理");
-
-        if(data.containsKey("businessPropertyAttr")){
-            JSONArray businessPropertyAttrs = data.getJSONArray("businessPropertyAttr");
-            doSaveBusinessPropertyAttrs(business,businessPropertyAttrs);
-        }
-    }
-
-    /**
-     * 删除 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> businessPropertyAttrs = propertyServiceDaoImpl.getBusinessPropertyAttrs(info);
-        if(businessPropertyAttrs != null && businessPropertyAttrs.size() > 0) {
-            for(Map businessPropertyAttr : businessPropertyAttrs) {
-                flushBusinessPropertyAttr(businessPropertyAttr,StatusConstant.STATUS_CD_INVALID);
-                propertyServiceDaoImpl.updatePropertyAttrInstance(businessPropertyAttr);
-            }
-        }
-    }
-
-    /**
-     * 撤单
-     * 从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> propertyAttrs = propertyServiceDaoImpl.getPropertyAttrs(info);
-        if(propertyAttrs != null && propertyAttrs.size()>0){
-
-            List<Map> businessPropertyAttrs = propertyServiceDaoImpl.getBusinessPropertyAttrs(delInfo);
-            //除非程序出错了,这里不会为空
-            if(businessPropertyAttrs == null || businessPropertyAttrs.size() ==0 ){
-                throw new ListenerExecuteException(ResponseConstant.RESULT_CODE_INNER_ERROR,"撤单失败(property_attr),程序内部异常,请检查! "+delInfo);
-            }
-            for(Map businessPropertyAttr : businessPropertyAttrs) {
-                flushBusinessPropertyAttr(businessPropertyAttr,StatusConstant.STATUS_CD_VALID);
-                propertyServiceDaoImpl.updatePropertyAttrInstance(businessPropertyAttr);
-            }
-        }
-    }
-
-
-
-    /**
-     * 保存物业属性信息
-     * @param business 当前业务
-     * @param businessPropertyAttrs 物业属性
-     */
-    private void doSaveBusinessPropertyAttrs(Business business,JSONArray businessPropertyAttrs){
-        JSONObject data = business.getDatas();
-
-        for(int propertyAttrIndex = 0 ; propertyAttrIndex < businessPropertyAttrs.size();propertyAttrIndex ++){
-            JSONObject propertyAttr = businessPropertyAttrs.getJSONObject(propertyAttrIndex);
-            Assert.jsonObjectHaveKey(propertyAttr,"attrId","businessPropertyAttr 节点下没有包含 attrId 节点");
-            if(propertyAttr.getString("attrId").startsWith("-")){
-                throw new ListenerExecuteException(ResponseConstant.RESULT_PARAM_ERROR,"attrId 错误,不能自动生成(必须已经存在的attrId)"+propertyAttr);
-            }
-
-            autoSaveDelBusinessPropertyAttr(business,propertyAttr);
-        }
-    }
-
-    public IPropertyServiceDao getPropertyServiceDaoImpl() {
-        return propertyServiceDaoImpl;
-    }
-
-    public void setPropertyServiceDaoImpl(IPropertyServiceDao propertyServiceDaoImpl) {
-        this.propertyServiceDaoImpl = propertyServiceDaoImpl;
-    }
-}

+ 0 - 157
PropertyService/src/main/java/com/java110/property/listener/DeletePropertyCerdentialsListener.java

@@ -1,157 +0,0 @@
-package com.java110.property.listener;
-
-import com.alibaba.fastjson.JSONArray;
-import com.alibaba.fastjson.JSONObject;
-import com.java110.common.constant.BusinessTypeConstant;
-import com.java110.common.constant.ResponseConstant;
-import com.java110.common.constant.ServiceCodeConstant;
-import com.java110.common.constant.StatusConstant;
-import com.java110.common.exception.ListenerExecuteException;
-import com.java110.common.util.Assert;
-import com.java110.core.annotation.Java110Listener;
-import com.java110.core.context.DataFlowContext;
-import com.java110.entity.center.Business;
-import com.java110.property.dao.IPropertyServiceDao;
-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、businessProperty:{} 物业基本信息节点
- * 2、businessPropertyAttr:[{}] 物业属性信息节点
- * 3、businessPropertyPhoto:[{}] 物业照片信息节点
- * 4、businessPropertyCerdentials:[{}] 物业证件信息节点
- * 协议地址 :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("deletePropertyCerdentialsListener")
-@Transactional
-public class DeletePropertyCerdentialsListener extends AbstractPropertyBusinessServiceDataFlowListener {
-
-    private final static Logger logger = LoggerFactory.getLogger(DeletePropertyCerdentialsListener.class);
-    @Autowired
-    IPropertyServiceDao propertyServiceDaoImpl;
-
-    @Override
-    public int getOrder() {
-        return 3;
-    }
-
-    @Override
-    public String getBusinessTypeCd() {
-        return BusinessTypeConstant.BUSINESS_TYPE_DELETE_PROPERTY_CERDENTIALS;
-    }
-
-    /**
-     * 根据删除信息 查出Instance表中数据 保存至business表 (状态写DEL) 方便撤单时直接更新回去
-     * @param dataFlowContext 数据对象
-     * @param business 当前业务对象
-     */
-    @Override
-    protected void doSaveBusiness(DataFlowContext dataFlowContext, Business business) {
-        JSONObject data = business.getDatas();
-
-        Assert.notEmpty(data,"没有datas 节点,或没有子节点需要处理");
-
-        if(data.containsKey("businessPropertyCerdentials")){
-            JSONArray businessPropertyCerdentialses = data.getJSONArray("businessPropertyCerdentials");
-            doBusinessPropertyCerdentials(business,businessPropertyCerdentialses);
-        }
-    }
-
-    /**
-     * 删除 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> businessPropertyCerdentialses = propertyServiceDaoImpl.getBusinessPropertyCerdentials(info);
-        if(businessPropertyCerdentialses != null && businessPropertyCerdentialses.size()>0){
-            for(Map businessPropertyCerdentials : businessPropertyCerdentialses) {
-                flushBusinessPropertyCredentials(businessPropertyCerdentials,StatusConstant.STATUS_CD_INVALID);
-                propertyServiceDaoImpl.updatePropertyCerdentailsInstance(businessPropertyCerdentials);
-            }
-        }
-    }
-
-    /**
-     * 撤单
-     * 从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> propertyCerdentialses = propertyServiceDaoImpl.getPropertyCerdentials(info);
-        if(propertyCerdentialses != null && propertyCerdentialses.size()>0){
-            List<Map> businessPropertyCerdentialses = propertyServiceDaoImpl.getBusinessPropertyCerdentials(delInfo);
-            //除非程序出错了,这里不会为空
-            if(businessPropertyCerdentialses == null || businessPropertyCerdentialses.size() ==0 ){
-                throw new ListenerExecuteException(ResponseConstant.RESULT_CODE_INNER_ERROR,"撤单失败(property_cerdentials),程序内部异常,请检查! "+delInfo);
-            }
-            for(Map businessPropertyCerdentials : businessPropertyCerdentialses) {
-                flushBusinessPropertyCredentials(businessPropertyCerdentials,StatusConstant.STATUS_CD_VALID);
-                propertyServiceDaoImpl.updatePropertyCerdentailsInstance(businessPropertyCerdentials);
-            }
-        }
-    }
-
-
-
-    /**
-     * 保存 物业证件 信息
-     * @param business 当前业务
-     * @param businessPropertyCerdentialses 物业证件
-     */
-    private void doBusinessPropertyCerdentials(Business business, JSONArray businessPropertyCerdentialses) {
-
-
-        for(int businessPropertyCerdentialsIndex = 0 ; businessPropertyCerdentialsIndex < businessPropertyCerdentialses.size() ; businessPropertyCerdentialsIndex ++) {
-            JSONObject businessPropertyCerdentials = businessPropertyCerdentialses.getJSONObject(businessPropertyCerdentialsIndex);
-            Assert.jsonObjectHaveKey(businessPropertyCerdentials, "propertyCerdentialsId", "businessPropertyPhoto 节点下没有包含 propertyCerdentialsId 节点");
-
-            if (businessPropertyCerdentials.getString("propertyCerdentialsId").startsWith("-")) {
-                throw new ListenerExecuteException(ResponseConstant.RESULT_PARAM_ERROR,"propertyPhotoId 错误,不能自动生成(必须已经存在的propertyPhotoId)"+businessPropertyCerdentials);
-            }
-
-            autoSaveDelBusinessPropertyCerdentials(business,businessPropertyCerdentials);
-        }
-    }
-
-    public IPropertyServiceDao getPropertyServiceDaoImpl() {
-        return propertyServiceDaoImpl;
-    }
-
-    public void setPropertyServiceDaoImpl(IPropertyServiceDao propertyServiceDaoImpl) {
-        this.propertyServiceDaoImpl = propertyServiceDaoImpl;
-    }
-}

+ 0 - 199
PropertyService/src/main/java/com/java110/property/listener/DeletePropertyHouseListener.java

@@ -1,199 +0,0 @@
-package com.java110.property.listener;
-
-import com.alibaba.fastjson.JSONArray;
-import com.alibaba.fastjson.JSONObject;
-import com.java110.common.constant.BusinessTypeConstant;
-import com.java110.common.constant.ResponseConstant;
-import com.java110.common.constant.ServiceCodeConstant;
-import com.java110.common.constant.StatusConstant;
-import com.java110.common.exception.ListenerExecuteException;
-import com.java110.common.util.Assert;
-import com.java110.core.annotation.Java110Listener;
-import com.java110.core.context.DataFlowContext;
-import com.java110.entity.center.Business;
-import com.java110.property.dao.IPropertyServiceDao;
-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、businessPropertyHouse:{} 物业住户信息节点
- * 2、businessPropertyHouseAttr:[{}] 物业属性信息节点
- * Created by wuxw on 2018/5/18.
- */
-@Java110Listener("deletePropertyHouseListener")
-@Transactional
-public class DeletePropertyHouseListener extends AbstractPropertyBusinessServiceDataFlowListener {
-
-    private final static Logger logger = LoggerFactory.getLogger(DeletePropertyHouseListener.class);
-    @Autowired
-    IPropertyServiceDao propertyServiceDaoImpl;
-
-    @Override
-    public int getOrder() {
-        return 3;
-    }
-
-    @Override
-    public String getBusinessTypeCd() {
-        return BusinessTypeConstant.BUSINESS_TYPE_DELETE_PROPERTY_HOUSE;
-    }
-
-    /**
-     * 根据删除信息 查出Instance表中数据 保存至business表 (状态写DEL) 方便撤单时直接更新回去
-     * @param dataFlowContext 数据对象
-     * @param business 当前业务对象
-     */
-    @Override
-    protected void doSaveBusiness(DataFlowContext dataFlowContext, Business business) {
-        JSONObject data = business.getDatas();
-
-        Assert.notEmpty(data,"没有datas 节点,或没有子节点需要处理");
-
-        //处理 businessPropertyHouse 节点 按理这里不应该处理,程序上支持,以防真有这种业务
-        if(data.containsKey("businessPropertyHouse")){
-            JSONObject businessPropertyHouse = data.getJSONObject("businessPropertyHouse");
-            doBusinessPropertyHouse(business,businessPropertyHouse);
-            dataFlowContext.addParamOut("houseId",businessPropertyHouse.getString("houseId"));
-        }
-
-        if(data.containsKey("businessPropertyHouseAttr")){
-            JSONArray businessPropertyHouseAttrs = data.getJSONArray("businessPropertyHouseAttr");
-            doSaveBusinessPropertyHouseAttrs(business,businessPropertyHouseAttrs);
-        }
-    }
-
-    /**
-     * 删除 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);
-
-        //物业信息
-        Map businessPropertyHouseInfo = propertyServiceDaoImpl.getBusinessPropertyHouse(info);
-        if( businessPropertyHouseInfo != null && !businessPropertyHouseInfo.isEmpty()) {
-            flushBusinessPropertyHouse(businessPropertyHouseInfo,StatusConstant.STATUS_CD_INVALID);
-            propertyServiceDaoImpl.updatePropertyHouseInstance(businessPropertyHouseInfo);
-            dataFlowContext.addParamOut("houseId",businessPropertyHouseInfo.get("house_id"));
-        }
-        //物业属性
-        List<Map> businessPropertyHouseAttrs = propertyServiceDaoImpl.getBusinessPropertyHouseAttrs(info);
-        if(businessPropertyHouseAttrs != null && businessPropertyHouseAttrs.size() > 0) {
-            for(Map businessPropertyHouseAttr : businessPropertyHouseAttrs) {
-                flushBusinessPropertyHouseAttr(businessPropertyHouseAttr,StatusConstant.STATUS_CD_INVALID);
-                propertyServiceDaoImpl.updatePropertyHouseAttrInstance(businessPropertyHouseAttr);
-            }
-        }
-    }
-
-    /**
-     * 撤单
-     * 从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);
-        //物业信息
-        Map propertyInfo = propertyServiceDaoImpl.getPropertyInfo(info);
-        if(propertyInfo != null && !propertyInfo.isEmpty()){
-
-            //物业信息
-            Map businessPropertyHouseInfo = propertyServiceDaoImpl.getBusinessPropertyHouse(delInfo);
-            //除非程序出错了,这里不会为空
-            if(businessPropertyHouseInfo == null || businessPropertyHouseInfo.isEmpty()){
-                throw new ListenerExecuteException(ResponseConstant.RESULT_CODE_INNER_ERROR,"撤单失败(house),程序内部异常,请检查! "+delInfo);
-            }
-
-            flushBusinessPropertyHouse(businessPropertyHouseInfo,StatusConstant.STATUS_CD_VALID);
-            propertyServiceDaoImpl.updatePropertyHouseInstance(businessPropertyHouseInfo);
-            dataFlowContext.addParamOut("houseId",propertyInfo.get("house_id"));
-        }
-
-        //物业属性
-        List<Map> propertyAttrs = propertyServiceDaoImpl.getPropertyHouseAttrs(info);
-        if(propertyAttrs != null && propertyAttrs.size()>0){
-
-            List<Map> businessPropertyHouseAttrs = propertyServiceDaoImpl.getBusinessPropertyHouseAttrs(delInfo);
-            //除非程序出错了,这里不会为空
-            if(businessPropertyHouseAttrs == null || businessPropertyHouseAttrs.size() ==0 ){
-                throw new ListenerExecuteException(ResponseConstant.RESULT_CODE_INNER_ERROR,"撤单失败(property_attr),程序内部异常,请检查! "+delInfo);
-            }
-            for(Map businessPropertyHouseAttr : businessPropertyHouseAttrs) {
-                flushBusinessPropertyHouseAttr(businessPropertyHouseAttr,StatusConstant.STATUS_CD_VALID);
-                propertyServiceDaoImpl.updatePropertyHouseAttrInstance(businessPropertyHouseAttr);
-            }
-        }
-    }
-
-    /**
-     * 处理 businessPropertyHouse 节点
-     * @param business 总的数据节点
-     * @param businessPropertyHouse 物业节点
-     */
-    private void doBusinessPropertyHouse(Business business,JSONObject businessPropertyHouse){
-
-        Assert.jsonObjectHaveKey(businessPropertyHouse,"houseId","businessPropertyHouse 节点下没有包含 houseId 节点");
-
-        if(businessPropertyHouse.getString("houseId").startsWith("-")){
-            throw new ListenerExecuteException(ResponseConstant.RESULT_PARAM_ERROR,"houseId 错误,不能自动生成(必须已经存在的houseId)"+businessPropertyHouse);
-        }
-        //自动插入DEL
-        autoSaveDelBusinessPropertyHouse(business,businessPropertyHouse);
-    }
-
-
-
-    /**
-     * 保存物业属性信息
-     * @param business 当前业务
-     * @param businessPropertyHouseAttrs 物业属性
-     */
-    private void doSaveBusinessPropertyHouseAttrs(Business business,JSONArray businessPropertyHouseAttrs){
-        JSONObject data = business.getDatas();
-
-        for(int propertyAttrIndex = 0 ; propertyAttrIndex < businessPropertyHouseAttrs.size();propertyAttrIndex ++){
-            JSONObject propertyAttr = businessPropertyHouseAttrs.getJSONObject(propertyAttrIndex);
-            Assert.jsonObjectHaveKey(propertyAttr,"attrId","businessPropertyHouseAttr 节点下没有包含 attrId 节点");
-            if(propertyAttr.getString("attrId").startsWith("-")){
-                throw new ListenerExecuteException(ResponseConstant.RESULT_PARAM_ERROR,"attrId 错误,不能自动生成(必须已经存在的attrId)"+propertyAttr);
-            }
-
-            autoSaveDelBusinessPropertyHouseAttr(business,propertyAttr);
-        }
-    }
-
-    public IPropertyServiceDao getPropertyServiceDaoImpl() {
-        return propertyServiceDaoImpl;
-    }
-
-    public void setPropertyServiceDaoImpl(IPropertyServiceDao propertyServiceDaoImpl) {
-        this.propertyServiceDaoImpl = propertyServiceDaoImpl;
-    }
-}

+ 0 - 149
PropertyService/src/main/java/com/java110/property/listener/DeletePropertyPhotoListener.java

@@ -1,149 +0,0 @@
-package com.java110.property.listener;
-
-import com.alibaba.fastjson.JSONArray;
-import com.alibaba.fastjson.JSONObject;
-import com.java110.common.constant.BusinessTypeConstant;
-import com.java110.property.dao.IPropertyServiceDao;
-import com.java110.common.constant.ResponseConstant;
-import com.java110.common.constant.ServiceCodeConstant;
-import com.java110.common.constant.StatusConstant;
-import com.java110.common.exception.ListenerExecuteException;
-import com.java110.common.util.Assert;
-import com.java110.core.annotation.Java110Listener;
-import com.java110.core.context.DataFlowContext;
-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;
-
-/**
- * 删除物业信息 侦听
- *
- * 处理节点
- * 3、businessPropertyPhoto:[{}] 物业照片信息节点
- * Created by wuxw on 2018/5/18.
- */
-@Java110Listener("deletePropertyPhotoListener")
-@Transactional
-public class DeletePropertyPhotoListener extends AbstractPropertyBusinessServiceDataFlowListener {
-
-    private final static Logger logger = LoggerFactory.getLogger(DeletePropertyPhotoListener.class);
-    @Autowired
-    IPropertyServiceDao propertyServiceDaoImpl;
-
-    @Override
-    public int getOrder() {
-        return 3;
-    }
-
-    @Override
-    public String getBusinessTypeCd() {
-        return BusinessTypeConstant.BUSINESS_TYPE_DELETE_PROPERTY_PHOTO;
-    }
-
-    /**
-     * 根据删除信息 查出Instance表中数据 保存至business表 (状态写DEL) 方便撤单时直接更新回去
-     * @param dataFlowContext 数据对象
-     * @param business 当前业务对象
-     */
-    @Override
-    protected void doSaveBusiness(DataFlowContext dataFlowContext, Business business) {
-        JSONObject data = business.getDatas();
-
-        Assert.notEmpty(data,"没有datas 节点,或没有子节点需要处理");
-        if(data.containsKey("businessPropertyPhoto")){
-            JSONArray businessPropertyPhotos = data.getJSONArray("businessPropertyPhoto");
-            doBusinessPropertyPhoto(business,businessPropertyPhotos);
-        }
-    }
-
-    /**
-     * 删除 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> businessPropertyPhotos = propertyServiceDaoImpl.getBusinessPropertyPhoto(info);
-        if(businessPropertyPhotos != null && businessPropertyPhotos.size() >0){
-            for(Map businessPropertyPhoto : businessPropertyPhotos) {
-                flushBusinessPropertyPhoto(businessPropertyPhoto,StatusConstant.STATUS_CD_INVALID);
-                propertyServiceDaoImpl.updatePropertyPhotoInstance(businessPropertyPhoto);
-            }
-        }
-    }
-
-    /**
-     * 撤单
-     * 从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> propertyPhotos = propertyServiceDaoImpl.getPropertyPhoto(info);
-        if(propertyPhotos != null && propertyPhotos.size()>0){
-            List<Map> businessPropertyPhotos = propertyServiceDaoImpl.getBusinessPropertyPhoto(delInfo);
-            //除非程序出错了,这里不会为空
-            if(businessPropertyPhotos == null || businessPropertyPhotos.size() ==0 ){
-                throw new ListenerExecuteException(ResponseConstant.RESULT_CODE_INNER_ERROR,"撤单失败(property_photo),程序内部异常,请检查! "+delInfo);
-            }
-            for(Map businessPropertyPhoto : businessPropertyPhotos) {
-                flushBusinessPropertyPhoto(businessPropertyPhoto,StatusConstant.STATUS_CD_VALID);
-                propertyServiceDaoImpl.updatePropertyPhotoInstance(businessPropertyPhoto);
-            }
-        }
-
-    }
-
-    /**
-     * 保存物业照片
-     * @param business 业务对象
-     * @param businessPropertyPhotos 物业照片
-     */
-    private void doBusinessPropertyPhoto(Business business, JSONArray businessPropertyPhotos) {
-
-        for(int businessPropertyPhotoIndex = 0 ;businessPropertyPhotoIndex < businessPropertyPhotos.size();businessPropertyPhotoIndex++) {
-            JSONObject businessPropertyPhoto = businessPropertyPhotos.getJSONObject(businessPropertyPhotoIndex);
-            Assert.jsonObjectHaveKey(businessPropertyPhoto, "propertyPhotoId", "businessPropertyPhoto 节点下没有包含 propertyPhotoId 节点");
-
-            if (businessPropertyPhoto.getString("propertyPhotoId").startsWith("-")) {
-                throw new ListenerExecuteException(ResponseConstant.RESULT_PARAM_ERROR,"propertyPhotoId 错误,不能自动生成(必须已经存在的propertyPhotoId)"+businessPropertyPhoto);
-            }
-
-            autoSaveDelBusinessPropertyPhoto(business,businessPropertyPhoto);
-        }
-    }
-
-    public IPropertyServiceDao getPropertyServiceDaoImpl() {
-        return propertyServiceDaoImpl;
-    }
-
-    public void setPropertyServiceDaoImpl(IPropertyServiceDao propertyServiceDaoImpl) {
-        this.propertyServiceDaoImpl = propertyServiceDaoImpl;
-    }
-}

+ 0 - 153
PropertyService/src/main/java/com/java110/property/listener/DeletePropertyUserListener.java

@@ -1,153 +0,0 @@
-package com.java110.property.listener;
-
-import com.alibaba.fastjson.JSONArray;
-import com.alibaba.fastjson.JSONObject;
-import com.java110.common.constant.BusinessTypeConstant;
-import com.java110.common.constant.ResponseConstant;
-import com.java110.common.constant.ServiceCodeConstant;
-import com.java110.common.constant.StatusConstant;
-import com.java110.common.exception.ListenerExecuteException;
-import com.java110.common.util.Assert;
-import com.java110.core.annotation.Java110Listener;
-import com.java110.core.context.DataFlowContext;
-import com.java110.entity.center.Business;
-import com.java110.property.dao.IPropertyServiceDao;
-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;
-
-/**
- * 删除物业信息 侦听
- *
- * 处理节点
- * 3、businessPropertyUser:[{}] 物业照片信息节点
- * Created by wuxw on 2018/5/18.
- */
-@Java110Listener("deletePropertyUserListener")
-@Transactional
-public class DeletePropertyUserListener extends AbstractPropertyBusinessServiceDataFlowListener {
-
-    private final static Logger logger = LoggerFactory.getLogger(DeletePropertyUserListener.class);
-    @Autowired
-    IPropertyServiceDao propertyServiceDaoImpl;
-
-    @Override
-    public int getOrder() {
-        return 3;
-    }
-
-    @Override
-    public String getBusinessTypeCd() {
-        return BusinessTypeConstant.BUSINESS_TYPE_DELETE_PROPERTY_USER;
-    }
-
-    /**
-     * 根据删除信息 查出Instance表中数据 保存至business表 (状态写DEL) 方便撤单时直接更新回去
-     * @param dataFlowContext 数据对象
-     * @param business 当前业务对象
-     */
-    @Override
-    protected void doSaveBusiness(DataFlowContext dataFlowContext, Business business) {
-        JSONObject data = business.getDatas();
-
-        Assert.notEmpty(data,"没有datas 节点,或没有子节点需要处理");
-
-        if(data.containsKey("businessPropertyUser")){
-            JSONArray businessPropertyUsers = data.getJSONArray("businessPropertyUser");
-            doBusinessPropertyUser(business,businessPropertyUsers);
-        }
-
-    }
-
-    /**
-     * 删除 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> businessPropertyUsers = propertyServiceDaoImpl.getBusinessPropertyUser(info);
-        if(businessPropertyUsers != null && businessPropertyUsers.size() >0){
-            for(Map businessPropertyUser : businessPropertyUsers) {
-                flushBusinessPropertyUser(businessPropertyUser,StatusConstant.STATUS_CD_INVALID);
-                propertyServiceDaoImpl.updatePropertyUserInstance(businessPropertyUser);
-            }
-        }
-    }
-
-    /**
-     * 撤单
-     * 从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> propertyUsers = propertyServiceDaoImpl.getPropertyUser(info);
-        if(propertyUsers != null && propertyUsers.size()>0){
-            List<Map> businessPropertyUsers = propertyServiceDaoImpl.getBusinessPropertyUser(delInfo);
-            //除非程序出错了,这里不会为空
-            if(businessPropertyUsers == null || businessPropertyUsers.size() ==0 ){
-                throw new ListenerExecuteException(ResponseConstant.RESULT_CODE_INNER_ERROR,"撤单失败(property_photo),程序内部异常,请检查! "+delInfo);
-            }
-            for(Map businessPropertyUser : businessPropertyUsers) {
-                flushBusinessPropertyUser(businessPropertyUser,StatusConstant.STATUS_CD_VALID);
-                propertyServiceDaoImpl.updatePropertyUserInstance(businessPropertyUser);
-            }
-        }
-    }
-
-    /**
-     * 保存物业照片
-     * @param business 业务对象
-     * @param businessPropertyUsers 物业照片
-     */
-    private void doBusinessPropertyUser(Business business, JSONArray businessPropertyUsers) {
-
-        for(int businessPropertyUserIndex = 0 ;businessPropertyUserIndex < businessPropertyUsers.size();businessPropertyUserIndex++) {
-            JSONObject businessPropertyUser = businessPropertyUsers.getJSONObject(businessPropertyUserIndex);
-            Assert.jsonObjectHaveKey(businessPropertyUser, "propertyUserId", "businessPropertyUser 节点下没有包含 propertyUserId 节点");
-
-            if (businessPropertyUser.getString("propertyUserId").startsWith("-")) {
-                throw new ListenerExecuteException(ResponseConstant.RESULT_PARAM_ERROR,"propertyUserId 错误,不能自动生成(必须已经存在的propertyUserId)"+businessPropertyUser);
-            }
-
-            autoSaveDelBusinessPropertyUser(business,businessPropertyUser);
-        }
-    }
-
-    public IPropertyServiceDao getPropertyServiceDaoImpl() {
-        return propertyServiceDaoImpl;
-    }
-
-    public void setPropertyServiceDaoImpl(IPropertyServiceDao propertyServiceDaoImpl) {
-        this.propertyServiceDaoImpl = propertyServiceDaoImpl;
-    }
-}

+ 0 - 152
PropertyService/src/main/java/com/java110/property/listener/SavePropertyCerdentialsListener.java

@@ -1,152 +0,0 @@
-package com.java110.property.listener;
-
-import com.alibaba.fastjson.JSONArray;
-import com.alibaba.fastjson.JSONObject;
-import com.java110.common.constant.BusinessTypeConstant;
-import com.java110.common.constant.ResponseConstant;
-import com.java110.common.constant.ServiceCodeConstant;
-import com.java110.common.constant.StatusConstant;
-import com.java110.common.exception.ListenerExecuteException;
-import com.java110.common.util.Assert;
-import com.java110.common.util.DateUtil;
-import com.java110.common.util.StringUtil;
-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 com.java110.property.dao.IPropertyServiceDao;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.transaction.annotation.Transactional;
-
-import java.text.ParseException;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-/**
- * 保存 用户信息 侦听
- * Created by wuxw on 2018/5/18.
- */
-@Java110Listener("savePropertyCerdentialsListener")
-@Transactional
-public class SavePropertyCerdentialsListener extends AbstractPropertyBusinessServiceDataFlowListener {
-
-    private final static Logger logger = LoggerFactory.getLogger(SavePropertyCerdentialsListener.class);
-
-    @Autowired
-    IPropertyServiceDao propertyServiceDaoImpl;
-
-    @Override
-    public int getOrder() {
-        return 0;
-    }
-
-    @Override
-    public String getBusinessTypeCd() {
-        return BusinessTypeConstant.BUSINESS_TYPE_SAVE_PROPERTY_CERDENTIALS;
-    }
-
-    /**
-     * 保存物业信息 business 表中
-     * @param dataFlowContext 数据对象
-     * @param business 当前业务对象
-     */
-    @Override
-    protected void doSaveBusiness(DataFlowContext dataFlowContext, Business business) {
-        JSONObject data = business.getDatas();
-        Assert.notEmpty(data,"没有datas 节点,或没有子节点需要处理");
-
-        if(!data.containsKey("businessPropertyCerdentials")){
-            throw new ListenerExecuteException(ResponseConstant.RESULT_PARAM_ERROR,"没有businessPropertyCerdentials节点");
-        }
-        JSONArray businessPropertyCerdentialses = data.getJSONArray("businessPropertyCerdentials");
-        doBusinessPropertyCerdentials(business,businessPropertyCerdentialses);
-    }
-
-    /**
-     * 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> businessPropertyCerdentialses = propertyServiceDaoImpl.getBusinessPropertyCerdentials(info);
-        if(businessPropertyCerdentialses != null && businessPropertyCerdentialses.size()>0){
-            propertyServiceDaoImpl.savePropertyCerdentialsInstance(info);
-        }
-    }
-
-    /**
-     * 撤单
-     * @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> propertyCerdentialses = propertyServiceDaoImpl.getPropertyCerdentials(info);
-        if(propertyCerdentialses != null && propertyCerdentialses.size()>0){
-            propertyServiceDaoImpl.updatePropertyCerdentailsInstance(paramIn);
-        }
-    }
-
-
-    /**
-     * 保存 物业证件 信息
-     * @param business 当前业务
-     * @param businessPropertyCerdentialses 物业证件
-     */
-    private void doBusinessPropertyCerdentials(Business business, JSONArray businessPropertyCerdentialses) {
-        for(int businessPropertyCerdentialsIndex = 0 ; businessPropertyCerdentialsIndex < businessPropertyCerdentialses.size() ; businessPropertyCerdentialsIndex ++) {
-            JSONObject businessPropertyCerdentials = businessPropertyCerdentialses.getJSONObject(businessPropertyCerdentialsIndex);
-            Assert.jsonObjectHaveKey(businessPropertyCerdentials, "propertyId", "businessPropertyPhoto 节点下没有包含 propertyId 节点");
-
-            if (businessPropertyCerdentials.getString("propertyCerdentialsId").startsWith("-")) {
-                String propertyPropertyId = GenerateCodeFactory.getPropertyCerdentialsId();
-                businessPropertyCerdentials.put("propertyCerdentialsId", propertyPropertyId);
-            }
-            Date validityPeriod = null;
-            try {
-                if(StringUtil.isNullOrNone(businessPropertyCerdentials.getString("validityPeriod"))){
-                    validityPeriod = DateUtil.getLastDate();
-                }else {
-                    validityPeriod = DateUtil.getDateFromString(businessPropertyCerdentials.getString("validityPeriod"), DateUtil.DATE_FORMATE_STRING_B);
-                }
-            } catch (ParseException e) {
-                throw new ListenerExecuteException(ResponseConstant.RESULT_PARAM_ERROR,"传入参数 validityPeriod 格式不正确,请填写 "+DateUtil.DATE_FORMATE_STRING_B +" 格式,"+businessPropertyCerdentials);
-            }
-            businessPropertyCerdentials.put("validityPeriod",validityPeriod);
-            businessPropertyCerdentials.put("bId", business.getbId());
-            businessPropertyCerdentials.put("operate", StatusConstant.OPERATE_ADD);
-            //保存物业信息
-            propertyServiceDaoImpl.saveBusinessPropertyCerdentials(businessPropertyCerdentials);
-        }
-    }
-
-
-    public IPropertyServiceDao getPropertyServiceDaoImpl() {
-        return propertyServiceDaoImpl;
-    }
-
-    public void setPropertyServiceDaoImpl(IPropertyServiceDao propertyServiceDaoImpl) {
-        this.propertyServiceDaoImpl = propertyServiceDaoImpl;
-    }
-}

+ 0 - 137
PropertyService/src/main/java/com/java110/property/listener/SavePropertyFeeListener.java

@@ -1,137 +0,0 @@
-package com.java110.property.listener;
-
-import com.alibaba.fastjson.JSONArray;
-import com.alibaba.fastjson.JSONObject;
-import com.java110.common.constant.BusinessTypeConstant;
-import com.java110.common.constant.StatusConstant;
-import com.java110.common.util.Assert;
-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 com.java110.property.dao.IPropertyServiceDao;
-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("savePropertyFeeListener")
-@Transactional
-public class SavePropertyFeeListener extends AbstractPropertyBusinessServiceDataFlowListener {
-
-    private final static Logger logger = LoggerFactory.getLogger(SavePropertyFeeListener.class);
-
-    @Autowired
-    IPropertyServiceDao propertyServiceDaoImpl;
-
-    @Override
-    public int getOrder() {
-        return 0;
-    }
-
-    @Override
-    public String getBusinessTypeCd() {
-        return BusinessTypeConstant.BUSINESS_TYPE_SAVE_PROPERTY_FEE;
-    }
-
-    /**
-     * 保存物业信息 business 表中
-     * @param dataFlowContext 数据对象
-     * @param business 当前业务对象
-     */
-    @Override
-    protected void doSaveBusiness(DataFlowContext dataFlowContext, Business business) {
-        JSONObject data = business.getDatas();
-        Assert.notEmpty(data,"没有datas 节点,或没有子节点需要处理");
-
-        //物业费用节点处理
-        if(data.containsKey("businessPropertyFee")){
-            JSONArray businessPropertyFees = data.getJSONArray("businessPropertyFee");
-            doBusinessPropertyFee(business,businessPropertyFees);
-        }
-
-    }
-
-    /**
-     * 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> businessPropertyFees = propertyServiceDaoImpl.getBusinessPropertyFee(info);
-        if(businessPropertyFees != null && businessPropertyFees.size() >0){
-            propertyServiceDaoImpl.savePropertyFeeInstance(info);
-        }
-
-    }
-
-    /**
-     * 撤单
-     * @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> propertyFees = propertyServiceDaoImpl.getPropertyFee(info);
-        if(propertyFees != null && propertyFees.size()>0){
-            propertyServiceDaoImpl.updatePropertyFeeInstance(paramIn);
-        }
-    }
-
-    /**
-     * 保存物业费用
-     * @param business 业务对象
-     * @param businessPropertyFees 物业费用
-     */
-    private void doBusinessPropertyFee(Business business, JSONArray businessPropertyFees) {
-
-        for(int businessPropertyFeeIndex = 0 ;businessPropertyFeeIndex < businessPropertyFees.size();businessPropertyFeeIndex++) {
-            JSONObject businessPropertyFee = businessPropertyFees.getJSONObject(businessPropertyFeeIndex);
-            Assert.jsonObjectHaveKey(businessPropertyFee, "propertyId", "businessPropertyFee 节点下没有包含 propertyId 节点");
-
-            if (businessPropertyFee.getString("feeId").startsWith("-")) {
-                String propertyFeeId = GenerateCodeFactory.getPropertyFeeId();
-                businessPropertyFee.put("feeId", propertyFeeId);
-            }
-            businessPropertyFee.put("bId", business.getbId());
-            businessPropertyFee.put("operate", StatusConstant.OPERATE_ADD);
-            //保存物业信息
-            propertyServiceDaoImpl.saveBusinessPropertyFee(businessPropertyFee);
-        }
-    }
-
-    public IPropertyServiceDao getPropertyServiceDaoImpl() {
-        return propertyServiceDaoImpl;
-    }
-
-    public void setPropertyServiceDaoImpl(IPropertyServiceDao propertyServiceDaoImpl) {
-        this.propertyServiceDaoImpl = propertyServiceDaoImpl;
-    }
-}

+ 0 - 243
PropertyService/src/main/java/com/java110/property/listener/SavePropertyHouseListener.java

@@ -1,243 +0,0 @@
-package com.java110.property.listener;
-
-import com.alibaba.fastjson.JSONArray;
-import com.alibaba.fastjson.JSONObject;
-import com.java110.common.constant.BusinessTypeConstant;
-import com.java110.common.constant.ResponseConstant;
-import com.java110.common.constant.ServiceCodeConstant;
-import com.java110.common.constant.StatusConstant;
-import com.java110.common.exception.ListenerExecuteException;
-import com.java110.common.util.Assert;
-import com.java110.common.util.DateUtil;
-import com.java110.common.util.StringUtil;
-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 com.java110.property.dao.IPropertyServiceDao;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.transaction.annotation.Transactional;
-
-import java.text.ParseException;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-/**
- * 保存 用户信息 侦听
- * Created by wuxw on 2018/5/18.
- */
-@Java110Listener("savePropertyHouseListener")
-@Transactional
-public class SavePropertyHouseListener extends AbstractPropertyBusinessServiceDataFlowListener {
-
-    private final static Logger logger = LoggerFactory.getLogger(SavePropertyHouseListener.class);
-
-    @Autowired
-    IPropertyServiceDao propertyServiceDaoImpl;
-
-    @Override
-    public int getOrder() {
-        return 0;
-    }
-
-    @Override
-    public String getBusinessTypeCd() {
-        return BusinessTypeConstant.BUSINESS_TYPE_SAVE_PROPERTY_HOUSE;
-    }
-
-    /**
-     * 保存物业信息 business 表中
-     * @param dataFlowContext 数据对象
-     * @param business 当前业务对象
-     */
-    @Override
-    protected void doSaveBusiness(DataFlowContext dataFlowContext, Business business) {
-        JSONObject data = business.getDatas();
-        Assert.notEmpty(data,"没有datas 节点,或没有子节点需要处理");
-
-        //处理 businessProperty 节点
-        if(data.containsKey("businessPropertyHouse")){
-            JSONObject businessProperty = data.getJSONObject("businessPropertyHouse");
-            doBusinessPropertyHouse(business,businessProperty);
-            dataFlowContext.addParamOut("houseId",businessProperty.getString("houseId"));
-        }
-
-        if(data.containsKey("businessPropertyHouseAttr")){
-            JSONArray businessPropertyHouseAttrs = data.getJSONArray("businessPropertyHouseAttr");
-            doSaveBusinessPropertyHouseAttrs(business,businessPropertyHouseAttrs);
-        }
-    }
-
-    /**
-     * 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);
-
-        //物业信息
-        Map businessPropertyHouse = propertyServiceDaoImpl.getBusinessPropertyHouse(info);
-        if( businessPropertyHouse != null && !businessPropertyHouse.isEmpty()) {
-            propertyServiceDaoImpl.savePropertyHouseInstance(info);
-            dataFlowContext.addParamOut("houseId",businessPropertyHouse.get("house_id"));
-        }
-        //物业属性
-        List<Map> businessPropertyHouseAttrs = propertyServiceDaoImpl.getBusinessPropertyHouseAttrs(info);
-        if(businessPropertyHouseAttrs != null && businessPropertyHouseAttrs.size() > 0) {
-            propertyServiceDaoImpl.savePropertyHouseAttrsInstance(info);
-        }
-    }
-
-    /**
-     * 撤单
-     * @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);
-        //物业信息
-        Map propertyInfo = propertyServiceDaoImpl.getPropertyHouse(info);
-        if(propertyInfo != null && !propertyInfo.isEmpty()){
-            paramIn.put("houseId",propertyInfo.get("house_id").toString());
-            propertyServiceDaoImpl.updatePropertyHouseInstance(paramIn);
-            dataFlowContext.addParamOut("houseId",propertyInfo.get("house_id"));
-        }
-
-        //物业属性
-        List<Map> propertyAttrs = propertyServiceDaoImpl.getPropertyHouseAttrs(info);
-        if(propertyAttrs != null && propertyAttrs.size()>0){
-            propertyServiceDaoImpl.updatePropertyHouseAttrInstance(paramIn);
-        }
-    }
-
-    /**
-     * 处理 businessProperty 节点
-     * @param business 总的数据节点
-     * @param businessProperty 物业节点
-     */
-    private void doBusinessPropertyHouse(Business business,JSONObject businessProperty){
-
-        Assert.jsonObjectHaveKey(businessProperty,"houseId","businessPropertyHouse 节点下没有包含 houseId 节点");
-        Assert.jsonObjectHaveKey(businessProperty,"propertyId","businessPropertyHouse 节点下没有包含 propertyId 节点");
-
-        if(businessProperty.getString("propertyId").startsWith("-")){
-            throw new ListenerExecuteException(ResponseConstant.RESULT_PARAM_ERROR,"businessPropertyHouse 节点下 propertyId 必须为已有物业ID 不能以 - 开头");
-        }
-        if(businessProperty.getString("houseId").startsWith("-")){
-            //刷新缓存
-            flushHouseId(business.getDatas());
-        }
-
-        businessProperty.put("bId",business.getbId());
-        businessProperty.put("operate", StatusConstant.OPERATE_ADD);
-        //保存物业信息
-        propertyServiceDaoImpl.saveBusinessPropertyHouse(businessProperty);
-
-    }
-
-
-
-    /**
-     * 保存物业属性信息
-     * @param business 当前业务
-     * @param businessPropertyHouseAttrs 物业属性
-     */
-    private void doSaveBusinessPropertyHouseAttrs(Business business,JSONArray businessPropertyHouseAttrs){
-        JSONObject data = business.getDatas();
-        for(int propertyAttrIndex = 0 ; propertyAttrIndex < businessPropertyHouseAttrs.size();propertyAttrIndex ++){
-            JSONObject propertyAttr = businessPropertyHouseAttrs.getJSONObject(propertyAttrIndex);
-            Assert.jsonObjectHaveKey(propertyAttr,"attrId","businessPropertyHouseAttr 节点下没有包含 attrId 节点");
-
-            if(propertyAttr.getString("attrId").startsWith("-")){
-                String attrId = GenerateCodeFactory.getAttrId();
-                propertyAttr.put("attrId",attrId);
-            }
-
-            propertyAttr.put("bId",business.getbId());
-            propertyAttr.put("operate", StatusConstant.OPERATE_ADD);
-
-            propertyServiceDaoImpl.saveBusinessPropertyHouseAttr(propertyAttr);
-        }
-    }
-
-
-    /**
-     * 保存 物业证件 信息
-     * @param business 当前业务
-     * @param businessPropertyCerdentialses 物业证件
-     */
-    private void doBusinessPropertyCerdentials(Business business, JSONArray businessPropertyCerdentialses) {
-        for(int businessPropertyCerdentialsIndex = 0 ; businessPropertyCerdentialsIndex < businessPropertyCerdentialses.size() ; businessPropertyCerdentialsIndex ++) {
-            JSONObject businessPropertyCerdentials = businessPropertyCerdentialses.getJSONObject(businessPropertyCerdentialsIndex);
-            Assert.jsonObjectHaveKey(businessPropertyCerdentials, "propertyId", "businessPropertyPhoto 节点下没有包含 propertyId 节点");
-
-            if (businessPropertyCerdentials.getString("propertyCerdentialsId").startsWith("-")) {
-                String propertyPhotoId = GenerateCodeFactory.getPropertyCerdentialsId();
-                businessPropertyCerdentials.put("propertyCerdentialsId", propertyPhotoId);
-            }
-            Date validityPeriod = null;
-            try {
-                if(StringUtil.isNullOrNone(businessPropertyCerdentials.getString("validityPeriod"))){
-                    validityPeriod = DateUtil.getLastDate();
-                }else {
-                    validityPeriod = DateUtil.getDateFromString(businessPropertyCerdentials.getString("validityPeriod"), DateUtil.DATE_FORMATE_STRING_B);
-                }
-            } catch (ParseException e) {
-                throw new ListenerExecuteException(ResponseConstant.RESULT_PARAM_ERROR,"传入参数 validityPeriod 格式不正确,请填写 "+DateUtil.DATE_FORMATE_STRING_B +" 格式,"+businessPropertyCerdentials);
-            }
-            businessPropertyCerdentials.put("validityPeriod",validityPeriod);
-            businessPropertyCerdentials.put("bId", business.getbId());
-            businessPropertyCerdentials.put("operate", StatusConstant.OPERATE_ADD);
-            //保存物业信息
-            propertyServiceDaoImpl.saveBusinessPropertyCerdentials(businessPropertyCerdentials);
-        }
-    }
-
-
-
-    /**
-     * 刷新 商户ID
-     * @param data
-     */
-    private void flushHouseId(JSONObject data) {
-
-        String houseId = GenerateCodeFactory.getHouseId();
-        JSONObject businessProperty = data.getJSONObject("businessPropertyHouse");
-        businessProperty.put("houseId",houseId);
-        //刷物业属性
-        if(data.containsKey("businessPropertyHouseAttr")) {
-            JSONArray businessPropertyHouseAttrs = data.getJSONArray("businessPropertyHouseAttr");
-            for(int businessPropertyHouseAttrIndex = 0;businessPropertyHouseAttrIndex < businessPropertyHouseAttrs.size();businessPropertyHouseAttrIndex++) {
-                JSONObject businessPropertyHouseAttr = businessPropertyHouseAttrs.getJSONObject(businessPropertyHouseAttrIndex);
-                businessPropertyHouseAttr.put("houseId", houseId);
-            }
-        }
-    }
-
-
-    public IPropertyServiceDao getPropertyServiceDaoImpl() {
-        return propertyServiceDaoImpl;
-    }
-
-    public void setPropertyServiceDaoImpl(IPropertyServiceDao propertyServiceDaoImpl) {
-        this.propertyServiceDaoImpl = propertyServiceDaoImpl;
-    }
-}

+ 0 - 219
PropertyService/src/main/java/com/java110/property/listener/SavePropertyInfoListener.java

@@ -1,219 +0,0 @@
-package com.java110.property.listener;
-
-import com.alibaba.fastjson.JSONArray;
-import com.alibaba.fastjson.JSONObject;
-import com.java110.common.constant.BusinessTypeConstant;
-import com.java110.common.constant.StatusConstant;
-import com.java110.common.util.Assert;
-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 com.java110.property.dao.IPropertyServiceDao;
-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("savePropertyInfoListener")
-@Transactional
-public class SavePropertyInfoListener extends AbstractPropertyBusinessServiceDataFlowListener {
-
-    private final static Logger logger = LoggerFactory.getLogger(SavePropertyInfoListener.class);
-
-    @Autowired
-    IPropertyServiceDao propertyServiceDaoImpl;
-
-    @Override
-    public int getOrder() {
-        return 0;
-    }
-
-    @Override
-    public String getBusinessTypeCd() {
-        return BusinessTypeConstant.BUSINESS_TYPE_SAVE_PROPERTY_INFO;
-    }
-
-    /**
-     * 保存物业信息 business 表中
-     * @param dataFlowContext 数据对象
-     * @param business 当前业务对象
-     */
-    @Override
-    protected void doSaveBusiness(DataFlowContext dataFlowContext, Business business) {
-        JSONObject data = business.getDatas();
-        Assert.notEmpty(data,"没有datas 节点,或没有子节点需要处理");
-
-        //处理 businessProperty 节点
-        if(data.containsKey("businessProperty")){
-            JSONObject businessProperty = data.getJSONObject("businessProperty");
-            doBusinessProperty(business,businessProperty);
-            dataFlowContext.addParamOut("propertyId",businessProperty.getString("propertyId"));
-        }
-
-        if(data.containsKey("businessPropertyAttr")){
-            JSONArray businessPropertyAttrs = data.getJSONArray("businessPropertyAttr");
-            doSaveBusinessPropertyAttrs(business,businessPropertyAttrs);
-        }
-    }
-
-    /**
-     * 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);
-
-        //物业信息
-        Map businessPropertyInfo = propertyServiceDaoImpl.getBusinessPropertyInfo(info);
-        if( businessPropertyInfo != null && !businessPropertyInfo.isEmpty()) {
-            propertyServiceDaoImpl.savePropertyInfoInstance(info);
-            dataFlowContext.addParamOut("propertyId",businessPropertyInfo.get("property_id"));
-        }
-        //物业属性
-        List<Map> businessPropertyAttrs = propertyServiceDaoImpl.getBusinessPropertyAttrs(info);
-        if(businessPropertyAttrs != null && businessPropertyAttrs.size() > 0) {
-            propertyServiceDaoImpl.savePropertyAttrsInstance(info);
-        }
-    }
-
-    /**
-     * 撤单
-     * @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);
-        //物业信息
-        Map propertyInfo = propertyServiceDaoImpl.getPropertyInfo(info);
-        if(propertyInfo != null && !propertyInfo.isEmpty()){
-            paramIn.put("propertyId",propertyInfo.get("property_id").toString());
-            propertyServiceDaoImpl.updatePropertyInfoInstance(paramIn);
-            dataFlowContext.addParamOut("propertyId",propertyInfo.get("property_id"));
-        }
-
-        //物业属性
-        List<Map> propertyAttrs = propertyServiceDaoImpl.getPropertyAttrs(info);
-        if(propertyAttrs != null && propertyAttrs.size()>0){
-            propertyServiceDaoImpl.updatePropertyAttrInstance(paramIn);
-        }
-    }
-
-
-
-    /**
-     * 处理 businessProperty 节点
-     * @param business 总的数据节点
-     * @param businessProperty 物业节点
-     */
-    private void doBusinessProperty(Business business,JSONObject businessProperty){
-
-        Assert.jsonObjectHaveKey(businessProperty,"propertyId","businessProperty 节点下没有包含 propertyId 节点");
-
-        if(businessProperty.getString("propertyId").startsWith("-")){
-            //刷新缓存
-            flushPropertyId(business.getDatas());
-        }
-
-        businessProperty.put("bId",business.getbId());
-        businessProperty.put("operate", StatusConstant.OPERATE_ADD);
-        //保存物业信息
-        propertyServiceDaoImpl.saveBusinessPropertyInfo(businessProperty);
-
-    }
-
-
-
-    /**
-     * 保存物业属性信息
-     * @param business 当前业务
-     * @param businessPropertyAttrs 物业属性
-     */
-    private void doSaveBusinessPropertyAttrs(Business business,JSONArray businessPropertyAttrs){
-        JSONObject data = business.getDatas();
-        JSONObject businessProperty = data.getJSONObject("businessProperty");
-        for(int propertyAttrIndex = 0 ; propertyAttrIndex < businessPropertyAttrs.size();propertyAttrIndex ++){
-            JSONObject propertyAttr = businessPropertyAttrs.getJSONObject(propertyAttrIndex);
-            Assert.jsonObjectHaveKey(propertyAttr,"attrId","businessPropertyAttr 节点下没有包含 attrId 节点");
-
-            if(propertyAttr.getString("attrId").startsWith("-")){
-                String attrId = GenerateCodeFactory.getAttrId();
-                propertyAttr.put("attrId",attrId);
-            }
-
-            propertyAttr.put("bId",business.getbId());
-            propertyAttr.put("propertyId",businessProperty.getString("propertyId"));
-            propertyAttr.put("operate", StatusConstant.OPERATE_ADD);
-
-            propertyServiceDaoImpl.saveBusinessPropertyAttr(propertyAttr);
-        }
-    }
-
-
-
-    /**
-     * 刷新 物业ID
-     * @param data
-     */
-    private void flushPropertyId(JSONObject data) {
-
-        String propertyId = GenerateCodeFactory.getPropertyId();
-        JSONObject businessProperty = data.getJSONObject("businessProperty");
-        businessProperty.put("propertyId",propertyId);
-        //刷物业属性
-        if(data.containsKey("businessPropertyAttr")) {
-            JSONArray businessPropertyAttrs = data.getJSONArray("businessPropertyAttr");
-            for(int businessPropertyAttrIndex = 0;businessPropertyAttrIndex < businessPropertyAttrs.size();businessPropertyAttrIndex++) {
-                JSONObject businessPropertyAttr = businessPropertyAttrs.getJSONObject(businessPropertyAttrIndex);
-                businessPropertyAttr.put("propertyId", propertyId);
-            }
-        }
-//        //刷 是物业照片 的 propertyId
-//        if(data.containsKey("businessPropertyPhoto")) {
-//            JSONArray businessPropertyPhotos = data.getJSONArray("businessPropertyPhoto");
-//            for(int businessPropertyPhotoIndex = 0;businessPropertyPhotoIndex < businessPropertyPhotos.size();businessPropertyPhotoIndex++) {
-//                JSONObject businessPropertyPhoto = businessPropertyPhotos.getJSONObject(businessPropertyPhotoIndex);
-//                businessPropertyPhoto.put("propertyId", propertyId);
-//            }
-//        }
-//        //刷 物业证件 的propertyId
-//        if(data.containsKey("businessPropertyCerdentials")) {
-//            JSONArray businessPropertyCerdentialses = data.getJSONArray("businessPropertyCerdentials");
-//            for(int businessPropertyCerdentialsIndex = 0;businessPropertyCerdentialsIndex < businessPropertyCerdentialses.size();businessPropertyCerdentialsIndex++) {
-//                JSONObject businessPropertyCerdentials = businessPropertyCerdentialses.getJSONObject(businessPropertyCerdentialsIndex);
-//                businessPropertyCerdentials.put("propertyId", propertyId);
-//            }
-//        }
-    }
-
-
-    public IPropertyServiceDao getPropertyServiceDaoImpl() {
-        return propertyServiceDaoImpl;
-    }
-
-    public void setPropertyServiceDaoImpl(IPropertyServiceDao propertyServiceDaoImpl) {
-        this.propertyServiceDaoImpl = propertyServiceDaoImpl;
-    }
-}

+ 0 - 139
PropertyService/src/main/java/com/java110/property/listener/SavePropertyPhotoListener.java

@@ -1,139 +0,0 @@
-package com.java110.property.listener;
-
-import com.alibaba.fastjson.JSONArray;
-import com.alibaba.fastjson.JSONObject;
-import com.java110.common.constant.BusinessTypeConstant;
-import com.java110.common.constant.ResponseConstant;
-import com.java110.common.constant.StatusConstant;
-import com.java110.common.exception.ListenerExecuteException;
-import com.java110.common.util.Assert;
-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 com.java110.property.dao.IPropertyServiceDao;
-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("savePropertyPhotoListener")
-@Transactional
-public class SavePropertyPhotoListener extends AbstractPropertyBusinessServiceDataFlowListener {
-
-    private final static Logger logger = LoggerFactory.getLogger(SavePropertyPhotoListener.class);
-
-    @Autowired
-    IPropertyServiceDao propertyServiceDaoImpl;
-
-    @Override
-    public int getOrder() {
-        return 0;
-    }
-
-    @Override
-    public String getBusinessTypeCd() {
-        return BusinessTypeConstant.BUSINESS_TYPE_SAVE_PROPERTY_PHOTO;
-    }
-
-    /**
-     * 保存物业信息 business 表中
-     * @param dataFlowContext 数据对象
-     * @param business 当前业务对象
-     */
-    @Override
-    protected void doSaveBusiness(DataFlowContext dataFlowContext, Business business) {
-        JSONObject data = business.getDatas();
-        Assert.notEmpty(data,"没有datas 节点,或没有子节点需要处理");
-
-        if(!data.containsKey("businessPropertyPhoto")){
-            throw new ListenerExecuteException(ResponseConstant.RESULT_PARAM_ERROR,"没有businessPropertyPhoto节点");
-        }
-
-        JSONArray businessPropertyPhotos = data.getJSONArray("businessPropertyPhoto");
-        doBusinessPropertyPhoto(business,businessPropertyPhotos);
-    }
-
-    /**
-     * 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> businessPropertyPhotos = propertyServiceDaoImpl.getBusinessPropertyPhoto(info);
-        if(businessPropertyPhotos != null && businessPropertyPhotos.size() >0){
-            propertyServiceDaoImpl.savePropertyPhotoInstance(info);
-        }
-    }
-
-    /**
-     * 撤单
-     * @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> propertyPhotos = propertyServiceDaoImpl.getPropertyPhoto(info);
-        if(propertyPhotos != null && propertyPhotos.size()>0){
-            propertyServiceDaoImpl.updatePropertyPhotoInstance(paramIn);
-        }
-    }
-
-    /**
-     * 保存物业照片
-     * @param business 业务对象
-     * @param businessPropertyPhotos 物业照片
-     */
-    private void doBusinessPropertyPhoto(Business business, JSONArray businessPropertyPhotos) {
-
-        for(int businessPropertyPhotoIndex = 0 ;businessPropertyPhotoIndex < businessPropertyPhotos.size();businessPropertyPhotoIndex++) {
-            JSONObject businessPropertyPhoto = businessPropertyPhotos.getJSONObject(businessPropertyPhotoIndex);
-            Assert.jsonObjectHaveKey(businessPropertyPhoto, "propertyId", "businessPropertyPhoto 节点下没有包含 propertyId 节点");
-
-            if (businessPropertyPhoto.getString("propertyPhotoId").startsWith("-")) {
-                String propertyPhotoId = GenerateCodeFactory.getPropertyPhotoId();
-                businessPropertyPhoto.put("propertyPhotoId", propertyPhotoId);
-            }
-            businessPropertyPhoto.put("bId", business.getbId());
-            businessPropertyPhoto.put("operate", StatusConstant.OPERATE_ADD);
-            //保存物业信息
-            propertyServiceDaoImpl.saveBusinessPropertyPhoto(businessPropertyPhoto);
-        }
-    }
-
-
-
-    public IPropertyServiceDao getPropertyServiceDaoImpl() {
-        return propertyServiceDaoImpl;
-    }
-
-    public void setPropertyServiceDaoImpl(IPropertyServiceDao propertyServiceDaoImpl) {
-        this.propertyServiceDaoImpl = propertyServiceDaoImpl;
-    }
-}

+ 0 - 244
PropertyService/src/main/java/com/java110/property/listener/SavePropertyUserListener.java

@@ -1,244 +0,0 @@
-package com.java110.property.listener;
-
-import com.alibaba.fastjson.JSONArray;
-import com.alibaba.fastjson.JSONObject;
-import com.java110.common.constant.BusinessTypeConstant;
-import com.java110.common.constant.ResponseConstant;
-import com.java110.common.constant.StatusConstant;
-import com.java110.common.exception.ListenerExecuteException;
-import com.java110.common.util.Assert;
-import com.java110.common.util.DateUtil;
-import com.java110.common.util.StringUtil;
-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 com.java110.property.dao.IPropertyServiceDao;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.transaction.annotation.Transactional;
-
-import java.text.ParseException;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-/**
- * 保存 用户信息 侦听
- * Created by wuxw on 2018/5/18.
- */
-@Java110Listener("savePropertyUserListener")
-@Transactional
-public class SavePropertyUserListener extends AbstractPropertyBusinessServiceDataFlowListener {
-
-    private final static Logger logger = LoggerFactory.getLogger(SavePropertyUserListener.class);
-
-    @Autowired
-    IPropertyServiceDao propertyServiceDaoImpl;
-
-    @Override
-    public int getOrder() {
-        return 0;
-    }
-
-    @Override
-    public String getBusinessTypeCd() {
-        return BusinessTypeConstant.BUSINESS_TYPE_SAVE_PROPERTY_USER;
-    }
-
-    /**
-     * 保存物业信息 business 表中
-     * @param dataFlowContext 数据对象
-     * @param business 当前业务对象
-     */
-    @Override
-    protected void doSaveBusiness(DataFlowContext dataFlowContext, Business business) {
-        JSONObject data = business.getDatas();
-        Assert.notEmpty(data,"没有datas 节点,或没有子节点需要处理");
-
-        //处理 businessProperty 节点
-        if(!data.containsKey("businessPropertyUser")){
-            throw new ListenerExecuteException(ResponseConstant.RESULT_PARAM_ERROR,"没有businessPropertyUser节点");
-        }
-
-
-        JSONArray businessPropertyUsers = data.getJSONArray("businessPropertyUser");
-        doBusinessPropertyUser(business,businessPropertyUsers);
-    }
-
-    /**
-     * 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> businessPropertyUsers = propertyServiceDaoImpl.getBusinessPropertyUser(info);
-        if(businessPropertyUsers != null && businessPropertyUsers.size() >0){
-            propertyServiceDaoImpl.savePropertyUserInstance(info);
-        }
-    }
-
-    /**
-     * 撤单
-     * @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> propertyUsers = propertyServiceDaoImpl.getPropertyUser(info);
-        if(propertyUsers != null && propertyUsers.size()>0){
-            propertyServiceDaoImpl.updatePropertyUserInstance(paramIn);
-        }
-    }
-
-
-    /**
-     * 处理 businessProperty 节点
-     * @param business 总的数据节点
-     * @param businessPropertyUsers 物业用户节点
-     */
-    private void doBusinessPropertyUser(Business business,JSONArray businessPropertyUsers){
-
-
-        for(int businessPropertyUserIndex = 0 ;businessPropertyUserIndex < businessPropertyUsers.size();businessPropertyUserIndex++) {
-            JSONObject businessPropertyUser = businessPropertyUsers.getJSONObject(businessPropertyUserIndex);
-            Assert.jsonObjectHaveKey(businessPropertyUser,"propertyId","businessPropertyUser 节点下没有包含 propertyId 节点");
-            Assert.jsonObjectHaveKey(businessPropertyUser,"userId","businessPropertyUser 节点下没有包含 userId 节点");
-
-            if(businessPropertyUser.getString("propertyUserId").startsWith("-")){
-                String propertyUserId = GenerateCodeFactory.getPropertyUserId();
-                businessPropertyUser.put("propertyUserId", propertyUserId);
-            }
-            businessPropertyUser.put("bId",business.getbId());
-            businessPropertyUser.put("operate", StatusConstant.OPERATE_ADD);
-            //保存物业信息
-            propertyServiceDaoImpl.saveBusinessPropertyUser(businessPropertyUser);
-        }
-
-    }
-
-
-
-    /**
-     * 保存物业属性信息
-     * @param business 当前业务
-     * @param businessPropertyAttrs 物业属性
-     */
-    private void doSaveBusinessPropertyAttrs(Business business,JSONArray businessPropertyAttrs){
-        JSONObject data = business.getDatas();
-        JSONObject businessProperty = data.getJSONObject("businessProperty");
-        for(int propertyAttrIndex = 0 ; propertyAttrIndex < businessPropertyAttrs.size();propertyAttrIndex ++){
-            JSONObject propertyAttr = businessPropertyAttrs.getJSONObject(propertyAttrIndex);
-            Assert.jsonObjectHaveKey(propertyAttr,"attrId","businessPropertyAttr 节点下没有包含 attrId 节点");
-
-            if(propertyAttr.getString("attrId").startsWith("-")){
-                String attrId = GenerateCodeFactory.getAttrId();
-                propertyAttr.put("attrId",attrId);
-            }
-
-            propertyAttr.put("bId",business.getbId());
-            propertyAttr.put("propertyId",businessProperty.getString("propertyId"));
-            propertyAttr.put("operate", StatusConstant.OPERATE_ADD);
-
-            propertyServiceDaoImpl.saveBusinessPropertyAttr(propertyAttr);
-        }
-    }
-
-
-    /**
-     * 保存 物业证件 信息
-     * @param business 当前业务
-     * @param businessPropertyCerdentialses 物业证件
-     */
-    private void doBusinessPropertyCerdentials(Business business, JSONArray businessPropertyCerdentialses) {
-        for(int businessPropertyCerdentialsIndex = 0 ; businessPropertyCerdentialsIndex < businessPropertyCerdentialses.size() ; businessPropertyCerdentialsIndex ++) {
-            JSONObject businessPropertyCerdentials = businessPropertyCerdentialses.getJSONObject(businessPropertyCerdentialsIndex);
-            Assert.jsonObjectHaveKey(businessPropertyCerdentials, "propertyId", "businessPropertyPhoto 节点下没有包含 propertyId 节点");
-
-            if (businessPropertyCerdentials.getString("propertyCerdentialsId").startsWith("-")) {
-                String propertyPhotoId = GenerateCodeFactory.getPropertyCerdentialsId();
-                businessPropertyCerdentials.put("propertyCerdentialsId", propertyPhotoId);
-            }
-            Date validityPeriod = null;
-            try {
-                if(StringUtil.isNullOrNone(businessPropertyCerdentials.getString("validityPeriod"))){
-                    validityPeriod = DateUtil.getLastDate();
-                }else {
-                    validityPeriod = DateUtil.getDateFromString(businessPropertyCerdentials.getString("validityPeriod"), DateUtil.DATE_FORMATE_STRING_B);
-                }
-            } catch (ParseException e) {
-                throw new ListenerExecuteException(ResponseConstant.RESULT_PARAM_ERROR,"传入参数 validityPeriod 格式不正确,请填写 "+DateUtil.DATE_FORMATE_STRING_B +" 格式,"+businessPropertyCerdentials);
-            }
-            businessPropertyCerdentials.put("validityPeriod",validityPeriod);
-            businessPropertyCerdentials.put("bId", business.getbId());
-            businessPropertyCerdentials.put("operate", StatusConstant.OPERATE_ADD);
-            //保存物业信息
-            propertyServiceDaoImpl.saveBusinessPropertyCerdentials(businessPropertyCerdentials);
-        }
-    }
-
-
-
-    /**
-     * 刷新 物业ID
-     * @param data
-     */
-    private void flushPropertyId(JSONObject data) {
-
-        String propertyId = GenerateCodeFactory.getPropertyId();
-        JSONObject businessProperty = data.getJSONObject("businessProperty");
-        businessProperty.put("propertyId",propertyId);
-        //刷物业属性
-        if(data.containsKey("businessPropertyAttr")) {
-            JSONArray businessPropertyAttrs = data.getJSONArray("businessPropertyAttr");
-            for(int businessPropertyAttrIndex = 0;businessPropertyAttrIndex < businessPropertyAttrs.size();businessPropertyAttrIndex++) {
-                JSONObject businessPropertyAttr = businessPropertyAttrs.getJSONObject(businessPropertyAttrIndex);
-                businessPropertyAttr.put("propertyId", propertyId);
-            }
-        }
-        //刷 是物业照片 的 propertyId
-        if(data.containsKey("businessPropertyPhoto")) {
-            JSONArray businessPropertyPhotos = data.getJSONArray("businessPropertyPhoto");
-            for(int businessPropertyPhotoIndex = 0;businessPropertyPhotoIndex < businessPropertyPhotos.size();businessPropertyPhotoIndex++) {
-                JSONObject businessPropertyPhoto = businessPropertyPhotos.getJSONObject(businessPropertyPhotoIndex);
-                businessPropertyPhoto.put("propertyId", propertyId);
-            }
-        }
-        //刷 物业证件 的propertyId
-        if(data.containsKey("businessPropertyCerdentials")) {
-            JSONArray businessPropertyCerdentialses = data.getJSONArray("businessPropertyCerdentials");
-            for(int businessPropertyCerdentialsIndex = 0;businessPropertyCerdentialsIndex < businessPropertyCerdentialses.size();businessPropertyCerdentialsIndex++) {
-                JSONObject businessPropertyCerdentials = businessPropertyCerdentialses.getJSONObject(businessPropertyCerdentialsIndex);
-                businessPropertyCerdentials.put("propertyId", propertyId);
-            }
-        }
-    }
-
-
-    public IPropertyServiceDao getPropertyServiceDaoImpl() {
-        return propertyServiceDaoImpl;
-    }
-
-    public void setPropertyServiceDaoImpl(IPropertyServiceDao propertyServiceDaoImpl) {
-        this.propertyServiceDaoImpl = propertyServiceDaoImpl;
-    }
-}

+ 0 - 155
PropertyService/src/main/java/com/java110/property/listener/UpdatePropertyCerdentialsListener.java

@@ -1,155 +0,0 @@
-package com.java110.property.listener;
-
-import com.alibaba.fastjson.JSONArray;
-import com.alibaba.fastjson.JSONObject;
-import com.java110.common.constant.BusinessTypeConstant;
-import com.java110.common.constant.ResponseConstant;
-import com.java110.common.constant.StatusConstant;
-import com.java110.common.exception.ListenerExecuteException;
-import com.java110.common.util.Assert;
-import com.java110.core.annotation.Java110Listener;
-import com.java110.core.context.DataFlowContext;
-import com.java110.entity.center.Business;
-import com.java110.property.dao.IPropertyServiceDao;
-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;
-
-/**
- * 修改物业信息 侦听
- *
- * 处理节点
- * 4、businessPropertyCerdentials:[{}] 物业证件信息节点
- * Created by wuxw on 2018/5/18.
- */
-@Java110Listener("updatePropertyCerdentialsListener")
-@Transactional
-public class UpdatePropertyCerdentialsListener extends AbstractPropertyBusinessServiceDataFlowListener {
-
-    private final static Logger logger = LoggerFactory.getLogger(UpdatePropertyCerdentialsListener.class);
-    @Autowired
-    IPropertyServiceDao propertyServiceDaoImpl;
-
-    @Override
-    public int getOrder() {
-        return 2;
-    }
-
-    @Override
-    public String getBusinessTypeCd() {
-        return BusinessTypeConstant.BUSINESS_TYPE_UPDATE_PROPERTY_CERDENTIALS;
-    }
-
-    /**
-     * business过程
-     * @param dataFlowContext
-     * @param business
-     */
-    @Override
-    protected void doSaveBusiness(DataFlowContext dataFlowContext, Business business) {
-
-        JSONObject data = business.getDatas();
-
-        Assert.notEmpty(data,"没有datas 节点,或没有子节点需要处理");
-
-        if(data.containsKey("businessPropertyCerdentials")){
-            JSONArray businessPropertyCerdentialses = data.getJSONArray("businessPropertyCerdentials");
-            doBusinessPropertyCerdentials(business,businessPropertyCerdentialses);
-        }
-    }
-
-
-    /**
-     * 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> businessPropertyCerdentialses = propertyServiceDaoImpl.getBusinessPropertyCerdentials(info);
-        if(businessPropertyCerdentialses != null && businessPropertyCerdentialses.size()>0){
-            for(Map businessPropertyCerdentials : businessPropertyCerdentialses) {
-                flushBusinessPropertyCredentials(businessPropertyCerdentials,StatusConstant.STATUS_CD_VALID);
-                propertyServiceDaoImpl.updatePropertyCerdentailsInstance(businessPropertyCerdentials);
-            }
-        }
-    }
-
-    /**
-     * 撤单
-     * @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> propertyCerdentialses = propertyServiceDaoImpl.getPropertyCerdentials(info);
-        if(propertyCerdentialses != null && propertyCerdentialses.size()>0){
-            List<Map> businessPropertyCerdentialses = propertyServiceDaoImpl.getBusinessPropertyCerdentials(delInfo);
-            //除非程序出错了,这里不会为空
-            if(businessPropertyCerdentialses == null || businessPropertyCerdentialses.size() ==0 ){
-                throw new ListenerExecuteException(ResponseConstant.RESULT_CODE_INNER_ERROR,"撤单失败(property_cerdentials),程序内部异常,请检查! "+delInfo);
-            }
-            for(Map businessPropertyCerdentials : businessPropertyCerdentialses) {
-                flushBusinessPropertyCredentials(businessPropertyCerdentials,StatusConstant.STATUS_CD_VALID);
-                propertyServiceDaoImpl.updatePropertyCerdentailsInstance(businessPropertyCerdentials);
-            }
-        }
-    }
-
-    /**
-     * 保存 物业证件 信息
-     * @param business 当前业务
-     * @param businessPropertyCerdentialses 物业证件
-     */
-    private void doBusinessPropertyCerdentials(Business business, JSONArray businessPropertyCerdentialses) {
-
-        for(int businessPropertyCerdentialsIndex = 0 ; businessPropertyCerdentialsIndex < businessPropertyCerdentialses.size() ; businessPropertyCerdentialsIndex ++) {
-            JSONObject businessPropertyCerdentials = businessPropertyCerdentialses.getJSONObject(businessPropertyCerdentialsIndex);
-            Assert.jsonObjectHaveKey(businessPropertyCerdentials, "propertyId", "businessPropertyPhoto 节点下没有包含 propertyId 节点");
-
-            if (businessPropertyCerdentials.getString("propertyCerdentialsId").startsWith("-")) {
-                throw new ListenerExecuteException(ResponseConstant.RESULT_PARAM_ERROR,"propertyPhotoId 错误,不能自动生成(必须已经存在的propertyCerdentialsId)"+businessPropertyCerdentials);
-            }
-
-            autoSaveDelBusinessPropertyCerdentials(business,businessPropertyCerdentials);
-
-            businessPropertyCerdentials.put("bId", business.getbId());
-            businessPropertyCerdentials.put("operate", StatusConstant.OPERATE_ADD);
-            //保存物业信息
-            propertyServiceDaoImpl.saveBusinessPropertyCerdentials(businessPropertyCerdentials);
-        }
-    }
-
-    public IPropertyServiceDao getPropertyServiceDaoImpl() {
-        return propertyServiceDaoImpl;
-    }
-
-    public void setPropertyServiceDaoImpl(IPropertyServiceDao propertyServiceDaoImpl) {
-        this.propertyServiceDaoImpl = propertyServiceDaoImpl;
-    }
-
-
-
-}

+ 0 - 163
PropertyService/src/main/java/com/java110/property/listener/UpdatePropertyFeeListener.java

@@ -1,163 +0,0 @@
-package com.java110.property.listener;
-
-import com.alibaba.fastjson.JSONArray;
-import com.alibaba.fastjson.JSONObject;
-import com.java110.common.constant.BusinessTypeConstant;
-import com.java110.common.constant.ResponseConstant;
-import com.java110.common.constant.StatusConstant;
-import com.java110.common.exception.ListenerExecuteException;
-import com.java110.common.util.Assert;
-import com.java110.core.annotation.Java110Listener;
-import com.java110.core.context.DataFlowContext;
-import com.java110.entity.center.Business;
-import com.java110.property.dao.IPropertyServiceDao;
-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;
-
-/**
- * 修改物业信息 侦听
- *
- * 处理节点
- * 3、businessPropertyFee:[{}] 物业照片信息节点
- * Created by wuxw on 2018/5/18.
- */
-@Java110Listener("updatePropertyFeeListener")
-@Transactional
-public class UpdatePropertyFeeListener extends AbstractPropertyBusinessServiceDataFlowListener {
-
-    private final static Logger logger = LoggerFactory.getLogger(UpdatePropertyFeeListener.class);
-    @Autowired
-    IPropertyServiceDao propertyServiceDaoImpl;
-
-    @Override
-    public int getOrder() {
-        return 2;
-    }
-
-    @Override
-    public String getBusinessTypeCd() {
-        return BusinessTypeConstant.BUSINESS_TYPE_UPDATE_PROPERTY_FEE;
-    }
-
-    /**
-     * business过程
-     * @param dataFlowContext
-     * @param business
-     */
-    @Override
-    protected void doSaveBusiness(DataFlowContext dataFlowContext, Business business) {
-
-        JSONObject data = business.getDatas();
-
-        Assert.notEmpty(data,"没有datas 节点,或没有子节点需要处理");
-
-
-        if(data.containsKey("businessPropertyFee")){
-            JSONArray businessPropertyFees = data.getJSONArray("businessPropertyFee");
-            doBusinessPropertyFee(business,businessPropertyFees);
-        }
-    }
-
-
-    /**
-     * 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> businessPropertyFees = propertyServiceDaoImpl.getBusinessPropertyFee(info);
-        if(businessPropertyFees != null && businessPropertyFees.size() >0){
-            for(Map businessPropertyFee : businessPropertyFees) {
-                flushBusinessPropertyFee(businessPropertyFee,StatusConstant.STATUS_CD_VALID);
-                propertyServiceDaoImpl.updatePropertyFeeInstance(businessPropertyFee);
-            }
-        }
-
-    }
-
-    /**
-     * 撤单
-     * @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> propertyFees = propertyServiceDaoImpl.getPropertyFee(info);
-        if(propertyFees != null && propertyFees.size()>0){
-            List<Map> businessPropertyFees = propertyServiceDaoImpl.getBusinessPropertyFee(delInfo);
-            //除非程序出错了,这里不会为空
-            if(businessPropertyFees == null || businessPropertyFees.size() ==0 ){
-                throw new ListenerExecuteException(ResponseConstant.RESULT_CODE_INNER_ERROR,"撤单失败(property_fee),程序内部异常,请检查! "+delInfo);
-            }
-            for(Map businessPropertyFee : businessPropertyFees) {
-                flushBusinessPropertyFee(businessPropertyFee,StatusConstant.STATUS_CD_VALID);
-                propertyServiceDaoImpl.updatePropertyFeeInstance(businessPropertyFee);
-            }
-        }
-    }
-
-    /**
-     * 保存物业照片
-     * @param business 业务对象
-     * @param businessPropertyFees 物业照片
-     */
-    private void doBusinessPropertyFee(Business business, JSONArray businessPropertyFees) {
-
-
-        for(int businessPropertyFeeIndex = 0 ;businessPropertyFeeIndex < businessPropertyFees.size();businessPropertyFeeIndex++) {
-            JSONObject businessPropertyFee = businessPropertyFees.getJSONObject(businessPropertyFeeIndex);
-            Assert.jsonObjectHaveKey(businessPropertyFee, "propertyId", "businessPropertyFee 节点下没有包含 propertyId 节点");
-
-            if (businessPropertyFee.getString("feeId").startsWith("-")) {
-                throw new ListenerExecuteException(ResponseConstant.RESULT_PARAM_ERROR,"feeId 错误,不能自动生成(必须已经存在的feeId)"+businessPropertyFee);
-            }
-
-            //自动保存DEL信息
-            autoSaveDelBusinessPropertyFee(business,businessPropertyFee);
-
-            businessPropertyFee.put("bId", business.getbId());
-            businessPropertyFee.put("operate", StatusConstant.OPERATE_ADD);
-            //保存物业信息
-            propertyServiceDaoImpl.saveBusinessPropertyFee(businessPropertyFee);
-        }
-    }
-
-    public IPropertyServiceDao getPropertyServiceDaoImpl() {
-        return propertyServiceDaoImpl;
-    }
-
-    public void setPropertyServiceDaoImpl(IPropertyServiceDao propertyServiceDaoImpl) {
-        this.propertyServiceDaoImpl = propertyServiceDaoImpl;
-    }
-
-
-
-}

+ 0 - 221
PropertyService/src/main/java/com/java110/property/listener/UpdatePropertyHouseListener.java

@@ -1,221 +0,0 @@
-package com.java110.property.listener;
-
-import com.alibaba.fastjson.JSONArray;
-import com.alibaba.fastjson.JSONObject;
-import com.java110.common.constant.BusinessTypeConstant;
-import com.java110.common.constant.ResponseConstant;
-import com.java110.common.constant.StatusConstant;
-import com.java110.common.exception.ListenerExecuteException;
-import com.java110.common.util.Assert;
-import com.java110.core.annotation.Java110Listener;
-import com.java110.core.context.DataFlowContext;
-import com.java110.entity.center.Business;
-import com.java110.property.dao.IPropertyServiceDao;
-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、businessPropertyHouse:{} 物业基本信息节点
- * 2、businessPropertyHouseAttr:[{}] 物业属性信息节点
- * Created by wuxw on 2018/5/18.
- */
-@Java110Listener("updatePropertyHouseHouseListener")
-@Transactional
-public class UpdatePropertyHouseListener extends AbstractPropertyBusinessServiceDataFlowListener {
-
-    private final static Logger logger = LoggerFactory.getLogger(UpdatePropertyHouseListener.class);
-    @Autowired
-    IPropertyServiceDao propertyServiceDaoImpl;
-
-    @Override
-    public int getOrder() {
-        return 2;
-    }
-
-    @Override
-    public String getBusinessTypeCd() {
-        return BusinessTypeConstant.BUSINESS_TYPE_UPDATE_PROPERTY_HOUSE;
-    }
-
-    /**
-     * business过程
-     * @param dataFlowContext
-     * @param business
-     */
-    @Override
-    protected void doSaveBusiness(DataFlowContext dataFlowContext, Business business) {
-
-        JSONObject data = business.getDatas();
-
-        Assert.notEmpty(data,"没有datas 节点,或没有子节点需要处理");
-
-        //处理 businessPropertyHouse 节点
-        if(data.containsKey("businessPropertyHouse")){
-            JSONObject businessPropertyHouse = data.getJSONObject("businessPropertyHouse");
-            doBusinessPropertyHouse(business,businessPropertyHouse);
-            dataFlowContext.addParamOut("propertyId",businessPropertyHouse.getString("propertyId"));
-        }
-
-        if(data.containsKey("businessPropertyHouseAttr")){
-            JSONArray businessPropertyHouseAttrs = data.getJSONArray("businessPropertyHouseAttr");
-            doSaveBusinessPropertyHouseAttrs(business,businessPropertyHouseAttrs);
-        }
-    }
-
-
-    /**
-     * 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);
-
-        //物业信息
-        Map businessPropertyHouseInfo = propertyServiceDaoImpl.getBusinessPropertyHouse(info);
-        if( businessPropertyHouseInfo != null && !businessPropertyHouseInfo.isEmpty()) {
-            flushBusinessPropertyHouse(businessPropertyHouseInfo,StatusConstant.STATUS_CD_VALID);
-            propertyServiceDaoImpl.updatePropertyHouseInstance(businessPropertyHouseInfo);
-            dataFlowContext.addParamOut("houseId",businessPropertyHouseInfo.get("house_id"));
-        }
-        //物业属性
-        List<Map> businessPropertyHouseAttrs = propertyServiceDaoImpl.getBusinessPropertyHouseAttrs(info);
-        if(businessPropertyHouseAttrs != null && businessPropertyHouseAttrs.size() > 0) {
-            for(Map businessPropertyHouseAttr : businessPropertyHouseAttrs) {
-                flushBusinessPropertyHouseAttr(businessPropertyHouseAttr,StatusConstant.STATUS_CD_VALID);
-                propertyServiceDaoImpl.updatePropertyHouseAttrInstance(businessPropertyHouseAttr);
-            }
-        }
-    }
-
-    /**
-     * 撤单
-     * @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);
-        //物业信息
-        Map propertyInfo = propertyServiceDaoImpl.getPropertyHouse(info);
-        if(propertyInfo != null && !propertyInfo.isEmpty()){
-
-            //物业信息
-            Map businessPropertyHouseInfo = propertyServiceDaoImpl.getBusinessPropertyHouse(delInfo);
-            //除非程序出错了,这里不会为空
-            if(businessPropertyHouseInfo == null || businessPropertyHouseInfo.isEmpty()){
-                throw new ListenerExecuteException(ResponseConstant.RESULT_CODE_INNER_ERROR,"撤单失败(property),程序内部异常,请检查! "+delInfo);
-            }
-
-            flushBusinessPropertyHouse(businessPropertyHouseInfo,StatusConstant.STATUS_CD_VALID);
-            propertyServiceDaoImpl.updatePropertyHouseInstance(businessPropertyHouseInfo);
-            dataFlowContext.addParamOut("propertyId",propertyInfo.get("property_id"));
-        }
-
-        //物业属性
-        List<Map> propertyAttrs = propertyServiceDaoImpl.getPropertyHouseAttrs(info);
-        if(propertyAttrs != null && propertyAttrs.size()>0){
-
-            List<Map> businessPropertyHouseAttrs = propertyServiceDaoImpl.getBusinessPropertyHouseAttrs(delInfo);
-            //除非程序出错了,这里不会为空
-            if(businessPropertyHouseAttrs == null || businessPropertyHouseAttrs.size() ==0 ){
-                throw new ListenerExecuteException(ResponseConstant.RESULT_CODE_INNER_ERROR,"撤单失败(property_attr),程序内部异常,请检查! "+delInfo);
-            }
-            for(Map businessPropertyHouseAttr : businessPropertyHouseAttrs) {
-                flushBusinessPropertyHouseAttr(businessPropertyHouseAttr,StatusConstant.STATUS_CD_VALID);
-                propertyServiceDaoImpl.updatePropertyHouseAttrInstance(businessPropertyHouseAttr);
-            }
-        }
-    }
-
-
-    /**
-     * 处理 businessPropertyHouse 节点
-     * @param business 总的数据节点
-     * @param businessPropertyHouse 物业节点
-     */
-    private void doBusinessPropertyHouse(Business business,JSONObject businessPropertyHouse){
-
-        Assert.jsonObjectHaveKey(businessPropertyHouse,"propertyId","businessPropertyHouse 节点下没有包含 propertyId 节点");
-        Assert.jsonObjectHaveKey(businessPropertyHouse,"houseId","businessPropertyHouse 节点下没有包含 houseId 节点");
-
-        if(businessPropertyHouse.getString("propertyId").startsWith("-")){
-            throw new ListenerExecuteException(ResponseConstant.RESULT_PARAM_ERROR,"propertyId 错误,不能自动生成(必须已经存在的propertyId)"+businessPropertyHouse);
-        }
-
-        if(businessPropertyHouse.getString("houseId").startsWith("-")){
-            throw new ListenerExecuteException(ResponseConstant.RESULT_PARAM_ERROR,"houseId 错误,不能自动生成(必须已经存在的houseId)"+businessPropertyHouse);
-        }
-        //自动保存DEL
-        autoSaveDelBusinessPropertyHouse(business,businessPropertyHouse);
-
-        businessPropertyHouse.put("bId",business.getbId());
-        businessPropertyHouse.put("operate", StatusConstant.OPERATE_ADD);
-        //保存物业信息
-        propertyServiceDaoImpl.saveBusinessPropertyHouse(businessPropertyHouse);
-
-    }
-
-
-
-    /**
-     * 保存物业属性信息
-     * @param business 当前业务
-     * @param businessPropertyHouseAttrs 物业属性
-     */
-    private void doSaveBusinessPropertyHouseAttrs(Business business,JSONArray businessPropertyHouseAttrs){
-        JSONObject data = business.getDatas();
-
-
-        for(int propertyAttrIndex = 0 ; propertyAttrIndex < businessPropertyHouseAttrs.size();propertyAttrIndex ++){
-            JSONObject propertyAttr = businessPropertyHouseAttrs.getJSONObject(propertyAttrIndex);
-            Assert.jsonObjectHaveKey(propertyAttr,"attrId","businessPropertyHouseAttr 节点下没有包含 attrId 节点");
-            if(propertyAttr.getString("attrId").startsWith("-")){
-                throw new ListenerExecuteException(ResponseConstant.RESULT_PARAM_ERROR,"attrId 错误,不能自动生成(必须已经存在的attrId)"+propertyAttr);
-            }
-            //自动保存DEL数据
-            autoSaveDelBusinessPropertyHouseAttr(business,propertyAttr);
-
-            propertyAttr.put("bId",business.getbId());
-            propertyAttr.put("propertyId",propertyAttr.getString("propertyId"));
-            propertyAttr.put("operate", StatusConstant.OPERATE_ADD);
-
-            propertyServiceDaoImpl.saveBusinessPropertyHouseAttr(propertyAttr);
-        }
-    }
-    
-
-    public IPropertyServiceDao getPropertyServiceDaoImpl() {
-        return propertyServiceDaoImpl;
-    }
-
-    public void setPropertyServiceDaoImpl(IPropertyServiceDao propertyServiceDaoImpl) {
-        this.propertyServiceDaoImpl = propertyServiceDaoImpl;
-    }
-
-
-
-}

+ 0 - 231
PropertyService/src/main/java/com/java110/property/listener/UpdatePropertyInfoListener.java

@@ -1,231 +0,0 @@
-package com.java110.property.listener;
-
-import com.alibaba.fastjson.JSONArray;
-import com.alibaba.fastjson.JSONObject;
-import com.java110.common.constant.BusinessTypeConstant;
-import com.java110.common.constant.ResponseConstant;
-import com.java110.common.constant.StatusConstant;
-import com.java110.common.exception.ListenerExecuteException;
-import com.java110.common.util.Assert;
-import com.java110.core.annotation.Java110Listener;
-import com.java110.core.context.DataFlowContext;
-import com.java110.entity.center.Business;
-import com.java110.property.dao.IPropertyServiceDao;
-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、businessPropertyInfo:{} 物业基本信息节点
- * 2、businessPropertyAttr:[{}] 物业属性信息节点
- * Created by wuxw on 2018/5/18.
- */
-@Java110Listener("updatePropertyInfoListener")
-@Transactional
-public class UpdatePropertyInfoListener extends AbstractPropertyBusinessServiceDataFlowListener {
-
-    private final static Logger logger = LoggerFactory.getLogger(UpdatePropertyInfoListener.class);
-    @Autowired
-    IPropertyServiceDao propertyServiceDaoImpl;
-
-    @Override
-    public int getOrder() {
-        return 2;
-    }
-
-    @Override
-    public String getBusinessTypeCd() {
-        return BusinessTypeConstant.BUSINESS_TYPE_UPDATE_PROPERTY_INFO;
-    }
-
-    /**
-     * business过程
-     * @param dataFlowContext
-     * @param business
-     */
-    @Override
-    protected void doSaveBusiness(DataFlowContext dataFlowContext, Business business) {
-
-        JSONObject data = business.getDatas();
-
-        Assert.notEmpty(data,"没有datas 节点,或没有子节点需要处理");
-
-        //处理 businessProperty 节点
-        if(data.containsKey("businessProperty")){
-            JSONObject businessProperty = data.getJSONObject("businessProperty");
-            doBusinessProperty(business,businessProperty);
-            dataFlowContext.addParamOut("propertyId",businessProperty.getString("propertyId"));
-        }
-
-        if(data.containsKey("businessPropertyAttr")){
-            JSONArray businessPropertyAttrs = data.getJSONArray("businessPropertyAttr");
-            doSaveBusinessPropertyAttrs(business,businessPropertyAttrs);
-        }
-    }
-
-
-    /**
-     * 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);
-
-        //物业信息
-        Map businessPropertyInfo = propertyServiceDaoImpl.getBusinessPropertyInfo(info);
-        if( businessPropertyInfo != null && !businessPropertyInfo.isEmpty()) {
-            flushBusinessPropertyInfo(businessPropertyInfo,StatusConstant.STATUS_CD_VALID);
-            propertyServiceDaoImpl.updatePropertyInfoInstance(businessPropertyInfo);
-            dataFlowContext.addParamOut("propertyId",businessPropertyInfo.get("property_id"));
-        }
-        //物业属性
-        List<Map> businessPropertyAttrs = propertyServiceDaoImpl.getBusinessPropertyAttrs(info);
-        if(businessPropertyAttrs != null && businessPropertyAttrs.size() > 0) {
-            for(Map businessPropertyAttr : businessPropertyAttrs) {
-                flushBusinessPropertyAttr(businessPropertyAttr,StatusConstant.STATUS_CD_VALID);
-                propertyServiceDaoImpl.updatePropertyAttrInstance(businessPropertyAttr);
-            }
-        }
-        //物业照片
-        List<Map> businessPropertyPhotos = propertyServiceDaoImpl.getBusinessPropertyPhoto(info);
-        if(businessPropertyPhotos != null && businessPropertyPhotos.size() >0){
-            for(Map businessPropertyPhoto : businessPropertyPhotos) {
-                flushBusinessPropertyPhoto(businessPropertyPhoto,StatusConstant.STATUS_CD_VALID);
-                propertyServiceDaoImpl.updatePropertyPhotoInstance(businessPropertyPhoto);
-            }
-        }
-        //物业证件
-        List<Map> businessPropertyCerdentialses = propertyServiceDaoImpl.getBusinessPropertyCerdentials(info);
-        if(businessPropertyCerdentialses != null && businessPropertyCerdentialses.size()>0){
-            for(Map businessPropertyCerdentials : businessPropertyCerdentialses) {
-                flushBusinessPropertyCredentials(businessPropertyCerdentials,StatusConstant.STATUS_CD_VALID);
-                propertyServiceDaoImpl.updatePropertyCerdentailsInstance(businessPropertyCerdentials);
-            }
-        }
-    }
-
-    /**
-     * 撤单
-     * @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);
-        //物业信息
-        Map propertyInfo = propertyServiceDaoImpl.getPropertyInfo(info);
-        if(propertyInfo != null && !propertyInfo.isEmpty()){
-
-            //物业信息
-            Map businessPropertyInfo = propertyServiceDaoImpl.getBusinessPropertyInfo(delInfo);
-            //除非程序出错了,这里不会为空
-            if(businessPropertyInfo == null || businessPropertyInfo.isEmpty()){
-                throw new ListenerExecuteException(ResponseConstant.RESULT_CODE_INNER_ERROR,"撤单失败(property),程序内部异常,请检查! "+delInfo);
-            }
-
-            flushBusinessPropertyInfo(businessPropertyInfo,StatusConstant.STATUS_CD_VALID);
-            propertyServiceDaoImpl.updatePropertyInfoInstance(businessPropertyInfo);
-            dataFlowContext.addParamOut("propertyId",propertyInfo.get("property_id"));
-        }
-
-        //物业属性
-        List<Map> propertyAttrs = propertyServiceDaoImpl.getPropertyAttrs(info);
-        if(propertyAttrs != null && propertyAttrs.size()>0){
-
-            List<Map> businessPropertyAttrs = propertyServiceDaoImpl.getBusinessPropertyAttrs(delInfo);
-            //除非程序出错了,这里不会为空
-            if(businessPropertyAttrs == null || businessPropertyAttrs.size() ==0 ){
-                throw new ListenerExecuteException(ResponseConstant.RESULT_CODE_INNER_ERROR,"撤单失败(property_attr),程序内部异常,请检查! "+delInfo);
-            }
-            for(Map businessPropertyAttr : businessPropertyAttrs) {
-                flushBusinessPropertyAttr(businessPropertyAttr,StatusConstant.STATUS_CD_VALID);
-                propertyServiceDaoImpl.updatePropertyAttrInstance(businessPropertyAttr);
-            }
-        }
-    }
-
-    /**
-     * 处理 businessProperty 节点
-     * @param business 总的数据节点
-     * @param businessProperty 物业节点
-     */
-    private void doBusinessProperty(Business business,JSONObject businessProperty){
-
-        Assert.jsonObjectHaveKey(businessProperty,"propertyId","businessProperty 节点下没有包含 propertyId 节点");
-
-        if(businessProperty.getString("propertyId").startsWith("-")){
-            throw new ListenerExecuteException(ResponseConstant.RESULT_PARAM_ERROR,"propertyId 错误,不能自动生成(必须已经存在的propertyId)"+businessProperty);
-        }
-        //自动保存DEL
-        autoSaveDelBusinessProperty(business,businessProperty);
-
-        businessProperty.put("bId",business.getbId());
-        businessProperty.put("operate", StatusConstant.OPERATE_ADD);
-        //保存物业信息
-        propertyServiceDaoImpl.saveBusinessPropertyInfo(businessProperty);
-
-    }
-
-
-
-    /**
-     * 保存物业属性信息
-     * @param business 当前业务
-     * @param businessPropertyAttrs 物业属性
-     */
-    private void doSaveBusinessPropertyAttrs(Business business,JSONArray businessPropertyAttrs){
-        JSONObject data = business.getDatas();
-
-
-        for(int propertyAttrIndex = 0 ; propertyAttrIndex < businessPropertyAttrs.size();propertyAttrIndex ++){
-            JSONObject propertyAttr = businessPropertyAttrs.getJSONObject(propertyAttrIndex);
-            Assert.jsonObjectHaveKey(propertyAttr,"attrId","businessPropertyAttr 节点下没有包含 attrId 节点");
-            if(propertyAttr.getString("attrId").startsWith("-")){
-                throw new ListenerExecuteException(ResponseConstant.RESULT_PARAM_ERROR,"attrId 错误,不能自动生成(必须已经存在的attrId)"+propertyAttr);
-            }
-            //自动保存DEL数据
-            autoSaveDelBusinessPropertyAttr(business,propertyAttr);
-
-            propertyAttr.put("bId",business.getbId());
-            propertyAttr.put("propertyId",propertyAttr.getString("propertyId"));
-            propertyAttr.put("operate", StatusConstant.OPERATE_ADD);
-
-            propertyServiceDaoImpl.saveBusinessPropertyAttr(propertyAttr);
-        }
-    }
-
-
-    public IPropertyServiceDao getPropertyServiceDaoImpl() {
-        return propertyServiceDaoImpl;
-    }
-
-    public void setPropertyServiceDaoImpl(IPropertyServiceDao propertyServiceDaoImpl) {
-        this.propertyServiceDaoImpl = propertyServiceDaoImpl;
-    }
-
-
-
-}

+ 0 - 161
PropertyService/src/main/java/com/java110/property/listener/UpdatePropertyPhotoListener.java

@@ -1,161 +0,0 @@
-package com.java110.property.listener;
-
-import com.alibaba.fastjson.JSONArray;
-import com.alibaba.fastjson.JSONObject;
-import com.java110.common.constant.BusinessTypeConstant;
-import com.java110.common.constant.ResponseConstant;
-import com.java110.common.constant.StatusConstant;
-import com.java110.common.exception.ListenerExecuteException;
-import com.java110.common.util.Assert;
-import com.java110.core.annotation.Java110Listener;
-import com.java110.core.context.DataFlowContext;
-import com.java110.entity.center.Business;
-import com.java110.property.dao.IPropertyServiceDao;
-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、businessPropertyPhoto:{} 物业照片节点
- * Created by wuxw on 2018/5/18.
- */
-@Java110Listener("updatePropertyPhotoListener")
-@Transactional
-public class UpdatePropertyPhotoListener extends AbstractPropertyBusinessServiceDataFlowListener {
-
-    private final static Logger logger = LoggerFactory.getLogger(UpdatePropertyPhotoListener.class);
-    @Autowired
-    IPropertyServiceDao propertyServiceDaoImpl;
-
-    @Override
-    public int getOrder() {
-        return 2;
-    }
-
-    @Override
-    public String getBusinessTypeCd() {
-        return BusinessTypeConstant.BUSINESS_TYPE_UPDATE_PROPERTY_PHOTO;
-    }
-
-    /**
-     * business过程
-     * @param dataFlowContext
-     * @param business
-     */
-    @Override
-    protected void doSaveBusiness(DataFlowContext dataFlowContext, Business business) {
-
-        JSONObject data = business.getDatas();
-
-        Assert.notEmpty(data,"没有datas 节点,或没有子节点需要处理");
-
-        if(data.containsKey("businessPropertyPhoto")){
-            JSONArray businessPropertyPhotos = data.getJSONArray("businessPropertyPhoto");
-            doBusinessPropertyPhoto(business,businessPropertyPhotos);
-        }
-    }
-
-
-    /**
-     * 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> businessPropertyPhotos = propertyServiceDaoImpl.getBusinessPropertyPhoto(info);
-        if(businessPropertyPhotos != null && businessPropertyPhotos.size() >0){
-            for(Map businessPropertyPhoto : businessPropertyPhotos) {
-                flushBusinessPropertyPhoto(businessPropertyPhoto,StatusConstant.STATUS_CD_VALID);
-                propertyServiceDaoImpl.updatePropertyPhotoInstance(businessPropertyPhoto);
-            }
-        }
-
-    }
-
-    /**
-     * 撤单
-     * @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> propertyPhotos = propertyServiceDaoImpl.getPropertyPhoto(info);
-        if(propertyPhotos != null && propertyPhotos.size()>0){
-            List<Map> businessPropertyPhotos = propertyServiceDaoImpl.getBusinessPropertyPhoto(delInfo);
-            //除非程序出错了,这里不会为空
-            if(businessPropertyPhotos == null || businessPropertyPhotos.size() ==0 ){
-                throw new ListenerExecuteException(ResponseConstant.RESULT_CODE_INNER_ERROR,"撤单失败(property_photo),程序内部异常,请检查! "+delInfo);
-            }
-            for(Map businessPropertyPhoto : businessPropertyPhotos) {
-                flushBusinessPropertyPhoto(businessPropertyPhoto,StatusConstant.STATUS_CD_VALID);
-                propertyServiceDaoImpl.updatePropertyPhotoInstance(businessPropertyPhoto);
-            }
-        }
-    }
-
-    /**
-     * 保存物业照片
-     * @param business 业务对象
-     * @param businessPropertyPhotos 物业照片
-     */
-    private void doBusinessPropertyPhoto(Business business, JSONArray businessPropertyPhotos) {
-
-
-        for(int businessPropertyPhotoIndex = 0 ;businessPropertyPhotoIndex < businessPropertyPhotos.size();businessPropertyPhotoIndex++) {
-            JSONObject businessPropertyPhoto = businessPropertyPhotos.getJSONObject(businessPropertyPhotoIndex);
-            Assert.jsonObjectHaveKey(businessPropertyPhoto, "propertyId", "businessPropertyPhoto 节点下没有包含 propertyId 节点");
-
-            if (businessPropertyPhoto.getString("propertyPhotoId").startsWith("-")) {
-                throw new ListenerExecuteException(ResponseConstant.RESULT_PARAM_ERROR,"propertyPhotoId 错误,不能自动生成(必须已经存在的propertyPhotoId)"+businessPropertyPhoto);
-            }
-
-            //自动保存DEL信息
-            autoSaveDelBusinessPropertyPhoto(business,businessPropertyPhoto);
-
-            businessPropertyPhoto.put("bId", business.getbId());
-            businessPropertyPhoto.put("operate", StatusConstant.OPERATE_ADD);
-            //保存物业信息
-            propertyServiceDaoImpl.saveBusinessPropertyPhoto(businessPropertyPhoto);
-        }
-    }
-
-
-    public IPropertyServiceDao getPropertyServiceDaoImpl() {
-        return propertyServiceDaoImpl;
-    }
-
-    public void setPropertyServiceDaoImpl(IPropertyServiceDao propertyServiceDaoImpl) {
-        this.propertyServiceDaoImpl = propertyServiceDaoImpl;
-    }
-
-
-
-}

+ 0 - 17
PropertyService/src/main/java/com/java110/property/smo/IPropertyServiceSMO.java

@@ -1,17 +0,0 @@
-package com.java110.property.smo;
-
-import com.alibaba.fastjson.JSONObject;
-import com.java110.common.exception.SMOException;
-import com.java110.core.context.BusinessServiceDataFlow;
-
-/**
- *
- * 用户信息管理,服务
- * Created by wuxw on 2017/4/5.
- */
-public interface IPropertyServiceSMO {
-
-
-    public JSONObject service(BusinessServiceDataFlow businessServiceDataFlow) throws SMOException;
-
-}

+ 0 - 110
PropertyService/src/main/java/com/java110/property/smo/impl/PropertyServiceSMOImpl.java

@@ -1,110 +0,0 @@
-package com.java110.property.smo.impl;
-
-import com.alibaba.fastjson.JSONArray;
-import com.alibaba.fastjson.JSONObject;
-import com.java110.property.smo.IPropertyServiceSMO;
-import com.java110.common.cache.MappingCache;
-import com.java110.common.constant.KafkaConstant;
-import com.java110.common.constant.MappingConstant;
-import com.java110.common.constant.ResponseConstant;
-import com.java110.common.exception.SMOException;
-import com.java110.common.kafka.KafkaFactory;
-import com.java110.common.util.Assert;
-import com.java110.common.util.DateUtil;
-import com.java110.core.base.smo.BaseServiceSMO;
-import com.java110.core.context.BusinessServiceDataFlow;
-import com.java110.core.factory.DataFlowFactory;
-import com.java110.entity.center.DataFlowLinksCost;
-import com.java110.entity.center.DataFlowLog;
-import com.java110.event.service.BusinessServiceDataFlowEventPublishing;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Transactional;
-
-import java.util.Date;
-import java.util.List;
-
-/**
- * 用户服务信息管理业务信息实现
- * Created by wuxw on 2017/4/5.
- */
-@Service("propertyServiceSMOImpl")
-@Transactional
-public class PropertyServiceSMOImpl extends BaseServiceSMO implements IPropertyServiceSMO {
-    private final static Logger logger = LoggerFactory.getLogger(PropertyServiceSMOImpl.class);
-
-
-        @Override
-        public JSONObject service(BusinessServiceDataFlow businessServiceDataFlow) throws SMOException {
-            try {
-                Assert.hasLength(businessServiceDataFlow.getbId(),"bId 不能为空");
-
-                BusinessServiceDataFlowEventPublishing.multicastEvent(businessServiceDataFlow);
-                Assert.notEmpty(businessServiceDataFlow.getResJson(),"用户服务["+businessServiceDataFlow.getCurrentBusiness().getServiceCode()+"]没有返回内容");
-            } catch (Exception e) {
-                logger.error("用户信息处理异常",e);
-                throw new SMOException(ResponseConstant.RESULT_PARAM_ERROR,"用户信息处理异常"+e.getMessage());
-            }finally {
-                if(businessServiceDataFlow == null){
-                    return null;
-                }
-
-                //这里记录日志
-                Date endDate = DateUtil.getCurrentDate();
-
-                businessServiceDataFlow.setEndDate(endDate);
-                //添加耗时
-                DataFlowFactory.addCostTime(businessServiceDataFlow, "service", "业务处理总耗时",
-                        businessServiceDataFlow.getStartDate(), businessServiceDataFlow.getEndDate());
-                //保存耗时
-                saveCostTimeLogMessage(businessServiceDataFlow);
-                //保存日志
-                saveLogMessage(businessServiceDataFlow);
-            }
-            return businessServiceDataFlow.getResJson();
-    }
-
-    /**
-     * 保存日志信息
-     * @param businessServiceDataFlow
-     */
-    private void saveLogMessage(BusinessServiceDataFlow businessServiceDataFlow){
-
-        try{
-            if(MappingConstant.VALUE_ON.equals(MappingCache.getValue(MappingConstant.KEY_LOG_ON_OFF))){
-                for(DataFlowLog dataFlowLog :businessServiceDataFlow.getLogDatas()) {
-                    KafkaFactory.sendKafkaMessage(KafkaConstant.TOPIC_LOG_NAME, "", JSONObject.toJSONString(dataFlowLog));
-                }
-            }
-        }catch (Exception e){
-            logger.error("报错日志出错了,",e);
-        }
-    }
-
-    /**
-     * 保存耗时信息
-     * @param businessServiceDataFlow
-     */
-    private void saveCostTimeLogMessage(BusinessServiceDataFlow businessServiceDataFlow){
-        try{
-            if(MappingConstant.VALUE_ON.equals(MappingCache.getValue(MappingConstant.KEY_COST_TIME_ON_OFF))){
-                List<DataFlowLinksCost> dataFlowLinksCosts = businessServiceDataFlow.getLinksCostDates();
-                JSONObject costDate = new JSONObject();
-                JSONArray costDates = new JSONArray();
-                JSONObject newObj = null;
-                for(DataFlowLinksCost dataFlowLinksCost : dataFlowLinksCosts){
-                    newObj = JSONObject.parseObject(JSONObject.toJSONString(dataFlowLinksCost));
-                    newObj.put("dataFlowId",businessServiceDataFlow.getDataFlowId());
-                    newObj.put("transactionId",businessServiceDataFlow.getTransactionId());
-                    costDates.add(newObj);
-                }
-                costDate.put("costDates",costDates);
-
-                KafkaFactory.sendKafkaMessage(KafkaConstant.TOPIC_COST_TIME_LOG_NAME,"",costDate.toJSONString());
-            }
-        }catch (Exception e){
-            logger.error("报错日志出错了,",e);
-        }
-    }
-}

+ 0 - 94
PropertyService/src/main/resources/application-dev.yml

@@ -1,94 +0,0 @@
-jedis:
-  pool:
-    config:
-      maxTotal: 100
-      maxIdle: 20
-      maxWaitMillis: 20000
-    host: dev.redis.java110.com
-    port: 6379
-
-eureka:
-  instance:
-    leaseRenewalIntervalInSeconds: 10
-    leaseExpirationDurationInSeconds: 30
-    preferIpAddress: true
-    instanceId: ${spring.cloud.client.ipAddress}:${server.port}
-  client:
-    serviceUrl:
-      defaultZone: http://dev.java110.com:8761/eureka/
-      #defaultZone: http://localhost:8761/eureka/
-server:
-  port: 8011
-  tomcat:
-    uri-encoding: UTF-8
-
-spring:
-  http:
-    encoding:
-      charset: UTF-8
-      enabled: true
-      force: true
-  application:
-    name: property-service
-  redis:
-    database: 0
-    host: dev.redis.java110.com
-    port: 6379
-    pool:
-      max-active: 300
-      max-wait: 10000
-      max-idle: 100
-      min-idle: 0
-      timeout: 0
-  datasource:
-    connectionProperties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000
-    minIdle: 5
-    validationQuery: SELECT 1 FROM DUAL
-    initialSize: 5
-    maxWait: 60000
-    filters: stat,wall,log4j
-    poolPreparedStatements: true
-    type: com.alibaba.druid.pool.DruidDataSource
-    url: jdbc:mysql://dev.db.java110.com:3306/TT?useUnicode=true&characterEncoding=utf-8
-    maxPoolPreparedStatementPerConnectionSize: 20
-    password: TT@12345678
-    testOnBorrow: false
-    testWhileIdle: true
-    minEvictableIdleTimeMillis: 300000
-    timeBetweenEvictionRunsMillis: 60000
-    testOnReturn: false
-    driverClassName: com.mysql.jdbc.Driver
-    maxActive: 20
-    username: TT
-
-#============== kafka ===================
-kafka:
-  consumer:
-    zookeeper:
-      connect: dev.zk.java110.com:2181
-    servers: dev.kafka.java110.com:9092
-    enable:
-      auto:
-        commit: true
-    session:
-      timeout: 6000
-    auto:
-      commit:
-        interval: 100
-      offset:
-        reset: latest
-    topic: test
-    group:
-      id: propertyBusinessStatus
-    concurrency: 10
-
-  producer:
-    zookeeper:
-      connect: dev.zk.java110.com:2181
-    servers: dev.kafka.java110.com:9092
-    retries: 0
-    batch:
-      size: 4096
-    linger: 1
-    buffer:
-      memory: 40960

+ 0 - 94
PropertyService/src/main/resources/application-prod.yml

@@ -1,94 +0,0 @@
-jedis:
-  pool:
-    config:
-      maxTotal: 100
-      maxIdle: 20
-      maxWaitMillis: 20000
-    host: prod.redis.java110.com
-    port: 6379
-
-eureka:
-  instance:
-    leaseRenewalIntervalInSeconds: 10
-    leaseExpirationDurationInSeconds: 30
-    preferIpAddress: true
-    instanceId: ${spring.cloud.client.ipAddress}:${server.port}
-  client:
-    serviceUrl:
-      defaultZone: http://prod.java110.com:8761/eureka/
-      #defaultZone: http://localhost:8761/eureka/
-server:
-  port: 8011
-  tomcat:
-    uri-encoding: UTF-8
-
-spring:
-  http:
-    encoding:
-      charset: UTF-8
-      enabled: true
-      force: true
-  application:
-    name: property-service
-  redis:
-    database: 0
-    host: prod.redis.java110.com
-    port: 6379
-    pool:
-      max-active: 300
-      max-wait: 10000
-      max-idle: 100
-      min-idle: 0
-      timeout: 0
-  datasource:
-    connectionProperties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000
-    minIdle: 5
-    validationQuery: SELECT 1 FROM DUAL
-    initialSize: 5
-    maxWait: 60000
-    filters: stat,wall,log4j
-    poolPreparedStatements: true
-    type: com.alibaba.druid.pool.DruidDataSource
-    url: jdbc:mysql://prod.db.java110.com:3306/TT?useUnicode=true&characterEncoding=utf-8
-    maxPoolPreparedStatementPerConnectionSize: 20
-    password: TT@12345678
-    testOnBorrow: false
-    testWhileIdle: true
-    minEvictableIdleTimeMillis: 300000
-    timeBetweenEvictionRunsMillis: 60000
-    testOnReturn: false
-    driverClassName: com.mysql.jdbc.Driver
-    maxActive: 20
-    username: TT
-
-#============== kafka ===================
-kafka:
-  consumer:
-    zookeeper:
-      connect: prod.zk.java110.com:2181
-    servers: prod.kafka.java110.com:9092
-    enable:
-      auto:
-        commit: true
-    session:
-      timeout: 6000
-    auto:
-      commit:
-        interval: 100
-      offset:
-        reset: latest
-    topic: test
-    group:
-      id: propertyBusinessStatus
-    concurrency: 10
-
-  producer:
-    zookeeper:
-      connect: prod.zk.java110.com:2181
-    servers: prod.kafka.java110.com:9092
-    retries: 0
-    batch:
-      size: 4096
-    linger: 1
-    buffer:
-      memory: 40960

+ 0 - 94
PropertyService/src/main/resources/application-test.yml

@@ -1,94 +0,0 @@
-jedis:
-  pool:
-    config:
-      maxTotal: 100
-      maxIdle: 20
-      maxWaitMillis: 20000
-    host: test.redis.java110.com
-    port: 6379
-
-eureka:
-  instance:
-    leaseRenewalIntervalInSeconds: 10
-    leaseExpirationDurationInSeconds: 30
-    preferIpAddress: true
-    instanceId: ${spring.cloud.client.ipAddress}:${server.port}
-  client:
-    serviceUrl:
-      defaultZone: http://test.java110.com:8761/eureka/
-      #defaultZone: http://localhost:8761/eureka/
-server:
-  port: 8011
-  tomcat:
-    uri-encoding: UTF-8
-
-spring:
-  http:
-    encoding:
-      charset: UTF-8
-      enabled: true
-      force: true
-  application:
-    name: property-service
-  redis:
-    database: 0
-    host: test.redis.java110.com
-    port: 6379
-    pool:
-      max-active: 300
-      max-wait: 10000
-      max-idle: 100
-      min-idle: 0
-      timeout: 0
-  datasource:
-    connectionProperties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000
-    minIdle: 5
-    validationQuery: SELECT 1 FROM DUAL
-    initialSize: 5
-    maxWait: 60000
-    filters: stat,wall,log4j
-    poolPreparedStatements: true
-    type: com.alibaba.druid.pool.DruidDataSource
-    url: jdbc:mysql://test.db.java110.com:3306/TT?useUnicode=true&characterEncoding=utf-8
-    maxPoolPreparedStatementPerConnectionSize: 20
-    password: TT@12345678
-    testOnBorrow: false
-    testWhileIdle: true
-    minEvictableIdleTimeMillis: 300000
-    timeBetweenEvictionRunsMillis: 60000
-    testOnReturn: false
-    driverClassName: com.mysql.jdbc.Driver
-    maxActive: 20
-    username: TT
-
-#============== kafka ===================
-kafka:
-  consumer:
-    zookeeper:
-      connect: test.zk.java110.com:2181
-    servers: test.kafka.java110.com:9092
-    enable:
-      auto:
-        commit: true
-    session:
-      timeout: 6000
-    auto:
-      commit:
-        interval: 100
-      offset:
-        reset: latest
-    topic: test
-    group:
-      id: propertyBusinessStatus
-    concurrency: 10
-
-  producer:
-    zookeeper:
-      connect: test.zk.java110.com:2181
-    servers: test.kafka.java110.com:9092
-    retries: 0
-    batch:
-      size: 4096
-    linger: 1
-    buffer:
-      memory: 40960

+ 0 - 3
PropertyService/src/main/resources/application.yml

@@ -1,3 +0,0 @@
-spring:
-  profiles:
-    active: dev

+ 0 - 15
PropertyService/src/main/resources/banner.txt

@@ -1,15 +0,0 @@
-${AnsiColor.BRIGHT_RED}
-     __                    ____ ___________
-    |__|____ ___  _______ /_   /_   \   _  \
-    |  \__  \\  \/ /\__  \ |   ||   /  /_\  \
-    |  |/ __ \\   /  / __ \|   ||   \  \_/   \
-/\__|  (____  /\_/  (____  /___||___|\_____  /
-\______|    \/           \/                \/
- ____ ___                    _________                  .__
-|    |   \______ ___________/   _____/ ______________  _|__| ____  ____
-|    |   /  ___// __ \_  __ \_____  \_/ __ \_  __ \  \/ /  |/ ___\/ __ \
-|    |  /\___ \\  ___/|  | \/        \  ___/|  | \/\   /|  \  \__\  ___/
-|______//____  >\___  >__| /_______  /\___  >__|    \_/ |__|\___  >___  >
-             \/     \/             \/     \/                    \/    \/
-
- java110 UserService starting, more information scan https://github.com/java110/MicroCommunity

+ 0 - 20
PropertyService/src/test/java/com/java110/AppTest.java

@@ -1,20 +0,0 @@
-package com.java110;
-
-import static org.junit.Assert.assertTrue;
-
-import org.junit.Test;
-
-/**
- * Unit test for simple App.
- */
-public class AppTest 
-{
-    /**
-     * Rigorous Test :-)
-     */
-    @Test
-    public void shouldAnswerWithTrue()
-    {
-        assertTrue( true );
-    }
-}

+ 0 - 64
SimpleListenerService/pom.xml

@@ -1,64 +0,0 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <parent>
-        <artifactId>MicroCommunity</artifactId>
-        <groupId>com.java110</groupId>
-        <version>1.0-SNAPSHOT</version>
-    </parent>
-    <modelVersion>4.0.0</modelVersion>
-
-    <artifactId>SimpleListenerService</artifactId>
-    <packaging>jar</packaging>
-
-    <name>SimpleListenerService</name>
-    <url>http://maven.apache.org</url>
-
-    <properties>
-        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-    </properties>
-
-    <dependencies>
-        <dependency>
-            <groupId>com.java110</groupId>
-            <artifactId>java110-common</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>com.java110</groupId>
-            <artifactId>java110-feign</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>com.java110</groupId>
-            <artifactId>java110-core</artifactId>
-        </dependency>
-        <!-- 整合ribbon -->
-        <dependency>
-            <groupId>org.springframework.cloud</groupId>
-            <artifactId>spring-cloud-starter-ribbon</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>org.springframework.cloud</groupId>
-            <artifactId>spring-cloud-starter-eureka</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>org.springframework.cloud</groupId>
-            <artifactId>spring-cloud-starter-feign</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>org.springframework.boot</groupId>
-            <artifactId>spring-boot-starter-jdbc</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>org.springframework</groupId>
-            <artifactId>spring-context-support</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>org.quartz-scheduler</groupId>
-            <artifactId>quartz</artifactId>
-        </dependency>
-    </dependencies>
-</project>

+ 0 - 13
SimpleListenerService/src/main/java/com/java110/App.java

@@ -1,13 +0,0 @@
-package com.java110;
-
-/**
- * Hello world!
- *
- */
-public class App 
-{
-    public static void main( String[] args )
-    {
-        System.out.println( "Hello World!" );
-    }
-}

+ 0 - 0
SimpleListenerService/src/test/java/com/java110/AppTest.java


Some files were not shown because too many files changed in this diff