wanghui лет назад: 8
Родитель
Сommit
3581ca7402

+ 2 - 2
GeneratorConfig.xml

@@ -2,7 +2,7 @@
 <!DOCTYPE generatorConfiguration PUBLIC "-//mybatis.org//DTD MyBatis Generator Configuration 1.0//EN" "http://mybatis.org/dtd/mybatis-generator-config_1_0.dtd">
 <generatorConfiguration>
 
-  <classPathEntry location="C:/Users/Administrator/.dbeaver-drivers/maven/maven-central/mysql/mysql-connector-java-5.1.44.jar" />
+  <classPathEntry location="E:/mysql-connector-java-5.1.40.jar" />
 
   <context id="context1">	
     <jdbcConnection connectionURL="jdbc:mysql://192.168.1.213:3306/aft" 
@@ -11,7 +11,7 @@
     <sqlMapGenerator targetPackage="com.goafanti.common.mapper" targetProject="AFT" />
     <javaClientGenerator targetPackage="com.goafanti.common.dao" targetProject="AFT" type="XMLMAPPER" />
     <!-- <table schema="aft" tableName="t_order"/> -->
-    <table schema="aft" tableName="t_order_detail"/> 
+    <table schema="aft" tableName="app_config"/> 
 
   </context>
 </generatorConfiguration>

+ 10 - 10
pom.xml

@@ -329,16 +329,16 @@
 		    <artifactId>poi-ooxml</artifactId>
 		    <version>3.17</version>
 		</dependency>
-        <dependency>
-            <groupId>com.aliyun</groupId>
-            <artifactId>aliyun-java-sdk-core</artifactId>
-            <version>2.4.2</version>
-        </dependency>
-        <dependency>
-            <groupId>com.aliyun</groupId>
-            <artifactId>aliyun-java-sdk-sms</artifactId>
-            <version>3.0.0-rc1</version>
-        </dependency>
+       <dependency>
+ 		 	<groupId>com.aliyun</groupId>
+  			<artifactId>aliyun-java-sdk-dysmsapi</artifactId>
+  			<version>1.0.0</version>
+		</dependency>
+		<dependency>
+			<groupId>com.aliyun</groupId>
+			<artifactId>aliyun-java-sdk-core</artifactId>
+			<version>3.5.0</version>
+		</dependency>
         <dependency>
 			<groupId>org.apache.httpcomponents</groupId>
 			<artifactId>httpasyncclient</artifactId>

+ 5 - 0
src/main/java/com/goafanti/app/bo/AppConfigBo.java

@@ -0,0 +1,5 @@
+package com.goafanti.app.bo;
+
+public class AppConfigBo {
+
+}

+ 0 - 35
src/main/java/com/goafanti/app/controller/AppConfigController.java

@@ -1,35 +0,0 @@
-package com.goafanti.app.controller;
-
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestMethod;
-import org.springframework.web.bind.annotation.RestController;
-
-import com.goafanti.app.service.AppConfigService;
-import com.goafanti.app.service.MyAppService;
-import com.goafanti.common.bo.Result;
-import com.goafanti.common.controller.BaseApiController;
-import com.goafanti.common.utils.StringUtils;
-
-@RestController
-@RequestMapping(path = "/api/app", method = RequestMethod.GET)
-public class AppConfigController extends BaseApiController {
-
-	@Autowired
-	AppConfigService	appConfigService;
-	@Autowired
-	MyAppService		myAppService;
-
-	@RequestMapping(value = "/config", method = RequestMethod.GET)
-	public Result config(String noCache) {
-		if (StringUtils.equals(noCache, "1")) {
-			appConfigService.cleanList();
-		}
-		return res().data(appConfigService.findPortalAppConfigs());
-	}
-
-	@RequestMapping(value = "/count", method = RequestMethod.GET)
-	public Result count(String cate) {
-		return res().data(myAppService.countByCate(cate));
-	}
-}

+ 21 - 0
src/main/java/com/goafanti/app/controller/OpenAppConfigController.java

@@ -0,0 +1,21 @@
+package com.goafanti.app.controller;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+
+import com.goafanti.common.bo.Result;
+import com.goafanti.common.dao.AppConfigMapper;
+
+@RequestMapping(path = "open/app/config")
+public class OpenAppConfigController {
+	@Autowired
+	private AppConfigMapper appConfigMapper;
+	
+	@RequestMapping(value = "/getAppRelease", method = RequestMethod.GET)
+	public Result getAppRelease(){
+		Result res = new Result();
+		res.setData(appConfigMapper.getAppRelease());
+		return res;
+	}
+}

+ 2 - 1
src/main/java/com/goafanti/app/controller/OpenAppDiscoveryController.java

@@ -2,6 +2,7 @@ package com.goafanti.app.controller;
 
 import javax.annotation.Resource;
 
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestMethod;
 import org.springframework.web.bind.annotation.RestController;
@@ -10,6 +11,7 @@ import com.goafanti.achievement.service.AchievementInterestService;
 import com.goafanti.achievement.service.AchievementService;
 import com.goafanti.common.bo.Result;
 import com.goafanti.common.controller.BaseApiController;
+import com.goafanti.common.dao.AppConfigMapper;
 import com.goafanti.common.utils.StringUtils;
 import com.goafanti.demand.service.DemandService;
 import com.goafanti.user.service.UserIdentityService;
@@ -103,5 +105,4 @@ public class OpenAppDiscoveryController extends BaseApiController {
 		res.setData(userIdentityService.advertising());
 		return res;
 	}
-	
 }

+ 0 - 34
src/main/java/com/goafanti/app/service/AppConfigService.java

@@ -1,34 +0,0 @@
-package com.goafanti.app.service;
-
-import java.util.List;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.cache.annotation.CacheEvict;
-import org.springframework.cache.annotation.Cacheable;
-import org.springframework.stereotype.Service;
-
-import com.alibaba.fastjson.JSONObject;
-import com.goafanti.common.dao.AppConfigMapper;
-import com.goafanti.common.utils.LoggerUtils;
-import com.goafanti.core.mybatis.BaseMybatisDao;
-
-@Service
-public class AppConfigService extends BaseMybatisDao<AppConfigMapper> {
-	@Autowired
-	AppConfigMapper				appConfigMapper;
-
-	private static final Logger	logger	= LoggerFactory.getLogger(AppConfigService.class);
-
-	@Cacheable(value = "AppConfigListCache", key = "'AppConfigList'")
-	public List<JSONObject> findPortalAppConfigs() {
-		return appConfigMapper.findList();
-	}
-
-	@CacheEvict(value = "AppConfigListCache", key = "'AppConfigList'")
-	public void cleanList() {
-		LoggerUtils.debug(logger, "清除app配置列表缓存");
-	}
-
-}

