5 лет назад
Родитель
Сommit
7bda43405c
93 измененных файлов с 4120 добавлено и 0 удалено
  1. 3 0
      minigame/WebContent/META-INF/MANIFEST.MF
  2. BIN
      minigame/WebContent/WEB-INF/lib/DBPool-5.1.jar
  3. BIN
      minigame/WebContent/WEB-INF/lib/aopalliance-1.0.jar
  4. BIN
      minigame/WebContent/WEB-INF/lib/asm-all-3.0.jar
  5. BIN
      minigame/WebContent/WEB-INF/lib/backport-util-concurrent-3.1.jar
  6. BIN
      minigame/WebContent/WEB-INF/lib/cglib-2.2.2.jar
  7. BIN
      minigame/WebContent/WEB-INF/lib/commons-codec-1.10.jar
  8. BIN
      minigame/WebContent/WEB-INF/lib/commons-codec-1.9.jar
  9. BIN
      minigame/WebContent/WEB-INF/lib/commons-dbcp-1.4.jar
  10. BIN
      minigame/WebContent/WEB-INF/lib/commons-fileupload-1.2.2.jar
  11. BIN
      minigame/WebContent/WEB-INF/lib/commons-fileupload-1.3.1.jar
  12. BIN
      minigame/WebContent/WEB-INF/lib/commons-httpclient-3.1.jar
  13. BIN
      minigame/WebContent/WEB-INF/lib/commons-io-2.4.jar
  14. BIN
      minigame/WebContent/WEB-INF/lib/commons-lang-2.4-1.jar
  15. BIN
      minigame/WebContent/WEB-INF/lib/commons-logging-1.1.3.jar
  16. BIN
      minigame/WebContent/WEB-INF/lib/commons-pool-1.6.jar
  17. BIN
      minigame/WebContent/WEB-INF/lib/commons-pool2-2.3.jar
  18. BIN
      minigame/WebContent/WEB-INF/lib/dom4j-1.6.1.jar
  19. BIN
      minigame/WebContent/WEB-INF/lib/fastjson-1.1.24.jar
  20. BIN
      minigame/WebContent/WEB-INF/lib/fastjson-1.1.28.jar
  21. BIN
      minigame/WebContent/WEB-INF/lib/gson-2.2.2.jar
  22. BIN
      minigame/WebContent/WEB-INF/lib/httpclient-4.2.5.jar
  23. BIN
      minigame/WebContent/WEB-INF/lib/httpclient-cache-4.2.5.jar
  24. BIN
      minigame/WebContent/WEB-INF/lib/httpcore-4.2.4.jar
  25. BIN
      minigame/WebContent/WEB-INF/lib/httpmime-4.2.5.jar
  26. BIN
      minigame/WebContent/WEB-INF/lib/jackson-all-2.8.0.jar
  27. BIN
      minigame/WebContent/WEB-INF/lib/jai_codec.jar
  28. BIN
      minigame/WebContent/WEB-INF/lib/jai_core.jar
  29. BIN
      minigame/WebContent/WEB-INF/lib/jave-1.0.2.jar
  30. BIN
      minigame/WebContent/WEB-INF/lib/jaxen-1.1-beta-12.jar
  31. BIN
      minigame/WebContent/WEB-INF/lib/jdom.jar
  32. BIN
      minigame/WebContent/WEB-INF/lib/jedis-2.7.2.jar
  33. BIN
      minigame/WebContent/WEB-INF/lib/json.jar
  34. BIN
      minigame/WebContent/WEB-INF/lib/jstl.jar
  35. BIN
      minigame/WebContent/WEB-INF/lib/log4j-1.2.15.jar
  36. BIN
      minigame/WebContent/WEB-INF/lib/mybatis-3.1.1-SNAPSHOT.jar
  37. BIN
      minigame/WebContent/WEB-INF/lib/mybatis-spring-1.2.0.jar
  38. BIN
      minigame/WebContent/WEB-INF/lib/mysql-connector-java-5.1.31-bin.jar
  39. BIN
      minigame/WebContent/WEB-INF/lib/mysql-connector-java-5.1.34-bin.jar
  40. BIN
      minigame/WebContent/WEB-INF/lib/org.json.JsonObject.jar
  41. BIN
      minigame/WebContent/WEB-INF/lib/org.springframework.aop-3.1.1.RELEASE.jar
  42. BIN
      minigame/WebContent/WEB-INF/lib/org.springframework.asm-3.1.1.RELEASE.jar
  43. BIN
      minigame/WebContent/WEB-INF/lib/org.springframework.beans-3.1.1.RELEASE.jar
  44. BIN
      minigame/WebContent/WEB-INF/lib/org.springframework.context-3.1.1.RELEASE.jar
  45. BIN
      minigame/WebContent/WEB-INF/lib/org.springframework.core-3.1.1.RELEASE.jar
  46. BIN
      minigame/WebContent/WEB-INF/lib/org.springframework.expression-3.1.1.RELEASE.jar
  47. BIN
      minigame/WebContent/WEB-INF/lib/org.springframework.jdbc-3.1.1.RELEASE.jar
  48. BIN
      minigame/WebContent/WEB-INF/lib/org.springframework.transaction-3.1.1.RELEASE.jar
  49. BIN
      minigame/WebContent/WEB-INF/lib/org.springframework.web-3.1.1.RELEASE.jar
  50. BIN
      minigame/WebContent/WEB-INF/lib/org.springframework.web.servlet-3.1.1.RELEASE.jar
  51. BIN
      minigame/WebContent/WEB-INF/lib/pinyin4j-2.5.0.jar
  52. BIN
      minigame/WebContent/WEB-INF/lib/slf4j-api-1.6.6.jar
  53. BIN
      minigame/WebContent/WEB-INF/lib/slf4j-log4j12-1.6.6.jar
  54. BIN
      minigame/WebContent/WEB-INF/lib/spring-data-redis-1.6.0.RELEASE.jar
  55. BIN
      minigame/WebContent/WEB-INF/lib/spring-websocket-4.0.4.RELEASE.jar
  56. BIN
      minigame/WebContent/WEB-INF/lib/standard.jar
  57. BIN
      minigame/WebContent/WEB-INF/lib/taobao-sdk-java-auto_1455552377940-20160607.jar
  58. BIN
      minigame/WebContent/WEB-INF/lib/thumbnailator-0.4.8.jar
  59. BIN
      minigame/WebContent/WEB-INF/lib/ueditor-1.1.2.jar
  60. BIN
      minigame/WebContent/WEB-INF/lib/weixin-popular-2.8.28.jar
  61. BIN
      minigame/WebContent/WEB-INF/lib/xstream-1.2.jar
  62. 99 0
      minigame/WebContent/WEB-INF/web.xml
  63. 64 0
      minigame/WebContent/index.html
  64. 36 0
      minigame/WebContent/static/index.html
  65. 53 0
      minigame/src/applicationContext.xml
  66. 1 0
      minigame/src/com/estates/.gitignore
  67. 27 0
      minigame/src/com/estates/entity/vo/NewsVO.java
  68. 96 0
      minigame/src/com/estates/mapper/NewsMapper.java
  69. 301 0
      minigame/src/com/estates/mapper/NewsMapper.xml
  70. 96 0
      minigame/src/com/estates/mapper/UserMapper.java
  71. 301 0
      minigame/src/com/estates/mapper/UserMapper.xml
  72. 203 0
      minigame/src/com/estates/model/News.java
  73. 693 0
      minigame/src/com/estates/model/NewsExample.java
  74. 203 0
      minigame/src/com/estates/model/User.java
  75. 693 0
      minigame/src/com/estates/model/UserExample.java
  76. 25 0
      minigame/src/com/estates/service/NewsService.java
  77. 15 0
      minigame/src/com/estates/service/UserService.java
  78. 77 0
      minigame/src/com/estates/service/impl/NewsServiceImpl.java
  79. 17 0
      minigame/src/com/hhsx/constant/Constant.java
  80. 74 0
      minigame/src/com/hhsx/controller/NewsController.java
  81. 89 0
      minigame/src/com/hhsx/controller/UserController.java
  82. 18 0
      minigame/src/com/hhsx/minigame/service/impl/UserServiceImpl.java
  83. 51 0
      minigame/src/com/hhsx/utils/AccessToken.java
  84. 292 0
      minigame/src/com/hhsx/utils/HttpKit.java
  85. 39 0
      minigame/src/com/hhsx/utils/HttpRespMsg.java
  86. 217 0
      minigame/src/com/hhsx/utils/MicroblogUsersNews.java
  87. 32 0
      minigame/src/com/hhsx/utils/WechatAndMicroblogUtil.java
  88. 186 0
      minigame/src/com/hhsx/utils/WechatUserNews.java
  89. 2 0
      minigame/src/config.properties
  90. 39 0
      minigame/src/context-dispatcher.xml
  91. 21 0
      minigame/src/jdbc.properties
  92. 26 0
      minigame/src/log4j.properties
  93. 31 0
      minigame/src/spring-redis.xml

+ 3 - 0
minigame/WebContent/META-INF/MANIFEST.MF

@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+Class-Path: 
+

BIN
minigame/WebContent/WEB-INF/lib/DBPool-5.1.jar


BIN
minigame/WebContent/WEB-INF/lib/aopalliance-1.0.jar


BIN
minigame/WebContent/WEB-INF/lib/asm-all-3.0.jar


BIN
minigame/WebContent/WEB-INF/lib/backport-util-concurrent-3.1.jar


BIN
minigame/WebContent/WEB-INF/lib/cglib-2.2.2.jar


BIN
minigame/WebContent/WEB-INF/lib/commons-codec-1.10.jar


BIN
minigame/WebContent/WEB-INF/lib/commons-codec-1.9.jar


BIN
minigame/WebContent/WEB-INF/lib/commons-dbcp-1.4.jar


BIN
minigame/WebContent/WEB-INF/lib/commons-fileupload-1.2.2.jar


BIN
minigame/WebContent/WEB-INF/lib/commons-fileupload-1.3.1.jar


BIN
minigame/WebContent/WEB-INF/lib/commons-httpclient-3.1.jar


BIN
minigame/WebContent/WEB-INF/lib/commons-io-2.4.jar


BIN
minigame/WebContent/WEB-INF/lib/commons-lang-2.4-1.jar


BIN
minigame/WebContent/WEB-INF/lib/commons-logging-1.1.3.jar


BIN
minigame/WebContent/WEB-INF/lib/commons-pool-1.6.jar


BIN
minigame/WebContent/WEB-INF/lib/commons-pool2-2.3.jar


BIN
minigame/WebContent/WEB-INF/lib/dom4j-1.6.1.jar


BIN
minigame/WebContent/WEB-INF/lib/fastjson-1.1.24.jar


BIN
minigame/WebContent/WEB-INF/lib/fastjson-1.1.28.jar


BIN
minigame/WebContent/WEB-INF/lib/gson-2.2.2.jar


BIN
minigame/WebContent/WEB-INF/lib/httpclient-4.2.5.jar


BIN
minigame/WebContent/WEB-INF/lib/httpclient-cache-4.2.5.jar


BIN
minigame/WebContent/WEB-INF/lib/httpcore-4.2.4.jar


BIN
minigame/WebContent/WEB-INF/lib/httpmime-4.2.5.jar


BIN
minigame/WebContent/WEB-INF/lib/jackson-all-2.8.0.jar


BIN
minigame/WebContent/WEB-INF/lib/jai_codec.jar


BIN
minigame/WebContent/WEB-INF/lib/jai_core.jar


BIN
minigame/WebContent/WEB-INF/lib/jave-1.0.2.jar


BIN
minigame/WebContent/WEB-INF/lib/jaxen-1.1-beta-12.jar


BIN
minigame/WebContent/WEB-INF/lib/jdom.jar


BIN
minigame/WebContent/WEB-INF/lib/jedis-2.7.2.jar


BIN
minigame/WebContent/WEB-INF/lib/json.jar


BIN
minigame/WebContent/WEB-INF/lib/jstl.jar


BIN
minigame/WebContent/WEB-INF/lib/log4j-1.2.15.jar


BIN
minigame/WebContent/WEB-INF/lib/mybatis-3.1.1-SNAPSHOT.jar


BIN
minigame/WebContent/WEB-INF/lib/mybatis-spring-1.2.0.jar


BIN
minigame/WebContent/WEB-INF/lib/mysql-connector-java-5.1.31-bin.jar


BIN
minigame/WebContent/WEB-INF/lib/mysql-connector-java-5.1.34-bin.jar


BIN
minigame/WebContent/WEB-INF/lib/org.json.JsonObject.jar


BIN
minigame/WebContent/WEB-INF/lib/org.springframework.aop-3.1.1.RELEASE.jar


BIN
minigame/WebContent/WEB-INF/lib/org.springframework.asm-3.1.1.RELEASE.jar


BIN
minigame/WebContent/WEB-INF/lib/org.springframework.beans-3.1.1.RELEASE.jar


BIN
minigame/WebContent/WEB-INF/lib/org.springframework.context-3.1.1.RELEASE.jar


BIN
minigame/WebContent/WEB-INF/lib/org.springframework.core-3.1.1.RELEASE.jar


BIN
minigame/WebContent/WEB-INF/lib/org.springframework.expression-3.1.1.RELEASE.jar


BIN
minigame/WebContent/WEB-INF/lib/org.springframework.jdbc-3.1.1.RELEASE.jar


BIN
minigame/WebContent/WEB-INF/lib/org.springframework.transaction-3.1.1.RELEASE.jar


BIN
minigame/WebContent/WEB-INF/lib/org.springframework.web-3.1.1.RELEASE.jar


BIN
minigame/WebContent/WEB-INF/lib/org.springframework.web.servlet-3.1.1.RELEASE.jar


BIN
minigame/WebContent/WEB-INF/lib/pinyin4j-2.5.0.jar


BIN
minigame/WebContent/WEB-INF/lib/slf4j-api-1.6.6.jar


BIN
minigame/WebContent/WEB-INF/lib/slf4j-log4j12-1.6.6.jar


BIN
minigame/WebContent/WEB-INF/lib/spring-data-redis-1.6.0.RELEASE.jar


BIN
minigame/WebContent/WEB-INF/lib/spring-websocket-4.0.4.RELEASE.jar


BIN
minigame/WebContent/WEB-INF/lib/standard.jar


BIN
minigame/WebContent/WEB-INF/lib/taobao-sdk-java-auto_1455552377940-20160607.jar


BIN
minigame/WebContent/WEB-INF/lib/thumbnailator-0.4.8.jar


BIN
minigame/WebContent/WEB-INF/lib/ueditor-1.1.2.jar


BIN
minigame/WebContent/WEB-INF/lib/weixin-popular-2.8.28.jar


BIN
minigame/WebContent/WEB-INF/lib/xstream-1.2.jar


+ 99 - 0
minigame/WebContent/WEB-INF/web.xml

