wangxiaoming %!s(int64=5) %!d(string=hai) anos
achega
37d9d7c775
Modificáronse 100 ficheiros con 10199 adicións e 0 borrados
  1. 23 0
      .gitignore
  2. 0 0
      README.md
  3. 120 0
      iamberry-parent.iml
  4. 543 0
      pom.xml
  5. 64 0
      wechat-common-core/pom.xml
  6. 54 0
      wechat-common-core/src/main/java/com/iamberry/cms/core/dto/MilkPowderInfoDto.java
  7. 98 0
      wechat-common-core/src/main/java/com/iamberry/cms/core/entity/Machine.java
  8. 161 0
      wechat-common-core/src/main/java/com/iamberry/cms/core/entity/MilkMakingRecord.java
  9. 145 0
      wechat-common-core/src/main/java/com/iamberry/cms/core/entity/MilkPowderInfo.java
  10. 101 0
      wechat-common-core/src/main/java/com/iamberry/cms/core/entity/customer/CustomerInfo.java
  11. 131 0
      wechat-common-core/src/main/java/com/iamberry/cms/core/entity/mq/MQMessage.java
  12. 45 0
      wechat-common-core/src/main/java/com/iamberry/exception/ServiceException.java
  13. 284 0
      wechat-common-core/src/main/java/com/iamberry/wechat/core/entity/AdminUtils.java
  14. 55 0
      wechat-common-core/src/main/java/com/iamberry/wechat/core/entity/CommonDto.java
  15. 35 0
      wechat-common-core/src/main/java/com/iamberry/wechat/core/entity/JsonBack.java
  16. 112 0
      wechat-common-core/src/main/java/com/iamberry/wechat/core/entity/Page.java
  17. 122 0
      wechat-common-core/src/main/java/com/iamberry/wechat/core/entity/PageBean.java
  18. 110 0
      wechat-common-core/src/main/java/com/iamberry/wechat/core/entity/PaperBean.java
  19. 93 0
      wechat-common-core/src/main/java/com/iamberry/wechat/core/entity/ResultMsg.java
  20. 222 0
      wechat-common-core/src/main/java/com/iamberry/wechat/core/entity/WechatUtils.java
  21. 71 0
      wechat-common-core/src/main/java/com/iamberry/wechat/core/entity/member/ApplyDto.java
  22. 105 0
      wechat-common-core/src/main/java/com/iamberry/wechat/core/entity/member/Integral.java
  23. 84 0
      wechat-common-core/src/main/java/com/iamberry/wechat/core/entity/member/IntegralDto.java
  24. 364 0
      wechat-common-core/src/main/java/com/iamberry/wechat/core/entity/member/Member.java
  25. 69 0
      wechat-common-core/src/main/java/com/iamberry/wechat/core/entity/member/ShareInfo.java
  26. 194 0
      wechat-common-core/src/main/java/com/iamberry/wechat/core/entity/member/Withdraw.java
  27. 131 0
      wechat-common-core/src/main/java/com/iamberry/wechat/core/entity/mq/MQMessage.java
  28. 63 0
      wechat-common-core/src/main/java/com/iamberry/wechat/core/entity/page/PageRequest.java
  29. 69 0
      wechat-common-core/src/main/java/com/iamberry/wechat/core/entity/page/PagedResult.java
  30. 34 0
      wechat-common-core/src/main/java/com/iamberry/wechat/core/entity/pay/PayResult.java
  31. 130 0
      wechat-common-core/src/main/java/com/iamberry/wechat/core/entity/qrcode/Qrcode.java
  32. 34 0
      wechat-common-core/src/main/java/com/iamberry/wechat/core/entity/qrcode/QrcodeResult.java
  33. 72 0
      wechat-common-core/src/main/java/com/iamberry/wechat/core/entity/qrcode/TemporaryQrcode.java
  34. 411 0
      wechat-common-core/src/main/java/com/iamberry/wechat/core/entity/questionnaire/BMIReference.java
  35. 88 0
      wechat-common-core/src/main/java/com/iamberry/wechat/core/entity/questionnaire/QuestionDto.java
  36. 36 0
      wechat-common-core/src/main/java/com/iamberry/wechat/core/entity/questionnaire/QuestionTypeScore.java
  37. 214 0
      wechat-common-core/src/main/java/com/iamberry/wechat/core/entity/questionnaire/QuestionnaireAnswer.java
  38. 180 0
      wechat-common-core/src/main/java/com/iamberry/wechat/core/entity/questionnaire/QuestionnaireAnswerDetailed.java
  39. 148 0
      wechat-common-core/src/main/java/com/iamberry/wechat/core/entity/questionnaire/QuestionnaireOption.java
  40. 158 0
      wechat-common-core/src/main/java/com/iamberry/wechat/core/entity/questionnaire/QuestionnairePaper.java
  41. 159 0
      wechat-common-core/src/main/java/com/iamberry/wechat/core/entity/questionnaire/QuestionnairePaperDto.java
  42. 251 0
      wechat-common-core/src/main/java/com/iamberry/wechat/core/entity/questionnaire/QuestionnaireQuestion.java
  43. 99 0
      wechat-common-core/src/main/java/com/iamberry/wechat/core/entity/questionnaire/QuestionnaireQuestionDto.java
  44. 119 0
      wechat-common-core/src/main/java/com/iamberry/wechat/core/entity/questionnaire/QuestionnaireTestPaper.java
  45. 32 0
      wechat-common-core/src/main/java/com/iamberry/wechat/core/entity/wx/AccessToken.java
  46. 53 0
      wechat-common-core/src/main/java/com/iamberry/wechat/core/entity/wx/Article.java
  47. 62 0
      wechat-common-core/src/main/java/com/iamberry/wechat/core/entity/wx/BaseMessage.java
  48. 20 0
      wechat-common-core/src/main/java/com/iamberry/wechat/core/entity/wx/Button.java
  49. 39 0
      wechat-common-core/src/main/java/com/iamberry/wechat/core/entity/wx/CommonButton.java
  50. 21 0
      wechat-common-core/src/main/java/com/iamberry/wechat/core/entity/wx/ComplexButton.java
  51. 52 0
      wechat-common-core/src/main/java/com/iamberry/wechat/core/entity/wx/Config.java
  52. 56 0
      wechat-common-core/src/main/java/com/iamberry/wechat/core/entity/wx/ConfigJSSDK.java
  53. 42 0
      wechat-common-core/src/main/java/com/iamberry/wechat/core/entity/wx/FirstAccess.java
  54. 89 0
      wechat-common-core/src/main/java/com/iamberry/wechat/core/entity/wx/FirstJoinKey.java
  55. 59 0
      wechat-common-core/src/main/java/com/iamberry/wechat/core/entity/wx/ITTempLate.java
  56. 109 0
      wechat-common-core/src/main/java/com/iamberry/wechat/core/entity/wx/ImageTextInfo.java
  57. 104 0
      wechat-common-core/src/main/java/com/iamberry/wechat/core/entity/wx/ImageTextMore.java
  58. 83 0
      wechat-common-core/src/main/java/com/iamberry/wechat/core/entity/wx/ImagetextMaterial.java
  59. 66 0
      wechat-common-core/src/main/java/com/iamberry/wechat/core/entity/wx/Income.java
  60. 119 0
      wechat-common-core/src/main/java/com/iamberry/wechat/core/entity/wx/KeyWord.java
  61. 19 0
      wechat-common-core/src/main/java/com/iamberry/wechat/core/entity/wx/Menu.java
  62. 29 0
      wechat-common-core/src/main/java/com/iamberry/wechat/core/entity/wx/MenuData.java
  63. 102 0
      wechat-common-core/src/main/java/com/iamberry/wechat/core/entity/wx/MenuInfo.java
  64. 109 0
      wechat-common-core/src/main/java/com/iamberry/wechat/core/entity/wx/MenuKeySet.java
  65. 52 0
      wechat-common-core/src/main/java/com/iamberry/wechat/core/entity/wx/Music.java
  66. 21 0
      wechat-common-core/src/main/java/com/iamberry/wechat/core/entity/wx/MusicMessage.java
  67. 32 0
      wechat-common-core/src/main/java/com/iamberry/wechat/core/entity/wx/NewsMessage.java
  68. 29 0
      wechat-common-core/src/main/java/com/iamberry/wechat/core/entity/wx/PagingDTO.java
  69. 30 0
      wechat-common-core/src/main/java/com/iamberry/wechat/core/entity/wx/QRCJson.java
  70. 54 0
      wechat-common-core/src/main/java/com/iamberry/wechat/core/entity/wx/Rewards.java
  71. 54 0
      wechat-common-core/src/main/java/com/iamberry/wechat/core/entity/wx/Shipment.java
  72. 26 0
      wechat-common-core/src/main/java/com/iamberry/wechat/core/entity/wx/Status.java
  73. 20 0
      wechat-common-core/src/main/java/com/iamberry/wechat/core/entity/wx/TextMessage.java
  74. 23 0
      wechat-common-core/src/main/java/com/iamberry/wechat/core/entity/wx/Ticket.java
  75. 46 0
      wechat-common-core/src/main/java/com/iamberry/wechat/core/entity/wx/Token.java
  76. 14 0
      wechat-common-core/src/main/java/com/iamberry/wechat/core/entity/wx/TransInfo.java
  77. 53 0
      wechat-common-core/src/main/java/com/iamberry/wechat/core/entity/wx/TransferCustomer.java
  78. 107 0
      wechat-common-core/src/main/java/com/iamberry/wechat/core/entity/wx/WechatShare.java
  79. 85 0
      wechat-common-core/src/main/java/com/iamberry/wechat/core/entity/wx/WxPayDto.java
  80. 233 0
      wechat-common-core/src/main/java/com/iamberry/wechat/core/entity/wx/WxPayResult.java
  81. 86 0
      wechat-common-core/src/main/java/com/iamberry/wechat/core/entity/wx/WxPrepayIdErrorResult.java
  82. 49 0
      wechat-common-core/src/main/java/com/iamberry/wechat/core/entity/wx/ZTreeBean.java
  83. 36 0
      wechat-common-core/src/main/java/com/iamberry/wechat/service/task/dto/TaskDto.java
  84. 425 0
      wechat-common-core/src/main/java/com/iamberry/wechat/tools/SendMessageUtil.java
  85. 546 0
      wechat-common-core/src/main/java/com/iamberry/wechat/tools/WeixinUtil.java
  86. 39 0
      wechat-common-core/src/test/java/Test.java
  87. 66 0
      wechat-common-tool/pom.xml
  88. 42 0
      wechat-common-tool/src/main/java/com/iamberry/app/config/APIStatus.java
  89. 24 0
      wechat-common-tool/src/main/java/com/iamberry/app/config/Constants.java
  90. 38 0
      wechat-common-tool/src/main/java/com/iamberry/app/config/ImberryConfig.java
  91. 95 0
      wechat-common-tool/src/main/java/com/iamberry/app/config/Response.java
  92. 59 0
      wechat-common-tool/src/main/java/com/iamberry/app/config/ResponseHeader.java
  93. 216 0
      wechat-common-tool/src/main/java/com/iamberry/app/tool/des/MD5.java
  94. 88 0
      wechat-common-tool/src/main/java/com/iamberry/app/tool/dto/AddressDTO.java
  95. 132 0
      wechat-common-tool/src/main/java/com/iamberry/app/tool/dto/TuyaDTO.java
  96. 79 0
      wechat-common-tool/src/main/java/com/iamberry/app/tool/dto/TuyaHistoryListDTO.java
  97. 94 0
      wechat-common-tool/src/main/java/com/iamberry/app/tool/dto/TuyaHistoryRawDTO.java
  98. 74 0
      wechat-common-tool/src/main/java/com/iamberry/app/tool/dto/TuyaHistoryResultDTO.java
  99. 66 0
      wechat-common-tool/src/main/java/com/iamberry/app/tool/log/RatFWLogger.java
  100. 0 0
      wechat-common-tool/src/main/java/com/iamberry/app/tool/util/AES.java

+ 23 - 0
.gitignore

@@ -0,0 +1,23 @@
+.idea
+.idea/
+.idea/*
+wechat-common-core/target/
+wechat-common-core/target/*
+wechat-common-core/wechat-common-core.iml
+wechat-common-tool/target/
+wechat-common-tool/target/*
+wechat-common-tool/wechat-common-tool.iml
+wechat-common-web/target/
+wechat-common-web/target/*
+wechat-common-web/wechat-common-web.iml
+wechat-wechat-interface/target/
+wechat-wechat-interface/target/*
+wechat-wechat-interface/wechat-wechat-interface.iml
+wechat-wechat-service/target/
+wechat-wechat-service/target/*
+wechat-wechat-service/wechat-wechat-service.iml
+wechat-wechat-web/src/main/webapp/common/images/activity/test/
+wechat-wechat-web/src/main/webapp/common/images/activity/test/*
+wechat-wechat-web/target/
+wechat-wechat-web/target/*
+wechat-wechat-web/wechat-wechat-web.iml

+ 0 - 0
README.md


+ 120 - 0
iamberry-parent.iml

@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
+  <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8">
+    <output url="file://$MODULE_DIR$/target/classes" />
+    <output-test url="file://$MODULE_DIR$/target/test-classes" />
+    <content url="file://$MODULE_DIR$">
+      <excludeFolder url="file://$MODULE_DIR$/target" />
+    </content>
+    <orderEntry type="inheritedJdk" />
+    <orderEntry type="sourceFolder" forTests="false" />
+    <orderEntry type="library" name="Maven: com.google.zxing:core:3.2.0" level="project" />
+    <orderEntry type="library" name="Maven: com.google.zxing:javase:3.2.0" level="project" />
+    <orderEntry type="library" name="Maven: com.jcraft:jsch:0.1.53" level="project" />
+    <orderEntry type="library" name="Maven: jaxen:jaxen:1.1.6" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: junit:junit:4.12" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.hamcrest:hamcrest-core:1.3" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-aop:4.3.3.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-aspects:4.3.3.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-beans:4.3.3.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-context:4.3.3.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-context-support:4.3.2.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-core:4.3.3.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-expression:4.3.3.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-jdbc:4.3.3.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-mock:2.0.8" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-orm:4.3.3.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-test:4.3.3.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-tx:4.3.3.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-web:4.3.3.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-webmvc:4.3.3.RELEASE" level="project" />
+    <orderEntry type="library" scope="RUNTIME" name="Maven: mysql:mysql-connector-java:5.1.39" level="project" />
+    <orderEntry type="library" name="Maven: org.codehaus.jackson:jackson-mapper-lgpl:1.9.12" level="project" />
+    <orderEntry type="library" name="Maven: org.codehaus.jackson:jackson-core-lgpl:1.9.12" level="project" />
+    <orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-core:2.8.3" level="project" />
+    <orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-annotations:2.8.3" level="project" />
+    <orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-databind:2.8.3" level="project" />
+    <orderEntry type="library" name="Maven: org.freemarker:freemarker:2.3.25-incubating" level="project" />
+    <orderEntry type="library" name="Maven: commons-lang:commons-lang:2.6" level="project" />
+    <orderEntry type="library" name="Maven: commons-io:commons-io:2.4" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.httpcomponents:httpclient:4.5.2" level="project" />
+    <orderEntry type="library" name="Maven: commons-codec:commons-codec:1.10" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.httpcomponents:httpcore:4.4.5" level="project" />
+    <orderEntry type="library" name="Maven: commons-beanutils:commons-beanutils:1.9.2" level="project" />
+    <orderEntry type="library" name="Maven: commons-collections:commons-collections:3.2.2" level="project" />
+    <orderEntry type="library" name="Maven: commons-digester:commons-digester:2.1" level="project" />
+    <orderEntry type="library" name="Maven: commons-fileupload:commons-fileupload:1.3.1" level="project" />
+    <orderEntry type="library" name="Maven: com.google.guava:guava:16.0.1" level="project" />
+    <orderEntry type="library" name="Maven: org.aspectj:aspectjrt:1.8.9" level="project" />
+    <orderEntry type="library" name="Maven: org.aspectj:aspectjtools:1.8.9" level="project" />
+    <orderEntry type="library" name="Maven: org.aspectj:aspectjweaver:1.8.9" level="project" />
+    <orderEntry type="library" name="Maven: displaytag:displaytag:1.2" level="project" />
+    <orderEntry type="library" name="Maven: com.lowagie:itext:1.3" level="project" />
+    <orderEntry type="library" name="Maven: jsptags:pager-taglib:2.0" level="project" />
+    <orderEntry type="library" name="Maven: dom4j:dom4j:1.6.1" level="project" />
+    <orderEntry type="library" name="Maven: xml-apis:xml-apis:1.4.01" level="project" />
+    <orderEntry type="library" name="Maven: redis.clients:jedis:2.8.1" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.commons:commons-pool2:2.4.2" level="project" />
+    <orderEntry type="library" name="Maven: commons-logging:commons-logging:1.2" level="project" />
+    <orderEntry type="library" name="Maven: log4j:log4j:1.2.17" level="project" />
+    <orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.7.21" level="project" />
+    <orderEntry type="library" name="Maven: org.slf4j:jcl-over-slf4j:1.7.21" level="project" />
+    <orderEntry type="library" name="Maven: org.slf4j:slf4j-log4j12:1.7.21" level="project" />
+    <orderEntry type="library" name="Maven: joda-time:joda-time:2.9.4" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.velocity:velocity:1.7" level="project" />
+    <orderEntry type="library" name="Maven: com.google.code.gson:gson:2.7" level="project" />
+    <orderEntry type="library" name="Maven: com.alibaba:fastjson:1.2.6" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.commons:commons-lang3:3.4" level="project" />
+    <orderEntry type="library" name="Maven: com.nimbusds:nimbus-jose-jwt:4.11.2" level="project" />
+    <orderEntry type="library" name="Maven: net.jcip:jcip-annotations:1.0" level="project" />
+    <orderEntry type="library" name="Maven: net.minidev:json-smart:1.3.1" level="project" />
+    <orderEntry type="library" name="Maven: com.thoughtworks.xstream:xstream:1.2.1" level="project" />
+    <orderEntry type="library" name="Maven: xpp3:xpp3_min:1.1.3.4.O" level="project" />
+    <orderEntry type="library" name="Maven: net.sf.json-lib:json-lib-ext-spring:1.0.2" level="project" />
+    <orderEntry type="library" name="Maven: net.sf.json-lib:json-lib:jdk15:2.2.2" level="project" />
+    <orderEntry type="library" name="Maven: net.sf.ezmorph:ezmorph:1.0.4" level="project" />
+    <orderEntry type="library" name="Maven: javax.servlet:javax.servlet-api:3.1.0" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.poi:poi:3.14" level="project" />
+    <orderEntry type="library" name="Maven: com.mortennobel:java-image-scaling:0.8.5" level="project" />
+    <orderEntry type="library" name="Maven: com.jhlabs:filters:2.0.235" level="project" />
+    <orderEntry type="library" name="Maven: QRCode:QRCode:3.0" level="project" />
+    <orderEntry type="library" name="Maven: com.github.sogyf:goja-qrcode:0.1.2" level="project" />
+    <orderEntry type="library" name="Maven: jdom:jdom:1.0" level="project" />
+    <orderEntry type="library" name="Maven: jexcelapi:jxl:2.4.2" level="project" />
+    <orderEntry type="library" name="Maven: javax.servlet:jstl:1.2" level="project" />
+    <orderEntry type="library" name="Maven: org.owasp.antisamy:antisamy:1.4.3" level="project" />
+    <orderEntry type="library" name="Maven: xerces:xercesImpl:2.8.1" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.xmlgraphics:batik-css:1.7" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.xmlgraphics:batik-ext:1.7" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.xmlgraphics:batik-util:1.7" level="project" />
+    <orderEntry type="library" name="Maven: xml-apis:xml-apis-ext:1.3.04" level="project" />
+    <orderEntry type="library" name="Maven: net.sourceforge.nekohtml:nekohtml:1.9.22" level="project" />
+    <orderEntry type="library" name="Maven: commons-httpclient:commons-httpclient:3.1" level="project" />
+    <orderEntry type="library" name="Maven: org.owasp.esapi:esapi:2.1.0" level="project" />
+    <orderEntry type="library" name="Maven: commons-configuration:commons-configuration:1.5" level="project" />
+    <orderEntry type="library" name="Maven: commons-beanutils:commons-beanutils-core:1.7.0" level="project" />
+    <orderEntry type="library" name="Maven: xom:xom:1.2.5" level="project" />
+    <orderEntry type="library" name="Maven: xalan:xalan:2.7.0" level="project" />
+    <orderEntry type="library" name="Maven: org.beanshell:bsh-core:2.0b4" level="project" />
+    <orderEntry type="library" name="Maven: org.mybatis:mybatis:3.2.8" level="project" />
+    <orderEntry type="library" name="Maven: org.mybatis:mybatis-spring:1.2.2" level="project" />
+    <orderEntry type="library" name="Maven: oro:oro:2.0.8" level="project" />
+    <orderEntry type="library" name="Maven: jline:jline:0.9.94" level="project" />
+    <orderEntry type="library" name="Maven: io.netty:netty:3.7.0.Final" level="project" />
+    <orderEntry type="library" name="Maven: com.101tec:zkclient:0.3" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.zookeeper:zookeeper:3.3.1" level="project" />
+    <orderEntry type="library" name="Maven: com.alibaba:dubbo:2.5.3" level="project" />
+    <orderEntry type="library" name="Maven: org.javassist:javassist:3.20.0-GA" level="project" />
+    <orderEntry type="library" name="Maven: org.jboss.netty:netty:3.2.5.Final" level="project" />
+    <orderEntry type="library" name="Maven: org.hibernate:hibernate-validator:5.2.4.Final" level="project" />
+    <orderEntry type="library" name="Maven: javax.validation:validation-api:1.1.0.Final" level="project" />
+    <orderEntry type="library" name="Maven: org.jboss.logging:jboss-logging:3.3.0.Final" level="project" />
+    <orderEntry type="library" name="Maven: com.fasterxml:classmate:1.3.1" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.httpcomponents:httpmime:4.3.6" level="project" />
+    <orderEntry type="library" name="Maven: org.json:json:20160212" level="project" />
+    <orderEntry type="library" name="Maven: cn.jpush.api:jpush-client:3.2.8" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-websocket:4.1.3.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: com.github.pagehelper:pagehelper:5.0.1" level="project" />
+    <orderEntry type="library" name="Maven: com.github.jsqlparser:jsqlparser:0.9.5" level="project" />
+  </component>
+</module>

+ 543 - 0
pom.xml

@@ -0,0 +1,543 @@
+<?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">
+	<modelVersion>4.0.0</modelVersion>
+
+	<!-- iamberry 父配置 -->
+	<groupId>com.iamberry</groupId>
+	<artifactId>iamberry-parent</artifactId>
+	<version>1.0.0</version>
+
+	<!-- pom类型 -->
+	<packaging>pom</packaging>
+
+	<!-- 爱贝源仓库 -->
+	<repositories>
+		<repository>
+			<id>Iamberr_Nexus</id>
+			<name>iamberry nexus</name>
+			<url>http://maven.iamberry.com/content/groups/public/</url>
+		</repository>
+	</repositories>
+
+	<!-- 插件地址 -->
+	<pluginRepositories>
+		<pluginRepository>
+			<id>iamberry_nexus</id>
+			<url>http://maven.iamberry.com/content/groups/public/</url>
+		</pluginRepository>
+	</pluginRepositories>
+
+	<dependencyManagement>
+	     <dependencies>
+	        <dependency>
+	            <!-- Import dependency management from Spring Boot -->
+	            <groupId>org.springframework.boot</groupId>
+	            <artifactId>spring-boot-dependencies</artifactId>
+	            <version>1.4.1.RELEASE</version>
+	            <type>pom</type>
+	            <scope>import</scope>
+	        </dependency>
+	    </dependencies>
+	</dependencyManagement>
+
+	<distributionManagement>
+		<repository>
+			<id>releases</id>
+			<url>http://maven.iamberry.com/content/repositories/releases</url>
+		</repository>
+		<snapshotRepository>
+			<id>snapshots</id>
+			<url>http://maven.iamberry.com/content/repositories/snapshots</url>
+		</snapshotRepository>
+	</distributionManagement>
+
+	<!-- 隐性变量 -->
+	<properties>
+		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+		<spring.version>4.3.2.RELEASE</spring.version>
+		<aspectj.version>1.8.7</aspectj.version>
+	</properties>
+
+	<dependencies>
+		<!--二维码 -->
+		<dependency>
+			<groupId>com.google.zxing</groupId>
+			<artifactId>core</artifactId>
+			<version>3.2.0</version>
+		</dependency>
+
+		<dependency>
+			<groupId>com.google.zxing</groupId>
+			<artifactId>javase</artifactId>
+			<version>3.2.0</version>
+		</dependency>
+
+		<dependency>
+			<groupId>com.jcraft</groupId>
+			<artifactId>jsch</artifactId>
+			<version>0.1.53</version>
+		</dependency>
+		<dependency>
+			<groupId>jaxen</groupId>
+			<artifactId>jaxen</artifactId>
+		</dependency>
+		
+		<!-- 单元测试 -->
+		<dependency>
+			<groupId>junit</groupId>
+			<artifactId>junit</artifactId>
+			<scope>test</scope>
+		</dependency>
+
+		<!-- spring start -->
+		<dependency>
+			<groupId>org.springframework</groupId>
+			<artifactId>spring-aop</artifactId>
+		</dependency>
+		<dependency>
+			<groupId>org.springframework</groupId>
+			<artifactId>spring-aspects</artifactId>
+		</dependency>
+		<dependency>
+			<groupId>org.springframework</groupId>
+			<artifactId>spring-beans</artifactId>
+		</dependency>
+		<dependency>
+			<groupId>org.springframework</groupId>
+			<artifactId>spring-context</artifactId>
+		</dependency>
+		<dependency>
+			<groupId>org.springframework</groupId>
+			<artifactId>spring-context-support</artifactId>
+			 <version>4.3.2.RELEASE</version>
+		</dependency>
+		<dependency>
+			<groupId>org.springframework</groupId>
+			<artifactId>spring-core</artifactId>
+		</dependency>
+		<dependency>
+			<groupId>org.springframework</groupId>
+			<artifactId>spring-expression</artifactId>
+		</dependency>
+		<dependency>
+			<groupId>org.springframework</groupId>
+			<artifactId>spring-jdbc</artifactId>
+		</dependency>
+		<dependency>
+			<groupId>org.springframework</groupId>
+			<artifactId>spring-mock</artifactId>
+			<version>2.0.8</version>
+		</dependency>
+		<dependency>
+			<groupId>org.springframework</groupId>
+			<artifactId>spring-orm</artifactId>
+		</dependency>
+		<dependency>
+			<groupId>org.springframework</groupId>
+			<artifactId>spring-test</artifactId>
+		</dependency>
+		<dependency>
+			<groupId>org.springframework</groupId>
+			<artifactId>spring-tx</artifactId>
+		</dependency>
+		<dependency>
+			<groupId>org.springframework</groupId>
+			<artifactId>spring-web</artifactId>
+		</dependency>
+		<dependency>
+			<groupId>org.springframework</groupId>
+			<artifactId>spring-webmvc</artifactId>
+		</dependency>
+		<!-- spring end -->
+
+		<!-- 数据源 -->
+		<dependency>
+			<groupId>mysql</groupId>
+			<artifactId>mysql-connector-java</artifactId>
+			<scope>runtime</scope>
+		</dependency>
+
+		<!-- json -->
+		<dependency>
+			<groupId>org.codehaus.jackson</groupId>
+			<artifactId>jackson-mapper-lgpl</artifactId>
+			<version>1.9.12</version>
+		</dependency>
+		<dependency>
+			<groupId>org.codehaus.jackson</groupId>
+			<artifactId>jackson-core-lgpl</artifactId>
+			<version>1.9.12</version>
+		</dependency>
+		<dependency>
+			<groupId>com.fasterxml.jackson.core</groupId>
+			<artifactId>jackson-core</artifactId>
+		</dependency>
+		<dependency>
+			<groupId>com.fasterxml.jackson.core</groupId>
+			<artifactId>jackson-annotations</artifactId>
+		</dependency>
+		<dependency>
+			<groupId>com.fasterxml.jackson.core</groupId>
+			<artifactId>jackson-databind</artifactId>
+		</dependency>
+
+
+		<!-- freemarker依赖 -->
+		<dependency>
+			<groupId>org.freemarker</groupId>
+			<artifactId>freemarker</artifactId>
+		</dependency>
+
+		<!-- 基础包依赖 -->
+		<dependency>
+			<groupId>commons-lang</groupId>
+			<artifactId>commons-lang</artifactId>
+			<version>2.6</version>
+		</dependency>
+		<dependency>
+			<groupId>commons-io</groupId>
+			<artifactId>commons-io</artifactId>
+			<version>2.4</version>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.httpcomponents</groupId>
+			<artifactId>httpclient</artifactId>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.httpcomponents</groupId>
+			<artifactId>httpcore</artifactId>
+		</dependency>
+		<dependency>
+			<groupId>commons-beanutils</groupId>
+			<artifactId>commons-beanutils</artifactId>
+			<type>jar</type>
+			<scope>compile</scope>
+		</dependency>
+		<dependency>
+			<groupId>commons-digester</groupId>
+			<artifactId>commons-digester</artifactId>
+			<type>jar</type>
+			<scope>compile</scope>
+		</dependency>
+		<dependency>
+			<groupId>commons-fileupload</groupId>
+			<artifactId>commons-fileupload</artifactId>
+			<version>1.3.1</version>
+		</dependency>
+		<dependency>
+			<groupId>com.google.guava</groupId>
+			<artifactId>guava</artifactId>
+			<version>16.0.1</version>
+		</dependency>
+
+		<!-- aspectj 依赖 -->
+		<dependency>
+			<groupId>org.aspectj</groupId>
+			<artifactId>aspectjrt</artifactId>
+		</dependency>
+		<dependency>
+			<groupId>org.aspectj</groupId>
+			<artifactId>aspectjtools</artifactId>
+		</dependency>
+		<dependency>
+			<groupId>org.aspectj</groupId>
+			<artifactId>aspectjweaver</artifactId>
+		</dependency>
+
+		<!-- displaytag -->
+		<dependency>
+			<groupId>displaytag</groupId>
+			<artifactId>displaytag</artifactId>
+			<version>1.2</version>
+			<exclusions>
+				<exclusion>
+					<groupId>org.slf4j</groupId>
+					<artifactId>jcl104-over-slf4j</artifactId>
+				</exclusion>
+			</exclusions>
+		</dependency>
+		<dependency>
+			<groupId>jsptags</groupId>
+			<artifactId>pager-taglib</artifactId>
+			<version>2.0</version>
+		</dependency>
+
+		<!-- dom4j -->
+		<dependency>
+			<groupId>dom4j</groupId>
+			<artifactId>dom4j</artifactId>
+		</dependency>
+
+		<!-- redis -->
+		<dependency>
+			<groupId>redis.clients</groupId>
+			<artifactId>jedis</artifactId>
+		</dependency>
+
+		<!-- 日志 -->
+		<dependency>
+			<groupId>commons-logging</groupId>
+			<artifactId>commons-logging</artifactId>
+			<version>1.2</version>
+		</dependency>
+		<dependency>
+			<groupId>log4j</groupId>
+			<artifactId>log4j</artifactId>
+			<version>1.2.17</version>
+		</dependency>
+		<dependency>
+			<groupId>org.slf4j</groupId>
+			<artifactId>slf4j-api</artifactId>
+		</dependency>
+		<dependency>
+			<groupId>org.slf4j</groupId>
+			<artifactId>jcl-over-slf4j</artifactId>
+		</dependency>
+		<dependency>
+			<groupId>org.slf4j</groupId>
+			<artifactId>slf4j-log4j12</artifactId>
+		</dependency>
+
+		<dependency>
+			<groupId>joda-time</groupId>
+			<artifactId>joda-time</artifactId>
+		</dependency>
+
+		<!--代码生成 -->
+		<dependency>
+			<groupId>org.apache.velocity</groupId>
+			<artifactId>velocity</artifactId>
+		</dependency>
+
+		<dependency>
+			<groupId>com.google.code.gson</groupId>
+			<artifactId>gson</artifactId>
+		</dependency>
+		<dependency>
+			<groupId>com.alibaba</groupId>
+			<artifactId>fastjson</artifactId>
+			<version>1.2.6</version>
+		</dependency>
+		<dependency>
+		    <groupId>org.apache.commons</groupId>
+		    <artifactId>commons-lang3</artifactId>
+		    <version>3.4</version>
+		</dependency>
+		<dependency>
+			<groupId>com.nimbusds</groupId>
+			<artifactId>nimbus-jose-jwt</artifactId>
+			<version>4.11.2</version>
+		</dependency>
+		<dependency>
+			<groupId>xstream</groupId>
+			<artifactId>xstream</artifactId>
+			<version>1.2.1</version>
+		</dependency>
+		<dependency>
+			<groupId>net.sf.json-lib</groupId>
+			<artifactId>json-lib-ext-spring</artifactId>
+			<version>1.0.2</version>
+			<exclusions>
+				<exclusion>
+					<groupId>javax.servlet</groupId>
+	  				<artifactId>servlet-api</artifactId>
+				</exclusion>
+			</exclusions>
+		</dependency>
+		
+		<!-- .servlet-api -->
+		<dependency>
+		    <groupId>javax.servlet</groupId>
+		    <artifactId>javax.servlet-api</artifactId>
+		    <version>3.1.0</version>
+		</dependency>
+				
+		
+		<dependency>
+		    <groupId>org.apache.poi</groupId>
+		    <artifactId>poi</artifactId>
+		    <version>3.14</version>
+		</dependency>
+
+		<dependency>
+		    <groupId>com.mortennobel</groupId>
+		    <artifactId>java-image-scaling</artifactId>
+		    <version>0.8.5</version>
+		</dependency>
+		
+		<dependency>
+			<groupId>QRCode</groupId>
+			<artifactId>QRCode</artifactId>
+			<version>3.0</version>
+		</dependency>
+		
+		<dependency>
+		    <groupId>com.github.sogyf</groupId>
+		    <artifactId>goja-qrcode</artifactId>
+		    <version>0.1.2</version>
+		</dependency>
+			
+		
+		<dependency>
+		    <groupId>jdom</groupId>
+		    <artifactId>jdom</artifactId>
+		    <version>1.0</version>
+		</dependency>
+				
+		<dependency>
+		    <groupId>jexcelapi</groupId>
+		    <artifactId>jxl</artifactId>
+		    <version>2.4.2</version>
+		</dependency>
+				
+		<!-- 依赖 -->
+		 <dependency>
+			<groupId>javax.servlet</groupId>
+			<artifactId>jstl</artifactId>
+			<version>1.2</version>
+	  	</dependency>
+
+		<!-- owasp -->
+		<dependency>
+			<groupId>org.owasp.antisamy</groupId>
+			<artifactId>antisamy</artifactId>
+			<version>1.4.3</version>
+		</dependency>
+		<dependency>
+			<groupId>org.owasp.esapi</groupId>
+			<artifactId>esapi</artifactId>
+			<version>2.1.0</version>
+		</dependency>
+
+		<!-- mybatis -->
+		<dependency>
+			<groupId>org.mybatis</groupId>
+			<artifactId>mybatis</artifactId>
+			<version>3.2.8</version>
+		</dependency>
+		<dependency>
+			<groupId>org.mybatis</groupId>
+			<artifactId>mybatis-spring</artifactId>
+			<version>1.2.2</version>
+		</dependency>
+
+		<dependency>
+			<groupId>oro</groupId>
+			<artifactId>oro</artifactId>
+			<version>2.0.8</version>
+		</dependency>
+
+		<!-- zookeeper server -->
+		<dependency>
+			<groupId>org.apache.zookeeper</groupId>
+			<artifactId>zookeeper</artifactId>
+			<version>3.4.6</version>
+			<type>pom</type>
+		</dependency>
+
+		<!-- zookeeper client -->
+		<dependency>
+			<groupId>com.101tec</groupId>
+			<artifactId>zkclient</artifactId>
+			<version>0.3</version>
+		</dependency>
+
+		<!-- dubbo -->
+		<dependency>
+			<groupId>com.alibaba</groupId>
+			<artifactId>dubbo</artifactId>
+			<version>2.5.3</version>
+			<exclusions>
+				<exclusion>
+					<artifactId>spring</artifactId>
+					<groupId>org.springframework</groupId>
+				</exclusion>
+			</exclusions>
+		</dependency>
+		
+		<!-- 校验框架 -->
+		<dependency>
+		    <groupId>org.hibernate</groupId>
+		    <artifactId>hibernate-validator</artifactId>
+		</dependency>
+		
+		<!-- 依赖 -->
+		<dependency>
+			<groupId>org.apache.httpcomponents</groupId>
+			<artifactId>httpmime</artifactId>
+			<version>4.3.6</version>
+		</dependency>
+		
+		<dependency>
+		    <groupId>org.json</groupId>
+		    <artifactId>json</artifactId>
+		    <version>20160212</version>
+		</dependency>
+		
+		<dependency>
+		    <groupId>cn.jpush.api</groupId>
+		    <artifactId>jpush-client</artifactId>
+		    <version>3.2.8</version>
+		</dependency>
+		
+		<dependency>
+			<groupId>org.springframework</groupId>
+			<artifactId>spring-websocket</artifactId>
+			<version>4.1.3.RELEASE</version>
+		</dependency>
+
+		<!-- mybatis分页 -->
+		<dependency>
+			<groupId>com.github.pagehelper</groupId>
+			<artifactId>pagehelper</artifactId>
+			<version>5.0.1</version>
+		</dependency>
+	</dependencies>
+	<build>
+		<plugins>
+			<plugin>
+				<groupId>org.springframework.boot</groupId>
+				<artifactId>spring-boot-maven-plugin</artifactId>
+				<version>1.4.0.RELEASE</version>
+			</plugin>
+		</plugins>
+		<defaultGoal>compile</defaultGoal>
+	</build>
+
+	<modules>
+		<module>wechat-common-core</module>
+		<module>wechat-common-tool</module>
+		<module>wechat-common-web</module>
+		<module>wechat-wechat-interface</module>
+		<module>wechat-wechat-service</module>
+		<module>wechat-wechat-web</module>
+	</modules>
+
+    <!-- 配置 -->
+    <profiles>
+        <profile>
+            <id>jdk-1.8</id>
+            <activation>
+                <activeByDefault>true</activeByDefault>
+                <jdk>1.8</jdk>
+            </activation>
+            <properties>
+                <maven.compiler.source>1.8</maven.compiler.source>
+                <maven.compiler.target>1.8</maven.compiler.target>
+                <maven.compiler.compilerVersion>1.8</maven.compiler.compilerVersion>
+            </properties>
+        </profile>
+		<profile>
+			<id>sonar</id>
+			<activation>
+				<activeByDefault>true</activeByDefault>
+			</activation>
+			<properties>
+				<sonar.host.url>http://sonar.iamberry.com/</sonar.host.url>
+				<sonar.login>admin</sonar.login>
+				<sonar.password>iamberry123</sonar.password>
+			</properties>
+		</profile>
+    </profiles>
+</project>

+ 64 - 0
wechat-common-core/pom.xml

@@ -0,0 +1,64 @@
+<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">
+	<modelVersion>4.0.0</modelVersion>
+	
+	<!-- 父类定义 -->
+	<parent>
+		<groupId>com.iamberry</groupId>
+		<artifactId>iamberry-parent</artifactId>
+		<version>1.0.0</version>
+	</parent>
+	
+	<!-- 系统公众的核心模块,编写核心的数据模块(公众的Bean等等) -->
+	<artifactId>wechat-common-core</artifactId>
+	
+	<!-- 核心模块依赖tool -->
+	<dependencies>
+		<dependency>
+			<groupId>com.iamberry</groupId>
+			<artifactId>wechat-common-tool</artifactId>
+			<version>1.0.0</version>
+		</dependency>
+	</dependencies>
+	<build>
+		<plugins>
+			<plugin>
+				<groupId>org.apache.maven.plugins</groupId>
+				<artifactId>maven-compiler-plugin</artifactId>
+				<version>3.3</version>
+				<configuration>
+					<source>1.8</source>
+					<target>1.8</target>
+				</configuration>
+			</plugin>
+			<plugin>
+				<groupId>org.sonarsource.scanner.maven</groupId>
+				<artifactId>sonar-maven-plugin</artifactId>
+				<version>3.3.0.603</version>
+			</plugin>
+		</plugins>
+	</build>
+
+	<!-- 配置 -->
+	<profiles>
+		<profile>
+			<id>sonar</id>
+			<activation>
+				<activeByDefault>true</activeByDefault>
+			</activation>
+			<properties>
+				<sonar.host.url>http://sonar.iamberry.com/</sonar.host.url>
+				<sonar.login>admin</sonar.login>
+				<sonar.password>iamberry123</sonar.password>
+			</properties>
+		</profile>
+	</profiles>
+	<!-- 爱贝源仓库 -->
+	<repositories>
+		<repository>
+			<id>Iamberr_Nexus</id>
+			<name>iamberry nexus</name>
+			<url>http://maven.iamberry.com/content/groups/public/</url>
+		</repository>
+	</repositories>
+</project>

+ 54 - 0
wechat-common-core/src/main/java/com/iamberry/cms/core/dto/MilkPowderInfoDto.java

@@ -0,0 +1,54 @@
+package com.iamberry.cms.core.dto;
+
+import java.io.Serializable;
+
+import com.iamberry.wechat.core.entity.PageBean;
+
+public class MilkPowderInfoDto  implements Serializable{
+	
+	/**
+	 * 
+	 */
+	private static final long serialVersionUID = 4854607722861776978L;
+	private String powderNumber;				// 奶粉编号
+	private String barCode;						// 条形码
+	private String brand;						// 品牌
+	private String status;						//状态			approved(已认证)	not_approved(未认证)	电话号码为用户上传
+	private PageBean page = new PageBean();						//分页用
+	
+	public String getPowderNumber() {
+		return powderNumber;
+	}
+	public void setPowderNumber(String powderNumber) {
+		this.powderNumber = powderNumber;
+	}
+	public String getBarCode() {
+		return barCode;
+	}
+	public void setBarCode(String barCode) {
+		this.barCode = barCode;
+	}
+	public String getBrand() {
+		return brand;
+	}
+	public void setBrand(String brand) {
+		this.brand = brand;
+	}
+	public String getStatus() {
+		return status;
+	}
+	public void setStatus(String status) {
+		this.status = status;
+	}
+	public PageBean getPage() {
+		return page;
+	}
+	public void setPage(PageBean page) {
+		this.page = page;
+	}
+	@Override
+	public String toString() {
+		return "MilkPowderInfoDto [powderNumber=" + powderNumber + ", brand="
+				+ brand + ", status=" + status + ", page=" + page + "]";
+	}
+}

+ 98 - 0
wechat-common-core/src/main/java/com/iamberry/cms/core/entity/Machine.java

@@ -0,0 +1,98 @@
+package com.iamberry.cms.core.entity;
+
+import java.util.Date;
+
+import com.iamberry.wechat.core.entity.PageBean;
+
+/**
+ * 冲奶机实体类
+ * @author 刘志伟
+ * 2016-12-12
+ */
+public class Machine implements java.io.Serializable {
+
+	/**
+	 * 
+	 */
+	private static final long serialVersionUID = -1882917614438980174L;
+
+	private Long id;					//id
+	private Long owner;					//所属用户
+	private String machineName;		//机器名称
+	private String machineMac;			//机器 mac码
+	private String machineInfo;		//机器信息
+	private String status;				//机器状态		离线:offline		在线:online	
+	private String location;			//机器位置
+	private Date createdOn;			//创建时间	/ 修改时间
+	private String extOpenId;		//openid
+	private String userName;			//用户名称
+	private PageBean page = new PageBean();	//分页
+	
+	public PageBean getPage() {
+		return page;
+	}
+	public void setPage(PageBean page) {
+		this.page = page;
+	}
+	public String getUserName() {
+		return userName;
+	}
+	public void setUserName(String userName) {
+		this.userName = userName;
+	}
+	public String getExtOpenId() {
+		return extOpenId;
+	}
+	public void setExtOpenId(String extOpenId) {
+		this.extOpenId = extOpenId;
+	}
+	public Long getId() {
+		return id;
+	}
+	public void setId(Long id) {
+		this.id = id;
+	}
+	public Long getOwner() {
+		return owner;
+	}
+	public void setOwner(Long owner) {
+		this.owner = owner;
+	}
+	public String getMachineName() {
+		return machineName;
+	}
+	public void setMachineName(String machineName) {
+		this.machineName = machineName;
+	}
+	public String getMachineMac() {
+		return machineMac;
+	}
+	public void setMachineMac(String machineMac) {
+		this.machineMac = machineMac;
+	}
+	public String getMachineInfo() {
+		return machineInfo;
+	}
+	public void setMachineInfo(String machineInfo) {
+		this.machineInfo = machineInfo;
+	}
+	public String getStatus() {
+		return status;
+	}
+	public void setStatus(String status) {
+		this.status = status;
+	}
+	public String getLocation() {
+		return location;
+	}
+	public void setLocation(String location) {
+		this.location = location;
+	}
+	public Date getCreatedOn() {
+		return createdOn;
+	}
+	public void setCreatedOn(Date createdOn) {
+		this.createdOn = createdOn;
+	}
+	
+}

+ 161 - 0
wechat-common-core/src/main/java/com/iamberry/cms/core/entity/MilkMakingRecord.java

@@ -0,0 +1,161 @@
+package com.iamberry.cms.core.entity;
+
+import java.util.Date;
+
+
+
+import com.iamberry.wechat.core.entity.Page;
+import com.iamberry.wechat.core.entity.PaperBean;
+
+/**
+ * @author Sikandar
+ *
+ */
+
+public class MilkMakingRecord implements java.io.Serializable {
+
+	/**
+	 * 
+	 */
+	private static final long serialVersionUID = -2673681146930650920L;
+	private Long id;							//id
+	private Integer volume;				//冲奶量
+	private String controller;				//冲奶操作单位
+	private Integer stars;					//评分等级
+	private String comments;			//吐槽
+	private String brand;					//品牌
+	private Long powderInfo;			//比例
+	private String machineName;		//机器名
+	private String machine;				//冲奶机
+	private Long user;						//用户id
+	private Date timestamp;				//冲奶时间
+	private Page page;
+	private String username;
+	public MilkMakingRecord() {
+	}
+
+	public MilkMakingRecord(Long id, Integer volume, String controller, Integer stars, String comments, String brand, Long powderInfo,
+			String machineName, String machine, Long user, Date timestamp) {
+		super();
+		this.id = id;
+		this.volume = volume;
+		this.controller = controller;
+		this.stars = stars;
+		this.comments = comments;
+		this.brand = brand;
+		this.powderInfo = powderInfo;
+		this.machineName = machineName;
+		this.machine = machine;
+		this.user = user;
+		this.timestamp = timestamp;
+	}
+
+	public Long getId() {
+		return id;
+	}
+
+	public void setId(Long id) {
+		this.id = id;
+	}
+
+	public Integer getVolume() {
+		return volume;
+	}
+
+	public void setVolume(Integer volume) {
+		this.volume = volume;
+	}
+
+	public String getController() {
+		return controller;
+	}
+
+	public void setController(String controller) {
+		this.controller = controller;
+	}
+
+	public Integer getStars() {
+		return stars;
+	}
+
+	public void setStars(Integer stars) {
+		this.stars = stars;
+	}
+
+	public String getComments() {
+		return comments;
+	}
+
+	public void setComments(String comments) {
+		this.comments = comments;
+	}
+
+	public String getBrand() {
+		return brand;
+	}
+
+	public void setBrand(String brand) {
+		this.brand = brand;
+	}
+
+	
+	public String getMachine() {
+		return machine;
+	}
+
+	public void setMachine(String machine) {
+		this.machine = machine;
+	}
+
+	public Long getUser() {
+		return user;
+	}
+
+	public void setUser(Long user) {
+		this.user = user;
+	}
+
+	
+
+	public Page getPage() {
+		return page;
+	}
+
+	public void setPage(Page page) {
+		this.page = page;
+	}
+
+	public String getUsername() {
+		return username;
+	}
+
+	public void setUsername(String username) {
+		this.username = username;
+	}
+
+	public Long getPowderInfo() {
+		return powderInfo;
+	}
+
+	public void setPowderInfo(Long powderInfo) {
+		this.powderInfo = powderInfo;
+	}
+
+	public String getMachineName() {
+		return machineName;
+	}
+
+	public void setMachineName(String machineName) {
+		this.machineName = machineName;
+	}
+
+	public Date getTimestamp() {
+		return timestamp;
+	}
+
+	public void setTimestamp(Date timestamp) {
+		this.timestamp = timestamp;
+	}
+	
+
+}

+ 145 - 0
wechat-common-core/src/main/java/com/iamberry/cms/core/entity/MilkPowderInfo.java

@@ -0,0 +1,145 @@
+package com.iamberry.cms.core.entity;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * 奶粉信息 实体类
+ * 2016年12月12日
+ * 穆再兴
+ * @author Administrator
+ *
+ */
+public class MilkPowderInfo implements Serializable{
+	
+	private static final long serialVersionUID = -104586575800168679L;
+	
+	private Long id;							//id
+	private String powderNumber;				// 奶粉编号
+	private String spoonPicture;				// 图片
+	private String barCode;						// 条形码
+	private String brand;						// 品牌
+	
+	private String series;						// 系列
+	private String level;						// 段数
+	private String version;						// 版本
+	private String ageRange;					// 适用年龄范围
+	private Float weightPerSpoon;				// 每勺多少克
+	
+	private Float milkVolumePerSpoon;			// 奶量
+	private Float powderRatio;					// 比例
+	private Float density;						//密度
+	private Integer type;						//类型
+	private String status;						//状态	approved(已认证)	not_approved(未认证)	电话号码为用户上传
+	private Date createdOn;						//创建时间
+	
+	public Long getId() {
+		return id;
+	}
+	public void setId(Long id) {
+		this.id = id;
+	}
+	public String getPowderNumber() {
+		return powderNumber;
+	}
+	public void setPowderNumber(String powderNumber) {
+		this.powderNumber = powderNumber;
+	}
+	public String getSpoonPicture() {
+		return spoonPicture;
+	}
+	public void setSpoonPicture(String spoonPicture) {
+		this.spoonPicture = spoonPicture;
+	}
+	public String getBarCode() {
+		return barCode;
+	}
+	public void setBarCode(String barCode) {
+		this.barCode = barCode;
+	}
+	public String getBrand() {
+		return brand;
+	}
+	public void setBrand(String brand) {
+		this.brand = brand;
+	}
+	public String getSeries() {
+		return series;
+	}
+	public void setSeries(String series) {
+		this.series = series;
+	}
+	public String getLevel() {
+		return level;
+	}
+	public void setLevel(String level) {
+		this.level = level;
+	}
+	public String getVersion() {
+		return version;
+	}
+	public void setVersion(String version) {
+		this.version = version;
+	}
+	public String getAgeRange() {
+		return ageRange;
+	}
+	public void setAgeRange(String ageRange) {
+		this.ageRange = ageRange;
+	}
+	public Float getWeightPerSpoon() {
+		return weightPerSpoon;
+	}
+	public void setWeightPerSpoon(Float weightPerSpoon) {
+		this.weightPerSpoon = weightPerSpoon;
+	}
+	public Float getMilkVolumePerSpoon() {
+		return milkVolumePerSpoon;
+	}
+	public void setMilkVolumePerSpoon(Float milkVolumePerSpoon) {
+		this.milkVolumePerSpoon = milkVolumePerSpoon;
+	}
+	public Float getPowderRatio() {
+		return powderRatio;
+	}
+	public void setPowderRatio(Float powderRatio) {
+		this.powderRatio = powderRatio;
+	}
+	public Float getDensity() {
+		return density;
+	}
+	public void setDensity(Float density) {
+		this.density = density;
+	}
+	public Integer getType() {
+		return type;
+	}
+	public void setType(Integer type) {
+		this.type = type;
+	}
+	public String getStatus() {
+		return status;
+	}
+	public void setStatus(String status) {
+		this.status = status;
+	}
+	public Date getCreatedOn() {
+		return createdOn;
+	}
+	public void setCreatedOn(Date createdOn) {
+		this.createdOn = createdOn;
+	}
+	@Override
+	public String toString() {
+		return "MilkPowder [id=" + id + ", powderNumber=" + powderNumber
+				+ ", spoonPicture=" + spoonPicture + ", barCode=" + barCode
+				+ ", brand=" + brand + ", series=" + series + ", level="
+				+ level + ", version=" + version + ", ageRange=" + ageRange
+				+ ", weightPerSpoon=" + weightPerSpoon
+				+ ", milkVolumePerSpoon=" + milkVolumePerSpoon
+				+ ", powderRatio=" + powderRatio + ", density=" + density
+				+ ", type=" + type + ", status=" + status + ", createdOn="
+				+ createdOn + "]";
+	}
+	
+}

+ 101 - 0
wechat-common-core/src/main/java/com/iamberry/cms/core/entity/customer/CustomerInfo.java

@@ -0,0 +1,101 @@
+package com.iamberry.cms.core.entity.customer;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * 客服信息
+ * @author root
+ */
+public class CustomerInfo implements Serializable {
+
+    private Integer customerId;
+
+    private Integer adminId;
+
+    private String customerNick;
+
+    private String customerHead;
+
+    private String customerAccess;
+
+    private String customerPwd;
+
+    private Integer customerState;
+
+    private Date customerUpdateTime;
+
+    private Date customerCreateTime;
+
+    public Integer getCustomerId() {
+        return customerId;
+    }
+
+    public void setCustomerId(Integer customerId) {
+        this.customerId = customerId;
+    }
+
+    public Integer getAdminId() {
+        return adminId;
+    }
+
+    public void setAdminId(Integer adminId) {
+        this.adminId = adminId;
+    }
+
+    public String getCustomerNick() {
+        return customerNick;
+    }
+
+    public void setCustomerNick(String customerNick) {
+        this.customerNick = customerNick == null ? null : customerNick.trim();
+    }
+
+    public String getCustomerHead() {
+        return customerHead;
+    }
+
+    public void setCustomerHead(String customerHead) {
+        this.customerHead = customerHead == null ? null : customerHead.trim();
+    }
+
+    public String getCustomerAccess() {
+        return customerAccess;
+    }
+
+    public void setCustomerAccess(String customerAccess) {
+        this.customerAccess = customerAccess == null ? null : customerAccess.trim();
+    }
+
+    public String getCustomerPwd() {
+        return customerPwd;
+    }
+
+    public void setCustomerPwd(String customerPwd) {
+        this.customerPwd = customerPwd == null ? null : customerPwd.trim();
+    }
+
+    public Integer getCustomerState() {
+        return customerState;
+    }
+
+    public void setCustomerState(Integer customerState) {
+        this.customerState = customerState;
+    }
+
+    public Date getCustomerUpdateTime() {
+        return customerUpdateTime;
+    }
+
+    public void setCustomerUpdateTime(Date customerUpdateTime) {
+        this.customerUpdateTime = customerUpdateTime;
+    }
+
+    public Date getCustomerCreateTime() {
+        return customerCreateTime;
+    }
+
+    public void setCustomerCreateTime(Date customerCreateTime) {
+        this.customerCreateTime = customerCreateTime;
+    }
+}

+ 131 - 0
wechat-common-core/src/main/java/com/iamberry/cms/core/entity/mq/MQMessage.java

@@ -0,0 +1,131 @@
+package com.iamberry.cms.core.entity.mq;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * @author:何秀刚
+ * @description: 消息队列服务器数据库实体类
+ * @createDate:2016年5月25日
+ */
+public class MQMessage implements Serializable {
+	private static final long serialVersionUID = -3169542287905992343L;
+
+	private Integer serviceId;						// ID
+	
+	private String serviceToMessage;				// type为1、2、3时,此为订单ID
+													// type为4时,此为电话号码
+													// type为5时,此为微信openid
+	
+	private Integer serviceIsSend;					// 1:已推送 ; 2:未推送;
+	
+	private Integer serviceStatus;					// 1:推送成功;2:推送失败
+ 
+	private Integer serviceType;					// 1:添加订单信息
+													// 2:更新订单信息(将我们的信息更新同步到百胜系统)
+													// 3:获取订单信息,从百胜获取订单信息并更新到我们数据库
+													// 4:发送电话号码
+													// 5:发生微信消息
+	
+	private String serviceOtherMessage;				// 其他消息,type为4时,此为验证码
+	
+	private Date serviceCreateDate;					// 创建时间
+	
+	private String serviceHandlerObjectName;		// 对象名称
+	
+	private String serviceHandlerMethodName;		// 方法名称
+	
+	private String serviceErrorMessage;				// 失败时的消息
+	
+	public String getServiceErrorMessage() {
+		return serviceErrorMessage;
+	}
+
+	public void setServiceErrorMessage(String serviceErrorMessage) {
+		this.serviceErrorMessage = serviceErrorMessage;
+	}
+
+	public Integer getServiceId() {
+		return serviceId;
+	}
+
+	public void setServiceId(Integer serviceId) {
+		this.serviceId = serviceId;
+	}
+
+	public String getServiceToMessage() {
+		return serviceToMessage;
+	}
+
+	public void setServiceToMessage(String serviceToMessage) {
+		this.serviceToMessage = serviceToMessage;
+	}
+
+	public Integer getServiceIsSend() {
+		return serviceIsSend;
+	}
+
+	public void setServiceIsSend(Integer serviceIsSend) {
+		this.serviceIsSend = serviceIsSend;
+	}
+
+	public Integer getServiceType() {
+		return serviceType;
+	}
+
+	public void setServiceType(Integer serviceType) {
+		this.serviceType = serviceType;
+	}
+
+	public String getServiceOtherMessage() {
+		return serviceOtherMessage;
+	}
+
+	public void setServiceOtherMessage(String serviceOtherMessage) {
+		this.serviceOtherMessage = serviceOtherMessage;
+	}
+
+	public Date getServiceCreateDate() {
+		return serviceCreateDate;
+	}
+
+	public void setServiceCreateDate(Date serviceCreateDate) {
+		this.serviceCreateDate = serviceCreateDate;
+	}
+
+	public String getServiceHandlerObjectName() {
+		return serviceHandlerObjectName;
+	}
+
+	public void setServiceHandlerObjectName(String serviceHandlerObjectName) {
+		this.serviceHandlerObjectName = serviceHandlerObjectName;
+	}
+
+	public String getServiceHandlerMethodName() {
+		return serviceHandlerMethodName;
+	}
+
+	public void setServiceHandlerMethodName(String serviceHandlerMethodName) {
+		this.serviceHandlerMethodName = serviceHandlerMethodName;
+	}
+
+	public Integer getServiceStatus() {
+		return serviceStatus;
+	}
+
+	public void setServiceStatus(Integer serviceStatus) {
+		this.serviceStatus = serviceStatus;
+	}
+
+	@Override
+	public String toString() {
+		return "MQMessage [serviceId=" + serviceId + ", serviceToMessage="
+				+ serviceToMessage + ", serviceIsSend=" + serviceIsSend
+				+ ", serviceStatus=" + serviceStatus + ", serviceType="
+				+ serviceType + ", serviceOtherMessage=" + serviceOtherMessage
+				+ ", serviceCreateDate=" + serviceCreateDate
+				+ ", serviceHandlerObjectName=" + serviceHandlerObjectName
+				+ ", serviceHandlerMethodName=" + serviceHandlerMethodName
+				+ "]";
+	}
+}

+ 45 - 0
wechat-common-core/src/main/java/com/iamberry/exception/ServiceException.java

@@ -0,0 +1,45 @@
+package com.iamberry.exception;
+/**
+ * service层的异常封装
+ * @company	深圳爱贝源科技有限公司
+ * @website www.iamberry.com
+ * @author 	献
+ * @tel		18271840547
+ * @date	2017年3月9日
+ */
+public class ServiceException extends Throwable {
+
+	private static final long serialVersionUID = 2837525369786552232L;
+
+	/**
+	 * 异常代码:内部标识
+	 */
+	private Integer errorCode;
+	
+	/**
+	 * 异常描述
+	 */
+	private String errorMsg;
+
+	public ServiceException(Integer errorCode, String errorMsg) {
+		super();
+		this.errorCode = errorCode;
+		this.errorMsg = errorMsg;
+	}
+
+	public Integer getErrorCode() {
+		return errorCode;
+	}
+
+	public void setErrorCode(Integer errorCode) {
+		this.errorCode = errorCode;
+	}
+
+	public String getErrorMsg() {
+		return errorMsg;
+	}
+
+	public void setErrorMsg(String errorMsg) {
+		this.errorMsg = errorMsg;
+	}
+}

+ 284 - 0
wechat-common-core/src/main/java/com/iamberry/wechat/core/entity/AdminUtils.java

@@ -0,0 +1,284 @@
+package com.iamberry.wechat.core.entity;
+
+import com.iamberry.app.tool.des.MD5;
+import com.iamberry.app.tool.log.RatFWLogger;
+import com.iamberry.wechat.tools.NameUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+import javax.servlet.http.Cookie;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.servlet.http.HttpSession;
+import java.security.SecureRandom;
+import java.util.Date;
+import java.util.UUID;
+
+@Component
+public class AdminUtils {
+	
+	public static void addAdminUserToSession(Object object, HttpServletRequest request) {
+		// 一旦登陆成功,就改变sessionID的值,防止发生session fixation
+//		request.getSession().invalidate();
+//		DefaultHTTPUtilities defaultHTTPUtilities = new DefaultHTTPUtilities();
+//		HttpSession session = null;
+//		try {
+//			session = defaultHTTPUtilities.changeSessionIdentifier(request);
+//		} catch (AuthenticationException e) {
+//			// TODO Auto-generated catch block
+//			e.printStackTrace();
+//		}
+//		HttpSession session = request.getSession(true);
+		request.getSession().setAttribute("login_admin_userinfo", object);
+	}
+	
+	public static Object getLoginAdminUser(HttpSession session) {
+		return session.getAttribute("login_admin_userinfo");
+	}
+	
+	@Autowired
+	private RatFWLogger logger;
+	public void setLogger(RatFWLogger logger) {
+		this.logger = logger;
+	}
+	
+	
+	/**
+	 * 设置用户信息到response,而后保存到cookie
+	 * @param response
+	 * @param name
+	 * @param pwd
+	 * @throws Exception
+	 */
+	@SuppressWarnings("deprecation")
+	public void setCookieToResponse(HttpServletResponse response, String name, String pwd) throws Exception {
+		// 账户信息
+		StringBuffer buffer = new StringBuffer("");
+		buffer.append(name).append("-").append(pwd).append("adminuserlogin");
+		MD5 md5 = new MD5("loginadmin");
+		createCookie(response, "d42b2423_ratfw7d5f4he0d2c5_acoolrat0ed655cbf3d2cd", md5.encrypt(buffer.toString()));
+		// 账户信息有效时
+		Date date = new Date();
+		date.setDate(date.getDate()+7);
+		createCookie(response, "t3dt5f89df3jlk35kdf-093_da_dk3kj5d0", md5.encrypt(date.getTime()+"datetimelong"));
+		// 安全的随机数
+		String str = byte2hex(createRandomByte());
+		createCookie(response, "8dk3d435kj4d9d834kjgfh54k3_435j", str);
+		// 加密安全的随机数
+		createCookie(response, "3k5k49dhjkj45j3j65-5k_52", md5.encrypt(str));
+	}
+	
+	/**
+	 * 创建cookie,并保存到response中,写入客户端
+	 * @param response
+	 * @param name
+	 * @param value
+	 */
+	public static void createCookie(HttpServletResponse response, String name, String value) {
+		Cookie cookie = new Cookie(name, value);
+		// 有效期为(三天减一分钟)
+		cookie.setMaxAge(60 * 60 * 24 * 3 - 60);
+//		cookie.setDomain(".acoolrat.com"); 	// 一旦正式的环境,使用此
+		cookie.setPath("/" + NameUtils.getConfig("ROOT_PATH")); 				// 一旦正式的环境,使用此
+		cookie.setHttpOnly(true);
+		response.addCookie(cookie);
+	}
+
+	/**
+	 * 创建cookie,并保存到response中,写入客户端
+	 * @param response
+	 * @param name
+	 * @param value
+	 */
+	public static void createCookieByClose(HttpServletResponse response, String name, String value) {
+		Cookie cookie = new Cookie(name, value);
+		// 有效期为(三天减一分钟)
+		cookie.setMaxAge(-1);
+//		cookie.setDomain(".acoolrat.com"); 	// 一旦正式的环境,使用此
+		cookie.setPath("/" + NameUtils.getConfig("ROOT_PATH")); 				// 一旦正式的环境,使用此
+		cookie.setHttpOnly(true);
+		response.addCookie(cookie);
+	}
+
+
+	/**
+	 * 创建后台登陆时需要的token
+	 * @param session
+	 */
+	public void createRandom(HttpSession session) {
+		try {
+			session.setAttribute("loginToken", byte2hex(createRandomByte()));
+		} catch (Exception e) {
+			session.setAttribute("loginToken", UUID.randomUUID().toString());
+		}
+	}
+	
+	/**
+	 * 创建一个安全的随机数组byte[]
+	 * @return
+	 */
+	public byte[] createRandomByte() {
+		try {
+			SecureRandom random = SecureRandom.getInstance("SHA1PRNG");
+			byte[] bytes = new byte[1024 / 8];
+			random.nextBytes(bytes);
+			int count = 10;
+			byte[] seed = random.generateSeed(count);
+			random = SecureRandom.getInstance("SHA1PRNG");
+			random.setSeed(seed);
+			SecureRandom random2 = SecureRandom.getInstance("SHA1PRNG");
+			random2.setSeed(seed);
+			return seed;
+		} catch (Exception e) {
+			return UUID.randomUUID().toString().getBytes();
+		}
+	}
+	
+	/**
+	 * Function description: 向session中添加一个token
+	 * Return Value:boolean true:添加成功,false:添加是吧
+	 * Param value: tokenName,session
+	 * Exception Info: 无
+	 * Create User: 何秀刚
+	 */
+	public String saveTokenToSession(String tokenName, HttpSession session) {
+		try {
+			String token = byte2hex(createRandomByte());
+			session.setAttribute(tokenName, token);
+			return token;
+		} catch (Exception e) {
+			// TODO: handle exception
+			return null;
+		}
+	}
+
+	/**
+	 * byte[] 转 字符串
+	 * @param b
+	 * @return
+	 */
+	public String byte2hex(byte[] b) {
+		String hs = "";
+		String stmp = "";
+		for (int n = 0; n < b.length; n++) {
+			stmp = (java.lang.Integer.toHexString(b[n] & 0XFF));
+			if (stmp.length() == 1)
+				hs = hs + "x" + stmp;
+			else
+				hs = hs + stmp;
+		}
+		hs.replaceAll("0", "x");
+		return hs.toUpperCase();
+	}
+	
+	/**
+	 * 校验session中的token
+	 * @param token
+	 * @return
+	 */
+	public boolean checkLoginToken(String token, HttpSession session) {
+		if (!(token != null && !"".equals(token))) {
+			return false;
+		}
+		String sessionToken = (String) session.getAttribute("loginToken");
+		if (!(sessionToken != null && !"".equals(sessionToken))) {
+			return false;
+		}
+		if (token.equals(sessionToken)) {
+			return true;
+		} else {
+			return false;
+		}
+	}
+	
+	public boolean checkToken(String token, String tokenName, HttpSession session) {
+		if (!(token != null && !"".equals(token))) {
+			return false;
+		}
+		String sessionToken = (String) session.getAttribute(tokenName);
+		if (!(sessionToken != null && !"".equals(sessionToken))) {
+			return false;
+		}
+		if (token.equals(sessionToken)) {
+			session.removeAttribute(tokenName);
+			return true;
+		} else {
+			return false;
+		}
+	}
+
+	/**
+	 * 验证码校验
+	 * @param session
+	 * @param verifyCode
+	 * @return
+	 */
+	public boolean checkVerifyCode(HttpSession session, String verifyCode) {
+		if (!(verifyCode != null && !"".equals(verifyCode))) {
+			return false;
+		}
+		String sessionCode = (String) session.getAttribute("verifyCode");
+		if (!(sessionCode != null && !"".equals(sessionCode))) {
+			return false;
+		}
+		if (verifyCode.equalsIgnoreCase(sessionCode)) {
+			return true;
+		} else {
+			return false;
+		}
+	}
+	
+	/**
+	 * 对object对象加盐后加密
+	 * @param obj 需要加密的元数据
+	 * @param salting 加盐值
+	 * @return
+	 * @throws Exception 
+	 */
+	public String encryptObject(Object obj, final String salting) throws Exception {
+		String str = "";
+		if (obj instanceof String) {
+			str = salting + obj.toString();
+		} else if (obj instanceof Integer) {
+			str = salting + obj;
+		} else {
+			str = salting + obj.hashCode();
+		}
+		MD5 md5 = new MD5(salting);
+		return md5.encrypt(str);
+	}
+	
+	/**
+	 * 对加盐后加密的数据解析
+	 * @param str 加密后的数据
+	 * @param salting 加盐值
+	 * @return
+	 */
+	public String decryptObject(String str, final String salting) {
+		try {
+			MD5 md5 = new MD5(salting);
+			str = md5.decrypt(str);
+			return str.replaceAll(salting, "");
+		} catch (Exception e) {
+			return null;
+		}
+	}
+	
+	/**
+	 * 字段长度验证
+	 * @param str
+	 * @throws Exception
+	 */
+	public boolean parseFieldLength(String str,int minLength, int maxLength) {
+		if(str != null && str != "") {
+			int strLength = str.length();
+			if(strLength >= minLength && strLength <= maxLength) {
+				return true;
+			} else {
+				return false;
+			}
+		} else {
+			return false;
+		}
+	}
+}

+ 55 - 0
wechat-common-core/src/main/java/com/iamberry/wechat/core/entity/CommonDto.java

@@ -0,0 +1,55 @@
+package com.iamberry.wechat.core.entity;
+
+import java.io.Serializable;
+
+/**
+ * 公共实体类
+ * @author Administrator
+ *
+ */
+public class CommonDto implements Serializable{
+    /**
+     * 
+     */
+    private static final long serialVersionUID = 1292426580889730141L;
+    private String str1;
+    private String str2;
+    private String str3;
+    private String str4;
+    private String str5;
+    public String getStr1() {
+        return str1;
+    }
+    public void setStr1(String str1) {
+        this.str1 = str1;
+    }
+    public String getStr2() {
+        return str2;
+    }
+    public void setStr2(String str2) {
+        this.str2 = str2;
+    }
+    public String getStr3() {
+        return str3;
+    }
+    public void setStr3(String str3) {
+        this.str3 = str3;
+    }
+    public String getStr4() {
+        return str4;
+    }
+    public void setStr4(String str4) {
+        this.str4 = str4;
+    }
+    public String getStr5() {
+        return str5;
+    }
+    public void setStr5(String str5) {
+        this.str5 = str5;
+    }
+    @Override
+    public String toString() {
+        return "CommonDto [str1=" + str1 + ", str2=" + str2 + ", str3=" + str3
+                + ", str4=" + str4 + ", str5=" + str5 + "]";
+    }
+}

+ 35 - 0
wechat-common-core/src/main/java/com/iamberry/wechat/core/entity/JsonBack.java

@@ -0,0 +1,35 @@
+package com.iamberry.wechat.core.entity;
+
+
+/**
+ * 处理返回结果
+ * @author liurui
+ * @2016年3月4日 @下午5:31:04
+ */
+public class JsonBack implements java.io.Serializable{
+	
+	/**
+	 * 
+	 */
+	private static final long serialVersionUID = -7623349240799864718L;
+
+	private boolean isSuccess; // 请求是否成功
+	
+	private String responseData; // 请求返回数据
+
+	public boolean isSuccess() {
+		return isSuccess;
+	}
+
+	public void setSuccess(boolean isSuccess) {
+		this.isSuccess = isSuccess;
+	}
+
+	public String getResponseData() {
+		return responseData;
+	}
+
+	public void setResponseData(String responseData) {
+		this.responseData = responseData;
+	}
+}

+ 112 - 0
wechat-common-core/src/main/java/com/iamberry/wechat/core/entity/Page.java

@@ -0,0 +1,112 @@
+package com.iamberry.wechat.core.entity;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+ 
+/**
+ * 对分页的基本数据进行一个简单的封装
+ */
+public class Page implements java.io.Serializable{
+ 
+    /**
+	 * 
+	 */
+	private static final long serialVersionUID = -2502076458942170836L;
+	private int pageNo = 1;			//页码,默认是第一页
+    private int pageSize = 10;		//每页显示的记录数,默认是10
+    private int totalRecord;		//总记录数
+    private int totalPage;			//总页数
+    private List results;			//对应的当前页记录
+    private String name;
+  //开始时间
+  	private Date beginDate;
+  	//结束时间
+  	private Date endDate;
+    private Map<String, Object> params = new HashMap<String, Object>();		//其他的参数我们把它分装成一个Map对象
+ 
+    public int getPageNo() {
+       return pageNo;
+    }
+ 
+    public void setPageNo(int pageNo) {
+       this.pageNo = pageNo;
+    }
+ 
+    public int getPageSize() {
+       return pageSize;
+    }
+ 
+    public void setPageSize(int pageSize) {
+       this.pageSize = pageSize;
+    }
+ 
+    public int getTotalRecord() {
+       return totalRecord;
+    }
+ 
+    public void setTotalRecord(int totalRecord) {
+       this.totalRecord = totalRecord;
+       //在设置总页数的时候计算出对应的总页数,在下面的三目运算中加法拥有更高的优先级,所以最后可以不加括号。
+       int totalPage = totalRecord%pageSize==0 ? totalRecord/pageSize : totalRecord/pageSize + 1;
+       this.setTotalPage(totalPage);
+    }
+ 
+    public int getTotalPage() {
+       return totalPage;
+    }
+ 
+    public void setTotalPage(int totalPage) {
+       this.totalPage = totalPage;
+    }
+ 
+
+   
+    public List getResults() {
+		return results;
+	}
+
+	public void setResults(List results) {
+		this.results = results;
+	}
+
+	public Map<String, Object> getParams() {
+       return params;
+    }
+   
+    public void setParams(Map<String, Object> params) {
+       this.params = params;
+    }
+ 
+    public Date getBeginDate() {
+		return beginDate;
+	}
+
+	public void setBeginDate(Date beginDate) {
+		this.beginDate = beginDate;
+	}
+
+	public Date getEndDate() {
+		return endDate;
+	}
+
+	public void setEndDate(Date endDate) {
+		this.endDate = endDate;
+	}
+
+	public String getName() {
+		return name;
+	}
+
+	public void setName(String name) {
+		this.name = name;
+	}
+
+	@Override
+    public String toString() {
+       StringBuilder builder = new StringBuilder();
+       builder.append("Page [pageNo=").append(pageNo).append(", pageSize=").append(pageSize).append(", results=").append(results).append(", totalPage=").append(totalPage).append(", totalRecord=").append(totalRecord).append("]");
+       return builder.toString();
+    }
+ 
+}

+ 122 - 0
wechat-common-core/src/main/java/com/iamberry/wechat/core/entity/PageBean.java

@@ -0,0 +1,122 @@
+package com.iamberry.wechat.core.entity;
+
+import java.util.List;
+
+
+/**
+ * @Description 用于分页,存储分页信息的
+ * @author 欧阳明
+ * @date 2014-4-19
+ */
+public class PageBean implements java.io.Serializable{
+
+	/**
+	 * 
+	 */
+	private static final long serialVersionUID = 8970731867434157200L;
+	private int count;      //记录总数
+	private int pageSize;   //每一页的记录数
+	private int pageNumber;  //页码
+	private int pageCount;   //总页数
+	private int recordBegin ; //查询的开始记录数
+	private Object params;
+	
+	private List<Object> lists;
+	private Object condition;
+	
+	public PageBean(){
+		
+	}
+	
+	public PageBean(int count,int pageSize,int recordBegin){
+		this.count=count;
+		this.pageSize=pageSize;
+		this.recordBegin=recordBegin;
+	}
+	
+	public void init(int count,int pageSize,int pageNumber){
+		this.count=count;
+		this.pageSize=pageSize;
+		this.pageNumber=pageNumber;
+		initRecordBegin();
+	}
+	
+	public int getCount() {
+		return count;
+	}
+	public void setCount(int count) {
+		this.count = count;
+	}
+	public int getPageSize() {
+		if(pageSize==0) return 6;
+		return pageSize;
+	}
+	public void setPageSize(int pageSize) {
+		this.pageSize = pageSize;
+	}
+	public int getPageNumber() {
+		if(this.pageNumber==0)
+			this.pageNumber=1;
+		return pageNumber;
+	}
+	public void setPageNumber(int pageNumber) {
+		this.pageNumber = pageNumber;
+	}
+	public int getPageCount() {
+		if(pageSize>0 && count>0 ){
+			this.pageCount=(int) Math.ceil((double)count/pageSize);
+		}else{
+			this.pageCount=0;
+		}
+		return pageCount;
+	}
+	public void setPageCount(int pageCount) {
+		this.pageCount = pageCount;
+	}
+	public int getRecordBegin() {
+		return recordBegin;
+	}
+	public void setRecordBegin(int recordBegin) {
+		this.recordBegin = recordBegin;
+	}
+	/**
+	 * @decription 初始化分页查询的开始记录数
+	 */
+	public void initRecordBegin(){
+		if(pageNumber==1) this.recordBegin = 0;
+		if(pageNumber>1){
+			this.recordBegin=this.getPageSize()*(this.pageNumber-1);
+		}
+	}
+	
+	//获取下一页内容设置
+	public void setTurnToNextPage(){
+		pageNumber=pageNumber+1;
+		initRecordBegin();
+	}
+
+	public List<Object> getLists() {
+		return lists;
+	}
+
+	public void setLists(List<Object> lists) {
+		this.lists = lists;
+	}
+
+	public Object getCondition() {
+		return condition;
+	}
+
+	public void setCondition(Object condition) {
+		this.condition = condition;
+	}
+
+	public Object getParams() {
+		return params;
+	}
+
+	public void setParams(Object params) {
+		this.params = params;
+	}
+
+}

+ 110 - 0
wechat-common-core/src/main/java/com/iamberry/wechat/core/entity/PaperBean.java

@@ -0,0 +1,110 @@
+package com.iamberry.wechat.core.entity;
+import java.util.Date;
+public class PaperBean implements java.io.Serializable{
+	/**
+	 * 
+	 */
+	private static final long serialVersionUID = -4384087643092452530L;
+	/*检索到多少行*/
+	private Integer maxNum;
+	/*检索从多少行开始*/
+	private Integer minNum;
+	//开始时间
+	private Date beginDate;
+	//结束时间
+	private Date endDate;
+	//最小价格
+	private Double minMoney;
+	//最大价格
+	private Double maxMoney;
+	/*其他特殊数据*/
+	private String str;
+	/*特殊整形*/
+	private Integer otherInt;
+	//搜索的内容
+	private String text;
+	//订单的状态
+	private String status;
+	private Integer hid;
+	public Integer getHid() {
+		return hid;
+	}
+	public void setHid(Integer hid) {
+		this.hid = hid;
+	}
+	public String getStatus() {
+		return status;
+	}
+	public void setStatus(String status) {
+		this.status = status;
+	}
+	public String getText() {
+		return text;
+	}
+	public void setText(String text) {
+		this.text = text;
+	}
+	public Integer getOtherInt() {
+		return otherInt;
+	}
+	public void setOtherInt(Integer otherInt) {
+		this.otherInt = otherInt;
+	}
+	public String getStr() {
+		return str;
+	}
+	public void setStr(String str) {
+		this.str = str;
+	}
+	public Integer getMaxNum() {
+		return maxNum;
+	}
+	public void setMaxNum(Integer maxNum) {
+		this.maxNum = maxNum;
+	}
+	public Integer getMinNum() {
+		return minNum;
+	}
+	public void setMinNum(Integer minNum) {
+		this.minNum = minNum;
+	}
+	public Date getBeginDate() {
+		return beginDate;
+	}
+	public void setBeginDate(Date beginDate) {
+		this.beginDate = beginDate;
+	}
+	public Date getEndDate() {
+		return endDate;
+	}
+	public void setEndDate(Date endDate) {
+		this.endDate = endDate;
+	}
+	public Double getMinMoney() {
+		return minMoney;
+	}
+	public void setMinMoney(Double minMoney) {
+		this.minMoney = minMoney;
+	}
+	public Double getMaxMoney() {
+		return maxMoney;
+	}
+	public void setMaxMoney(Double maxMoney) {
+		this.maxMoney = maxMoney;
+	}
+	@Override
+	public String toString() {
+		return "PaperBean [maxNum=" + maxNum + ", minNum=" + minNum
+				+ ", beginDate=" + beginDate + ", endDate=" + endDate +", minMoney=" + minMoney
+				+", maxMoney=" + maxMoney + ", str=" + str + ", otherInt=" + otherInt + ", text=" + text
+				+ ", status=" + status + "]";
+	}
+	public void setPaperData(int pageNO, int pageSize) {
+		this.setMinNum((pageNO-1)*pageSize);
+		this.setMaxNum(pageSize);
+	}
+	public static int justPaperCount(int count, int pageSize) {
+		count = count % pageSize == 0? count/pageSize:(count/pageSize)+1;
+		return count;
+	}
+}

+ 93 - 0
wechat-common-core/src/main/java/com/iamberry/wechat/core/entity/ResultMsg.java

@@ -0,0 +1,93 @@
+package com.iamberry.wechat.core.entity;
+
+import com.iamberry.wechat.tools.ResponseJson;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * @description 作为服务影响的返回结果,常用业务错误,返回错误码和错误信息;
+ * @author 欧阳明
+ * @data 2016-4-18 14:23
+ */
+public class ResultMsg implements java.io.Serializable{
+
+	/**
+	 * 
+	 */
+	private static final long serialVersionUID = 8987614804726091566L;
+
+	private boolean status; // 状态
+	
+	private String ResultCode ; //状态码
+	
+	private String message; //返回信息
+	
+	private Object data; //返回对象
+
+	public static ResultMsg getSuccess(){
+		return new ResultMsg(true, "200", "success",null);
+	}
+	public static ResultMsg getError(){return new ResultMsg(false, "500", "error",null);	}
+
+	public ResultMsg(){}
+	
+	public ResultMsg(boolean status, String resultCode, String message,
+			Object data) {
+		super();
+		this.status = status;
+		ResultCode = resultCode;
+		this.message = message;
+		this.data = data;
+	}
+
+	public boolean isStatus() {
+		return status;
+	}
+
+	public void setStatus(boolean status) {
+		this.status = status;
+	}
+
+	public String getResultCode() {
+		return ResultCode;
+	}
+
+	public void setResultCode(String resultCode) {
+		ResultCode = resultCode;
+	}
+
+	public String getMessage() {
+		return message;
+	}
+
+	public void setMessage(String message) {
+		this.message = message;
+	}
+
+	public Object getData() {
+		return data;
+	}
+
+	public void setData(Object data) {
+		this.data = data;
+	}
+
+	/**
+	 * 添加
+	 */
+	public ResultMsg addData(String Key, Object value) {
+		if (this.data == null) {
+			Map map = new HashMap();
+			map.put(Key, value);
+			this.setData(map);
+		}else{
+			Map map = (Map) this.getData();
+			map.put(Key, value);
+			this.setData(map);
+		}
+		return this;
+	}
+
+
+}

+ 222 - 0
wechat-common-core/src/main/java/com/iamberry/wechat/core/entity/WechatUtils.java

@@ -0,0 +1,222 @@
+package com.iamberry.wechat.core.entity;
+import java.io.UnsupportedEncodingException;
+import java.net.URLEncoder;
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.servlet.http.Cookie;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import com.iamberry.app.tool.des.MD5;
+import com.iamberry.jwt.TokenUtil;
+import com.iamberry.jwt.UserNotLoginException;
+import com.iamberry.jwt.WebJsonTokenUtil;
+import com.iamberry.wechat.core.entity.member.Member;
+import com.iamberry.wechat.tools.NameUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * description : 微信端用户工具类 
+ * @author 何秀刚
+ * create date:2016年2月25日
+ */
+public class WechatUtils {
+
+	private static Logger logger = LoggerFactory.getLogger(WechatUtils.class);
+	
+	/**
+	 * 将用户信息保存到session中,并做安全设置, 注意,如果了安全,将token写入cookie后,应该在后台保存一份token的签名,前台 保存value,后台保存签名
+	 * @param object
+	 * @param request
+	 * @throws Exception 
+	 */
+	public static void saveUserToSession(Member object, HttpServletRequest request, HttpServletResponse response) throws Exception {
+		// 判断当前是否存在
+		Cookie[] cookies = request.getCookies();
+		if (cookies != null) {
+			for (Cookie cookie : cookies) {
+				if (cookie.getName().equals("WATERO_WEB_PF") || cookie.getName().equals("CHANNEL_TYPE") || cookie.getName().equals("CHANNEL_ID")) {
+					continue;
+				}
+				// 如果cookie的name以cookie value的前8位口头,那么是用户token保存方式
+				String cookieNmae = cookie.getName();
+				String cookieValue = new String(cookie.getValue().substring(0, 8));
+				if (!cookieNmae.startsWith(cookieValue)) {
+					continue;
+				}
+				// 无法准确获取key的值,只能遍历,所以系统应该尽量减少cookie,最后只是一个
+				Map<String, Object>	userMap = WebJsonTokenUtil.verifier(cookie.getValue(), cookieNmae.substring(8));
+				if ((Integer)userMap.get("status") == 2) {
+					cookie.setMaxAge(0);
+				}
+			}
+		}
+		// 生成原始token
+		String token = TokenUtil.getToken();
+		// 截取8位作为key
+		if (token.length() <= 13) {
+			token = "1234567890ABC";
+		}
+		String secret = new String(token.substring(0, 8));
+		String userToken = WebJsonTokenUtil.getToken(object.getUserId(), object.getUserOpenid(), token.substring(8));
+		// 保存cookie, 多项验证
+		AdminUtils.createCookie(response, token, secret+userToken);
+	}
+	
+	/**
+	 * 1、获取当前用户,注意,前端系统完全弃用session,防止后端服务器宕机,导致用户业务异常终止 <br>
+	 * 2、调用此方法,不存在返回为空,所以无需判断,但是此方法在运行时会抛出异常,调用时,不能捕获,让给系统统一处理
+	 * @param request
+	 * @return
+	 * @throws Exception
+	 * @author 献
+	 * @Time   2016年11月24日
+	 */
+	public static Member getUserBySession(HttpServletRequest request) {
+// 		Member m = new Member();
+//		m.setUserId(1);
+// 		m.setUserOpenid("oZ9pv02WMRQgyDVRY1a_daYecwHI");
+//		if(true){
+//			return m;
+//		}
+
+		//获取一个cookie数组
+		Cookie[] cookies = request.getCookies();
+		if (cookies == null) {
+			throw new UserNotLoginException();
+		}
+
+		for (Cookie cookie : cookies) {
+			if (cookie.getName().equals("WATERO_WEB_PF") || cookie.getName().equals("CHANNEL_TYPE") || cookie.getName().equals("CHANNEL_ID")) {
+				continue;
+			}
+			// 如果cookie的name以cookie value的前8位口头,那么是用户token保存方式
+			String cookieNmae = cookie.getName();
+			String cookieValue = new String(cookie.getValue().substring(0, 8));
+			if (!cookieNmae.startsWith(cookieValue)) {
+				continue;
+			}
+			// 无法准确获取key的值, 只能遍历,所以系统应该尽量减少cookie数量, 最好只是一个
+			Map<String, Object>	userMap = WebJsonTokenUtil.verifier(cookie.getValue(), cookieNmae.substring(8));
+			if (Integer.parseInt(userMap.get("status").toString()) == 2) {
+				Member member = new Member();
+				member.setUserId(Integer.parseInt(userMap.get("userid").toString()));
+				member.setUserOpenid(userMap.get("WC_OPENID").toString());
+				return member;
+			}
+		}
+		// 凡是没有登录的用户,都抛出异常
+		throw new UserNotLoginException();
+	}
+	
+	/**
+	 * 微信授权获取openid
+	 * @param tokenId
+	 * @return
+	 */
+	public String getOpenIdFunction(String tokenId, boolean flag) {
+		String urlTemp;
+		if (flag) {
+			urlTemp = NameUtils.getConfig("WECHAT_BACK_URL") + "?tokenId=" + tokenId;
+		} else {
+			urlTemp = tokenId;
+		}
+		try {
+			StringBuilder builder = new StringBuilder("https://open.weixin.qq.com/connect/oauth2/authorize?appid=");
+			builder.append(NameUtils.getConfig("appId"))
+			.append("&redirect_uri=")
+			.append(URLEncoder.encode(urlTemp, "UTF-8"))
+			.append("&response_type=code&scope=snsapi_base&state=iamberry#wechat_redirect");
+			return builder.toString();
+		} catch (UnsupportedEncodingException e) {
+			e.printStackTrace();
+		}
+		return null;
+	}
+	
+	public static void main(String[] args) {
+		String token = TokenUtil.getToken();;
+		System.out.println(token);
+		String sec = token.substring(8);
+		System.out.println(sec);
+	}
+	
+	private static MD5 md5 = new MD5("callback");
+	
+	public static String setCallback(String callback) throws Exception {
+		return md5.encrypt(callback);
+	}
+	
+	public static String getCallback(String temp) throws Exception {
+		return md5.decrypt(temp);
+	}
+	
+	/**
+	 * 跳转链接
+	 * @param callback		跳转链接
+	 * @return
+	 * @author 献
+	 * @throws Exception 
+	 * @Time   2016年11月24日
+	 */
+	public static String getOpenIdFunction(String callback) throws Exception {
+		String redirect_url = NameUtils.getConfig("WECHAT_BACK_URL");
+		
+		if (callback != null) {
+			redirect_url = redirect_url + "?callback=" + setCallback(callback);
+		}
+		StringBuilder builder = new StringBuilder("https://open.weixin.qq.com/connect/oauth2/authorize?appid=");
+		builder.append(NameUtils.getConfig("appId"))
+		.append("&redirect_uri=")
+		.append(URLEncoder.encode(redirect_url, "UTF-8"))
+		.append("&response_type=code&scope=snsapi_base&state=iamberry#wechat_redirect");
+		
+		return builder.toString();
+	}
+
+
+	public static void setChannelCookies(HttpServletRequest request, HttpServletResponse response,Integer channelType,Integer channelId) {
+		//获取一个cookie数组
+		Cookie[] cookies = request.getCookies();
+		if (cookies == null) {
+			throw new UserNotLoginException();
+		}
+		Boolean flag = true;
+		for (Cookie cookie : cookies) {
+			if (cookie.getName().equals("CHANNEL_TYPE")) {
+				flag = false;
+				AdminUtils.createCookieByClose(response, "CHANNEL_TYPE", String.valueOf(channelType));
+			}else if(cookie.getName().equals("CHANNEL_ID")){
+				flag = false;
+				AdminUtils.createCookieByClose(response, "CHANNEL_ID", String.valueOf(channelId));
+			}
+		}
+
+		if(flag){
+			AdminUtils.createCookieByClose(response, "CHANNEL_TYPE", String.valueOf(channelType));
+			AdminUtils.createCookieByClose(response, "CHANNEL_ID", String.valueOf(channelId));
+		}
+	}
+
+	public static Map getChannelCookies(HttpServletRequest request, HttpServletResponse response) {
+		//获取一个cookie数组
+		Cookie[] cookies = request.getCookies();
+		if (cookies == null) {
+			throw new UserNotLoginException();
+		}
+
+		Map<String,Integer> map = new HashMap<>();
+		for (Cookie cookie : cookies) {
+			if (cookie.getName().equals("CHANNEL_TYPE")) {
+				map.put("CHANNEL_TYPE",Integer.valueOf(cookie.getValue()));
+			}else if(cookie.getName().equals("CHANNEL_ID")){
+				map.put("CHANNEL_ID",Integer.valueOf(cookie.getValue()));
+			}
+		}
+		return map;
+	}
+
+
+}

+ 71 - 0
wechat-common-core/src/main/java/com/iamberry/wechat/core/entity/member/ApplyDto.java

@@ -0,0 +1,71 @@
+package com.iamberry.wechat.core.entity.member;
+
+import com.iamberry.app.verify.ValidatorInterface;
+
+/**
+ * @author 何秀刚
+ * Class Description: 申请积分提现功能
+ * Create Date:2016年4月21日
+ * Update Date:2016年4月21日
+ */
+public class ApplyDto implements java.io.Serializable{
+
+	/**
+	 * 
+	 */
+	private static final long serialVersionUID = -5358406467846253616L;
+
+	@ValidatorInterface(validatorIsRule = "[^\\s]{1,}", isEnable = true)
+	private String username; // 用户名
+
+	@ValidatorInterface(validatorIsRule = "^[1]([3][0-9]{1}|50|51|52|53|55|56|57|58|59|77|80|81|82|83|85|84|86|87|88|89|)[0-9]{8}$", isEnable = true)
+	private String tel; // 电话
+	
+	private int integralNum; // 申请数量
+
+	@ValidatorInterface(validatorIsRule = "[^\\s]{1,}", isEnable = true)
+	private String bankName; // 银行名称
+
+	@ValidatorInterface(validatorIsRule = "[^\\s]{1,}", isEnable = true)
+	private String branch; // 支行名称
+
+	public String getUsername() {
+		return username;
+	}
+
+	public void setUsername(String username) {
+		this.username = username;
+	}
+
+	public String getTel() {
+		return tel;
+	}
+
+	public void setTel(String tel) {
+		this.tel = tel;
+	}
+
+	public int getIntegralNum() {
+		return integralNum;
+	}
+
+	public void setIntegralNum(int integralNum) {
+		this.integralNum = integralNum;
+	}
+
+	public String getBankName() {
+		return bankName;
+	}
+
+	public void setBankName(String bankName) {
+		this.bankName = bankName;
+	}
+
+	public String getBranch() {
+		return branch;
+	}
+
+	public void setBranch(String branch) {
+		this.branch = branch;
+	}
+}

+ 105 - 0
wechat-common-core/src/main/java/com/iamberry/wechat/core/entity/member/Integral.java

@@ -0,0 +1,105 @@
+package com.iamberry.wechat.core.entity.member;
+
+import com.iamberry.wechat.core.entity.PageBean;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * 
+ *		description: 会员积分实体类
+ * 	   		@author: 张应真
+ *	    @createDate: 2016年4月19日
+ */
+public class Integral implements Serializable {
+	/**
+	 * 
+	 */
+	private static final long serialVersionUID = 5301819915321786026L;
+	private Integer integralLogsId;					//记录ID
+	private String integralLogsOpenid;				//所属用户,外键
+	private Integer integralLogsNum;				//记录积分数量
+	private Integer integralLogsType;				//记录类型		1支出		2收入
+	private String integralLogsIntroduction;		//记录简介
+	private Integer integralLogsResType;	//记录来源类型 	1:订单收入 2:提现支出 3:订单支出  4:线下返利5:订单奖励6:退订返还
+	private Date integralLogsCreateDate;			//创建时间
+	
+	private PageBean page;
+	public Integer getIntegralLogsId() {
+		return integralLogsId;
+	}
+	public void setIntegralLogsId(Integer integralLogsId) {
+		this.integralLogsId = integralLogsId;
+	}
+	public String getIntegralLogsOpenid() {
+		return integralLogsOpenid;
+	}
+	public void setIntegralLogsOpenid(String integralLogsOpenid) {
+		this.integralLogsOpenid = integralLogsOpenid;
+	}
+	public Integer getIntegralLogsNum() {
+		return integralLogsNum;
+	}
+	public void setIntegralLogsNum(Integer integralLogsNum) {
+		this.integralLogsNum = integralLogsNum;
+	}
+	public Integer getIntegralLogsType() {
+		return integralLogsType;
+	}
+	public void setIntegralLogsType(Integer integralLogsType) {
+		this.integralLogsType = integralLogsType;
+	}
+	public String getIntegralLogsIntroduction() {
+		return integralLogsIntroduction;
+	}
+	public void setIntegralLogsIntroduction(String integralLogsIntroduction) {
+		this.integralLogsIntroduction = integralLogsIntroduction;
+	}
+	public Integer getIntegralLogsResType() {
+		return integralLogsResType;
+	}
+	public void setIntegralLogsResType(Integer integralLogsResType) {
+		this.integralLogsResType = integralLogsResType;
+	}
+	public Date getIntegralLogsCreateDate() {
+		return integralLogsCreateDate;
+	}
+	public void setIntegralLogsCreateDate(Date integralLogsCreateDate) {
+		this.integralLogsCreateDate = integralLogsCreateDate;
+	}
+	public PageBean getPage() {
+		return page;
+	}
+	public void setPage(PageBean page) {
+		this.page = page;
+	}
+	public Integral(Integer integralLogsId, String integralLogsOpenid,
+                    Integer integralLogsNum, Integer integralLogsType,
+                    String integralLogsIntroduction, Integer integralLogsResType,
+                    Date integralLogsCreateDate) {
+		super();
+		this.integralLogsId = integralLogsId;
+		this.integralLogsOpenid = integralLogsOpenid;
+		this.integralLogsNum = integralLogsNum;
+		this.integralLogsType = integralLogsType;
+		this.integralLogsIntroduction = integralLogsIntroduction;
+		this.integralLogsResType = integralLogsResType;
+		this.integralLogsCreateDate = integralLogsCreateDate;
+	}
+	public Integral() {
+		super();
+		// TODO Auto-generated constructor stub
+	}
+	@Override
+	public String toString() {
+		return "Integral [integralLogsId=" + integralLogsId
+				+ ", integralLogsOpenid=" + integralLogsOpenid
+				+ ", integralLogsNum=" + integralLogsNum
+				+ ", integralLogsType=" + integralLogsType
+				+ ", integralLogsIntroduction=" + integralLogsIntroduction
+				+ ", integralLogsResType=" + integralLogsResType
+				+ ", integralLogsCreateDate=" + integralLogsCreateDate + "]";
+	}
+	
+	
+} 

+ 84 - 0
wechat-common-core/src/main/java/com/iamberry/wechat/core/entity/member/IntegralDto.java

@@ -0,0 +1,84 @@
+package com.iamberry.wechat.core.entity.member;
+
+import java.io.Serializable;
+import java.util.Date;
+
+public class IntegralDto implements Serializable {
+	private String userName;						//用户名
+	private String telNo;							//用户电话
+	private Integer integralNum;					//操作数量
+	private Integer integralLogsType;				//积分类型
+	private String integralLogsIntroduction;		//描述
+	private Integer integralLogsResType;			//记录来源类型
+	private Date integralLogsCreateDate;			//创建时间
+	public String getUserName() {
+		return userName;
+	}
+	public void setUserName(String userName) {
+		this.userName = userName;
+	}
+	public String getTelNo() {
+		return telNo;
+	}
+	public void setTelNo(String telNo) {
+		this.telNo = telNo;
+	}
+	public Integer getIntegralNum() {
+		return integralNum;
+	}
+	public void setIntegralNum(Integer integralNum) {
+		this.integralNum = integralNum;
+	}
+	public Integer getIntegralLogsType() {
+		return integralLogsType;
+	}
+	public void setIntegralLogsType(Integer integralLogsType) {
+		this.integralLogsType = integralLogsType;
+	}
+	public String getIntegralLogsIntroduction() {
+		return integralLogsIntroduction;
+	}
+	public void setIntegralLogsIntroduction(String integralLogsIntroduction) {
+		this.integralLogsIntroduction = integralLogsIntroduction;
+	}
+	public Integer getIntegralLogsResType() {
+		return integralLogsResType;
+	}
+	public void setIntegralLogsResType(Integer integralLogsResType) {
+		this.integralLogsResType = integralLogsResType;
+	}
+	public Date getIntegralLogsCreateDate() {
+		return integralLogsCreateDate;
+	}
+	public void setIntegralLogsCreateDate(Date integralLogsCreateDate) {
+		this.integralLogsCreateDate = integralLogsCreateDate;
+	}
+	@Override
+	public String toString() {
+		return "IntegralDto [userName=" + userName + ", telNo=" + telNo
+				+ ", integralNum=" + integralNum + ", integralLogsType="
+				+ integralLogsType + ", integralLogsIntroduction="
+				+ integralLogsIntroduction + ", integralLogsResType="
+				+ integralLogsResType + ", integralLogsCreateDate="
+				+ integralLogsCreateDate + "]";
+	}
+	public IntegralDto(String userName, String telNo, Integer integralNum,
+                       Integer integralLogsType, String integralLogsIntroduction,
+                       Integer integralLogsResType, Date integralLogsCreateDate) {
+		super();
+		this.userName = userName;
+		this.telNo = telNo;
+		this.integralNum = integralNum;
+		this.integralLogsType = integralLogsType;
+		this.integralLogsIntroduction = integralLogsIntroduction;
+		this.integralLogsResType = integralLogsResType;
+		this.integralLogsCreateDate = integralLogsCreateDate;
+	}
+	public IntegralDto() {
+		super();
+		// TODO Auto-generated constructor stub
+	}
+	
+	
+	
+}

+ 364 - 0
wechat-common-core/src/main/java/com/iamberry/wechat/core/entity/member/Member.java

@@ -0,0 +1,364 @@
+package com.iamberry.wechat.core.entity.member;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.iamberry.wechat.core.entity.Page;
+import com.iamberry.wechat.core.entity.PageBean;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * description: 会员信息实休类
+ * 	   @author: 张应真
+ * @createDate: 2016年4月18日
+ */
+public class Member implements Serializable {
+	/**
+	 * 
+	 */
+	private static final long serialVersionUID = -1480503773318576718L;
+	public static long getSerialversionuid() {
+		return serialVersionUID;
+	}
+	private Integer userId;					//会员ID
+	private String userOpenid;				//用户openid
+	private String userHead;				//用户头像
+	private String userNickname;			//用户昵称
+	private String userAddr;				//用户区域
+	
+	private Integer userSex;				//用户性别		default 1; 1:男   2:女   0:未知
+	private String userAccountNum;			//用户账号
+	@DateTimeFormat(pattern="yyyy-MM-dd")
+	@JsonFormat(pattern="yyyy-MM-dd",timezone = "GMT+8")
+	private Date userBirthDate;				//生日
+	@DateTimeFormat(pattern="yyyy-MM-dd")
+	@JsonFormat(pattern="yyyy-MM-dd",timezone = "GMT+8")
+	private Date userCreateDate;			//创建时间
+
+	private Integer userIdentity;			//会员身份			1:会员   2:微信用户    用于判断是否为上朵会员
+	private Integer userIsFlag;				//关系是否绑定		1:没有2:绑定
+	private String userName;				//姓名
+	private String userPwd;					//用户密码
+	private String userTel;					//用户电话
+
+	private String userQrcode;				//二维码
+	private Integer userResType;			//来源       		1:默认  	 2:会员	3:商户
+	private Integer userStatus;				//用户状态		1:未关注,默认  2:已关注     0:已取消关注
+	@DateTimeFormat(pattern="yyyy-MM-dd")
+	@JsonFormat(pattern="yyyy-MM-dd",timezone = "GMT+8")
+	private Date userSubDate;				//关注/取消时间	(每次扫二维码都会更新)
+
+	private Integer userSurplusIntegral;	//剩余积分		朵粉币
+	private Integer userIntegral;			//总积分 成长值
+	private Integer userUseIntegral;		//已用积分
+	private Integer userStayIntegral;		//待入账积分
+
+	private Integer userIncome;				//收入金额,单位为分
+	private Integer templateId;				//返利模板id
+	private Integer userDealers;			//代理商层级id
+	private Integer userIsBought;			//用户是否已经购买过		1:未购买(默认)	2:已购买
+	private Page page;						//分页
+	private PageBean pageBean;						//分页
+	private String userEmail;				//邮箱
+	private String numberBarcode;			//条形码
+	private String phoneCode;				//手机验证码
+	private Integer userQrcodeType;			//扫描二维码类型
+	private Integer quantityPurchased;		//购买数量
+	private Integer totalConsume; 			//消费金额
+	private Integer userAgeStage; 			//年龄阶段 1:80后 2:85后 3:90后 4:95后 5:00后 6:其他
+
+	private Integer userIsAc; 			//是否已变更  1.已变更  2:未变更
+
+
+	private  String[] ids;						//
+
+	public Integer getUserQrcodeType() {
+		return userQrcodeType;
+	}
+
+	public void setUserQrcodeType(Integer userQrcodeType) {
+		this.userQrcodeType = userQrcodeType;
+	}
+
+	public Integer getUserIntegral() {
+		return userIntegral;
+	}
+
+	public void setUserIntegral(Integer userIntegral) {
+		this.userIntegral = userIntegral;
+	}
+
+	public String getPhoneCode() {
+		return phoneCode;
+	}
+
+	public void setPhoneCode(String phoneCode) {
+		this.phoneCode = phoneCode;
+	}
+
+	public String getNumberBarcode() {
+		return numberBarcode;
+	}
+
+	public void setNumberBarcode(String numberBarcode) {
+		this.numberBarcode = numberBarcode;
+	}
+
+	public String getUserEmail() {
+		return userEmail;
+	}
+
+	public void setUserEmail(String userEmail) {
+		this.userEmail = userEmail;
+	}
+
+	public Page getPage() {
+		return page;
+	}
+	
+	public Integer getUserIncome() {
+		return userIncome;
+	}
+
+	public void setUserIncome(Integer userIncome) {
+		this.userIncome = userIncome;
+	}
+
+	public void setPage(Page page) {
+		this.page = page;
+	}
+
+	public Member() {
+		super();
+	}
+
+	public String getUserAccountNum() {
+		return userAccountNum;
+	}
+
+	public String getUserAddr() {
+		return userAddr;
+	}
+
+	public Date getUserBirthDate() {
+		return userBirthDate;
+	}
+
+	public Date getUserCreateDate() {
+		return userCreateDate;
+	}
+
+	public String getUserHead() {
+		return userHead;
+	}
+
+	public Integer getUserId() {
+		return userId;
+	}
+
+	public Integer getUserIdentity() {
+		return userIdentity;
+	}
+
+	public Integer getUserIsFlag() {
+		return userIsFlag;
+	}
+
+	public String getUserName() {
+		return userName;
+	}
+
+	public String getUserNickname() {
+		return userNickname;
+	}
+
+	public String getUserOpenid() {
+		return userOpenid;
+	}
+
+	public String getUserPwd() {
+		return userPwd;
+	}
+	
+	public String getUserTel() {
+		return userTel;
+	}
+	public void setUserTel(String userTel) {
+		this.userTel = userTel;
+	}
+
+	public String getUserQrcode() {
+		return userQrcode;
+	}
+	public Integer getUserResType() {
+		return userResType;
+	}
+	public Integer getUserSex() {
+		return userSex;
+	}
+	public Integer getUserStatus() {
+		return userStatus;
+	}
+	public Date getUserSubDate() {
+		return userSubDate;
+	}
+	public Integer getUserSurplusIntegral() {
+		return userSurplusIntegral;
+	}
+	public Integer getUserUseIntegral() {
+		return userUseIntegral;
+	}
+	public void setUserAccountNum(String userAccountNum) {
+		this.userAccountNum = userAccountNum;
+	}
+	public void setUserAddr(String userAddr) {
+		this.userAddr = userAddr;
+	}
+	public void setUserBirthDate(Date userBirthDate) {
+		this.userBirthDate = userBirthDate;
+	}
+	public void setUserCreateDate(Date userCreateDate) {
+		this.userCreateDate = userCreateDate;
+	}
+	public void setUserHead(String userHead) {
+		this.userHead = userHead;
+	}
+	public void setUserId(Integer userId) {
+		this.userId = userId;
+	}
+	public void setUserIdentity(Integer userIdentity) {
+		this.userIdentity = userIdentity;
+	}
+	public void setUserIsFlag(Integer userIsFlag) {
+		this.userIsFlag = userIsFlag;
+	}
+	public void setUserName(String userName) {
+		this.userName = userName;
+	}
+	public void setUserNickname(String userNickname) {
+		this.userNickname = userNickname;
+	}
+	public void setUserOpenid(String userOpenid) {
+		this.userOpenid = userOpenid;
+	}
+	public void setUserPwd(String userPwd) {
+		this.userPwd = userPwd;
+	}
+	public void setUserQrcode(String userQrcode) {
+		this.userQrcode = userQrcode;
+	}
+	public void setUserResType(Integer userResType) {
+		this.userResType = userResType;
+	}
+	public void setUserSex(Integer userSex) {
+		this.userSex = userSex;
+	}
+	public void setUserStatus(Integer userStatus) {
+		this.userStatus = userStatus;
+	}
+	public void setUserSubDate(Date userSubDate) {
+		this.userSubDate = userSubDate;
+	}
+	public void setUserSurplusIntegral(Integer userSurplusIntegral) {
+		this.userSurplusIntegral = userSurplusIntegral;
+	}
+	public void setUserUseIntegral(Integer userUseIntegral) {
+		this.userUseIntegral = userUseIntegral;
+	}
+	public Integer getTemplateId() {
+		return templateId;
+	}
+
+	public void setTemplateId(Integer templateId) {
+		this.templateId = templateId;
+	}
+	public Integer getUserDealers() {
+		return userDealers;
+	}
+	public void setUserDealers(Integer userDealers) {
+		this.userDealers = userDealers;
+	}
+
+	public Integer getUserIsBought() {
+		return userIsBought;
+	}
+	public void setUserIsBought(Integer userIsBought) {
+		this.userIsBought = userIsBought;
+	}
+
+	public Integer getQuantityPurchased() {
+		return quantityPurchased;
+	}
+
+	public void setQuantityPurchased(Integer quantityPurchased) {
+		this.quantityPurchased = quantityPurchased;
+	}
+
+	public Integer getTotalConsume() {
+		return totalConsume;
+	}
+
+	public void setTotalConsume(Integer totalConsume) {
+		this.totalConsume = totalConsume;
+	}
+
+	public PageBean getPageBean() {
+		return pageBean;
+	}
+
+	public void setPageBean(PageBean pageBean) {
+		this.pageBean = pageBean;
+	}
+
+	public String[] getIds() {
+		return ids;
+	}
+
+	public void setIds(String[] ids) {
+		this.ids = ids;
+	}
+
+	public Integer getUserAgeStage() {
+		return userAgeStage;
+	}
+
+	public void setUserAgeStage(Integer userAgeStage) {
+		this.userAgeStage = userAgeStage;
+	}
+
+	public Integer getUserStayIntegral() {
+		return userStayIntegral;
+	}
+
+	public void setUserStayIntegral(Integer userStayIntegral) {
+		this.userStayIntegral = userStayIntegral;
+	}
+
+	public Integer getUserIsAc() {
+		return userIsAc;
+	}
+
+	public void setUserIsAc(Integer userIsAc) {
+		this.userIsAc = userIsAc;
+	}
+
+	@Override
+	public String toString() {
+		return "Member [userId=" + userId + ", userOpenid=" + userOpenid
+				+ ", userHead=" + userHead + ", userNickname=" + userNickname
+				+ ", userAddr=" + userAddr + ", userSex=" + userSex
+				+ ", userAccountNum=" + userAccountNum + ", userBirthDate="
+				+ userBirthDate + ", userCreateDate=" + userCreateDate
+				+ ", userIdentity=" + userIdentity + ", userIsFlag="
+				+ userIsFlag + ", userName=" + userName + ", userPwd="
+				+ userPwd + ", userTel=" + userTel + ", userQrcode="
+				+ userQrcode + ", userResType=" + userResType + ", userStatus="
+				+ userStatus + ", userSubDate=" + userSubDate
+				+ ", userSurplusIntegral=" + userSurplusIntegral
+				+ ", userUseIntegral=" + userUseIntegral + ", userIncome="
+				+ userIncome + ", templateId=" + templateId + ", userDealers="
+				+ userDealers + ", userIsBought=" + userIsBought + ", page="
+				+ page + "]";
+	}
+}

+ 69 - 0
wechat-common-core/src/main/java/com/iamberry/wechat/core/entity/member/ShareInfo.java

@@ -0,0 +1,69 @@
+package com.iamberry.wechat.core.entity.member;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * 链接分享 实体
+ * create date 2016年5月26日
+ * @author 穆再兴
+ *
+ */
+public class ShareInfo implements Serializable {
+	/**
+	 * 
+	 */
+	private static final long serialVersionUID = -1359675239744704009L;
+	
+	private Integer shareId;				//Id
+	private String shareImgUrl;				//分享图片
+	private String shareMessage;			//分享内容
+	private Integer shareUserType;			//分享人类型
+	private String shareUserOpenid;			//分享人openid
+	private Date createDate;				//创建时间
+	
+	public Integer getShareId() {
+		return shareId;
+	}
+	public void setShareId(Integer shareId) {
+		this.shareId = shareId;
+	}
+	public String getShareImgUrl() {
+		return shareImgUrl;
+	}
+	public void setShareImgUrl(String shareImgUrl) {
+		this.shareImgUrl = shareImgUrl;
+	}
+	public String getShareMessage() {
+		return shareMessage;
+	}
+	public void setShareMessage(String shareMessage) {
+		this.shareMessage = shareMessage;
+	}
+	public Integer getShareUserType() {
+		return shareUserType;
+	}
+	public void setShareUserType(Integer shareUserType) {
+		this.shareUserType = shareUserType;
+	}
+	public String getShareUserOpenid() {
+		return shareUserOpenid;
+	}
+	public void setShareUserOpenid(String shareUserOpenid) {
+		this.shareUserOpenid = shareUserOpenid;
+	}
+	public Date getCreateDate() {
+		return createDate;
+	}
+	public void setCreateDate(Date createDate) {
+		this.createDate = createDate;
+	}
+	@Override
+	public String toString() {
+		return "QrcodeShare [shareId=" + shareId + ", shareImgUrl="
+				+ shareImgUrl + ", shareMessage=" + shareMessage
+				+ ", shareUserType=" + shareUserType + ", shareUserOpenid="
+				+ shareUserOpenid + ", createDate=" + createDate + "]";
+	} 
+	
+}

+ 194 - 0
wechat-common-core/src/main/java/com/iamberry/wechat/core/entity/member/Withdraw.java

@@ -0,0 +1,194 @@
+package com.iamberry.wechat.core.entity.member;
+
+import com.alibaba.dubbo.container.page.Page;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * 
+ *		description: 微代理提现记录实体类
+ * 	   		@author: 张应真
+ *	    @createDate: 2016年4月19日
+ */
+public class Withdraw implements Serializable {
+	/**
+	 * 
+	 */
+	private static final long serialVersionUID = -3434880654377628921L;
+	private Integer withdrawalsLogsId;						//ID
+	private String withdrawalsOpenid;						//用户ID
+	private Integer withdrawalsLogsIntegralNum;				//兑换积分
+	private Integer withdrawalsLogsAmount;					//积分换算人民币
+	
+	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+	@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
+	private Date withdrawalsLogsDate;						//兑换时间
+	private String withdrawalsUsername;						//兑换人姓名
+	private String withdrawalsTel;							//对换人电话
+	private Integer withdrawalsStatus;						//状态	1:兑换成功 2:处理中 3:兑换失败
+	private String withdrawalsCardNo;						//提现人卡号
+	private String withdrawalsBankName;						//提现人卡号所属银行
+	private String withdrawalsRemark; 						//提款备注
+	
+	private String sumMoney; 						//总金额
+	
+	
+	private Page page;						//分页
+
+	public Page getPage() {
+		return page;
+	}
+
+	public void setPage(Page page) {
+		this.page = page;
+	}
+
+	public Withdraw() {
+		super();
+		// TODO Auto-generated constructor stub
+	}
+	
+	public Withdraw(Integer withdrawalsLogsId, String withdrawalsOpenid,
+                    Integer withdrawalsLogsIntegralNum, Integer withdrawalsLogsAmount,
+                    Date withdrawalsLogsDate, String withdrawalsUsername,
+                    String withdrawalsTel, Integer withdrawalsStatus) {
+		super();
+		this.withdrawalsLogsId = withdrawalsLogsId;
+		this.withdrawalsOpenid = withdrawalsOpenid;
+		this.withdrawalsLogsIntegralNum = withdrawalsLogsIntegralNum;
+		this.withdrawalsLogsAmount = withdrawalsLogsAmount;
+		this.withdrawalsLogsDate = withdrawalsLogsDate;
+		this.withdrawalsUsername = withdrawalsUsername;
+		this.withdrawalsTel = withdrawalsTel;
+		this.withdrawalsStatus = withdrawalsStatus;
+	}
+
+
+	
+	
+	public String getSumMoney() {
+		return sumMoney;
+	}
+
+	public void setSumMoney(String sumMoney) {
+		this.sumMoney = sumMoney;
+	}
+
+	public Integer getWithdrawalsLogsId() {
+		return withdrawalsLogsId;
+	}
+
+
+	public void setWithdrawalsLogsId(Integer withdrawalsLogsId) {
+		this.withdrawalsLogsId = withdrawalsLogsId;
+	}
+
+
+	public String getWithdrawalsOpenid() {
+		return withdrawalsOpenid;
+	}
+
+
+	public void setWithdrawalsOpenid(String withdrawalsOpenid) {
+		this.withdrawalsOpenid = withdrawalsOpenid;
+	}
+
+
+	public Integer getWithdrawalsLogsIntegralNum() {
+		return withdrawalsLogsIntegralNum;
+	}
+
+
+	public void setWithdrawalsLogsIntegralNum(Integer withdrawalsLogsIntegralNum) {
+		this.withdrawalsLogsIntegralNum = withdrawalsLogsIntegralNum;
+	}
+
+
+	public Integer getWithdrawalsLogsAmount() {
+		return withdrawalsLogsAmount;
+	}
+
+
+	public void setWithdrawalsLogsAmount(Integer withdrawalsLogsAmount) {
+		this.withdrawalsLogsAmount = withdrawalsLogsAmount;
+	}
+
+
+	public Date getWithdrawalsLogsDate() {
+		return withdrawalsLogsDate;
+	}
+
+
+	public void setWithdrawalsLogsDate(Date withdrawalsLogsDate) {
+		this.withdrawalsLogsDate = withdrawalsLogsDate;
+	}
+
+
+	public String getWithdrawalsUsername() {
+		return withdrawalsUsername;
+	}
+
+
+	public void setWithdrawalsUsername(String withdrawalsUsername) {
+		this.withdrawalsUsername = withdrawalsUsername;
+	}
+
+
+	public String getWithdrawalsTel() {
+		return withdrawalsTel;
+	}
+
+
+	public void setWithdrawalsTel(String withdrawalsTel) {
+		this.withdrawalsTel = withdrawalsTel;
+	}
+
+
+	public Integer getWithdrawalsStatus() {
+		return withdrawalsStatus;
+	}
+
+
+	public void setWithdrawalsStatus(Integer withdrawalsStatus) {
+		this.withdrawalsStatus = withdrawalsStatus;
+	}
+	public String getWithdrawalsCardNo() {
+		return withdrawalsCardNo;
+	}
+	public void setWithdrawalsCardNo(String withdrawalsCardNo) {
+		this.withdrawalsCardNo = withdrawalsCardNo;
+	}
+	public String getWithdrawalsBankName() {
+		return withdrawalsBankName;
+	}
+	public void setWithdrawalsBankName(String withdrawalsBankName) {
+		this.withdrawalsBankName = withdrawalsBankName;
+	}
+	
+	
+	
+
+	public String getWithdrawalsRemark() {
+		return withdrawalsRemark;
+	}
+
+
+	public void setWithdrawalsRemark(String withdrawalsRemark) {
+		this.withdrawalsRemark = withdrawalsRemark;
+	}
+
+	@Override
+	public String toString() {
+		return "Withdraw [withdrawalsLogsId=" + withdrawalsLogsId
+				+ ", withdrawalsOpenid=" + withdrawalsOpenid
+				+ ", withdrawalsLogsIntegralNum=" + withdrawalsLogsIntegralNum
+				+ ", withdrawalsLogsAmount=" + withdrawalsLogsAmount
+				+ ", withdrawalsLogsDate=" + withdrawalsLogsDate
+				+ ", withdrawalsUsername=" + withdrawalsUsername
+				+ ", withdrawalsTel=" + withdrawalsTel + ", withdrawalsStatus="
+				+ withdrawalsStatus + "]";
+	}
+} 

+ 131 - 0
wechat-common-core/src/main/java/com/iamberry/wechat/core/entity/mq/MQMessage.java

@@ -0,0 +1,131 @@
+package com.iamberry.wechat.core.entity.mq;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * @author:何秀刚
+ * @description: 消息队列服务器数据库实体类
+ * @createDate:2016年5月25日
+ */
+public class MQMessage implements Serializable {
+	private static final long serialVersionUID = -3169542287905992343L;
+
+	private Integer serviceId;						// ID
+	
+	private String serviceToMessage;				// type为1、2、3时,此为订单ID
+													// type为4时,此为电话号码
+													// type为5时,此为微信openid
+	
+	private Integer serviceIsSend;					// 1:已推送 ; 2:未推送;
+	
+	private Integer serviceStatus;					// 1:推送成功;2:推送失败
+ 
+	private Integer serviceType;					// 1:添加订单信息
+													// 2:更新订单信息(将我们的信息更新同步到百胜系统)
+													// 3:获取订单信息,从百胜获取订单信息并更新到我们数据库
+													// 4:发送电话号码
+													// 5:发生微信消息
+	
+	private String serviceOtherMessage;				// 其他消息,type为4时,此为验证码
+	
+	private Date serviceCreateDate;					// 创建时间
+	
+	private String serviceHandlerObjectName;		// 对象名称
+	
+	private String serviceHandlerMethodName;		// 方法名称
+	
+	private String serviceErrorMessage;				// 失败时的消息
+	
+	public String getServiceErrorMessage() {
+		return serviceErrorMessage;
+	}
+
+	public void setServiceErrorMessage(String serviceErrorMessage) {
+		this.serviceErrorMessage = serviceErrorMessage;
+	}
+
+	public Integer getServiceId() {
+		return serviceId;
+	}
+
+	public void setServiceId(Integer serviceId) {
+		this.serviceId = serviceId;
+	}
+
+	public String getServiceToMessage() {
+		return serviceToMessage;
+	}
+
+	public void setServiceToMessage(String serviceToMessage) {
+		this.serviceToMessage = serviceToMessage;
+	}
+
+	public Integer getServiceIsSend() {
+		return serviceIsSend;
+	}
+
+	public void setServiceIsSend(Integer serviceIsSend) {
+		this.serviceIsSend = serviceIsSend;
+	}
+
+	public Integer getServiceType() {
+		return serviceType;
+	}
+
+	public void setServiceType(Integer serviceType) {
+		this.serviceType = serviceType;
+	}
+
+	public String getServiceOtherMessage() {
+		return serviceOtherMessage;
+	}
+
+	public void setServiceOtherMessage(String serviceOtherMessage) {
+		this.serviceOtherMessage = serviceOtherMessage;
+	}
+
+	public Date getServiceCreateDate() {
+		return serviceCreateDate;
+	}
+
+	public void setServiceCreateDate(Date serviceCreateDate) {
+		this.serviceCreateDate = serviceCreateDate;
+	}
+
+	public String getServiceHandlerObjectName() {
+		return serviceHandlerObjectName;
+	}
+
+	public void setServiceHandlerObjectName(String serviceHandlerObjectName) {
+		this.serviceHandlerObjectName = serviceHandlerObjectName;
+	}
+
+	public String getServiceHandlerMethodName() {
+		return serviceHandlerMethodName;
+	}
+
+	public void setServiceHandlerMethodName(String serviceHandlerMethodName) {
+		this.serviceHandlerMethodName = serviceHandlerMethodName;
+	}
+
+	public Integer getServiceStatus() {
+		return serviceStatus;
+	}
+
+	public void setServiceStatus(Integer serviceStatus) {
+		this.serviceStatus = serviceStatus;
+	}
+
+	@Override
+	public String toString() {
+		return "MQMessage [serviceId=" + serviceId + ", serviceToMessage="
+				+ serviceToMessage + ", serviceIsSend=" + serviceIsSend
+				+ ", serviceStatus=" + serviceStatus + ", serviceType="
+				+ serviceType + ", serviceOtherMessage=" + serviceOtherMessage
+				+ ", serviceCreateDate=" + serviceCreateDate
+				+ ", serviceHandlerObjectName=" + serviceHandlerObjectName
+				+ ", serviceHandlerMethodName=" + serviceHandlerMethodName
+				+ "]";
+	}
+}

+ 63 - 0
wechat-common-core/src/main/java/com/iamberry/wechat/core/entity/page/PageRequest.java

@@ -0,0 +1,63 @@
+package com.iamberry.wechat.core.entity.page;
+
+import java.io.Serializable;
+
+/**
+ * 请求的分页数据
+ * @author 献
+ * @company 深圳爱贝源科技有限公司
+ * @website www.iamberry.com
+ * @tel 18271840547
+ * @date 2017/5/18
+ */
+public class PageRequest<T> implements Serializable {
+
+    private static final long serialVersionUID = -6003006551112186750L;
+
+    private T data;                   // 实例数据
+
+    private Integer pageNO;           // 请求的页数
+
+    private Integer pageSize;         // 每页的数据大小
+
+    private boolean isPageTotal;      // 是否需要总的页数
+
+    public PageRequest(T data, Integer pageNO, Integer pageSize, boolean isPageTotal) {
+        this.data = data;
+        this.pageNO = pageNO;
+        this.pageSize = pageSize;
+        this.isPageTotal = isPageTotal;
+    }
+
+    public void setData(T data) {
+        this.data = data;
+    }
+
+    public void setPageNO(Integer pageNO) {
+        this.pageNO = pageNO;
+    }
+
+    public void setPageSize(Integer pageSize) {
+        this.pageSize = pageSize;
+    }
+
+    public void setPageTotal(boolean pageTotal) {
+        isPageTotal = pageTotal;
+    }
+
+    public T getData() {
+        return data;
+    }
+
+    public Integer getPageNO() {
+        return pageNO;
+    }
+
+    public Integer getPageSize() {
+        return pageSize;
+    }
+
+    public boolean isPageTotal() {
+        return isPageTotal;
+    }
+}

+ 69 - 0
wechat-common-core/src/main/java/com/iamberry/wechat/core/entity/page/PagedResult.java

@@ -0,0 +1,69 @@
+package com.iamberry.wechat.core.entity.page;
+
+import java.io.Serializable;
+import java.util.List;
+
+/**
+ * 分页返回的数据
+ * @author 献
+ * @company 深圳爱贝源科技有限公司
+ * @website www.iamberry.com
+ * @tel 18271840547
+ * @date 2017/5/12
+ */
+public class PagedResult<T> implements Serializable {
+
+
+	private static final long serialVersionUID = 8272802698002051352L;
+
+	private List<T> dataList;		// 数据
+	
+	private long pageNO;			// 当前页
+	
+	private long pageSize;			// 每页数据
+	
+	private long total;				// 总条数
+	
+	private long pages;				// 总页面数目
+
+	public List<T> getDataList() {
+		return dataList;
+	}
+
+	public void setDataList(List<T> dataList) {
+		this.dataList = dataList;
+	}
+
+	public long getPageNO() {
+		return pageNO;
+	}
+
+	public void setPageNO(long pageNO) {
+		this.pageNO = pageNO;
+	}
+
+	public long getPageSize() {
+		return pageSize;
+	}
+
+	public void setPageSize(long pageSize) {
+		this.pageSize = pageSize;
+	}
+
+	public long getTotal() {
+		return total;
+	}
+
+	public void setTotal(long total) {
+		this.total = total;
+	}
+
+	public long getPages() {
+		return pages;
+	}
+
+	public void setPages(long pages) {
+		this.pages = pages;
+	}
+	
+}

+ 34 - 0
wechat-common-core/src/main/java/com/iamberry/wechat/core/entity/pay/PayResult.java

@@ -0,0 +1,34 @@
+package com.iamberry.wechat.core.entity.pay;
+/**
+ * @author 何秀刚
+ * Class Description: 发起微信支付后的结果
+ * Create Date:2016年4月19日
+ * Update Date:2016年4月19日
+ */
+public class PayResult implements java.io.Serializable{
+
+	/**
+	 * 
+	 */
+	private static final long serialVersionUID = 1474630358926299928L;
+
+	private boolean isPaySuccess; // 是否成功发起微信支付
+	
+	private String payData; // 如果isPaySuccess 为 true,此字段有值,否则为错误原因
+
+	public boolean isPaySuccess() {
+		return isPaySuccess;
+	}
+
+	public void setPaySuccess(boolean isPaySuccess) {
+		this.isPaySuccess = isPaySuccess;
+	}
+
+	public String getPayData() {
+		return payData;
+	}
+
+	public void setPayData(String payData) {
+		this.payData = payData;
+	}
+}

+ 130 - 0
wechat-common-core/src/main/java/com/iamberry/wechat/core/entity/qrcode/Qrcode.java

@@ -0,0 +1,130 @@
+package com.iamberry.wechat.core.entity.qrcode;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * @author 何秀刚
+ * Class Description: 微信永久二维码实体类
+ * Create Date:2016年4月18日
+ * Update Date:2016年4月18日
+ */
+public class Qrcode implements Serializable {
+	
+	private static final long serialVersionUID = -3488947213803695056L;
+	
+	private Integer qrcodeId; // ID
+	
+	private Integer qrcodeType;// 类型,1:微代理,2:线下代理商
+	
+	private String qrcodeOpenid; // 创建人openid
+	
+	private String qrcodeReplaceOpenid; // 正在使用的人openid
+	
+	private Date qrcodeCreateDate; // 创建时间
+	
+	private String qrcodeUrl; // 连接
+	
+	private Integer qrcodeStatus; // 状态,1:二维码空余;2:正在使用
+	
+	private Integer qrcodeScannNum; // 扫描次数
+	
+	private Integer qrcodeSubNum; // 通过此关注人数
+	
+	private String qrcodeValue; // 场景值
+
+	public String getQrcodeValue() {
+		return qrcodeValue;
+	}
+
+	public void setQrcodeValue(String qrcodeValue) {
+		this.qrcodeValue = qrcodeValue;
+	}
+
+	public Integer getQrcodeId() {
+		return qrcodeId;
+	}
+
+	public void setQrcodeId(Integer qrcodeId) {
+		this.qrcodeId = qrcodeId;
+	}
+
+	public Integer getQrcodeType() {
+		return qrcodeType;
+	}
+
+	public void setQrcodeType(Integer qrcodeType) {
+		this.qrcodeType = qrcodeType;
+	}
+
+	public String getQrcodeOpenid() {
+		return qrcodeOpenid;
+	}
+
+	public void setQrcodeOpenid(String qrcodeOpenid) {
+		this.qrcodeOpenid = qrcodeOpenid;
+	}
+
+	public String getQrcodeReplaceOpenid() {
+		return qrcodeReplaceOpenid;
+	}
+
+	public void setQrcodeReplaceOpenid(String qrcodeReplaceOpenid) {
+		this.qrcodeReplaceOpenid = qrcodeReplaceOpenid;
+	}
+
+	public Date getQrcodeCreateDate() {
+		return qrcodeCreateDate;
+	}
+
+	public void setQrcodeCreateDate(Date qrcodeCreateDate) {
+		this.qrcodeCreateDate = qrcodeCreateDate;
+	}
+
+	public String getQrcodeUrl() {
+		return qrcodeUrl;
+	}
+
+	public void setQrcodeUrl(String qrcodeUrl) {
+		this.qrcodeUrl = qrcodeUrl;
+	}
+
+	public Integer getQrcodeStatus() {
+		return qrcodeStatus;
+	}
+
+	public void setQrcodeStatus(Integer qrcodeStatus) {
+		this.qrcodeStatus = qrcodeStatus;
+	}
+
+	public Integer getQrcodeScannNum() {
+		return qrcodeScannNum;
+	}
+
+	public void setQrcodeScannNum(Integer qrcodeScannNum) {
+		this.qrcodeScannNum = qrcodeScannNum;
+	}
+
+	public Integer getQrcodeSubNum() {
+		return qrcodeSubNum;
+	}
+
+	public void setQrcodeSubNum(Integer qrcodeSubNum) {
+		this.qrcodeSubNum = qrcodeSubNum;
+	}
+
+	public static long getSerialversionuid() {
+		return serialVersionUID;
+	}
+
+	@Override
+	public String toString() {
+		return "Qrcode [qrcodeId=" + qrcodeId + ", qrcodeType=" + qrcodeType
+				+ ", qrcodeOpenid=" + qrcodeOpenid + ", qrcodeReplaceOpenid="
+				+ qrcodeReplaceOpenid + ", qrcodeCreateDate="
+				+ qrcodeCreateDate + ", qrcodeUrl=" + qrcodeUrl
+				+ ", qrcodeStatus=" + qrcodeStatus + ", qrcodeScannNum="
+				+ qrcodeScannNum + ", qrcodeSubNum=" + qrcodeSubNum
+				+ ", qrcodeValue=" + qrcodeValue + "]";
+	}
+}

+ 34 - 0
wechat-common-core/src/main/java/com/iamberry/wechat/core/entity/qrcode/QrcodeResult.java

@@ -0,0 +1,34 @@
+package com.iamberry.wechat.core.entity.qrcode;
+/**
+ * @author 何秀刚
+ * Class Description: 获取一个Qrcode时,返回的对象
+ * Create Date:2016年4月19日
+ * Update Date:2016年4月19日
+ */
+public class QrcodeResult implements java.io.Serializable{
+	
+	/**
+	 * 
+	 */
+	private static final long serialVersionUID = -3228786761001892023L;
+
+	private boolean isSuccess; // 是否获取成功
+	
+	private String qroceUrl; // 如果isSuccess=true,qrcodeUrl为二维码连接,否则为错误
+
+	public boolean isSuccess() {
+		return isSuccess;
+	}
+
+	public void setSuccess(boolean isSuccess) {
+		this.isSuccess = isSuccess;
+	}
+
+	public String getQroceUrl() {
+		return qroceUrl;
+	}
+
+	public void setQroceUrl(String qroceUrl) {
+		this.qroceUrl = qroceUrl;
+	}
+}

+ 72 - 0
wechat-common-core/src/main/java/com/iamberry/wechat/core/entity/qrcode/TemporaryQrcode.java

@@ -0,0 +1,72 @@
+package com.iamberry.wechat.core.entity.qrcode;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * 临时二维码 实体
+ */
+public class TemporaryQrcode implements Serializable{
+	/**
+	 * 
+	 */
+	private static final long serialVersionUID = 6657521976318158144L;
+	
+	private Integer qrId;			//id
+	private String qrOpenid;		//用户openid
+	private String qrUrl;			//二维码url
+	private String qrValue;			//场景值
+	private Date qrCreateDate;		//创建时间
+	private Date qrEndDate;			//过期时间
+	private Date qrUpdateDate;		//修改时间
+	
+	public Integer getQrId() {
+		return qrId;
+	}
+	public void setQrId(Integer qrId) {
+		this.qrId = qrId;
+	}
+	public String getQrOpenid() {
+		return qrOpenid;
+	}
+	public void setQrOpenid(String qrOpenid) {
+		this.qrOpenid = qrOpenid;
+	}
+	public String getQrUrl() {
+		return qrUrl;
+	}
+	public void setQrUrl(String qrUrl) {
+		this.qrUrl = qrUrl;
+	}
+	public String getQrValue() {
+		return qrValue;
+	}
+	public void setQrValue(String qrValue) {
+		this.qrValue = qrValue;
+	}
+	public Date getQrCreateDate() {
+		return qrCreateDate;
+	}
+	public void setQrCreateDate(Date qrCreateDate) {
+		this.qrCreateDate = qrCreateDate;
+	}
+	public Date getQrEndDate() {
+		return qrEndDate;
+	}
+	public void setQrEndDate(Date qrEndDate) {
+		this.qrEndDate = qrEndDate;
+	}
+	public Date getQrUpdateDate() {
+		return qrUpdateDate;
+	}
+	public void setQrUpdateDate(Date qrUpdateDate) {
+		this.qrUpdateDate = qrUpdateDate;
+	}
+	@Override
+	public String toString() {
+		return "TemporaryQrcode [qrId=" + qrId + ", qrOpenid=" + qrOpenid
+				+ ", qrUrl=" + qrUrl + ", qrValue=" + qrValue
+				+ ", qrCreateDate=" + qrCreateDate + ", qrEndDate=" + qrEndDate
+				+ ", qrUpdateDate=" + qrUpdateDate + "]";
+	}
+}

+ 411 - 0
wechat-common-core/src/main/java/com/iamberry/wechat/core/entity/questionnaire/BMIReference.java

@@ -0,0 +1,411 @@
+package com.iamberry.wechat.core.entity.questionnaire;
+
+import java.io.Serializable;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+
+/**
+ * @company	深圳爱贝源科技有限公司
+ * @website www.iamberry.com
+ * @author 	献
+ * @tel		18271840547
+ * @date	2016年10月28日
+ * @explain	BMI结果参照表
+ */
+public final class BMIReference implements Serializable {
+
+	private static final long serialVersionUID = -8346520212337911708L;
+
+	private int age;		// 月龄
+	
+	private int sex;		// 宝宝性别
+	
+	private double N3SD;	// 低于三个标准值
+	
+	private double N2SD;	// 低于两个标准值
+	
+	private double N1SD;	// 低于一个标准值
+	
+	private double N0SD;	// 正常值
+	
+	private double P1SD;	// 高于一个正常值
+	
+	private double P2SD;	// 高于两个正常值
+	
+	private double P3SD;	// 高于三个正常值
+	
+	/**
+	 * 根据用户性别、月龄获取BMI
+	 * @param age
+	 * @param sex	1:男孩;2:女孩
+	 * @return
+	 */
+	public static BMIReference getBMI(int age, int sex) {
+		// 如果BMI数据为空,那么初始化
+		if (bmi.isEmpty()) {
+			synchronized (bmi) {
+				initBMI();
+			}
+		}
+		return bmi.get(age + "-" + sex);
+	}
+
+	/**
+	 * 缓存对应的BMI,因为只是获取,那么不需要保证多线程安全,只是需要在数据初始化的时候保证多线程安全问题
+	 */
+	private static final Map<String, BMIReference> bmi = new HashMap<String, BMIReference>();
+	
+	/**
+	 * 初始化BMI数据
+	 */
+	private static void initBMI() {
+		
+		// 如果上级调用方法getBMI()调用时出现已经初始化过但是还是在调用时,本方法内的处理
+		if (!bmi.isEmpty()) {
+			return;
+		}
+		
+		// 男童
+		BMIReference age0 = new BMIReference(0, 1, 10.2, 11.1, 12.2, 13.4, 14.8, 16.3, 18.1);
+		bmi.put("0-1", age0);
+		BMIReference age1 = new BMIReference(1, 1, 11.3, 12.4, 13.6, 14.9, 16.3, 17.8, 19.4);
+		bmi.put("1-1", age1);
+		BMIReference age2 = new BMIReference(2, 1, 12.5, 13.7, 15.0, 16.3, 17.8, 19.4, 21.1);
+		bmi.put("2-1", age2);
+		BMIReference age3 = new BMIReference(3, 1, 13.1, 14.3, 15.5, 16.9, 18.4, 20.0, 21.8);
+		bmi.put("3-1", age3);
+		BMIReference age4 = new BMIReference(4, 1, 13.4, 14.5, 15.8, 17.2, 18.7, 20.3, 22.1);
+		bmi.put("4-1", age4);
+		BMIReference age5 = new BMIReference(5, 1, 13.5, 14.7, 15.9, 17.3, 18.8, 20.5, 22.3);
+		bmi.put("5-1", age5);
+		BMIReference age6 = new BMIReference(6, 1, 13.6, 14.7, 16.0, 17.3, 18.8, 20.5, 22.3);
+		bmi.put("6-1", age6);
+		BMIReference age7 = new BMIReference(7, 1, 13.7, 14.8, 16.0, 17.3, 18.8, 20.5, 22.3);
+		bmi.put("7-1", age7);
+		BMIReference age8 = new BMIReference(8, 1, 13.6, 14.7, 15.9, 17.3, 18.7, 20.4, 22.2);
+		bmi.put("8-1", age8);
+		BMIReference age9 = new BMIReference(9, 1, 13.6, 14.7, 15.8, 17.2, 18.6, 20.3, 22.1);
+		bmi.put("9-1", age9);
+		BMIReference age10 = new BMIReference(10, 1, 13.5, 14.6, 15.7, 17.0, 18.5, 20.1, 22.0);
+		bmi.put("10-1", age10);
+		BMIReference age11 = new BMIReference(11, 1, 13.4, 14.5, 15.6, 16.9, 18.4, 20.0, 21.8);
+		bmi.put("11-1", age11);
+		BMIReference age12 = new BMIReference(12, 1, 13.4, 14.4, 15.5, 16.8, 18.2, 19.8, 21.6);
+		bmi.put("12-1", age12);
+		BMIReference age13 = new BMIReference(13, 1, 13.3, 14.3, 15.4, 16.7, 18.1, 19.7, 21.5);
+		bmi.put("13-1", age13);
+		BMIReference age14 = new BMIReference(14, 1, 13.2, 14.2, 15.3, 16.6, 18.0, 19.5, 21.3);
+		bmi.put("14-1", age14);
+		BMIReference age15 = new BMIReference(15, 1, 13.1, 14.1, 15.2, 16.4, 17.8, 19.4, 21.2);
+		bmi.put("15-1", age15);
+		BMIReference age16 = new BMIReference(16, 1, 13.1, 14.0, 15.1, 16.3, 17.7, 19.3, 21.0);
+		bmi.put("16-1", age16);
+		BMIReference age17 = new BMIReference(17, 1, 13.0, 13.9, 15.0, 16.2, 17.6, 19.1, 20.9);
+		bmi.put("17-1", age17);
+		BMIReference age18 = new BMIReference(18, 1, 12.9, 13.9, 14.9, 16.1, 17.5, 19.0, 20.8);
+		bmi.put("18-1", age18);
+		BMIReference age19 = new BMIReference(19, 1, 12.9, 13.8, 14.9, 16.1, 17.4, 18.9, 20.7);
+		bmi.put("19-1", age19);
+		BMIReference age20 = new BMIReference(20, 1, 12.8, 13.7, 14.8, 16.0, 17.3, 18.8, 20.6);
+		bmi.put("20-1", age20);
+		BMIReference age21 = new BMIReference(21, 1, 12.8, 13.7, 14.7, 15.9, 17.2, 18.7, 20.5);
+		bmi.put("21-1", age21);
+		BMIReference age22 = new BMIReference(22, 1, 12.7, 13.6, 14.7, 15.8, 17.2, 18.7, 20.4);
+		bmi.put("22-1", age22);
+		BMIReference age23 = new BMIReference(23, 1, 12.7, 13.6, 14.6, 15.8, 17.1, 18.6, 20.3);
+		bmi.put("23-1", age23);
+		BMIReference age24 = new BMIReference(24, 1, 12.9, 13.8, 14.8, 16.0, 17.3, 18.9, 20.6);
+		bmi.put("24-1", age24);
+		BMIReference age25 = new BMIReference(25, 1, 12.8, 13.8, 14.8, 16.0, 17.3, 18.8, 20.5);
+		bmi.put("25-1", age25);
+		BMIReference age26 = new BMIReference(26, 1, 12.8, 13.7, 14.8, 15.9, 17.3, 18.8, 20.5);
+		bmi.put("26-1", age26);
+		BMIReference age27 = new BMIReference(27, 1, 12.7, 13.7, 14.7, 15.9, 17.2, 18.7, 20.4);
+		bmi.put("27-1", age27);
+		BMIReference age28 = new BMIReference(28, 1, 12.7, 13.6, 14.7, 15.9, 17.2, 18.7, 20.4);
+		bmi.put("28-1", age28);
+		BMIReference age29 = new BMIReference(29, 1, 12.7, 13.6, 14.7, 15.8, 17.1, 18.6, 20.3);
+		bmi.put("29-1", age29);
+		BMIReference age30 = new BMIReference(30, 1, 12.6, 13.6, 14.6, 15.8, 17.1, 18.6, 20.2);
+		bmi.put("30-1", age30);
+		BMIReference age31 = new BMIReference(31, 1, 12.6, 13.5, 14.6, 15.8, 17.1, 18.5, 20.2);
+		bmi.put("31-1", age31);
+		BMIReference age32 = new BMIReference(32, 1, 12.5, 13.5, 14.6, 15.7, 17.0, 18.5, 20.1);
+		bmi.put("32-1", age32);
+		BMIReference age33 = new BMIReference(33, 1, 12.5, 13.5, 14.5, 15.7, 17.0, 18.5, 20.1);
+		bmi.put("33-1", age33);
+		BMIReference age34 = new BMIReference(34, 1, 12.5, 13.4, 14.5, 15.7, 17.0, 18.4, 20.0);
+		bmi.put("34-1", age34);
+		BMIReference age35 = new BMIReference(35, 1, 12.4, 13.4, 14.5, 15.6, 16.9, 18.4, 20.0);
+		bmi.put("35-1", age35);
+		BMIReference age36 = new BMIReference(36, 1, 12.4, 13.4, 14.4, 15.6, 16.9, 18.4, 20.0);
+		bmi.put("36-1", age36);
+		BMIReference age37 = new BMIReference(37, 1, 12.4, 13.3, 14.4, 15.6, 16.9, 18.3, 19.9);
+		bmi.put("37-1", age37);
+		BMIReference age38 = new BMIReference(38, 1, 12.3, 13.3, 14.4, 15.5, 16.8, 18.3, 19.9);
+		bmi.put("38-1", age38);
+		BMIReference age39 = new BMIReference(39, 1, 12.3, 13.3, 14.3, 15.5, 16.8, 18.3, 19.9);
+		bmi.put("39-1", age39);
+		BMIReference age40 = new BMIReference(40, 1, 12.3, 13.2, 14.3, 15.5, 16.8, 18.2, 19.9);
+		bmi.put("40-1", age40);
+		BMIReference age41 = new BMIReference(41, 1, 12.2, 13.2, 14.3, 15.5, 16.8, 18.2, 19.9);
+		bmi.put("41-1", age41);
+		BMIReference age42 = new BMIReference(42, 1, 12.2, 13.2, 14.3, 15.4, 16.8, 18.2, 19.8);
+		bmi.put("42-1", age42);
+		BMIReference age43 = new BMIReference(43, 1, 12.2, 13.2, 14.2, 15.4, 16.7, 18.2, 19.8);
+		bmi.put("43-1", age43);
+		BMIReference age44 = new BMIReference(44, 1, 12.2, 13.1, 14.2, 15.4, 16.7, 18.2, 19.8);
+		bmi.put("44-1", age44);
+		BMIReference age45 = new BMIReference(45, 1, 12.2, 13.1, 14.2, 15.4, 16.7, 18.2, 19.8);
+		bmi.put("45-1", age45);
+		BMIReference age46 = new BMIReference(46, 1, 12.1, 13.1, 14.2, 15.4, 16.7, 18.2, 19.8);
+		bmi.put("46-1", age46);
+		BMIReference age47 = new BMIReference(47, 1, 12.1, 13.1, 14.2, 15.3, 16.7, 18.2, 19.9);
+		bmi.put("47-1", age47);
+		BMIReference age48 = new BMIReference(48, 1, 12.1, 13.1, 14.1, 15.3, 16.7, 18.2, 19.9);
+		bmi.put("48-1", age48);
+		BMIReference age49 = new BMIReference(49, 1, 12.1, 13.0, 14.1, 15.3, 16.7, 18.2, 19.9);
+		bmi.put("49-1", age49);
+		BMIReference age50 = new BMIReference(50, 1, 12.1, 13.0, 14.1, 15.3, 16.7, 18.2, 19.9);
+		bmi.put("50-1", age50);
+		BMIReference age51 = new BMIReference(51, 1, 12.1, 13.0, 14.1, 15.3, 16.6, 18.2, 19.9);
+		bmi.put("51-1", age51);
+		BMIReference age52 = new BMIReference(52, 1, 12.0, 13.0, 14.1, 15.3, 16.6, 18.2, 19.9);
+		bmi.put("52-1", age52);
+		BMIReference age53 = new BMIReference(53, 1, 12.0, 13.0, 14.1, 15.3, 16.6, 18.2, 20.0);
+		bmi.put("53-1", age53);
+		BMIReference age54 = new BMIReference(54, 1, 12.0, 13.0, 14.0, 15.3, 16.6, 18.2, 20.0);
+		bmi.put("54-1", age54);
+		BMIReference age55 = new BMIReference(55, 1, 12.0, 13.0, 14.0, 15.2, 16.6, 18.2, 20.0);
+		bmi.put("55-1", age55);
+		BMIReference age56 = new BMIReference(56, 1, 12.0, 12.9, 14.0, 15.2, 16.6, 18.2, 20.1);
+		bmi.put("56-1", age56);
+		BMIReference age57 = new BMIReference(57, 1, 12.0, 12.9, 14.0, 15.2, 16.6, 18.2, 20.1);
+		bmi.put("57-1", age57);
+		BMIReference age58 = new BMIReference(58, 1, 12.0, 12.9, 14.0, 15.2, 16.6, 18.3, 20.2);
+		bmi.put("58-1", age58);
+		BMIReference age59 = new BMIReference(59, 1, 12.0, 12.9, 14.0, 15.2, 16.6, 18.3, 20.2);
+		bmi.put("59-1", age59);
+		BMIReference age60 = new BMIReference(60, 1, 12.0, 12.9, 14.0, 15.2, 16.6, 18.3, 20.3);
+		bmi.put("60-1", age60);
+
+		// 女童
+		BMIReference ageG0 = new BMIReference(0, 2, 10.1, 11.1, 12.2, 13.3, 14.6, 16.1, 17.7);
+		bmi.put("0-2", ageG0);
+		BMIReference ageG1 = new BMIReference(1, 2, 10.8, 12.0, 13.2, 14.6, 16.0, 17.5, 19.1);
+		bmi.put("1-2", ageG1);
+		BMIReference ageG2 = new BMIReference(2, 2, 11.8, 13.0, 14.3, 15.8, 17.3, 19.0, 20.7);
+		bmi.put("2-2", ageG2);
+		BMIReference ageG3 = new BMIReference(3, 2, 12.4, 13.6, 14.9, 16.4, 17.9, 19.7, 21.5);
+		bmi.put("3-2", ageG3);
+		BMIReference ageG4 = new BMIReference(4, 2, 12.7, 13.9, 15.2, 16.7, 18.3, 20.0, 22.0);
+		bmi.put("4-2", ageG4);
+		BMIReference ageG5 = new BMIReference(5, 2, 12.9, 14.1, 15.4, 16.8, 18.4, 20.2, 22.2);
+		bmi.put("5-2", ageG5);
+		BMIReference ageG6 = new BMIReference(6, 2, 13.0, 14.1, 15.5, 16.9, 18.5, 20.3, 22.3);
+		bmi.put("6-2", ageG6);
+		BMIReference ageG7 = new BMIReference(7, 2, 13.0, 14.2, 15.5, 16.9, 18.5, 20.3, 22.3);
+		bmi.put("7-2", ageG7);
+		BMIReference ageG8 = new BMIReference(8, 2, 13.0, 14.1, 15.4, 16.8, 18.4, 20.2, 22.2);
+		bmi.put("8-2", ageG8);
+		BMIReference ageG9 = new BMIReference(9, 2, 12.9, 14.1, 15.3, 16.7, 18.3, 20.1, 22.1);
+		bmi.put("9-2", ageG9);
+		BMIReference ageG10 = new BMIReference(10, 2, 12.9, 14.0, 15.2, 16.6, 18.2, 19.9, 21.9);
+		bmi.put("10-2", ageG10);
+		BMIReference ageG11 = new BMIReference(11, 2, 12.8, 13.9, 15.1, 16.5, 18.0, 19.8, 21.8);
+		bmi.put("11-2", ageG11);
+		BMIReference ageG12 = new BMIReference(12, 2, 12.7, 13.8, 15.0, 16.4, 17.9, 19.6, 21.6);
+		bmi.put("12-2", ageG12);
+		BMIReference ageG13 = new BMIReference(13, 2, 12.6, 13.7, 14.9, 16.2, 17.7, 19.5, 21.4);
+		bmi.put("13-2", ageG13);
+		BMIReference ageG14 = new BMIReference(14, 2, 12.6, 13.6, 14.8, 16.1, 17.6, 19.3, 21.3);
+		bmi.put("14-2", ageG14);
+		BMIReference ageG15 = new BMIReference(15, 2, 12.5, 13.5, 14.7, 16.0, 17.5, 19.2, 21.1);
+		bmi.put("15-2", ageG15);
+		BMIReference ageG16 = new BMIReference(16, 2, 12.4, 13.5, 14.6, 15.9, 17.4, 19.1, 21.0);
+		bmi.put("16-2", ageG16);
+		BMIReference ageG17 = new BMIReference(17, 2, 12.4, 13.4, 14.5, 15.8, 17.3, 18.9, 20.9);
+		bmi.put("17-2", ageG17);
+		BMIReference ageG18 = new BMIReference(18, 2, 12.3, 13.3, 14.4, 15.7, 17.2, 18.8, 20.8);
+		bmi.put("18-2", ageG18);
+		BMIReference ageG19 = new BMIReference(19, 2, 12.3, 13.3, 14.4, 15.7, 17.1, 18.8, 20.7);
+		bmi.put("19-2", ageG19);
+		BMIReference ageG20 = new BMIReference(20, 2, 12.2, 13.2, 14.3, 15.6, 17.0, 18.7, 20.6);
+		bmi.put("20-2", ageG20);
+		BMIReference ageG21 = new BMIReference(21, 2, 12.2, 13.2, 14.3, 15.5, 17.0, 18.6, 20.5);
+		bmi.put("21-2", ageG21);
+		BMIReference ageG22 = new BMIReference(22, 2, 12.2, 13.1, 14.2, 15.5, 16.9, 18.5, 20.4);
+		bmi.put("22-2", ageG22);
+		BMIReference ageG23 = new BMIReference(23, 2, 12.2, 13.1, 14.2, 15.4, 16.9, 18.5, 20.4);
+		bmi.put("23-2", ageG23);
+		BMIReference ageG24 = new BMIReference(24, 2, 12.1, 13.1, 14.2, 15.4, 16.8, 18.4, 20.3);
+		bmi.put("24-2", ageG24);
+		BMIReference ageG25 = new BMIReference(25, 2, 12.4, 13.3, 14.4, 15.7, 17.1, 18.7, 20.6);
+		bmi.put("25-2", ageG25);
+		BMIReference ageG26 = new BMIReference(26, 2, 12.3, 13.3, 14.4, 15.6, 17.0, 18.7, 20.6);
+		bmi.put("26-2", ageG26);
+		BMIReference ageG27 = new BMIReference(27, 2, 12.3, 13.3, 14.4, 15.6, 17.0, 18.6, 20.5);
+		bmi.put("27-2", ageG27);
+		BMIReference ageG28 = new BMIReference(28, 2, 12.3, 13.3, 14.3, 15.6, 17.0, 18.6, 20.5);
+		bmi.put("28-2", ageG28);
+		BMIReference ageG29 = new BMIReference(29, 2, 12.3, 13.2, 14.3, 15.6, 17.0, 18.6, 20.4);
+		bmi.put("29-2", ageG29);
+		BMIReference ageG30 = new BMIReference(30, 2, 12.3, 13.2, 14.3, 15.5, 16.9, 18.5, 20.4);
+		bmi.put("30-2", ageG30);
+		BMIReference ageG31 = new BMIReference(31, 2, 12.2, 13.2, 14.3, 15.5, 16.9, 18.5, 20.4);
+		bmi.put("31-2", ageG31);
+		BMIReference ageG32 = new BMIReference(32, 2, 12.2, 13.2, 14.3, 15.5, 16.9, 18.5, 20.4);
+		bmi.put("32-2", ageG32);
+		BMIReference ageG33 = new BMIReference(33, 2, 12.2, 13.1, 14.2, 15.5, 16.9, 18.5, 20.3);
+		bmi.put("33-2", ageG33);
+		BMIReference ageG34 = new BMIReference(34, 2, 12.2, 13.1, 14.2, 15.4, 16.8, 18.5, 20.3);
+		bmi.put("34-2", ageG34);
+		BMIReference ageG35 = new BMIReference(35, 2, 12.1, 13.1, 14.2, 15.4, 16.8, 18.4, 20.3);
+		bmi.put("35-2", ageG35);
+		BMIReference ageG36 = new BMIReference(36, 2, 12.1, 13.1, 14.2, 15.4, 16.8, 18.4, 20.3);
+		bmi.put("36-2", ageG36);
+		BMIReference ageG37 = new BMIReference(37, 2, 12.1, 13.1, 14.1, 15.4, 16.8, 18.4, 20.3);
+		bmi.put("37-2", ageG37);
+		BMIReference ageG38 = new BMIReference(38, 2, 12.1, 13.0, 14.1, 15.4, 16.8, 18.4, 20.3);
+		bmi.put("38-2", ageG38);
+		BMIReference ageG39 = new BMIReference(39, 2, 12.0, 13.0, 14.1, 15.3, 16.8, 18.4, 20.3);
+		bmi.put("39-2", ageG39);
+		BMIReference ageG40 = new BMIReference(40, 2, 12.0, 13.0, 14.1, 15.3, 16.8, 18.4, 20.3);
+		bmi.put("40-2", ageG40);
+		BMIReference ageG41 = new BMIReference(41, 2, 12.0, 13.0, 14.1, 15.3, 16.8, 18.4, 20.4);
+		bmi.put("41-2", ageG41);
+		BMIReference ageG42 = new BMIReference(42, 2, 12.0, 12.9, 14.0, 15.3, 16.8, 18.4, 20.4);
+		bmi.put("42-2", ageG42);
+		BMIReference ageG43 = new BMIReference(43, 2, 11.9, 12.9, 14.0, 15.3, 16.8, 18.4, 20.4);
+		bmi.put("43-2", ageG43);
+		BMIReference ageG44 = new BMIReference(44, 2, 11.9, 12.9, 14.0, 15.3, 16.8, 18.5, 20.4);
+		bmi.put("44-2", ageG44);
+		BMIReference ageG45 = new BMIReference(45, 2, 11.9, 12.9, 14.0, 15.3, 16.8, 18.5, 20.5);
+		bmi.put("45-2", ageG45);
+		BMIReference ageG46 = new BMIReference(46, 2, 11.9, 12.9, 14.0, 15.3, 16.8, 18.5, 20.5);
+		bmi.put("46-2", ageG46);
+		BMIReference ageG47 = new BMIReference(47, 2, 11.8, 12.8, 14.0, 15.3, 16.8, 18.5, 20.5);
+		bmi.put("47-2", ageG47);
+		BMIReference ageG48 = new BMIReference(48, 2, 11.8, 12.8, 14.0, 15.3, 16.8, 18.5, 20.6);
+		bmi.put("48-2", ageG48);
+		BMIReference ageG49 = new BMIReference(49, 2, 11.8, 12.8, 13.9, 15.3, 16.8, 18.5, 20.6);
+		bmi.put("49-2", ageG49);
+		BMIReference ageG50 = new BMIReference(50, 2, 11.8, 12.8, 13.9, 15.3, 16.8, 18.6, 20.7);
+		bmi.put("50-2", ageG50);
+		BMIReference ageG51 = new BMIReference(51, 2, 11.8, 12.8, 13.9, 15.3, 16.8, 18.6, 20.7);
+		bmi.put("51-2", ageG51);
+		BMIReference ageG52 = new BMIReference(52, 2, 11.7, 12.8, 13.9, 15.2, 16.8, 18.6, 20.7);
+		bmi.put("52-2", ageG52);
+		BMIReference ageG53 = new BMIReference(53, 2, 11.7, 12.7, 13.9, 15.3, 16.8, 18.6, 20.8);
+		bmi.put("53-2", ageG53);
+		BMIReference ageG54 = new BMIReference(54, 2, 11.7, 12.7, 13.9, 15.3, 16.8, 18.7, 20.8);
+		bmi.put("54-2", ageG54);
+		BMIReference ageG55 = new BMIReference(55, 2, 11.7, 12.7, 13.9, 15.3, 16.8, 18.7, 20.9);
+		bmi.put("55-2", ageG55);
+		BMIReference ageG56 = new BMIReference(56, 2, 11.7, 12.7, 13.9, 15.3, 16.8, 18.7, 20.9);
+		bmi.put("56-2", ageG56);
+		BMIReference ageG57 = new BMIReference(57, 2, 11.7, 12.7, 13.9, 15.3, 16.9, 18.7, 21.0);
+		bmi.put("57-2", ageG57);
+		BMIReference ageG58 = new BMIReference(58, 2, 11.7, 12.7, 13.9, 15.3, 16.9, 18.8, 21.0);
+		bmi.put("58-2", ageG58);
+		BMIReference ageG59 = new BMIReference(59, 2, 11.6, 12.7, 13.9, 15.3, 16.9, 18.8, 21.0);
+		bmi.put("59-2", ageG59);
+		BMIReference ageG60 = new BMIReference(60, 2, 11.6, 12.7, 13.9, 15.3, 16.9, 18.8, 21.1);
+		bmi.put("60-2", ageG60);
+	}
+
+	private BMIReference(int age, int sex, double n3sd, double n2sd,
+			double n1sd, double n0sd, double p1sd, double p2sd, double p3sd) {
+		super();
+		this.age = age;
+		this.sex = sex;
+		N3SD = n3sd;
+		N2SD = n2sd;
+		N1SD = n1sd;
+		N0SD = n0sd;
+		P1SD = p1sd;
+		P2SD = p2sd;
+		P3SD = p3sd;
+	}
+
+	public int getAge() {
+		return age;
+	}
+
+	public void setAge(int age) {
+		this.age = age;
+	}
+
+	public int getSex() {
+		return sex;
+	}
+
+	public void setSex(int sex) {
+		this.sex = sex;
+	}
+
+	public double getN3SD() {
+		return N3SD;
+	}
+
+	public void setN3SD(double n3sd) {
+		N3SD = n3sd;
+	}
+
+	public double getN2SD() {
+		return N2SD;
+	}
+
+	public void setN2SD(double n2sd) {
+		N2SD = n2sd;
+	}
+
+	public double getN1SD() {
+		return N1SD;
+	}
+
+	public void setN1SD(double n1sd) {
+		N1SD = n1sd;
+	}
+
+	public double getN0SD() {
+		return N0SD;
+	}
+
+	public void setN0SD(double n0sd) {
+		N0SD = n0sd;
+	}
+
+	public double getP1SD() {
+		return P1SD;
+	}
+
+	public void setP1SD(double p1sd) {
+		P1SD = p1sd;
+	}
+
+	public double getP2SD() {
+		return P2SD;
+	}
+
+	public void setP2SD(double p2sd) {
+		P2SD = p2sd;
+	}
+
+	public double getP3SD() {
+		return P3SD;
+	}
+
+	public void setP3SD(double p3sd) {
+		P3SD = p3sd;
+	}
+
+	@Override
+	public String toString() {
+		return "BMIReference [age=" + age + ", sex=" + sex + ", N3SD=" + N3SD
+				+ ", N2SD=" + N2SD + ", N1SD=" + N1SD + ", N0SD=" + N0SD
+				+ ", P1SD=" + P1SD + ", P2SD=" + P2SD + ", P3SD=" + P3SD + "]";
+	}
+}

+ 88 - 0
wechat-common-core/src/main/java/com/iamberry/wechat/core/entity/questionnaire/QuestionDto.java

@@ -0,0 +1,88 @@
+package com.iamberry.wechat.core.entity.questionnaire;
+
+import java.io.Serializable;
+
+public class QuestionDto implements Serializable {
+
+	private static final long serialVersionUID = 5755477782918536218L;
+
+	private Integer questionID;
+	
+	private Integer optionID;
+	
+	private String questionName;
+	
+	private String optionName;
+	
+	private String questionIDStr;
+	
+	private String optionIDStr;
+	
+	private int checkBox;
+	
+	private String questionPic;
+	
+	public String getQuestionPic() {
+		return questionPic;
+	}
+
+	public void setQuestionPic(String questionPic) {
+		this.questionPic = questionPic;
+	}
+
+	public int getCheckBox() {
+		return checkBox;
+	}
+
+	public void setCheckBox(int checkBox) {
+		this.checkBox = checkBox;
+	}
+
+	public String getQuestionIDStr() {
+		return questionIDStr;
+	}
+
+	public void setQuestionIDStr(String questionIDStr) {
+		this.questionIDStr = questionIDStr;
+	}
+
+	public String getOptionIDStr() {
+		return optionIDStr;
+	}
+
+	public void setOptionIDStr(String optionIDStr) {
+		this.optionIDStr = optionIDStr;
+	}
+
+	public Integer getQuestionID() {
+		return questionID;
+	}
+
+	public void setQuestionID(Integer questionID) {
+		this.questionID = questionID;
+	}
+
+	public Integer getOptionID() {
+		return optionID;
+	}
+
+	public void setOptionID(Integer optionID) {
+		this.optionID = optionID;
+	}
+
+	public String getQuestionName() {
+		return questionName;
+	}
+
+	public void setQuestionName(String questionName) {
+		this.questionName = questionName;
+	}
+
+	public String getOptionName() {
+		return optionName;
+	}
+
+	public void setOptionName(String optionName) {
+		this.optionName = optionName;
+	}
+}

+ 36 - 0
wechat-common-core/src/main/java/com/iamberry/wechat/core/entity/questionnaire/QuestionTypeScore.java

@@ -0,0 +1,36 @@
+package com.iamberry.wechat.core.entity.questionnaire;
+
+import java.io.Serializable;
+
+/**
+ * @company	深圳爱贝源科技有限公司
+ * @website www.iamberry.com
+ * @author 	献
+ * @tel		18271840547
+ * @date	2016年10月28日
+ * @explain	答完题目后,分数的统计
+ */
+public class QuestionTypeScore implements Serializable {
+
+	private static final long serialVersionUID = 2568715113499438235L;
+
+	private Integer questionType;
+	
+	private int typeScore;
+
+	public Integer getQuestionType() {
+		return questionType;
+	}
+
+	public void setQuestionType(Integer questionType) {
+		this.questionType = questionType;
+	}
+
+	public int getTypeScore() {
+		return typeScore;
+	}
+
+	public void setTypeScore(int typeScore) {
+		this.typeScore = typeScore;
+	}
+}

+ 214 - 0
wechat-common-core/src/main/java/com/iamberry/wechat/core/entity/questionnaire/QuestionnaireAnswer.java

@@ -0,0 +1,214 @@
+package com.iamberry.wechat.core.entity.questionnaire;
+
+import java.io.Serializable;
+import java.util.Date;
+
+import com.iamberry.wechat.core.entity.PageBean;
+
+/**
+ * 答题人信息表
+ * @author Administrator
+ *
+ */
+public class QuestionnaireAnswer implements Serializable{
+	
+	private static final long serialVersionUID = -4324573455622843356L;
+	
+	private Integer 	answerId;				//回答id answer_id
+	private String 	answerBabyPic;			//宝宝头像 answer_baby_pic
+	private String 	answerBabyName;			//宝宝昵称 answer_baby_name
+	private Integer answerHeadWith;			//宝宝头围 answer_head_with
+	private Integer answerBabyAge;			//宝宝月龄 answer_baby_age
+	private Integer answerIsEutocia;		//宝宝月龄 answer_is_eutocia
+	private Integer answerIsFullmoon;		//宝宝顺产 1:顺产 2非顺产 answer_is_fullmoon
+	private Date 	answerCreateDate;		//时间 answer_create_date
+	private Integer answer_baby_sex;		//1:男宝宝 2:女宝宝
+	private Integer answer_baby_height;		//宝宝身长 单位是毫米
+	private Integer answer_baby_weight;		//宝宝体重 单位是克
+	private Integer answerUserScore;		//用户分数 answer_user_score
+	private Integer answerScannedNumber;	//分数浏览次数 answer _scanned_number
+	private Integer answerShareNumber;		//分数用户分享分数 answer_user_score
+	private String 	answerRemark;			//答题备注
+	private PageBean page = new PageBean(); //分页信息
+	
+	public QuestionnaireAnswer() {
+		super();
+		// TODO Auto-generated constructor stub
+	}
+
+	public QuestionnaireAnswer(Integer answerId, String answerBabyPic,
+			String answerBabyName, Integer answerHeadWith,
+			Integer answerBabyAge, Integer answerIsEutocia,
+			Integer answerIsFullmoon, Date answerCreateDate,
+			Integer answer_baby_sex, Integer answer_baby_height,
+			Integer answer_baby_weight, Integer answerUserScore,
+			Integer answerScannedNumber, Integer answerShareNumber,
+			String answerRemark, PageBean page) {
+		super();
+		this.answerId = answerId;
+		this.answerBabyPic = answerBabyPic;
+		this.answerBabyName = answerBabyName;
+		this.answerHeadWith = answerHeadWith;
+		this.answerBabyAge = answerBabyAge;
+		this.answerIsEutocia = answerIsEutocia;
+		this.answerIsFullmoon = answerIsFullmoon;
+		this.answerCreateDate = answerCreateDate;
+		this.answer_baby_sex = answer_baby_sex;
+		this.answer_baby_height = answer_baby_height;
+		this.answer_baby_weight = answer_baby_weight;
+		this.answerUserScore = answerUserScore;
+		this.answerScannedNumber = answerScannedNumber;
+		this.answerShareNumber = answerShareNumber;
+		this.answerRemark = answerRemark;
+		this.page = page;
+	}
+
+	public Integer getAnswerId() {
+		return answerId;
+	}
+
+	public void setAnswerId(Integer answerId) {
+		this.answerId = answerId;
+	}
+
+	public String getAnswerBabyPic() {
+		return answerBabyPic;
+	}
+
+	public void setAnswerBabyPic(String answerBabyPic) {
+		this.answerBabyPic = answerBabyPic;
+	}
+
+	public String getAnswerBabyName() {
+		return answerBabyName;
+	}
+
+	public void setAnswerBabyName(String answerBabyName) {
+		this.answerBabyName = answerBabyName;
+	}
+
+	public Integer getAnswerHeadWith() {
+		return answerHeadWith;
+	}
+
+	public void setAnswerHeadWith(Integer answerHeadWith) {
+		this.answerHeadWith = answerHeadWith;
+	}
+
+	public Integer getAnswerBabyAge() {
+		return answerBabyAge;
+	}
+
+	public void setAnswerBabyAge(Integer answerBabyAge) {
+		this.answerBabyAge = answerBabyAge;
+	}
+
+	public Integer getAnswerIsEutocia() {
+		return answerIsEutocia;
+	}
+
+	public void setAnswerIsEutocia(Integer answerIsEutocia) {
+		this.answerIsEutocia = answerIsEutocia;
+	}
+
+	public Integer getAnswerIsFullmoon() {
+		return answerIsFullmoon;
+	}
+
+	public void setAnswerIsFullmoon(Integer answerIsFullmoon) {
+		this.answerIsFullmoon = answerIsFullmoon;
+	}
+
+	public Date getAnswerCreateDate() {
+		return answerCreateDate;
+	}
+
+	public void setAnswerCreateDate(Date answerCreateDate) {
+		this.answerCreateDate = answerCreateDate;
+	}
+
+	public Integer getAnswer_baby_sex() {
+		return answer_baby_sex;
+	}
+
+	public void setAnswer_baby_sex(Integer answer_baby_sex) {
+		this.answer_baby_sex = answer_baby_sex;
+	}
+
+	public Integer getAnswer_baby_height() {
+		return answer_baby_height;
+	}
+
+	public void setAnswer_baby_height(Integer answer_baby_height) {
+		this.answer_baby_height = answer_baby_height;
+	}
+
+	public Integer getAnswer_baby_weight() {
+		return answer_baby_weight;
+	}
+
+	public void setAnswer_baby_weight(Integer answer_baby_weight) {
+		this.answer_baby_weight = answer_baby_weight;
+	}
+
+	public Integer getAnswerUserScore() {
+		return answerUserScore;
+	}
+
+	public void setAnswerUserScore(Integer answerUserScore) {
+		this.answerUserScore = answerUserScore;
+	}
+
+	public Integer getAnswerScannedNumber() {
+		return answerScannedNumber;
+	}
+
+	public void setAnswerScannedNumber(Integer answerScannedNumber) {
+		this.answerScannedNumber = answerScannedNumber;
+	}
+
+	public Integer getAnswerShareNumber() {
+		return answerShareNumber;
+	}
+
+	public void setAnswerShareNumber(Integer answerShareNumber) {
+		this.answerShareNumber = answerShareNumber;
+	}
+
+	public String getAnswerRemark() {
+		return answerRemark;
+	}
+
+	public void setAnswerRemark(String answerRemark) {
+		this.answerRemark = answerRemark;
+	}
+
+	public PageBean getPage() {
+		return page;
+	}
+
+	public void setPage(PageBean page) {
+		this.page = page;
+	}
+
+	@Override
+	public String toString() {
+		return "QuestionnaireAnswer [answerId=" + answerId + ", answerBabyPic="
+				+ answerBabyPic + ", answerBabyName=" + answerBabyName
+				+ ", answerHeadWith=" + answerHeadWith + ", answerBabyAge="
+				+ answerBabyAge + ", answerIsEutocia=" + answerIsEutocia
+				+ ", answerIsFullmoon=" + answerIsFullmoon
+				+ ", answerCreateDate=" + answerCreateDate
+				+ ", answer_baby_sex=" + answer_baby_sex
+				+ ", answer_baby_height=" + answer_baby_height
+				+ ", answer_baby_weight=" + answer_baby_weight
+				+ ", answerUserScore=" + answerUserScore
+				+ ", answerScannedNumber=" + answerScannedNumber
+				+ ", answerShareNumber=" + answerShareNumber
+				+ ", answerRemark=" + answerRemark + ", page=" + page + "]";
+	}
+
+	
+	
+	
+}

+ 180 - 0
wechat-common-core/src/main/java/com/iamberry/wechat/core/entity/questionnaire/QuestionnaireAnswerDetailed.java

@@ -0,0 +1,180 @@
+package com.iamberry.wechat.core.entity.questionnaire;
+
+import java.io.Serializable;
+import java.util.Date;
+
+import com.iamberry.wechat.core.entity.PageBean;
+
+/**
+ * 答题结果信息表
+ * @author Administrator
+ *
+ */
+public class QuestionnaireAnswerDetailed implements Serializable{
+	
+	private static final long serialVersionUID = -4407130342986068540L;
+	private Integer detailedId;			//数据ID detailed_id
+	private Integer detailedAnswerId;	//答题人-外间 detailed_answer_id
+	private Integer detailedQuestionId;	//题目-外间 detailed_question_id
+	private Integer detailedOptionId;	//选项-外间 detailed_option_id
+	private Date 	detailedCreateDate;	//时间 detailed_create_date
+	private Integer detailedScore;		//得分 detailed_score
+	private Integer detailedStatus;		// 状态detailed_status 1:正常;2:删除
+	
+	private PageBean page = new PageBean(); //分页信息
+
+	
+
+	public QuestionnaireAnswerDetailed() {
+		super();
+		// TODO Auto-generated constructor stub
+	}
+
+
+
+
+	public QuestionnaireAnswerDetailed(Integer detailedId,
+			Integer detailedAnswerId, Integer detailedQuestionId,
+			Integer detailedOptionId, Date detailedCreateDate,
+			Integer detailedScore, Integer detailedStatus) {
+		super();
+		this.detailedId = detailedId;
+		this.detailedAnswerId = detailedAnswerId;
+		this.detailedQuestionId = detailedQuestionId;
+		this.detailedOptionId = detailedOptionId;
+		this.detailedCreateDate = detailedCreateDate;
+		this.detailedScore = detailedScore;
+		this.detailedStatus = detailedStatus;
+	}
+
+
+
+
+	public PageBean getPage() {
+		return page;
+	}
+
+
+
+
+	public void setPage(PageBean page) {
+		this.page = page;
+	}
+
+
+
+
+	public Integer getDetailedId() {
+		return detailedId;
+	}
+
+
+
+
+	public void setDetailedId(Integer detailedId) {
+		this.detailedId = detailedId;
+	}
+
+
+
+
+	public Integer getDetailedAnswerId() {
+		return detailedAnswerId;
+	}
+
+
+
+
+	public void setDetailedAnswerId(Integer detailedAnswerId) {
+		this.detailedAnswerId = detailedAnswerId;
+	}
+
+
+
+
+	public Integer getDetailedQuestionId() {
+		return detailedQuestionId;
+	}
+
+
+
+
+	public void setDetailedQuestionId(Integer detailedQuestionId) {
+		this.detailedQuestionId = detailedQuestionId;
+	}
+
+
+
+
+	public Integer getDetailedOptionId() {
+		return detailedOptionId;
+	}
+
+
+
+
+	public void setDetailedOptionId(Integer detailedOptionId) {
+		this.detailedOptionId = detailedOptionId;
+	}
+
+
+
+
+	public Date getDetailedCreateDate() {
+		return detailedCreateDate;
+	}
+
+
+
+
+	public void setDetailedCreateDate(Date detailedCreateDate) {
+		this.detailedCreateDate = detailedCreateDate;
+	}
+
+
+
+
+	public Integer getDetailedScore() {
+		return detailedScore;
+	}
+
+
+
+
+	public void setDetailedScore(Integer detailedScore) {
+		this.detailedScore = detailedScore;
+	}
+
+
+
+
+	public Integer getDetailedStatus() {
+		return detailedStatus;
+	}
+
+
+
+
+	public void setDetailedStatus(Integer detailedStatus) {
+		this.detailedStatus = detailedStatus;
+	}
+
+
+
+
+	@Override
+	public String toString() {
+		return "QuestionnaireAnswerDetailed [detailedId=" + detailedId
+				+ ", detailedAnswerId=" + detailedAnswerId
+				+ ", detailedQuestionId=" + detailedQuestionId
+				+ ", detailedOptionId=" + detailedOptionId
+				+ ", detailedCreateDate=" + detailedCreateDate
+				+ ", detailedScore=" + detailedScore + ", detailedStatus="
+				+ detailedStatus + "]";
+	}
+	
+	
+	
+
+
+}

+ 148 - 0
wechat-common-core/src/main/java/com/iamberry/wechat/core/entity/questionnaire/QuestionnaireOption.java

@@ -0,0 +1,148 @@
+package com.iamberry.wechat.core.entity.questionnaire;
+
+import java.io.Serializable;
+import java.util.Date;
+
+import com.iamberry.wechat.core.entity.PageBean;
+
+/**
+ * 题目选项表
+ * @author Administrator
+ *
+ */
+public class QuestionnaireOption implements Serializable{
+	
+
+	private static final long serialVersionUID = -6326223576843442228L;
+
+	private Integer 	optionId;				//选项id option_id
+	private Integer 	optionQuesionId;		//所属题目-外检  option_quesion_id
+	private String 	optionName;				//选项名称 option_name
+	private Integer optionOrder;			//选项排序 option_order
+	private Integer optionScore;			//选项分数 option_score
+	private Date 	optionCreateDate;	
+	private Date 	optionUpdateDate;	
+	private Integer optionStatus;			//1:正常 2失效 option_status
+	private Integer optionNumber; 			//选择次数 option_number
+	
+	
+	private PageBean page;					//分页
+	
+	public QuestionnaireOption() {
+		super();
+		// TODO Auto-generated constructor stub
+	}
+
+	public QuestionnaireOption(Integer optionId, Integer optionQuesionId,
+			String optionName, Integer optionOrder, Integer optionScore,
+			Date optionCreateDate, Date optionUpdateDate, Integer optionStatus,
+			Integer optionNumber, PageBean page) {
+		super();
+		this.optionId = optionId;
+		this.optionQuesionId = optionQuesionId;
+		this.optionName = optionName;
+		this.optionOrder = optionOrder;
+		this.optionScore = optionScore;
+		this.optionCreateDate = optionCreateDate;
+		this.optionUpdateDate = optionUpdateDate;
+		this.optionStatus = optionStatus;
+		this.optionNumber = optionNumber;
+		this.page = page;
+	}
+
+	public Integer getOptionId() {
+		return optionId;
+	}
+
+	public void setOptionId(Integer optionId) {
+		this.optionId = optionId;
+	}
+
+	public Integer getOptionQuesionId() {
+		return optionQuesionId;
+	}
+
+	public void setOptionQuesionId(Integer optionQuesionId) {
+		this.optionQuesionId = optionQuesionId;
+	}
+
+	public String getOptionName() {
+		return optionName;
+	}
+
+	public void setOptionName(String optionName) {
+		this.optionName = optionName;
+	}
+
+	public Integer getOptionOrder() {
+		return optionOrder;
+	}
+
+	public void setOptionOrder(Integer optionOrder) {
+		this.optionOrder = optionOrder;
+	}
+
+	public Integer getOptionScore() {
+		return optionScore;
+	}
+
+	public void setOptionScore(Integer optionScore) {
+		this.optionScore = optionScore;
+	}
+
+	public Date getOptionCreateDate() {
+		return optionCreateDate;
+	}
+
+	public void setOptionCreateDate(Date optionCreateDate) {
+		this.optionCreateDate = optionCreateDate;
+	}
+
+	public Date getOptionUpdateDate() {
+		return optionUpdateDate;
+	}
+
+	public void setOptionUpdateDate(Date optionUpdateDate) {
+		this.optionUpdateDate = optionUpdateDate;
+	}
+
+	public Integer getOptionStatus() {
+		return optionStatus;
+	}
+
+	public void setOptionStatus(Integer optionStatus) {
+		this.optionStatus = optionStatus;
+	}
+
+	public Integer getOptionNumber() {
+		return optionNumber;
+	}
+
+	public void setOptionNumber(Integer optionNumber) {
+		this.optionNumber = optionNumber;
+	}
+
+	public PageBean getPage() {
+		return page;
+	}
+
+	public void setPage(PageBean page) {
+		this.page = page;
+	}
+
+	@Override
+	public String toString() {
+		return "QuestionnaireOption [optionId=" + optionId
+				+ ", optionQuesionId=" + optionQuesionId + ", optionName="
+				+ optionName + ", optionOrder=" + optionOrder
+				+ ", optionScore=" + optionScore + ", optionCreateDate="
+				+ optionCreateDate + ", optionUpdateDate=" + optionUpdateDate
+				+ ", optionStatus=" + optionStatus + ", optionNumber="
+				+ optionNumber + ", page=" + page + "]";
+	}
+
+
+	
+	
+	
+}

+ 158 - 0
wechat-common-core/src/main/java/com/iamberry/wechat/core/entity/questionnaire/QuestionnairePaper.java

@@ -0,0 +1,158 @@
+package com.iamberry.wechat.core.entity.questionnaire;
+
+import java.io.Serializable;
+import java.util.Date;
+
+import org.springframework.format.annotation.DateTimeFormat;
+
+import com.iamberry.wechat.core.entity.PageBean;
+
+/**
+ * 试卷表
+ * @author Administrator
+ *
+ */
+public class QuestionnairePaper implements Serializable{
+	
+	
+	private static final long serialVersionUID = -8394580482131757563L;
+	
+	private Integer   	paperId;				//试卷id paper_id
+	private String 	paperName;			//试卷名称 paper_name
+	private String 	paperPic;			//试卷图标 paper_pic
+	private Integer paperNumber;		//试卷回答次数 paper_number
+	private Integer paperShareNumber;	//分享次数 paper_share_number
+	
+	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+	private Date 	paperCreateDate;		//创建时间  paper_create_date
+	private Integer paperStatus;		//试卷状态1、正常2不正常 paper_status
+	
+	private PageBean page;					//分页
+
+	public QuestionnairePaper() {
+		super();
+		// TODO Auto-generated constructor stub
+	}
+
+	
+	
+	
+	public QuestionnairePaper(Integer paperId, String paperName, String paperPic,
+			Integer paperNumber, Integer paperShareNumber,
+			Date paperCreateDate, Integer paperStatus, PageBean page) {
+		super();
+		this.paperId = paperId;
+		this.paperName = paperName;
+		this.paperPic = paperPic;
+		this.paperNumber = paperNumber;
+		this.paperShareNumber = paperShareNumber;
+		this.paperCreateDate = paperCreateDate;
+		this.paperStatus = paperStatus;
+		this.page = page;
+	}
+
+
+
+
+	public PageBean getPage() {
+		return page;
+	}
+
+
+	public void setPage(PageBean page) {
+		this.page = page;
+	}
+
+
+	public Integer getPaperId() {
+		return paperId;
+	}
+
+
+	public void setPaperId(Integer paperId) {
+		this.paperId = paperId;
+	}
+
+
+	public String getPaperName() {
+		return paperName;
+	}
+
+
+	public void setPaperName(String paperName) {
+		this.paperName = paperName;
+	}
+
+
+	public String getPaperPic() {
+		return paperPic;
+	}
+
+
+	public void setPaperPic(String paperPic) {
+		this.paperPic = paperPic;
+	}
+
+
+	public Integer getPaperNumber() {
+		return paperNumber;
+	}
+
+
+	public void setPaperNumber(Integer paperNumber) {
+		this.paperNumber = paperNumber;
+	}
+
+
+	public Integer getPaperShareNumber() {
+		return paperShareNumber;
+	}
+
+
+	public void setPaperShareNumber(Integer paperShareNumber) {
+		this.paperShareNumber = paperShareNumber;
+	}
+
+
+
+
+
+	public Date getPaperCreateDate() {
+		return paperCreateDate;
+	}
+
+
+	public void setPaperCreateDate(Date paperCreateDate) {
+		this.paperCreateDate = paperCreateDate;
+	}
+
+
+	public Integer getPaperStatus() {
+		return paperStatus;
+	}
+
+
+	public void setPaperStatus(Integer paperStatus) {
+		this.paperStatus = paperStatus;
+	}
+
+
+
+
+	@Override
+	public String toString() {
+		return "QuestionnairePaper [paperId=" + paperId + ", paperName="
+				+ paperName + ", paperPic=" + paperPic + ", paperNumber="
+				+ paperNumber + ", paperShareNumber=" + paperShareNumber
+				+ ", paperCreateDate=" + paperCreateDate + ", paperStatus="
+				+ paperStatus + ", page=" + page + "]";
+	}
+
+
+
+
+
+	
+	
+	
+}

+ 159 - 0
wechat-common-core/src/main/java/com/iamberry/wechat/core/entity/questionnaire/QuestionnairePaperDto.java

@@ -0,0 +1,159 @@
+package com.iamberry.wechat.core.entity.questionnaire;
+
+import java.io.Serializable;
+
+
+
+/**
+ * 试卷
+ * @author Administrator
+ *
+ */
+public class QuestionnairePaperDto implements Serializable{
+
+	private static final long serialVersionUID = -8187169207936723445L;
+	
+	private String paperId;			//试卷id paper_id
+	private String paperName;			//试卷名称 paper_name
+	private String questionId;			//题目id question_id
+	private String questionName;		//题目名称 question_name
+	private String optionId;			//选项id option_id
+	private String optionName;			//选项名称 option_name
+	private String testScore;			//选项分数 test_score
+	private String testIsChekcbox;	//是否多选 test_is_chekcbox
+	private String testId;	//   试卷题目表id test_id
+	
+	private String id;
+	private String type;
+	private String content;
+	
+	
+	public QuestionnairePaperDto() {
+		super();
+		// TODO Auto-generated constructor stub
+	}
+	
+	
+	
+	
+	public String getId() {
+		return id;
+	}
+
+
+
+
+	public void setId(String id) {
+		this.id = id;
+	}
+
+
+
+
+	public String getType() {
+		return type;
+	}
+
+
+
+
+	public void setType(String type) {
+		this.type = type;
+	}
+
+
+
+
+	public String getContent() {
+		return content;
+	}
+
+
+
+
+	public void setContent(String content) {
+		this.content = content;
+	}
+
+
+
+
+	public String getTestId() {
+		return testId;
+	}
+
+
+
+
+	public void setTestId(String testId) {
+		this.testId = testId;
+	}
+
+
+
+
+	public String getPaperId() {
+		return paperId;
+	}
+	public void setPaperId(String paperId) {
+		this.paperId = paperId;
+	}
+	public String getPaperName() {
+		return paperName;
+	}
+	public void setPaperName(String paperName) {
+		this.paperName = paperName;
+	}
+	public String getQuestionId() {
+		return questionId;
+	}
+	public void setQuestionId(String questionId) {
+		this.questionId = questionId;
+	}
+	public String getQuestionName() {
+		return questionName;
+	}
+	public void setQuestionName(String questionName) {
+		this.questionName = questionName;
+	}
+	public String getOptionId() {
+		return optionId;
+	}
+	public void setOptionId(String optionId) {
+		this.optionId = optionId;
+	}
+	public String getOptionName() {
+		return optionName;
+	}
+	public void setOptionName(String optionName) {
+		this.optionName = optionName;
+	}
+	public String getTestScore() {
+		return testScore;
+	}
+	public void setTestScore(String testScore) {
+		this.testScore = testScore;
+	}
+	public String getTestIsChekcbox() {
+		return testIsChekcbox;
+	}
+	public void setTestIsChekcbox(String testIsChekcbox) {
+		this.testIsChekcbox = testIsChekcbox;
+	}
+	@Override
+	public String toString() {
+		return "QuestionnairePaperDto [paperId=" + paperId + ", paperName="
+				+ paperName + ", questionId=" + questionId + ", questionName="
+				+ questionName + ", optionId=" + optionId + ", optionName="
+				+ optionName + ", testScore=" + testScore + ", testIsChekcbox="
+				+ testIsChekcbox + "]";
+	}
+	
+	
+	
+	
+	
+	
+	
+	
+}

+ 251 - 0
wechat-common-core/src/main/java/com/iamberry/wechat/core/entity/questionnaire/QuestionnaireQuestion.java

@@ -0,0 +1,251 @@
+package com.iamberry.wechat.core.entity.questionnaire;
+
+import java.io.Serializable;
+import java.util.Date;
+
+import com.iamberry.wechat.core.entity.PageBean;
+
+/**
+ * 题目-表
+ * @author Administrator
+ *
+ */
+public class QuestionnaireQuestion implements Serializable{
+	
+	private static final long serialVersionUID = 1667164673597708491L;
+	private Integer   	questionId;			//题目id question_id
+	private String 	questionName;		//题目名称 question_name
+	private String 	questionPic ; 		//题目图标 question_pic
+	private String 	questionDesc;		//题目简介 question_desc
+	private String 	questionType;		//题目类型 question_type 请求类型、1饮食、2健康 3、营养
+	private Date 	questionUpdateDate;	//修改时间  question_update_date
+	private Date 	questionCreateDate;	//创建时间 question_create_date
+	private Integer questionStatu;		//1:正常使用 2:已经停止使用 question_statu
+	private Integer questionIsChekcbox;	//题目是否多选 1:多选 2:单选 question_is_chekcbox
+	private Integer questionCalculation;//题目计算方式 1累计,2最高分 question_calculation
+	private Integer questionPaperId;	//所属试卷  question_paper_id
+	
+	private PageBean page;					//分页
+	
+	
+	
+
+	public QuestionnaireQuestion() {
+		super();
+		// TODO Auto-generated constructor stub
+	}
+
+
+
+
+	public QuestionnaireQuestion(Integer questionId, String questionName,
+			String questionPic, String questionDesc, String questionType,
+			Date questionUpdateDate, Date questionCreateDate,
+			Integer questionStatu, Integer questionIsChekcbox,
+			Integer questionCalculation, Integer questionPaperId, PageBean page) {
+		super();
+		this.questionId = questionId;
+		this.questionName = questionName;
+		this.questionPic = questionPic;
+		this.questionDesc = questionDesc;
+		this.questionType = questionType;
+		this.questionUpdateDate = questionUpdateDate;
+		this.questionCreateDate = questionCreateDate;
+		this.questionStatu = questionStatu;
+		this.questionIsChekcbox = questionIsChekcbox;
+		this.questionCalculation = questionCalculation;
+		this.questionPaperId = questionPaperId;
+		this.page = page;
+	}
+
+
+
+
+	public Integer getQuestionId() {
+		return questionId;
+	}
+
+
+
+
+	public void setQuestionId(Integer questionId) {
+		this.questionId = questionId;
+	}
+
+
+
+
+	public String getQuestionName() {
+		return questionName;
+	}
+
+
+
+
+	public void setQuestionName(String questionName) {
+		this.questionName = questionName;
+	}
+
+
+
+
+	public String getQuestionPic() {
+		return questionPic;
+	}
+
+
+
+
+	public void setQuestionPic(String questionPic) {
+		this.questionPic = questionPic;
+	}
+
+
+
+
+	public String getQuestionDesc() {
+		return questionDesc;
+	}
+
+
+
+
+	public void setQuestionDesc(String questionDesc) {
+		this.questionDesc = questionDesc;
+	}
+
+
+
+
+	public String getQuestionType() {
+		return questionType;
+	}
+
+
+
+
+	public void setQuestionType(String questionType) {
+		this.questionType = questionType;
+	}
+
+
+
+
+	public Date getQuestionUpdateDate() {
+		return questionUpdateDate;
+	}
+
+
+
+
+	public void setQuestionUpdateDate(Date questionUpdateDate) {
+		this.questionUpdateDate = questionUpdateDate;
+	}
+
+
+
+
+	public Date getQuestionCreateDate() {
+		return questionCreateDate;
+	}
+
+
+
+
+	public void setQuestionCreateDate(Date questionCreateDate) {
+		this.questionCreateDate = questionCreateDate;
+	}
+
+
+
+
+	public Integer getQuestionStatu() {
+		return questionStatu;
+	}
+
+
+
+
+	public void setQuestionStatu(Integer questionStatu) {
+		this.questionStatu = questionStatu;
+	}
+
+
+
+
+	public Integer getQuestionIsChekcbox() {
+		return questionIsChekcbox;
+	}
+
+
+
+
+	public void setQuestionIsChekcbox(Integer questionIsChekcbox) {
+		this.questionIsChekcbox = questionIsChekcbox;
+	}
+
+
+
+
+	public Integer getQuestionCalculation() {
+		return questionCalculation;
+	}
+
+
+
+
+	public void setQuestionCalculation(Integer questionCalculation) {
+		this.questionCalculation = questionCalculation;
+	}
+
+
+
+
+	public Integer getQuestionPaperId() {
+		return questionPaperId;
+	}
+
+
+
+
+	public void setQuestionPaperId(Integer questionPaperId) {
+		this.questionPaperId = questionPaperId;
+	}
+
+
+
+
+	public PageBean getPage() {
+		return page;
+	}
+
+
+
+
+	public void setPage(PageBean page) {
+		this.page = page;
+	}
+
+
+
+
+	@Override
+	public String toString() {
+		return "QuestionnaireQuestion [questionId=" + questionId
+				+ ", questionName=" + questionName + ", questionPic="
+				+ questionPic + ", questionDesc=" + questionDesc
+				+ ", questionType=" + questionType + ", questionUpdateDate="
+				+ questionUpdateDate + ", questionCreateDate="
+				+ questionCreateDate + ", questionStatu=" + questionStatu
+				+ ", questionIsChekcbox=" + questionIsChekcbox
+				+ ", questionCalculation=" + questionCalculation
+				+ ", questionPaperId=" + questionPaperId + ", page=" + page
+				+ "]";
+	}
+
+	
+	
+	
+	
+	
+}

+ 99 - 0
wechat-common-core/src/main/java/com/iamberry/wechat/core/entity/questionnaire/QuestionnaireQuestionDto.java

@@ -0,0 +1,99 @@
+package com.iamberry.wechat.core.entity.questionnaire;
+
+import java.io.Serializable;
+import java.util.Date;
+
+import com.iamberry.wechat.core.entity.PageBean;
+
+/**
+ * 题目表
+ * @author Administrator
+ *
+ */
+public class QuestionnaireQuestionDto implements Serializable{
+	
+	private static final long serialVersionUID = 1667164673597708491L;
+	private Long questionId;			//题目id question_id
+	private String questionName;		//题目名称 question_name
+	private String questionPic ; 		//题目图片 question_pic
+	private String questionDesc;		//题目简介 question_desc
+	
+	private Date questionUpdateDate;	
+	private Date questionCreateDate;	
+	
+	private Integer questionStatu;	//1:正常使用 2:已经停止使用 question_statu
+
+	private PageBean page = new PageBean(); //分页信息
+	
+	public QuestionnaireQuestionDto() {
+		super();
+		// TODO Auto-generated constructor stub
+	}
+
+	public Long getQuestionId() {
+		return questionId;
+	}
+
+	public void setQuestionId(Long questionId) {
+		this.questionId = questionId;
+	}
+
+	public String getQuestionName() {
+		return questionName;
+	}
+
+	public void setQuestionName(String questionName) {
+		this.questionName = questionName;
+	}
+
+	public String getQuestionPic() {
+		return questionPic;
+	}
+
+	public void setQuestionPic(String questionPic) {
+		this.questionPic = questionPic;
+	}
+
+	public String getQuestionDesc() {
+		return questionDesc;
+	}
+
+	public void setQuestionDesc(String questionDesc) {
+		this.questionDesc = questionDesc;
+	}
+
+	public Date getQuestionUpdateDate() {
+		return questionUpdateDate;
+	}
+
+	public void setQuestionUpdateDate(Date questionUpdateDate) {
+		this.questionUpdateDate = questionUpdateDate;
+	}
+
+	public Date getQuestionCreateDate() {
+		return questionCreateDate;
+	}
+
+	public void setQuestionCreateDate(Date questionCreateDate) {
+		this.questionCreateDate = questionCreateDate;
+	}
+
+	public Integer getQuestionStatu() {
+		return questionStatu;
+	}
+
+	public void setQuestionStatu(Integer questionStatu) {
+		this.questionStatu = questionStatu;
+	}
+
+	public PageBean getPage() {
+		return page;
+	}
+
+	public void setPage(PageBean page) {
+		this.page = page;
+	}
+
+	
+	
+}

+ 119 - 0
wechat-common-core/src/main/java/com/iamberry/wechat/core/entity/questionnaire/QuestionnaireTestPaper.java

@@ -0,0 +1,119 @@
+package com.iamberry.wechat.core.entity.questionnaire;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * 试卷题目表
+ * @author Administrator
+ *
+ */
+public class QuestionnaireTestPaper implements Serializable{
+	
+	
+	private static final long serialVersionUID = -420678737793767335L;
+	
+	private Integer testId;			//试卷题目ID test_id
+	private Integer testPaperId;		//试卷-外间 test_paper_id
+	private Integer testQuestionId;	//试卷题目-外间 test_question_id
+	private Integer testOptionId;	//试卷选项-外间 test_option_id
+	private Date testCreateDate;	//时间 test_create_date
+	private Date testUpdateDate;	//时间 test_update_date
+	private Integer testOrder;		//试卷题目排序 test_order
+	private Integer testNumber;	//回答次数 test_number
+	private Integer testScore;		//选项分数 test_score
+	private Integer testIsChekcbox; //题目是否多选 1,多选 2单选 注意保持一致 test_is_chekcbox
+	public QuestionnaireTestPaper() {
+		super();
+		// TODO Auto-generated constructor stub
+	}
+	public QuestionnaireTestPaper(Integer testId, Integer testPaperId,
+			Integer testQuestionId, Integer testOptionId, Date testCreateDate,
+			Date testUpdateDate, Integer testOrder, Integer testNumber,
+			Integer testScore, Integer testIsChekcbox) {
+		super();
+		this.testId = testId;
+		this.testPaperId = testPaperId;
+		this.testQuestionId = testQuestionId;
+		this.testOptionId = testOptionId;
+		this.testCreateDate = testCreateDate;
+		this.testUpdateDate = testUpdateDate;
+		this.testOrder = testOrder;
+		this.testNumber = testNumber;
+		this.testScore = testScore;
+		this.testIsChekcbox = testIsChekcbox;
+	}
+	public Integer getTestId() {
+		return testId;
+	}
+	public void setTestId(Integer testId) {
+		this.testId = testId;
+	}
+	public Integer getTestPaperId() {
+		return testPaperId;
+	}
+	public void setTestPaperId(Integer testPaperId) {
+		this.testPaperId = testPaperId;
+	}
+	public Integer getTestQuestionId() {
+		return testQuestionId;
+	}
+	public void setTestQuestionId(Integer testQuestionId) {
+		this.testQuestionId = testQuestionId;
+	}
+	public Integer getTestOptionId() {
+		return testOptionId;
+	}
+	public void setTestOptionId(Integer testOptionId) {
+		this.testOptionId = testOptionId;
+	}
+	public Date getTestCreateDate() {
+		return testCreateDate;
+	}
+	public void setTestCreateDate(Date testCreateDate) {
+		this.testCreateDate = testCreateDate;
+	}
+	public Date getTestUpdateDate() {
+		return testUpdateDate;
+	}
+	public void setTestUpdateDate(Date testUpdateDate) {
+		this.testUpdateDate = testUpdateDate;
+	}
+	public Integer getTestOrder() {
+		return testOrder;
+	}
+	public void setTestOrder(Integer testOrder) {
+		this.testOrder = testOrder;
+	}
+	public Integer getTestNumber() {
+		return testNumber;
+	}
+	public void setTestNumber(Integer testNumber) {
+		this.testNumber = testNumber;
+	}
+	public Integer getTestScore() {
+		return testScore;
+	}
+	public void setTestScore(Integer testScore) {
+		this.testScore = testScore;
+	}
+	public Integer getTestIsChekcbox() {
+		return testIsChekcbox;
+	}
+	public void setTestIsChekcbox(Integer testIsChekcbox) {
+		this.testIsChekcbox = testIsChekcbox;
+	}
+	@Override
+	public String toString() {
+		return "QuestionnaireTestPaper [testId=" + testId + ", testPaperId="
+				+ testPaperId + ", testQuestionId=" + testQuestionId
+				+ ", testOptionId=" + testOptionId + ", testCreateDate="
+				+ testCreateDate + ", testUpdateDate=" + testUpdateDate
+				+ ", testOrder=" + testOrder + ", testNumber=" + testNumber
+				+ ", testScore=" + testScore + ", testIsChekcbox="
+				+ testIsChekcbox + "]";
+	}
+	
+	
+	
+}

+ 32 - 0
wechat-common-core/src/main/java/com/iamberry/wechat/core/entity/wx/AccessToken.java

@@ -0,0 +1,32 @@
+package com.iamberry.wechat.core.entity.wx;
+
+/**
+ * 微信通用接口凭证
+ * @author fzh
+ */
+public class AccessToken  implements java.io.Serializable{
+	
+	/**
+	 * 
+	 */
+	private static final long serialVersionUID = 2670125377385352574L;
+	private String token; //获取到的凭证
+	private int expiresIn;//凭证有效时间,单位:秒
+
+	public String getToken() {
+		return token;
+	}
+
+	public void setToken(String token) {
+		this.token = token;
+	}
+
+	public int getExpiresIn() {
+		return expiresIn;
+	}
+
+	public void setExpiresIn(int expiresIn) {
+		this.expiresIn = expiresIn;
+	}
+	
+}

+ 53 - 0
wechat-common-core/src/main/java/com/iamberry/wechat/core/entity/wx/Article.java

@@ -0,0 +1,53 @@
+package com.iamberry.wechat.core.entity.wx;
+
+/**
+ * 图文model
+ * 
+ * @author fzh
+ */
+public class Article  implements java.io.Serializable{
+	
+	private static final long serialVersionUID = -8593564815850929663L;
+	// 图文消息名称
+	private String Title;
+	// 图文消息描述
+	private String Description;
+	// 图片链接,支持JPG、PNG格式,较好的效果为大图640*320,小图80*80,限制图片链接的域名需要与开发者填写的基本资料中的Url一致
+	private String PicUrl;
+	// 点击图文消息跳转链接
+	private String Url;
+
+	public String getTitle() {
+		return Title;
+	}
+
+	public void setTitle(String title) {
+		Title = title;
+	}
+
+	public String getDescription() {
+		return null == Description ? "" : Description;
+	}
+
+	public void setDescription(String description) {
+		Description = description;
+	}
+
+	public String getPicUrl() {
+		return null == PicUrl ? "" : PicUrl;
+	}
+
+	public void setPicUrl(String picUrl) {
+		PicUrl = picUrl;
+	}
+
+	public String getUrl() {
+		return null == Url ? "" : Url;
+	}
+
+	public void setUrl(String url) {
+		Url = url;
+	}
+
+}
+

+ 62 - 0
wechat-common-core/src/main/java/com/iamberry/wechat/core/entity/wx/BaseMessage.java

@@ -0,0 +1,62 @@
+package com.iamberry.wechat.core.entity.wx;
+
+/**
+ * 消息基类(公众帐号 -> 普通用户)
+ * 
+ * @author fzh
+ */
+public class BaseMessage  implements java.io.Serializable{
+	
+
+	private static final long serialVersionUID = 2956582772622097819L;
+	// 接收方帐号(收到的OpenID)
+	private String ToUserName;
+	// 开发者微信号
+	private String FromUserName;
+	// 消息创建时间 (整型)
+	private long CreateTime;
+	// 消息类型(text/music/news)
+	private String MsgType;
+	// 位0x0001被标志时,星标刚收到的消息
+	private int FuncFlag;
+
+	public String getToUserName() {
+		return ToUserName;
+	}
+
+	public void setToUserName(String toUserName) {
+		ToUserName = toUserName;
+	}
+
+	public String getFromUserName() {
+		return FromUserName;
+	}
+
+	public void setFromUserName(String fromUserName) {
+		FromUserName = fromUserName;
+	}
+
+	public long getCreateTime() {
+		return CreateTime;
+	}
+
+	public void setCreateTime(long createTime) {
+		CreateTime = createTime;
+	}
+
+	public String getMsgType() {
+		return MsgType;
+	}
+
+	public void setMsgType(String msgType) {
+		MsgType = msgType;
+	}
+
+	public int getFuncFlag() {
+		return FuncFlag;
+	}
+
+	public void setFuncFlag(int funcFlag) {
+		FuncFlag = funcFlag;
+	}
+}

+ 20 - 0
wechat-common-core/src/main/java/com/iamberry/wechat/core/entity/wx/Button.java

@@ -0,0 +1,20 @@
+package com.iamberry.wechat.core.entity.wx;
+
+/**
+ * 按钮的基�?
+ * @author fzh
+ */
+public class Button  implements java.io.Serializable{
+	
+	private static final long serialVersionUID = 2386514133396981429L;
+	private String name;
+
+	public String getName() {
+		return name;
+	}
+
+	public void setName(String name) {
+		this.name = name;
+	}
+	
+}

+ 39 - 0
wechat-common-core/src/main/java/com/iamberry/wechat/core/entity/wx/CommonButton.java

@@ -0,0 +1,39 @@
+package com.iamberry.wechat.core.entity.wx;
+
+/**
+ * 普�?按钮(子按�?
+ * 子菜单是这样定义的:没有子菜单的菜单�?有可能是二级菜单�?也有可能是不含二级菜单的�?��菜单。这类子菜单项一定会包含三个属�?:type、name和key
+ * @author fzh
+ */
+public class CommonButton extends Button  implements java.io.Serializable {
+	private static final long serialVersionUID = -1390039856400968257L;
+	private String type;
+	private String key;
+	private String url;
+
+	public String getType() {
+		return type;
+	}
+
+	public void setType(String type) {
+		this.type = type;
+	}
+
+	public String getKey() {
+		return key;
+	}
+
+	public void setKey(String key) {
+		this.key = key;
+	}
+
+	public String getUrl() {
+		return url;
+	}
+
+	public void setUrl(String url) {
+		this.url = url;
+	}
+
+	
+}

+ 21 - 0
wechat-common-core/src/main/java/com/iamberry/wechat/core/entity/wx/ComplexButton.java

@@ -0,0 +1,21 @@
+package com.iamberry.wechat.core.entity.wx;
+
+/**
+ * 复杂按钮(父按�?
+ * 对父菜单项的定义:包含有二级菜单项的�?��菜单。这类菜单项包含有二个属性:name和sub_button,�?sub_button以是�?��子菜单项数组
+ * @author fzh
+ */
+public class ComplexButton extends Button  implements java.io.Serializable {
+	
+	private static final long serialVersionUID = -7281574700075721182L;
+	private Button[] sub_button;
+
+	public Button[] getSub_button() {
+		return sub_button;
+	}
+
+	public void setSub_button(Button[] sub_button) {
+		this.sub_button = sub_button;
+	}
+
+}

+ 52 - 0
wechat-common-core/src/main/java/com/iamberry/wechat/core/entity/wx/Config.java

@@ -0,0 +1,52 @@
+package com.iamberry.wechat.core.entity.wx;
+
+import java.io.Serializable;
+
+public class Config implements Serializable {
+	private static final long serialVersionUID = -9210974737255751698L;
+	
+	private Long id;
+	private Long createTime;
+    private String ticket;
+    private String appid;
+    private String appsecret;
+    private String wxpubName;
+    
+	public Long getId() {
+		return id;
+	}
+	public void setId(Long id) {
+		this.id = id;
+	}
+	public Long getCreateTime() {
+		return createTime;
+	}
+	public void setCreateTime(Long createTime) {
+		this.createTime = createTime;
+	}
+	public String getTicket() {
+		return ticket;
+	}
+	public void setTicket(String ticket) {
+		this.ticket = ticket;
+	}
+	public String getAppid() {
+		return appid;
+	}
+	public void setAppid(String appid) {
+		this.appid = appid;
+	}
+	public String getAppsecret() {
+		return appsecret;
+	}
+	public void setAppsecret(String appsecret) {
+		this.appsecret = appsecret;
+	}
+	public String getWxpubName() {
+		return wxpubName;
+	}
+	public void setWxpubName(String wxpubName) {
+		this.wxpubName = wxpubName;
+	}
+    
+}

+ 56 - 0
wechat-common-core/src/main/java/com/iamberry/wechat/core/entity/wx/ConfigJSSDK.java

@@ -0,0 +1,56 @@
+package com.iamberry.wechat.core.entity.wx;
+
+public class ConfigJSSDK  implements java.io.Serializable{
+	private static final long serialVersionUID = 3651595251849668826L;
+	private String appId;	   //公众号appId
+	private String ticket;    //获取到的凭证
+	private String nonceStr;  //随机字串
+	private String timestamp; //时间戳
+	private String signature; //获取到的签名
+	
+	private WechatShare share;
+	
+	public WechatShare getShare() {
+		return share;
+	}
+	public void setShare(WechatShare share) {
+		this.share = share;
+	}
+	public String getAppId() {
+		return appId;
+	}
+	public void setAppId(String appId) {
+		this.appId = appId;
+	}
+	public String getTicket() {
+		return ticket;
+	}
+	public void setTicket(String ticket) {
+		this.ticket = ticket;
+	}
+	public String getNonceStr() {
+		return nonceStr;
+	}
+	public void setNonceStr(String nonceStr) {
+		this.nonceStr = nonceStr;
+	}
+	public String getTimestamp() {
+		return timestamp;
+	}
+	public void setTimestamp(String timestamp) {
+		this.timestamp = timestamp;
+	}
+	public String getSignature() {
+		return signature;
+	}
+	public void setSignature(String signature) {
+		this.signature = signature;
+	}
+	@Override
+	public String toString() {
+		return "Config [appId=" + appId + ", ticket=" + ticket + ", nonceStr="
+				+ nonceStr + ", timestamp=" + timestamp + ", signature="
+				+ signature + "]";
+	}
+	
+}

+ 42 - 0
wechat-common-core/src/main/java/com/iamberry/wechat/core/entity/wx/FirstAccess.java

@@ -0,0 +1,42 @@
+package com.iamberry.wechat.core.entity.wx;
+
+import java.util.Date;
+
+
+/**
+ * desc:首次关注
+ * @author Administrator
+ * createDate:2015/5/6
+ */
+public class FirstAccess  implements java.io.Serializable{
+
+	private static final long serialVersionUID = -4096952140633276005L;
+	private Integer fid;
+	private Date fDate;
+	private Integer fType;
+	private ImagetextMaterial imagetextMaterial;
+	public Integer getFid() {
+		return fid;
+	}
+	public void setFid(Integer fid) {
+		this.fid = fid;
+	}
+	public Date getfDate() {
+		return fDate;
+	}
+	public void setfDate(Date fDate) {
+		this.fDate = fDate;
+	}
+	public Integer getfType() {
+		return fType;
+	}
+	public void setfType(Integer fType) {
+		this.fType = fType;
+	}
+	public ImagetextMaterial getImagetextMaterial() {
+		return imagetextMaterial;
+	}
+	public void setImagetextMaterial(ImagetextMaterial imagetextMaterial) {
+		this.imagetextMaterial = imagetextMaterial;
+	}
+}

+ 89 - 0
wechat-common-core/src/main/java/com/iamberry/wechat/core/entity/wx/FirstJoinKey.java

@@ -0,0 +1,89 @@
+package com.iamberry.wechat.core.entity.wx;
+
+import java.io.Serializable;
+import java.util.Date;
+
+public class FirstJoinKey implements Serializable {
+	private static final long serialVersionUID = 3809405828772757728L;
+	
+	private int id;
+	private String wxpublicNo;
+    private String reMessageType;
+    private String reText;
+    private Long imageTextNo;
+    private Date createTime;
+    private String vchar1;
+    private String vchar2;
+    private String vchar3;
+    private String vchar4;
+    private String title;
+    
+	public int getId() {
+		return id;
+	}
+	public void setId(int id) {
+		this.id = id;
+	}
+	public String getWxpublicNo() {
+		return wxpublicNo;
+	}
+	public void setWxpublicNo(String wxpublicNo) {
+		this.wxpublicNo = wxpublicNo;
+	}
+	public String getReMessageType() {
+		return reMessageType;
+	}
+	public void setReMessageType(String reMessageType) {
+		this.reMessageType = reMessageType;
+	}
+	public String getReText() {
+		return reText;
+	}
+	public void setReText(String reText) {
+		this.reText = reText;
+	}
+	public Long getImageTextNo() {
+		return imageTextNo;
+	}
+	public void setImageTextNo(Long imageTextNo) {
+		this.imageTextNo = imageTextNo;
+	}
+	public Date getCreateTime() {
+		return createTime;
+	}
+	public void setCreateTime(Date createTime) {
+		this.createTime = createTime;
+	}
+	public String getVchar1() {
+		return vchar1;
+	}
+	public void setVchar1(String vchar1) {
+		this.vchar1 = vchar1;
+	}
+	public String getVchar2() {
+		return vchar2;
+	}
+	public void setVchar2(String vchar2) {
+		this.vchar2 = vchar2;
+	}
+	public String getVchar3() {
+		return vchar3;
+	}
+	public void setVchar3(String vchar3) {
+		this.vchar3 = vchar3;
+	}
+	public String getVchar4() {
+		return vchar4;
+	}
+	public void setVchar4(String vchar4) {
+		this.vchar4 = vchar4;
+	}
+	public String getTitle() {
+		return title;
+	}
+	public void setTitle(String title) {
+		this.title = title;
+	}
+    
+
+}

+ 59 - 0
wechat-common-core/src/main/java/com/iamberry/wechat/core/entity/wx/ITTempLate.java

@@ -0,0 +1,59 @@
+package com.iamberry.wechat.core.entity.wx;
+/**
+ * desc:IT行业模板消息实体类
+ * @author 何秀刚
+ */
+public class ITTempLate  implements java.io.Serializable{
+	
+	private static final long serialVersionUID = 7075894495826788850L;
+
+	private String touser; 					//用户OpenID
+    
+    private String template_id; 			//模板消息ID
+    
+    private String url; 					//URL置空,则在发送后,点击模板消息会进入一个空白页面(ios),或无法点击(android)。
+    
+    private String topcolor = "#173177"; 	//标题颜色,默认为蓝色
+    
+    private Object data;					//详细内容
+
+    public String getTouser() {
+        return touser;
+    }
+
+    public void setTouser(String touser) {
+        this.touser = touser;
+    }
+
+    public String getTemplate_id() {
+        return template_id;
+    }
+
+    public void setTemplate_id(String templateId) {
+        template_id = templateId;
+    }
+
+    public String getUrl() {
+        return url;
+    }
+
+    public void setUrl(String url) {
+        this.url = url;
+    }
+
+    public String getTopcolor() {
+        return topcolor;
+    }
+
+    public void setTopcolor(String topcolor) {
+        this.topcolor = topcolor;
+    }
+
+    public Object getData() {
+        return data;
+    }
+
+    public void setData(Object data) {
+        this.data = data;
+    }
+}

+ 109 - 0
wechat-common-core/src/main/java/com/iamberry/wechat/core/entity/wx/ImageTextInfo.java

@@ -0,0 +1,109 @@
+package com.iamberry.wechat.core.entity.wx;
+
+import java.io.Serializable;
+import java.util.Date;
+
+public class ImageTextInfo implements Serializable {
+	private static final long serialVersionUID = -8922763252441247989L;
+	private Long imageTextNo;
+	private String imageTextMD5;
+    private String wxpublicNo;
+    private String title;
+    private String imageUrl;
+    private String digest;
+    private String mainText;
+    private String clickUrl;
+    private String clickOutUrl;
+    private String sourceUrl;
+    private String imageTextType;
+    private Date createTime;
+    
+	public String getImageTextMD5() {
+		return imageTextMD5;
+	}
+	public void setImageTextMD5(String imageTextMD5) {
+		this.imageTextMD5 = imageTextMD5;
+	}
+	public static long getSerialversionuid() {
+		return serialVersionUID;
+	}
+	public Long getImageTextNo() {
+		return imageTextNo;
+	}
+	public void setImageTextNo(Long imageTextNo) {
+		this.imageTextNo = imageTextNo;
+	}
+	public String getWxpublicNo() {
+		return wxpublicNo;
+	}
+	public void setWxpublicNo(String wxpublicNo) {
+		this.wxpublicNo = wxpublicNo;
+	}
+	public String getTitle() {
+		return title;
+	}
+	public void setTitle(String title) {
+		this.title = title;
+	}
+	public String getImageUrl() {
+		return imageUrl;
+	}
+	public void setImageUrl(String imageUrl) {
+		this.imageUrl = imageUrl;
+	}
+	public String getDigest() {
+		return digest;
+	}
+	public void setDigest(String digest) {
+		this.digest = digest;
+	}
+	public String getMainText() {
+		return mainText;
+	}
+	public void setMainText(String mainText) {
+		this.mainText = mainText;
+	}
+	public String getClickUrl() {
+		return clickUrl;
+	}
+	public void setClickUrl(String clickUrl) {
+		this.clickUrl = clickUrl;
+	}
+	public String getClickOutUrl() {
+		return clickOutUrl;
+	}
+	public void setClickOutUrl(String clickOutUrl) {
+		this.clickOutUrl = clickOutUrl;
+	}
+	public String getSourceUrl() {
+		return sourceUrl;
+	}
+	public void setSourceUrl(String sourceUrl) {
+		this.sourceUrl = sourceUrl;
+	}
+	public String getImageTextType() {
+		return imageTextType;
+	}
+	public void setImageTextType(String imageTextType) {
+		this.imageTextType = imageTextType;
+	}
+	public Date getCreateTime() {
+		return createTime;
+	}
+	public void setCreateTime(Date createTime) {
+		this.createTime = createTime;
+	}
+	@Override
+	public String toString() {
+		return "ImageTextInfo [imageTextNo=" + imageTextNo + ", imageTextMD5="
+				+ imageTextMD5 + ", wxpublicNo=" + wxpublicNo + ", title="
+				+ title + ", imageUrl=" + imageUrl + ", digest=" + digest
+				+ ", mainText=" + mainText + ", clickUrl=" + clickUrl
+				+ ", clickOutUrl=" + clickOutUrl + ", sourceUrl=" + sourceUrl
+				+ ", imageTextType=" + imageTextType + ", createTime="
+				+ createTime + "]";
+	}
+	
+	
+    
+}

+ 104 - 0
wechat-common-core/src/main/java/com/iamberry/wechat/core/entity/wx/ImageTextMore.java

@@ -0,0 +1,104 @@
+package com.iamberry.wechat.core.entity.wx;
+
+import java.io.Serializable;
+import java.util.Date;
+
+public class ImageTextMore implements Serializable {
+
+	private static final long serialVersionUID = -4445660361194005539L;
+
+	private Long moreImageTextNo;
+	private String moreImageTextMD5;
+	private Long imageTextNo;
+	private String wxpublicNo;
+	private String title;
+	private String imageUrl;
+	private String digest;
+	private String mainText;
+	private String clickUrl;
+	private String clickOutUrl;
+	private String sourceUrl;
+	private String imageTextType;
+	private Date createTime;
+	
+	
+	public String getMoreImageTextMD5() {
+		return moreImageTextMD5;
+	}
+	public void setMoreImageTextMD5(String moreImageTextMD5) {
+		this.moreImageTextMD5 = moreImageTextMD5;
+	}
+	public Long getMoreImageTextNo() {
+		return moreImageTextNo;
+	}
+	public void setMoreImageTextNo(Long moreImageTextNo) {
+		this.moreImageTextNo = moreImageTextNo;
+	}
+	public Long getImageTextNo() {
+		return imageTextNo;
+	}
+	public void setImageTextNo(Long imageTextNo) {
+		this.imageTextNo = imageTextNo;
+	}
+	public String getWxpublicNo() {
+		return wxpublicNo;
+	}
+	public void setWxpublicNo(String wxpublicNo) {
+		this.wxpublicNo = wxpublicNo;
+	}
+	public String getTitle() {
+		return title;
+	}
+	public void setTitle(String title) {
+		this.title = title;
+	}
+	public String getImageUrl() {
+		return imageUrl;
+	}
+	public void setImageUrl(String imageUrl) {
+		this.imageUrl = imageUrl;
+	}
+	public String getDigest() {
+		return digest;
+	}
+	public void setDigest(String digest) {
+		this.digest = digest;
+	}
+	public String getMainText() {
+		return mainText;
+	}
+	public void setMainText(String mainText) {
+		this.mainText = mainText;
+	}
+	public String getClickUrl() {
+		return clickUrl;
+	}
+	public void setClickUrl(String clickUrl) {
+		this.clickUrl = clickUrl;
+	}
+	public String getClickOutUrl() {
+		return clickOutUrl;
+	}
+	public void setClickOutUrl(String clickOutUrl) {
+		this.clickOutUrl = clickOutUrl;
+	}
+	public String getSourceUrl() {
+		return sourceUrl;
+	}
+	public void setSourceUrl(String sourceUrl) {
+		this.sourceUrl = sourceUrl;
+	}
+	public String getImageTextType() {
+		return imageTextType;
+	}
+	public void setImageTextType(String imageTextType) {
+		this.imageTextType = imageTextType;
+	}
+	public Date getCreateTime() {
+		return createTime;
+	}
+	public void setCreateTime(Date createTime) {
+		this.createTime = createTime;
+	}
+
+}

+ 83 - 0
wechat-common-core/src/main/java/com/iamberry/wechat/core/entity/wx/ImagetextMaterial.java

@@ -0,0 +1,83 @@
+package com.iamberry.wechat.core.entity.wx;
+
+import java.util.Date;
+
+/**
+ * desc:图文素材
+ * @author Administrator
+ * createDate:2015/5/6
+ */
+public class ImagetextMaterial  implements java.io.Serializable{
+	
+	private static final long serialVersionUID = 1357174973511903174L;
+	private Integer mid;
+	private String mClickOutUrl;
+	private String mClickUrl;
+	private Date mDate;
+	private String mDesc;
+	private String mImage;
+	private String mMaintext;
+	private String mSourceUrl;
+	private String mTitle;
+	private Integer mType;
+	public Integer getMid() {
+		return mid;
+	}
+	public void setMid(Integer mid) {
+		this.mid = mid;
+	}
+	public String getmClickOutUrl() {
+		return mClickOutUrl;
+	}
+	public void setmClickOutUrl(String mClickOutUrl) {
+		this.mClickOutUrl = mClickOutUrl;
+	}
+	public String getmClickUrl() {
+		return mClickUrl;
+	}
+	public void setmClickUrl(String mClickUrl) {
+		this.mClickUrl = mClickUrl;
+	}
+	public Date getmDate() {
+		return mDate;
+	}
+	public void setmDate(Date mDate) {
+		this.mDate = mDate;
+	}
+	public String getmDesc() {
+		return mDesc;
+	}
+	public void setmDesc(String mDesc) {
+		this.mDesc = mDesc;
+	}
+	public String getmImage() {
+		return mImage;
+	}
+	public void setmImage(String mImage) {
+		this.mImage = mImage;
+	}
+	public String getmMaintext() {
+		return mMaintext;
+	}
+	public void setmMaintext(String mMaintext) {
+		this.mMaintext = mMaintext;
+	}
+	public String getmSourceUrl() {
+		return mSourceUrl;
+	}
+	public void setmSourceUrl(String mSourceUrl) {
+		this.mSourceUrl = mSourceUrl;
+	}
+	public String getmTitle() {
+		return mTitle;
+	}
+	public void setmTitle(String mTitle) {
+		this.mTitle = mTitle;
+	}
+	public Integer getmType() {
+		return mType;
+	}
+	public void setmType(Integer mType) {
+		this.mType = mType;
+	}
+}

+ 66 - 0
wechat-common-core/src/main/java/com/iamberry/wechat/core/entity/wx/Income.java

@@ -0,0 +1,66 @@
+package com.iamberry.wechat.core.entity.wx;
+
+import java.io.Serializable;
+
+/**
+ * description : 账户变更提醒
+ * @author 朱笑
+ * create date : 2016年5月13日 
+ */
+public class Income implements Serializable{
+	/**
+	 * 
+	 */
+	private static final long serialVersionUID = -3158240329464988687L;
+	private String first;//标题内容
+	private String account;//账户
+	private String time;//时间
+	private String type;//类型
+	private String remark;//提示信息
+	private String url;
+	
+	public String getFirst() {
+		return first;
+	}
+	public void setFirst(String first) {
+		this.first = first;
+	}
+	public String getAccount() {
+		return account;
+	}
+	public void setAccount(String account) {
+		this.account = account;
+	}
+	public String getTime() {
+		return time;
+	}
+	public void setTime(String time) {
+		this.time = time;
+	}
+	public String getType() {
+		return type;
+	}
+	public void setType(String type) {
+		this.type = type;
+	}
+	public String getRemark() {
+		return remark;
+	}
+	public void setRemark(String remark) {
+		this.remark = remark;
+	}
+	public String getUrl() {
+		return url;
+	}
+	public void setUrl(String url) {
+		this.url = url;
+	}
+	public static long getSerialversionuid() {
+		return serialVersionUID;
+	}
+	@Override
+	public String toString() {
+		return "Shipment [first=" + first + ", account=" + account + ", time=" + time + ", type=" + type + ", remark="
+				+ remark + "]";
+	}
+}

+ 119 - 0
wechat-common-core/src/main/java/com/iamberry/wechat/core/entity/wx/KeyWord.java

@@ -0,0 +1,119 @@
+package com.iamberry.wechat.core.entity.wx;
+
+import java.io.Serializable;
+import java.util.Date;
+
+public class KeyWord implements Serializable {
+	private static final long serialVersionUID = -259648345042862442L;
+	
+	private Long keyServiceNo;
+	private String keyServiceNoMd5;
+    private String keyWord;
+    private String wxpublicNo;
+    private String reType;
+    private String refText;
+    private Long refImageTextId;
+    private String refVedioId;
+    private Date createTime;
+    private String vchar1;
+    private String vchar2;
+    private String vchar3;
+    private String vchar4;
+    private String keyType;
+    private String title;
+	public Long getKeyServiceNo() {
+		return keyServiceNo;
+	}
+	public void setKeyServiceNo(Long keyServiceNo) {
+		this.keyServiceNo = keyServiceNo;
+	}
+	
+	public String getKeyServiceNoMd5() {
+		return keyServiceNoMd5;
+	}
+	public void setKeyServiceNoMd5(String keyServiceNoMd5) {
+		this.keyServiceNoMd5 = keyServiceNoMd5;
+	}
+	public static long getSerialversionuid() {
+		return serialVersionUID;
+	}
+	public String getKeyWord() {
+		return keyWord;
+	}
+	public void setKeyWord(String keyWord) {
+		this.keyWord = keyWord;
+	}
+	public String getWxpublicNo() {
+		return wxpublicNo;
+	}
+	public void setWxpublicNo(String wxpublicNo) {
+		this.wxpublicNo = wxpublicNo;
+	}
+	public String getReType() {
+		return reType;
+	}
+	public void setReType(String reType) {
+		this.reType = reType;
+	}
+	public String getRefText() {
+		return refText;
+	}
+	public void setRefText(String refText) {
+		this.refText = refText;
+	}
+	public Long getRefImageTextId() {
+		return refImageTextId;
+	}
+	public void setRefImageTextId(Long refImageTextId) {
+		this.refImageTextId = refImageTextId;
+	}
+	public String getRefVedioId() {
+		return refVedioId;
+	}
+	public void setRefVedioId(String refVedioId) {
+		this.refVedioId = refVedioId;
+	}
+	public Date getCreateTime() {
+		return createTime;
+	}
+	public void setCreateTime(Date createTime) {
+		this.createTime = createTime;
+	}
+	public String getVchar1() {
+		return vchar1;
+	}
+	public void setVchar1(String vchar1) {
+		this.vchar1 = vchar1;
+	}
+	public String getVchar2() {
+		return vchar2;
+	}
+	public void setVchar2(String vchar2) {
+		this.vchar2 = vchar2;
+	}
+	public String getVchar3() {
+		return vchar3;
+	}
+	public void setVchar3(String vchar3) {
+		this.vchar3 = vchar3;
+	}
+	public String getVchar4() {
+		return vchar4;
+	}
+	public void setVchar4(String vchar4) {
+		this.vchar4 = vchar4;
+	}
+	public String getKeyType() {
+		return keyType;
+	}
+	public void setKeyType(String keyType) {
+		this.keyType = keyType;
+	}
+	public String getTitle() {
+		return title;
+	}
+	public void setTitle(String title) {
+		this.title = title;
+	}
+    
+}

+ 19 - 0
wechat-common-core/src/main/java/com/iamberry/wechat/core/entity/wx/Menu.java

@@ -0,0 +1,19 @@
+package com.iamberry.wechat.core.entity.wx;
+
+/**
+ * 菜单
+ * 包含多个菜单�?�?��只能�?�?,这些菜单项可以是子菜单项(不含二级菜单的一级菜�?,也可以是父菜单项(包含二级菜单的菜单项)
+ * @author fzh
+ */
+public class Menu  implements java.io.Serializable{
+	private static final long serialVersionUID = 2264696812557623425L;
+	private Button[] button;
+
+	public Button[] getButton() {
+		return button;
+	}
+
+	public void setButton(Button[] button) {
+		this.button = button;
+	}
+}

+ 29 - 0
wechat-common-core/src/main/java/com/iamberry/wechat/core/entity/wx/MenuData.java

@@ -0,0 +1,29 @@
+package com.iamberry.wechat.core.entity.wx;
+
+public class MenuData  implements java.io.Serializable{
+
+	private static final long serialVersionUID = 2329236757841582384L;
+	private String appId;
+	private String appSecret;
+	private String data;
+	
+	public String getAppId() {
+		return appId;
+	}
+	public void setAppId(String appId) {
+		this.appId = appId;
+	}
+	public String getAppSecret() {
+		return appSecret;
+	}
+	public void setAppSecret(String appSecret) {
+		this.appSecret = appSecret;
+	}
+	public String getData() {
+		return data;
+	}
+	public void setData(String data) {
+		this.data = data;
+	}
+	
+}

+ 102 - 0
wechat-common-core/src/main/java/com/iamberry/wechat/core/entity/wx/MenuInfo.java

@@ -0,0 +1,102 @@
+package com.iamberry.wechat.core.entity.wx;
+
+import java.io.Serializable;
+import java.util.Date;
+
+public class MenuInfo implements Serializable {
+	private static final long serialVersionUID = 4755634423648618847L;
+
+	private int id;
+	private int menuId;
+    private String wxpublicNo;
+    private String menuName;
+    private Long orderNo;
+    private Long parentMenuId;
+    private String menuType;
+    private String url;
+    private Date opTime;
+    private String vchar1;
+    private String vchar2;
+    private String vchar3;
+    private String vchar4;
+    
+	public int getId() {
+		return id;
+	}
+	public void setId(int id) {
+		this.id = id;
+	}
+	public int getMenuId() {
+		return menuId;
+	}
+	public void setMenuId(int menuId) {
+		this.menuId = menuId;
+	}
+	public String getWxpublicNo() {
+		return wxpublicNo;
+	}
+	public void setWxpublicNo(String wxpublicNo) {
+		this.wxpublicNo = wxpublicNo;
+	}
+	public String getMenuName() {
+		return menuName;
+	}
+	public void setMenuName(String menuName) {
+		this.menuName = menuName;
+	}
+	public Long getOrderNo() {
+		return orderNo;
+	}
+	public void setOrderNo(Long orderNo) {
+		this.orderNo = orderNo;
+	}
+	public Long getParentMenuId() {
+		return parentMenuId;
+	}
+	public void setParentMenuId(Long parentMenuId) {
+		this.parentMenuId = parentMenuId;
+	}
+	public String getMenuType() {
+		return menuType;
+	}
+	public void setMenuType(String menuType) {
+		this.menuType = menuType;
+	}
+	public String getUrl() {
+		return url;
+	}
+	public void setUrl(String url) {
+		this.url = url;
+	}
+	public Date getOpTime() {
+		return opTime;
+	}
+	public void setOpTime(Date opTime) {
+		this.opTime = opTime;
+	}
+	public String getVchar1() {
+		return vchar1;
+	}
+	public void setVchar1(String vchar1) {
+		this.vchar1 = vchar1;
+	}
+	public String getVchar2() {
+		return vchar2;
+	}
+	public void setVchar2(String vchar2) {
+		this.vchar2 = vchar2;
+	}
+	public String getVchar3() {
+		return vchar3;
+	}
+	public void setVchar3(String vchar3) {
+		this.vchar3 = vchar3;
+	}
+	public String getVchar4() {
+		return vchar4;
+	}
+	public void setVchar4(String vchar4) {
+		this.vchar4 = vchar4;
+	}
+    
+}

+ 109 - 0
wechat-common-core/src/main/java/com/iamberry/wechat/core/entity/wx/MenuKeySet.java

@@ -0,0 +1,109 @@
+package com.iamberry.wechat.core.entity.wx;
+
+import java.io.Serializable;
+import java.util.Date;
+
+public class MenuKeySet implements Serializable {
+	private static final long serialVersionUID = -3010375933951683234L;
+
+	private Long menuKeySetNo;
+    private String keyWord;
+    private String wxpublicNo;
+    private String reType;
+    private String refText;
+    private String refImageTextId;
+    private String refVedioId;
+    private Date createTime;
+    private Long menuId;
+    private String vchar1;
+    private String vchar2;
+    private String vchar3;
+    private String vchar4;
+    private String keyType;
+    
+	public Long getMenuKeySetNo() {
+		return menuKeySetNo;
+	}
+	public void setMenuKeySetNo(Long menuKeySetNo) {
+		this.menuKeySetNo = menuKeySetNo;
+	}
+	public String getKeyWord() {
+		return keyWord;
+	}
+	public void setKeyWord(String keyWord) {
+		this.keyWord = keyWord;
+	}
+	public String getWxpublicNo() {
+		return wxpublicNo;
+	}
+	public void setWxpublicNo(String wxpublicNo) {
+		this.wxpublicNo = wxpublicNo;
+	}
+	public String getReType() {
+		return reType;
+	}
+	public void setReType(String reType) {
+		this.reType = reType;
+	}
+	public String getRefText() {
+		return refText;
+	}
+	public void setRefText(String refText) {
+		this.refText = refText;
+	}
+	public String getRefImageTextId() {
+		return refImageTextId;
+	}
+	public void setRefImageTextId(String refImageTextId) {
+		this.refImageTextId = refImageTextId;
+	}
+	public String getRefVedioId() {
+		return refVedioId;
+	}
+	public void setRefVedioId(String refVedioId) {
+		this.refVedioId = refVedioId;
+	}
+	public Date getCreateTime() {
+		return createTime;
+	}
+	public void setCreateTime(Date createTime) {
+		this.createTime = createTime;
+	}
+	public Long getMenuId() {
+		return menuId;
+	}
+	public void setMenuId(Long menuId) {
+		this.menuId = menuId;
+	}
+	public String getVchar1() {
+		return vchar1;
+	}
+	public void setVchar1(String vchar1) {
+		this.vchar1 = vchar1;
+	}
+	public String getVchar2() {
+		return vchar2;
+	}
+	public void setVchar2(String vchar2) {
+		this.vchar2 = vchar2;
+	}
+	public String getVchar3() {
+		return vchar3;
+	}
+	public void setVchar3(String vchar3) {
+		this.vchar3 = vchar3;
+	}
+	public String getVchar4() {
+		return vchar4;
+	}
+	public void setVchar4(String vchar4) {
+		this.vchar4 = vchar4;
+	}
+	public String getKeyType() {
+		return keyType;
+	}
+	public void setKeyType(String keyType) {
+		this.keyType = keyType;
+	}
+    
+}

+ 52 - 0
wechat-common-core/src/main/java/com/iamberry/wechat/core/entity/wx/Music.java

@@ -0,0 +1,52 @@
+package com.iamberry.wechat.core.entity.wx;
+
+/**
+ * 音乐model
+ * 
+ * @author fzh
+ */
+public class Music  implements java.io.Serializable{
+
+	private static final long serialVersionUID = -8985013794162389571L;
+	// 音乐名称
+	private String Title;
+	// 音乐描述
+	private String Description;
+	// 音乐链接
+	private String MusicUrl;
+	// 高质量音乐链接,WIFI环境优先使用该链接播放音乐
+	private String HQMusicUrl;
+
+	public String getTitle() {
+		return Title;
+	}
+
+	public void setTitle(String title) {
+		Title = title;
+	}
+
+	public String getDescription() {
+		return Description;
+	}
+
+	public void setDescription(String description) {
+		Description = description;
+	}
+
+	public String getMusicUrl() {
+		return MusicUrl;
+	}
+
+	public void setMusicUrl(String musicUrl) {
+		MusicUrl = musicUrl;
+	}
+
+	public String getHQMusicUrl() {
+		return HQMusicUrl;
+	}
+
+	public void setHQMusicUrl(String musicUrl) {
+		HQMusicUrl = musicUrl;
+	}
+
+}

+ 21 - 0
wechat-common-core/src/main/java/com/iamberry/wechat/core/entity/wx/MusicMessage.java

@@ -0,0 +1,21 @@
+package com.iamberry.wechat.core.entity.wx;
+
+/**
+ * 音乐消息
+ * 
+ * @author fzh
+ */
+public class MusicMessage extends BaseMessage  implements java.io.Serializable{
+
+	private static final long serialVersionUID = -3037637454072225241L;
+	// 音乐
+	private Music Music;
+
+	public Music getMusic() {
+		return Music;
+	}
+
+	public void setMusic(Music music) {
+		Music = music;
+	}
+}

+ 32 - 0
wechat-common-core/src/main/java/com/iamberry/wechat/core/entity/wx/NewsMessage.java

@@ -0,0 +1,32 @@
+package com.iamberry.wechat.core.entity.wx;
+
+import java.util.List;
+
+/**
+ * 文本消息
+ * 
+ * @author fzh
+ */
+public class NewsMessage extends BaseMessage  implements java.io.Serializable{
+	private static final long serialVersionUID = -6468821295579642763L;
+	// 图文消息个数,限制为10条以内
+	private int ArticleCount;
+	// 多条图文消息信息,默认第一个item为大图
+	private List<Article> Articles;
+
+	public int getArticleCount() {
+		return ArticleCount;
+	}
+
+	public void setArticleCount(int articleCount) {
+		ArticleCount = articleCount;
+	}
+
+	public List<Article> getArticles() {
+		return Articles;
+	}
+
+	public void setArticles(List<Article> articles) {
+		Articles = articles;
+	}
+}

+ 29 - 0
wechat-common-core/src/main/java/com/iamberry/wechat/core/entity/wx/PagingDTO.java

@@ -0,0 +1,29 @@
+package com.iamberry.wechat.core.entity.wx;
+
+public class PagingDTO  implements java.io.Serializable{
+
+	private static final long serialVersionUID = 1491485677672366691L;
+	private String wxPublicNo;
+	private int pageNo;
+	private int selectNum;
+	public String getWxPublicNo() {
+		return wxPublicNo;
+	}
+	public void setWxPublicNo(String wxPublicNo) {
+		this.wxPublicNo = wxPublicNo;
+	}
+	public int getPageNo() {
+		return pageNo;
+	}
+	public void setPageNo(int pageNo) {
+		this.pageNo = pageNo;
+	}
+	public int getSelectNum() {
+		return selectNum;
+	}
+	public void setSelectNum(int selectNum) {
+		this.selectNum = selectNum;
+	}
+	
+	
+}

+ 30 - 0
wechat-common-core/src/main/java/com/iamberry/wechat/core/entity/wx/QRCJson.java

@@ -0,0 +1,30 @@
+package com.iamberry.wechat.core.entity.wx;
+
+public class QRCJson  implements java.io.Serializable{
+
+	private static final long serialVersionUID = -7364608710007647457L;
+	private String url;			  //二维码图片解析后的地址
+	private String ticket;		  //二维码ticket
+	private String expire_seconds;//二维码的有效时间
+	
+	public String getUrl() {
+		return url;
+	}
+	public void setUrl(String url) {
+		this.url = url;
+	}
+	public String getTicket() {
+		return ticket;
+	}
+	public void setTicket(String ticket) {
+		this.ticket = ticket;
+	}
+	public String getExpire_seconds() {
+		return expire_seconds;
+	}
+	public void setExpire_seconds(String expire_seconds) {
+		this.expire_seconds = expire_seconds;
+	}
+	
+	
+}

+ 54 - 0
wechat-common-core/src/main/java/com/iamberry/wechat/core/entity/wx/Rewards.java

@@ -0,0 +1,54 @@
+package com.iamberry.wechat.core.entity.wx;
+
+import java.io.Serializable;
+
+public class Rewards implements Serializable{
+
+	/**
+	 * 返现到账通知
+	 */
+	private static final long serialVersionUID = -7695421790343688668L;
+	private String first;//标题内容
+	private String order;//订单编号
+	private String money;//奖励金额
+	private String remark;//引导性文字
+	private String url;//跳转地址
+	public String getFirst() {
+		return first;
+	}
+	public void setFirst(String first) {
+		this.first = first;
+	}
+	public String getOrder() {
+		return order;
+	}
+	public void setOrder(String order) {
+		this.order = order;
+	}
+	public 	String getMoney() {
+		return money;
+	}
+	public void setMoney(String money) {
+		this.money = money;
+	}
+	public String getRemark() {
+		return remark;
+	}
+	public void setRemark(String remark) {
+		this.remark = remark;
+	}
+	public static long getSerialversionuid() {
+		return serialVersionUID;
+	}
+	public String getUrl() {
+		return url;
+	}
+	public void setUrl(String url) {
+		this.url = url;
+	}
+	@Override
+	public String toString() {
+		return "Rewards [first=" + first + ", order=" + order + ", money=" + money
+				+ ", remark=" + remark + "]";
+	}
+}

+ 54 - 0
wechat-common-core/src/main/java/com/iamberry/wechat/core/entity/wx/Shipment.java

@@ -0,0 +1,54 @@
+package com.iamberry.wechat.core.entity.wx;
+
+import java.io.Serializable;
+
+public class Shipment implements Serializable{
+	/**
+	 * 订单包裹跟踪通知
+	 */
+	private static final long serialVersionUID = 8672595174428716146L;
+	private String first;//标题
+	private String order_id;//订单号
+	private String package_id;//包裹单号
+	private String remark;//引导性文字
+	private String url;
+	public String getFirst() {
+		return first;
+	}
+	public void setFirst(String first) {
+		this.first = first;
+	}
+	public String getOrder_id() {
+		return order_id;
+	}
+	public void setOrder_id(String order_id) {
+		this.order_id = order_id;
+	}
+	public String getPackage_id() {
+		return package_id;
+	}
+	public void setPackage_id(String package_id) {
+		this.package_id = package_id;
+	}
+	public String getRemark() {
+		return remark;
+	}
+	public void setRemark(String remark) {
+		this.remark = remark;
+	}
+	public String getUrl() {
+		return url;
+	}
+	public void setUrl(String url) {
+		this.url = url;
+	}
+	public static long getSerialversionuid() {
+		return serialVersionUID;
+	}
+	@Override
+	public String toString() {
+		return "Income [first=" + first + ", order_id=" + order_id + ", package_id=" + package_id + ", remark=" + remark
+				+ "]";
+	}
+	
+}

+ 26 - 0
wechat-common-core/src/main/java/com/iamberry/wechat/core/entity/wx/Status.java

@@ -0,0 +1,26 @@
+package com.iamberry.wechat.core.entity.wx;
+
+public class Status  implements java.io.Serializable{
+
+	private static final long serialVersionUID = 8961586485978957842L;
+
+	private boolean flag;
+	
+	private String countext;
+
+	public boolean isFlag() {
+		return flag;
+	}
+
+	public void setFlag(boolean flag) {
+		this.flag = flag;
+	}
+
+	public String getCountext() {
+		return countext;
+	}
+
+	public void setCountext(String countext) {
+		this.countext = countext;
+	}
+}

+ 20 - 0
wechat-common-core/src/main/java/com/iamberry/wechat/core/entity/wx/TextMessage.java

@@ -0,0 +1,20 @@
+package com.iamberry.wechat.core.entity.wx;
+
+/**
+ * 文本消息
+ * 
+ * @author fzh
+ */
+public class TextMessage extends BaseMessage  implements java.io.Serializable{
+	private static final long serialVersionUID = -1647730152840479763L;
+	// 消息内容
+	private String Content;
+
+	public String getContent() {
+		return Content;
+	}
+
+	public void setContent(String content) {
+		Content = content;
+	}
+}

+ 23 - 0
wechat-common-core/src/main/java/com/iamberry/wechat/core/entity/wx/Ticket.java

@@ -0,0 +1,23 @@
+package com.iamberry.wechat.core.entity.wx;
+
+public class Ticket  implements java.io.Serializable{
+
+	private static final long serialVersionUID = 1140503848164890345L;
+	private String ticket;//获取到的凭证
+	private int expiresIn;//凭证有效时间,单位:秒
+	
+	public String getTicket() {
+		return ticket;
+	}
+	public void setTicket(String ticket) {
+		this.ticket = ticket;
+	}
+	public int getExpiresIn() {
+		return expiresIn;
+	}
+	public void setExpiresIn(int expiresIn) {
+		this.expiresIn = expiresIn;
+	}
+	
+	
+}

+ 46 - 0
wechat-common-core/src/main/java/com/iamberry/wechat/core/entity/wx/Token.java

@@ -0,0 +1,46 @@
+package com.iamberry.wechat.core.entity.wx;
+
+import java.util.Date;
+
+/**
+ * accessToken保存时间
+ * @author Administrator
+ *
+ */
+public class Token  implements java.io.Serializable{
+
+	private static final long serialVersionUID = 8948377487525030011L;
+	private String tokenId;
+	private String token;
+	private Date endDate;
+	private String appid;
+	public String getTokenId() {
+		return tokenId;
+	}
+	public void setTokenId(String tokenId) {
+		this.tokenId = tokenId;
+	}
+	public String getToken() {
+		return token;
+	}
+	public void setToken(String token) {
+		this.token = token;
+	}
+	public Date getEndDate() {
+		return endDate;
+	}
+	public void setEndDate(Date endDate) {
+		this.endDate = endDate;
+	}
+	public String getAppid() {
+		return appid;
+	}
+	public void setAppid(String appid) {
+		this.appid = appid;
+	}
+	@Override
+	public String toString() {
+		return "Token [tokenId=" + tokenId + ", token=" + token + ", endDate="
+				+ endDate + "]";
+	}
+}

+ 14 - 0
wechat-common-core/src/main/java/com/iamberry/wechat/core/entity/wx/TransInfo.java

@@ -0,0 +1,14 @@
+package com.iamberry.wechat.core.entity.wx;
+
+public class TransInfo  implements java.io.Serializable{
+	private static final long serialVersionUID = 3170722494465255131L;
+	private String KfAccount;
+
+	public String getKfAccount() {
+		return KfAccount;
+	}
+
+	public void setKfAccount(String kfAccount) {
+		KfAccount = kfAccount;
+	}
+}

+ 53 - 0
wechat-common-core/src/main/java/com/iamberry/wechat/core/entity/wx/TransferCustomer.java

@@ -0,0 +1,53 @@
+package com.iamberry.wechat.core.entity.wx;
+
+
+/**
+ * 消息基类(公众帐号 -> 普通用户)
+ * 
+ * @author fzh
+ */
+public class TransferCustomer  implements java.io.Serializable{
+	private static final long serialVersionUID = -8361715544635046272L;
+	// 接收方帐号(收到的OpenID)
+	private String ToUserName;
+	// 开发者微信号
+	private String FromUserName;
+	// 消息创建时间 (整型)
+	private long CreateTime;
+	// 消息类型(text/music/news)
+	private String MsgType;
+	private TransInfo TransInfo;
+	
+	public TransInfo getTransInfo() {
+		return TransInfo;
+	}
+	public void setTransInfo(TransInfo TransInfo) {
+		this.TransInfo = TransInfo;
+	}
+	public String getToUserName() {
+		return ToUserName;
+	}
+	public void setToUserName(String toUserName) {
+		ToUserName = toUserName;
+	}
+	public String getFromUserName() {
+		return FromUserName;
+	}
+	public void setFromUserName(String fromUserName) {
+		FromUserName = fromUserName;
+	}
+	public long getCreateTime() {
+		return CreateTime;
+	}
+	public void setCreateTime(long createTime) {
+		CreateTime = createTime;
+	}
+	public String getMsgType() {
+		return MsgType;
+	}
+	public void setMsgType(String msgType) {
+		MsgType = msgType;
+	}
+	
+
+}

+ 107 - 0
wechat-common-core/src/main/java/com/iamberry/wechat/core/entity/wx/WechatShare.java

@@ -0,0 +1,107 @@
+package com.iamberry.wechat.core.entity.wx;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * @company	深圳爱贝源科技有限公司
+ * @website www.iamberry.com
+ * @author 	献
+ * @tel		18271840547
+ * @date	2016年9月8日
+ * @explain	微信分享统计
+ */
+public class WechatShare implements Serializable {
+
+	private static final long serialVersionUID = -7845102182997480304L;
+
+	private Integer shareID;						// ID
+	
+	private String shareUrl;						// URL
+	
+	private Integer shareUrlHash;					// url的伪hash
+	
+	private String shareTitle;						// 标题
+	
+	private String shareDesc;						// 分享简介
+	
+	private Integer shareDataNum;					// 获取数据的次数
+	
+	private Integer shareNum;						// 分享数据
+	
+	private Date shareEndDate;						// 此url最后的分享时间
+	
+	private Date shareCreateDate;					// 创建时间
+
+	public Integer getShareID() {
+		return shareID;
+	}
+
+	public void setShareID(Integer shareID) {
+		this.shareID = shareID;
+	}
+
+	public String getShareUrl() {
+		return shareUrl;
+	}
+
+	public void setShareUrl(String shareUrl) {
+		this.shareUrl = shareUrl;
+	}
+
+	public Integer getShareUrlHash() {
+		return shareUrlHash;
+	}
+
+	public void setShareUrlHash(Integer shareUrlHash) {
+		this.shareUrlHash = shareUrlHash;
+	}
+
+	public String getShareTitle() {
+		return shareTitle;
+	}
+
+	public void setShareTitle(String shareTitle) {
+		this.shareTitle = shareTitle;
+	}
+
+	public String getShareDesc() {
+		return shareDesc;
+	}
+
+	public void setShareDesc(String shareDesc) {
+		this.shareDesc = shareDesc;
+	}
+
+	public Integer getShareDataNum() {
+		return shareDataNum;
+	}
+
+	public void setShareDataNum(Integer shareDataNum) {
+		this.shareDataNum = shareDataNum;
+	}
+
+	public Integer getShareNum() {
+		return shareNum;
+	}
+
+	public void setShareNum(Integer shareNum) {
+		this.shareNum = shareNum;
+	}
+
+	public Date getShareEndDate() {
+		return shareEndDate;
+	}
+
+	public void setShareEndDate(Date shareEndDate) {
+		this.shareEndDate = shareEndDate;
+	}
+
+	public Date getShareCreateDate() {
+		return shareCreateDate;
+	}
+
+	public void setShareCreateDate(Date shareCreateDate) {
+		this.shareCreateDate = shareCreateDate;
+	}
+}

+ 85 - 0
wechat-common-core/src/main/java/com/iamberry/wechat/core/entity/wx/WxPayDto.java

@@ -0,0 +1,85 @@
+package com.iamberry.wechat.core.entity.wx;
+public class WxPayDto  implements java.io.Serializable{
+
+	private static final long serialVersionUID = 8449616227532352263L;
+	private String orderId;//订单号
+	private String totalFee;//金额
+	private String spbillCreateIp;//订单生成的机器 IP
+	private String notifyUrl;//这里notify_url是 支付完成后微信发给该链接信息,可以判断会员是否支付成功,改变订单状态等
+	private String body;// 商品描述根据情况修改
+	private String openId;//微信用户对一个公众号唯一
+	
+	/**
+	 * @return the orderId
+	 */
+	public String getOrderId() {
+		return orderId;
+	}
+	/**
+	 * @param orderId the orderId to set
+	 */
+	public void setOrderId(String orderId) {
+		this.orderId = orderId;
+	}
+	/**
+	 * @return the totalFee
+	 */
+	public String getTotalFee() {
+		return totalFee;
+	}
+	/**
+	 * @param totalFee the totalFee to set
+	 */
+	public void setTotalFee(String totalFee) {
+		this.totalFee = totalFee;
+	}
+	/**
+	 * @return the spbillCreateIp
+	 */
+	public String getSpbillCreateIp() {
+		return spbillCreateIp;
+	}
+	/**
+	 * @param spbillCreateIp the spbillCreateIp to set
+	 */
+	public void setSpbillCreateIp(String spbillCreateIp) {
+		this.spbillCreateIp = spbillCreateIp;
+	}
+	/**
+	 * @return the notifyUrl
+	 */
+	public String getNotifyUrl() {
+		return notifyUrl;
+	}
+	/**
+	 * @param notifyUrl the notifyUrl to set
+	 */
+	public void setNotifyUrl(String notifyUrl) {
+		this.notifyUrl = notifyUrl;
+	}
+	/**
+	 * @return the body
+	 */
+	public String getBody() {
+		return body;
+	}
+	/**
+	 * @param body the body to set
+	 */
+	public void setBody(String body) {
+		this.body = body;
+	}
+	/**
+	 * @return the openId
+	 */
+	public String getOpenId() {
+		return openId;
+	}
+	/**
+	 * @param openId the openId to set
+	 */
+	public void setOpenId(String openId) {
+		this.openId = openId;
+	}
+	
+}

+ 233 - 0
wechat-common-core/src/main/java/com/iamberry/wechat/core/entity/wx/WxPayResult.java

@@ -0,0 +1,233 @@
+package com.iamberry.wechat.core.entity.wx;
+
+/**
+ * description: 微信支付回调
+ * @author 
+ * @since 
+ * @see
+ */
+public class WxPayResult  implements java.io.Serializable{
+
+	private String attach;
+	private String appid;
+	private String bankType;
+	private String cashFee;
+	private String feeType;
+	private String isSubscribe;
+	private String mchId;
+	private String nonceStr;
+	private String openid;
+	private String outTradeNo;
+	private String resultCode;
+	private String returnCode;
+	private String sign;
+	private String timeEnd;
+	private String totalFee;
+	private String tradeType;
+	private String transactionId;
+   
+	
+	/**
+	 * 
+	 */
+	private static final long serialVersionUID = -1227026039888867970L;
+	
+	public String getAttach() {
+		return attach;
+	}
+	public void setAttach(String attach) {
+		this.attach = attach;
+	}
+	/**
+	 * @return the appid
+	 */
+	public String getAppid() {
+		return appid;
+	}
+	/**
+	 * @param appid the appid to set
+	 */
+	public void setAppid(String appid) {
+		this.appid = appid;
+	}
+	/**
+	 * @return the bankType
+	 */
+	public String getBankType() {
+		return bankType;
+	}
+	/**
+	 * @param bankType the bankType to set
+	 */
+	public void setBankType(String bankType) {
+		this.bankType = bankType;
+	}
+	/**
+	 * @return the cashFee
+	 */
+	public String getCashFee() {
+		return cashFee;
+	}
+	/**
+	 * @param cashFee the cashFee to set
+	 */
+	public void setCashFee(String cashFee) {
+		this.cashFee = cashFee;
+	}
+	/**
+	 * @return the feeType
+	 */
+	public String getFeeType() {
+		return feeType;
+	}
+	/**
+	 * @param feeType the feeType to set
+	 */
+	public void setFeeType(String feeType) {
+		this.feeType = feeType;
+	}
+	/**
+	 * @return the isSubscribe
+	 */
+	public String getIsSubscribe() {
+		return isSubscribe;
+	}
+	/**
+	 * @param isSubscribe the isSubscribe to set
+	 */
+	public void setIsSubscribe(String isSubscribe) {
+		this.isSubscribe = isSubscribe;
+	}
+	/**
+	 * @return the mchId
+	 */
+	public String getMchId() {
+		return mchId;
+	}
+	/**
+	 * @param mchId the mchId to set
+	 */
+	public void setMchId(String mchId) {
+		this.mchId = mchId;
+	}
+	/**
+	 * @return the nonceStr
+	 */
+	public String getNonceStr() {
+		return nonceStr;
+	}
+	/**
+	 * @param nonceStr the nonceStr to set
+	 */
+	public void setNonceStr(String nonceStr) {
+		this.nonceStr = nonceStr;
+	}
+	/**
+	 * @return the openid
+	 */
+	public String getOpenid() {
+		return openid;
+	}
+	/**
+	 * @param openid the openid to set
+	 */
+	public void setOpenid(String openid) {
+		this.openid = openid;
+	}
+	/**
+	 * @return the outTradeNo
+	 */
+	public String getOutTradeNo() {
+		return outTradeNo;
+	}
+	/**
+	 * @param outTradeNo the outTradeNo to set
+	 */
+	public void setOutTradeNo(String outTradeNo) {
+		this.outTradeNo = outTradeNo;
+	}
+	/**
+	 * @return the resultCode
+	 */
+	public String getResultCode() {
+		return resultCode;
+	}
+	/**
+	 * @param resultCode the resultCode to set
+	 */
+	public void setResultCode(String resultCode) {
+		this.resultCode = resultCode;
+	}
+	/**
+	 * @return the returnCode
+	 */
+	public String getReturnCode() {
+		return returnCode;
+	}
+	/**
+	 * @param returnCode the returnCode to set
+	 */
+	public void setReturnCode(String returnCode) {
+		this.returnCode = returnCode;
+	}
+	/**
+	 * @return the sign
+	 */
+	public String getSign() {
+		return sign;
+	}
+	/**
+	 * @param sign the sign to set
+	 */
+	public void setSign(String sign) {
+		this.sign = sign;
+	}
+	/**
+	 * @return the timeEnd
+	 */
+	public String getTimeEnd() {
+		return timeEnd;
+	}
+	/**
+	 * @param timeEnd the timeEnd to set
+	 */
+	public void setTimeEnd(String timeEnd) {
+		this.timeEnd = timeEnd;
+	}
+	/**
+	 * @return the totalFee
+	 */
+	public String getTotalFee() {
+		return totalFee;
+	}
+	/**
+	 * @param totalFee the totalFee to set
+	 */
+	public void setTotalFee(String totalFee) {
+		this.totalFee = totalFee;
+	}
+	/**
+	 * @return the tradeType
+	 */
+	public String getTradeType() {
+		return tradeType;
+	}
+	/**
+	 * @param tradeType the tradeType to set
+	 */
+	public void setTradeType(String tradeType) {
+		this.tradeType = tradeType;
+	}
+	/**
+	 * @return the transactionId
+	 */
+	public String getTransactionId() {
+		return transactionId;
+	}
+	/**
+	 * @param transactionId the transactionId to set
+	 */
+	public void setTransactionId(String transactionId) {
+		this.transactionId = transactionId;
+	}
+}

+ 86 - 0
wechat-common-core/src/main/java/com/iamberry/wechat/core/entity/wx/WxPrepayIdErrorResult.java

@@ -0,0 +1,86 @@
+package com.iamberry.wechat.core.entity.wx;
+/**
+ * description: 获取预支付id时数据封装
+ * @author 何秀刚
+ * createDate:
+ */
+public class WxPrepayIdErrorResult implements java.io.Serializable {
+
+	private static final long serialVersionUID = -3300034496856615458L;
+	//返回状态码
+	private String return_code;
+	//状态说明
+	private String return_msg;
+	//appid
+	private String appid;
+	//商户号
+	private String mch_id;
+	// nonce_str
+	private String nonce_str;
+	private String sign;
+	private String result_code;
+	private String err_code;
+	private String err_code_des;
+	public String getReturn_code() {
+		return return_code;
+	}
+	public void setReturn_code(String return_code) {
+		this.return_code = return_code;
+	}
+	public String getReturn_msg() {
+		return return_msg;
+	}
+	public void setReturn_msg(String return_msg) {
+		this.return_msg = return_msg;
+	}
+	public String getAppid() {
+		return appid;
+	}
+	public void setAppid(String appid) {
+		this.appid = appid;
+	}
+	public String getMch_id() {
+		return mch_id;
+	}
+	public void setMch_id(String mch_id) {
+		this.mch_id = mch_id;
+	}
+	public String getNonce_str() {
+		return nonce_str;
+	}
+	public void setNonce_str(String nonce_str) {
+		this.nonce_str = nonce_str;
+	}
+	public String getSign() {
+		return sign;
+	}
+	public void setSign(String sign) {
+		this.sign = sign;
+	}
+	public String getResult_code() {
+		return result_code;
+	}
+	public void setResult_code(String result_code) {
+		this.result_code = result_code;
+	}
+	public String getErr_code() {
+		return err_code;
+	}
+	public void setErr_code(String err_code) {
+		this.err_code = err_code;
+	}
+	public String getErr_code_des() {
+		return err_code_des;
+	}
+	public void setErr_code_des(String err_code_des) {
+		this.err_code_des = err_code_des;
+	}
+	@Override
+	public String toString() {
+		return "WxPrepayIdErrorResult [return_code=" + return_code
+				+ ", return_msg=" + return_msg + ", appid=" + appid
+				+ ", mch_id=" + mch_id + ", nonce_str=" + nonce_str + ", sign="
+				+ sign + ", result_code=" + result_code + ", err_code="
+				+ err_code + ", err_code_des=" + err_code_des + "]";
+	}
+}

+ 49 - 0
wechat-common-core/src/main/java/com/iamberry/wechat/core/entity/wx/ZTreeBean.java

@@ -0,0 +1,49 @@
+package com.iamberry.wechat.core.entity.wx;
+
+public class ZTreeBean  implements java.io.Serializable{
+	private static final long serialVersionUID = 1347446270830031381L;
+	private String id;
+	private String pid;
+	private String name;
+	private String url;
+	private String type;
+	private String content;
+	
+	public String getId() {
+		return id;
+	}
+	public void setId(String id) {
+		this.id = id;
+	}
+	public String getPid() {
+		return pid;
+	}
+	public void setPid(String pid) {
+		this.pid = pid;
+	}
+	public String getName() {
+		return name;
+	}
+	public void setName(String name) {
+		this.name = name;
+	}
+	public String getUrl() {
+		return url;
+	}
+	public void setUrl(String url) {
+		this.url = url;
+	}
+	public String getType() {
+		return type;
+	}
+	public void setType(String type) {
+		this.type = type;
+	}
+	public String getContent() {
+		return content;
+	}
+	public void setContent(String content) {
+		this.content = content;
+	}
+	
+}

+ 36 - 0
wechat-common-core/src/main/java/com/iamberry/wechat/service/task/dto/TaskDto.java

@@ -0,0 +1,36 @@
+package com.iamberry.wechat.service.task.dto;
+
+import java.io.Serializable;
+
+/**
+ * @company	深圳爱贝源科技有限公司
+ * @website www.iamberry.com
+ * @author 	献
+ * @tel		18271840547
+ * @date	2016年9月20日
+ * @explain
+ */
+public class TaskDto implements Serializable {
+
+	private static final long serialVersionUID = -3449915303167929644L;
+
+	private String openID;						// openid
+	
+	private int count;							// 销售次数
+
+	public String getOpenID() {
+		return openID;
+	}
+
+	public void setOpenID(String openID) {
+		this.openID = openID;
+	}
+
+	public int getCount() {
+		return count;
+	}
+
+	public void setCount(int count) {
+		this.count = count;
+	}
+}

+ 425 - 0
wechat-common-core/src/main/java/com/iamberry/wechat/tools/SendMessageUtil.java

@@ -0,0 +1,425 @@
+package com.iamberry.wechat.tools;
+
+import java.util.HashMap;
+
+import org.springframework.stereotype.Component;
+
+import com.iamberry.wechat.tools.NameUtils;
+import com.iamberry.wechat.tools.ResultInfo;
+import com.iamberry.wechat.tools.WeixinUtil;
+
+@Component
+public class SendMessageUtil {
+		
+		//快递公司列表
+		public static HashMap<String, String> hashmap = new HashMap<String, String>();
+		//正式环境
+		{
+			hashmap.put("sto", "申通快递");
+			hashmap.put("yto", "圆通快递");
+			hashmap.put("sf", "顺丰快递");
+			hashmap.put("longbanwuliu", "龙邦快递");
+			hashmap.put("ems", "邮政EMS");
+			hashmap.put("zto", "中通快递");
+			hashmap.put("zjs", "宅急送");
+			hashmap.put("yunda", "韵达快递");
+			hashmap.put("cces", "cces快递");
+			hashmap.put("pick", "上门提货");
+			hashmap.put("htky", "汇通快递");
+			hashmap.put("ttkdex", "天天快递");
+			hashmap.put("stars", "邮政EMS");
+			hashmap.put("jd", "星晨急便");
+			hashmap.put("01", "其他");
+			hashmap.put("02", "上门送货");
+		}
+		
+		/**
+		 * 发送模板通知给用户
+		 * @param date data 日期
+		 * @param openId 接受的用户id
+		 * @param url  点击打开的url
+		 * @param type 发送类型 1,收益成功通知 2,发货提醒通知 3、收入提醒通知,4、订单未支付通知 5、试用进度提醒
+		 * @return
+		 */
+		public boolean sendTemplateMessageToOpenid(String date,String openId, String url,Integer type) {
+			boolean result = false;
+			switch (type) {
+			case 4:  //4、订单未支付通知
+				WeixinUtil.sendTemplateMessage(NameUtils.getConfig("appId"), NameUtils.getConfig("appSecret"), openId, ResultInfo.Order_template_id, date, url);
+				break;
+			case 8:  //8、订单支付成功
+				WeixinUtil.sendTemplateMessage(NameUtils.getConfig("appId"), NameUtils.getConfig("appSecret"), openId, ResultInfo.probation_pay_success, date, url);
+				break;
+			case 9:  //9、订单关闭成功
+				WeixinUtil.sendTemplateMessage(NameUtils.getConfig("appId"), NameUtils.getConfig("appSecret"), openId, ResultInfo.probation_shut_down, date, url);
+				break;
+			case 11:  //11、服务进度
+				WeixinUtil.sendTemplateMessage(NameUtils.getConfig("appId"), NameUtils.getConfig("appSecret"), openId, ResultInfo.update_tooth_hint, date, url);
+				break;
+			case 12:  //12、用户申请退款提醒
+				WeixinUtil.sendTemplateMessage(NameUtils.getConfig("appId"), NameUtils.getConfig("appSecret"), openId, ResultInfo.order_apply_refund, date, url);
+				break;
+			case 13:  //13、用户 申请退货 提醒
+				WeixinUtil.sendTemplateMessage(NameUtils.getConfig("appId"), NameUtils.getConfig("appSecret"), openId, ResultInfo.order_apply_return, date, url);
+				break;
+			case 14:  //14、用户 申请换货 提醒
+				WeixinUtil.sendTemplateMessage(NameUtils.getConfig("appId"), NameUtils.getConfig("appSecret"), openId, ResultInfo.order_apply_barter, date, url);
+				break;
+			case 15:  //15、发货后 提醒
+				WeixinUtil.sendTemplateMessage(NameUtils.getConfig("appId"), NameUtils.getConfig("appSecret"), openId, ResultInfo.order_send_success, date, url);
+				break;
+			case 16:  //16、退款申请驳回
+				WeixinUtil.sendTemplateMessage(NameUtils.getConfig("appId"), NameUtils.getConfig("appSecret"), openId, ResultInfo.refund_to_dismiss, date, url);
+				break;
+			case 17:  //17、退款申请通知
+				WeixinUtil.sendTemplateMessage(NameUtils.getConfig("appId"), NameUtils.getConfig("appSecret"), openId, ResultInfo.refund_application_notice, date, url);
+				break;
+			case 18:  //18、购买失败
+				WeixinUtil.sendTemplateMessage(NameUtils.getConfig("appId"), NameUtils.getConfig("appSecret"), openId, ResultInfo.refund_application_notice, date, url);
+				break;
+			case 19:  //19、首次注册推送信息
+				WeixinUtil.sendTemplateMessage(NameUtils.getConfig("appId"), NameUtils.getConfig("appSecret"), openId, ResultInfo.registered_template, date, url);
+				break;
+			case 20:  //20、生日赠送积分推送
+				WeixinUtil.sendTemplateMessage(NameUtils.getConfig("appId"), NameUtils.getConfig("appSecret"), openId, ResultInfo.birthday_template, date, url);
+				break;
+			case 21:  //21参与成功
+				WeixinUtil.sendTemplateMessage(NameUtils.getConfig("appId"), NameUtils.getConfig("appSecret"), openId, ResultInfo.participate_in_success, date, url);
+				break;
+			case 22:  //积分变更
+				WeixinUtil.sendTemplateMessage(NameUtils.getConfig("appId"), NameUtils.getConfig("appSecret"), openId, ResultInfo.point_change, date, url);
+				break;
+			case 23:  //生日赠送
+				WeixinUtil.sendTemplateMessage(NameUtils.getConfig("appId"), NameUtils.getConfig("appSecret"), openId, ResultInfo.birthday_gift, date, url);
+				break;
+			default:
+				break;
+			}
+			result = true;
+			return  result;
+		}
+
+		//基本样式:
+		//{"topcolor":"#173177","data":{"first":{"color":"#173177","value":"biaosti"},"keyword1":{"color":"#173177","value":"biaosti"},"keyword2":{"color":"#173177","value":"biaosti"},"keyword3":{"color":"#173177","value":"biaosti"},"keyword4":{"color":"#173177","value":"biaosti"},"remark":{"color":"#173177","value":"xx"}},"template_id":"EAHie4LJAWr82FfNiClPCr9zA4OEiiqvB2wINfUaT_k","touser":"oZ9pv02WMRQgyDVRY1a_daYecwHI","url":"https://s.iamberry.com/soodo/wechat/index.html"}
+
+		/*public static void main(String[] args) {
+//			String date = "{'first':{'color':'#173177', 'value':'尊敬的客户您好~您的订单已发货~'}, 'order_id':{'color':'#173177','value':'1009145345B11792L'}, 'package_id':{'color':'#173177','value':'yuantong:34234234'}, 'remark':{'color':'#173177', 'value':'点击进入商城查看-->>'}}";
+			String date = "{'name':{'color':'#173177','value':'上朵柔羽呵护刷头 (冰川蓝)'}, 'remark':{'color':'#173177','value':'您在soodo上朵购买的刷头未填写收货地址,为了尽快为您发货,麻烦您提供一下您的收货地址。(请您尽快在公众号联系客服人员)'}}";
+			String openId = "oZ9pv0_3_d3o7n7mye9R0WLZB8QA";
+			String appId = "wxdb090f0af89e0be3";// 应用ID
+			String appSecret = "518114a120274f625530750c1803921b";// 应用密钥
+
+			WeixinUtil.sendTemplateMessage(appId, appSecret, openId, "gnk9JaOkAaumN1qNUjxH5IHTjundAj_-O9_G531FpH4", date, "https://s.iamberry.com/soodo/wechat/index.html");
+			System.out.println("发送成功");
+
+//			SendMessageUtil sendMessageUtil = new SendMessageUtil();
+//			sendMessageUtil.failedPurchase("上朵柔羽呵护刷头 (冰川蓝)",
+//					"您在soodo上朵购买的刷头未填写收货地址,为了尽快为您发货,麻烦您提供一下您的收货地址。(请您尽快在公众号联系客服人员)","oZ9pv02WMRQgyDVRY1a_daYecwHI","https://s.iamberry.com/soodo/wechat/index.html");
+		}*/
+
+		public static void main(String[] args) {
+	//		{{first.DATA}}用户名:{{keyword1.DATA}}	活动主题:{{keyword2.DATA}}	活动时间:{{keyword3.DATA}}	活动地点:{{keyword4.DATA}}	{{remark.DATA}}
+			String date = "{'first':{'color':'#173177','value':'biaosti'},'keyword1':{'color':'#173177','value':'biaosti'},'keyword2':{'color':'#173177','value':'biaosti'},'keyword3':{'color':'#173177','value':'biaosti'},'keyword4':{'color':'#173177','value':'biaosti'}, 'remark':{'color':'#1C86EE','value':'xx'}}";
+			String openId = "oZ9pv02WMRQgyDVRY1a_daYecwHI";
+			String appId = "wxdb090f0af89e0be3";// 应用ID
+			String appSecret = "518114a120274f625530750c1803921b";// 应用密钥
+
+			WeixinUtil.sendTemplateMessage(appId, appSecret, openId, "EAHie4LJAWr82FfNiClPCr9zA4OEiiqvB2wINfUaT_k", date, "https://s.iamberry.com/soodo/wechat/index.html");
+			System.out.println("发送成功");
+		}
+
+
+
+//	public static void main(String[] args) {
+//		String date = "{'first':{'color':'#173177', 'value':'尊敬的客户您好~您的订单已发货~'}, 'order_id':{'color':'#173177','value':'1009145345B11792L'}, 'package_id':{'color':'#173177','value':'yuantong:34234234'}, 'remark':{'color':'#173177', 'value':'点击进入商城查看-->>'}}";
+//		String openId = "o-icas0dRzE7WYAEAmcX4BQCUyFo";
+//		String appId = "wxd995fb95b97ece1b";// 应用ID
+//		String appSecret = "34922854462fba23cf54ce859349fcf4";// 应用密钥
+//
+//		WeixinUtil.sendTemplateMessage(appId, appSecret, openId, "744KA1PdB1I5PzRcjtxqbEz5t2bp8vdsi4I2ytW1rbE", date, "xx");
+//		System.out.println("发送成功");
+//	}
+		
+
+		/**
+		 * 试用订单支付成功
+		 * @param first  标题
+		 * @param keyword1	支付金额
+		 * @param keyword2	商品信息
+		 * @param remark	全部内容
+		 * @param openId	用户openid
+		 * @param url	地址
+		 */
+		public void probationPaySuccess(String first,String keyword1,String keyword2,String remark,String openId,String url){
+			String temp = ResultInfo.PROBATIONPAYSUCCESS;
+			temp = temp.replaceFirst("firstValueIamberry", first)
+					.replaceFirst("orderMoneySumValue",keyword1)
+					.replaceFirst("orderProductNameValue",keyword2)
+					.replaceFirst("remarkValue",remark);
+			sendTemplateMessageToOpenid(temp, openId, url,8);
+		}
+		/**
+		 * 试用订单关闭成功
+		 * @param first  标题
+		 * @param keyword1	支付金额
+		 * @param keyword2	商品信息
+		 * @param remark	全部内容
+		 * @param openId	用户openid
+		 * @param url	地址
+		 */
+		public void probationShutDown(String first,String transid,String fee,String pay_time,String remark,String openId,String url){
+			String temp = ResultInfo.PROBATIONSHUTDOWN;
+			temp = temp.replaceFirst("firstValueIamberry", first)
+					.replaceFirst("transidValue",transid)
+					.replaceFirst("feeValue",fee)
+					.replaceFirst("pay_timeValue",pay_time)
+					.replaceFirst("remarkValue",remark);
+			sendTemplateMessageToOpenid(temp, openId, url,9);
+		}
+		
+
+	/**
+	 * 服务进度
+	 * @param first
+	 * @param keyword1
+	 * @param keyword2
+	 * @param remark
+	 * @param openId
+	 * @param url
+	 */
+	public void serviceProgress(String first,String keyword1,String keyword2,String remark,String openId,String url){
+		String temp = ResultInfo.UPDATETOOTHHINT;
+		temp = temp.replaceFirst("firstValueIamberry", first)
+				.replaceFirst("keyword1Value",keyword1)
+				.replaceFirst("keyword2Value",keyword2)
+				.replaceFirst("remarkValue",remark);
+		sendTemplateMessageToOpenid(temp, openId, url,11);
+	}
+
+	/**
+	 * 换货提醒信息
+	 * @param first
+	 * @param keyword1
+	 * @param keyword2
+	 * @param remark
+	 * @param openId
+	 * @param url
+	 */
+	public void orderApplyBarter(String first,String keyword1,String keyword2,String remark,String openId,String url){
+		String temp = ResultInfo.APPLYBARTER;
+		temp = temp.replaceFirst("firstValueIamberry", first)
+				.replaceFirst("keyword1Value",keyword1)
+				.replaceFirst("keyword2Value",keyword2)
+				.replaceFirst("colorValue","#1C86EE")
+				.replaceFirst("remarkValue",remark);
+		sendTemplateMessageToOpenid(temp, openId, url,14);
+	}
+
+	/**
+	 * 退款提醒信息
+	 * @param first
+	 * @param keyword1
+	 * @param keyword2
+	 * @param remark
+	 * @param openId
+	 * @param url
+	 */
+	public void orderApplyRefund(String first,String keyword1,String keyword2,String keyword3,String remark,String openId,String url){
+		String temp = ResultInfo.APPLYREFUND;
+		temp = temp.replaceFirst("firstValueIamberry", first)
+				.replaceFirst("keyword1Value",keyword1)
+				.replaceFirst("keyword2Value",keyword2)
+				.replaceFirst("keyword3Value",keyword3)
+				.replaceFirst("colorValue","#1C86EE")
+				.replaceFirst("remarkValue",remark);
+		sendTemplateMessageToOpenid(temp, openId, url,12);
+	}
+
+	/**
+	 * 退货提醒信息
+	 * @param first
+	 * @param keyword1
+	 * @param keyword2
+	 * @param remark
+	 * @param openId
+	 * @param url
+	 */
+	public void orderApplyReturn(String first,String keyword1,String keyword2,String keyword3,String keyword4,String remark,String openId,String url){
+		String temp = ResultInfo.APPLYRETURN;
+		temp = temp.replaceFirst("firstValueIamberry", first)
+				.replaceFirst("keyword1Value",keyword1)
+				.replaceFirst("keyword2Value",keyword2)
+				.replaceFirst("keyword3Value",keyword3)
+				.replaceFirst("keyword4Value",keyword4)
+				.replaceFirst("colorValue","#1C86EE")
+				.replaceFirst("remarkValue",remark);
+		sendTemplateMessageToOpenid(temp, openId, url,13);
+	}
+
+	/**
+	 * 发货提醒信息
+	 * @param first
+	 * @param keyword1
+	 * @param keyword2
+	 * @param remark
+	 * @param openId
+	 * @param url
+	 */
+	public void orderSendSuccess(String first,String keyword1,String keyword2,String keyword3,String keyword4,String remark,String openId,String url){
+		String temp = ResultInfo.SENDSUCCESS;
+		temp = temp.replaceFirst("firstValueIamberry", first)
+				.replaceFirst("keyword1Value",keyword1)
+				.replaceFirst("keyword2Value",keyword2)
+				.replaceFirst("keyword3Value",keyword3)
+				.replaceFirst("keyword4Value",keyword4)
+				.replaceFirst("colorValue","#1C86EE")
+				.replaceFirst("remarkValue",remark);
+		sendTemplateMessageToOpenid(temp, openId, url,15);
+	}
+
+	/**
+	 * 退款申请驳回
+	 * @param first
+	 * @param keyword1 退款金额
+	 * @param keyword2 商品详情
+	 * @param keyword3 订单编号
+	 * @param remark
+	 * @param openId
+	 * @param url
+	 */
+	public void refundToDismiss(String first,String keyword1,String keyword2,String keyword3,String remark,String openId,String url){
+		String temp = ResultInfo.REFUNDSPPLICATIONREJECTED;
+		temp = temp.replaceFirst("firstValueIamberry", first)
+				.replaceFirst("keyword1Value",keyword1)
+				.replaceFirst("keyword2Value",keyword2)
+				.replaceFirst("keyword3Value",keyword3)
+				.replaceFirst("colorValue","#1C86EE")
+				.replaceFirst("remarkValue",remark);
+		sendTemplateMessageToOpenid(temp, openId, url,16);
+	}
+
+	/**
+	 * 退款申请通知
+	 * @param first
+	 * @param keyword1
+	 * @param keyword2
+	 * @param remark
+	 * @param openId
+	 * @param url
+	 */
+	public void refundApplicationNotice(String first,String keyword1,String keyword2,String keyword3,String remark,String openId,String url){
+		String temp = ResultInfo.REFUNDAPPLICATIONNOTICE;
+		temp = temp.replaceFirst("firstValueIamberry", first)
+				.replaceFirst("keyword1Value",keyword1)
+				.replaceFirst("keyword2Value",keyword2)
+				.replaceFirst("keyword3Value",keyword3)
+				.replaceFirst("colorValue","#1C86EE")
+				.replaceFirst("remarkValue",remark);
+		sendTemplateMessageToOpenid(temp, openId, url,17);
+	}
+
+
+	/**
+	 * 购买失败
+	 * @param first
+	 * @param remark
+	 * @param openId
+	 * @param url
+	 */
+	public void failedPurchase(String first,String remark,String openId,String url){
+		String temp = ResultInfo.REFUNDAPPLICATIONNOTICE;
+		temp = temp.replaceFirst("nameValueIamberry", first)
+				.replaceFirst("colorValue","#1C86EE")
+				.replaceFirst("remarkValue",remark);
+		sendTemplateMessageToOpenid(temp, openId, url,18);
+	}
+
+	/**
+	 * 首次注册推送信息
+	 * @param first
+	 * @param remark
+	 * @param openId
+	 * @param url
+	 */
+	public void registeredTemplate(String first,String keyword1,String keyword2,String keyword3,String remark,String openId,String url){
+		String temp = ResultInfo.REGISTEREDTEMPLATE;
+		temp = temp.replaceFirst("firstValueIamberry", first)
+				.replaceFirst("keyword1Value",keyword1)
+				.replaceFirst("keyword2Value",keyword2)
+				.replaceFirst("keyword3Value",keyword3)
+				.replaceFirst("colorValue","#1C86EE")
+				.replaceFirst("remarkValue",remark);
+		sendTemplateMessageToOpenid(temp, openId, url,19);
+	}
+
+	/**
+	 * 生日赠送积分推送
+	 * @param first
+	 * @param remark
+	 * @param openId
+	 * @param url
+	 */
+	public void birthdayTemplate(String first,String keyword1,String keyword2,String keyword3,String remark,String openId,String url){
+		String temp = ResultInfo.BIRTHDAYTEMPLATE;
+		temp = temp.replaceFirst("nameValueIamberry", first)
+				.replaceFirst("colorValue","#1C86EE")
+				.replaceFirst("remarkValue",remark);
+		sendTemplateMessageToOpenid(temp, openId, url,20);
+	}
+
+	/**
+	 * 618活动  参与成功
+	 * @param first
+	 * @param remark
+	 * @param openId
+	 * @param url
+	 */
+	public void participateInSuccess(String first,String keyword1,String keyword2,String keyword3,String keyword4,String remark,String openId,String url){
+		String temp = ResultInfo.PARTICIPATEINSUCCESS;
+		temp = temp.replaceFirst("firstValueIamberry", first)
+				.replaceFirst("keyword1Value",keyword1)
+				.replaceFirst("keyword2Value",keyword2)
+				.replaceFirst("keyword3Value",keyword3)
+				.replaceFirst("keyword4Value",keyword4)
+				.replaceFirst("colorValue","#1C86EE")
+				.replaceFirst("remarkValue",remark);
+		sendTemplateMessageToOpenid(temp, openId, url,21);
+	}
+
+	/**
+	 * 积分变更
+	 * @param first
+	 * @param remark
+	 * @param openId
+	 * @param url
+	 */
+	public void pointChange(String first,String keyword1,String keyword2,String remark,String openId,String url){
+		String temp = ResultInfo.POINTCHANGE;
+		temp = temp.replaceFirst("firstValueIamberry", first)
+				.replaceFirst("keyword1Value",keyword1)
+				.replaceFirst("keyword2Value",keyword2)
+				.replaceFirst("colorValue","#1C86EE")
+				.replaceFirst("remarkValue",remark);
+		sendTemplateMessageToOpenid(temp, openId, url,22);
+	}
+
+	/**
+	 * 积分变更
+	 * @param first
+	 * @param remark
+	 * @param openId
+	 * @param url
+	 */
+	public void birthdayGift(String first,String keyword1,String keyword2,String keyword3,String keyword4,String remark,String openId,String url){
+		String temp = ResultInfo.BIRTHDAYGIFT;
+		temp = temp.replaceFirst("firstValueIamberry", first)
+				.replaceFirst("keyword1Value",keyword1)
+				.replaceFirst("keyword2Value",keyword2)
+				.replaceFirst("keyword3Value",keyword3)
+				.replaceFirst("keyword4Value",keyword4)
+				.replaceFirst("colorValue","#1C86EE")
+				.replaceFirst("remarkValue",remark);
+		sendTemplateMessageToOpenid(temp, openId, url,23);
+	}
+
+}

+ 546 - 0
wechat-common-core/src/main/java/com/iamberry/wechat/tools/WeixinUtil.java

@@ -0,0 +1,546 @@
+package com.iamberry.wechat.tools;
+
+import com.iamberry.cache.LocalCache;
+import com.iamberry.wechat.core.entity.wx.*;
+import net.sf.json.JSONObject;
+import org.slf4j.LoggerFactory;
+
+import javax.net.ssl.HttpsURLConnection;
+import javax.net.ssl.SSLContext;
+import javax.net.ssl.SSLSocketFactory;
+import javax.net.ssl.TrustManager;
+import java.io.BufferedReader;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.OutputStream;
+import java.net.ConnectException;
+import java.net.URL;
+import java.net.URLEncoder;
+import java.util.Date;
+import java.util.logging.Logger;
+
+/**
+ * 公众平台通用接口工具类
+ *
+ * @author fzh
+ *
+ */
+public class WeixinUtil {
+	
+	
+	// 日志
+	private  static org.slf4j.Logger logger = LoggerFactory.getLogger(WeixinUtil.class);
+	
+	// 发送短信模板的URL
+	private static String sendTemplate = "https://api.weixin.qq.com/cgi-bin/message/template/send?access_token=";
+	
+	// token缓存
+	private static LocalCache<String, Token> cache = new LocalCache<>(2);
+	
+	/**
+	 * 网页授权获取access_token
+	 * 
+	 * @param code
+	 * @return
+	 */
+	public static JSONObject getParamByOauth2(String code) {
+		JSONObject jsonObject = null;
+		try {
+			// 得到access_token和openid
+			jsonObject = httpRequest(NameUtils.oauth2_getToken_url.replaceAll("CODE", code).replaceAll("APPID", NameUtils.getConfig("appId")).replaceAll("SECRET", NameUtils.getConfig("appSecret")), "GET", null);
+			if (null != jsonObject) {
+				return jsonObject;
+			}
+		} catch (Exception e) {
+			// 获取token失败
+			logger.error("获取token失败 errcode:{} errmsg:{}" + jsonObject.getInt("errcode") + jsonObject.getString("errmsg"));
+		}
+		return null;
+	}
+
+	/**
+	 * 发起https请求并获取结果
+	 * 
+	 * @param requestUrl
+	 *            请求地址
+	 * @param requestMethod
+	 *            请求方式(GET/POST)
+	 * @param outputStr
+	 *            提交的数据
+	 * @return JSONObject(通过JSONObject.get(key)的方式获取json对象的属性值)
+	 *         java.lang.ClassCastException:
+	 *         sun.net.www.protocol.http.HttpURLConnection cannot be cast to
+	 *         javax.net.ssl.HttpsURLConnection
+	 */
+	public static JSONObject httpRequest(String requestUrl,
+			String requestMethod, String outputStr) {
+		JSONObject jsonObject = null;
+		StringBuffer buffer = new StringBuffer();
+		try {
+			// 创建SSLContext对象,并使用我们指定的信任管理器初始化
+			TrustManager[] tm = { new MyX509TrustManager() };
+			SSLContext sslContext = SSLContext.getInstance("SSL", "SunJSSE");
+			sslContext.init(null, tm, new java.security.SecureRandom());
+			// 从上述SSLContext对象中得到SSLSocketFactory对象
+			SSLSocketFactory ssf = sslContext.getSocketFactory();
+
+			URL url = new URL(requestUrl);
+			HttpsURLConnection httpUrlConn = (HttpsURLConnection) url
+					.openConnection();
+			httpUrlConn.setSSLSocketFactory(ssf);
+
+			httpUrlConn.setDoOutput(true);
+			httpUrlConn.setDoInput(true);
+			httpUrlConn.setUseCaches(false);
+
+			// 设置请求方式(GET/POST)
+			httpUrlConn.setRequestMethod(requestMethod);
+			if ("GET".equalsIgnoreCase(requestMethod))
+				httpUrlConn.connect();
+
+			// 当有数据需要提交时
+			if (null != outputStr) {
+				OutputStream outputStream = httpUrlConn.getOutputStream();
+				// 注意编码格式,防止中文乱码
+				outputStream.write(outputStr.getBytes("UTF-8"));
+				outputStream.close();
+			}
+
+			// 将返回的输入流转换成字符串
+			InputStream inputStream = httpUrlConn.getInputStream();
+			InputStreamReader inputStreamReader = new InputStreamReader(inputStream, "utf-8");
+			BufferedReader bufferedReader = new BufferedReader(inputStreamReader);
+
+			String str = null;
+			while ((str = bufferedReader.readLine()) != null) {
+				buffer.append(str);
+			}
+			bufferedReader.close();
+			inputStreamReader.close();
+			// 释放资源
+			inputStream.close();
+			inputStream = null;
+			httpUrlConn.disconnect();
+			jsonObject = JSONObject.fromObject(buffer.toString());
+		} catch (ConnectException ce) {
+			Logger.getAnonymousLogger().info("Weixin server connection timed out.");
+		} catch (Exception e) {
+			Logger.getAnonymousLogger().info("信任管理器请求时..." + e);
+			Logger.getAnonymousLogger().info("jsonObject..." + jsonObject);
+		}
+		return jsonObject;
+	}
+
+	/**
+	 * 获取access_token
+	 * 
+	 * @param appid
+	 *            凭证
+	 * @param appsecret
+	 *            密钥
+	 * @return
+	 */
+	public static AccessToken getAccessToken(String appid, String appsecret) {
+		
+		// 根据public No查询access_token
+		Token token = cache.get(NameUtils.getConfig("pubNo"));
+//		Token token = cache.get("gh_cdd0a86d3b19");
+
+		AccessToken accessToken = null;
+		//判断数据库中是否存在token
+		if (token != null) {
+			//判断token是否失效
+			Date date = new Date();
+			if (date.getTime() < token.getEndDate().getTime()) {
+				accessToken = new AccessToken();
+				accessToken.setExpiresIn(7200);
+				accessToken.setToken(token.getToken());
+				return accessToken;
+			} else {
+				String requestUrl = NameUtils.access_token_url.replace("APPID", NameUtils.getConfig("appId")).replace("APPSECRET", NameUtils.getConfig("appSecret"));
+				JSONObject jsonObject = httpRequest(requestUrl, "GET", null);
+				// 如果请求成功
+				if (null != jsonObject) {
+					try {
+						accessToken = new AccessToken();
+						accessToken.setToken(jsonObject.getString("access_token"));
+						accessToken.setExpiresIn(jsonObject.getInt("expires_in"));
+						token.setToken(accessToken.getToken());
+						token.setEndDate(new Date(date.getTime() + 6500000));
+						token.setAppid(NameUtils.getConfig("pubNo"));
+						try {
+							cache.put(NameUtils.getConfig("pubNo"), token);
+						} catch (Exception e) {
+							logger.error(e.getMessage());
+						}
+						return accessToken;
+					} catch (Exception e) {
+						accessToken = null;
+						// 获取token失败
+						logger.error("获取token失败 errcode:{} errmsg:{}" + jsonObject.getInt("errcode") + jsonObject.getString("errmsg"));
+					}
+				}
+			}
+		} else {
+			String requestUrl = NameUtils.access_token_url.replace("APPID", appid).replace("APPSECRET", appsecret);
+			JSONObject jsonObject = httpRequest(requestUrl, "GET", null);
+			// 如果请求成功
+			if (null != jsonObject) {
+				try {
+					accessToken = new AccessToken();
+					accessToken.setToken(jsonObject.getString("access_token"));
+					accessToken.setExpiresIn(jsonObject.getInt("expires_in"));
+					
+					token = new Token();
+					token.setToken(accessToken.getToken());
+					token.setEndDate(new Date(new Date().getTime() + 6500000));
+					token.setAppid(NameUtils.getConfig("pubNo"));
+					
+					try {
+						cache.put(NameUtils.getConfig("pubNo"), token);
+					} catch (Exception e) {
+						// 更新失败
+						logger.error(e.getMessage());
+					}
+					return accessToken;
+				} catch (Exception e) {
+					accessToken = null;
+					// 获取token失败
+					logger.error("获取token失败 errcode:{} errmsg:{}" + jsonObject.getInt("errcode") + jsonObject.getString("errmsg"));
+				}
+			}
+		}
+		return accessToken;
+	}
+
+	/**
+	 * 获取jsapi_ticket(jsapi_ticket的有效期为7200秒)
+	 * 
+	 * @param token
+	 * @return
+	 */
+	public static Ticket getTicket(String token) {
+		Ticket ticket = null;
+		String requestUrl = NameUtils.jsapi_ticket_url.replace("ACCESS_TOKEN", token);
+		JSONObject jsonObject = httpRequest(requestUrl, "GET", null);
+		if (null == jsonObject) {
+			// 网络异常
+			return null;
+		}
+
+		try {
+			ticket = new Ticket();
+			ticket.setTicket(jsonObject.getString("ticket"));
+			ticket.setExpiresIn(jsonObject.getInt("expires_in"));
+		} catch (Exception e) {
+			// 获取token失败
+			logger.error("获取ticket失败 errcode:{} errmsg:{}" + jsonObject.getInt("errcode") + jsonObject.getString("errmsg"));
+			
+			// 判断错误信息是否为 access_token 失效的问题,只有access失效,我们才重新获取,否则每次获取可能导致access_token资源耗尽
+			if (jsonObject.getInt("errcode") != 40001) 
+				return null;
+			
+			// 强制刷新access_token,存在多线程安全隐患!
+			requestUrl = NameUtils.access_token_url.replace("APPID", NameUtils.getConfig("appId")).replace("APPSECRET", NameUtils.getConfig("appSecret"));
+			JSONObject accessTokenJsonObject = httpRequest(requestUrl, "GET", null);
+			
+			// 报错access_token信息,不管报错与否
+			Token wechatToken = new Token();
+			wechatToken.setEndDate(new Date(new Date().getTime() + 6500000));
+			wechatToken.setAppid(NameUtils.getConfig("pubNo"));
+			wechatToken.setToken(accessTokenJsonObject.getString("access_token"));
+			cache.put(NameUtils.getConfig("pubNo"), wechatToken);
+			
+			// 重新获取一次
+			requestUrl = NameUtils.jsapi_ticket_url.replace("ACCESS_TOKEN", wechatToken.getToken());
+			jsonObject = httpRequest(requestUrl, "GET", null);
+			ticket = new Ticket();
+			ticket.setTicket(jsonObject.getString("ticket"));
+			ticket.setExpiresIn(jsonObject.getInt("expires_in"));
+		}
+	
+		return ticket;
+	}
+
+	/**
+	 * 创建菜单
+	 * 
+	 * @param menu
+	 *            菜单实例
+	 * @param accessToken
+	 *            有效的access_token
+	 * @return 0表示成功,其他值表示失败
+	 */
+	public static int createMenu(Menu menu, String accessToken) {
+		int result = 0;
+		// 拼装创建菜单的url
+		String url = NameUtils.menu_create_url.replace("ACCESS_TOKEN", accessToken);
+		// 将菜单对象转换成json字符串
+		String jsonMenu = JSONObject.fromObject(menu).toString();
+		// 调用接口创建菜单
+		JSONObject jsonObject = httpRequest(url, "POST", jsonMenu);
+		if (null != jsonObject) {
+			if (0 != jsonObject.getInt("errcode")) {
+				result = jsonObject.getInt("errcode");
+				Logger.getAnonymousLogger().info("创建菜单失败 errcode:{} errmsg:{}" + jsonObject.getInt("errcode") + jsonObject.getString("errmsg"));
+			}
+		}
+		return result;
+	}
+
+	/**
+	 * 创建菜单
+	 * 
+	 * @param jsonMenu
+	 * @param accessToken
+	 */
+	public static int createMenu(String jsonMenu, String accessToken) {
+		int result = 0;
+		// 拼装创建菜单的url
+		String url = NameUtils.menu_create_url.replace("ACCESS_TOKEN", accessToken);
+		// 调用接口创建菜单
+		JSONObject jsonObject = httpRequest(url, "POST", jsonMenu);
+		if (null != jsonObject) {
+			if (0 != jsonObject.getInt("errcode")) {
+				result = jsonObject.getInt("errcode");
+				Logger.getAnonymousLogger().info("创建菜单失败 errcode:{} errmsg:{} " + jsonObject.getInt("errcode") + jsonObject.getString("errmsg"));
+			}
+		}
+		return result;
+	}
+
+	/**
+	 * 创建二维码
+	 * 
+	 * @param json
+	 * @return
+	 */
+	public static QRCJson createQrcode(String json) {
+		QRCJson qrcJson = new QRCJson();
+		try {
+			AccessToken at = getAccessToken(NameUtils.getConfig("appId"), NameUtils.getConfig("appSecret"));
+			if (at != null) {
+				String token = at.getToken();
+				JSONObject jsonObject = httpRequest(NameUtils.get_token_url.replaceAll("TOKEN", token), "POST", json);
+				if (jsonObject != null) {
+					String ticket = URLEncoder.encode(jsonObject.getString("ticket"), "UTF-8");
+					qrcJson.setTicket(ticket);
+					qrcJson.setUrl(NameUtils.show_qrcode_url + ticket);
+					if (json.contains("expire_seconds")) {// 临时二维码才有过期时间
+						qrcJson.setExpire_seconds(jsonObject.getString("expire_seconds"));
+					}
+				}
+			}
+		} catch (Exception e) {
+			e.printStackTrace();
+		}
+		return qrcJson;
+	}
+
+	/**
+	 * 创建二维码 -- 测试
+	 *
+	 * @param json
+	 * @return
+	 */
+//	public static QRCJson createQrcodeTest(String json) {
+//		QRCJson qrcJson = new QRCJson();
+//		try {
+//			AccessToken at = getAccessToken("wxdb090f0af89e0be3", "518114a120274f625530750c1803921b");
+//			if (at != null) {
+//				String token = at.getToken();
+//				JSONObject jsonObject = httpRequest("https://api.weixin.qq.com/cgi-bin/qrcode/create?access_token=TOKEN".replaceAll("TOKEN", token), "POST", json);
+//				if (jsonObject != null) {
+//					String ticket = URLEncoder.encode(jsonObject.getString("ticket"), "UTF-8");
+//					qrcJson.setTicket(ticket);
+//					qrcJson.setUrl("https://mp.weixin.qq.com/cgi-bin/showqrcode?ticket=" + ticket);
+//					if (json.contains("expire_seconds")) {// 临时二维码才有过期时间
+//						qrcJson.setExpire_seconds(jsonObject.getString("expire_seconds"));
+//					}
+//				}
+//			}
+//		} catch (Exception e) {
+//			e.printStackTrace();
+//		}
+//		return qrcJson;
+//	}
+
+	/**
+	 * 生成网页授权链接
+	 * 
+	 * @param type
+	 * @param redirectURI
+	 */
+	public static String getOauth2Url(String type, String redirectURI) {
+		String url = "";
+		try {
+			redirectURI = URLEncoder.encode(redirectURI, "utf-8");
+			if ("snsapi_base".equals(type)) {
+				url = NameUtils.oauth2_url.replace("SCOPE", "snsapi_base").replace("APPID", NameUtils.getConfig("appId")).replace("REDIRECT_URI", redirectURI);
+			} else {
+				url = NameUtils.oauth2_url.replace("SCOPE", "snsapi_userinfo").replace("APPID", NameUtils.getConfig("appId")).replace("REDIRECT_URI", redirectURI);
+			}
+			return url;
+		} catch (Exception e) {
+			e.printStackTrace();
+		}
+		return null;
+	}
+
+	/**
+	 * (网页授权)拉取用户信息
+	 * 
+	 * @param code
+	 * @param type
+	 * @return
+	 */
+	public static JSONObject getUserInfoByOauth2(String code, String type) {
+		JSONObject jsonObject = null;
+		String openid = "", access_token = "";
+		try {
+			// 得到access_token和openid
+			jsonObject = httpRequest(NameUtils.oauth2_getToken_url.replaceAll("CODE", code).replaceAll("APPID", NameUtils.getConfig("appId")).replaceAll("SECRET", NameUtils.getConfig("appSecret")), "GET", null);
+			if (null != jsonObject) {
+				openid = jsonObject.getString("openid");
+				access_token = jsonObject.getString("access_token");
+				// 获取用户信息
+				if ("info".equals(type) && !"".equals(openid) && !"".equals(access_token)) {
+					jsonObject = null;
+					jsonObject = httpRequest(NameUtils.oauth2_getUserInfo_url.replaceAll("ACCESS_TOKEN", access_token).replaceAll("OPENID", openid), "GET", null);
+					if (jsonObject != null)
+						return jsonObject;
+				}
+				return jsonObject;
+			}
+		} catch (Exception e) {
+			access_token = null;
+			// 获取token失败
+			logger.error("获取token失败 errcode:{} errmsg:{}" + jsonObject.getInt("errcode") + jsonObject.getString("errmsg"));
+		}
+		return null;
+	}
+
+	/**
+	 * 拉取用户信息
+	 * 
+	 * @param code
+	 * @param appid
+	 * @param secret
+	 */
+	public  static String[] getOpenId(String code, String appid, String secret) {
+		String[] strs = new String[2];
+		String url = "", openid = "", access_token = "";
+		Logger.getAnonymousLogger().info("code = " + code);
+		JSONObject jsonObject = null;
+		// 得到access_token和openid
+		url = "https://api.weixin.qq.com/sns/oauth2/access_token?appid=APPID&secret=SECRET&code=CODE&grant_type=authorization_code";
+		jsonObject = httpRequest(url.replaceAll("CODE", code).replaceAll("APPID", appid).replaceAll("SECRET", secret), "GET", null);
+		if (null != jsonObject) {
+			try {
+				openid = jsonObject.getString("openid");
+				access_token = jsonObject.getString("access_token");
+				strs[0] = openid;
+				strs[1] = access_token;
+			} catch (Exception e) {
+				access_token = null;
+				// 获取token失败
+				Logger.getAnonymousLogger().info("获取token失败 errcode:{} errmsg:{}" + jsonObject.getInt("errcode") + jsonObject.getString("errmsg"));
+			}
+		}
+		return strs;
+	}
+
+	/**
+	 * 根据openid拉取用户信息
+	 * 
+	 * @param openid
+	 * @return
+	 */
+	public  static JSONObject getUserInfo(String openid) {
+		AccessToken token = getAccessToken(NameUtils.getConfig("appId"), NameUtils.getConfig("appSecret"));
+		if (token == null) {
+			// 此处如果出错,只能说明程序逻辑改变,存在多线程安全隐患
+			return null;
+		}
+
+		// 获取信息 - 验证
+		JSONObject jsonObject = httpRequest(NameUtils.userinfo_url.replaceAll("ACCESS_TOKEN", token.getToken()).replaceAll("OPENID", openid), "GET", null);
+		if (null == jsonObject) {
+			// 网络错误
+			return null;
+		}
+
+		// 对数据进行get(防止出现问题,能够让程序及时补救), 如果抛出异常,表示access_token可能失效,强制获取一次。
+		try {
+			if(jsonObject.has("sex")){	//关注的用户
+				return jsonObject;
+			}else if(jsonObject.has("subscribe")){
+				return jsonObject;
+			}
+		} catch (Exception e) {
+			// 记录日志
+			logger.error("getUserInfo method throw exception:" + e.getMessage() + "[" + jsonObject + "]");
+			// 判断错误信息是否为 access_token 失效的问题,只有access失效,我们才重新获取,否则每次获取可能导致access_token资源耗尽
+			if (jsonObject.getInt("errcode") != 40001) 
+				return jsonObject;
+			
+			// 强制刷新access_token,存在多线程安全隐患!
+			String requestUrl = NameUtils.access_token_url.replace("APPID", NameUtils.getConfig("appId")).replace("APPSECRET", NameUtils.getConfig("appSecret"));
+			JSONObject accessTokenJsonObject = httpRequest(requestUrl, "GET", null);
+			
+			// 报错access_token信息,不管报错与否
+			Token wechatToken = new Token();
+			wechatToken.setEndDate(new Date(new Date().getTime() + 6500000));
+			wechatToken.setAppid(NameUtils.getConfig("pubNo"));
+			wechatToken.setToken(accessTokenJsonObject.getString("access_token"));
+			cache.put(NameUtils.getConfig("pubNo"), wechatToken);
+			// 再次获取用户信息
+			return httpRequest(NameUtils.userinfo_url.replaceAll("ACCESS_TOKEN", wechatToken.getToken()).replaceAll("OPENID", openid), "GET", null);
+		}
+		return jsonObject;
+	}
+
+	/**
+	 * 发送模板消息 appId 公众账号的唯一标识 appSecret 公众账号的密钥 openId 用户标识
+	 */
+	public static void sendTemplateMessage(String appId, String appSecret,
+			String openId, String template_id, Object data, String redirectUrl) {
+
+		logger.info("推送消息模板:"+ template_id );
+
+		// 准备数据
+		AccessToken token = getAccessToken(appId, appSecret);
+		String access_token = token.getToken();
+		String url = sendTemplate  + access_token;
+
+		// 准备模版
+		ITTempLate temp = new ITTempLate();
+		temp.setTouser(openId);
+		temp.setTemplate_id(template_id);
+		temp.setUrl(redirectUrl);
+		temp.setData(JSONObject.fromObject(data));
+
+		// format
+		String jsonString = JSONObject.fromObject(temp).toString();
+
+		System.out.println("=======消息模板推送信息:"+jsonString+"==end=");
+
+		// send
+		JSONObject jsonObject = httpRequest(url, "POST", jsonString);
+		if (null != jsonObject) { 
+			if (0 != jsonObject.getInt("errcode")) {
+				logger.info("错误 errcode:{} errmsg:{}" + jsonObject.getInt("errcode") + jsonObject.getString("errmsg"));
+			}
+		}
+	}
+
+
+//	public static void main(String[] args) {
+//		String QR_LIMIT_STR_SCENE = "{\"action_name\": \"QR_LIMIT_STR_SCENE\", \"action_info\": {\"scene\": {\"scene_str\": \"%s\"}}}";
+//		String chananel = "main_channel_id_22";
+//		String json = String.format(QR_LIMIT_STR_SCENE, chananel);
+//		QRCJson qrc = WeixinUtil.createQrcodeTest(json);
+//		String xx = qrc.getUrl();
+//	}
+
+}

+ 39 - 0
wechat-common-core/src/test/java/Test.java

@@ -0,0 +1,39 @@
+import java.io.File;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.commons.lang3.StringUtils;
+
+
+public class Test {
+
+	public static void main(String[] args) {
+		String path = "D:\\code\\app-version\\iamberry-common-parent\\iamberry-wechat-service\\src\\main\\java\\com\\iamberry\\wechat\\service\\mapper";
+		
+		File file = new File(path);
+		list(file);
+	}
+	
+	public static void list(File file) {
+		if (file.isDirectory()) {
+			File[] files = null;
+			files = file.listFiles();
+			for (File file2 : files) {
+				list(file2);
+			}
+		} else {
+			if (file.getName().endsWith(".xml")) {
+				System.out.println("<mapper resource=\"classpath:" + getType(file.getAbsolutePath()) + "\"/>");
+			}
+		}
+	}
+	
+	public static String getType(String s) {
+		s =  StringUtils.replace(StringUtils.substring(s, s.indexOf("java") + 5, s.length()), File.separator, ".");
+		return s;
+	}
+	
+	public static String getName(String s) {
+		return StringUtils.split(s, ".")[0];
+	}
+}

+ 66 - 0
wechat-common-tool/pom.xml

@@ -0,0 +1,66 @@
+<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">
+	<modelVersion>4.0.0</modelVersion>
+	
+	<!-- 父类定义 -->
+	<parent>
+		<groupId>com.iamberry</groupId>
+		<artifactId>iamberry-parent</artifactId>
+		<version>1.0.0</version>
+	</parent>
+	
+	<!-- 工具类本身并不依赖其他模块 -->
+	<artifactId>wechat-common-tool</artifactId>
+	<version>1.0.0</version>
+
+	<dependencies>
+        <!-- JWT -->
+        <dependency>
+		    <groupId>com.auth0</groupId>
+		    <artifactId>java-jwt</artifactId>
+		    <version>2.2.1</version>
+		</dependency>
+        <dependency>
+            <groupId>com.github.pagehelper</groupId>
+            <artifactId>pagehelper</artifactId>
+            <version>RELEASE</version>
+        </dependency>
+    </dependencies>
+
+	<build>
+		<plugins>
+			<plugin>
+				<groupId>org.apache.maven.plugins</groupId>
+				<artifactId>maven-compiler-plugin</artifactId>
+				<version>3.3</version>
+				<configuration>
+					<source>1.8</source>
+					<target>1.8</target>
+				</configuration>
+			</plugin>
+		</plugins>
+	</build>
+
+	<!-- 配置 -->
+	<profiles>
+		<profile>
+			<id>sonar</id>
+			<activation>
+				<activeByDefault>true</activeByDefault>
+			</activation>
+			<properties>
+				<sonar.host.url>http://sonar.iamberry.com/</sonar.host.url>
+				<sonar.login>admin</sonar.login>
+				<sonar.password>iamberry123</sonar.password>
+			</properties>
+		</profile>
+	</profiles>
+	<!-- 爱贝源仓库 -->
+	<repositories>
+		<repository>
+			<id>Iamberr_Nexus</id>
+			<name>iamberry nexus</name>
+			<url>http://maven.iamberry.com/content/groups/public/</url>
+		</repository>
+	</repositories>
+</project>

+ 42 - 0
wechat-common-tool/src/main/java/com/iamberry/app/config/APIStatus.java

@@ -0,0 +1,42 @@
+package com.iamberry.app.config;
+
+public enum APIStatus {
+	SUCCESS(1000, "success"),
+
+	FAILURE(2000, "failure"),
+	USER_NOT_EXIST(2001, "user not exist"),
+	ERROR_REGISTER(2010, "user already exist"),
+	INSERT_DUPLICATE(2011, "insert repeat"),
+	ERROR_CODE(2101,"verificationCode is wrong"),
+	CODE_TIMEOUT(2102,"verificationCode is overdue"),
+	AUTHENTICATION_ERROR(2012,"authentication_error"),
+	USER_FROZEN_ERROR(2013,"this account is frozen"),
+	INVALID_PARAMETER(2020,"invalid_parameter"),
+	INVALID_TOKEN(2100,"Invalid token"),
+	ERROR_OLDPASSWORD(2200,"old password is wrong"),
+	NOT_FOUND(4010,"not_found"),
+	
+	WARN_CART_FULL(4100,"cart was full"),
+	INTERNAL_SERVER_ERROR(3010,"internal_server_error"),
+	POINTS_NOT_AVALIABLE(5001,"points not avaliable"),
+	AMOUNT_NOT_AVALIABLE(5011,"amount not avaliable"),
+	BARCODE_NOT_FOUND(5020,"barcode not found"),
+	;
+	
+	private int status;
+	private String message;
+
+	private APIStatus(int status, String message) {
+		this.status = status;
+		this.message = message;
+	}
+
+	public int getStatus() {
+		return status;
+	}
+
+	public String getMessage() {
+		return message;
+	}
+
+}

+ 24 - 0
wechat-common-tool/src/main/java/com/iamberry/app/config/Constants.java

@@ -0,0 +1,24 @@
+package com.iamberry.app.config;
+
+public interface Constants {
+	// 正则表达式:验证手机号
+	public static final String REGEX_MOBILE = "^((13[0-9])|(15[^4,\\D])|(18[0,5-9]))\\d{8}$";
+	// 正则表达式:验证邮箱
+	public static final String REGEX_EMAIL = "^([a-z0-9A-Z]+[-|\\.]?)+[a-z0-9A-Z]@([a-z0-9A-Z]+(-[a-z0-9A-Z]+)?\\.)+[a-zA-Z]{2,}$";
+	// 正则表达式:验证身份证
+	public static final String REGEX_ID_CARD = "(^\\d{18}$)|(^\\d{15}$)";
+
+	public static final String USER_SESSION_KEY = "user-session-key";
+
+	public static final int DEFAULT_PAGE_SIZE = 10;
+
+	public static final String SMS_RETURNCODE = "code";
+
+	public static final int USER_STATUS_DEFAULT = 0;
+	public static final String USER_ACTIVE = "active";
+	public static final String USER_INACTIVE = "inactive";
+	
+	public static final String MILK_POWDER_APPROVED = "approved";
+	public static final String MILK_POWDER_NOT_APPROVED = "not_approved";
+	
+}

+ 38 - 0
wechat-common-tool/src/main/java/com/iamberry/app/config/ImberryConfig.java

@@ -0,0 +1,38 @@
+package com.iamberry.app.config;
+
+import java.io.InputStream;
+import java.util.Properties;
+
+public class ImberryConfig {
+
+	public static String SMS_USERNAME = "";
+	public static String SMS_PASSWORD = "";
+	public static String SMS_TEXT = "";
+	public static String SMS_URL = "";
+	public static String SINA_IP_URL = "";
+	public static String MASTERSECRET="";
+	public static String APPKEY="";
+	public static String CDN_URL="";
+	public static String BASE_URL=""; //头像前缀
+
+	static {
+		Properties pro = new Properties();
+		InputStream in = ImberryConfig.class.getClassLoader().getResourceAsStream("iamberry-app-service-config.properties");
+		try {
+			pro.load(in);
+			SMS_USERNAME = pro.getProperty("SMS_USERNAME");
+			SMS_PASSWORD = pro.getProperty("SMS_PASSWORD");
+			SMS_TEXT = pro.getProperty("SMS_TEXT");
+			SMS_URL = pro.getProperty("SMS_URL");
+			SINA_IP_URL = pro.getProperty("SINA_IP_URL");
+			MASTERSECRET=pro.getProperty("master_secret");
+			APPKEY=pro.getProperty("appkey");
+			CDN_URL=pro.getProperty("cdnUrl");
+			BASE_URL=pro.getProperty("base_url");
+			System.out.println("这里需要打印"+BASE_URL);
+
+		} catch (Exception e) {
+			e.printStackTrace();
+		}
+	}
+}

+ 95 - 0
wechat-common-tool/src/main/java/com/iamberry/app/config/Response.java

@@ -0,0 +1,95 @@
+package com.iamberry.app.config;
+
+import java.io.Serializable;
+import java.util.HashMap;
+import java.util.Map;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+public class Response implements Serializable {
+	/**
+	 * 
+	 */
+	private static final long serialVersionUID = -1497535410510537697L;
+
+	private static final ObjectMapper mapper = new ObjectMapper();
+	private ResponseHeader header;
+	private Object data;
+
+	public Response(ResponseHeader header) {
+		this(header, null);
+	}
+
+	public Response(ResponseHeader header, Object data) {
+		super();
+		this.header = header;
+		this.data = data;
+	}
+
+	public ResponseHeader getHeader() {
+		return header;
+	}
+
+	public Response setHeader(ResponseHeader header) {
+		this.header = header;
+		return this;
+	}
+
+	public Object getData() {
+		return data;
+	}
+
+	public Response setData(Object data) {
+		this.data = data;
+		return this;
+	}
+
+	public Response setData(Object data, int result_count) {
+		this.data = data;
+		this.header.setResult_count(result_count);
+		return this;
+	}
+
+	@Override
+	public String toString() {
+		try {
+			return mapper.writeValueAsString(this);
+		} catch (Exception e) {
+			e.printStackTrace();
+			return "";
+		}
+	}
+
+	
+	/** 
+	* @Description: 将对象转为Map。注意方法名不能为getXxx,否则在将对象进行Json转换时,该get方法也会被默认调用。 
+	* @param @return  
+	* @return Map<String,Object>   
+	* @throws 
+	*/
+	public Map<String, Object> toMap() {
+		Map<String, Object> map = new HashMap<String, Object>();
+		map.put("header", header);
+		map.put("data", data);
+		return map;
+	}
+
+	public static final Response AUTHENTICATION_ERROR = new Response(new ResponseHeader(APIStatus.AUTHENTICATION_ERROR));
+	public static final Response SERVER_INTERNAL_ERROR = new Response(new ResponseHeader(APIStatus.INTERNAL_SERVER_ERROR));
+	public static final Response INVALID_PARMS = new Response(new ResponseHeader(APIStatus.INVALID_PARAMETER));
+	public static final Response ERROR_REGISTER = new Response(new ResponseHeader(APIStatus.ERROR_REGISTER));
+	public static final Response INSERT_DUPLICATE = new Response(new ResponseHeader(APIStatus.INSERT_DUPLICATE));
+	public static final Response SUCCESS = new Response(new ResponseHeader(APIStatus.SUCCESS));
+	public static final Response FAILURE = new Response(new ResponseHeader(APIStatus.FAILURE));
+	public static final Response ERROR_CODE = new Response(new ResponseHeader(APIStatus.ERROR_CODE));
+	public static final Response CODE_TIMEOUT = new Response(new ResponseHeader(APIStatus.CODE_TIMEOUT));
+	public static final Response NOT_FOUND = new Response(new ResponseHeader(APIStatus.NOT_FOUND));
+	public static final Response INVALID_TOKEN = new Response(new ResponseHeader(APIStatus.INVALID_TOKEN));
+	public static final Response ERROR_OLDPASSWORD = new Response(new ResponseHeader(APIStatus.ERROR_OLDPASSWORD));
+	public static final Response WARN_CART_FULL = new Response(new ResponseHeader(APIStatus.WARN_CART_FULL));
+	public static final Response USER_NOT_EXIST = new Response(new ResponseHeader(APIStatus.USER_NOT_EXIST));
+	public static final Response USER_FROZEN_ERROR = new Response(new ResponseHeader(APIStatus.USER_FROZEN_ERROR));
+	public static final Response POINTS_NOT_AVALIABLE = new Response(new ResponseHeader(APIStatus.POINTS_NOT_AVALIABLE));
+	public static final Response AMOUNT_NOT_AVALIABLE = new Response(new ResponseHeader(APIStatus.AMOUNT_NOT_AVALIABLE));
+	public static final Response BARCODE_NOT_FOUND = new Response(new ResponseHeader(APIStatus.BARCODE_NOT_FOUND));
+}

+ 59 - 0
wechat-common-tool/src/main/java/com/iamberry/app/config/ResponseHeader.java

@@ -0,0 +1,59 @@
+package com.iamberry.app.config;
+
+import java.io.Serializable;
+
+public class ResponseHeader implements Serializable {
+	/**
+	 * 
+	 */
+	private static final long serialVersionUID = -6484300066753075795L;
+	private int status;
+	private String message;
+	private int result_count;
+
+	public ResponseHeader() {
+
+	}
+
+	public ResponseHeader(APIStatus status) {
+		this(status.getStatus(), status.getMessage(), -1);
+	}
+
+	/**
+	 * Constructor
+	 * @param status
+	 * @param message
+	 * @param result_count
+	 */
+	public ResponseHeader(int status, String message, int result_count) {
+		super();
+		this.status = status;
+		this.message = message;
+		this.result_count = result_count;
+	}
+
+	public int getStatus() {
+		return status;
+	}
+
+	public void setStatus(int status) {
+		this.status = status;
+	}
+
+	public String getMessage() {
+		return message;
+	}
+
+	public void setMessage(String message) {
+		this.message = message;
+	}
+
+	public int getResult_count() {
+		return result_count;
+	}
+
+	public void setResult_count(int result_count) {
+		this.result_count = result_count;
+	}
+
+}

+ 216 - 0
wechat-common-tool/src/main/java/com/iamberry/app/tool/des/MD5.java

@@ -0,0 +1,216 @@
+package com.iamberry.app.tool.des;
+
+import java.security.Key;
+import java.security.MessageDigest;
+import java.security.Security;
+
+import javax.crypto.Cipher;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+import com.iamberry.app.tool.log.RatFWLogger;
+
+/**
+ * MD5处理类
+ * 注意:
+ * 	1、在加密是不许要创建对象,但是在解密时必须创建对象
+ * 	2、如果在加密时使用的秘钥和解密时使用的秘钥不符合,那么解析不正确,抛出异常:javax.crypto.BadPaddingException
+ * @author 何秀刚
+ */
+@Component
+public class MD5 {
+
+	@Autowired
+	private RatFWLogger ratFWLogger;
+	public void setInLongLogger(RatFWLogger inLongLogger) {
+		this.ratFWLogger = inLongLogger;
+	}
+	// md5字符数组
+	private char[] chars = { '0', '1', '2', '3', '4', '5', '6', '7',
+			'8', '9', 'A', 'B', 'C', 'D', 'E', 'F' };
+	/**
+	 * 将一个字符串转换为32位的字符串
+	 */
+	public String stringToMD5(String src) throws Exception {
+		StringBuffer md5Str = new StringBuffer();
+
+		byte[] bytes = src.getBytes();
+		MessageDigest digest = MessageDigest.getInstance("MD5");
+		byte[] newBytes = digest.digest(bytes);
+		for (byte b : newBytes) {
+			md5Str.append(chars[b >> 4 & 0x0F]);
+			md5Str.append(chars[b & 0x0F]);
+		}
+		return md5Str.toString();
+	}
+
+	/** 字符串默认键值 */
+	public static String strDefaultKey = "RATFWMD5";
+
+	/** 加密工具 */
+	public Cipher encryptCipher = null;
+
+	/** 解密工具 */
+	public Cipher decryptCipher = null;
+
+	/**
+	 * 将byte数组转换为表示16进制值的字符串, 如:byte[]{8,18}转换为:0813, 和public byte[]
+	 * hexStr2ByteArr(String strIn) 互为可逆的转换过程
+	 */
+	public String byteArr2HexStr(byte[] arrB) throws Exception {
+		int iLen = arrB.length;
+		// 每个byte用两个字符才能表示,所以字符串的长度是数组长度的两倍
+		StringBuffer sb = new StringBuffer(iLen * 2);
+		for (int i = 0; i < iLen; i++) {
+			int intTmp = arrB[i];
+			// 把负数转换为正数
+			while (intTmp < 0) {
+				intTmp = intTmp + 256;
+			}
+			// 小于0F的数需要在前面补0
+			if (intTmp < 16) {
+				sb.append("0");
+			}
+			sb.append(Integer.toString(intTmp, 16));
+		}
+		return sb.toString();
+	}
+
+	/**
+	 * 将表示16进制值的字符串转换为byte数组, 和public String byteArr2HexStr(byte[] arrB)
+	 * 互为可逆的转换过程
+	 */
+	public byte[] hexStr2ByteArr(String strIn) throws Exception {
+		byte[] arrB = strIn.getBytes();
+		int iLen = arrB.length;
+
+		// 两个字符表示一个字节,所以字节数组长度是字符串长度除以2
+		byte[] arrOut = new byte[iLen / 2];
+		for (int i = 0; i < iLen; i = i + 2) {
+			String strTmp = new String(arrB, i, 2);
+			arrOut[i / 2] = (byte) Integer.parseInt(strTmp, 16);
+		}
+		return arrOut;
+	}
+
+	/**
+	 * 默认构造方法,使用默认密钥
+	 * 
+	 * @throws Exception
+	 */
+	public MD5() {
+		this(strDefaultKey);
+	}
+
+	/**
+	 * 指定密钥构造方法
+	 * 
+	 * @param strKey
+	 *            指定的密钥
+	 * @throws Exception
+	 */
+	public MD5(String strKey) {
+		try {
+			Security.addProvider(new com.sun.crypto.provider.SunJCE());
+			Key key = getKey(strKey.getBytes());
+			encryptCipher = Cipher.getInstance("DES");
+			encryptCipher.init(Cipher.ENCRYPT_MODE, key);
+			decryptCipher = Cipher.getInstance("DES");
+			decryptCipher.init(Cipher.DECRYPT_MODE, key);
+		} catch (Exception e) {
+		}
+	}
+
+	/**
+	 * 加密字节数组
+	 */
+	public byte[] encrypt(byte[] arrB) throws Exception {
+		return encryptCipher.doFinal(arrB);
+	}
+
+	/**
+	 * 加密字符串
+	 */
+	public String encrypt(String strIn) throws Exception {
+		try {
+			return byteArr2HexStr(encrypt(strIn.getBytes())).toUpperCase();
+		} catch (Exception e) {
+			e.printStackTrace();
+			return null;
+		}
+	}
+
+	/**
+	 * 解密字节数组
+	 */
+	public byte[] decrypt(byte[] arrB) throws Exception {
+		return decryptCipher.doFinal(arrB);
+	}
+
+	/**
+	 * 解密字符串
+	 */
+	public String decrypt(String strIn) throws Exception {
+		try {
+			return new String(decrypt(hexStr2ByteArr(strIn)));
+		} catch (Exception e) {
+			ratFWLogger.debug("加密和解密字符串不匹配:", e.getMessage());
+			return "INLONGADMD5";
+		}
+	}
+
+	/**
+	 * 从指定字符串生成密钥,密钥所需的字节数组长度为8位 不足8位时后面补0,超出8位只取前8位
+	 */
+	private Key getKey(byte[] arrBTmp) throws Exception {
+		// 创建一个空的8位字节数组(默认值为0)
+		byte[] arrB = new byte[8];
+		// 将原始字节数组转换为8位
+		for (int i = 0; i < arrBTmp.length && i < arrB.length; i++) {
+			arrB[i] = arrBTmp[i];
+		}
+		// 生成密钥
+		Key key = new javax.crypto.spec.SecretKeySpec(arrB, "DES");
+		return key;
+	}
+
+
+
+
+	/**LJK  md5加密**/
+	private static final String KEY_MD5 = "MD5";
+	// 全局数组
+	private static final String[] strDigits = { "0", "1", "2", "3", "4", "5",
+			"6", "7", "8", "9", "a", "b", "c", "d", "e", "f" };
+	// 返回形式为数字跟字符串
+	private static String byteToArrayString(byte bByte) {
+		int iRet = bByte;
+		if (iRet < 0) {
+			iRet += 256;
+		}
+		int iD1 = iRet / 16;
+		int iD2 = iRet % 16;
+		return strDigits[iD1] + strDigits[iD2];
+	}
+	// 转换字节数组为16进制字串
+	private static String byteToString(byte[] bByte) {
+		StringBuffer sBuffer = new StringBuffer();
+		for (int i = 0; i < bByte.length; i++) {
+			sBuffer.append(byteToArrayString(bByte[i]));
+		}
+		return sBuffer.toString();
+	}
+	/**
+	 * MD5加密
+	 * @param strObj
+	 * @return
+	 * @throws Exception
+	 */
+	public static String GetMD5Code(String strObj) throws Exception{
+		MessageDigest md = MessageDigest.getInstance(KEY_MD5);
+		// md.digest() 该函数返回值为存放哈希值结果的byte数组
+		return byteToString(md.digest(strObj.getBytes("UTF-8")));
+	}
+
+}

+ 88 - 0
wechat-common-tool/src/main/java/com/iamberry/app/tool/dto/AddressDTO.java

@@ -0,0 +1,88 @@
+package com.iamberry.app.tool.dto;
+
+/** 
+ * @author North 
+ * @date 2016年3月1日 下午12:10:56 
+ * @version V1.0
+ */
+public class AddressDTO {
+	private String province;
+	private String city;
+	private String district;
+	private String address;
+	private String name;
+	private String phone;
+	private int defaultAddress;
+
+	public AddressDTO() {
+		super();
+	}
+
+	public AddressDTO(String province, String city, String district, String address, String name, String phone, int defaultAddress) {
+		super();
+		this.province = province;
+		this.city = city;
+		this.district = district;
+		this.address = address;
+		this.name = name;
+		this.phone = phone;
+		this.defaultAddress = defaultAddress;
+	}
+
+	public String getProvince() {
+		return province;
+	}
+
+	public void setProvince(String province) {
+		this.province = province;
+	}
+
+	public String getCity() {
+		return city;
+	}
+
+	public void setCity(String city) {
+		this.city = city;
+	}
+
+	public String getDistrict() {
+		return district;
+	}
+
+	public void setDistrict(String district) {
+		this.district = district;
+	}
+
+	public String getAddress() {
+		return address;
+	}
+
+	public void setAddress(String address) {
+		this.address = address;
+	}
+
+	public String getName() {
+		return name;
+	}
+
+	public void setName(String name) {
+		this.name = name;
+	}
+
+	public String getPhone() {
+		return phone;
+	}
+
+	public void setPhone(String phone) {
+		this.phone = phone;
+	}
+
+	public int getDefaultAddress() {
+		return defaultAddress;
+	}
+
+	public void setDefaultAddress(int defaultAddress) {
+		this.defaultAddress = defaultAddress;
+	}
+
+}

+ 132 - 0
wechat-common-tool/src/main/java/com/iamberry/app/tool/dto/TuyaDTO.java

@@ -0,0 +1,132 @@
+package com.iamberry.app.tool.dto;
+
+public class TuyaDTO {
+	private String ApiVersion;
+	private String Lang = "zh-Hans";
+	private String Deviceid;
+	private String AppVersion;
+	private String Ttid;
+	private String Os;
+	private String ClientId;
+	private String Api;
+	private String T;
+	private String Session;
+	private String Data;
+
+	private String HashKey;
+	private Boolean OpenSign = true;
+	private String Sign;
+
+	public String getApiVersion() {
+		return ApiVersion;
+	}
+
+	public void setApiVersion(String apiVersion) {
+		ApiVersion = apiVersion;
+	}
+
+	public String getLang() {
+		return Lang;
+	}
+
+	public void setLang(String lang) {
+		Lang = lang;
+	}
+
+	public String getDeviceid() {
+		return Deviceid;
+	}
+
+	public void setDeviceid(String deviceid) {
+		Deviceid = deviceid;
+	}
+
+	public String getAppVersion() {
+		return AppVersion;
+	}
+
+	public void setAppVersion(String appVersion) {
+		AppVersion = appVersion;
+	}
+
+	public String getTtid() {
+		return Ttid;
+	}
+
+	public void setTtid(String ttid) {
+		Ttid = ttid;
+	}
+
+	public String getOs() {
+		return Os;
+	}
+
+	public void setOs(String os) {
+		Os = os;
+	}
+
+	public String getClientId() {
+		return ClientId;
+	}
+
+	public void setClientId(String clientId) {
+		ClientId = clientId;
+	}
+
+	public String getApi() {
+		return Api;
+	}
+
+	public void setApi(String api) {
+		Api = api;
+	}
+
+	public String getT() {
+		return T;
+	}
+
+	public void setT(String t) {
+		T = t;
+	}
+
+	public String getSession() {
+		return Session;
+	}
+
+	public void setSession(String session) {
+		Session = session;
+	}
+
+	public String getData() {
+		return Data;
+	}
+
+	public void setData(String data) {
+		Data = data;
+	}
+
+	public String getHashKey() {
+		return HashKey;
+	}
+
+	public void setHashKey(String hashKey) {
+		HashKey = hashKey;
+	}
+
+	public Boolean getOpenSign() {
+		return OpenSign;
+	}
+
+	public void setOpenSign(Boolean openSign) {
+		OpenSign = openSign;
+	}
+
+	public String getSign() {
+		return Sign;
+	}
+
+	public void setSign(String sign) {
+		Sign = sign;
+	}
+
+}

+ 79 - 0
wechat-common-tool/src/main/java/com/iamberry/app/tool/dto/TuyaHistoryListDTO.java

@@ -0,0 +1,79 @@
+package com.iamberry.app.tool.dto;
+
+import java.util.HashMap;
+import java.util.Map;
+import javax.annotation.Generated;
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@Generated("org.jsonschema2pojo")
+@JsonPropertyOrder({ "time", "dpId", "value", "devId" })
+public class TuyaHistoryListDTO {
+
+	@JsonProperty("time")
+	private Long time;
+	@JsonProperty("dpId")
+	private Integer dpId;
+	@JsonProperty("value")
+	private String value;
+	@JsonProperty("devId")
+	private String devId;
+	@JsonIgnore
+	private Map<String, Object> additionalProperties = new HashMap<String, Object>();
+
+	@JsonProperty("time")
+	public Long getTime() {
+		return time;
+	}
+
+	@JsonProperty("time")
+	public void setTime(Long time) {
+		this.time = time;
+	}
+
+	@JsonProperty("dpId")
+	public Integer getDpId() {
+		return dpId;
+	}
+
+	@JsonProperty("dpId")
+	public void setDpId(Integer dpId) {
+		this.dpId = dpId;
+	}
+
+	@JsonProperty("value")
+	public String getValue() {
+		return value;
+	}
+
+	@JsonProperty("value")
+	public void setValue(String value) {
+		this.value = value;
+	}
+
+	@JsonProperty("devId")
+	public String getDevId() {
+		return devId;
+	}
+
+	@JsonProperty("devId")
+	public void setDevId(String devId) {
+		this.devId = devId;
+	}
+
+	@JsonAnyGetter
+	public Map<String, Object> getAdditionalProperties() {
+		return this.additionalProperties;
+	}
+
+	@JsonAnySetter
+	public void setAdditionalProperty(String name, Object value) {
+		this.additionalProperties.put(name, value);
+	}
+
+}

+ 94 - 0
wechat-common-tool/src/main/java/com/iamberry/app/tool/dto/TuyaHistoryRawDTO.java

@@ -0,0 +1,94 @@
+package com.iamberry.app.tool.dto;
+
+import java.util.HashMap;
+import java.util.Map;
+import javax.annotation.Generated;
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@Generated("org.jsonschema2pojo")
+@JsonPropertyOrder({ "result", "status", "success" })
+public class TuyaHistoryRawDTO {
+
+	@JsonProperty("result")
+	private TuyaHistoryResultDTO result;
+	@JsonProperty("status")
+	private String status;
+	@JsonProperty("success")
+	private Boolean success;
+	@JsonIgnore
+	private Map<String, Object> additionalProperties = new HashMap<String, Object>();
+
+	/**
+	 *
+	 * @return The result
+	 */
+	@JsonProperty("result")
+	public TuyaHistoryResultDTO getResult() {
+		return result;
+	}
+
+	/**
+	 *
+	 * @param result
+	 *            The result
+	 */
+	@JsonProperty("result")
+	public void setResult(TuyaHistoryResultDTO result) {
+		this.result = result;
+	}
+
+	/**
+	 *
+	 * @return The status
+	 */
+	@JsonProperty("status")
+	public String getStatus() {
+		return status;
+	}
+
+	/**
+	 *
+	 * @param status
+	 *            The status
+	 */
+	@JsonProperty("status")
+	public void setStatus(String status) {
+		this.status = status;
+	}
+
+	/**
+	 *
+	 * @return The success
+	 */
+	@JsonProperty("success")
+	public Boolean getSuccess() {
+		return success;
+	}
+
+	/**
+	 *
+	 * @param success
+	 *            The success
+	 */
+	@JsonProperty("success")
+	public void setSuccess(Boolean success) {
+		this.success = success;
+	}
+
+	@JsonAnyGetter
+	public Map<String, Object> getAdditionalProperties() {
+		return this.additionalProperties;
+	}
+
+	@JsonAnySetter
+	public void setAdditionalProperty(String name, Object value) {
+		this.additionalProperties.put(name, value);
+	}
+
+}

+ 74 - 0
wechat-common-tool/src/main/java/com/iamberry/app/tool/dto/TuyaHistoryResultDTO.java

@@ -0,0 +1,74 @@
+package com.iamberry.app.tool.dto;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Map;
+import javax.annotation.Generated;
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@Generated("org.jsonschema2pojo")
+@JsonPropertyOrder({ "nextOffset", "list" })
+public class TuyaHistoryResultDTO {
+
+	@JsonProperty("nextOffset")
+	private String nextOffset;
+	@JsonProperty("list")
+	private java.util.List<TuyaHistoryListDTO> list = new ArrayList<TuyaHistoryListDTO>();
+	@JsonIgnore
+	private Map<String, Object> additionalProperties = new HashMap<String, Object>();
+
+	/**
+	 *
+	 * @return The nextOffset
+	 */
+	@JsonProperty("nextOffset")
+	public String getNextOffset() {
+		return nextOffset;
+	}
+
+	/**
+	 *
+	 * @param nextOffset
+	 *            The nextOffset
+	 */
+	@JsonProperty("nextOffset")
+	public void setNextOffset(String nextOffset) {
+		this.nextOffset = nextOffset;
+	}
+
+	/**
+	 *
+	 * @return The list
+	 */
+	@JsonProperty("list")
+	public java.util.List<TuyaHistoryListDTO> getList() {
+		return list;
+	}
+
+	/**
+	 *
+	 * @param list
+	 *            The list
+	 */
+	@JsonProperty("list")
+	public void setList(java.util.List<TuyaHistoryListDTO> list) {
+		this.list = list;
+	}
+
+	@JsonAnyGetter
+	public Map<String, Object> getAdditionalProperties() {
+		return this.additionalProperties;
+	}
+
+	@JsonAnySetter
+	public void setAdditionalProperty(String name, Object value) {
+		this.additionalProperties.put(name, value);
+	}
+
+}

+ 66 - 0
wechat-common-tool/src/main/java/com/iamberry/app/tool/log/RatFWLogger.java

@@ -0,0 +1,66 @@
+package com.iamberry.app.tool.log;
+
+import org.apache.log4j.Logger;
+
+/**
+ * desc:平台日志
+ */
+public class RatFWLogger {	
+	
+	private static String delimiter = " >> ";
+	
+	private Logger logger = null;
+	
+	private String appId;
+
+	public RatFWLogger() {
+		
+	}
+	
+	public RatFWLogger(String appId) {
+		this.appId = appId;
+		logger = Logger.getLogger(appId);
+	}
+	
+	/** 通过Spring IoC注入 
+	 * @param 应用系统ID
+	 **/
+	public void setAppId(String appId) {
+		this.appId = appId;
+		logger = Logger.getLogger(appId);		
+	}	
+	
+	public void info(String msg) {
+		info(null, msg);
+	}
+	
+	public void info(Object sender, String msg) {
+		if(logger.isInfoEnabled())
+			logger.info(buildMessage(sender,msg));
+	}
+	
+	public void debug(Object sender, String msg) {
+		if(logger.isDebugEnabled())
+			logger.debug(buildMessage(sender, msg));
+	}
+	
+	public void warn(Object sender, String msg) {
+		logger.warn(buildMessage(sender, msg));
+	}
+	
+	public void error(Object sender, String msg)
+	{	
+		logger.error(buildMessage(sender, msg));
+	}
+	
+	private String buildMessage(Object sender, String message) {
+		StringBuffer msg = new StringBuffer();
+		if(sender == null)
+			msg.append(appId);			
+		else
+			msg.append(sender.getClass().getName());		 
+		msg.append(delimiter).append(message);
+		return msg.toString();
+	}	
+	
+}

+ 0 - 0
wechat-common-tool/src/main/java/com/iamberry/app/tool/util/AES.java


Algúns arquivos non se mostraron porque demasiados arquivos cambiaron neste cambio