+ 82 - 21
src/main/java/com/goafanti/common/dao/AppConfigMapper.java

@@ -1,22 +1,83 @@
-package com.goafanti.common.dao;
-
-import java.util.List;
-
-import com.alibaba.fastjson.JSONObject;
-import com.goafanti.common.model.AppConfig;
-
-public interface AppConfigMapper {
-	int deleteByPrimaryKey(Integer id);
-
-	int insert(AppConfig record);
-
-	int insertSelective(AppConfig record);
-
-	AppConfig selectByPrimaryKey(Integer id);
-
-	int updateByPrimaryKeySelective(AppConfig record);
-
-	int updateByPrimaryKey(AppConfig record);
-
-	List<JSONObject> findList();
+package com.goafanti.common.dao;
+
+import java.util.List;
+
+import com.goafanti.app.bo.AppConfigBo;
+import com.goafanti.common.model.AppConfig;
+import com.goafanti.common.model.AppConfigExample;
+import org.apache.ibatis.annotations.Param;
+
+public interface AppConfigMapper {
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table app_config
+	 * @mbg.generated  Wed Jan 24 16:21:41 CST 2018
+	 */
+	long countByExample(AppConfigExample example);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table app_config
+	 * @mbg.generated  Wed Jan 24 16:21:41 CST 2018
+	 */
+	int deleteByExample(AppConfigExample example);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table app_config
+	 * @mbg.generated  Wed Jan 24 16:21:41 CST 2018
+	 */
+	int deleteByPrimaryKey(Integer id);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table app_config
+	 * @mbg.generated  Wed Jan 24 16:21:41 CST 2018
+	 */
+	int insert(AppConfig record);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table app_config
+	 * @mbg.generated  Wed Jan 24 16:21:41 CST 2018
+	 */
+	int insertSelective(AppConfig record);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table app_config
+	 * @mbg.generated  Wed Jan 24 16:21:41 CST 2018
+	 */
+	List<AppConfig> selectByExample(AppConfigExample example);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table app_config
+	 * @mbg.generated  Wed Jan 24 16:21:41 CST 2018
+	 */
+	AppConfig selectByPrimaryKey(Integer id);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table app_config
+	 * @mbg.generated  Wed Jan 24 16:21:41 CST 2018
+	 */
+	int updateByExampleSelective(@Param("record") AppConfig record, @Param("example") AppConfigExample example);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table app_config
+	 * @mbg.generated  Wed Jan 24 16:21:41 CST 2018
+	 */
+	int updateByExample(@Param("record") AppConfig record, @Param("example") AppConfigExample example);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table app_config
+	 * @mbg.generated  Wed Jan 24 16:21:41 CST 2018
+	 */
+	int updateByPrimaryKeySelective(AppConfig record);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table app_config
+	 * @mbg.generated  Wed Jan 24 16:21:41 CST 2018
+	 */
+	int updateByPrimaryKey(AppConfig record);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table app_config
+	 * @mbg.generated  Wed Jan 24 16:14:16 CST 2018
+	 */
+	AppConfigBo getAppRelease();
 }

+ 330 - 97
src/main/java/com/goafanti/common/mapper/AppConfigMapper.xml

@@ -1,98 +1,331 @@
-<?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.goafanti.common.dao.AppConfigMapper">
-  <resultMap id="BaseResultMap" type="com.goafanti.common.model.AppConfig">
-    <id column="id" jdbcType="INTEGER" property="id" />
-    <result column="cate" jdbcType="VARCHAR" property="cate" />
-    <result column="key" jdbcType="VARCHAR" property="key" />
-    <result column="name" jdbcType="VARCHAR" property="name" />
-    <result column="value" jdbcType="VARCHAR" property="value" />
-  </resultMap>
-  <sql id="Base_Column_List">
-    `id`, `cate`, `key`, `name`, `value`
-  </sql>
-  <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
-    select 
-    <include refid="Base_Column_List" />
-    from app_config
-    where id = #{id,jdbcType=INTEGER}
-  </select>
-  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
-    delete from app_config
-    where id = #{id,jdbcType=INTEGER}
-  </delete>
-  <insert id="insert" parameterType="com.goafanti.common.model.AppConfig">
-    insert into app_config (`id`, `cate`, `key`, 
-      `name`, `value`)
-    values (#{id,jdbcType=INTEGER}, #{cate,jdbcType=VARCHAR}, #{key,jdbcType=VARCHAR}, 
-      #{name,jdbcType=VARCHAR}, #{value,jdbcType=VARCHAR})
-  </insert>
-  <insert id="insertSelective" parameterType="com.goafanti.common.model.AppConfig">
-    insert into app_config
-    <trim prefix="(" suffix=")" suffixOverrides=",">
-      <if test="id != null">
-        `id`,
-      </if>
-      <if test="cate != null">
-        `cate`,
-      </if>
-      <if test="key != null">
-        `key`,
-      </if>
-      <if test="name != null">
-        `name`,
-      </if>
-      <if test="value != null">
-        `value`,
-      </if>
-    </trim>
-    <trim prefix="values (" suffix=")" suffixOverrides=",">
-      <if test="id != null">
-        #{id,jdbcType=INTEGER},
-      </if>
-      <if test="cate != null">
-        #{cate,jdbcType=VARCHAR},
-      </if>
-      <if test="key != null">
-        #{key,jdbcType=VARCHAR},
-      </if>
-      <if test="name != null">
-        #{name,jdbcType=VARCHAR},
-      </if>
-      <if test="value != null">
-        #{value,jdbcType=VARCHAR},
-      </if>
-    </trim>
-  </insert>
-  <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.AppConfig">
-    update app_config
-    <set>
-      <if test="cate != null">
-        `cate` = #{cate,jdbcType=VARCHAR},
-      </if>
-      <if test="key != null">
-        `key` = #{key,jdbcType=VARCHAR},
-      </if>
-      <if test="name != null">
-        `name` = #{name,jdbcType=VARCHAR},
-      </if>
-      <if test="value != null">
-        `value` = #{value,jdbcType=VARCHAR},
-      </if>
-    </set>
-    where id = #{id,jdbcType=INTEGER}
-  </update>
-  <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.AppConfig">
-    update app_config
-    set `cate` = #{cate,jdbcType=VARCHAR},
-      `key` = #{key,jdbcType=VARCHAR},
-      `name` = #{name,jdbcType=VARCHAR},
-      `value` = #{value,jdbcType=VARCHAR}
-    where id = #{id,jdbcType=INTEGER}
-  </update>
-  <select id="findList" resultType="com.alibaba.fastjson.JSONObject">
-    select 
-    <include refid="Base_Column_List" />
-    from app_config
-  </select>
+<?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.goafanti.common.dao.AppConfigMapper">
+  <resultMap id="BaseResultMap" type="com.goafanti.common.model.AppConfig">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Wed Jan 24 16:21:41 CST 2018.
+    -->
+    <id column="id" jdbcType="INTEGER" property="id" />
+    <result column="release_version" jdbcType="VARCHAR" property="releaseVersion" />
+    <result column="release_desc" jdbcType="VARCHAR" property="releaseDesc" />
+    <result column="release_date" jdbcType="TIMESTAMP" property="releaseDate" />
+    <result column="app_url" jdbcType="VARCHAR" property="appUrl" />
+    <result column="force_update" jdbcType="INTEGER" property="forceUpdate" />
+    <result column="release_code" jdbcType="INTEGER" property="releaseCode" />
+  </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 Jan 24 16:21:41 CST 2018.
+    -->
+    <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 Jan 24 16:21:41 CST 2018.
+    -->
+    <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 Jan 24 16:21:41 CST 2018.
+    -->
+    id, release_version, release_desc, release_date, app_url, force_update, release_code
+  </sql>
+  <select id="selectByExample" parameterType="com.goafanti.common.model.AppConfigExample" resultMap="BaseResultMap">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Wed Jan 24 16:21:41 CST 2018.
+    -->
+    select
+    <if test="distinct">
+      distinct
+    </if>
+    <include refid="Base_Column_List" />
+    from app_config
+    <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 Jan 24 16:21:41 CST 2018.
+    -->
+    select 
+    <include refid="Base_Column_List" />
+    from app_config
+    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 Jan 24 16:21:41 CST 2018.
+    -->
+    delete from app_config
+    where id = #{id,jdbcType=INTEGER}
+  </delete>
+  <delete id="deleteByExample" parameterType="com.goafanti.common.model.AppConfigExample">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Wed Jan 24 16:21:41 CST 2018.
+    -->
+    delete from app_config
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </delete>
+  <insert id="insert" parameterType="com.goafanti.common.model.AppConfig">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Wed Jan 24 16:21:41 CST 2018.
+    -->
+    insert into app_config (id, release_version, release_desc, 
+      release_date, app_url, force_update, 
+      release_code)
+    values (#{id,jdbcType=INTEGER}, #{releaseVersion,jdbcType=VARCHAR}, #{releaseDesc,jdbcType=VARCHAR}, 
+      #{releaseDate,jdbcType=TIMESTAMP}, #{appUrl,jdbcType=VARCHAR}, #{forceUpdate,jdbcType=INTEGER}, 
+      #{releaseCode,jdbcType=INTEGER})
+  </insert>
+  <insert id="insertSelective" parameterType="com.goafanti.common.model.AppConfig">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Wed Jan 24 16:21:41 CST 2018.
+    -->
+    insert into app_config
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        id,
+      </if>
+      <if test="releaseVersion != null">
+        release_version,
+      </if>
+      <if test="releaseDesc != null">
+        release_desc,
+      </if>
+      <if test="releaseDate != null">
+        release_date,
+      </if>
+      <if test="appUrl != null">
+        app_url,
+      </if>
+      <if test="forceUpdate != null">
+        force_update,
+      </if>
+      <if test="releaseCode != null">
+        release_code,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        #{id,jdbcType=INTEGER},
+      </if>
+      <if test="releaseVersion != null">
+        #{releaseVersion,jdbcType=VARCHAR},
+      </if>
+      <if test="releaseDesc != null">
+        #{releaseDesc,jdbcType=VARCHAR},
+      </if>
+      <if test="releaseDate != null">
+        #{releaseDate,jdbcType=TIMESTAMP},
+      </if>
+      <if test="appUrl != null">
+        #{appUrl,jdbcType=VARCHAR},
+      </if>
+      <if test="forceUpdate != null">
+        #{forceUpdate,jdbcType=INTEGER},
+      </if>
+      <if test="releaseCode != null">
+        #{releaseCode,jdbcType=INTEGER},
+      </if>
+    </trim>
+  </insert>
+  <select id="countByExample" parameterType="com.goafanti.common.model.AppConfigExample" resultType="java.lang.Long">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Wed Jan 24 16:21:41 CST 2018.
+    -->
+    select count(*) from app_config
+    <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 Jan 24 16:21:41 CST 2018.
+    -->
+    update app_config
+    <set>
+      <if test="record.id != null">
+        id = #{record.id,jdbcType=INTEGER},
+      </if>
+      <if test="record.releaseVersion != null">
+        release_version = #{record.releaseVersion,jdbcType=VARCHAR},
+      </if>
+      <if test="record.releaseDesc != null">
+        release_desc = #{record.releaseDesc,jdbcType=VARCHAR},
+      </if>
+      <if test="record.releaseDate != null">
+        release_date = #{record.releaseDate,jdbcType=TIMESTAMP},
+      </if>
+      <if test="record.appUrl != null">
+        app_url = #{record.appUrl,jdbcType=VARCHAR},
+      </if>
+      <if test="record.forceUpdate != null">
+        force_update = #{record.forceUpdate,jdbcType=INTEGER},
+      </if>
+      <if test="record.releaseCode != null">
+        release_code = #{record.releaseCode,jdbcType=INTEGER},
+      </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 Jan 24 16:21:41 CST 2018.
+    -->
+    update app_config
+    set id = #{record.id,jdbcType=INTEGER},
+      release_version = #{record.releaseVersion,jdbcType=VARCHAR},
+      release_desc = #{record.releaseDesc,jdbcType=VARCHAR},
+      release_date = #{record.releaseDate,jdbcType=TIMESTAMP},
+      app_url = #{record.appUrl,jdbcType=VARCHAR},
+      force_update = #{record.forceUpdate,jdbcType=INTEGER},
+      release_code = #{record.releaseCode,jdbcType=INTEGER}
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.AppConfig">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Wed Jan 24 16:21:41 CST 2018.
+    -->
+    update app_config
+    <set>
+      <if test="releaseVersion != null">
+        release_version = #{releaseVersion,jdbcType=VARCHAR},
+      </if>
+      <if test="releaseDesc != null">
+        release_desc = #{releaseDesc,jdbcType=VARCHAR},
+      </if>
+      <if test="releaseDate != null">
+        release_date = #{releaseDate,jdbcType=TIMESTAMP},
+      </if>
+      <if test="appUrl != null">
+        app_url = #{appUrl,jdbcType=VARCHAR},
+      </if>
+      <if test="forceUpdate != null">
+        force_update = #{forceUpdate,jdbcType=INTEGER},
+      </if>
+      <if test="releaseCode != null">
+        release_code = #{releaseCode,jdbcType=INTEGER},
+      </if>
+    </set>
+    where id = #{id,jdbcType=INTEGER}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.AppConfig">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Wed Jan 24 16:21:41 CST 2018.
+    -->
+    update app_config
+    set release_version = #{releaseVersion,jdbcType=VARCHAR},
+      release_desc = #{releaseDesc,jdbcType=VARCHAR},
+      release_date = #{releaseDate,jdbcType=TIMESTAMP},
+      app_url = #{appUrl,jdbcType=VARCHAR},
+      force_update = #{forceUpdate,jdbcType=INTEGER},
+      release_code = #{releaseCode,jdbcType=INTEGER}
+    where id = #{id,jdbcType=INTEGER}
+  </update>
+  
+  <select id="getAppRelease" resultType="com.goafanti.app.bo.AppConfigBo">
+  	select  
+  		release_version as releaseVersion, 
+	  	release_desc as releaseDesc, 
+	  	date_format(release_date, '%Y-%m-%d %H:%I:%S') as releaseDate, 
+	  	app_url as appUrl, 
+	  	force_update forceUpdate, 
+	  	release_code releaseCode
+  	from 
+  		app_config 
+  	order by id desc limit 1
+  </select>
 </mapper>

+ 167 - 65
src/main/java/com/goafanti/common/model/AppConfig.java

@@ -1,66 +1,168 @@
-package com.goafanti.common.model;
-
-public class AppConfig {
-	private Integer	id;
-
-	/**
-	 * 分类
-	 */
-	private String	cate;
-
-	/**
-	 * 关键字
-	 */
-	private String	key;
-
-	/**
-	 * 名称
-	 */
-	private String	name;
-
-	/**
-	 * 值
-	 */
-	private String	value;
-
-	public Integer getId() {
-		return id;
-	}
-
-	public void setId(Integer id) {
-		this.id = id;
-	}
-
-	public String getCate() {
-		return cate;
-	}
-
-	public void setCate(String cate) {
-		this.cate = cate;
-	}
-
-	public String getKey() {
-		return key;
-	}
-
-	public void setKey(String key) {
-		this.key = key;
-	}
-
-	public String getName() {
-		return name;
-	}
-
-	public void setName(String name) {
-		this.name = name;
-	}
-
-	public String getValue() {
-		return value;
-	}
-
-	public void setValue(String value) {
-		this.value = value;
-	}
-
+package com.goafanti.common.model;
+
+import java.util.Date;
+
+public class AppConfig {
+
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column app_config.id
+	 * @mbg.generated  Wed Jan 24 16:21:41 CST 2018
+	 */
+	private Integer id;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column app_config.release_version
+	 * @mbg.generated  Wed Jan 24 16:21:41 CST 2018
+	 */
+	private String releaseVersion;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column app_config.release_desc
+	 * @mbg.generated  Wed Jan 24 16:21:41 CST 2018
+	 */
+	private String releaseDesc;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column app_config.release_date
+	 * @mbg.generated  Wed Jan 24 16:21:41 CST 2018
+	 */
+	private Date releaseDate;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column app_config.app_url
+	 * @mbg.generated  Wed Jan 24 16:21:41 CST 2018
+	 */
+	private String appUrl;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column app_config.force_update
+	 * @mbg.generated  Wed Jan 24 16:21:41 CST 2018
+	 */
+	private Integer forceUpdate;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column app_config.release_code
+	 * @mbg.generated  Wed Jan 24 16:21:41 CST 2018
+	 */
+	private Integer releaseCode;
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column app_config.id
+	 * @return  the value of app_config.id
+	 * @mbg.generated  Wed Jan 24 16:21:41 CST 2018
+	 */
+	public Integer getId() {
+		return id;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column app_config.id
+	 * @param id  the value for app_config.id
+	 * @mbg.generated  Wed Jan 24 16:21:41 CST 2018
+	 */
+	public void setId(Integer id) {
+		this.id = id;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column app_config.release_version
+	 * @return  the value of app_config.release_version
+	 * @mbg.generated  Wed Jan 24 16:21:41 CST 2018
+	 */
+	public String getReleaseVersion() {
+		return releaseVersion;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column app_config.release_version
+	 * @param releaseVersion  the value for app_config.release_version
+	 * @mbg.generated  Wed Jan 24 16:21:41 CST 2018
+	 */
+	public void setReleaseVersion(String releaseVersion) {
+		this.releaseVersion = releaseVersion;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column app_config.release_desc
+	 * @return  the value of app_config.release_desc
+	 * @mbg.generated  Wed Jan 24 16:21:41 CST 2018
+	 */
+	public String getReleaseDesc() {
+		return releaseDesc;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column app_config.release_desc
+	 * @param releaseDesc  the value for app_config.release_desc
+	 * @mbg.generated  Wed Jan 24 16:21:41 CST 2018
+	 */
+	public void setReleaseDesc(String releaseDesc) {
+		this.releaseDesc = releaseDesc;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column app_config.release_date
+	 * @return  the value of app_config.release_date
+	 * @mbg.generated  Wed Jan 24 16:21:41 CST 2018
+	 */
+	public Date getReleaseDate() {
+		return releaseDate;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column app_config.release_date
+	 * @param releaseDate  the value for app_config.release_date
+	 * @mbg.generated  Wed Jan 24 16:21:41 CST 2018
+	 */
+	public void setReleaseDate(Date releaseDate) {
+		this.releaseDate = releaseDate;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column app_config.app_url
+	 * @return  the value of app_config.app_url
+	 * @mbg.generated  Wed Jan 24 16:21:41 CST 2018
+	 */
+	public String getAppUrl() {
+		return appUrl;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column app_config.app_url
+	 * @param appUrl  the value for app_config.app_url
+	 * @mbg.generated  Wed Jan 24 16:21:41 CST 2018
+	 */
+	public void setAppUrl(String appUrl) {
+		this.appUrl = appUrl;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column app_config.force_update
+	 * @return  the value of app_config.force_update
+	 * @mbg.generated  Wed Jan 24 16:21:41 CST 2018
+	 */
+	public Integer getForceUpdate() {
+		return forceUpdate;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column app_config.force_update
+	 * @param forceUpdate  the value for app_config.force_update
+	 * @mbg.generated  Wed Jan 24 16:21:41 CST 2018
+	 */
+	public void setForceUpdate(Integer forceUpdate) {
+		this.forceUpdate = forceUpdate;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column app_config.release_code
+	 * @return  the value of app_config.release_code
+	 * @mbg.generated  Wed Jan 24 16:21:41 CST 2018
+	 */
+	public Integer getReleaseCode() {
+		return releaseCode;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column app_config.release_code
+	 * @param releaseCode  the value for app_config.release_code
+	 * @mbg.generated  Wed Jan 24 16:21:41 CST 2018
+	 */
+	public void setReleaseCode(Integer releaseCode) {
+		this.releaseCode = releaseCode;
+	}
 }

+ 712 - 0
src/main/java/com/goafanti/common/model/AppConfigExample.java

@@ -0,0 +1,712 @@
+package com.goafanti.common.model;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+public class AppConfigExample {
+    /**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database table app_config
+	 * @mbg.generated  Wed Jan 24 16:21:41 CST 2018
+	 */
+	protected String orderByClause;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database table app_config
+	 * @mbg.generated  Wed Jan 24 16:21:41 CST 2018
+	 */
+	protected boolean distinct;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database table app_config
+	 * @mbg.generated  Wed Jan 24 16:21:41 CST 2018
+	 */
+	protected List<Criteria> oredCriteria;
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table app_config
+	 * @mbg.generated  Wed Jan 24 16:21:41 CST 2018
+	 */
+	public AppConfigExample() {
+		oredCriteria = new ArrayList<Criteria>();
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table app_config
+	 * @mbg.generated  Wed Jan 24 16:21:41 CST 2018
+	 */
+	public void setOrderByClause(String orderByClause) {
+		this.orderByClause = orderByClause;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table app_config
+	 * @mbg.generated  Wed Jan 24 16:21:41 CST 2018
+	 */
+	public String getOrderByClause() {
+		return orderByClause;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table app_config
+	 * @mbg.generated  Wed Jan 24 16:21:41 CST 2018
+	 */
+	public void setDistinct(boolean distinct) {
+		this.distinct = distinct;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table app_config
+	 * @mbg.generated  Wed Jan 24 16:21:41 CST 2018
+	 */
+	public boolean isDistinct() {
+		return distinct;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table app_config
+	 * @mbg.generated  Wed Jan 24 16:21:41 CST 2018
+	 */
+	public List<Criteria> getOredCriteria() {
+		return oredCriteria;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table app_config
+	 * @mbg.generated  Wed Jan 24 16:21:41 CST 2018
+	 */
+	public void or(Criteria criteria) {
+		oredCriteria.add(criteria);
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table app_config
+	 * @mbg.generated  Wed Jan 24 16:21:41 CST 2018
+	 */
+	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 app_config
+	 * @mbg.generated  Wed Jan 24 16:21:41 CST 2018
+	 */
+	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 app_config
+	 * @mbg.generated  Wed Jan 24 16:21:41 CST 2018
+	 */
+	protected Criteria createCriteriaInternal() {
+		Criteria criteria = new Criteria();
+		return criteria;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table app_config
+	 * @mbg.generated  Wed Jan 24 16:21:41 CST 2018
+	 */
+	public void clear() {
+		oredCriteria.clear();
+		orderByClause = null;
+		distinct = false;
+	}
+
+	/**
+	 * This class was generated by MyBatis Generator. This class corresponds to the database table app_config
+	 * @mbg.generated  Wed Jan 24 16:21:41 CST 2018
+	 */
+	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 andReleaseVersionIsNull() {
+			addCriterion("release_version is null");
+			return (Criteria) this;
+		}
+
+		public Criteria andReleaseVersionIsNotNull() {
+			addCriterion("release_version is not null");
+			return (Criteria) this;
+		}
+
+		public Criteria andReleaseVersionEqualTo(String value) {
+			addCriterion("release_version =", value, "releaseVersion");
+			return (Criteria) this;
+		}
+
+		public Criteria andReleaseVersionNotEqualTo(String value) {
+			addCriterion("release_version <>", value, "releaseVersion");
+			return (Criteria) this;
+		}
+
+		public Criteria andReleaseVersionGreaterThan(String value) {
+			addCriterion("release_version >", value, "releaseVersion");
+			return (Criteria) this;
+		}
+
+		public Criteria andReleaseVersionGreaterThanOrEqualTo(String value) {
+			addCriterion("release_version >=", value, "releaseVersion");
+			return (Criteria) this;
+		}
+
+		public Criteria andReleaseVersionLessThan(String value) {
+			addCriterion("release_version <", value, "releaseVersion");
+			return (Criteria) this;
+		}
+
+		public Criteria andReleaseVersionLessThanOrEqualTo(String value) {
+			addCriterion("release_version <=", value, "releaseVersion");
+			return (Criteria) this;
+		}
+
+		public Criteria andReleaseVersionLike(String value) {
+			addCriterion("release_version like", value, "releaseVersion");
+			return (Criteria) this;
+		}
+
+		public Criteria andReleaseVersionNotLike(String value) {
+			addCriterion("release_version not like", value, "releaseVersion");
+			return (Criteria) this;
+		}
+
+		public Criteria andReleaseVersionIn(List<String> values) {
+			addCriterion("release_version in", values, "releaseVersion");
+			return (Criteria) this;
+		}
+
+		public Criteria andReleaseVersionNotIn(List<String> values) {
+			addCriterion("release_version not in", values, "releaseVersion");
+			return (Criteria) this;
+		}
+
+		public Criteria andReleaseVersionBetween(String value1, String value2) {
+			addCriterion("release_version between", value1, value2, "releaseVersion");
+			return (Criteria) this;
+		}
+
+		public Criteria andReleaseVersionNotBetween(String value1, String value2) {
+			addCriterion("release_version not between", value1, value2, "releaseVersion");
+			return (Criteria) this;
+		}
+
+		public Criteria andReleaseDescIsNull() {
+			addCriterion("release_desc is null");
+			return (Criteria) this;
+		}
+
+		public Criteria andReleaseDescIsNotNull() {
+			addCriterion("release_desc is not null");
+			return (Criteria) this;
+		}
+
+		public Criteria andReleaseDescEqualTo(String value) {
+			addCriterion("release_desc =", value, "releaseDesc");
+			return (Criteria) this;
+		}
+
+		public Criteria andReleaseDescNotEqualTo(String value) {
+			addCriterion("release_desc <>", value, "releaseDesc");
+			return (Criteria) this;
+		}
+
+		public Criteria andReleaseDescGreaterThan(String value) {
+			addCriterion("release_desc >", value, "releaseDesc");
+			return (Criteria) this;
+		}
+
+		public Criteria andReleaseDescGreaterThanOrEqualTo(String value) {
+			addCriterion("release_desc >=", value, "releaseDesc");
+			return (Criteria) this;
+		}
+
+		public Criteria andReleaseDescLessThan(String value) {
+			addCriterion("release_desc <", value, "releaseDesc");
+			return (Criteria) this;
+		}
+
+		public Criteria andReleaseDescLessThanOrEqualTo(String value) {
+			addCriterion("release_desc <=", value, "releaseDesc");
+			return (Criteria) this;
+		}
+
+		public Criteria andReleaseDescLike(String value) {
+			addCriterion("release_desc like", value, "releaseDesc");
+			return (Criteria) this;
+		}
+
+		public Criteria andReleaseDescNotLike(String value) {
+			addCriterion("release_desc not like", value, "releaseDesc");
+			return (Criteria) this;
+		}
+
+		public Criteria andReleaseDescIn(List<String> values) {
+			addCriterion("release_desc in", values, "releaseDesc");
+			return (Criteria) this;
+		}
+
+		public Criteria andReleaseDescNotIn(List<String> values) {
+			addCriterion("release_desc not in", values, "releaseDesc");
+			return (Criteria) this;
+		}
+
+		public Criteria andReleaseDescBetween(String value1, String value2) {
+			addCriterion("release_desc between", value1, value2, "releaseDesc");
+			return (Criteria) this;
+		}
+
+		public Criteria andReleaseDescNotBetween(String value1, String value2) {
+			addCriterion("release_desc not between", value1, value2, "releaseDesc");
+			return (Criteria) this;
+		}
+
+		public Criteria andReleaseDateIsNull() {
+			addCriterion("release_date is null");
+			return (Criteria) this;
+		}
+
+		public Criteria andReleaseDateIsNotNull() {
+			addCriterion("release_date is not null");
+			return (Criteria) this;
+		}
+
+		public Criteria andReleaseDateEqualTo(Date value) {
+			addCriterion("release_date =", value, "releaseDate");
+			return (Criteria) this;
+		}
+
+		public Criteria andReleaseDateNotEqualTo(Date value) {
+			addCriterion("release_date <>", value, "releaseDate");
+			return (Criteria) this;
+		}
+
+		public Criteria andReleaseDateGreaterThan(Date value) {
+			addCriterion("release_date >", value, "releaseDate");
+			return (Criteria) this;
+		}
+
+		public Criteria andReleaseDateGreaterThanOrEqualTo(Date value) {
+			addCriterion("release_date >=", value, "releaseDate");
+			return (Criteria) this;
+		}
+
+		public Criteria andReleaseDateLessThan(Date value) {
+			addCriterion("release_date <", value, "releaseDate");
+			return (Criteria) this;
+		}
+
+		public Criteria andReleaseDateLessThanOrEqualTo(Date value) {
+			addCriterion("release_date <=", value, "releaseDate");
+			return (Criteria) this;
+		}
+
+		public Criteria andReleaseDateIn(List<Date> values) {
+			addCriterion("release_date in", values, "releaseDate");
+			return (Criteria) this;
+		}
+
+		public Criteria andReleaseDateNotIn(List<Date> values) {
+			addCriterion("release_date not in", values, "releaseDate");
+			return (Criteria) this;
+		}
+
+		public Criteria andReleaseDateBetween(Date value1, Date value2) {
+			addCriterion("release_date between", value1, value2, "releaseDate");
+			return (Criteria) this;
+		}
+
+		public Criteria andReleaseDateNotBetween(Date value1, Date value2) {
+			addCriterion("release_date not between", value1, value2, "releaseDate");
+			return (Criteria) this;
+		}
+
+		public Criteria andAppUrlIsNull() {
+			addCriterion("app_url is null");
+			return (Criteria) this;
+		}
+
+		public Criteria andAppUrlIsNotNull() {
+			addCriterion("app_url is not null");
+			return (Criteria) this;
+		}
+
+		public Criteria andAppUrlEqualTo(String value) {
+			addCriterion("app_url =", value, "appUrl");
+			return (Criteria) this;
+		}
+
+		public Criteria andAppUrlNotEqualTo(String value) {
+			addCriterion("app_url <>", value, "appUrl");
+			return (Criteria) this;
+		}
+
+		public Criteria andAppUrlGreaterThan(String value) {
+			addCriterion("app_url >", value, "appUrl");
+			return (Criteria) this;
+		}
+
+		public Criteria andAppUrlGreaterThanOrEqualTo(String value) {
+			addCriterion("app_url >=", value, "appUrl");
+			return (Criteria) this;
+		}
+
+		public Criteria andAppUrlLessThan(String value) {
+			addCriterion("app_url <", value, "appUrl");
+			return (Criteria) this;
+		}
+
+		public Criteria andAppUrlLessThanOrEqualTo(String value) {
+			addCriterion("app_url <=", value, "appUrl");
+			return (Criteria) this;
+		}
+
+		public Criteria andAppUrlLike(String value) {
+			addCriterion("app_url like", value, "appUrl");
+			return (Criteria) this;
+		}
+
+		public Criteria andAppUrlNotLike(String value) {
+			addCriterion("app_url not like", value, "appUrl");
+			return (Criteria) this;
+		}
+
+		public Criteria andAppUrlIn(List<String> values) {
+			addCriterion("app_url in", values, "appUrl");
+			return (Criteria) this;
+		}
+
+		public Criteria andAppUrlNotIn(List<String> values) {
+			addCriterion("app_url not in", values, "appUrl");
+			return (Criteria) this;
+		}
+
+		public Criteria andAppUrlBetween(String value1, String value2) {
+			addCriterion("app_url between", value1, value2, "appUrl");
+			return (Criteria) this;
+		}
+
+		public Criteria andAppUrlNotBetween(String value1, String value2) {
+			addCriterion("app_url not between", value1, value2, "appUrl");
+			return (Criteria) this;
+		}
+
+		public Criteria andForceUpdateIsNull() {
+			addCriterion("force_update is null");
+			return (Criteria) this;
+		}
+
+		public Criteria andForceUpdateIsNotNull() {
+			addCriterion("force_update is not null");
+			return (Criteria) this;
+		}
+
+		public Criteria andForceUpdateEqualTo(Integer value) {
+			addCriterion("force_update =", value, "forceUpdate");
+			return (Criteria) this;
+		}
+
+		public Criteria andForceUpdateNotEqualTo(Integer value) {
+			addCriterion("force_update <>", value, "forceUpdate");
+			return (Criteria) this;
+		}
+
+		public Criteria andForceUpdateGreaterThan(Integer value) {
+			addCriterion("force_update >", value, "forceUpdate");
+			return (Criteria) this;
+		}
+
+		public Criteria andForceUpdateGreaterThanOrEqualTo(Integer value) {
+			addCriterion("force_update >=", value, "forceUpdate");
+			return (Criteria) this;
+		}
+
+		public Criteria andForceUpdateLessThan(Integer value) {
+			addCriterion("force_update <", value, "forceUpdate");
+			return (Criteria) this;
+		}
+
+		public Criteria andForceUpdateLessThanOrEqualTo(Integer value) {
+			addCriterion("force_update <=", value, "forceUpdate");
+			return (Criteria) this;
+		}
+
+		public Criteria andForceUpdateIn(List<Integer> values) {
+			addCriterion("force_update in", values, "forceUpdate");
+			return (Criteria) this;
+		}
+
+		public Criteria andForceUpdateNotIn(List<Integer> values) {
+			addCriterion("force_update not in", values, "forceUpdate");
+			return (Criteria) this;
+		}
+
+		public Criteria andForceUpdateBetween(Integer value1, Integer value2) {
+			addCriterion("force_update between", value1, value2, "forceUpdate");
+			return (Criteria) this;
+		}
+
+		public Criteria andForceUpdateNotBetween(Integer value1, Integer value2) {
+			addCriterion("force_update not between", value1, value2, "forceUpdate");
+			return (Criteria) this;
+		}
+
+		public Criteria andReleaseCodeIsNull() {
+			addCriterion("release_code is null");
+			return (Criteria) this;
+		}
+
+		public Criteria andReleaseCodeIsNotNull() {
+			addCriterion("release_code is not null");
+			return (Criteria) this;
+		}
+
+		public Criteria andReleaseCodeEqualTo(Integer value) {
+			addCriterion("release_code =", value, "releaseCode");
+			return (Criteria) this;
+		}
+
+		public Criteria andReleaseCodeNotEqualTo(Integer value) {
+			addCriterion("release_code <>", value, "releaseCode");
+			return (Criteria) this;
+		}
+
+		public Criteria andReleaseCodeGreaterThan(Integer value) {
+			addCriterion("release_code >", value, "releaseCode");
+			return (Criteria) this;
+		}
+
+		public Criteria andReleaseCodeGreaterThanOrEqualTo(Integer value) {
+			addCriterion("release_code >=", value, "releaseCode");
+			return (Criteria) this;
+		}
+
+		public Criteria andReleaseCodeLessThan(Integer value) {
+			addCriterion("release_code <", value, "releaseCode");
+			return (Criteria) this;
+		}
+
+		public Criteria andReleaseCodeLessThanOrEqualTo(Integer value) {
+			addCriterion("release_code <=", value, "releaseCode");
+			return (Criteria) this;
+		}
+
+		public Criteria andReleaseCodeIn(List<Integer> values) {
+			addCriterion("release_code in", values, "releaseCode");
+			return (Criteria) this;
+		}
+
+		public Criteria andReleaseCodeNotIn(List<Integer> values) {
+			addCriterion("release_code not in", values, "releaseCode");
+			return (Criteria) this;
+		}
+
+		public Criteria andReleaseCodeBetween(Integer value1, Integer value2) {
+			addCriterion("release_code between", value1, value2, "releaseCode");
+			return (Criteria) this;
+		}
+
+		public Criteria andReleaseCodeNotBetween(Integer value1, Integer value2) {
+			addCriterion("release_code not between", value1, value2, "releaseCode");
+			return (Criteria) this;
+		}
+	}
+
+	/**
+	 * This class was generated by MyBatis Generator. This class corresponds to the database table app_config
+	 * @mbg.generated  Wed Jan 24 16:21:41 CST 2018
+	 */
+	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);
+		}
+	}
+
+	/**
+     * This class was generated by MyBatis Generator.
+     * This class corresponds to the database table app_config
+     *
+     * @mbg.generated do_not_delete_during_merge Wed Jan 24 16:14:16 CST 2018
+     */
+    public static class Criteria extends GeneratedCriteria {
+
+        protected Criteria() {
+            super();
+        }
+    }
+}

+ 28 - 26
src/main/java/com/goafanti/common/utils/MobileMessageUtils.java

@@ -1,47 +1,49 @@
 package com.goafanti.common.utils;
 
-
 import com.aliyuncs.DefaultAcsClient;
 import com.aliyuncs.IAcsClient;
+import com.aliyuncs.dysmsapi.model.v20170525.SendSmsRequest;
+import com.aliyuncs.dysmsapi.model.v20170525.SendSmsResponse;
 import com.aliyuncs.exceptions.ClientException;
-import com.aliyuncs.exceptions.ServerException;
+import com.aliyuncs.http.MethodType;
 import com.aliyuncs.profile.DefaultProfile;
 import com.aliyuncs.profile.IClientProfile;
-import com.aliyuncs.sms.model.v20160927.SingleSendSmsRequest;
-import com.aliyuncs.sms.model.v20160927.SingleSendSmsResponse;
-import com.goafanti.common.constant.ErrorConstants;
 
 public class MobileMessageUtils {
-	
+
 	private final static String SIGN_NAME = "技淘网";
-	
-	private final static String SERVER_EXCEPTION = "服务器端手机验证码异常:%s";
-	
-	private final static String CLIENT_EXCEPTION = "客户端手机验证码异常:%s";
+	private final static String CLIENT_EXCEPTION = "手机验证码异常:%s";
 
 	@SuppressWarnings("unused")
-	public static String sendMessage(String templateCode, String paramString, String mobile, String accessKey, String accessSecret) {
+	public static String sendMessage(String templateCode, String paramString, String mobile, String accessKey,
+			String accessSecret) {
+
 		IClientProfile profile = DefaultProfile.getProfile("cn-hangzhou", accessKey, accessSecret);
 		try {
-			DefaultProfile.addEndpoint("cn-hangzhou", "cn-hangzhou", "Sms", "sms.aliyuncs.com");
-		} catch (ClientException e1) {
-			LoggerUtils.fmtError(MobileMessageUtils.class, e1, CLIENT_EXCEPTION, e1.getMessage());
-			return ErrorConstants.M_CODE_ERROR;
-		}
-		IAcsClient client = new DefaultAcsClient(profile);
-		SingleSendSmsRequest request = new SingleSendSmsRequest();
-		try {
+			DefaultProfile.addEndpoint("cn-hangzhou", "cn-hangzhou", "Dysmsapi", "dysmsapi.aliyuncs.com");
+			IAcsClient acsClient = new DefaultAcsClient(profile);
+			// 组装请求对象
+			SendSmsRequest request = new SendSmsRequest();
+			// 使用post提交
+			request.setMethod(MethodType.POST);
+			// 必填:待发送手机号。支持以逗号分隔的形式进行批量调用,批量上限为1000个手机号码,批量调用相对于单条调用及时性稍有延迟,验证码类型的短信推荐使用单条调用的方式
+			request.setPhoneNumbers(mobile);
+			// 必填:短信签名-可在短信控制台中找到
 			request.setSignName(SIGN_NAME);
+			// 必填:短信模板-可在短信控制台中找到
 			request.setTemplateCode(templateCode);
-			request.setParamString(paramString);
-			request.setRecNum(mobile);
-			SingleSendSmsResponse httpResponse = client.getAcsResponse(request);
-		} catch (ServerException e) {
-			LoggerUtils.fmtError(MobileMessageUtils.class, e, SERVER_EXCEPTION, e.getMessage());
-			return ErrorConstants.M_CODE_ERROR;
+			// 可选:模板中的变量替换JSON串,如模板内容为"亲爱的${name},您的验证码为${code}"时,此处的值为
+			// 友情提示:如果JSON中需要带换行符,请参照标准的JSON协议对换行符的要求,比如短信内容中包含\r\n的情况在JSON中需要表示成\\r\\n,否则会导致JSON在服务端解析失败
+			request.setTemplateParam(paramString);
+			// 可选-上行短信扩展码(扩展码字段控制在7位或以下,无特殊需求用户请忽略此字段)
+			// request.setSmsUpExtendCode("90997");
+			// 可选:outId为提供给业务方扩展字段,最终在短信回执消息中将此值带回给调用者
+			// request.setOutId("yourOutId");
+			// 请求失败这里会抛ClientException异常
+			SendSmsResponse sendSmsResponse = acsClient.getAcsResponse(request);
 		} catch (ClientException e) {
 			LoggerUtils.fmtError(MobileMessageUtils.class, e, CLIENT_EXCEPTION, e.getMessage());
-			return ErrorConstants.M_CODE_ERROR;
+			e.printStackTrace();
 		}
 		return null;
 	}

+ 2 - 3
src/main/java/com/goafanti/user/controller/UserRegisterController.java

@@ -17,7 +17,6 @@ import org.springframework.web.bind.annotation.RequestMethod;
 import org.springframework.web.bind.annotation.ResponseBody;
 
 import com.alibaba.fastjson.JSONObject;
-import com.aliyuncs.http.HttpRequest;
 import com.goafanti.admin.service.AdminService;
 import com.goafanti.common.bo.Result;
 import com.goafanti.common.constant.AFTConstants;
@@ -58,7 +57,7 @@ public class UserRegisterController extends BaseController {
 	 */
 	@RequestMapping(value = "/register", method = RequestMethod.POST)
 	@ResponseBody
-	public Result register(@Valid InputUser user, String mobileCode,BindingResult bindingResult,HttpRequest req) {
+	public Result register(@Valid InputUser user, String mobileCode,BindingResult bindingResult) {
 		Result res = new Result();
 		if (bindingResult.hasErrors()) {
 			res.getError().add(buildErrorByMsg(bindingResult.getFieldError().getDefaultMessage(),
@@ -127,7 +126,7 @@ public class UserRegisterController extends BaseController {
 	 */
 	@RequestMapping(value = "/mregister", method = RequestMethod.POST)
 	@ResponseBody
-	public Result mRegister(@Valid InputUser user, String mobileCode,String uuid,BindingResult bindingResult,HttpRequest req) {
+	public Result mRegister(@Valid InputUser user, String mobileCode,String uuid,BindingResult bindingResult) {
 		Result res = new Result();
 		if (bindingResult.hasErrors()) {
 			res.getError().add(buildErrorByMsg(bindingResult.getFieldError().getDefaultMessage(),

+ 3 - 19
src/main/webapp/WEB-INF/views/common.html

@@ -58,6 +58,9 @@
 							<li><a
 								th:href="${basePath + '/portal/thinkTank/policyList.html'}">智政</a>
 							</li>
+							<li><a
+								th:href="${basePath + '/portal/thinkTank/index.html#zizone'}">智者</a>
+							</li>
 						</ol></li>
 					<!-- <li><a th:href="${basePath + '/portal/financial/index.html'}">科技金融</a>
 						<ol class="subnavigation">
@@ -79,7 +82,6 @@
 					th:src="${portalHost+'/img/index_resiter.png'}" alt="" />
 				</a> 
 				<a href="javascript:;" class="head_login">登录</a> 
-				<a th:href="${basePath + '/portal/aboutUs.html'}">关于公司</a>
 				<div></div>
 			</div>
 			<div class="nav_right" th:if="${isLogin}">
@@ -198,24 +200,6 @@
 						th:src="${portalHost+'/img/index_fix0.png'}" alt="" />
 						<p>实名认证</p>
 				</a></li>
-				<li th:if="${!isLogin}" class="head_login"><a href=""> <img
-						th:src="${portalHost+'/img/index_fix1.png'}" alt="" />
-						<p>发布需求</p>
-				</a></li>
-				<li th:if="${isLogin}"><a
-					th:href="${basePath + '/user/account/demand.html#techDemand'}">
-						<img th:src="${portalHost+'/img/index_fix1.png'}" alt="" />
-						<p>发布需求</p>
-				</a></li>
-				<li th:if="${!isLogin}" class="head_login"><a href=""> <img
-						th:src="${portalHost+'/img/index_fix2.png'}" alt="" />
-						<p>发布技术</p>
-				</a></li>
-				<li th:if="${isLogin}"><a
-					th:href="${basePath + '/user/account/achievement.html#techAchievement'}">
-						<img th:src="${portalHost+'/img/index_fix2.png'}" alt="" />
-						<p>发布技术</p>
-				</a></li>
 				<li><a onclick="_MEIQIA('showPanel')"> <img
 						th:src="${portalHost+'/img/index_fix3.png'}" alt="" />
 						<p>联系客服</p>

+ 2 - 0
src/main/webapp/WEB-INF/views/portal/index.html

@@ -21,6 +21,8 @@
 					th:src="${portalHost+'/img/index_banner03.jpg'}" alt="" /></a></li>
 			<li data-index=3><a href=""><img
 					th:src="${portalHost+'/img/index_banner04.jpg'}" alt="" /></a></li>
+			 <li data-index=4><a href=""><img
+                    th:src="${portalHost+'/img/index_banner05.jpg'}" alt="" /></a></li>
 		</ul>
 		<ul class="ct-img-small clear">
 

+ 1 - 1
src/main/webapp/WEB-INF/views/portal/thinkTank/index.html

@@ -34,7 +34,7 @@
 				<div class="img-left"></div>
 				<div class="img_right">
 					<h4>智政</h4>
-					<p>专业解读您所需的锦囊妙计</p>
+					<p>为您提供专业的政策解析</p>
 				</div>
 			</div>
 			<div class="col-md-6  zone_right">