@@ -0,0 +1,99 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xmlns="http://java.sun.com/xml/ns/javaee"
+	xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
+	xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
+	id="WebApp_ID" version="2.5">
+	<display-name>minigame</display-name>
+	<welcome-file-list>
+		<welcome-file>/view/home.jsp</welcome-file>
+	</welcome-file-list>
+	<error-page>
+    <error-code>404</error-code>
+	    <location>/view/errorPage.jsp</location>
+	</error-page>
+	<context-param>
+		<param-name>contextConfigLocation</param-name>
+		<param-value>classpath:applicationContext.xml</param-value>
+	</context-param>
+	<listener>
+		<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
+	</listener>
+	<filter>
+		<filter-name>CharacterEncodingFilter</filter-name>
+		<filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>
+		<init-param>
+			<param-name>encoding</param-name>
+			<param-value>utf-8</param-value>
+		</init-param>
+		<init-param>
+			<param-name>forceEncoding</param-name>
+			<param-value>true</param-value>
+		</init-param>
+	</filter>
+	<filter-mapping>
+		<filter-name>CharacterEncodingFilter</filter-name>
+		<url-pattern>/*</url-pattern>
+	</filter-mapping>
+	<servlet>
+		<servlet-name>spring</servlet-name>
+		<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
+		<init-param>
+			<param-name>contextConfigLocation</param-name>
+			<param-value>classpath:context-dispatcher.xml</param-value>
+		</init-param>
+	</servlet>
+	<servlet-mapping>
+		<servlet-name>spring</servlet-name>
+		<url-pattern>/</url-pattern>
+	</servlet-mapping>
+	<!-- 登陆身份过滤器 -->
+	<filter>
+		<filter-name>loginFilter</filter-name>
+		<filter-class>com.estates.filter.LoginFilter</filter-class>
+		<init-param>
+			<param-name>passUrl</param-name>
+			<param-value>/system/sysLogin;login.html;</param-value>
+		</init-param>
+	</filter>
+	<filter-mapping>
+		<filter-name>loginFilter</filter-name>
+		<url-pattern>*</url-pattern>
+	</filter-mapping>
+	<servlet-mapping>
+		<servlet-name>default</servlet-name>
+		<url-pattern>*.jpg</url-pattern>
+	</servlet-mapping>
+	<servlet-mapping>
+		<servlet-name>default</servlet-name>
+		<url-pattern>*.JPG</url-pattern>
+	</servlet-mapping>
+	<servlet-mapping>
+		<servlet-name>default</servlet-name>
+		<url-pattern>*.jpeg</url-pattern>
+	</servlet-mapping>
+	<servlet-mapping>
+		<servlet-name>default</servlet-name>
+		<url-pattern>*.JPEG</url-pattern>
+	</servlet-mapping>
+	<servlet-mapping>
+		<servlet-name>default</servlet-name>
+		<url-pattern>*.js</url-pattern>
+	</servlet-mapping>
+	<servlet-mapping>
+		<servlet-name>default</servlet-name>
+		<url-pattern>*.css</url-pattern>
+	</servlet-mapping>
+	<servlet-mapping>
+		<servlet-name>default</servlet-name>
+		<url-pattern>*.png</url-pattern>
+	</servlet-mapping>
+	<servlet-mapping>
+		<servlet-name>default</servlet-name>
+		<url-pattern>*.html</url-pattern>
+	</servlet-mapping>
+	<servlet-mapping>
+		<servlet-name>default</servlet-name>
+		<url-pattern>*.gif</url-pattern>
+	</servlet-mapping>
+</web-app>

+ 64 - 0
minigame/WebContent/index.html

@@ -0,0 +1,64 @@
+<!DOCTYPE html>
+<html>
+<head>
+    <meta charset="UTF-8">
+    <title>测试用页面</title>
+    <script src="https://code.jquery.com/jquery-3.1.1.min.js"></script>
+    <script src="http://res.wx.qq.com/connect/zh_CN/htmledition/js/wxLogin.js"></script>
+    <style>
+        div, a {
+            font-size: 60px;
+        }
+    </style>
+</head>
+<body>
+<div>
+    <a onclick="getMsgByWX()">获取微信数据</a>
+</div>
+<br>
+<div>
+    <a onclick="getMsgByWB()">获取微博数据</a>
+</div>
+<script>
+    function getMsgByWX() {
+    }
+
+    function getMsgByWB() {
+    }
+
+    (function() {
+        if (!!navigator.userAgent.match(/AppleWebKit.*Mobile.*/)) {
+            var ua = navigator.userAgent.toLowerCase() , url = "";
+            // if (ua.match(/MicroMessenger/i) == "micromessenger") {
+                alert("微信浏览器中打开");
+                url = "https://open.weixin.qq.com/connect/oauth2/authorize?"
+                        +"appid=wx749c84daac654e1e&"
+                        +"redirect_uri=wx.ttkuaiban.com&"
+                        +"response_type=code&"
+                        +"scope=snsapi_base&"
+                        +"state=STATE#wechat_redirect";
+                //https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx749c84daac654e1e&redirect_uri=wx.ttkuaiban.com&response_type=code&scope=snsapi_base&state=STATE#wechat_redirect
+            // }
+
+            if (ua.match(/WeiBo/i) == "weibo") {
+                alert("在新浪微博客户端打开");
+                url = "https://api.weibo.cn/oauth2/authorize?"
+                    +"client_id=2141531565&"
+                    +"display=mobile&"
+                    +"response_type=code&"
+                    +"redirect_uri=code&"
+                    +"scope=snsapi_base";
+            }
+
+            //window.location.href = url;
+            $.get(url ,function(data,status){
+                console.log("Data: " + data + "nStatus: " + status);
+                $.post("demo_ajax_gethint.html",{suggest:txt},function(result){
+                    $("span").html(result);
+                });
+            });
+        }
+    })()
+</script>
+</body>
+</html>

+ 36 - 0
minigame/WebContent/static/index.html

@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+    <meta charset="UTF-8">
+    <title>Title</title>
+	<script>
+	//初始化用户信息数据
+	window.user_info = {
+		logo:'http://img5q.duitang.com/uploads/item/201502/25/20150225060808_wuANL.jpeg',//用户头像
+		nickname:'不羡鸳鸯',//用户昵称,
+		textmsg:'GOOD GOOD STUDY,DAY DAY UP'//寄语
+	};
+
+	//获取URL参数 url格式xxx=yyyy&xxx1=yyy1
+	//通过act 确定是否是海报页,act=hbshare 代表是海报页
+	var URLParams = new Array();  
+	var params = document.location.search.substr(1).split('&');   
+	for (i=0; i < params.length ; i++){  
+		var aParam = params[i].split('=');   
+		URLParams[aParam[0]] = aParam[1];   
+	}
+	if(URLParams['act']=='hbshare'){
+		document.write('<h1>这里是海报页</h1>');
+		document.write('头像<img src="'+window.user_info.logo+'" width=40 height=40 /><br>');
+		document.write('昵称:'+window.user_info.nickname+'<br>');
+		document.write('寄语:'+window.user_info.textmsg);
+	}else{
+		document.write('<h1>这是首页哦</h1>');
+	}
+	</script>
+</head>
+<body>
+
+
+</body>
+</html>

+ 53 - 0
minigame/src/applicationContext.xml

@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xmlns:p="http://www.springframework.org/schema/p"
+	xmlns:context="http://www.springframework.org/schema/context"
+	xmlns:tx="http://www.springframework.org/schema/tx"
+	xmlns:task="http://www.springframework.org/schema/task"
+	xsi:schemaLocation="
+	http://www.springframework.org/schema/beans 
+	http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
+	http://www.springframework.org/schema/tx 
+	http://www.springframework.org/schema/tx/spring-tx-3.0.xsd 
+	http://www.springframework.org/schema/context 
+	http://www.springframework.org/schema/context/spring-context-3.0.xsd
+	http://www.springframework.org/schema/task 
+	http://www.springframework.org/schema/task/spring-task.xsd">
+
+	<!-- 引入jdbc配置文件 -->
+	<context:property-placeholder
+		location="classpath:jdbc.properties" />
+
+	<!--创建jdbc数据源 -->
+	<bean id="dataSource"
+		class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
+		<property name="driverClassName" value="${driver}" />
+		<property name="url" value="${url}" />
+		<property name="username" value="${username}" />
+		<property name="password" value="${password}" />
+	</bean>
+
+	<!-- (事务管理)transaction manager, use JtaTransactionManager for global tx -->
+	<bean id="transactionManager"
+		class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
+		<property name="dataSource" ref="dataSource" />
+	</bean>
+
+	<!-- 创建SqlSessionFactory,同时指定数据源 -->
+	<bean id="sqlSessionFactory"
+		class="org.mybatis.spring.SqlSessionFactoryBean">
+		<property name="dataSource" ref="dataSource" />
+	</bean>
+	<!-- 可通过注解控制事务 -->
+	<tx:annotation-driven />
+
+	<!-- Mapper接口所在包名,Spring会自动查找其下的Mapper -->
+	<bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">
+		<property name="basePackage" value="com.estates.mapper" />
+	</bean>
+	<context:component-scan
+		base-package="com.estates.task" />
+	<task:annotation-driven />
+	<import resource="spring-redis.xml" />
+</beans>

+ 1 - 0
minigame/src/com/estates/.gitignore

@@ -0,0 +1 @@
+/UserTempGenConfig.xml

+ 27 - 0
minigame/src/com/estates/entity/vo/NewsVO.java

@@ -0,0 +1,27 @@
+package com.estates.entity.vo;
+
+import com.estates.model.News;
+
+public class NewsVO extends News{
+	
+	 private String openId;//用户openid
+
+	    private String uid;//微博身份唯一凭证
+
+		public String getOpenId() {
+			return openId;
+		}
+
+		public void setOpenId(String openId) {
+			this.openId = openId;
+		}
+
+		public String getUid() {
+			return uid;
+		}
+
+		public void setUid(String uid) {
+			this.uid = uid;
+		}
+
+}

+ 96 - 0
minigame/src/com/estates/mapper/NewsMapper.java

@@ -0,0 +1,96 @@
+package com.estates.mapper;
+
+import com.estates.model.News;
+import com.estates.model.NewsExample;
+import java.util.List;
+import org.apache.ibatis.annotations.Param;
+
+public interface NewsMapper {
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table mini_news
+     *
+     * @mbg.generated Wed Sep 18 15:21:50 CST 2019
+     */
+    long countByExample(NewsExample example);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table mini_news
+     *
+     * @mbg.generated Wed Sep 18 15:21:50 CST 2019
+     */
+    int deleteByExample(NewsExample example);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table mini_news
+     *
+     * @mbg.generated Wed Sep 18 15:21:50 CST 2019
+     */
+    int deleteByPrimaryKey(Integer id);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table mini_news
+     *
+     * @mbg.generated Wed Sep 18 15:21:50 CST 2019
+     */
+    int insert(News record);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table mini_news
+     *
+     * @mbg.generated Wed Sep 18 15:21:50 CST 2019
+     */
+    int insertSelective(News record);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table mini_news
+     *
+     * @mbg.generated Wed Sep 18 15:21:50 CST 2019
+     */
+    List<News> selectByExample(NewsExample example);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table mini_news
+     *
+     * @mbg.generated Wed Sep 18 15:21:50 CST 2019
+     */
+    News selectByPrimaryKey(Integer id);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table mini_news
+     *
+     * @mbg.generated Wed Sep 18 15:21:50 CST 2019
+     */
+    int updateByExampleSelective(@Param("record") News record, @Param("example") NewsExample example);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table mini_news
+     *
+     * @mbg.generated Wed Sep 18 15:21:50 CST 2019
+     */
+    int updateByExample(@Param("record") News record, @Param("example") NewsExample example);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table mini_news
+     *
+     * @mbg.generated Wed Sep 18 15:21:50 CST 2019
+     */
+    int updateByPrimaryKeySelective(News record);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table mini_news
+     *
+     * @mbg.generated Wed Sep 18 15:21:50 CST 2019
+     */
+    int updateByPrimaryKey(News record);
+}

+ 301 - 0
minigame/src/com/estates/mapper/NewsMapper.xml

@@ -0,0 +1,301 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.estates.mapper.NewsMapper">
+  <resultMap id="BaseResultMap" type="com.estates.model.News">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Wed Sep 18 15:21:50 CST 2019.
+    -->
+    <id column="id" jdbcType="INTEGER" property="id" />
+    <result column="nick_name" jdbcType="VARCHAR" property="nickName" />
+    <result column="header_pic" jdbcType="VARCHAR" property="headerPic" />
+    <result column="indate" jdbcType="TIMESTAMP" property="indate" />
+    <result column="type" jdbcType="INTEGER" property="type" />
+    <result column="message" jdbcType="VARCHAR" property="message" />
+  </resultMap>
+  <sql id="Example_Where_Clause">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Wed Sep 18 15:21:50 CST 2019.
+    -->
+    <where>
+      <foreach collection="oredCriteria" item="criteria" separator="or">
+        <if test="criteria.valid">
+          <trim prefix="(" prefixOverrides="and" suffix=")">
+            <foreach collection="criteria.criteria" item="criterion">
+              <choose>
+                <when test="criterion.noValue">
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue">
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue">
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue">
+                  and ${criterion.condition}
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Update_By_Example_Where_Clause">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Wed Sep 18 15:21:50 CST 2019.
+    -->
+    <where>
+      <foreach collection="example.oredCriteria" item="criteria" separator="or">
+        <if test="criteria.valid">
+          <trim prefix="(" prefixOverrides="and" suffix=")">
+            <foreach collection="criteria.criteria" item="criterion">
+              <choose>
+                <when test="criterion.noValue">
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue">
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue">
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue">
+                  and ${criterion.condition}
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Base_Column_List">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Wed Sep 18 15:21:50 CST 2019.
+    -->
+    id, nick_name, header_pic, indate, type, message
+  </sql>
+  <select id="selectByExample" parameterType="com.estates.model.NewsExample" resultMap="BaseResultMap">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Wed Sep 18 15:21:50 CST 2019.
+    -->
+    select
+    <if test="distinct">
+      distinct
+    </if>
+    <include refid="Base_Column_List" />
+    from mini_news
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+    <if test="orderByClause != null">
+      order by ${orderByClause}
+    </if>
+  </select>
+  <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Wed Sep 18 15:21:50 CST 2019.
+    -->
+    select 
+    <include refid="Base_Column_List" />
+    from mini_news
+    where id = #{id,jdbcType=INTEGER}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Wed Sep 18 15:21:50 CST 2019.
+    -->
+    delete from mini_news
+    where id = #{id,jdbcType=INTEGER}
+  </delete>
+  <delete id="deleteByExample" parameterType="com.estates.model.NewsExample">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Wed Sep 18 15:21:50 CST 2019.
+    -->
+    delete from mini_news
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </delete>
+  <insert id="insert" parameterType="com.estates.model.News">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Wed Sep 18 15:21:50 CST 2019.
+    -->
+    <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Integer">
+      SELECT LAST_INSERT_ID()
+    </selectKey>
+    insert into mini_news (nick_name, header_pic, indate, 
+      type, message)
+    values (#{nickName,jdbcType=VARCHAR}, #{headerPic,jdbcType=VARCHAR}, #{indate,jdbcType=TIMESTAMP}, 
+      #{type,jdbcType=INTEGER}, #{message,jdbcType=VARCHAR})
+  </insert>
+  <insert id="insertSelective" parameterType="com.estates.model.News">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Wed Sep 18 15:21:50 CST 2019.
+    -->
+    <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Integer">
+      SELECT LAST_INSERT_ID()
+    </selectKey>
+    insert into mini_news
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="nickName != null">
+        nick_name,
+      </if>
+      <if test="headerPic != null">
+        header_pic,
+      </if>
+      <if test="indate != null">
+        indate,
+      </if>
+      <if test="type != null">
+        type,
+      </if>
+      <if test="message != null">
+        message,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="nickName != null">
+        #{nickName,jdbcType=VARCHAR},
+      </if>
+      <if test="headerPic != null">
+        #{headerPic,jdbcType=VARCHAR},
+      </if>
+      <if test="indate != null">
+        #{indate,jdbcType=TIMESTAMP},
+      </if>
+      <if test="type != null">
+        #{type,jdbcType=INTEGER},
+      </if>
+      <if test="message != null">
+        #{message,jdbcType=VARCHAR},
+      </if>
+    </trim>
+  </insert>
+  <select id="countByExample" parameterType="com.estates.model.NewsExample" resultType="java.lang.Long">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Wed Sep 18 15:21:50 CST 2019.
+    -->
+    select count(*) from mini_news
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </select>
+  <update id="updateByExampleSelective" parameterType="map">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Wed Sep 18 15:21:50 CST 2019.
+    -->
+    update mini_news
+    <set>
+      <if test="record.id != null">
+        id = #{record.id,jdbcType=INTEGER},
+      </if>
+      <if test="record.nickName != null">
+        nick_name = #{record.nickName,jdbcType=VARCHAR},
+      </if>
+      <if test="record.headerPic != null">
+        header_pic = #{record.headerPic,jdbcType=VARCHAR},
+      </if>
+      <if test="record.indate != null">
+        indate = #{record.indate,jdbcType=TIMESTAMP},
+      </if>
+      <if test="record.type != null">
+        type = #{record.type,jdbcType=INTEGER},
+      </if>
+      <if test="record.message != null">
+        message = #{record.message,jdbcType=VARCHAR},
+      </if>
+    </set>
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByExample" parameterType="map">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Wed Sep 18 15:21:50 CST 2019.
+    -->
+    update mini_news
+    set id = #{record.id,jdbcType=INTEGER},
+      nick_name = #{record.nickName,jdbcType=VARCHAR},
+      header_pic = #{record.headerPic,jdbcType=VARCHAR},
+      indate = #{record.indate,jdbcType=TIMESTAMP},
+      type = #{record.type,jdbcType=INTEGER},
+      message = #{record.message,jdbcType=VARCHAR}
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.estates.model.News">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Wed Sep 18 15:21:50 CST 2019.
+    -->
+    update mini_news
+    <set>
+      <if test="nickName != null">
+        nick_name = #{nickName,jdbcType=VARCHAR},
+      </if>
+      <if test="headerPic != null">
+        header_pic = #{headerPic,jdbcType=VARCHAR},
+      </if>
+      <if test="indate != null">
+        indate = #{indate,jdbcType=TIMESTAMP},
+      </if>
+      <if test="type != null">
+        type = #{type,jdbcType=INTEGER},
+      </if>
+      <if test="message != null">
+        message = #{message,jdbcType=VARCHAR},
+      </if>
+    </set>
+    where id = #{id,jdbcType=INTEGER}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.estates.model.News">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Wed Sep 18 15:21:50 CST 2019.
+    -->
+    update mini_news
+    set nick_name = #{nickName,jdbcType=VARCHAR},
+      header_pic = #{headerPic,jdbcType=VARCHAR},
+      indate = #{indate,jdbcType=TIMESTAMP},
+      type = #{type,jdbcType=INTEGER},
+      message = #{message,jdbcType=VARCHAR}
+    where id = #{id,jdbcType=INTEGER}
+  </update>
+</mapper>

+ 96 - 0
minigame/src/com/estates/mapper/UserMapper.java

@@ -0,0 +1,96 @@
+package com.estates.mapper;
+
+import com.estates.model.User;
+import com.estates.model.UserExample;
+import java.util.List;
+import org.apache.ibatis.annotations.Param;
+
+public interface UserMapper {
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table mini_user
+     *
+     * @mbg.generated Wed Sep 18 15:23:03 CST 2019
+     */
+    long countByExample(UserExample example);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table mini_user
+     *
+     * @mbg.generated Wed Sep 18 15:23:03 CST 2019
+     */
+    int deleteByExample(UserExample example);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table mini_user
+     *
+     * @mbg.generated Wed Sep 18 15:23:03 CST 2019
+     */
+    int deleteByPrimaryKey(Integer id);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table mini_user
+     *
+     * @mbg.generated Wed Sep 18 15:23:03 CST 2019
+     */
+    int insert(User record);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table mini_user
+     *
+     * @mbg.generated Wed Sep 18 15:23:03 CST 2019
+     */
+    int insertSelective(User record);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table mini_user
+     *
+     * @mbg.generated Wed Sep 18 15:23:03 CST 2019
+     */
+    List<User> selectByExample(UserExample example);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table mini_user
+     *
+     * @mbg.generated Wed Sep 18 15:23:03 CST 2019
+     */
+    User selectByPrimaryKey(Integer id);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table mini_user
+     *
+     * @mbg.generated Wed Sep 18 15:23:03 CST 2019
+     */
+    int updateByExampleSelective(@Param("record") User record, @Param("example") UserExample example);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table mini_user
+     *
+     * @mbg.generated Wed Sep 18 15:23:03 CST 2019
+     */
+    int updateByExample(@Param("record") User record, @Param("example") UserExample example);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table mini_user
+     *
+     * @mbg.generated Wed Sep 18 15:23:03 CST 2019
+     */
+    int updateByPrimaryKeySelective(User record);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table mini_user
+     *
+     * @mbg.generated Wed Sep 18 15:23:03 CST 2019
+     */
+    int updateByPrimaryKey(User record);
+}

+ 301 - 0
minigame/src/com/estates/mapper/UserMapper.xml

@@ -0,0 +1,301 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.estates.mapper.UserMapper">
+  <resultMap id="BaseResultMap" type="com.estates.model.User">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Wed Sep 18 15:23:03 CST 2019.
+    -->
+    <id column="id" jdbcType="INTEGER" property="id" />
+    <result column="type" jdbcType="INTEGER" property="type" />
+    <result column="voucher_id" jdbcType="VARCHAR" property="voucherId" />
+    <result column="indate" jdbcType="TIMESTAMP" property="indate" />
+    <result column="header_pic" jdbcType="VARCHAR" property="headerPic" />
+    <result column="nick_name" jdbcType="VARCHAR" property="nickName" />
+  </resultMap>
+  <sql id="Example_Where_Clause">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Wed Sep 18 15:23:03 CST 2019.
+    -->
+    <where>
+      <foreach collection="oredCriteria" item="criteria" separator="or">
+        <if test="criteria.valid">
+          <trim prefix="(" prefixOverrides="and" suffix=")">
+            <foreach collection="criteria.criteria" item="criterion">
+              <choose>
+                <when test="criterion.noValue">
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue">
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue">
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue">
+                  and ${criterion.condition}
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Update_By_Example_Where_Clause">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Wed Sep 18 15:23:03 CST 2019.
+    -->
+    <where>
+      <foreach collection="example.oredCriteria" item="criteria" separator="or">
+        <if test="criteria.valid">
+          <trim prefix="(" prefixOverrides="and" suffix=")">
+            <foreach collection="criteria.criteria" item="criterion">
+              <choose>
+                <when test="criterion.noValue">
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue">
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue">
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue">
+                  and ${criterion.condition}
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Base_Column_List">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Wed Sep 18 15:23:03 CST 2019.
+    -->
+    id, type, voucher_id, indate, header_pic, nick_name
+  </sql>
+  <select id="selectByExample" parameterType="com.estates.model.UserExample" resultMap="BaseResultMap">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Wed Sep 18 15:23:03 CST 2019.
+    -->
+    select
+    <if test="distinct">
+      distinct
+    </if>
+    <include refid="Base_Column_List" />
+    from mini_user
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+    <if test="orderByClause != null">
+      order by ${orderByClause}
+    </if>
+  </select>
+  <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Wed Sep 18 15:23:03 CST 2019.
+    -->
+    select 
+    <include refid="Base_Column_List" />
+    from mini_user
+    where id = #{id,jdbcType=INTEGER}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Wed Sep 18 15:23:03 CST 2019.
+    -->
+    delete from mini_user
+    where id = #{id,jdbcType=INTEGER}
+  </delete>
+  <delete id="deleteByExample" parameterType="com.estates.model.UserExample">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Wed Sep 18 15:23:03 CST 2019.
+    -->
+    delete from mini_user
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </delete>
+  <insert id="insert" parameterType="com.estates.model.User">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Wed Sep 18 15:23:03 CST 2019.
+    -->
+    <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Integer">
+      SELECT LAST_INSERT_ID()
+    </selectKey>
+    insert into mini_user (type, voucher_id, indate, 
+      header_pic, nick_name)
+    values (#{type,jdbcType=INTEGER}, #{voucherId,jdbcType=VARCHAR}, #{indate,jdbcType=TIMESTAMP}, 
+      #{headerPic,jdbcType=VARCHAR}, #{nickName,jdbcType=VARCHAR})
+  </insert>
+  <insert id="insertSelective" parameterType="com.estates.model.User">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Wed Sep 18 15:23:03 CST 2019.
+    -->
+    <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Integer">
+      SELECT LAST_INSERT_ID()
+    </selectKey>
+    insert into mini_user
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="type != null">
+        type,
+      </if>
+      <if test="voucherId != null">
+        voucher_id,
+      </if>
+      <if test="indate != null">
+        indate,
+      </if>
+      <if test="headerPic != null">
+        header_pic,
+      </if>
+      <if test="nickName != null">
+        nick_name,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="type != null">
+        #{type,jdbcType=INTEGER},
+      </if>
+      <if test="voucherId != null">
+        #{voucherId,jdbcType=VARCHAR},
+      </if>
+      <if test="indate != null">
+        #{indate,jdbcType=TIMESTAMP},
+      </if>
+      <if test="headerPic != null">
+        #{headerPic,jdbcType=VARCHAR},
+      </if>
+      <if test="nickName != null">
+        #{nickName,jdbcType=VARCHAR},
+      </if>
+    </trim>
+  </insert>
+  <select id="countByExample" parameterType="com.estates.model.UserExample" resultType="java.lang.Long">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Wed Sep 18 15:23:03 CST 2019.
+    -->
+    select count(*) from mini_user
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </select>
+  <update id="updateByExampleSelective" parameterType="map">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Wed Sep 18 15:23:03 CST 2019.
+    -->
+    update mini_user
+    <set>
+      <if test="record.id != null">
+        id = #{record.id,jdbcType=INTEGER},
+      </if>
+      <if test="record.type != null">
+        type = #{record.type,jdbcType=INTEGER},
+      </if>
+      <if test="record.voucherId != null">
+        voucher_id = #{record.voucherId,jdbcType=VARCHAR},
+      </if>
+      <if test="record.indate != null">
+        indate = #{record.indate,jdbcType=TIMESTAMP},
+      </if>
+      <if test="record.headerPic != null">
+        header_pic = #{record.headerPic,jdbcType=VARCHAR},
+      </if>
+      <if test="record.nickName != null">
+        nick_name = #{record.nickName,jdbcType=VARCHAR},
+      </if>
+    </set>
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByExample" parameterType="map">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Wed Sep 18 15:23:03 CST 2019.
+    -->
+    update mini_user
+    set id = #{record.id,jdbcType=INTEGER},
+      type = #{record.type,jdbcType=INTEGER},
+      voucher_id = #{record.voucherId,jdbcType=VARCHAR},
+      indate = #{record.indate,jdbcType=TIMESTAMP},
+      header_pic = #{record.headerPic,jdbcType=VARCHAR},
+      nick_name = #{record.nickName,jdbcType=VARCHAR}
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.estates.model.User">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Wed Sep 18 15:23:03 CST 2019.
+    -->
+    update mini_user
+    <set>
+      <if test="type != null">
+        type = #{type,jdbcType=INTEGER},
+      </if>
+      <if test="voucherId != null">
+        voucher_id = #{voucherId,jdbcType=VARCHAR},
+      </if>
+      <if test="indate != null">
+        indate = #{indate,jdbcType=TIMESTAMP},
+      </if>
+      <if test="headerPic != null">
+        header_pic = #{headerPic,jdbcType=VARCHAR},
+      </if>
+      <if test="nickName != null">
+        nick_name = #{nickName,jdbcType=VARCHAR},
+      </if>
+    </set>
+    where id = #{id,jdbcType=INTEGER}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.estates.model.User">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Wed Sep 18 15:23:03 CST 2019.
+    -->
+    update mini_user
+    set type = #{type,jdbcType=INTEGER},
+      voucher_id = #{voucherId,jdbcType=VARCHAR},
+      indate = #{indate,jdbcType=TIMESTAMP},
+      header_pic = #{headerPic,jdbcType=VARCHAR},
+      nick_name = #{nickName,jdbcType=VARCHAR}
+    where id = #{id,jdbcType=INTEGER}
+  </update>
+</mapper>

+ 203 - 0
minigame/src/com/estates/model/News.java

@@ -0,0 +1,203 @@
+package com.estates.model;
+
+import java.util.Date;
+
+public class News {
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column mini_news.id
+     *
+     * @mbg.generated Wed Sep 18 15:21:50 CST 2019
+     */
+    private Integer id;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column mini_news.nick_name
+     *
+     * @mbg.generated Wed Sep 18 15:21:50 CST 2019
+     */
+    private String nickName;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column mini_news.header_pic
+     *
+     * @mbg.generated Wed Sep 18 15:21:50 CST 2019
+     */
+    private String headerPic;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column mini_news.indate
+     *
+     * @mbg.generated Wed Sep 18 15:21:50 CST 2019
+     */
+    private Date indate;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column mini_news.type
+     *
+     * @mbg.generated Wed Sep 18 15:21:50 CST 2019
+     */
+    private Integer type;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column mini_news.message
+     *
+     * @mbg.generated Wed Sep 18 15:21:50 CST 2019
+     */
+    private String message;
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column mini_news.id
+     *
+     * @return the value of mini_news.id
+     *
+     * @mbg.generated Wed Sep 18 15:21:50 CST 2019
+     */
+    public Integer getId() {
+        return id;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column mini_news.id
+     *
+     * @param id the value for mini_news.id
+     *
+     * @mbg.generated Wed Sep 18 15:21:50 CST 2019
+     */
+    public void setId(Integer id) {
+        this.id = id;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column mini_news.nick_name
+     *
+     * @return the value of mini_news.nick_name
+     *
+     * @mbg.generated Wed Sep 18 15:21:50 CST 2019
+     */
+    public String getNickName() {
+        return nickName;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column mini_news.nick_name
+     *
+     * @param nickName the value for mini_news.nick_name
+     *
+     * @mbg.generated Wed Sep 18 15:21:50 CST 2019
+     */
+    public void setNickName(String nickName) {
+        this.nickName = nickName;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column mini_news.header_pic
+     *
+     * @return the value of mini_news.header_pic
+     *
+     * @mbg.generated Wed Sep 18 15:21:50 CST 2019
+     */
+    public String getHeaderPic() {
+        return headerPic;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column mini_news.header_pic
+     *
+     * @param headerPic the value for mini_news.header_pic
+     *
+     * @mbg.generated Wed Sep 18 15:21:50 CST 2019
+     */
+    public void setHeaderPic(String headerPic) {
+        this.headerPic = headerPic;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column mini_news.indate
+     *
+     * @return the value of mini_news.indate
+     *
+     * @mbg.generated Wed Sep 18 15:21:50 CST 2019
+     */
+    public Date getIndate() {
+        return indate;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column mini_news.indate
+     *
+     * @param indate the value for mini_news.indate
+     *
+     * @mbg.generated Wed Sep 18 15:21:50 CST 2019
+     */
+    public void setIndate(Date indate) {
+        this.indate = indate;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column mini_news.type
+     *
+     * @return the value of mini_news.type
+     *
+     * @mbg.generated Wed Sep 18 15:21:50 CST 2019
+     */
+    public Integer getType() {
+        return type;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column mini_news.type
+     *
+     * @param type the value for mini_news.type
+     *
+     * @mbg.generated Wed Sep 18 15:21:50 CST 2019
+     */
+    public void setType(Integer type) {
+        this.type = type;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column mini_news.message
+     *
+     * @return the value of mini_news.message
+     *
+     * @mbg.generated Wed Sep 18 15:21:50 CST 2019
+     */
+    public String getMessage() {
+        return message;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column mini_news.message
+     *
+     * @param message the value for mini_news.message
+     *
+     * @mbg.generated Wed Sep 18 15:21:50 CST 2019
+     */
+    public void setMessage(String message) {
+        this.message = message;
+    }
+}

+ 693 - 0
minigame/src/com/estates/model/NewsExample.java

@@ -0,0 +1,693 @@
+package com.estates.model;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+public class NewsExample {
+    /**
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database table mini_news
+     *
+     * @mbg.generated Wed Sep 18 15:21:50 CST 2019
+     */
+    protected String orderByClause;
+
+    /**
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database table mini_news
+     *
+     * @mbg.generated Wed Sep 18 15:21:50 CST 2019
+     */
+    protected boolean distinct;
+
+    /**
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database table mini_news
+     *
+     * @mbg.generated Wed Sep 18 15:21:50 CST 2019
+     */
+    protected List<Criteria> oredCriteria;
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table mini_news
+     *
+     * @mbg.generated Wed Sep 18 15:21:50 CST 2019
+     */
+    public NewsExample() {
+        oredCriteria = new ArrayList<Criteria>();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table mini_news
+     *
+     * @mbg.generated Wed Sep 18 15:21:50 CST 2019
+     */
+    public void setOrderByClause(String orderByClause) {
+        this.orderByClause = orderByClause;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table mini_news
+     *
+     * @mbg.generated Wed Sep 18 15:21:50 CST 2019
+     */
+    public String getOrderByClause() {
+        return orderByClause;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table mini_news
+     *
+     * @mbg.generated Wed Sep 18 15:21:50 CST 2019
+     */
+    public void setDistinct(boolean distinct) {
+        this.distinct = distinct;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table mini_news
+     *
+     * @mbg.generated Wed Sep 18 15:21:50 CST 2019
+     */
+    public boolean isDistinct() {
+        return distinct;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table mini_news
+     *
+     * @mbg.generated Wed Sep 18 15:21:50 CST 2019
+     */
+    public List<Criteria> getOredCriteria() {
+        return oredCriteria;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table mini_news
+     *
+     * @mbg.generated Wed Sep 18 15:21:50 CST 2019
+     */
+    public void or(Criteria criteria) {
+        oredCriteria.add(criteria);
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table mini_news
+     *
+     * @mbg.generated Wed Sep 18 15:21:50 CST 2019
+     */
+    public Criteria or() {
+        Criteria criteria = createCriteriaInternal();
+        oredCriteria.add(criteria);
+        return criteria;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table mini_news
+     *
+     * @mbg.generated Wed Sep 18 15:21:50 CST 2019
+     */
+    public Criteria createCriteria() {
+        Criteria criteria = createCriteriaInternal();
+        if (oredCriteria.size() == 0) {
+            oredCriteria.add(criteria);
+        }
+        return criteria;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table mini_news
+     *
+     * @mbg.generated Wed Sep 18 15:21:50 CST 2019
+     */
+    protected Criteria createCriteriaInternal() {
+        Criteria criteria = new Criteria();
+        return criteria;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table mini_news
+     *
+     * @mbg.generated Wed Sep 18 15:21:50 CST 2019
+     */
+    public void clear() {
+        oredCriteria.clear();
+        orderByClause = null;
+        distinct = false;
+    }
+
+    /**
+     * This class was generated by MyBatis Generator.
+     * This class corresponds to the database table mini_news
+     *
+     * @mbg.generated Wed Sep 18 15:21:50 CST 2019
+     */
+    protected abstract static class GeneratedCriteria {
+        protected List<Criterion> criteria;
+
+        protected GeneratedCriteria() {
+            super();
+            criteria = new ArrayList<Criterion>();
+        }
+
+        public boolean isValid() {
+            return criteria.size() > 0;
+        }
+
+        public List<Criterion> getAllCriteria() {
+            return criteria;
+        }
+
+        public List<Criterion> getCriteria() {
+            return criteria;
+        }
+
+        protected void addCriterion(String condition) {
+            if (condition == null) {
+                throw new RuntimeException("Value for condition cannot be null");
+            }
+            criteria.add(new Criterion(condition));
+        }
+
+        protected void addCriterion(String condition, Object value, String property) {
+            if (value == null) {
+                throw new RuntimeException("Value for " + property + " cannot be null");
+            }
+            criteria.add(new Criterion(condition, value));
+        }
+
+        protected void addCriterion(String condition, Object value1, Object value2, String property) {
+            if (value1 == null || value2 == null) {
+                throw new RuntimeException("Between values for " + property + " cannot be null");
+            }
+            criteria.add(new Criterion(condition, value1, value2));
+        }
+
+        public Criteria andIdIsNull() {
+            addCriterion("id is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdIsNotNull() {
+            addCriterion("id is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdEqualTo(Integer value) {
+            addCriterion("id =", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotEqualTo(Integer value) {
+            addCriterion("id <>", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdGreaterThan(Integer value) {
+            addCriterion("id >", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdGreaterThanOrEqualTo(Integer value) {
+            addCriterion("id >=", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdLessThan(Integer value) {
+            addCriterion("id <", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdLessThanOrEqualTo(Integer value) {
+            addCriterion("id <=", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdIn(List<Integer> values) {
+            addCriterion("id in", values, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotIn(List<Integer> values) {
+            addCriterion("id not in", values, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdBetween(Integer value1, Integer value2) {
+            addCriterion("id between", value1, value2, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotBetween(Integer value1, Integer value2) {
+            addCriterion("id not between", value1, value2, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andNickNameIsNull() {
+            addCriterion("nick_name is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andNickNameIsNotNull() {
+            addCriterion("nick_name is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andNickNameEqualTo(String value) {
+            addCriterion("nick_name =", value, "nickName");
+            return (Criteria) this;
+        }
+
+        public Criteria andNickNameNotEqualTo(String value) {
+            addCriterion("nick_name <>", value, "nickName");
+            return (Criteria) this;
+        }
+
+        public Criteria andNickNameGreaterThan(String value) {
+            addCriterion("nick_name >", value, "nickName");
+            return (Criteria) this;
+        }
+
+        public Criteria andNickNameGreaterThanOrEqualTo(String value) {
+            addCriterion("nick_name >=", value, "nickName");
+            return (Criteria) this;
+        }
+
+        public Criteria andNickNameLessThan(String value) {
+            addCriterion("nick_name <", value, "nickName");
+            return (Criteria) this;
+        }
+
+        public Criteria andNickNameLessThanOrEqualTo(String value) {
+            addCriterion("nick_name <=", value, "nickName");
+            return (Criteria) this;
+        }
+
+        public Criteria andNickNameLike(String value) {
+            addCriterion("nick_name like", value, "nickName");
+            return (Criteria) this;
+        }
+
+        public Criteria andNickNameNotLike(String value) {
+            addCriterion("nick_name not like", value, "nickName");
+            return (Criteria) this;
+        }
+
+        public Criteria andNickNameIn(List<String> values) {
+            addCriterion("nick_name in", values, "nickName");
+            return (Criteria) this;
+        }
+
+        public Criteria andNickNameNotIn(List<String> values) {
+            addCriterion("nick_name not in", values, "nickName");
+            return (Criteria) this;
+        }
+
+        public Criteria andNickNameBetween(String value1, String value2) {
+            addCriterion("nick_name between", value1, value2, "nickName");
+            return (Criteria) this;
+        }
+
+        public Criteria andNickNameNotBetween(String value1, String value2) {
+            addCriterion("nick_name not between", value1, value2, "nickName");
+            return (Criteria) this;
+        }
+
+        public Criteria andHeaderPicIsNull() {
+            addCriterion("header_pic is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andHeaderPicIsNotNull() {
+            addCriterion("header_pic is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andHeaderPicEqualTo(String value) {
+            addCriterion("header_pic =", value, "headerPic");
+            return (Criteria) this;
+        }
+
+        public Criteria andHeaderPicNotEqualTo(String value) {
+            addCriterion("header_pic <>", value, "headerPic");
+            return (Criteria) this;
+        }
+
+        public Criteria andHeaderPicGreaterThan(String value) {
+            addCriterion("header_pic >", value, "headerPic");
+            return (Criteria) this;
+        }
+
+        public Criteria andHeaderPicGreaterThanOrEqualTo(String value) {
+            addCriterion("header_pic >=", value, "headerPic");
+            return (Criteria) this;
+        }
+
+        public Criteria andHeaderPicLessThan(String value) {
+            addCriterion("header_pic <", value, "headerPic");
+            return (Criteria) this;
+        }
+
+        public Criteria andHeaderPicLessThanOrEqualTo(String value) {
+            addCriterion("header_pic <=", value, "headerPic");
+            return (Criteria) this;
+        }
+
+        public Criteria andHeaderPicLike(String value) {
+            addCriterion("header_pic like", value, "headerPic");
+            return (Criteria) this;
+        }
+
+        public Criteria andHeaderPicNotLike(String value) {
+            addCriterion("header_pic not like", value, "headerPic");
+            return (Criteria) this;
+        }
+
+        public Criteria andHeaderPicIn(List<String> values) {
+            addCriterion("header_pic in", values, "headerPic");
+            return (Criteria) this;
+        }
+
+        public Criteria andHeaderPicNotIn(List<String> values) {
+            addCriterion("header_pic not in", values, "headerPic");
+            return (Criteria) this;
+        }
+
+        public Criteria andHeaderPicBetween(String value1, String value2) {
+            addCriterion("header_pic between", value1, value2, "headerPic");
+            return (Criteria) this;
+        }
+
+        public Criteria andHeaderPicNotBetween(String value1, String value2) {
+            addCriterion("header_pic not between", value1, value2, "headerPic");
+            return (Criteria) this;
+        }
+
+        public Criteria andIndateIsNull() {
+            addCriterion("indate is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andIndateIsNotNull() {
+            addCriterion("indate is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andIndateEqualTo(Date value) {
+            addCriterion("indate =", value, "indate");
+            return (Criteria) this;
+        }
+
+        public Criteria andIndateNotEqualTo(Date value) {
+            addCriterion("indate <>", value, "indate");
+            return (Criteria) this;
+        }
+
+        public Criteria andIndateGreaterThan(Date value) {
+            addCriterion("indate >", value, "indate");
+            return (Criteria) this;
+        }
+
+        public Criteria andIndateGreaterThanOrEqualTo(Date value) {
+            addCriterion("indate >=", value, "indate");
+            return (Criteria) this;
+        }
+
+        public Criteria andIndateLessThan(Date value) {
+            addCriterion("indate <", value, "indate");
+            return (Criteria) this;
+        }
+
+        public Criteria andIndateLessThanOrEqualTo(Date value) {
+            addCriterion("indate <=", value, "indate");
+            return (Criteria) this;
+        }
+
+        public Criteria andIndateIn(List<Date> values) {
+            addCriterion("indate in", values, "indate");
+            return (Criteria) this;
+        }
+
+        public Criteria andIndateNotIn(List<Date> values) {
+            addCriterion("indate not in", values, "indate");
+            return (Criteria) this;
+        }
+
+        public Criteria andIndateBetween(Date value1, Date value2) {
+            addCriterion("indate between", value1, value2, "indate");
+            return (Criteria) this;
+        }
+
+        public Criteria andIndateNotBetween(Date value1, Date value2) {
+            addCriterion("indate not between", value1, value2, "indate");
+            return (Criteria) this;
+        }
+
+        public Criteria andTypeIsNull() {
+            addCriterion("type is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andTypeIsNotNull() {
+            addCriterion("type is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andTypeEqualTo(Integer value) {
+            addCriterion("type =", value, "type");
+            return (Criteria) this;
+        }
+
+        public Criteria andTypeNotEqualTo(Integer value) {
+            addCriterion("type <>", value, "type");
+            return (Criteria) this;
+        }
+
+        public Criteria andTypeGreaterThan(Integer value) {
+            addCriterion("type >", value, "type");
+            return (Criteria) this;
+        }
+
+        public Criteria andTypeGreaterThanOrEqualTo(Integer value) {
+            addCriterion("type >=", value, "type");
+            return (Criteria) this;
+        }
+
+        public Criteria andTypeLessThan(Integer value) {
+            addCriterion("type <", value, "type");
+            return (Criteria) this;
+        }
+
+        public Criteria andTypeLessThanOrEqualTo(Integer value) {
+            addCriterion("type <=", value, "type");
+            return (Criteria) this;
+        }
+
+        public Criteria andTypeIn(List<Integer> values) {
+            addCriterion("type in", values, "type");
+            return (Criteria) this;
+        }
+
+        public Criteria andTypeNotIn(List<Integer> values) {
+            addCriterion("type not in", values, "type");
+            return (Criteria) this;
+        }
+
+        public Criteria andTypeBetween(Integer value1, Integer value2) {
+            addCriterion("type between", value1, value2, "type");
+            return (Criteria) this;
+        }
+
+        public Criteria andTypeNotBetween(Integer value1, Integer value2) {
+            addCriterion("type not between", value1, value2, "type");
+            return (Criteria) this;
+        }
+
+        public Criteria andMessageIsNull() {
+            addCriterion("message is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andMessageIsNotNull() {
+            addCriterion("message is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andMessageEqualTo(String value) {
+            addCriterion("message =", value, "message");
+            return (Criteria) this;
+        }
+
+        public Criteria andMessageNotEqualTo(String value) {
+            addCriterion("message <>", value, "message");
+            return (Criteria) this;
+        }
+
+        public Criteria andMessageGreaterThan(String value) {
+            addCriterion("message >", value, "message");
+            return (Criteria) this;
+        }
+
+        public Criteria andMessageGreaterThanOrEqualTo(String value) {
+            addCriterion("message >=", value, "message");
+            return (Criteria) this;
+        }
+
+        public Criteria andMessageLessThan(String value) {
+            addCriterion("message <", value, "message");
+            return (Criteria) this;
+        }
+
+        public Criteria andMessageLessThanOrEqualTo(String value) {
+            addCriterion("message <=", value, "message");
+            return (Criteria) this;
+        }
+
+        public Criteria andMessageLike(String value) {
+            addCriterion("message like", value, "message");
+            return (Criteria) this;
+        }
+
+        public Criteria andMessageNotLike(String value) {
+            addCriterion("message not like", value, "message");
+            return (Criteria) this;
+        }
+
+        public Criteria andMessageIn(List<String> values) {
+            addCriterion("message in", values, "message");
+            return (Criteria) this;
+        }
+
+        public Criteria andMessageNotIn(List<String> values) {
+            addCriterion("message not in", values, "message");
+            return (Criteria) this;
+        }
+
+        public Criteria andMessageBetween(String value1, String value2) {
+            addCriterion("message between", value1, value2, "message");
+            return (Criteria) this;
+        }
+
+        public Criteria andMessageNotBetween(String value1, String value2) {
+            addCriterion("message not between", value1, value2, "message");
+            return (Criteria) this;
+        }
+    }
+
+    /**
+     * This class was generated by MyBatis Generator.
+     * This class corresponds to the database table mini_news
+     *
+     * @mbg.generated do_not_delete_during_merge Wed Sep 18 15:21:50 CST 2019
+     */
+    public static class Criteria extends GeneratedCriteria {
+
+        protected Criteria() {
+            super();
+        }
+    }
+
+    /**
+     * This class was generated by MyBatis Generator.
+     * This class corresponds to the database table mini_news
+     *
+     * @mbg.generated Wed Sep 18 15:21:50 CST 2019
+     */
+    public static class Criterion {
+        private String condition;
+
+        private Object value;
+
+        private Object secondValue;
+
+        private boolean noValue;
+
+        private boolean singleValue;
+
+        private boolean betweenValue;
+
+        private boolean listValue;
+
+        private String typeHandler;
+
+        public String getCondition() {
+            return condition;
+        }
+
+        public Object getValue() {
+            return value;
+        }
+
+        public Object getSecondValue() {
+            return secondValue;
+        }
+
+        public boolean isNoValue() {
+            return noValue;
+        }
+
+        public boolean isSingleValue() {
+            return singleValue;
+        }
+
+        public boolean isBetweenValue() {
+            return betweenValue;
+        }
+
+        public boolean isListValue() {
+            return listValue;
+        }
+
+        public String getTypeHandler() {
+            return typeHandler;
+        }
+
+        protected Criterion(String condition) {
+            super();
+            this.condition = condition;
+            this.typeHandler = null;
+            this.noValue = true;
+        }
+
+        protected Criterion(String condition, Object value, String typeHandler) {
+            super();
+            this.condition = condition;
+            this.value = value;
+            this.typeHandler = typeHandler;
+            if (value instanceof List<?>) {
+                this.listValue = true;
+            } else {
+                this.singleValue = true;
+            }
+        }
+
+        protected Criterion(String condition, Object value) {
+            this(condition, value, null);
+        }
+
+        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
+            super();
+            this.condition = condition;
+            this.value = value;
+            this.secondValue = secondValue;
+            this.typeHandler = typeHandler;
+            this.betweenValue = true;
+        }
+
+        protected Criterion(String condition, Object value, Object secondValue) {
+            this(condition, value, secondValue, null);
+        }
+    }
+}

+ 203 - 0
minigame/src/com/estates/model/User.java

@@ -0,0 +1,203 @@
+package com.estates.model;
+
+import java.util.Date;
+
+public class User {
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column mini_user.id
+     *
+     * @mbg.generated Wed Sep 18 15:23:03 CST 2019
+     */
+    private Integer id;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column mini_user.type
+     *
+     * @mbg.generated Wed Sep 18 15:23:03 CST 2019
+     */
+    private Integer type;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column mini_user.voucher_id
+     *
+     * @mbg.generated Wed Sep 18 15:23:03 CST 2019
+     */
+    private String voucherId;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column mini_user.indate
+     *
+     * @mbg.generated Wed Sep 18 15:23:03 CST 2019
+     */
+    private Date indate;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column mini_user.header_pic
+     *
+     * @mbg.generated Wed Sep 18 15:23:03 CST 2019
+     */
+    private String headerPic;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column mini_user.nick_name
+     *
+     * @mbg.generated Wed Sep 18 15:23:03 CST 2019
+     */
+    private String nickName;
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column mini_user.id
+     *
+     * @return the value of mini_user.id
+     *
+     * @mbg.generated Wed Sep 18 15:23:03 CST 2019
+     */
+    public Integer getId() {
+        return id;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column mini_user.id
+     *
+     * @param id the value for mini_user.id
+     *
+     * @mbg.generated Wed Sep 18 15:23:03 CST 2019
+     */
+    public void setId(Integer id) {
+        this.id = id;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column mini_user.type
+     *
+     * @return the value of mini_user.type
+     *
+     * @mbg.generated Wed Sep 18 15:23:03 CST 2019
+     */
+    public Integer getType() {
+        return type;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column mini_user.type
+     *
+     * @param type the value for mini_user.type
+     *
+     * @mbg.generated Wed Sep 18 15:23:03 CST 2019
+     */
+    public void setType(Integer type) {
+        this.type = type;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column mini_user.voucher_id
+     *
+     * @return the value of mini_user.voucher_id
+     *
+     * @mbg.generated Wed Sep 18 15:23:03 CST 2019
+     */
+    public String getVoucherId() {
+        return voucherId;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column mini_user.voucher_id
+     *
+     * @param voucherId the value for mini_user.voucher_id
+     *
+     * @mbg.generated Wed Sep 18 15:23:03 CST 2019
+     */
+    public void setVoucherId(String voucherId) {
+        this.voucherId = voucherId;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column mini_user.indate
+     *
+     * @return the value of mini_user.indate
+     *
+     * @mbg.generated Wed Sep 18 15:23:03 CST 2019
+     */
+    public Date getIndate() {
+        return indate;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column mini_user.indate
+     *
+     * @param indate the value for mini_user.indate
+     *
+     * @mbg.generated Wed Sep 18 15:23:03 CST 2019
+     */
+    public void setIndate(Date indate) {
+        this.indate = indate;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column mini_user.header_pic
+     *
+     * @return the value of mini_user.header_pic
+     *
+     * @mbg.generated Wed Sep 18 15:23:03 CST 2019
+     */
+    public String getHeaderPic() {
+        return headerPic;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column mini_user.header_pic
+     *
+     * @param headerPic the value for mini_user.header_pic
+     *
+     * @mbg.generated Wed Sep 18 15:23:03 CST 2019
+     */
+    public void setHeaderPic(String headerPic) {
+        this.headerPic = headerPic;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column mini_user.nick_name
+     *
+     * @return the value of mini_user.nick_name
+     *
+     * @mbg.generated Wed Sep 18 15:23:03 CST 2019
+     */
+    public String getNickName() {
+        return nickName;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column mini_user.nick_name
+     *
+     * @param nickName the value for mini_user.nick_name
+     *
+     * @mbg.generated Wed Sep 18 15:23:03 CST 2019
+     */
+    public void setNickName(String nickName) {
+        this.nickName = nickName;
+    }
+}

+ 693 - 0
minigame/src/com/estates/model/UserExample.java

@@ -0,0 +1,693 @@
+package com.estates.model;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+public class UserExample {
+    /**
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database table mini_user
+     *
+     * @mbg.generated Wed Sep 18 15:23:03 CST 2019
+     */
+    protected String orderByClause;
+
+    /**
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database table mini_user
+     *
+     * @mbg.generated Wed Sep 18 15:23:03 CST 2019
+     */
+    protected boolean distinct;
+
+    /**
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database table mini_user
+     *
+     * @mbg.generated Wed Sep 18 15:23:03 CST 2019
+     */
+    protected List<Criteria> oredCriteria;
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table mini_user
+     *
+     * @mbg.generated Wed Sep 18 15:23:03 CST 2019
+     */
+    public UserExample() {
+        oredCriteria = new ArrayList<Criteria>();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table mini_user
+     *
+     * @mbg.generated Wed Sep 18 15:23:03 CST 2019
+     */
+    public void setOrderByClause(String orderByClause) {
+        this.orderByClause = orderByClause;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table mini_user
+     *
+     * @mbg.generated Wed Sep 18 15:23:03 CST 2019
+     */
+    public String getOrderByClause() {
+        return orderByClause;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table mini_user
+     *
+     * @mbg.generated Wed Sep 18 15:23:03 CST 2019
+     */
+    public void setDistinct(boolean distinct) {
+        this.distinct = distinct;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table mini_user
+     *
+     * @mbg.generated Wed Sep 18 15:23:03 CST 2019
+     */
+    public boolean isDistinct() {
+        return distinct;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table mini_user
+     *
+     * @mbg.generated Wed Sep 18 15:23:03 CST 2019
+     */
+    public List<Criteria> getOredCriteria() {
+        return oredCriteria;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table mini_user
+     *
+     * @mbg.generated Wed Sep 18 15:23:03 CST 2019
+     */
+    public void or(Criteria criteria) {
+        oredCriteria.add(criteria);
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table mini_user
+     *
+     * @mbg.generated Wed Sep 18 15:23:03 CST 2019
+     */
+    public Criteria or() {
+        Criteria criteria = createCriteriaInternal();
+        oredCriteria.add(criteria);
+        return criteria;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table mini_user
+     *
+     * @mbg.generated Wed Sep 18 15:23:03 CST 2019
+     */
+    public Criteria createCriteria() {
+        Criteria criteria = createCriteriaInternal();
+        if (oredCriteria.size() == 0) {
+            oredCriteria.add(criteria);
+        }
+        return criteria;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table mini_user
+     *
+     * @mbg.generated Wed Sep 18 15:23:03 CST 2019
+     */
+    protected Criteria createCriteriaInternal() {
+        Criteria criteria = new Criteria();
+        return criteria;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table mini_user
+     *
+     * @mbg.generated Wed Sep 18 15:23:03 CST 2019
+     */
+    public void clear() {
+        oredCriteria.clear();
+        orderByClause = null;
+        distinct = false;
+    }
+
+    /**
+     * This class was generated by MyBatis Generator.
+     * This class corresponds to the database table mini_user
+     *
+     * @mbg.generated Wed Sep 18 15:23:03 CST 2019
+     */
+    protected abstract static class GeneratedCriteria {
+        protected List<Criterion> criteria;
+
+        protected GeneratedCriteria() {
+            super();
+            criteria = new ArrayList<Criterion>();
+        }
+
+        public boolean isValid() {
+            return criteria.size() > 0;
+        }
+
+        public List<Criterion> getAllCriteria() {
+            return criteria;
+        }
+
+        public List<Criterion> getCriteria() {
+            return criteria;
+        }
+
+        protected void addCriterion(String condition) {
+            if (condition == null) {
+                throw new RuntimeException("Value for condition cannot be null");
+            }
+            criteria.add(new Criterion(condition));
+        }
+
+        protected void addCriterion(String condition, Object value, String property) {
+            if (value == null) {
+                throw new RuntimeException("Value for " + property + " cannot be null");
+            }
+            criteria.add(new Criterion(condition, value));
+        }
+
+        protected void addCriterion(String condition, Object value1, Object value2, String property) {
+            if (value1 == null || value2 == null) {
+                throw new RuntimeException("Between values for " + property + " cannot be null");
+            }
+            criteria.add(new Criterion(condition, value1, value2));
+        }
+
+        public Criteria andIdIsNull() {
+            addCriterion("id is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdIsNotNull() {
+            addCriterion("id is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdEqualTo(Integer value) {
+            addCriterion("id =", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotEqualTo(Integer value) {
+            addCriterion("id <>", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdGreaterThan(Integer value) {
+            addCriterion("id >", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdGreaterThanOrEqualTo(Integer value) {
+            addCriterion("id >=", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdLessThan(Integer value) {
+            addCriterion("id <", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdLessThanOrEqualTo(Integer value) {
+            addCriterion("id <=", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdIn(List<Integer> values) {
+            addCriterion("id in", values, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotIn(List<Integer> values) {
+            addCriterion("id not in", values, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdBetween(Integer value1, Integer value2) {
+            addCriterion("id between", value1, value2, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotBetween(Integer value1, Integer value2) {
+            addCriterion("id not between", value1, value2, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andTypeIsNull() {
+            addCriterion("type is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andTypeIsNotNull() {
+            addCriterion("type is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andTypeEqualTo(Integer value) {
+            addCriterion("type =", value, "type");
+            return (Criteria) this;
+        }
+
+        public Criteria andTypeNotEqualTo(Integer value) {
+            addCriterion("type <>", value, "type");
+            return (Criteria) this;
+        }
+
+        public Criteria andTypeGreaterThan(Integer value) {
+            addCriterion("type >", value, "type");
+            return (Criteria) this;
+        }
+
+        public Criteria andTypeGreaterThanOrEqualTo(Integer value) {
+            addCriterion("type >=", value, "type");
+            return (Criteria) this;
+        }
+
+        public Criteria andTypeLessThan(Integer value) {
+            addCriterion("type <", value, "type");
+            return (Criteria) this;
+        }
+
+        public Criteria andTypeLessThanOrEqualTo(Integer value) {
+            addCriterion("type <=", value, "type");
+            return (Criteria) this;
+        }
+
+        public Criteria andTypeIn(List<Integer> values) {
+            addCriterion("type in", values, "type");
+            return (Criteria) this;
+        }
+
+        public Criteria andTypeNotIn(List<Integer> values) {
+            addCriterion("type not in", values, "type");
+            return (Criteria) this;
+        }
+
+        public Criteria andTypeBetween(Integer value1, Integer value2) {
+            addCriterion("type between", value1, value2, "type");
+            return (Criteria) this;
+        }
+
+        public Criteria andTypeNotBetween(Integer value1, Integer value2) {
+            addCriterion("type not between", value1, value2, "type");
+            return (Criteria) this;
+        }
+
+        public Criteria andVoucherIdIsNull() {
+            addCriterion("voucher_id is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andVoucherIdIsNotNull() {
+            addCriterion("voucher_id is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andVoucherIdEqualTo(String value) {
+            addCriterion("voucher_id =", value, "voucherId");
+            return (Criteria) this;
+        }
+
+        public Criteria andVoucherIdNotEqualTo(String value) {
+            addCriterion("voucher_id <>", value, "voucherId");
+            return (Criteria) this;
+        }
+
+        public Criteria andVoucherIdGreaterThan(String value) {
+            addCriterion("voucher_id >", value, "voucherId");
+            return (Criteria) this;
+        }
+
+        public Criteria andVoucherIdGreaterThanOrEqualTo(String value) {
+            addCriterion("voucher_id >=", value, "voucherId");
+            return (Criteria) this;
+        }
+
+        public Criteria andVoucherIdLessThan(String value) {
+            addCriterion("voucher_id <", value, "voucherId");
+            return (Criteria) this;
+        }
+
+        public Criteria andVoucherIdLessThanOrEqualTo(String value) {
+            addCriterion("voucher_id <=", value, "voucherId");
+            return (Criteria) this;
+        }
+
+        public Criteria andVoucherIdLike(String value) {
+            addCriterion("voucher_id like", value, "voucherId");
+            return (Criteria) this;
+        }
+
+        public Criteria andVoucherIdNotLike(String value) {
+            addCriterion("voucher_id not like", value, "voucherId");
+            return (Criteria) this;
+        }
+
+        public Criteria andVoucherIdIn(List<String> values) {
+            addCriterion("voucher_id in", values, "voucherId");
+            return (Criteria) this;
+        }
+
+        public Criteria andVoucherIdNotIn(List<String> values) {
+            addCriterion("voucher_id not in", values, "voucherId");
+            return (Criteria) this;
+        }
+
+        public Criteria andVoucherIdBetween(String value1, String value2) {
+            addCriterion("voucher_id between", value1, value2, "voucherId");
+            return (Criteria) this;
+        }
+
+        public Criteria andVoucherIdNotBetween(String value1, String value2) {
+            addCriterion("voucher_id not between", value1, value2, "voucherId");
+            return (Criteria) this;
+        }
+
+        public Criteria andIndateIsNull() {
+            addCriterion("indate is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andIndateIsNotNull() {
+            addCriterion("indate is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andIndateEqualTo(Date value) {
+            addCriterion("indate =", value, "indate");
+            return (Criteria) this;
+        }
+
+        public Criteria andIndateNotEqualTo(Date value) {
+            addCriterion("indate <>", value, "indate");
+            return (Criteria) this;
+        }
+
+        public Criteria andIndateGreaterThan(Date value) {
+            addCriterion("indate >", value, "indate");
+            return (Criteria) this;
+        }
+
+        public Criteria andIndateGreaterThanOrEqualTo(Date value) {
+            addCriterion("indate >=", value, "indate");
+            return (Criteria) this;
+        }
+
+        public Criteria andIndateLessThan(Date value) {
+            addCriterion("indate <", value, "indate");
+            return (Criteria) this;
+        }
+
+        public Criteria andIndateLessThanOrEqualTo(Date value) {
+            addCriterion("indate <=", value, "indate");
+            return (Criteria) this;
+        }
+
+        public Criteria andIndateIn(List<Date> values) {
+            addCriterion("indate in", values, "indate");
+            return (Criteria) this;
+        }
+
+        public Criteria andIndateNotIn(List<Date> values) {
+            addCriterion("indate not in", values, "indate");
+            return (Criteria) this;
+        }
+
+        public Criteria andIndateBetween(Date value1, Date value2) {
+            addCriterion("indate between", value1, value2, "indate");
+            return (Criteria) this;
+        }
+
+        public Criteria andIndateNotBetween(Date value1, Date value2) {
+            addCriterion("indate not between", value1, value2, "indate");
+            return (Criteria) this;
+        }
+
+        public Criteria andHeaderPicIsNull() {
+            addCriterion("header_pic is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andHeaderPicIsNotNull() {
+            addCriterion("header_pic is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andHeaderPicEqualTo(String value) {
+            addCriterion("header_pic =", value, "headerPic");
+            return (Criteria) this;
+        }
+
+        public Criteria andHeaderPicNotEqualTo(String value) {
+            addCriterion("header_pic <>", value, "headerPic");
+            return (Criteria) this;
+        }
+
+        public Criteria andHeaderPicGreaterThan(String value) {
+            addCriterion("header_pic >", value, "headerPic");
+            return (Criteria) this;
+        }
+
+        public Criteria andHeaderPicGreaterThanOrEqualTo(String value) {
+            addCriterion("header_pic >=", value, "headerPic");
+            return (Criteria) this;
+        }
+
+        public Criteria andHeaderPicLessThan(String value) {
+            addCriterion("header_pic <", value, "headerPic");
+            return (Criteria) this;
+        }
+
+        public Criteria andHeaderPicLessThanOrEqualTo(String value) {
+            addCriterion("header_pic <=", value, "headerPic");
+            return (Criteria) this;
+        }
+
+        public Criteria andHeaderPicLike(String value) {
+            addCriterion("header_pic like", value, "headerPic");
+            return (Criteria) this;
+        }
+
+        public Criteria andHeaderPicNotLike(String value) {
+            addCriterion("header_pic not like", value, "headerPic");
+            return (Criteria) this;
+        }
+
+        public Criteria andHeaderPicIn(List<String> values) {
+            addCriterion("header_pic in", values, "headerPic");
+            return (Criteria) this;
+        }
+
+        public Criteria andHeaderPicNotIn(List<String> values) {
+            addCriterion("header_pic not in", values, "headerPic");
+            return (Criteria) this;
+        }
+
+        public Criteria andHeaderPicBetween(String value1, String value2) {
+            addCriterion("header_pic between", value1, value2, "headerPic");
+            return (Criteria) this;
+        }
+
+        public Criteria andHeaderPicNotBetween(String value1, String value2) {
+            addCriterion("header_pic not between", value1, value2, "headerPic");
+            return (Criteria) this;
+        }
+
+        public Criteria andNickNameIsNull() {
+            addCriterion("nick_name is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andNickNameIsNotNull() {
+            addCriterion("nick_name is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andNickNameEqualTo(String value) {
+            addCriterion("nick_name =", value, "nickName");
+            return (Criteria) this;
+        }
+
+        public Criteria andNickNameNotEqualTo(String value) {
+            addCriterion("nick_name <>", value, "nickName");
+            return (Criteria) this;
+        }
+
+        public Criteria andNickNameGreaterThan(String value) {
+            addCriterion("nick_name >", value, "nickName");
+            return (Criteria) this;
+        }
+
+        public Criteria andNickNameGreaterThanOrEqualTo(String value) {
+            addCriterion("nick_name >=", value, "nickName");
+            return (Criteria) this;
+        }
+
+        public Criteria andNickNameLessThan(String value) {
+            addCriterion("nick_name <", value, "nickName");
+            return (Criteria) this;
+        }
+
+        public Criteria andNickNameLessThanOrEqualTo(String value) {
+            addCriterion("nick_name <=", value, "nickName");
+            return (Criteria) this;
+        }
+
+        public Criteria andNickNameLike(String value) {
+            addCriterion("nick_name like", value, "nickName");
+            return (Criteria) this;
+        }
+
+        public Criteria andNickNameNotLike(String value) {
+            addCriterion("nick_name not like", value, "nickName");
+            return (Criteria) this;
+        }
+
+        public Criteria andNickNameIn(List<String> values) {
+            addCriterion("nick_name in", values, "nickName");
+            return (Criteria) this;
+        }
+
+        public Criteria andNickNameNotIn(List<String> values) {
+            addCriterion("nick_name not in", values, "nickName");
+            return (Criteria) this;
+        }
+
+        public Criteria andNickNameBetween(String value1, String value2) {
+            addCriterion("nick_name between", value1, value2, "nickName");
+            return (Criteria) this;
+        }
+
+        public Criteria andNickNameNotBetween(String value1, String value2) {
+            addCriterion("nick_name not between", value1, value2, "nickName");
+            return (Criteria) this;
+        }
+    }
+
+    /**
+     * This class was generated by MyBatis Generator.
+     * This class corresponds to the database table mini_user
+     *
+     * @mbg.generated do_not_delete_during_merge Wed Sep 18 15:23:03 CST 2019
+     */
+    public static class Criteria extends GeneratedCriteria {
+
+        protected Criteria() {
+            super();
+        }
+    }
+
+    /**
+     * This class was generated by MyBatis Generator.
+     * This class corresponds to the database table mini_user
+     *
+     * @mbg.generated Wed Sep 18 15:23:03 CST 2019
+     */
+    public static class Criterion {
+        private String condition;
+
+        private Object value;
+
+        private Object secondValue;
+
+        private boolean noValue;
+
+        private boolean singleValue;
+
+        private boolean betweenValue;
+
+        private boolean listValue;
+
+        private String typeHandler;
+
+        public String getCondition() {
+            return condition;
+        }
+
+        public Object getValue() {
+            return value;
+        }
+
+        public Object getSecondValue() {
+            return secondValue;
+        }
+
+        public boolean isNoValue() {
+            return noValue;
+        }
+
+        public boolean isSingleValue() {
+            return singleValue;
+        }
+
+        public boolean isBetweenValue() {
+            return betweenValue;
+        }
+
+        public boolean isListValue() {
+            return listValue;
+        }
+
+        public String getTypeHandler() {
+            return typeHandler;
+        }
+
+        protected Criterion(String condition) {
+            super();
+            this.condition = condition;
+            this.typeHandler = null;
+            this.noValue = true;
+        }
+
+        protected Criterion(String condition, Object value, String typeHandler) {
+            super();
+            this.condition = condition;
+            this.value = value;
+            this.typeHandler = typeHandler;
+            if (value instanceof List<?>) {
+                this.listValue = true;
+            } else {
+                this.singleValue = true;
+            }
+        }
+
+        protected Criterion(String condition, Object value) {
+            this(condition, value, null);
+        }
+
+        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
+            super();
+            this.condition = condition;
+            this.value = value;
+            this.secondValue = secondValue;
+            this.typeHandler = typeHandler;
+            this.betweenValue = true;
+        }
+
+        protected Criterion(String condition, Object value, Object secondValue) {
+            this(condition, value, secondValue, null);
+        }
+    }
+}

+ 25 - 0
minigame/src/com/estates/service/NewsService.java

@@ -0,0 +1,25 @@
+package com.estates.service;
+
+
+import java.io.IOException;
+import java.security.KeyManagementException;
+import java.security.NoSuchAlgorithmException;
+import java.security.NoSuchProviderException;
+
+import com.estates.entity.vo.NewsVO;
+import com.hhsx.utils.HttpRespMsg;
+
+/**
+ * <p>
+ *  服务类
+ * </p>
+ *
+ * @author 吴涛涛
+ * @since 2019-09-17
+ */
+public interface NewsService {
+
+    HttpRespMsg addUserNews(NewsVO newsVO);
+
+    HttpRespMsg login(NewsVO newsVO,String callbackURL) throws KeyManagementException, NoSuchAlgorithmException, NoSuchProviderException, IOException;
+}

+ 15 - 0
minigame/src/com/estates/service/UserService.java

@@ -0,0 +1,15 @@
+package com.estates.service;
+
+import com.estates.model.User;
+
+/**
+ * <p>
+ *  服务类
+ * </p>
+ *
+ * @author 吴涛涛
+ * @since 2019-09-18
+ */
+public interface UserService {
+
+}

+ 77 - 0
minigame/src/com/estates/service/impl/NewsServiceImpl.java

@@ -0,0 +1,77 @@
+package com.estates.service.impl;
+
+import java.io.IOException;
+import java.security.KeyManagementException;
+import java.security.NoSuchAlgorithmException;
+import java.security.NoSuchProviderException;
+
+import javax.annotation.Resource;
+
+import org.apache.commons.lang.StringEscapeUtils;
+import org.springframework.stereotype.Service;
+
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONObject;
+import com.estates.entity.vo.NewsVO;
+import com.estates.mapper.NewsMapper;
+import com.estates.model.News;
+import com.estates.service.NewsService;
+import com.hhsx.constant.Constant;
+import com.hhsx.utils.AccessToken;
+import com.hhsx.utils.HttpKit;
+import com.hhsx.utils.HttpRespMsg;
+import com.hhsx.utils.WechatAndMicroblogUtil;
+import com.hhsx.utils.WechatUserNews;
+
+/**
+ * <p>
+ *  服务实现类
+ * </p>
+ *
+ * @author 吴涛涛
+ * @since 2019-09-17
+ */
+@Service
+public class NewsServiceImpl  implements NewsService {
+
+    @Resource
+    NewsMapper newsMapper;
+
+    @Override
+    public HttpRespMsg addUserNews(NewsVO newsVO) {
+        HttpRespMsg msg = new HttpRespMsg();
+        if(newsVO.getType()==0){
+            //微信授权的链接
+            try {
+                WechatUserNews wechatUserNews = WechatAndMicroblogUtil.getWechatUserNews(newsVO.getOpenId(), AccessToken.getNewAccessToken());
+                News news = new News();
+                news.setNickName(wechatUserNews.getNickname());
+                news.setHeaderPic(wechatUserNews.getHeadimgurl());
+                news.setMessage(newsVO.getMessage());
+                news.setType(newsVO.getType());
+                newsMapper.insert(news);
+                msg.data = news;
+                return msg;
+            } catch (Exception e) {
+                e.printStackTrace();
+            }
+
+        }else if(newsVO.getType()==1){
+            //微博授权的链接
+
+
+        }
+
+        return null;
+    }
+
+    //微博授权登录
+    @Override
+    public HttpRespMsg login(NewsVO newsVO,String callbackURL) throws KeyManagementException, NoSuchAlgorithmException, NoSuchProviderException, IOException {
+        String authorizationURL = "https://api.weibo.com/oauth2/authorize?client_id="+Constant.MICROBLOG_APPKEY +"&response_type=code&redirect_uri="+callbackURL;
+        String resp = HttpKit.get(authorizationURL, true);
+        resp = StringEscapeUtils.unescapeJava(resp);
+        JSONObject json = (JSONObject) JSON.parse(resp);
+        return null;
+    }
+}

+ 17 - 0
minigame/src/com/hhsx/constant/Constant.java

@@ -0,0 +1,17 @@
+
+package com.hhsx.constant;
+/**
+ * Author: 吴涛涛
+ * Date : 2019 - 07 - 24 16:00
+ * Description:<描述>常量配置类
+ * Version: 1.0
+ */
+public class Constant {
+    public static final String MICROBLOG_APPKEY = "2141531565";//微博的appkey
+    public static final String MICROBLOG_APPSECRET = "f39462b939a56ce6d846bf83e04c20b5";//微博的accesstoken
+    public static final String WECHAT_APPID = "wx749c84daac654e1e";//微信的appid
+    public static final String WECHAT_APPSECRET = "f39462b939a56ce6d846bf83e04c20b5";//微信的appsecret
+
+}
+
+

+ 74 - 0
minigame/src/com/hhsx/controller/NewsController.java

@@ -0,0 +1,74 @@
+package com.hhsx.controller;
+
+
+import com.estates.entity.vo.NewsVO;
+import com.estates.mapper.NewsMapper;
+import com.estates.service.NewsService;
+import com.hhsx.utils.HttpRespMsg;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.RequestMapping;
+
+import org.springframework.web.bind.annotation.ResponseBody;
+
+import java.io.IOException;
+import java.security.KeyManagementException;
+import java.security.NoSuchAlgorithmException;
+import java.security.NoSuchProviderException;
+
+/**
+ * @author 吴涛涛
+ * @since 2019-09-17
+ */
+@Controller
+@RequestMapping("/news")
+public class NewsController {
+
+    @Autowired
+    NewsMapper newsMapper;
+    @Autowired
+    NewsService newsService;
+    @Autowired
+    
+
+    /**
+     * 添加分享信息
+     *
+     * 传递的参数:
+     * type: 0 -微信 1 -微博
+     * type=0时,所需其他参数: message:寄语 openid:用户openid
+     *
+     * type=1时,所需其他参数:message:寄语 uid:微博身份唯一凭证
+     * @return
+     */
+    @RequestMapping("/addNews")
+    @ResponseBody
+    public HttpRespMsg addUserNews(NewsVO newsVO){
+        HttpRespMsg msg =  newsService.addUserNews(newsVO);
+        return msg;
+
+    }
+    /**
+     * 微博授权登录
+     *
+     * 传递的参数:
+     * type: 0 -微信 1 -微博
+     * type=0时,所需其他参数: message:寄语 openid:用户openid
+     *
+     * type=1时,所需其他参数:message:寄语 uid:微博身份唯一凭证
+     * @return
+     */
+    @RequestMapping("/microblogLogin")
+    @ResponseBody
+    public HttpRespMsg microblogLogin(NewsVO newsVO) throws IOException, NoSuchAlgorithmException, NoSuchProviderException, KeyManagementException {
+        HttpRespMsg msg =  newsService.login(newsVO,"http://www.mini.game/index.html");
+        return msg;
+
+    }
+
+
+
+}
+

+ 89 - 0
minigame/src/com/hhsx/controller/UserController.java

@@ -0,0 +1,89 @@
+package com.hhsx.controller;
+
+import java.io.IOException;
+import java.security.KeyManagementException;
+import java.security.NoSuchAlgorithmException;
+import java.security.NoSuchProviderException;
+
+import javax.servlet.http.HttpServletResponse;
+
+import org.apache.commons.lang.StringEscapeUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.ResponseBody;
+
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONObject;
+import com.estates.mapper.UserMapper;
+import com.estates.model.User;
+import com.estates.model.UserExample;
+import com.hhsx.constant.Constant;
+import com.hhsx.utils.HttpKit;
+import com.hhsx.utils.HttpRespMsg;
+
+@Controller
+@RequestMapping("/user")
+public class UserController {
+	@Autowired
+	UserMapper usermapper;
+	
+	/**
+     * 微信授权登录
+     * 参数:
+     * type:授权类型,0-微信,1-微博
+     * code:平台返回的code值
+     *
+     * @return
+     */
+    @RequestMapping(value = "weiXinLogin")
+    @ResponseBody
+    public Object weiXinLogin(@RequestParam String code, Integer type,
+                              HttpServletResponse response) throws Exception, KeyManagementException, NoSuchAlgorithmException, NoSuchProviderException, IOException {
+        HttpRespMsg msg = new HttpRespMsg();
+        if (type == 0) {
+            String url = "https://api.weixin.qq.com/sns/oauth2/access_token?appid=" + Constant.WECHAT_APPID + "&secret=" + Constant.WECHAT_APPSECRET + "&code=" + code + "&grant_type=authorization_code";
+            String resp = HttpKit.get(url, true);
+            resp = StringEscapeUtils.unescapeJava(resp);
+            System.out.println(resp);
+            JSONObject json = (JSONObject) JSON.parse(resp);
+            if (!json.containsKey("errcode")) {
+                String openId = json.getString("openid");
+                String accessToken = json.getString("access_token");
+                User user = new User();
+                user.setType(type);
+                user.setVoucherId(openId);
+                String url1 = "https://api.weixin.qq.com/sns/userinfo?access_token="+accessToken+"&openid="+openId+"&lang=zh_CN";
+                //获取用户基本信息
+                 resp = HttpKit.get(url1, true);
+                resp = StringEscapeUtils.unescapeJava(resp);
+                System.out.println(resp);
+                 json = (JSONObject) JSON.parse(resp);
+                 if(!json.containsKey("errcode")){
+                     user.setNickName(json.getString("nickname"));
+                     user.setHeaderPic(json.getString("headimgurl"));
+                 }
+                 UserExample example = new UserExample();
+                 example.createCriteria().andVoucherIdEqualTo(openId).andTypeEqualTo(type);
+                if (usermapper.countByExample(example)==0) {
+                	usermapper.insert(user);
+                } else {
+                    //列表中已包含当前用户,
+                    user = usermapper.selectByExample(example).get(0);
+                }
+                msg.data = user;
+            } else {
+                msg.setError(json.getString("errmsg"));
+            }
+        }else if(type == 1){
+//            String url = "https://api.weibo.com/oauth2/authorize?client_id="+Constant.MICROBLOG_APPKEY +"&response_type=code&redirect_uri="+callbackURL;
+
+        }
+
+        response.setContentType("application/json");
+        response.setCharacterEncoding("UTF-8");
+        return msg;
+    }
+	
+}

+ 18 - 0
minigame/src/com/hhsx/minigame/service/impl/UserServiceImpl.java

@@ -0,0 +1,18 @@
+package com.hhsx.minigame.service.impl;
+
+import org.springframework.stereotype.Service;
+
+import com.estates.service.UserService;
+
+/**
+ * <p>
+ *  服务实现类
+ * </p>
+ *
+ * @author 吴涛涛
+ * @since 2019-09-18
+ */
+@Service
+public class UserServiceImpl  implements UserService {
+
+}

+ 51 - 0
minigame/src/com/hhsx/utils/AccessToken.java

@@ -0,0 +1,51 @@
+package com.hhsx.utils;
+
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONObject;
+import com.hhsx.constant.Constant;
+
+import java.io.IOException;
+import java.security.KeyManagementException;
+import java.security.NoSuchAlgorithmException;
+import java.security.NoSuchProviderException;
+import java.util.Date;
+
+import org.apache.commons.lang.StringEscapeUtils;
+
+/**
+ * Author: 吴涛涛 cuiyi@itany.com
+ * Date : 2019 - 09 - 17 10:04
+ * Description:<描述>
+ * Version: 1.0
+ */
+public class AccessToken {
+
+    private static String wechatAppId = Constant.WECHAT_APPID;
+
+    private static String wechatSecret = Constant.WECHAT_APPSECRET;
+
+    private static String oldAccessToken = null;
+
+    private static Date time = new Date();//oldAccessToken值创建时间
+
+    private static Long expiresIn = 7200L*1000;//accessToken值有效时长 单位毫秒
+
+    public static String getNewAccessToken() throws Exception {
+        if(oldAccessToken == null || (oldAccessToken != null && System.currentTimeMillis() > time.getTime()+expiresIn)){
+            String url = "https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=" + wechatAppId + "&secret=" + wechatSecret;
+            String resp = HttpKit.get(url, true);
+            resp = StringEscapeUtils.unescapeJava(resp);
+            JSONObject json = (JSONObject) JSON.parse(resp);
+            //获取值赋值给全局变量
+            if (!json.containsKey("errcode")) {
+                String newAccessToken = json.getString("access_token");
+                String newExpiresIn = json.getString("expires_in");
+                oldAccessToken = newAccessToken;
+                expiresIn = Long.parseLong(newExpiresIn) * 1000;
+                time = new Date();
+                System.out.println("获取新access_token==>" + oldAccessToken);
+            }
+        }
+        return oldAccessToken;
+    }
+}

+ 292 - 0
minigame/src/com/hhsx/utils/HttpKit.java

@@ -0,0 +1,292 @@
+package com.hhsx.utils;
+
+
+import javax.net.ssl.*;
+
+import org.apache.commons.lang.StringUtils;
+
+import java.io.*;
+import java.net.HttpURLConnection;
+import java.net.URL;
+import java.net.URLEncoder;
+import java.security.KeyManagementException;
+import java.security.NoSuchAlgorithmException;
+import java.security.NoSuchProviderException;
+import java.security.cert.CertificateException;
+import java.security.cert.X509Certificate;
+import java.util.Map;
+import java.util.Map.Entry;
+
+public class HttpKit {
+    
+    private static final String DEFAULT_CHARSET = "UTF-8";
+    /**
+     * 发送Get请求
+     * @param url
+     * @return
+     * @throws NoSuchProviderException 
+     * @throws NoSuchAlgorithmException 
+     * @throws IOException 
+     * @throws KeyManagementException 
+     */
+    public static String get(String url) throws NoSuchAlgorithmException, NoSuchProviderException, IOException, KeyManagementException {
+        StringBuffer bufferRes = null;
+        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 urlGet = new URL(url);
+        HttpsURLConnection http = (HttpsURLConnection) urlGet.openConnection();
+        // 连接超时
+        http.setConnectTimeout(25000);
+        // 读取超时 --服务器响应比较慢,增大时间
+        http.setReadTimeout(25000);
+        http.setRequestMethod("GET");
+        http.setRequestProperty("Content-Type","application/x-www-form-urlencoded");
+        http.setSSLSocketFactory(ssf);
+        http.setDoOutput(true);
+        http.setDoInput(true);
+        http.connect();
+        
+        InputStream in = http.getInputStream();
+        BufferedReader read = new BufferedReader(new InputStreamReader(in, DEFAULT_CHARSET));
+        String valueString = null;
+        bufferRes = new StringBuffer();
+        while ((valueString = read.readLine()) != null){
+            bufferRes.append(valueString);
+        }
+        in.close();
+        if (http != null) {
+            // 关闭连接
+            http.disconnect();
+        }
+        return bufferRes.toString();
+    }
+    
+    /**
+     * 发送Get请求
+     * @param url
+     * @return
+     * @throws NoSuchProviderException 
+     * @throws NoSuchAlgorithmException 
+     * @throws IOException 
+     * @throws KeyManagementException 
+     */
+    public static String get(String url,Boolean https) throws NoSuchAlgorithmException, NoSuchProviderException, IOException, KeyManagementException {
+     if(https != null && https){
+      return get(url);
+     }else{
+      StringBuffer bufferRes = null;
+            URL urlGet = new URL(url);
+            HttpURLConnection http = (HttpURLConnection) urlGet.openConnection();
+            // 连接超时
+            http.setConnectTimeout(25000);
+            // 读取超时 --服务器响应比较慢,增大时间
+            http.setReadTimeout(25000);
+            http.setRequestMethod("GET");
+            http.setRequestProperty("Content-Type","application/x-www-form-urlencoded");
+            http.setDoOutput(true);
+            http.setDoInput(true);
+            http.connect();
+            
+            InputStream in = http.getInputStream();
+            BufferedReader read = new BufferedReader(new InputStreamReader(in, DEFAULT_CHARSET));
+            String valueString = null;
+            bufferRes = new StringBuffer();
+            while ((valueString = read.readLine()) != null){
+                bufferRes.append(valueString);
+            }
+            in.close();
+            if (http != null) {
+                // 关闭连接
+                http.disconnect();
+            }
+            return bufferRes.toString();
+     }
+    }
+    /**
+     *  发送Get请求
+     * @param url
+     * @param params
+     * @return
+     * @throws IOException 
+     * @throws NoSuchProviderException 
+     * @throws NoSuchAlgorithmException 
+     * @throws KeyManagementException 
+     */
+    public static String get(String url, Map<String, String> params) throws KeyManagementException, NoSuchAlgorithmException, NoSuchProviderException, IOException {
+        return get(initParams(url, params));
+    }
+    /**
+     *  发送Post请求
+     * @param url
+     * @param params
+     * @return
+     * @throws IOException 
+     * @throws NoSuchProviderException 
+     * @throws NoSuchAlgorithmException 
+     * @throws KeyManagementException 
+     */
+    public static String post(String url, String params) throws IOException, NoSuchAlgorithmException, NoSuchProviderException, KeyManagementException {
+     StringBuffer bufferRes = null;
+        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 urlGet = new URL(url);
+        HttpsURLConnection http = (HttpsURLConnection) urlGet.openConnection();
+        // 连接超时
+        http.setConnectTimeout(25000);
+        // 读取超时 --服务器响应比较慢,增大时间
+        http.setReadTimeout(25000);
+        http.setRequestMethod("POST");
+        http.setRequestProperty("Content-Type","application/x-www-form-urlencoded");
+        http.setSSLSocketFactory(ssf);
+        http.setDoOutput(true);
+        http.setDoInput(true);
+        http.connect();
+        OutputStream out = http.getOutputStream();
+        out.write(params.getBytes("UTF-8"));
+        out.flush();
+        out.close();
+        InputStream in = http.getInputStream();
+        BufferedReader read = new BufferedReader(new InputStreamReader(in, DEFAULT_CHARSET));
+        String valueString = null;
+        bufferRes = new StringBuffer();
+        while ((valueString = read.readLine()) != null){
+            bufferRes.append(valueString);
+        }
+        in.close();
+        if (http != null) {
+            // 关闭连接
+            http.disconnect();
+        }
+        return bufferRes.toString();
+    }
+    
+    /**
+     * 上传媒体文件
+     * @param url
+     * @param file
+     * @return
+     * @throws IOException
+     * @throws NoSuchAlgorithmException
+     * @throws NoSuchProviderException
+     * @throws KeyManagementException
+     */
+    public static String upload(String url,File file) throws IOException, NoSuchAlgorithmException, NoSuchProviderException, KeyManagementException {
+        String BOUNDARY = "----WebKitFormBoundaryiDGnV9zdZA1eM1yL"; // 定义数据分隔线  
+        StringBuffer bufferRes = null;
+        URL urlGet = new URL(url);
+        HttpURLConnection conn = (HttpURLConnection) urlGet.openConnection();
+        conn.setDoOutput(true);  
+        conn.setDoInput(true);  
+        conn.setUseCaches(false);  
+        conn.setRequestMethod("POST");  
+        conn.setRequestProperty("connection", "Keep-Alive");  
+        conn.setRequestProperty("user-agent", "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/32.0.1700.107 Safari/537.36");  
+        conn.setRequestProperty("Charsert", "UTF-8");   
+        conn.setRequestProperty("Content-Type", "multipart/form-data; boundary=" + BOUNDARY);  
+          
+        OutputStream out = new DataOutputStream(conn.getOutputStream());  
+        byte[] end_data = ("\r\n--" + BOUNDARY + "--\r\n").getBytes();// 定义最后数据分隔线  
+        StringBuilder sb = new StringBuilder();    
+        sb.append("--");    
+        sb.append(BOUNDARY);    
+        sb.append("\r\n");    
+        sb.append("Content-Disposition: form-data;name=\"media\";filename=\""+ file.getName() + "\"\r\n");    
+        sb.append("Content-Type:application/octet-stream\r\n\r\n");    
+        byte[] data = sb.toString().getBytes();  
+        out.write(data);  
+        DataInputStream fs = new DataInputStream(new FileInputStream(file));  
+        int bytes = 0;  
+        byte[] bufferOut = new byte[1024];  
+        while ((bytes = fs.read(bufferOut)) != -1) {  
+            out.write(bufferOut, 0, bytes);  
+        }  
+        out.write("\r\n".getBytes()); //多个文件时,二个文件之间加入这个  
+        fs.close();  
+        out.write(end_data);  
+        out.flush();    
+        out.close();   
+          
+        // 定义BufferedReader输入流来读取URL的响应  
+        InputStream in = conn.getInputStream();
+        BufferedReader read = new BufferedReader(new InputStreamReader(in, DEFAULT_CHARSET));
+        String valueString = null;
+        bufferRes = new StringBuffer();
+        while ((valueString = read.readLine()) != null){
+            bufferRes.append(valueString);
+        }
+        in.close();
+        if (conn != null) {
+            // 关闭连接
+         conn.disconnect();
+        }
+        return bufferRes.toString();
+    }
+    
+    /**
+     * 构造url
+     * @param url
+     * @param params
+     * @return
+     */
+    private static String initParams(String url, Map<String, String> params){
+        if (null == params || params.isEmpty()) {
+            return url;
+        }
+        StringBuilder sb = new StringBuilder(url);
+        if (url.indexOf("?") == -1) {
+            sb.append("?");
+        } else {
+            sb.append("&");
+        }
+        boolean first = true;
+        for (Entry<String, String> entry : params.entrySet()) {
+            if (first) {
+                first = false;
+            } else {
+                sb.append("&");
+            }
+            String key = entry.getKey();
+            String value = entry.getValue();
+            sb.append(key).append("=");
+            if (StringUtils.isNotEmpty(value)) {
+                try {
+                    sb.append(URLEncoder.encode(value, DEFAULT_CHARSET));
+                } catch (UnsupportedEncodingException e) {
+                    e.printStackTrace();
+                }
+            }
+        }
+        return sb.toString();
+    }
+    
+    public static void main(String[] args) {
+     String fname = "dsasdas.mp4";
+     String s = fname.substring(0, fname.lastIndexOf("."));
+     String f = fname.substring(s.length()+1);
+  System.out.println(f);
+ }
+}
+
+/**
+ * 证书管理
+ */
+class MyX509TrustManager implements X509TrustManager {
+    public X509Certificate[] getAcceptedIssuers() {
+        return null;  
+    }
+    @Override
+    public void checkClientTrusted(X509Certificate[] chain, String authType)
+            throws CertificateException {
+    }
+    @Override
+    public void checkServerTrusted(X509Certificate[] chain, String authType)
+            throws CertificateException {
+    }
+}

+ 39 - 0
minigame/src/com/hhsx/utils/HttpRespMsg.java

@@ -0,0 +1,39 @@
+package com.hhsx.utils;
+
+import com.alibaba.fastjson.JSONObject;
+import com.fasterxml.jackson.annotation.JsonInclude;
+
+import java.io.Serializable;
+
+public class HttpRespMsg implements Serializable {
+
+    //status code, ok or error.
+    public String code;
+
+
+    @JsonInclude(JsonInclude.Include.NON_NULL)
+    public String msg;
+
+    //data content, in jsonformat, or zipped string when format is gzip
+    @JsonInclude(JsonInclude.Include.NON_NULL)
+    public Object data;
+
+    public HttpRespMsg() {
+        code = "ok";
+    }
+
+    public void setError(String errorMsg) {
+        code = "error";
+        msg = errorMsg;
+    }
+
+
+    public String toJSONStr() {
+        JSONObject json = new JSONObject();
+        json.put("code", code);
+        json.put("data", data);
+        json.put("msg", msg);
+
+        return json.toJSONString();
+    }
+}

+ 217 - 0
minigame/src/com/hhsx/utils/MicroblogUsersNews.java

@@ -0,0 +1,217 @@
+package com.hhsx.utils;
+
+
+import java.util.List;
+
+/**
+ * Author: 吴涛涛 cuiyi@itany.com
+ * Date : 2019 - 09 - 17 11:39
+ * Description:<描述>
+ *     新浪微博用户基本详细返回的实体类封装
+ * Version: 1.0
+ */
+public class MicroblogUsersNews {
+
+    private String subscribe;//用户是否订阅该公众号标识,值为0时,代表此用户没有关注该公众号,拉取不到其余信息,1表示用户已关注。
+
+    private String uid;//用户的标识,对当前公众号唯一
+
+    private String nickname;//用户的昵称
+
+    private String sex;//用户的性别,值为1时是男性,值为2时是女性,值为0时是未知
+
+    private String city;//用户所在城市
+
+    private String country;//用户所在国家
+
+    private String province;//用户所在省份
+
+    private String language;//用户的语言,简体中文为zh_CN
+
+    private String headimgurl;//用户头像地址(中图),50×50像素
+
+    private String headimgurl_large;//用户头像地址(大图),180×180像素
+
+    private String headimgurl_hd;//用户头像地址(高清),高清头像原图
+
+    private Integer follow;//该用户是否关注access_token中的uid,1:是,0:否
+
+    private Long subscribe_time;//用户关注时间,为时间戳。如果用户曾多次关注,则取最后关注时间
+
+    private String unionid;//只有在用户将公众号绑定到微信开放平台帐号后,才会出现该字段。
+
+    private String remark;//公众号运营者对粉丝的备注,公众号运营者可在微信公众平台用户管理界面对粉丝添加备注
+
+    private String groupid;//用户所在的分组ID(兼容旧的用户分组接口)
+
+    private List<Integer> tagid_list;//用户被打上的标签ID列表
+
+    private String subscribe_scene;//返回用户关注的渠道来源,ADD_SCENE_SEARCH 公众号搜索,ADD_SCENE_ACCOUNT_MIGRATION 公众号迁移,ADD_SCENE_PROFILE_CARD 名片分享,ADD_SCENE_QR_CODE 扫描二维码,ADD_SCENE_PROFILE_ LINK 图文页内名称点击,ADD_SCENE_PROFILE_ITEM 图文页右上角菜单,ADD_SCENE_PAID 支付后关注,ADD_SCENE_OTHERS 其他
+
+    private String qr_scene;//二维码扫码场景(开发者自定义)
+
+    private String qr_scene_str;//二维码扫码场景描述(开发者自定义)
+
+	public String getSubscribe() {
+		return subscribe;
+	}
+
+	public void setSubscribe(String subscribe) {
+		this.subscribe = subscribe;
+	}
+
+	public String getUid() {
+		return uid;
+	}
+
+	public void setUid(String uid) {
+		this.uid = uid;
+	}
+
+	public String getNickname() {
+		return nickname;
+	}
+
+	public void setNickname(String nickname) {
+		this.nickname = nickname;
+	}
+
+	public String getSex() {
+		return sex;
+	}
+
+	public void setSex(String sex) {
+		this.sex = sex;
+	}
+
+	public String getCity() {
+		return city;
+	}
+
+	public void setCity(String city) {
+		this.city = city;
+	}
+
+	public String getCountry() {
+		return country;
+	}
+
+	public void setCountry(String country) {
+		this.country = country;
+	}
+
+	public String getProvince() {
+		return province;
+	}
+
+	public void setProvince(String province) {
+		this.province = province;
+	}
+
+	public String getLanguage() {
+		return language;
+	}
+
+	public void setLanguage(String language) {
+		this.language = language;
+	}
+
+	public String getHeadimgurl() {
+		return headimgurl;
+	}
+
+	public void setHeadimgurl(String headimgurl) {
+		this.headimgurl = headimgurl;
+	}
+
+	public String getHeadimgurl_large() {
+		return headimgurl_large;
+	}
+
+	public void setHeadimgurl_large(String headimgurl_large) {
+		this.headimgurl_large = headimgurl_large;
+	}
+
+	public String getHeadimgurl_hd() {
+		return headimgurl_hd;
+	}
+
+	public void setHeadimgurl_hd(String headimgurl_hd) {
+		this.headimgurl_hd = headimgurl_hd;
+	}
+
+	public Integer getFollow() {
+		return follow;
+	}
+
+	public void setFollow(Integer follow) {
+		this.follow = follow;
+	}
+
+	public Long getSubscribe_time() {
+		return subscribe_time;
+	}
+
+	public void setSubscribe_time(Long subscribe_time) {
+		this.subscribe_time = subscribe_time;
+	}
+
+	public String getUnionid() {
+		return unionid;
+	}
+
+	public void setUnionid(String unionid) {
+		this.unionid = unionid;
+	}
+
+	public String getRemark() {
+		return remark;
+	}
+
+	public void setRemark(String remark) {
+		this.remark = remark;
+	}
+
+	public String getGroupid() {
+		return groupid;
+	}
+
+	public void setGroupid(String groupid) {
+		this.groupid = groupid;
+	}
+
+	public List<Integer> getTagid_list() {
+		return tagid_list;
+	}
+
+	public void setTagid_list(List<Integer> tagid_list) {
+		this.tagid_list = tagid_list;
+	}
+
+	public String getSubscribe_scene() {
+		return subscribe_scene;
+	}
+
+	public void setSubscribe_scene(String subscribe_scene) {
+		this.subscribe_scene = subscribe_scene;
+	}
+
+	public String getQr_scene() {
+		return qr_scene;
+	}
+
+	public void setQr_scene(String qr_scene) {
+		this.qr_scene = qr_scene;
+	}
+
+	public String getQr_scene_str() {
+		return qr_scene_str;
+	}
+
+	public void setQr_scene_str(String qr_scene_str) {
+		this.qr_scene_str = qr_scene_str;
+	}
+    
+
+
+}

+ 32 - 0
minigame/src/com/hhsx/utils/WechatAndMicroblogUtil.java

@@ -0,0 +1,32 @@
+package com.hhsx.utils;
+
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONObject;
+
+import java.util.Date;
+
+import org.apache.commons.lang.StringEscapeUtils;
+
+/**
+ * Author: 吴涛涛 cuiyi@itany.com
+ * Date : 2019 - 09 - 17 10:02
+ * Description:<描述>
+ * Version: 1.0
+ */
+public class WechatAndMicroblogUtil {
+
+    public static WechatUserNews getWechatUserNews(String openId,String access_token)throws Exception{
+        WechatUserNews wechatUserNews = new WechatUserNews();
+        String url ="https://api.weixin.qq.com/cgi-bin/user/info?access_token="+access_token+"&openid="+openId+"&lang=zh_CN";
+        String resp = HttpKit.get(url, true);
+        resp = StringEscapeUtils.unescapeJava(resp);
+        JSONObject json = (JSONObject) JSON.parse(resp);
+        //获取值赋值给全局变量
+        if (!json.containsKey("errcode")) {
+            wechatUserNews.setHeadimgurl(json.getString("headimgurl"));
+            wechatUserNews.setNickname(json.getString("nickname"));
+//            System.out.println("获取新access_token==>" + oldAccessToken);
+        }
+        return wechatUserNews;
+    }
+}

+ 186 - 0
minigame/src/com/hhsx/utils/WechatUserNews.java

@@ -0,0 +1,186 @@
+package com.hhsx.utils;
+
+
+import java.util.List;
+
+/**
+ * Author: 吴涛涛 cuiyi@itany.com
+ * Date : 2019 - 09 - 17 10:25
+ * Description:<描述>
+ *     微信用户基本详细返回的实体类封装
+ * Version: 1.0
+ */
+public class WechatUserNews {
+
+    private String subscribe;//用户是否订阅该公众号标识,值为0时,代表此用户没有关注该公众号,拉取不到其余信息,1表示用户已关注。
+
+    private String openid;//用户的标识,对当前公众号唯一
+
+    private String nickname;//用户的昵称
+
+    private String sex;//用户的性别,值为1时是男性,值为2时是女性,值为0时是未知
+
+    private String city;//用户所在城市
+
+    private String country;//用户所在国家
+
+    private String province;//用户所在省份
+
+    private String language;//用户的语言,简体中文为zh_CN
+
+    private String headimgurl;//用户头像,最后一个数值代表正方形头像大小(有0、46、64、96、132数值可选,0代表640*640正方形头像),用户没有头像时该项为空。若用户更换头像,原有头像URL将失效。
+
+    private Long subscribe_time;//用户关注时间,为时间戳。如果用户曾多次关注,则取最后关注时间
+
+    private String unionid;//只有在用户将公众号绑定到微信开放平台帐号后,才会出现该字段。
+
+    private String remark;//公众号运营者对粉丝的备注,公众号运营者可在微信公众平台用户管理界面对粉丝添加备注
+
+    private String groupid;//用户所在的分组ID(兼容旧的用户分组接口)
+
+    private List<Integer> tagid_list;//用户被打上的标签ID列表
+
+    private String subscribe_scene;//返回用户关注的渠道来源,ADD_SCENE_SEARCH 公众号搜索,ADD_SCENE_ACCOUNT_MIGRATION 公众号迁移,ADD_SCENE_PROFILE_CARD 名片分享,ADD_SCENE_QR_CODE 扫描二维码,ADD_SCENE_PROFILE_ LINK 图文页内名称点击,ADD_SCENE_PROFILE_ITEM 图文页右上角菜单,ADD_SCENE_PAID 支付后关注,ADD_SCENE_OTHERS 其他
+
+    private String qr_scene;//二维码扫码场景(开发者自定义)
+
+    private String qr_scene_str;//二维码扫码场景描述(开发者自定义)
+
+	public String getSubscribe() {
+		return subscribe;
+	}
+
+	public void setSubscribe(String subscribe) {
+		this.subscribe = subscribe;
+	}
+
+	public String getOpenid() {
+		return openid;
+	}
+
+	public void setOpenid(String openid) {
+		this.openid = openid;
+	}
+
+	public String getNickname() {
+		return nickname;
+	}
+
+	public void setNickname(String nickname) {
+		this.nickname = nickname;
+	}
+
+	public String getSex() {
+		return sex;
+	}
+
+	public void setSex(String sex) {
+		this.sex = sex;
+	}
+
+	public String getCity() {
+		return city;
+	}
+
+	public void setCity(String city) {
+		this.city = city;
+	}
+
+	public String getCountry() {
+		return country;
+	}
+
+	public void setCountry(String country) {
+		this.country = country;
+	}
+
+	public String getProvince() {
+		return province;
+	}
+
+	public void setProvince(String province) {
+		this.province = province;
+	}
+
+	public String getLanguage() {
+		return language;
+	}
+
+	public void setLanguage(String language) {
+		this.language = language;
+	}
+
+	public String getHeadimgurl() {
+		return headimgurl;
+	}
+
+	public void setHeadimgurl(String headimgurl) {
+		this.headimgurl = headimgurl;
+	}
+
+	public Long getSubscribe_time() {
+		return subscribe_time;
+	}
+
+	public void setSubscribe_time(Long subscribe_time) {
+		this.subscribe_time = subscribe_time;
+	}
+
+	public String getUnionid() {
+		return unionid;
+	}
+
+	public void setUnionid(String unionid) {
+		this.unionid = unionid;
+	}
+
+	public String getRemark() {
+		return remark;
+	}
+
+	public void setRemark(String remark) {
+		this.remark = remark;
+	}
+
+	public String getGroupid() {
+		return groupid;
+	}
+
+	public void setGroupid(String groupid) {
+		this.groupid = groupid;
+	}
+
+	public List<Integer> getTagid_list() {
+		return tagid_list;
+	}
+
+	public void setTagid_list(List<Integer> tagid_list) {
+		this.tagid_list = tagid_list;
+	}
+
+	public String getSubscribe_scene() {
+		return subscribe_scene;
+	}
+
+	public void setSubscribe_scene(String subscribe_scene) {
+		this.subscribe_scene = subscribe_scene;
+	}
+
+	public String getQr_scene() {
+		return qr_scene;
+	}
+
+	public void setQr_scene(String qr_scene) {
+		this.qr_scene = qr_scene;
+	}
+
+	public String getQr_scene_str() {
+		return qr_scene_str;
+	}
+
+	public void setQr_scene_str(String qr_scene_str) {
+		this.qr_scene_str = qr_scene_str;
+	}
+    
+    
+}

+ 2 - 0
minigame/src/config.properties

@@ -0,0 +1,2 @@
+push=1
+redis_enable=true

+ 39 - 0
minigame/src/context-dispatcher.xml

@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans default-lazy-init="true"
+	xmlns="http://www.springframework.org/schema/beans"
+	xmlns:p="http://www.springframework.org/schema/p"
+	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xmlns:context="http://www.springframework.org/schema/context"
+	xmlns:mvc="http://www.springframework.org/schema/mvc"
+	xsi:schemaLocation="  
+       http://www.springframework.org/schema/beans   
+       http://www.springframework.org/schema/beans/spring-beans-3.0.xsd  
+       http://www.springframework.org/schema/mvc   
+       http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd    
+       http://www.springframework.org/schema/context  
+       http://www.springframework.org/schema/context/spring-context-3.0.xsd">
+
+	<!-- 使用注解的包,包括子集 -->
+	<context:component-scan
+		base-package="com.estates" />
+	<!-- 通过注解,把URL映射到Controller上,该标签默认注册DefaultAnnotationHandlerMapping和AnnotationMethodHandlerAdapter -->
+	<!-- <bean class="org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter" 
+		/> -->
+	<mvc:annotation-driven />
+	<!-- 视图解析器 -->
+	<bean id="viewResolver"
+		class="org.springframework.web.servlet.view.InternalResourceViewResolver">
+		<property name="viewClass"
+			value="org.springframework.web.servlet.view.JstlView" />
+		<property name="prefix" value="/view/" />
+		<property name="suffix" value=".jsp"></property>
+	</bean>
+
+	<bean id="multipartResolver"
+		class="org.springframework.web.multipart.commons.CommonsMultipartResolver"
+		p:defaultEncoding="UTF-8">
+		<property name="maxUploadSize" value="10000000" /><!-- 10M -->
+	</bean>
+
+
+</beans>  

+ 21 - 0
minigame/src/jdbc.properties

@@ -0,0 +1,21 @@
+classPath=D:/workspace/FengChuan/WebContent/WEB-INF/lib/mysql-connector-java-5.1.31-bin.jar
+driver=com.mysql.jdbc.Driver
+#url=jdbc:mysql://120.24.43.237:3306/qiangkebao?autoReconnect=true&rewriteBatchedStatements=TRUE&zeroDateTimeBehavior=convertToNull&useUnicode=true&characterEncoding=UTF-8
+#username=root
+#password=VIz1iZK7i2n3eonT
+url=jdbc:mysql://118.190.47.230:3306/minigame?autoReconnect=true&rewriteBatchedStatements=TRUE&zeroDateTimeBehavior=convertToNull&useUnicode=true&characterEncoding=UTF-8
+username=root
+password=p011430seya10
+maxActive=255
+maxIdle=20
+maxWait=100
+#redis config info
+#redis.hostName=127.0.0.1
+#redis.hostName=120.79.31.196
+#redis.port=6379
+#redis.timeout=15000
+#redis.usePool=true
+#redis.maxIdle=6
+#redis.minEvictableIdleTimeMillis=300000
+#redis.numTestsPerEvictionRun=3
+#redis.timeBetweenEvictionRunsMillis=60000

+ 26 - 0
minigame/src/log4j.properties

@@ -0,0 +1,26 @@
+log4j.rootCategory=INFO ,stdout, R   
+   
+log4j.appender.stdout=org.apache.log4j.ConsoleAppender   
+log4j.appender.stdout.layout=org.apache.log4j.PatternLayout   
+log4j.appender.stdout.layout.ConversionPattern=[qiangkebao] %p [%t] %C.%M(%L) | %m%n   
+    
+log4j.appender.R=org.apache.log4j.DailyRollingFileAppender   
+log4j.appender.R.File=D://log/qiangkebao.log
+#log4j.appender.R.File=/log/qiangkebao.log
+log4j.appender.R.layout=org.apache.log4j.PatternLayout   
+log4j.appender.R.layout.ConversionPattern=%d-[TS] %p %t %c - %m%n
+
+#log4j.logger.com.ibatis=DEBUG
+#log4j.logger.com.ibatis.common.jdbc.SimpleDataSource=DEBUG
+#log4j.logger.com.ibatis.common.jdbc.ScriptRunner=DEBUG
+#log4j.logger.com.ibatis.sqlmap.engine.impl.SqlMapClientDelegate=DEBUG
+#log4j.logger.java.sql.Connection=DEBUG
+#log4j.logger.java.sql.Statement=DEBUG
+#log4j.logger.java.sql.PreparedStatement=DEBUG, A1     
+log4j.logger.com.ibatis=INFO
+log4j.logger.com.ibatis.common.jdbc.SimpleDataSource=INFO
+log4j.logger.com.ibatis.common.jdbc.ScriptRunner=INFO
+log4j.logger.com.ibatis.sqlmap.engine.impl.SqlMapClientDelegate=INFO
+log4j.logger.java.sql.Connection=INFO
+log4j.logger.java.sql.Statement=INFO
+log4j.logger.java.sql.PreparedStatement=INFO, A1     

+ 31 - 0
minigame/src/spring-redis.xml

@@ -0,0 +1,31 @@
+<beans xmlns="http://www.springframework.org/schema/beans"   
+xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"  
+xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd" default-autowire="byName">  
+    <bean id="jedisPoolConfig" class="redis.clients.jedis.JedisPoolConfig">  
+<!--          <property name="maxIdle" value="6"></property>   -->
+<!--         <property name="minEvictableIdleTimeMillis" value="300000"></property>   -->
+<!--         <property name="numTestsPerEvictionRun" value="3"></property>   -->
+<!--         <property name="timeBetweenEvictionRunsMillis" value="60000"></property> -->
+        
+        <property name="maxIdle" value="${redis.maxIdle}"></property>  
+        <property name="minEvictableIdleTimeMillis" value="${redis.minEvictableIdleTimeMillis}"></property>  
+        <property name="numTestsPerEvictionRun" value="${redis.numTestsPerEvictionRun}"></property>  
+        <property name="timeBetweenEvictionRunsMillis" value="${redis.timeBetweenEvictionRunsMillis}"></property>
+    </bean>  
+    <bean id="jedisConnectionFactory" class="org.springframework.data.redis.connection.jedis.JedisConnectionFactory" destroy-method="destroy">  
+        <property name="poolConfig" ref="jedisPoolConfig"></property>  
+        <property name="hostName" value="${redis.hostName}"></property>  
+        <property name="port" value="${redis.port}"></property>  
+        <property name="timeout" value="${redis.timeout}"></property>  
+        <property name="usePool" value="${redis.usePool}"></property>  
+    </bean>  
+    <bean id="jedisTemplate" class="org.springframework.data.redis.core.RedisTemplate">  
+        <property name="connectionFactory" ref="jedisConnectionFactory"></property>  
+        <property name="keySerializer">  
+            <bean class="org.springframework.data.redis.serializer.StringRedisSerializer"/>  
+        </property>  
+        <property name="valueSerializer">  
+            <bean class="org.springframework.data.redis.serializer.JdkSerializationRedisSerializer"/>  
+        </property>  
+    </bean>  
+</beans>