Antiloveg преди 9 години
родител
ревизия
798a6489bd
променени са 44 файла, в които са добавени 2708 реда и са изтрити 1404 реда
  1. 28 0
      pom.xml
  2. 6 0
      src/main/java/com/goafanti/common/constant/ErrorConstants.java
  3. 76 75
      src/main/java/com/goafanti/common/controller/BaseController.java
  4. 62 0
      src/main/java/com/goafanti/common/controller/PublicController.java
  5. 1 0
      src/main/java/com/goafanti/common/dao/OrganizationIdentityMapper.java
  6. 23 0
      src/main/java/com/goafanti/common/dao/OrganizationPropertiesMapper.java
  7. 145 232
      src/main/java/com/goafanti/common/mapper/OrganizationIdentityMapper.xml
  8. 58 43
      src/main/java/com/goafanti/common/mapper/OrganizationInfoMapper.xml
  9. 221 0
      src/main/java/com/goafanti/common/mapper/OrganizationPropertiesMapper.xml
  10. 22 11
      src/main/java/com/goafanti/common/mapper/OrganizationTechMapper.xml
  11. 7 0
      src/main/java/com/goafanti/common/mapper/UserAbilityMapper.xml
  12. 21 21
      src/main/java/com/goafanti/common/mapper/UserCareerMapper.xml
  13. 75 38
      src/main/java/com/goafanti/common/mapper/UserEduMapper.xml
  14. 62 32
      src/main/java/com/goafanti/common/mapper/UserIdentityMapper.xml
  15. 122 38
      src/main/java/com/goafanti/common/mapper/UserInfoMapper.xml
  16. 1 0
      src/main/java/com/goafanti/common/mapper/UserMapper.xml
  17. 14 0
      src/main/java/com/goafanti/common/model/OrganizationIdentity.java
  18. 51 34
      src/main/java/com/goafanti/common/model/OrganizationInfo.java
  19. 189 0
      src/main/java/com/goafanti/common/model/OrganizationProperties.java
  20. 26 10
      src/main/java/com/goafanti/common/model/OrganizationTech.java
  21. 18 16
      src/main/java/com/goafanti/common/model/UserCareer.java
  22. 75 32
      src/main/java/com/goafanti/common/model/UserEdu.java
  23. 67 52
      src/main/java/com/goafanti/common/model/UserIdentity.java
  24. 86 16
      src/main/java/com/goafanti/common/model/UserInfo.java
  25. 312 0
      src/main/java/com/goafanti/common/utils/HttpUtils.java
  26. 357 327
      src/main/java/com/goafanti/common/utils/VerifyCodeUtils.java
  27. 160 160
      src/main/java/com/goafanti/core/shiro/token/TokenManager.java
  28. 76 76
      src/main/java/com/goafanti/core/shiro/token/UserRealm.java
  29. 2 0
      src/main/java/com/goafanti/user/bo/OrgIdentityBo.java
  30. 24 0
      src/main/java/com/goafanti/user/bo/OrgProBo.java
  31. 2 0
      src/main/java/com/goafanti/user/bo/UserIdentityBo.java
  32. 1 0
      src/main/java/com/goafanti/user/bo/UserInfoBo.java
  33. 61 44
      src/main/java/com/goafanti/user/controller/UserApiController.java
  34. 24 5
      src/main/java/com/goafanti/user/controller/UserRegisterController.java
  35. 3 1
      src/main/java/com/goafanti/user/service/OrganizationInfoService.java
  36. 9 0
      src/main/java/com/goafanti/user/service/OrganizationPropertiesService.java
  37. 3 1
      src/main/java/com/goafanti/user/service/UserService.java
  38. 1 0
      src/main/java/com/goafanti/user/service/impl/OrganizationIdentityServiceImpl.java
  39. 9 5
      src/main/java/com/goafanti/user/service/impl/OrganizationInfoServiceImpl.java
  40. 18 0
      src/main/java/com/goafanti/user/service/impl/OrganizationPropertiesServiceImpl.java
  41. 7 3
      src/main/java/com/goafanti/user/service/impl/UserServiceImpl.java
  42. 6 6
      src/main/webapp/WEB-INF/html/test.html
  43. 51 0
      src/main/webapp/WEB-INF/views/header.jsp
  44. 126 126
      src/main/webapp/WEB-INF/web.xml

+ 28 - 0
pom.xml

@@ -298,6 +298,34 @@
             <artifactId>aliyun-java-sdk-sms</artifactId>
             <version>3.0.0-rc1</version>
         </dependency>
+        <!--  HttpUtils begin-->
+        	<dependency>
+            <groupId>org.apache.httpcomponents</groupId>
+            <artifactId>httpclient</artifactId>
+            <version>4.2.1</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.httpcomponents</groupId>
+            <artifactId>httpcore</artifactId>
+            <version>4.2.1</version>
+        </dependency>
+        <dependency>
+            <groupId>commons-lang</groupId>
+            <artifactId>commons-lang</artifactId>
+            <version>2.6</version>
+        </dependency>
+        <dependency>
+            <groupId>org.eclipse.jetty</groupId>
+            <artifactId>jetty-util</artifactId>
+            <version>9.3.7.v20160115</version>
+        </dependency>
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <version>4.5</version>
+            <scope>test</scope>
+        </dependency>
+        <!-- HttpUtils end -->
 	</dependencies>
 	<build>
 		<resources>

+ 6 - 0
src/main/java/com/goafanti/common/constant/ErrorConstants.java

@@ -24,6 +24,8 @@ public class ErrorConstants {
 
 	public static final String PWD_NOT_MATCH_ERROR = "PWD_NOT_MATCH_ERROR";
 	
+	public static final String PWD_SAME_ERROR = "PWD_SAME_ERROR";
+	
 	public static final String USER_ALREADY_EXIST = "USER_ALREADY_EXIST";
 	
 	public static final String MOBILE_PATTERN_ERROR = "MOBILE_PATTERN_ERROR";
@@ -33,5 +35,9 @@ public class ErrorConstants {
 	public static final String IDNUMBER_SIZE_ERROR = "IDNUMBER_SIZE_ERROR";
 	
 	public static final String IDNUMBER_PATTERN_ERROR = "IDNUMBER_PATTERN_ERROR";
+	
+	public static final String MCODE_ERROR = "MCODE_ERROR";
+	
+	public static final String MCODE_OVERTIME_ERROR = "MCODE_OVERTIME_ERROR";
 
 }

+ 76 - 75
src/main/java/com/goafanti/common/controller/BaseController.java

@@ -1,75 +1,76 @@
-package com.goafanti.common.controller;
-
-import java.text.DateFormat;
-import java.text.MessageFormat;
-import java.text.SimpleDateFormat;
-import java.util.Date;
-
-import javax.annotation.Resource;
-import javax.servlet.http.HttpServletRequest;
-
-import org.apache.commons.lang3.StringUtils;
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.beans.propertyeditors.CustomDateEditor;
-import org.springframework.core.io.support.ResourcePropertySource;
-import org.springframework.stereotype.Controller;
-import org.springframework.ui.Model;
-import org.springframework.web.bind.WebDataBinder;
-import org.springframework.web.bind.annotation.InitBinder;
-import org.springframework.web.bind.annotation.ModelAttribute;
-
-import com.goafanti.common.bo.Error;
-
-@Controller
-public class BaseController {
-	@Resource(name = "errorResource")
-	private ResourcePropertySource errorResource;
-
-	@Value(value = "${static.host}")
-	private String staticHost = null;
-
-	protected Error buildError(String key) {
-		return buildError(key, null);
-	}
-
-	protected Error buildError(String key, String message) {
-		String msg = (String) errorResource.getProperty(key);
-		if (StringUtils.isEmpty(msg)) {
-			msg = message;
-		}
-		return new Error(key, msg);
-	}
-
-	/**
-	 * 带参数的error message
-	 * 
-	 * @param key
-	 * @param message
-	 * @param object
-	 * @return
-	 */
-	protected Error buildError(String key, String message, Object... object) {
-		String msg = (String) errorResource.getProperty(key);
-		if (StringUtils.isEmpty(msg)) {
-			msg = message;
-		}
-		msg = MessageFormat.format(msg, object);
-		return new Error(key, msg);
-	}
-
-	protected Error buildErrorByMsg(String msg, Object... params) {
-		return new Error(MessageFormat.format(msg, params));
-	}
-
-	@InitBinder
-	public void initBinder(WebDataBinder binder) {
-		DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
-		dateFormat.setLenient(true);
-		binder.registerCustomEditor(Date.class, new CustomDateEditor(dateFormat, true));
-	}
-
-	@ModelAttribute
-	public void prepareModel(HttpServletRequest request, Model model) {
-		model.addAttribute("staticHost", staticHost);
-	}
-}
+package com.goafanti.common.controller;
+
+import java.text.DateFormat;
+import java.text.MessageFormat;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+
+import javax.annotation.Resource;
+import javax.servlet.http.HttpServletRequest;
+
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.beans.propertyeditors.CustomDateEditor;
+import org.springframework.core.io.support.ResourcePropertySource;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.Model;
+import org.springframework.web.bind.WebDataBinder;
+import org.springframework.web.bind.annotation.InitBinder;
+import org.springframework.web.bind.annotation.ModelAttribute;
+
+import com.goafanti.common.bo.Error;
+
+@Controller
+public class BaseController {
+	@Resource(name = "errorResource")
+	private ResourcePropertySource errorResource;
+
+	@Value(value = "${static.host}")
+	private String staticHost = null;
+
+	protected Error buildError(String key) {
+		return buildError(key, null);
+	}
+
+	protected Error buildError(String key, String message) {
+		String msg = (String) errorResource.getProperty(key);
+		if (StringUtils.isEmpty(msg)) {
+			msg = message;
+		}
+		return new Error(key, msg);
+	}
+
+	/**
+	 * 带参数的error message
+	 * 
+	 * @param key
+	 * @param message
+	 * @param object
+	 * @return
+	 */
+	protected Error buildError(String key, String message, Object... object) {
+		String msg = (String) errorResource.getProperty(key);
+		if (StringUtils.isEmpty(msg)) {
+			msg = message;
+		}
+		msg = MessageFormat.format(msg, object);
+		return new Error(key, msg);
+	}
+
+	protected Error buildErrorByMsg(String msg, Object... params) {
+		return new Error(MessageFormat.format(msg, params));
+	}
+
+	@InitBinder
+	public void initBinder(WebDataBinder binder) {
+		DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+		dateFormat.setLenient(true);
+		binder.registerCustomEditor(Date.class, new CustomDateEditor(dateFormat, true));
+	}
+
+	@ModelAttribute
+	public void prepareModel(HttpServletRequest request, Model model) {
+		model.addAttribute("staticHost", staticHost);
+		model.addAttribute("basePath", request.getContextPath());
+	}
+}

+ 62 - 0
src/main/java/com/goafanti/common/controller/PublicController.java

@@ -1,13 +1,22 @@
 package com.goafanti.common.controller;
 
+import java.util.HashMap;
+import java.util.Map;
+
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
+import org.apache.http.HttpResponse;
+import org.apache.http.util.EntityUtils;
 import org.springframework.context.annotation.Scope;
 import org.springframework.stereotype.Controller;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.ResponseBody;
 
+import com.goafanti.common.bo.Result;
+import com.goafanti.common.constant.ErrorConstants;
+import com.goafanti.common.utils.HttpUtils;
 import com.goafanti.common.utils.LoggerUtils;
 import com.goafanti.common.utils.VerifyCodeUtils;
 import com.goafanti.core.shiro.token.TokenManager;
@@ -44,5 +53,58 @@ public class PublicController extends BaseController {
 			LoggerUtils.fmtError(getClass(), e, "获取验证码异常:%s", e.getMessage());
 		}
 	}
+	
+	/**
+	 * 手机验证码
+	 * @param mobile
+	 */
+	@RequestMapping(value = "/getMCode", method = RequestMethod.GET)
+	@ResponseBody
+	public Result getMcode(String mobile){
+		Result res = new Result();
+		if(TokenManager.getSession().getAttribute(VerifyCodeUtils.M_CODE_TIME)==null
+		   ||TokenManager.getSession().getAttribute(VerifyCodeUtils.M_CODE_TIME)==""){
+		   sendMessage(mobile,res);
+		}else if(System.currentTimeMillis()-(Long) TokenManager.getSession().getAttribute(VerifyCodeUtils.M_CODE_TIME)>60000){
+			TokenManager.getSession().removeAttribute(VerifyCodeUtils.M_CODE);
+			TokenManager.getSession().removeAttribute(VerifyCodeUtils.M_CODE_TIME);
+			sendMessage(mobile,res);
+		}else{
+			res.getError().add(buildError(ErrorConstants.MCODE_ERROR,"手机验证码发送频繁"));
+		}
+		return res;
+	}
+	
+	private   Result sendMessage(String mobile,Result res){
+		// 生成随机字串
+		String mobileVerifyCode = VerifyCodeUtils.generateMobileVerifyCode(6);
+		// 存入Shiro会话session
+	    TokenManager.setVal2Session(VerifyCodeUtils.M_CODE, mobileVerifyCode);
+	    TokenManager.setVal2Session(VerifyCodeUtils.M_CODE_TIME, System.currentTimeMillis());
+		
+		String host = "http://sms.market.alicloudapi.com";
+        String path = "/singleSendSms";
+        String method = "GET";
+        Map<String, String> headers = new HashMap<String, String>();
+        headers.put("Authorization", "APPCODE 8e5441493d01490889d034d8456b23db");
+        Map<String, String> querys = new HashMap<String, String>();
+        querys.put("ParamString", "{\"code\":\""+mobileVerifyCode+"\"}");
+        querys.put("RecNum", mobile);
+        querys.put("SignName", "阿凡提信息科技");
+        querys.put("TemplateCode", "SMS_37125144");
+      
+        try {
+        	HttpResponse response =HttpUtils.doGet(host, path, method, headers, querys);
+            //HttpResponse response = HttpUtils.doGet(host, path, method, headers, querys);
+            //System.out.println(response.toString());
+            //获取response的body
+            System.out.println(EntityUtils.toString(response.getEntity()));
+        } catch (Exception e) {
+        	res.getError().add(buildError(ErrorConstants.MCODE_ERROR,"获取手机验证码异常"));
+        	LoggerUtils.fmtError(getClass(), e, "获取手机验证码异常:%s", e.getMessage());
+        }
+        return res;
+	}
+	
 
 }

+ 1 - 0
src/main/java/com/goafanti/common/dao/OrganizationIdentityMapper.java

@@ -3,6 +3,7 @@ package com.goafanti.common.dao;
 import com.goafanti.common.model.OrganizationIdentity;
 import com.goafanti.user.bo.OrgIdentityBo;
 
+
 public interface OrganizationIdentityMapper {
     int deleteByPrimaryKey(String id);
 

+ 23 - 0
src/main/java/com/goafanti/common/dao/OrganizationPropertiesMapper.java

@@ -0,0 +1,23 @@
+package com.goafanti.common.dao;
+
+import com.goafanti.common.model.OrganizationProperties;
+
+public interface OrganizationPropertiesMapper {
+    int deleteByPrimaryKey(String id);
+
+    int insert(OrganizationProperties record);
+
+    int insertSelective(OrganizationProperties record);
+
+    OrganizationProperties selectByPrimaryKey(String id);
+
+    int updateByPrimaryKeySelective(OrganizationProperties record);
+
+    int updateByPrimaryKey(OrganizationProperties record);
+    
+    
+    //根据组织id查询
+    OrganizationProperties selectByOid(String oid);
+
+	OrganizationProperties selectOrgProByUserId(String uid);
+}

+ 145 - 232
src/main/java/com/goafanti/common/mapper/OrganizationIdentityMapper.xml

@@ -1,231 +1,142 @@
-<?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.OrganizationIdentityMapper">
-  <resultMap id="BaseResultMap" type="com.goafanti.common.model.OrganizationIdentity">
-    <id column="id" jdbcType="VARCHAR" property="id" />
-    <result column="uid" jdbcType="VARCHAR" property="uid" />
-    <result column="contacts" jdbcType="VARCHAR" property="contacts" />
-    <result column="fixed_tel" jdbcType="VARCHAR" property="fixedTel" />
-    <result column="qq" jdbcType="VARCHAR" property="qq" />
-    <result column="postal_address" jdbcType="VARCHAR" property="postalAddress" />
-    <result column="postcode" jdbcType="VARCHAR" property="postcode" />
-  </resultMap>
-  <sql id="Base_Column_List">
-    id, uid, contacts, fixed_tel, qq, postal_address, postcode
-  </sql>
-  <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
-    select 
-    <include refid="Base_Column_List" />
-    from organization_identity
-    where id = #{id,jdbcType=VARCHAR}
-  </select>
-  <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
-    delete from organization_identity
-    where id = #{id,jdbcType=VARCHAR}
-  </delete>
-  <insert id="insert" parameterType="com.goafanti.common.model.OrganizationIdentity">
-    insert into organization_identity (id, uid, contacts, 
-      fixed_tel, qq, postal_address, 
-      postcode)
-    values (#{id,jdbcType=VARCHAR}, #{uid,jdbcType=VARCHAR}, #{contacts,jdbcType=VARCHAR}, 
-      #{fixedTel,jdbcType=VARCHAR}, #{qq,jdbcType=VARCHAR}, #{postalAddress,jdbcType=VARCHAR}, 
-      #{postcode,jdbcType=VARCHAR})
-  </insert>
-  <insert id="insertSelective" parameterType="com.goafanti.common.model.OrganizationIdentity">
-    insert into organization_identity
-    <trim prefix="(" suffix=")" suffixOverrides=",">
-      <if test="id != null">
-        id,
-      </if>
-      <if test="uid != null">
-        uid,
-      </if>
-      <if test="contacts != null">
-        contacts,
-      </if>
-      <if test="fixedTel != null">
-        fixed_tel,
-      </if>
-      <if test="qq != null">
-        qq,
-      </if>
-      <if test="postalAddress != null">
-        postal_address,
-      </if>
-      <if test="postcode != null">
-        postcode,
-      </if>
-    </trim>
-    <trim prefix="values (" suffix=")" suffixOverrides=",">
-      <if test="id != null">
-        #{id,jdbcType=VARCHAR},
-      </if>
-      <if test="uid != null">
-        #{uid,jdbcType=VARCHAR},
-      </if>
-      <if test="contacts != null">
-        #{contacts,jdbcType=VARCHAR},
-      </if>
-      <if test="fixedTel != null">
-        #{fixedTel,jdbcType=VARCHAR},
-      </if>
-      <if test="qq != null">
-        #{qq,jdbcType=VARCHAR},
-      </if>
-      <if test="postalAddress != null">
-        #{postalAddress,jdbcType=VARCHAR},
-      </if>
-      <if test="postcode != null">
-        #{postcode,jdbcType=VARCHAR},
-      </if>
-    </trim>
-  </insert>
-  <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.OrganizationIdentity">
-    update organization_identity
-    <set>
-      <if test="uid != null">
-        uid = #{uid,jdbcType=VARCHAR},
-      </if>
-      <if test="contacts != null">
-        contacts = #{contacts,jdbcType=VARCHAR},
-      </if>
-      <if test="fixedTel != null">
-        fixed_tel = #{fixedTel,jdbcType=VARCHAR},
-      </if>
-      <if test="qq != null">
-        qq = #{qq,jdbcType=VARCHAR},
-      </if>
-      <if test="postalAddress != null">
-        postal_address = #{postalAddress,jdbcType=VARCHAR},
-      </if>
-      <if test="postcode != null">
-        postcode = #{postcode,jdbcType=VARCHAR},
-      </if>
-    </set>
-    where id = #{id,jdbcType=VARCHAR}
-  </update>
-  <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.OrganizationIdentity">
-    update organization_identity
-    set uid = #{uid,jdbcType=VARCHAR},
-      contacts = #{contacts,jdbcType=VARCHAR},
-      fixed_tel = #{fixedTel,jdbcType=VARCHAR},
-      qq = #{qq,jdbcType=VARCHAR},
-      postal_address = #{postalAddress,jdbcType=VARCHAR},
-      postcode = #{postcode,jdbcType=VARCHAR}
-    where id = #{id,jdbcType=VARCHAR}
-  </update>
-  <resultMap id="BaseResultMap" type="com.goafanti.common.model.OrganizationIdentity">
-    <id column="id" jdbcType="VARCHAR" property="id" />
-    <result column="uid" jdbcType="VARCHAR" property="uid" />
-    <result column="contacts" jdbcType="VARCHAR" property="contacts" />
-    <result column="fixed_tel" jdbcType="VARCHAR" property="fixedTel" />
-    <result column="qq" jdbcType="VARCHAR" property="qq" />
-    <result column="postal_address" jdbcType="VARCHAR" property="postalAddress" />
-    <result column="postcode" jdbcType="VARCHAR" property="postcode" />
-  </resultMap>
-  <sql id="Base_Column_List">
-    id, uid, contacts, fixed_tel, qq, postal_address, postcode
-  </sql>
-  <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
-    select 
-    <include refid="Base_Column_List" />
-    from organization_identity
-    where id = #{id,jdbcType=VARCHAR}
-  </select>
-  <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
-    delete from organization_identity
-    where id = #{id,jdbcType=VARCHAR}
-  </delete>
-  <insert id="insert" parameterType="com.goafanti.common.model.OrganizationIdentity">
-    insert into organization_identity (id, uid, contacts, 
-      fixed_tel, qq, postal_address, 
-      postcode)
-    values (#{id,jdbcType=VARCHAR}, #{uid,jdbcType=VARCHAR}, #{contacts,jdbcType=VARCHAR}, 
-      #{fixedTel,jdbcType=VARCHAR}, #{qq,jdbcType=VARCHAR}, #{postalAddress,jdbcType=VARCHAR}, 
-      #{postcode,jdbcType=VARCHAR})
-  </insert>
-  <insert id="insertSelective" parameterType="com.goafanti.common.model.OrganizationIdentity">
-    insert into organization_identity
-    <trim prefix="(" suffix=")" suffixOverrides=",">
-      <if test="id != null">
-        id,
-      </if>
-      <if test="uid != null">
-        uid,
-      </if>
-      <if test="contacts != null">
-        contacts,
-      </if>
-      <if test="fixedTel != null">
-        fixed_tel,
-      </if>
-      <if test="qq != null">
-        qq,
-      </if>
-      <if test="postalAddress != null">
-        postal_address,
-      </if>
-      <if test="postcode != null">
-        postcode,
-      </if>
-    </trim>
-    <trim prefix="values (" suffix=")" suffixOverrides=",">
-      <if test="id != null">
-        #{id,jdbcType=VARCHAR},
-      </if>
-      <if test="uid != null">
-        #{uid,jdbcType=VARCHAR},
-      </if>
-      <if test="contacts != null">
-        #{contacts,jdbcType=VARCHAR},
-      </if>
-      <if test="fixedTel != null">
-        #{fixedTel,jdbcType=VARCHAR},
-      </if>
-      <if test="qq != null">
-        #{qq,jdbcType=VARCHAR},
-      </if>
-      <if test="postalAddress != null">
-        #{postalAddress,jdbcType=VARCHAR},
-      </if>
-      <if test="postcode != null">
-        #{postcode,jdbcType=VARCHAR},
-      </if>
-    </trim>
-  </insert>
-  <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.OrganizationIdentity">
-    update organization_identity
-    <set>
-      <if test="uid != null">
-        uid = #{uid,jdbcType=VARCHAR},
-      </if>
-      <if test="contacts != null">
-        contacts = #{contacts,jdbcType=VARCHAR},
-      </if>
-      <if test="fixedTel != null">
-        fixed_tel = #{fixedTel,jdbcType=VARCHAR},
-      </if>
-      <if test="qq != null">
-        qq = #{qq,jdbcType=VARCHAR},
-      </if>
-      <if test="postalAddress != null">
-        postal_address = #{postalAddress,jdbcType=VARCHAR},
-      </if>
-      <if test="postcode != null">
-        postcode = #{postcode,jdbcType=VARCHAR},
-      </if>
-    </set>
-    where id = #{id,jdbcType=VARCHAR}
-  </update>
-  <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.OrganizationIdentity">
-    update organization_identity
-    set uid = #{uid,jdbcType=VARCHAR},
-      contacts = #{contacts,jdbcType=VARCHAR},
-      fixed_tel = #{fixedTel,jdbcType=VARCHAR},
-      qq = #{qq,jdbcType=VARCHAR},
-      postal_address = #{postalAddress,jdbcType=VARCHAR},
-      postcode = #{postcode,jdbcType=VARCHAR}
-    where id = #{id,jdbcType=VARCHAR}
+<?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.OrganizationIdentityMapper" >
+  <resultMap id="BaseResultMap" type="com.goafanti.common.model.OrganizationIdentity" >
+    <id column="id" property="id" jdbcType="VARCHAR" />
+    <result column="uid" property="uid" jdbcType="VARCHAR" />
+    <result column="contacts" property="contacts" jdbcType="VARCHAR" />
+    <result column="fixed_tel" property="fixedTel" jdbcType="VARCHAR" />
+    <result column="qq" property="qq" jdbcType="VARCHAR" />
+    <result column="postal_address" property="postalAddress" jdbcType="VARCHAR" />
+    <result column="postcode" property="postcode" jdbcType="VARCHAR" />
+    <result column="legal_person" property="legalPerson" jdbcType="VARCHAR" />
+  </resultMap>
+  
+  <resultMap type="com.goafanti.user.bo.OrgIdentityBo" id="OrgIdentityBoMap">
+  	<id column="id" property="id" jdbcType="VARCHAR" />
+    <result column="uid" property="uid" jdbcType="VARCHAR" />
+    <result column="contacts" property="contacts" jdbcType="VARCHAR" />
+    <result column="fixed_tel" property="fixedTel" jdbcType="VARCHAR" />
+    <result column="qq" property="qq" jdbcType="VARCHAR" />
+    <result column="postal_address" property="postalAddress" jdbcType="VARCHAR" />
+    <result column="postcode" property="postcode" jdbcType="VARCHAR" />
+    <result column="legal_person" property="legalPerson" jdbcType="VARCHAR" />
+    <result column="email" property="email" jdbcType="VARCHAR" />
+  </resultMap>
+  
+  <sql id="Base_Column_List" >
+    id, uid, contacts, fixed_tel, qq, postal_address, postcode ,legal_Person
+  </sql>
+  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
+    select 
+    <include refid="Base_Column_List" />
+    from organization_identity
+    where id = #{id,jdbcType=VARCHAR}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.String" >
+    delete from organization_identity
+    where id = #{id,jdbcType=VARCHAR}
+  </delete>
+  <insert id="insert" parameterType="com.goafanti.common.model.OrganizationIdentity" >
+    insert into organization_identity (id, uid, contacts, 
+      fixed_tel, qq, postal_address, 
+      postcode, legal_person)
+    values (#{id,jdbcType=VARCHAR}, #{uid,jdbcType=VARCHAR}, #{contacts,jdbcType=VARCHAR}, 
+      #{fixedTel,jdbcType=VARCHAR}, #{qq,jdbcType=VARCHAR}, #{postalAddress,jdbcType=VARCHAR}, 
+      #{postcode,jdbcType=VARCHAR}, #{legalPerson,jdbcType=VARCHAR})
+  </insert>
+  <insert id="insertSelective" parameterType="com.goafanti.common.model.OrganizationIdentity" >
+    insert into organization_identity
+    <trim prefix="(" suffix=")" suffixOverrides="," >
+      <if test="id != null" >
+        id,
+      </if>
+      <if test="uid != null" >
+        uid,
+      </if>
+      <if test="contacts != null" >
+        contacts,
+      </if>
+      <if test="fixedTel != null" >
+        fixed_tel,
+      </if>
+      <if test="qq != null" >
+        qq,
+      </if>
+      <if test="postalAddress != null" >
+        postal_address,
+      </if>
+      <if test="postcode != null" >
+        postcode,
+      </if>
+      <if test="legalPerson != null" >
+        legal_person,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides="," >
+      <if test="id != null" >
+        #{id,jdbcType=VARCHAR},
+      </if>
+      <if test="uid != null" >
+        #{uid,jdbcType=VARCHAR},
+      </if>
+      <if test="contacts != null" >
+        #{contacts,jdbcType=VARCHAR},
+      </if>
+      <if test="fixedTel != null" >
+        #{fixedTel,jdbcType=VARCHAR},
+      </if>
+      <if test="qq != null" >
+        #{qq,jdbcType=VARCHAR},
+      </if>
+      <if test="postalAddress != null" >
+        #{postalAddress,jdbcType=VARCHAR},
+      </if>
+      <if test="postcode != null" >
+        #{postcode,jdbcType=VARCHAR},
+      </if>
+      <if test="legalPerson != null" >
+        #{legalPerson,jdbcType=VARCHAR},
+      </if>
+    </trim>
+  </insert>
+  <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.OrganizationIdentity" >
+    update organization_identity
+    <set >
+      <if test="uid != null" >
+        uid = #{uid,jdbcType=VARCHAR},
+      </if>
+      <if test="contacts != null" >
+        contacts = #{contacts,jdbcType=VARCHAR},
+      </if>
+      <if test="fixedTel != null" >
+        fixed_tel = #{fixedTel,jdbcType=VARCHAR},
+      </if>
+      <if test="qq != null" >
+        qq = #{qq,jdbcType=VARCHAR},
+      </if>
+      <if test="postalAddress != null" >
+        postal_address = #{postalAddress,jdbcType=VARCHAR},
+      </if>
+      <if test="postcode != null" >
+        postcode = #{postcode,jdbcType=VARCHAR},
+      </if>
+      <if test="legalPerson != null" >
+        legal_person = #{legalPerson,jdbcType=VARCHAR},
+      </if>
+    </set>
+    where id = #{id,jdbcType=VARCHAR}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.OrganizationIdentity" >
+    update organization_identity
+    set uid = #{uid,jdbcType=VARCHAR},
+      contacts = #{contacts,jdbcType=VARCHAR},
+      fixed_tel = #{fixedTel,jdbcType=VARCHAR},
+      qq = #{qq,jdbcType=VARCHAR},
+      postal_address = #{postalAddress,jdbcType=VARCHAR},
+      postcode = #{postcode,jdbcType=VARCHAR}
+      legal_person = #{legalPerson,jdbcType=VARCHAR}
+    where id = #{id,jdbcType=VARCHAR}
   </update>
   
    <select id="selectOrgIdentityByUserId" parameterType="java.lang.String" resultMap="BaseResultMap">
@@ -235,9 +146,11 @@
     where uid = #{uid,jdbcType=VARCHAR}
   </select>
   
-  <select id="selectOrgIdentityBoByUserId" parameterType="java.lang.String" resultType="com.goafanti.user.bo.OrgIdentityBo">
-  	select t.id,t.uid,t.contacts,t.fixed_tel,t.qq,t.postal_address,t.postcode,
-    u.email from (select email, id from user ) u inner JOIN organization_identity t
+   
+  <select id="selectOrgIdentityBoByUserId" parameterType="java.lang.String" resultMap="OrgIdentityBoMap">
+  	select t.id,t.uid,t.contacts,t.fixed_tel,t.qq,t.postal_address,t.postcode,t.legal_person,
+    u.email from user u LEFT JOIN organization_identity t
     on t.uid = u.id where t.uid=#{uid,jdbcType=VARCHAR}
-  </select>
+  </select>
+  
 </mapper>

+ 58 - 43
src/main/java/com/goafanti/common/mapper/OrganizationInfoMapper.xml

@@ -6,17 +6,19 @@
     <result column="uid" property="uid" jdbcType="VARCHAR" />
     <result column="identity_type" property="identityType" jdbcType="VARCHAR" />
     <result column="company_name" property="companyName" jdbcType="VARCHAR" />
-    <result column="location" property="location" jdbcType="VARCHAR" />
+    <result column="location_province" property="locationProvince" jdbcType="VARCHAR" />
+    <result column="location_city" property="locationCity" jdbcType="VARCHAR" />
+    <result column="location_area" property="locationArea" jdbcType="VARCHAR" />
     <result column="unit_size" property="unitSize" jdbcType="VARCHAR" />
     <result column="company_introduction" property="companyIntroduction" jdbcType="VARCHAR" />
     <result column="home_unit" property="homeUnit" jdbcType="VARCHAR" />
-    <result column="enterprise qualification" property="enterpriseQualification" jdbcType="VARCHAR" />
-    <result column="logo" property="logo" jdbcType="VARCHAR" />
-    <result column="publicity _picture" property="publicityPicture" jdbcType="VARCHAR" />
+    <result column="logo_url" property="logoUrl" jdbcType="VARCHAR" />
+    <result column="publicity_picture_url" property="publicityPictureUrl" jdbcType="VARCHAR" />
   </resultMap>
   <sql id="Base_Column_List" >
-    id, uid, identity_type, company_name, location, unit_size, company_introduction, 
-    home_unit, "enterprise qualification", logo, "publicity _picture"
+    id, uid, identity_type, company_name, location_province, location_city,location_area,
+    unit_size, company_introduction, 
+    home_unit,  logo_url, publicity_picture_url
   </sql>
   <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
     select 
@@ -30,13 +32,16 @@
   </delete>
   <insert id="insert" parameterType="com.goafanti.common.model.OrganizationInfo" >
     insert into organization_info (id, uid, identity_type, 
-      company_name, location, unit_size, 
-      company_introduction, home_unit, "enterprise qualification", 
-      logo, "publicity _picture")
+      company_name, location_province, location_city,location_area,
+      unit_size, 
+      company_introduction, home_unit,  
+      logo_url, publicity_picture_url)
     values (#{id,jdbcType=VARCHAR}, #{uid,jdbcType=VARCHAR}, #{identityType,jdbcType=VARCHAR}, 
-      #{companyName,jdbcType=VARCHAR}, #{location,jdbcType=VARCHAR}, #{unitSize,jdbcType=VARCHAR}, 
-      #{companyIntroduction,jdbcType=VARCHAR}, #{homeUnit,jdbcType=VARCHAR}, #{enterpriseQualification,jdbcType=VARCHAR}, 
-      #{logo,jdbcType=VARCHAR}, #{publicityPicture,jdbcType=VARCHAR})
+      #{companyName,jdbcType=VARCHAR}, 
+      #{locationProvince,jdbcType=VARCHAR}, #{locationCity,jdbcType=VARCHAR}, #{locationArea,jdbcType=VARCHAR}, 
+      #{unitSize,jdbcType=VARCHAR}, 
+      #{companyIntroduction,jdbcType=VARCHAR}, #{homeUnit,jdbcType=VARCHAR},  
+      #{logoUrl,jdbcType=VARCHAR}, #{publicityPictureUrl,jdbcType=VARCHAR})
   </insert>
   <insert id="insertSelective" parameterType="com.goafanti.common.model.OrganizationInfo" >
     insert into organization_info
@@ -53,8 +58,14 @@
       <if test="companyName != null" >
         company_name,
       </if>
-      <if test="location != null" >
-        location,
+      <if test="locationProvince != null" >
+        location_province,
+      </if>
+      <if test="locationCity != null" >
+        location_city,
+      </if>
+      <if test="locationArea != null" >
+        location_area,
       </if>
       <if test="unitSize != null" >
         unit_size,
@@ -65,14 +76,11 @@
       <if test="homeUnit != null" >
         home_unit,
       </if>
-      <if test="enterpriseQualification != null" >
-        "enterprise qualification",
-      </if>
-      <if test="logo != null" >
-        logo,
+      <if test="logoUrl != null" >
+        logo_url,
       </if>
-      <if test="publicityPicture != null" >
-        "publicity _picture",
+      <if test="publicityPictureUrl != null" >
+       publicity_picture_url,
       </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides="," >
@@ -88,8 +96,14 @@
       <if test="companyName != null" >
         #{companyName,jdbcType=VARCHAR},
       </if>
-      <if test="location != null" >
-        #{location,jdbcType=VARCHAR},
+      <if test="locationProvince != null" >
+        #{locationProvince,jdbcType=VARCHAR},
+      </if>
+       <if test="locationCity != null" >
+        #{locationCity,jdbcType=VARCHAR},
+      </if>
+       <if test="locationArea != null" >
+        #{locationArea,jdbcType=VARCHAR},
       </if>
       <if test="unitSize != null" >
         #{unitSize,jdbcType=VARCHAR},
@@ -100,14 +114,11 @@
       <if test="homeUnit != null" >
         #{homeUnit,jdbcType=VARCHAR},
       </if>
-      <if test="enterpriseQualification != null" >
-        #{enterpriseQualification,jdbcType=VARCHAR},
+      <if test="logoUrl != null" >
+        #{logoUrl,jdbcType=VARCHAR},
       </if>
-      <if test="logo != null" >
-        #{logo,jdbcType=VARCHAR},
-      </if>
-      <if test="publicityPicture != null" >
-        #{publicityPicture,jdbcType=VARCHAR},
+      <if test="publicityPictureUrl != null" >
+        #{publicityPictureUrl,jdbcType=VARCHAR},
       </if>
     </trim>
   </insert>
@@ -123,8 +134,14 @@
       <if test="companyName != null" >
         company_name = #{companyName,jdbcType=VARCHAR},
       </if>
-      <if test="location != null" >
-        location = #{location,jdbcType=VARCHAR},
+       <if test="locationProvince != null" >
+       locationProvince =  #{locationProvince,jdbcType=VARCHAR},
+      </if>
+       <if test="locationCity != null" >
+        locationCity = #{locationCity,jdbcType=VARCHAR},
+      </if>
+       <if test="locationArea != null" >
+       locationArea = #{locationArea,jdbcType=VARCHAR},
       </if>
       <if test="unitSize != null" >
         unit_size = #{unitSize,jdbcType=VARCHAR},
@@ -135,14 +152,11 @@
       <if test="homeUnit != null" >
         home_unit = #{homeUnit,jdbcType=VARCHAR},
       </if>
-      <if test="enterpriseQualification != null" >
-        "enterprise qualification" = #{enterpriseQualification,jdbcType=VARCHAR},
-      </if>
-      <if test="logo != null" >
-        logo = #{logo,jdbcType=VARCHAR},
+      <if test="logoUrl != null" >
+        logo_url = #{logoUrl,jdbcType=VARCHAR},
       </if>
-      <if test="publicityPicture != null" >
-        "publicity _picture" = #{publicityPicture,jdbcType=VARCHAR},
+      <if test="publicityPictureUrl != null" >
+       publicity_picture_url = #{publicityPictureUrl,jdbcType=VARCHAR},
       </if>
     </set>
     where id = #{id,jdbcType=VARCHAR}
@@ -152,13 +166,14 @@
     set uid = #{uid,jdbcType=VARCHAR},
       identity_type = #{identityType,jdbcType=VARCHAR},
       company_name = #{companyName,jdbcType=VARCHAR},
-      location = #{location,jdbcType=VARCHAR},
+      location_province = #{locationProvince,jdbcType=VARCHAR},
+      location_city = #{locationCity,jdbcType=VARCHAR},
+      location_area = #{locationArea,jdbcType=VARCHAR},
       unit_size = #{unitSize,jdbcType=VARCHAR},
       company_introduction = #{companyIntroduction,jdbcType=VARCHAR},
       home_unit = #{homeUnit,jdbcType=VARCHAR},
-      "enterprise qualification" = #{enterpriseQualification,jdbcType=VARCHAR},
-      logo = #{logo,jdbcType=VARCHAR},
-      "publicity _picture" = #{publicityPicture,jdbcType=VARCHAR}
+      logo_url = #{logoUrl,jdbcType=VARCHAR},
+      publicity_picture_url = #{publicityPictureUrl,jdbcType=VARCHAR}
     where id = #{id,jdbcType=VARCHAR}
   </update>
   

+ 221 - 0
src/main/java/com/goafanti/common/mapper/OrganizationPropertiesMapper.xml

@@ -0,0 +1,221 @@
+<?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.OrganizationPropertiesMapper" >
+  <resultMap id="BaseResultMap" type="com.goafanti.common.model.OrganizationProperties" >
+    <id column="id" property="id" jdbcType="VARCHAR" />
+    <result column="oid" property="oid" jdbcType="VARCHAR" />
+    <result column="qualification" property="qualification" jdbcType="VARCHAR" />
+    <result column="turnover" property="turnover" jdbcType="VARCHAR" />
+    <result column="college_attribute" property="collegeAttribute" jdbcType="VARCHAR" />
+    <result column="college_establish_time" property="collegeEstablishTime" jdbcType="VARCHAR" />
+    <result column="academician" property="academician" jdbcType="INTEGER" />
+    <result column="doctoral_tutor" property="doctoralTutor" jdbcType="INTEGER" />
+    <result column="master_tutor" property="masterTutor" jdbcType="INTEGER" />
+    <result column="other_expert" property="otherExpert" jdbcType="INTEGER" />
+    <result column="national_lab" property="nationalLab" jdbcType="INTEGER" />
+    <result column="education_lab" property="educationLab" jdbcType="INTEGER" />
+    <result column="enterprise_center" property="enterpriseCenter" jdbcType="INTEGER" />
+    <result column="other_center" property="otherCenter" jdbcType="INTEGER" />
+    <result column="institution_establish_time" property="institutionEstablishTime" jdbcType="VARCHAR" />
+  </resultMap>
+  <sql id="Base_Column_List" >
+    id, oid, qualification, turnover, college_attribute, college_establish_time, academician, 
+    doctoral_tutor, master_tutor, other_expert, national_lab, education_lab, enterprise_center, 
+    other_center, institution_establish_time
+  </sql>
+  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
+    select 
+    <include refid="Base_Column_List" />
+    from organization_properties
+    where id = #{id,jdbcType=VARCHAR}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.String" >
+    delete from organization_properties
+    where id = #{id,jdbcType=VARCHAR}
+  </delete>
+  <insert id="insert" parameterType="com.goafanti.common.model.OrganizationProperties" >
+    insert into organization_properties (id, oid, qualification, 
+      turnover, college_attribute, college_establish_time, 
+      academician, doctoral_tutor, master_tutor, 
+      other_expert, national_lab, education_lab, 
+      enterprise_center, other_center, institution_establish_time
+      )
+    values (#{id,jdbcType=VARCHAR}, #{oid,jdbcType=VARCHAR}, #{qualification,jdbcType=VARCHAR}, 
+      #{turnover,jdbcType=VARCHAR}, #{collegeAttribute,jdbcType=VARCHAR}, #{collegeEstablishTime,jdbcType=VARCHAR}, 
+      #{academician,jdbcType=INTEGER}, #{doctoralTutor,jdbcType=INTEGER}, #{masterTutor,jdbcType=INTEGER}, 
+      #{otherExpert,jdbcType=INTEGER}, #{nationalLab,jdbcType=INTEGER}, #{educationLab,jdbcType=INTEGER}, 
+      #{enterpriseCenter,jdbcType=INTEGER}, #{otherCenter,jdbcType=INTEGER}, #{institutionEstablishTime,jdbcType=VARCHAR}
+      )
+  </insert>
+  <insert id="insertSelective" parameterType="com.goafanti.common.model.OrganizationProperties" >
+    insert into organization_properties
+    <trim prefix="(" suffix=")" suffixOverrides="," >
+      <if test="id != null" >
+        id,
+      </if>
+      <if test="oid != null" >
+        oid,
+      </if>
+      <if test="qualification != null" >
+        qualification,
+      </if>
+      <if test="turnover != null" >
+        turnover,
+      </if>
+      <if test="collegeAttribute != null" >
+        college_attribute,
+      </if>
+      <if test="collegeEstablishTime != null" >
+        college_establish_time,
+      </if>
+      <if test="academician != null" >
+        academician,
+      </if>
+      <if test="doctoralTutor != null" >
+        doctoral_tutor,
+      </if>
+      <if test="masterTutor != null" >
+        master_tutor,
+      </if>
+      <if test="otherExpert != null" >
+        other_expert,
+      </if>
+      <if test="nationalLab != null" >
+        national_lab,
+      </if>
+      <if test="educationLab != null" >
+        education_lab,
+      </if>
+      <if test="enterpriseCenter != null" >
+        enterprise_center,
+      </if>
+      <if test="otherCenter != null" >
+        other_center,
+      </if>
+      <if test="institutionEstablishTime != null" >
+        institution_establish_time,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides="," >
+      <if test="id != null" >
+        #{id,jdbcType=VARCHAR},
+      </if>
+      <if test="oid != null" >
+        #{oid,jdbcType=VARCHAR},
+      </if>
+      <if test="qualification != null" >
+        #{qualification,jdbcType=VARCHAR},
+      </if>
+      <if test="turnover != null" >
+        #{turnover,jdbcType=VARCHAR},
+      </if>
+      <if test="collegeAttribute != null" >
+        #{collegeAttribute,jdbcType=VARCHAR},
+      </if>
+      <if test="collegeEstablishTime != null" >
+        #{collegeEstablishTime,jdbcType=VARCHAR},
+      </if>
+      <if test="academician != null" >
+        #{academician,jdbcType=INTEGER},
+      </if>
+      <if test="doctoralTutor != null" >
+        #{doctoralTutor,jdbcType=INTEGER},
+      </if>
+      <if test="masterTutor != null" >
+        #{masterTutor,jdbcType=INTEGER},
+      </if>
+      <if test="otherExpert != null" >
+        #{otherExpert,jdbcType=INTEGER},
+      </if>
+      <if test="nationalLab != null" >
+        #{nationalLab,jdbcType=INTEGER},
+      </if>
+      <if test="educationLab != null" >
+        #{educationLab,jdbcType=INTEGER},
+      </if>
+      <if test="enterpriseCenter != null" >
+        #{enterpriseCenter,jdbcType=INTEGER},
+      </if>
+      <if test="otherCenter != null" >
+        #{otherCenter,jdbcType=INTEGER},
+      </if>
+      <if test="institutionEstablishTime != null" >
+        #{institutionEstablishTime,jdbcType=VARCHAR},
+      </if>
+    </trim>
+  </insert>
+  <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.OrganizationProperties" >
+    update organization_properties
+    <set >
+      <if test="oid != null" >
+        oid = #{oid,jdbcType=VARCHAR},
+      </if>
+      <if test="qualification != null" >
+        qualification = #{qualification,jdbcType=VARCHAR},
+      </if>
+      <if test="turnover != null" >
+        turnover = #{turnover,jdbcType=VARCHAR},
+      </if>
+      <if test="collegeAttribute != null" >
+        college_attribute = #{collegeAttribute,jdbcType=VARCHAR},
+      </if>
+      <if test="collegeEstablishTime != null" >
+        college_establish_time = #{collegeEstablishTime,jdbcType=VARCHAR},
+      </if>
+      <if test="academician != null" >
+        academician = #{academician,jdbcType=INTEGER},
+      </if>
+      <if test="doctoralTutor != null" >
+        doctoral_tutor = #{doctoralTutor,jdbcType=INTEGER},
+      </if>
+      <if test="masterTutor != null" >
+        master_tutor = #{masterTutor,jdbcType=INTEGER},
+      </if>
+      <if test="otherExpert != null" >
+        other_expert = #{otherExpert,jdbcType=INTEGER},
+      </if>
+      <if test="nationalLab != null" >
+        national_lab = #{nationalLab,jdbcType=INTEGER},
+      </if>
+      <if test="educationLab != null" >
+        education_lab = #{educationLab,jdbcType=INTEGER},
+      </if>
+      <if test="enterpriseCenter != null" >
+        enterprise_center = #{enterpriseCenter,jdbcType=INTEGER},
+      </if>
+      <if test="otherCenter != null" >
+        other_center = #{otherCenter,jdbcType=INTEGER},
+      </if>
+      <if test="institutionEstablishTime != null" >
+        institution_establish_time = #{institutionEstablishTime,jdbcType=VARCHAR},
+      </if>
+    </set>
+    where id = #{id,jdbcType=VARCHAR}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.OrganizationProperties" >
+    update organization_properties
+    set oid = #{oid,jdbcType=VARCHAR},
+      qualification = #{qualification,jdbcType=VARCHAR},
+      turnover = #{turnover,jdbcType=VARCHAR},
+      college_attribute = #{collegeAttribute,jdbcType=VARCHAR},
+      college_establish_time = #{collegeEstablishTime,jdbcType=VARCHAR},
+      academician = #{academician,jdbcType=INTEGER},
+      doctoral_tutor = #{doctoralTutor,jdbcType=INTEGER},
+      master_tutor = #{masterTutor,jdbcType=INTEGER},
+      other_expert = #{otherExpert,jdbcType=INTEGER},
+      national_lab = #{nationalLab,jdbcType=INTEGER},
+      education_lab = #{educationLab,jdbcType=INTEGER},
+      enterprise_center = #{enterpriseCenter,jdbcType=INTEGER},
+      other_center = #{otherCenter,jdbcType=INTEGER},
+      institution_establish_time = #{institutionEstablishTime,jdbcType=VARCHAR}
+    where id = #{id,jdbcType=VARCHAR}
+  </update>
+  
+  
+  <select id="selectOrgProByUserId" parameterType="java.lang.String" resultMap="BaseResultMap">
+  	select  n.* from  organization_properties n INNER JOIN 
+    (select i.* from user u INNER JOIN organization_info i on u.id = i.uid) m
+     on m.id =n.oid  where m.uid=#{uid,jdbcType=VARCHAR}
+  </select>
+ 
+</mapper>

+ 22 - 11
src/main/java/com/goafanti/common/mapper/OrganizationTechMapper.xml

@@ -5,11 +5,12 @@
     <id column="id" property="id" jdbcType="VARCHAR" />
     <result column="uid" property="uid" jdbcType="VARCHAR" />
     <result column="technical_people_num" property="technicalPeopleNum" jdbcType="VARCHAR" />
-    <result column="key_search_area" property="keySearchArea" jdbcType="VARCHAR" />
+    <result column="search_area_category" property="serchAreaCategory" jdbcType="VARCHAR" />
+    <result column="search_area_det" property="serchAreaDet" jdbcType="VARCHAR" />
     <result column="specialty" property="specialty" jdbcType="VARCHAR" />
   </resultMap>
   <sql id="Base_Column_List" >
-    id, uid, technical_people_num, key_search_area, specialty
+    id, uid, technical_people_num, search_area_category, search_area_det, specialty
   </sql>
   <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
     select 
@@ -23,9 +24,9 @@
   </delete>
   <insert id="insert" parameterType="com.goafanti.common.model.OrganizationTech" >
     insert into organization_tech (id, uid, technical_people_num, 
-      key_search_area, specialty)
+      search_area_category, search_area_det,specialty)
     values (#{id,jdbcType=VARCHAR}, #{uid,jdbcType=VARCHAR}, #{technicalPeopleNum,jdbcType=VARCHAR}, 
-      #{keySearchArea,jdbcType=VARCHAR}, #{specialty,jdbcType=VARCHAR})
+      #{searchAreaCategory,jdbcType=VARCHAR}, #{searchAreaDet,jdbcType=VARCHAR}, #{specialty,jdbcType=VARCHAR})
   </insert>
   <insert id="insertSelective" parameterType="com.goafanti.common.model.OrganizationTech" >
     insert into organization_tech
@@ -39,8 +40,11 @@
       <if test="technicalPeopleNum != null" >
         technical_people_num,
       </if>
-      <if test="keySearchArea != null" >
-        key_search_area,
+      <if test="searchAreaCategory != null" >
+        search_area_category,
+      </if>
+       <if test="searchAreaDet != null" >
+        search_area_det,
       </if>
       <if test="specialty != null" >
         specialty,
@@ -56,8 +60,11 @@
       <if test="technicalPeopleNum != null" >
         #{technicalPeopleNum,jdbcType=VARCHAR},
       </if>
-      <if test="keySearchArea != null" >
-        #{keySearchArea,jdbcType=VARCHAR},
+      <if test="searchAreaCategory != null" >
+        #{searchAreaCategory,jdbcType=VARCHAR},
+      </if>
+      <if test="searchAreaDet != null" >
+        #{searchAreaDet,jdbcType=VARCHAR},
       </if>
       <if test="specialty != null" >
         #{specialty,jdbcType=VARCHAR},
@@ -73,8 +80,11 @@
       <if test="technicalPeopleNum != null" >
         technical_people_num = #{technicalPeopleNum,jdbcType=VARCHAR},
       </if>
-      <if test="keySearchArea != null" >
-        key_search_area = #{keySearchArea,jdbcType=VARCHAR},
+      <if test="searchAreaCategory != null" >
+        search_area_category = #{searchAreaCategory,jdbcType=VARCHAR},
+      </if>
+      <if test="searchAreaDet != null" >
+        search_area_det = #{searchAreaDet,jdbcType=VARCHAR},
       </if>
       <if test="specialty != null" >
         specialty = #{specialty,jdbcType=VARCHAR},
@@ -86,7 +96,8 @@
     update organization_tech
     set uid = #{uid,jdbcType=VARCHAR},
       technical_people_num = #{technicalPeopleNum,jdbcType=VARCHAR},
-      key_search_area = #{keySearchArea,jdbcType=VARCHAR},
+      search_area_category = #{searchAreaCategory,jdbcType=VARCHAR},
+      search_area_det = #{searchAreaDet,jdbcType=VARCHAR},
       specialty = #{specialty,jdbcType=VARCHAR}
     where id = #{id,jdbcType=VARCHAR}
   </update>

+ 7 - 0
src/main/java/com/goafanti/common/mapper/UserAbilityMapper.xml

@@ -68,4 +68,11 @@
       ability_label = #{abilityLabel,jdbcType=VARCHAR}
     where id = #{id,jdbcType=VARCHAR}
   </update>
+  
+  <select id="selectUserAbilityByUserId" parameterType="java.lang.String" resultType="com.goafanti.common.model.UserAbility">
+  	 select 
+    <include refid="Base_Column_List" />
+    from user_ability
+    where uid = #{uid,jdbcType=VARCHAR}
+  </select>
 </mapper>

+ 21 - 21
src/main/java/com/goafanti/common/mapper/UserCareerMapper.xml

@@ -8,10 +8,10 @@
     <result column="working_age" property="workingAge" jdbcType="VARCHAR" />
     <result column="professional_title" property="professionalTitle" jdbcType="VARCHAR" />
     <result column="professional_title_gettime" property="professionalTitleGettime" jdbcType="VARCHAR" />
-    <result column="professional_certificate" property="professionalCertificate" jdbcType="VARCHAR" />
+    <result column="professional_certificate_url" property="professionalCertificateUrl" jdbcType="VARCHAR" />
     <result column="qualification" property="qualification" jdbcType="VARCHAR" />
     <result column="qualification_gettime" property="qualificationGettime" jdbcType="VARCHAR" />
-    <result column="qualification_certificate" property="qualificationCertificate" jdbcType="VARCHAR" />
+    <result column="qualification_certificate_url" property="qualificationCertificateUrl" jdbcType="VARCHAR" />
     <result column="work_unit" property="workUnit" jdbcType="VARCHAR" />
     <result column="position" property="position" jdbcType="VARCHAR" />
     <result column="experiences" property="experiences" jdbcType="VARCHAR" />
@@ -19,7 +19,7 @@
   </resultMap>
   <sql id="Base_Column_List" >
     id, uid, engaged_field, working_age, professional_title, professional_title_gettime, 
-    professional_certificate, qualification, qualification_gettime, qualification_certificate, 
+    professional_certificate_url, qualification, qualification_gettime, qualification_certificate_url, 
     work_unit, position, experiences, achievement
   </sql>
   <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
@@ -35,14 +35,14 @@
   <insert id="insert" parameterType="com.goafanti.common.model.UserCareer" >
     insert into user_career (id, uid, engaged_field, 
       working_age, professional_title, professional_title_gettime, 
-      professional_certificate, qualification, 
-      qualification_gettime, qualification_certificate, 
+      professional_certificate_url, qualification, 
+      qualification_gettime, qualification_certificate_url, 
       work_unit, position, experiences, 
       achievement)
     values (#{id,jdbcType=VARCHAR}, #{uid,jdbcType=VARCHAR}, #{engagedField,jdbcType=VARCHAR}, 
       #{workingAge,jdbcType=VARCHAR}, #{professionalTitle,jdbcType=VARCHAR}, #{professionalTitleGettime,jdbcType=VARCHAR}, 
-      #{professionalCertificate,jdbcType=VARCHAR}, #{qualification,jdbcType=VARCHAR}, 
-      #{qualificationGettime,jdbcType=VARCHAR}, #{qualificationCertificate,jdbcType=VARCHAR}, 
+      #{professionalCertificateUrl,jdbcType=VARCHAR}, #{qualification,jdbcType=VARCHAR}, 
+      #{qualificationGettime,jdbcType=VARCHAR}, #{qualificationCertificateUrl,jdbcType=VARCHAR}, 
       #{workUnit,jdbcType=VARCHAR}, #{position,jdbcType=VARCHAR}, #{experiences,jdbcType=VARCHAR}, 
       #{achievement,jdbcType=VARCHAR})
   </insert>
@@ -67,8 +67,8 @@
       <if test="professionalTitleGettime != null" >
         professional_title_gettime,
       </if>
-      <if test="professionalCertificate != null" >
-        professional_certificate,
+      <if test="professionalCertificateUrl != null" >
+        professional_certificate_url,
       </if>
       <if test="qualification != null" >
         qualification,
@@ -76,8 +76,8 @@
       <if test="qualificationGettime != null" >
         qualification_gettime,
       </if>
-      <if test="qualificationCertificate != null" >
-        qualification_certificate,
+      <if test="qualificationCertificateUrl != null" >
+        qualification_certificate_url,
       </if>
       <if test="workUnit != null" >
         work_unit,
@@ -111,8 +111,8 @@
       <if test="professionalTitleGettime != null" >
         #{professionalTitleGettime,jdbcType=VARCHAR},
       </if>
-      <if test="professionalCertificate != null" >
-        #{professionalCertificate,jdbcType=VARCHAR},
+      <if test="professionalCertificateUrl != null" >
+        #{professionalCertificateUrl,jdbcType=VARCHAR},
       </if>
       <if test="qualification != null" >
         #{qualification,jdbcType=VARCHAR},
@@ -120,8 +120,8 @@
       <if test="qualificationGettime != null" >
         #{qualificationGettime,jdbcType=VARCHAR},
       </if>
-      <if test="qualificationCertificate != null" >
-        #{qualificationCertificate,jdbcType=VARCHAR},
+      <if test="qualificationCertificateUrl != null" >
+        #{qualificationCertificateUrl,jdbcType=VARCHAR},
       </if>
       <if test="workUnit != null" >
         #{workUnit,jdbcType=VARCHAR},
@@ -155,8 +155,8 @@
       <if test="professionalTitleGettime != null" >
         professional_title_gettime = #{professionalTitleGettime,jdbcType=VARCHAR},
       </if>
-      <if test="professionalCertificate != null" >
-        professional_certificate = #{professionalCertificate,jdbcType=VARCHAR},
+      <if test="professionalCertificateUrl != null" >
+        professional_certificate_url = #{professionalCertificateUrl,jdbcType=VARCHAR},
       </if>
       <if test="qualification != null" >
         qualification = #{qualification,jdbcType=VARCHAR},
@@ -164,8 +164,8 @@
       <if test="qualificationGettime != null" >
         qualification_gettime = #{qualificationGettime,jdbcType=VARCHAR},
       </if>
-      <if test="qualificationCertificate != null" >
-        qualification_certificate = #{qualificationCertificate,jdbcType=VARCHAR},
+      <if test="qualificationCertificateUrl != null" >
+        qualification_certificate_url = #{qualificationCertificateUrl,jdbcType=VARCHAR},
       </if>
       <if test="workUnit != null" >
         work_unit = #{workUnit,jdbcType=VARCHAR},
@@ -189,10 +189,10 @@
       working_age = #{workingAge,jdbcType=VARCHAR},
       professional_title = #{professionalTitle,jdbcType=VARCHAR},
       professional_title_gettime = #{professionalTitleGettime,jdbcType=VARCHAR},
-      professional_certificate = #{professionalCertificate,jdbcType=VARCHAR},
+      professional_certificate_url = #{professionalCertificateUrl,jdbcType=VARCHAR},
       qualification = #{qualification,jdbcType=VARCHAR},
       qualification_gettime = #{qualificationGettime,jdbcType=VARCHAR},
-      qualification_certificate = #{qualificationCertificate,jdbcType=VARCHAR},
+      qualification_certificate_url = #{qualificationCertificateUrl,jdbcType=VARCHAR},
       work_unit = #{workUnit,jdbcType=VARCHAR},
       position = #{position,jdbcType=VARCHAR},
       experiences = #{experiences,jdbcType=VARCHAR},

+ 75 - 38
src/main/java/com/goafanti/common/mapper/UserEduMapper.xml

@@ -5,17 +5,22 @@
     <id column="id" property="id" jdbcType="VARCHAR" />
     <result column="uid" property="uid" jdbcType="VARCHAR" />
     <result column="education" property="education" jdbcType="VARCHAR" />
-    <result column="major" property="major" jdbcType="VARCHAR" />
+    <result column="major_category" property="majorCategory" jdbcType="VARCHAR" />
+    <result column="major_name" property="majorName" jdbcType="VARCHAR" />
     <result column="graduate_school" property="graduateSchool" jdbcType="VARCHAR" />
-    <result column="graduation_time" property="graduationTime" jdbcType="VARCHAR" />
-    <result column="diploma" property="diploma" jdbcType="VARCHAR" />
+    <result column="graduation_time_year" property="graduationTimeYear" jdbcType="VARCHAR" />
+    <result column="graduation_time_month" property="graduationTimeMonth" jdbcType="VARCHAR" />
+    <result column="graduation_time_day" property="graduationTimeDay" jdbcType="VARCHAR" />
+    <result column="diploma_url" property="diplomaUrl" jdbcType="VARCHAR" />
     <result column="diploma_code" property="diplomaCode" jdbcType="VARCHAR" />
-    <result column="degree_diploma" property="degreeDiploma" jdbcType="VARCHAR" />
+    <result column="degree_diploma_url" property="degreeDiplomaUrl" jdbcType="VARCHAR" />
     <result column="degree_code" property="degreeCode" jdbcType="VARCHAR" />
   </resultMap>
   <sql id="Base_Column_List" >
-    id, uid, education, major, graduate_school, graduation_time, diploma, diploma_code, 
-    degree_diploma, degree_code
+    id, uid, education, major_category, major_name, graduate_school, graduation_time_year, 
+    graduation_time_month, graduation_time_day,
+    diploma_url, diploma_code, 
+    degree_diploma_url, degree_code
   </sql>
   <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
     select 
@@ -29,12 +34,14 @@
   </delete>
   <insert id="insert" parameterType="com.goafanti.common.model.UserEdu" >
     insert into user_edu (id, uid, education, 
-      major, graduate_school, graduation_time, 
-      diploma, diploma_code, degree_diploma, 
+      major_category,  major_name, graduate_school, graduation_time_year, graduation_time_month, graduation_time_day, 
+      diploma_url, diploma_code, degree_diploma_url, 
       degree_code)
     values (#{id,jdbcType=VARCHAR}, #{uid,jdbcType=VARCHAR}, #{education,jdbcType=VARCHAR}, 
-      #{major,jdbcType=VARCHAR}, #{graduateSchool,jdbcType=VARCHAR}, #{graduationTime,jdbcType=VARCHAR}, 
-      #{diploma,jdbcType=VARCHAR}, #{diplomaCode,jdbcType=VARCHAR}, #{degreeDiploma,jdbcType=VARCHAR}, 
+      #{majorCategory,jdbcType=VARCHAR},  #{majorName,jdbcType=VARCHAR},
+       #{graduateSchool,jdbcType=VARCHAR}, #{graduationTimeYear,jdbcType=VARCHAR},
+       #{graduationTimeMonth,jdbcType=VARCHAR},#{graduationTimeDay,jdbcType=VARCHAR}, 
+      #{diplomaUrl,jdbcType=VARCHAR}, #{diplomaCode,jdbcType=VARCHAR}, #{degreeDiplomaUrl,jdbcType=VARCHAR}, 
       #{degreeCode,jdbcType=VARCHAR})
   </insert>
   <insert id="insertSelective" parameterType="com.goafanti.common.model.UserEdu" >
@@ -49,23 +56,32 @@
       <if test="education != null" >
         education,
       </if>
-      <if test="major != null" >
-        major,
+      <if test="majorCategory != null" >
+        major_category,
+      </if>
+      <if test="majorName != null" >
+        major_name,
       </if>
       <if test="graduateSchool != null" >
         graduate_school,
       </if>
-      <if test="graduationTime != null" >
-        graduation_time,
+      <if test="graduationTimeYear != null" >
+        graduation_time_year,
+      </if>
+      <if test="graduationTimeMonth != null" >
+        graduation_time_Month,
+      </if>
+      <if test="graduationTimeDay != null" >
+        graduation_time_day,
       </if>
-      <if test="diploma != null" >
-        diploma,
+      <if test="diplomaUrl != null" >
+        diploma_url,
       </if>
       <if test="diplomaCode != null" >
         diploma_code,
       </if>
-      <if test="degreeDiploma != null" >
-        degree_diploma,
+      <if test="degreeDiplomaUrl != null" >
+        degree_diploma_url,
       </if>
       <if test="degreeCode != null" >
         degree_code,
@@ -81,23 +97,32 @@
       <if test="education != null" >
         #{education,jdbcType=VARCHAR},
       </if>
-      <if test="major != null" >
-        #{major,jdbcType=VARCHAR},
+      <if test="majorCategory != null" >
+        #{majorCategory,jdbcType=VARCHAR},
+      </if>
+       <if test="majorName != null" >
+        #{majorName,jdbcType=VARCHAR},
       </if>
       <if test="graduateSchool != null" >
         #{graduateSchool,jdbcType=VARCHAR},
       </if>
-      <if test="graduationTime != null" >
-        #{graduationTime,jdbcType=VARCHAR},
+      <if test="graduationTimeYear != null" >
+        #{graduationTimeYear,jdbcType=VARCHAR},
+      </if>
+      <if test="graduationTimeMonth != null" >
+        #{graduationTimeMonth,jdbcType=VARCHAR},
       </if>
-      <if test="diploma != null" >
-        #{diploma,jdbcType=VARCHAR},
+      <if test="graduationTimeDay != null" >
+        #{graduationTimeDay,jdbcType=VARCHAR},
+      </if>
+      <if test="diplomaUrl != null" >
+        #{diplomaUrl,jdbcType=VARCHAR},
       </if>
       <if test="diplomaCode != null" >
         #{diplomaCode,jdbcType=VARCHAR},
       </if>
-      <if test="degreeDiploma != null" >
-        #{degreeDiploma,jdbcType=VARCHAR},
+      <if test="degreeDiplomaUrl != null" >
+        #{degreeDiplomaUrl,jdbcType=VARCHAR},
       </if>
       <if test="degreeCode != null" >
         #{degreeCode,jdbcType=VARCHAR},
@@ -113,23 +138,32 @@
       <if test="education != null" >
         education = #{education,jdbcType=VARCHAR},
       </if>
-      <if test="major != null" >
-        major = #{major,jdbcType=VARCHAR},
+      <if test="majorCategory != null" >
+        major_Category = #{majorCategory,jdbcType=VARCHAR},
+      </if>
+       <if test="majorName != null" >
+        major_name = #{majorName,jdbcType=VARCHAR},
       </if>
       <if test="graduateSchool != null" >
         graduate_school = #{graduateSchool,jdbcType=VARCHAR},
       </if>
-      <if test="graduationTime != null" >
-        graduation_time = #{graduationTime,jdbcType=VARCHAR},
+      <if test="graduationTimeYear != null" >
+        graduation_time_year = #{graduationTimeYear,jdbcType=VARCHAR},
+      </if>
+      <if test="graduationTimeMonth != null" >
+        graduation_time_month = #{graduationTimeMonth,jdbcType=VARCHAR},
+      </if>
+      <if test="graduationTimeDay != null" >
+        graduation_time_day = #{graduationTimeDay,jdbcType=VARCHAR},
       </if>
-      <if test="diploma != null" >
-        diploma = #{diploma,jdbcType=VARCHAR},
+      <if test="diplomaUrl != null" >
+        diploma_Url = #{diplomaUrl,jdbcType=VARCHAR},
       </if>
       <if test="diplomaCode != null" >
         diploma_code = #{diplomaCode,jdbcType=VARCHAR},
       </if>
-      <if test="degreeDiploma != null" >
-        degree_diploma = #{degreeDiploma,jdbcType=VARCHAR},
+      <if test="degreeDiplomaUrl != null" >
+        degree_diploma_url = #{degreeDiplomaUrl,jdbcType=VARCHAR},
       </if>
       <if test="degreeCode != null" >
         degree_code = #{degreeCode,jdbcType=VARCHAR},
@@ -141,12 +175,15 @@
     update user_edu
     set uid = #{uid,jdbcType=VARCHAR},
       education = #{education,jdbcType=VARCHAR},
-      major = #{major,jdbcType=VARCHAR},
+      major_category = #{majorCategory,jdbcType=VARCHAR},
+       major_name = #{majorName,jdbcType=VARCHAR},
       graduate_school = #{graduateSchool,jdbcType=VARCHAR},
-      graduation_time = #{graduationTime,jdbcType=VARCHAR},
-      diploma = #{diploma,jdbcType=VARCHAR},
+      graduation_time_year = #{graduationTimeYear,jdbcType=VARCHAR},
+      graduation_time_month = #{graduationTimeMonth,jdbcType=VARCHAR},
+      graduation_time_day = #{graduationTimeDay,jdbcType=VARCHAR},
+      diploma_url = #{diplomaUrl,jdbcType=VARCHAR},
       diploma_code = #{diplomaCode,jdbcType=VARCHAR},
-      degree_diploma = #{degreeDiploma,jdbcType=VARCHAR},
+      degree_diploma_url = #{degreeDiplomaUrl,jdbcType=VARCHAR},
       degree_code = #{degreeCode,jdbcType=VARCHAR}
     where id = #{id,jdbcType=VARCHAR}
   </update>

+ 62 - 32
src/main/java/com/goafanti/common/mapper/UserIdentityMapper.xml

@@ -6,13 +6,31 @@
     <result column="uid" property="uid" jdbcType="VARCHAR" />
     <result column="username" property="username" jdbcType="VARCHAR" />
     <result column="sex" property="sex" jdbcType="VARCHAR" />
-    <result column="date_of_birth" property="dateOfBirth" jdbcType="VARCHAR" />
+    <result column="date_of_birth_year" property="dateOfBirthYear" jdbcType="VARCHAR" />
+    <result column="date_of_birth_month" property="dateOfBirthMonth" jdbcType="VARCHAR" />
     <result column="id_number" property="idNumber" jdbcType="VARCHAR" />
-    <result column="positive_id" property="positiveId" jdbcType="VARCHAR" />
-    <result column="opposite_id" property="oppositeId" jdbcType="VARCHAR" />
+    <result column="positive_id_url" property="positiveIdUrl" jdbcType="VARCHAR" />
+    <result column="opposite_id_url" property="oppositeIdUrl" jdbcType="VARCHAR" />
   </resultMap>
+  
+  
+  <resultMap id="UserIdentityBoMap" type="com.goafanti.user.bo.UserIdentityBo" >
+    <id column="id" property="id" jdbcType="VARCHAR" />
+    <result column="uid" property="uid" jdbcType="VARCHAR" />
+    <result column="username" property="username" jdbcType="VARCHAR" />
+    <result column="sex" property="sex" jdbcType="VARCHAR" />
+    <result column="date_of_birth_year" property="dateOfBirthYear" jdbcType="VARCHAR" />
+    <result column="date_of_birth_month" property="dateOfBirthMonth" jdbcType="VARCHAR" />
+    <result column="id_number" property="idNumber" jdbcType="VARCHAR" />
+    <result column="positive_id_url" property="positiveIdUrl" jdbcType="VARCHAR" />
+    <result column="opposite_id_url" property="oppositeIdUrl" jdbcType="VARCHAR" />
+    <result column="mobile" property="mobile" jdbcType="VARCHAR" />
+    <result column="number" jdbcType="BIGINT" property="number" />
+  </resultMap>
+  
+  
   <sql id="Base_Column_List" >
-    id, uid, username, sex, date_of_birth, id_number, positive_id, opposite_id
+    id, uid, username, sex, date_of_birth_year,date_of_birth_month, id_number, positive_id_url, opposite_id_url
   </sql>
   <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
     select 
@@ -26,11 +44,11 @@
   </delete>
   <insert id="insert" parameterType="com.goafanti.common.model.UserIdentity" >
     insert into user_identity (id, uid, username, 
-      sex, date_of_birth, id_number, 
-      positive_id, opposite_id)
+      sex, date_of_birth_year, date_of_birth_month, id_number, 
+      positive_id_url, opposite_id_url)
     values (#{id,jdbcType=VARCHAR}, #{uid,jdbcType=VARCHAR}, #{username,jdbcType=VARCHAR}, 
-      #{sex,jdbcType=VARCHAR}, #{dateOfBirth,jdbcType=VARCHAR}, #{idNumber,jdbcType=VARCHAR}, 
-      #{positiveId,jdbcType=VARCHAR}, #{oppositeId,jdbcType=VARCHAR})
+      #{sex,jdbcType=VARCHAR}, #{dateOfBirthYear,jdbcType=VARCHAR},#{dateOfBirthMonth,jdbcType=VARCHAR}, #{idNumber,jdbcType=VARCHAR}, 
+      #{positiveIdUrl,jdbcType=VARCHAR}, #{oppositeIdUrl,jdbcType=VARCHAR})
   </insert>
   <insert id="insertSelective" parameterType="com.goafanti.common.model.UserIdentity" >
     insert into user_identity
@@ -47,17 +65,20 @@
       <if test="sex != null" >
         sex,
       </if>
-      <if test="dateOfBirth != null" >
-        date_of_birth,
+      <if test="dateOfBirthYear != null" >
+        date_of_birth_Year,
+      </if>
+       <if test="dateOfBirthMonth != null" >
+        date_of_birth_Month,
       </if>
       <if test="idNumber != null" >
         id_number,
       </if>
-      <if test="positiveId != null" >
-        positive_id,
+      <if test="positiveIdUrl != null" >
+        positive_id_url,
       </if>
-      <if test="oppositeId != null" >
-        opposite_id,
+      <if test="oppositeIdUrl != null" >
+        opposite_id_url,
       </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides="," >
@@ -73,17 +94,20 @@
       <if test="sex != null" >
         #{sex,jdbcType=VARCHAR},
       </if>
-      <if test="dateOfBirth != null" >
-        #{dateOfBirth,jdbcType=VARCHAR},
+      <if test="dateOfBirthYear != null" >
+        #{dateOfBirthYear,jdbcType=VARCHAR},
+      </if>
+      <if test="dateOfBirthMonth != null" >
+        #{dateOfBirthMonth,jdbcType=VARCHAR},
       </if>
       <if test="idNumber != null" >
         #{idNumber,jdbcType=VARCHAR},
       </if>
-      <if test="positiveId != null" >
-        #{positiveId,jdbcType=VARCHAR},
+      <if test="positiveIdUrl != null" >
+        #{positiveIdUrl,jdbcType=VARCHAR},
       </if>
-      <if test="oppositeId != null" >
-        #{oppositeId,jdbcType=VARCHAR},
+      <if test="oppositeIdUrl != null" >
+        #{oppositeIdUrl,jdbcType=VARCHAR},
       </if>
     </trim>
   </insert>
@@ -99,17 +123,20 @@
       <if test="sex != null" >
         sex = #{sex,jdbcType=VARCHAR},
       </if>
-      <if test="dateOfBirth != null" >
-        date_of_birth = #{dateOfBirth,jdbcType=VARCHAR},
+      <if test="dateOfBirthYear != null" >
+        date_of_birth_year = #{dateOfBirthYear,jdbcType=VARCHAR},
+      </if>
+      <if test="dateOfBirthMonth != null" >
+        date_of_birth_month = #{dateOfBirthMonth,jdbcType=VARCHAR},
       </if>
       <if test="idNumber != null" >
         id_number = #{idNumber,jdbcType=VARCHAR},
       </if>
-      <if test="positiveId != null" >
-        positive_id = #{positiveId,jdbcType=VARCHAR},
+      <if test="positiveIdUrl != null" >
+        positive_id_url = #{positiveIdUrl,jdbcType=VARCHAR},
       </if>
-      <if test="oppositeId != null" >
-        opposite_id = #{oppositeId,jdbcType=VARCHAR},
+      <if test="oppositeIdUrl != null" >
+        opposite_id_url = #{oppositeIdUrl,jdbcType=VARCHAR},
       </if>
     </set>
     where id = #{id,jdbcType=VARCHAR}
@@ -119,10 +146,11 @@
     set uid = #{uid,jdbcType=VARCHAR},
       username = #{username,jdbcType=VARCHAR},
       sex = #{sex,jdbcType=VARCHAR},
-      date_of_birth = #{dateOfBirth,jdbcType=VARCHAR},
+      date_of_birth_year = #{dateOfBirthYear,jdbcType=VARCHAR},
+      date_of_birth_month = #{dateOfBirthMonth,jdbcType=VARCHAR},
       id_number = #{idNumber,jdbcType=VARCHAR},
-      positive_id = #{positiveId,jdbcType=VARCHAR},
-      opposite_id = #{oppositeId,jdbcType=VARCHAR}
+      positive_id_url = #{positiveIdUrl,jdbcType=VARCHAR},
+      opposite_id_url = #{oppositeIdUrl,jdbcType=VARCHAR}
     where id = #{id,jdbcType=VARCHAR}
   </update>
   
@@ -133,9 +161,11 @@
     where uid = #{uid,jdbcType=VARCHAR}
   </select>
   
-  <select id="selectUserIdentityBoByUserId" parameterType="java.lang.String" resultType="com.goafanti.user.bo.UserIdentityBo">
-  	select t.id,t.uid,t.username,t.sex,t.date_of_birth,t.id_number,t.positive_id,t.opposite_id ,
-u.mobile,u.number from (select mobile,number, id from user ) u inner JOIN user_identity t
+   
+  <select id="selectUserIdentityBoByUserId" parameterType="java.lang.String" resultMap="UserIdentityBoMap">
+  	select t.id,t.uid,t.username,t.sex,t.date_of_birth_year,date_of_birth_month,t.id_number,t.positive_id_url,t.opposite_id_url,
+u.mobile,u.number from user u left JOIN user_identity t
 on t.uid = u.id where t.uid=#{uid,jdbcType=VARCHAR}
   </select>
+ 
 </mapper>

+ 122 - 38
src/main/java/com/goafanti/common/mapper/UserInfoMapper.xml

@@ -4,18 +4,44 @@
   <resultMap id="BaseResultMap" type="com.goafanti.common.model.UserInfo" >
     <id column="id" property="id" jdbcType="VARCHAR" />
     <result column="uid" property="uid" jdbcType="VARCHAR" />
-    <result column="residence" property="residence" jdbcType="VARCHAR" />
-    <result column="person_portrait" property="personPortrait" jdbcType="VARCHAR" />
-    <result column="life_photo" property="lifePhoto" jdbcType="VARCHAR" />
+    <result column="residence_province" property="residenceProvince" jdbcType="VARCHAR" />
+    <result column="residence_city" property="residenceCity" jdbcType="VARCHAR" />
+    <result column="residence_area" property="residenceArea" jdbcType="VARCHAR" />
+    <result column="person_portrait_url" property="personPortraitUrl" jdbcType="VARCHAR" />
+    <result column="life_photo_url" property="lifePhotoUrl" jdbcType="VARCHAR" />
     <result column="personal_profile" property="personalProfile" jdbcType="VARCHAR" />
+    <result column="fixed_tel_area" property="fixedTelArea" jdbcType="VARCHAR" />
     <result column="fixed_tel" property="fixedTel" jdbcType="VARCHAR" />
+    <result column="fixed_tel_extension" property="fixedTelExtension" jdbcType="VARCHAR" />
     <result column="qq" property="qq" jdbcType="VARCHAR" />
     <result column="postal_address" property="postalAddress" jdbcType="VARCHAR" />
     <result column="postcode" property="postcode" jdbcType="VARCHAR" />
+    <result column="work_unit" property="workUnit" jdbcType="VARCHAR" />
   </resultMap>
+  
+   <resultMap id="UserInfoBoMap" type="com.goafanti.user.bo.UserInfoBo" >
+    <id column="id" property="id" jdbcType="VARCHAR" />
+    <result column="uid" property="uid" jdbcType="VARCHAR" />
+    <result column="residence_province" property="residenceProvince" jdbcType="VARCHAR" />
+    <result column="residence_city" property="residenceCity" jdbcType="VARCHAR" />
+    <result column="residence_area" property="residenceArea" jdbcType="VARCHAR" />
+    <result column="person_portrait_url" property="personPortraitUrl" jdbcType="VARCHAR" />
+    <result column="life_photo_url" property="lifePhotoUrl" jdbcType="VARCHAR" />
+    <result column="personal_profile" property="personalProfile" jdbcType="VARCHAR" />
+    <result column="fixed_tel_area" property="fixedTelArea" jdbcType="VARCHAR" />
+    <result column="fixed_tel" property="fixedTel" jdbcType="VARCHAR" />
+    <result column="fixed_tel_extension" property="fixedTelExtension" jdbcType="VARCHAR" />
+    <result column="qq" property="qq" jdbcType="VARCHAR" />
+    <result column="postal_address" property="postalAddress" jdbcType="VARCHAR" />
+    <result column="postcode" property="postcode" jdbcType="VARCHAR" />
+    <result column="work_unit" property="workUnit" jdbcType="VARCHAR" />
+    <result column="email" property="email" jdbcType="VARCHAR" />
+    <result column="nickname" property="nickname" jdbcType="VARCHAR" />
+  </resultMap>
+  
   <sql id="Base_Column_List" >
-    id, uid, residence, person_portrait, life_photo, personal_profile, fixed_tel, qq, 
-    postal_address, postcode
+    id, uid, residence_province, residence_city, residence_area, person_portrait_url, life_photo_url, personal_profile, fixed_tel, qq, 
+    postal_address, postcode, work_unit
   </sql>
   <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
     select 
@@ -28,14 +54,16 @@
     where id = #{id,jdbcType=VARCHAR}
   </delete>
   <insert id="insert" parameterType="com.goafanti.common.model.UserInfo" >
-    insert into user_info (id, uid, residence, 
-      person_portrait, life_photo, personal_profile, 
-      fixed_tel, qq, postal_address, 
-      postcode)
-    values (#{id,jdbcType=VARCHAR}, #{uid,jdbcType=VARCHAR}, #{residence,jdbcType=VARCHAR}, 
-      #{personPortrait,jdbcType=VARCHAR}, #{lifePhoto,jdbcType=VARCHAR}, #{personalProfile,jdbcType=VARCHAR}, 
-      #{fixedTel,jdbcType=VARCHAR}, #{qq,jdbcType=VARCHAR}, #{postalAddress,jdbcType=VARCHAR}, 
-      #{postcode,jdbcType=VARCHAR})
+    insert into user_info (id, uid, residence_province, residence_city, residence_area,
+      person_portrait_url, life_photo_url, personal_profile, 
+      fixed_tel_area,fixed_tel,fixed_tel_extension, qq, postal_address, 
+      postcode,work_unit)
+    values (#{id,jdbcType=VARCHAR}, #{uid,jdbcType=VARCHAR}, #{residenceProvince,jdbcType=VARCHAR}, 
+      #{residenceCity,jdbcType=VARCHAR}, #{residenceArea,jdbcType=VARCHAR},
+      #{personPortraitUrl,jdbcType=VARCHAR}, #{lifePhotoUrl,jdbcType=VARCHAR}, #{personalProfile,jdbcType=VARCHAR}, 
+      #{fixedTelArea,jdbcType=VARCHAR}, #{fixedTel,jdbcType=VARCHAR},#{fixedTelExtension,jdbcType=VARCHAR},
+      #{qq,jdbcType=VARCHAR}, #{postalAddress,jdbcType=VARCHAR}, 
+      #{postcode,jdbcType=VARCHAR}, #{workUnit,jdbcType=VARCHAR}) 
   </insert>
   <insert id="insertSelective" parameterType="com.goafanti.common.model.UserInfo" >
     insert into user_info
@@ -46,21 +74,33 @@
       <if test="uid != null" >
         uid,
       </if>
-      <if test="residence != null" >
-        residence,
+      <if test="residenceProvince != null" >
+        residence_province,
       </if>
-      <if test="personPortrait != null" >
-        person_portrait,
+       <if test="residenceCity != null" >
+        residence_city,
       </if>
-      <if test="lifePhoto != null" >
-        life_photo,
+       <if test="residenceArea != null" >
+        residence_area,
+      </if>
+      <if test="personPortraitUrl != null" >
+        person_portrait_url,
+      </if>
+      <if test="lifePhotoUrl != null" >
+        life_photo_url,
       </if>
       <if test="personalProfile != null" >
         personal_profile,
       </if>
+      <if test="fixedTelArea != null" >
+        fixed_tel_area,
+      </if>
       <if test="fixedTel != null" >
         fixed_tel,
       </if>
+      <if test="fixedTelExtension != null" >
+        fixed_tel_extension,
+      </if>
       <if test="qq != null" >
         qq,
       </if>
@@ -70,6 +110,9 @@
       <if test="postcode != null" >
         postcode,
       </if>
+       <if test="workUnit != null" >
+        work_Unit,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides="," >
       <if test="id != null" >
@@ -78,21 +121,33 @@
       <if test="uid != null" >
         #{uid,jdbcType=VARCHAR},
       </if>
-      <if test="residence != null" >
-        #{residence,jdbcType=VARCHAR},
+      <if test="residenceProvince != null" >
+        #{residenceProvince,jdbcType=VARCHAR},
+      </if>
+      <if test="residenceCity != null" >
+        #{residenceCity,jdbcType=VARCHAR},
       </if>
-      <if test="personPortrait != null" >
-        #{personPortrait,jdbcType=VARCHAR},
+      <if test="residenceArea != null" >
+        #{residenceArea,jdbcType=VARCHAR},
       </if>
-      <if test="lifePhoto != null" >
-        #{lifePhoto,jdbcType=VARCHAR},
+      <if test="personPortraitUrl != null" >
+        #{personPortraitUrl,jdbcType=VARCHAR},
+      </if>
+      <if test="lifePhotoUrl != null" >
+        #{lifePhotoUrl,jdbcType=VARCHAR},
       </if>
       <if test="personalProfile != null" >
         #{personalProfile,jdbcType=VARCHAR},
       </if>
+      <if test="fixedTelArea != null" >
+        #{fixedTelArea,jdbcType=VARCHAR},
+      </if>
       <if test="fixedTel != null" >
         #{fixedTel,jdbcType=VARCHAR},
       </if>
+      <if test="fixedTelExtension != null" >
+        #{fixedTelExtension,jdbcType=VARCHAR},
+      </if>
       <if test="qq != null" >
         #{qq,jdbcType=VARCHAR},
       </if>
@@ -102,6 +157,9 @@
       <if test="postcode != null" >
         #{postcode,jdbcType=VARCHAR},
       </if>
+       <if test="workUnit != null" >
+        #{workunit,jdbcType=VARCHAR},
+      </if>
     </trim>
   </insert>
   <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.UserInfo" >
@@ -110,21 +168,33 @@
       <if test="uid != null" >
         uid = #{uid,jdbcType=VARCHAR},
       </if>
-      <if test="residence != null" >
-        residence = #{residence,jdbcType=VARCHAR},
+      <if test="residenceProvince != null" >
+        residence_Province = #{residenceProvince,jdbcType=VARCHAR},
+      </if>
+       <if test="residenceCity != null" >
+        residence_City = #{residenceCity,jdbcType=VARCHAR},
+      </if>
+       <if test="residenceArea != null" >
+        residence_Area = #{residenceArea,jdbcType=VARCHAR},
       </if>
-      <if test="personPortrait != null" >
-        person_portrait = #{personPortrait,jdbcType=VARCHAR},
+      <if test="personPortraitUrl != null" >
+        person_portrait_url = #{personPortraitUrl,jdbcType=VARCHAR},
       </if>
-      <if test="lifePhoto != null" >
-        life_photo = #{lifePhoto,jdbcType=VARCHAR},
+      <if test="lifePhotoUrl != null" >
+        life_photo_url = #{lifePhotoUrl,jdbcType=VARCHAR},
       </if>
       <if test="personalProfile != null" >
         personal_profile = #{personalProfile,jdbcType=VARCHAR},
       </if>
+      <if test="fixedTelArea != null" >
+        fixed_tel_area = #{fixedTelArea,jdbcType=VARCHAR},
+      </if>
       <if test="fixedTel != null" >
         fixed_tel = #{fixedTel,jdbcType=VARCHAR},
       </if>
+      <if test="fixedTelExtension != null" >
+        fixed_tel_extension = #{fixedTelExtension,jdbcType=VARCHAR},
+      </if>
       <if test="qq != null" >
         qq = #{qq,jdbcType=VARCHAR},
       </if>
@@ -134,20 +204,28 @@
       <if test="postcode != null" >
         postcode = #{postcode,jdbcType=VARCHAR},
       </if>
+      <if test="workUnit != null" >
+        work_unit = #{workUnit,jdbcType=VARCHAR},
+      </if>
     </set>
     where id = #{id,jdbcType=VARCHAR}
   </update>
   <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.UserInfo" >
     update user_info
     set uid = #{uid,jdbcType=VARCHAR},
-      residence = #{residence,jdbcType=VARCHAR},
-      person_portrait = #{personPortrait,jdbcType=VARCHAR},
-      life_photo = #{lifePhoto,jdbcType=VARCHAR},
+      residence_province = #{residenceProvince,jdbcType=VARCHAR},
+      residence_city = #{residenceCity,jdbcType=VARCHAR},
+      residence_area = #{residenceArea,jdbcType=VARCHAR},
+      person_portrait_url = #{personPortraitUrl,jdbcType=VARCHAR},
+      life_photo_url = #{lifePhotoUrl,jdbcType=VARCHAR},
       personal_profile = #{personalProfile,jdbcType=VARCHAR},
+      fixed_tel_area = #{fixedTelArea,jdbcType=VARCHAR},
       fixed_tel = #{fixedTel,jdbcType=VARCHAR},
+      fixed_tel_extension = #{fixedTelExtension,jdbcType=VARCHAR},
       qq = #{qq,jdbcType=VARCHAR},
       postal_address = #{postalAddress,jdbcType=VARCHAR},
       postcode = #{postcode,jdbcType=VARCHAR}
+      work_unit = #{workUnit,jdbcType=VARCHAR}
     where id = #{id,jdbcType=VARCHAR}
   </update>
   
@@ -158,9 +236,15 @@
     where uid = #{uid,jdbcType=VARCHAR}
   </select>
   
-  <select id="selectUserInfoBoByUserId" paramterType="java.lang.String" resultType="com.goafanti.user.bo.UserInfoBo">
-  	select t.id,t.uid,t.residence,t.person_portrait,t.life_photo,t.personal_profile,t.fixed_tel,t.qq,t.postal_address,t.postcode,
-    u.email,u.nickname from (select email, id ,nickname from user ) u inner JOIN user_Info t
-    on t.uid = u.id where t.uid=#{uid,jdbcType=VARCHAR}
+    
+  <select id="selectUserInfoBoByUserId" parameterType="java.lang.String" resultMap="UserInfoBoMap">
+  	select t.id,t.uid,t.residence_province,t.residence_city,t.residence_area,
+  	t.person_portrait_url,t.life_photo_url,t.personal_profile,t.fixed_tel_area,t.fixed_tel,t.fixed_tel_extension,
+  	t.qq,t.postal_address,t.postcode,t.work_unit,
+    u.email,u.nickname from user u 
+    left JOIN user_Info t
+    on t.uid = u.id where t.uid = #{uid,jdbcType=VARCHAR}
+   
   </select>
+ 
 </mapper>

+ 1 - 0
src/main/java/com/goafanti/common/mapper/UserMapper.xml

@@ -129,6 +129,7 @@
     where id = #{id,jdbcType=VARCHAR}
   </update>
   
+  
   <select id="selectByMobieAndType" resultMap="BaseResultMap">
     select
   <include refid="Base_Column_List" />

+ 14 - 0
src/main/java/com/goafanti/common/model/OrganizationIdentity.java

@@ -29,6 +29,11 @@ public class OrganizationIdentity {
     * 邮政编码
     */
     private String postcode;
+    
+    /**
+     * 法人
+     */
+    private String legalPerson;
 
     public String getId() {
         return id;
@@ -85,4 +90,13 @@ public class OrganizationIdentity {
     public void setPostcode(String postcode) {
         this.postcode = postcode;
     }
+
+	public String getLegalPerson() {
+		return legalPerson;
+	}
+
+	public void setLegalPerson(String legalPerson) {
+		this.legalPerson = legalPerson;
+	}
+    
 }

+ 51 - 34
src/main/java/com/goafanti/common/model/OrganizationInfo.java

@@ -16,9 +16,19 @@ public class OrganizationInfo {
     private String companyName;
 
     /**
-    * 所在地
+    * 所在地--省
     */
-    private String location;
+    private String locationProvince;
+    
+    /**
+     * 所在地--市
+     */
+     private String locationCity;
+     
+     /**
+      * 所在地--区
+      */
+      private String locationArea;
 
     /**
     * 单位规模
@@ -35,20 +45,16 @@ public class OrganizationInfo {
     */
     private String homeUnit;
 
-    /**
-    * 企业资质
-    */
-    private String enterpriseQualification;
 
     /**
     * logo图
     */
-    private String logo;
+    private String logoUrl;
 
     /**
     * 宣传图片
     */
-    private String publicityPicture;
+    private String publicityPictureUrl;
 
     public String getId() {
         return id;
@@ -82,15 +88,32 @@ public class OrganizationInfo {
         this.companyName = companyName;
     }
 
-    public String getLocation() {
-        return location;
-    }
 
-    public void setLocation(String location) {
-        this.location = location;
-    }
+    public String getLocationProvince() {
+		return locationProvince;
+	}
+
+	public void setLocationProvince(String locationProvince) {
+		this.locationProvince = locationProvince;
+	}
+
+	public String getLocationCity() {
+		return locationCity;
+	}
+
+	public void setLocationCity(String locationCity) {
+		this.locationCity = locationCity;
+	}
+
+	public String getLocationArea() {
+		return locationArea;
+	}
 
-    public String getUnitSize() {
+	public void setLocationArea(String locationArea) {
+		this.locationArea = locationArea;
+	}
+
+	public String getUnitSize() {
         return unitSize;
     }
 
@@ -114,27 +137,21 @@ public class OrganizationInfo {
         this.homeUnit = homeUnit;
     }
 
-    public String getEnterpriseQualification() {
-        return enterpriseQualification;
-    }
-
-    public void setEnterpriseQualification(String enterpriseQualification) {
-        this.enterpriseQualification = enterpriseQualification;
-    }
+	public String getLogoUrl() {
+		return logoUrl;
+	}
 
-    public String getLogo() {
-        return logo;
-    }
+	public void setLogoUrl(String logoUrl) {
+		this.logoUrl = logoUrl;
+	}
 
-    public void setLogo(String logo) {
-        this.logo = logo;
-    }
+	public String getPublicityPictureUrl() {
+		return publicityPictureUrl;
+	}
 
-    public String getPublicityPicture() {
-        return publicityPicture;
-    }
+	public void setPublicityPictureUrl(String publicityPictureUrl) {
+		this.publicityPictureUrl = publicityPictureUrl;
+	}
 
-    public void setPublicityPicture(String publicityPicture) {
-        this.publicityPicture = publicityPicture;
-    }
+    
 }

+ 189 - 0
src/main/java/com/goafanti/common/model/OrganizationProperties.java

@@ -0,0 +1,189 @@
+package com.goafanti.common.model;
+
+public class OrganizationProperties {
+    private String id;
+
+    private String oid;
+
+    /**
+    * 企业资质
+    */
+    private String qualification;
+
+    /**
+    * 年营业额
+    */
+    private String turnover;
+
+    /**
+    * 院校属性
+    */
+    private String collegeAttribute;
+
+    /**
+    * 院校创办时间
+    */
+    private String collegeEstablishTime;
+
+    /**
+    * 院士
+    */
+    private Integer academician;
+
+    /**
+    * 博士生导师
+    */
+    private Integer doctoralTutor;
+
+    /**
+    * 硕士生导师
+    */
+    private Integer masterTutor;
+
+    /**
+    * 其他专家
+    */
+    private Integer otherExpert;
+
+    /**
+    * 国家重点实验室
+    */
+    private Integer nationalLab;
+
+    private Integer educationLab;
+
+    /**
+    * 企业共建研究中心
+    */
+    private Integer enterpriseCenter;
+
+    /**
+    * 其他研究中心
+    */
+    private Integer otherCenter;
+
+    /**
+    * 研究机构创办时间
+    */
+    private String institutionEstablishTime;
+
+    public String getId() {
+        return id;
+    }
+
+    public void setId(String id) {
+        this.id = id;
+    }
+
+    public String getOid() {
+        return oid;
+    }
+
+    public void setOid(String oid) {
+        this.oid = oid;
+    }
+
+    public String getQualification() {
+        return qualification;
+    }
+
+    public void setQualification(String qualification) {
+        this.qualification = qualification;
+    }
+
+    public String getTurnover() {
+        return turnover;
+    }
+
+    public void setTurnover(String turnover) {
+        this.turnover = turnover;
+    }
+
+    public String getCollegeAttribute() {
+        return collegeAttribute;
+    }
+
+    public void setCollegeAttribute(String collegeAttribute) {
+        this.collegeAttribute = collegeAttribute;
+    }
+
+    public String getCollegeEstablishTime() {
+        return collegeEstablishTime;
+    }
+
+    public void setCollegeEstablishTime(String collegeEstablishTime) {
+        this.collegeEstablishTime = collegeEstablishTime;
+    }
+
+    public Integer getAcademician() {
+        return academician;
+    }
+
+    public void setAcademician(Integer academician) {
+        this.academician = academician;
+    }
+
+    public Integer getDoctoralTutor() {
+        return doctoralTutor;
+    }
+
+    public void setDoctoralTutor(Integer doctoralTutor) {
+        this.doctoralTutor = doctoralTutor;
+    }
+
+    public Integer getMasterTutor() {
+        return masterTutor;
+    }
+
+    public void setMasterTutor(Integer masterTutor) {
+        this.masterTutor = masterTutor;
+    }
+
+    public Integer getOtherExpert() {
+        return otherExpert;
+    }
+
+    public void setOtherExpert(Integer otherExpert) {
+        this.otherExpert = otherExpert;
+    }
+
+    public Integer getNationalLab() {
+        return nationalLab;
+    }
+
+    public void setNationalLab(Integer nationalLab) {
+        this.nationalLab = nationalLab;
+    }
+
+    public Integer getEducationLab() {
+        return educationLab;
+    }
+
+    public void setEducationLab(Integer educationLab) {
+        this.educationLab = educationLab;
+    }
+
+    public Integer getEnterpriseCenter() {
+        return enterpriseCenter;
+    }
+
+    public void setEnterpriseCenter(Integer enterpriseCenter) {
+        this.enterpriseCenter = enterpriseCenter;
+    }
+
+    public Integer getOtherCenter() {
+        return otherCenter;
+    }
+
+    public void setOtherCenter(Integer otherCenter) {
+        this.otherCenter = otherCenter;
+    }
+
+    public String getInstitutionEstablishTime() {
+        return institutionEstablishTime;
+    }
+
+    public void setInstitutionEstablishTime(String institutionEstablishTime) {
+        this.institutionEstablishTime = institutionEstablishTime;
+    }
+}

+ 26 - 10
src/main/java/com/goafanti/common/model/OrganizationTech.java

@@ -11,10 +11,16 @@ public class OrganizationTech {
     private String technicalPeopleNum;
 
     /**
-    * 重点研究领域
+    * 重点研究领域类别
     */
-    private String keySearchArea;
-
+    private String searchAreaCategory;
+    
+    /**
+     * 重点研究领域明细
+     */
+    
+    private String searchAreaDet;
+    
     /**
     * 擅长领域
     */
@@ -44,15 +50,25 @@ public class OrganizationTech {
         this.technicalPeopleNum = technicalPeopleNum;
     }
 
-    public String getKeySearchArea() {
-        return keySearchArea;
-    }
+    
 
-    public void setKeySearchArea(String keySearchArea) {
-        this.keySearchArea = keySearchArea;
-    }
+	public String getSearchAreaCategory() {
+		return searchAreaCategory;
+	}
+
+	public void setSearchAreaCategory(String searchAreaCategory) {
+		this.searchAreaCategory = searchAreaCategory;
+	}
+
+	public String getSearchAreaDet() {
+		return searchAreaDet;
+	}
+
+	public void setSearchAreaDet(String searchAreaDet) {
+		this.searchAreaDet = searchAreaDet;
+	}
 
-    public String getSpecialty() {
+	public String getSpecialty() {
         return specialty;
     }
 

+ 18 - 16
src/main/java/com/goafanti/common/model/UserCareer.java

@@ -28,7 +28,7 @@ public class UserCareer {
     /**
     * 职称证明图
     */
-    private String professionalCertificate;
+    private String professionalCertificateUrl;
 
     /**
     * 执业资格
@@ -43,7 +43,7 @@ public class UserCareer {
     /**
     * 执业资格证明图
     */
-    private String qualificationCertificate;
+    private String qualificationCertificateUrl;
 
     /**
     * 工作单位
@@ -113,13 +113,6 @@ public class UserCareer {
         this.professionalTitleGettime = professionalTitleGettime;
     }
 
-    public String getProfessionalCertificate() {
-        return professionalCertificate;
-    }
-
-    public void setProfessionalCertificate(String professionalCertificate) {
-        this.professionalCertificate = professionalCertificate;
-    }
 
     public String getQualification() {
         return qualification;
@@ -137,15 +130,24 @@ public class UserCareer {
         this.qualificationGettime = qualificationGettime;
     }
 
-    public String getQualificationCertificate() {
-        return qualificationCertificate;
-    }
 
-    public void setQualificationCertificate(String qualificationCertificate) {
-        this.qualificationCertificate = qualificationCertificate;
-    }
+    public String getProfessionalCertificateUrl() {
+		return professionalCertificateUrl;
+	}
+
+	public void setProfessionalCertificateUrl(String professionalCertificateUrl) {
+		this.professionalCertificateUrl = professionalCertificateUrl;
+	}
+
+	public String getQualificationCertificateUrl() {
+		return qualificationCertificateUrl;
+	}
+
+	public void setQualificationCertificateUrl(String qualificationCertificateUrl) {
+		this.qualificationCertificateUrl = qualificationCertificateUrl;
+	}
 
-    public String getWorkUnit() {
+	public String getWorkUnit() {
         return workUnit;
     }
 

+ 75 - 32
src/main/java/com/goafanti/common/model/UserEdu.java

@@ -11,9 +11,14 @@ public class UserEdu {
     private String education;
 
     /**
-    * 专业
+    * 专业类别
     */
-    private String major;
+    private String majorCategory;
+    
+    /**
+     * 专业名称
+     */
+     private String majorName;
 
     /**
     * 毕业学校
@@ -23,12 +28,22 @@ public class UserEdu {
     /**
     * 毕业时间(年份)
     */
-    private String graduationTime;
+    private String graduationTimeYear;
+    
+    /**
+     * 毕业时间(月份)
+     */
+     private String graduationTimeMonth;
+     
+     /**
+      * 毕业时间(日)
+      */
+      private String graduationTimeDay;
 
     /**
     * 毕业证图
     */
-    private String diploma;
+    private String diplomaUrl;
 
     /**
     * 毕业证编号
@@ -38,7 +53,7 @@ public class UserEdu {
     /**
     * 学位证明图
     */
-    private String degreeDiploma;
+    private String degreeDiplomaUrl;
 
     /**
     * 学位证编号
@@ -69,15 +84,24 @@ public class UserEdu {
         this.education = education;
     }
 
-    public String getMajor() {
-        return major;
-    }
 
-    public void setMajor(String major) {
-        this.major = major;
-    }
+    public String getMajorCategory() {
+		return majorCategory;
+	}
+
+	public void setMajorCategory(String majorCategory) {
+		this.majorCategory = majorCategory;
+	}
+
+	public String getMajorName() {
+		return majorName;
+	}
 
-    public String getGraduateSchool() {
+	public void setMajorName(String majorName) {
+		this.majorName = majorName;
+	}
+
+	public String getGraduateSchool() {
         return graduateSchool;
     }
 
@@ -85,23 +109,49 @@ public class UserEdu {
         this.graduateSchool = graduateSchool;
     }
 
-    public String getGraduationTime() {
-        return graduationTime;
-    }
 
-    public void setGraduationTime(String graduationTime) {
-        this.graduationTime = graduationTime;
-    }
+    public String getGraduationTimeYear() {
+		return graduationTimeYear;
+	}
 
-    public String getDiploma() {
-        return diploma;
-    }
+	public void setGraduationTimeYear(String graduationTimeYear) {
+		this.graduationTimeYear = graduationTimeYear;
+	}
 
-    public void setDiploma(String diploma) {
-        this.diploma = diploma;
-    }
+	public String getGraduationTimeMonth() {
+		return graduationTimeMonth;
+	}
 
-    public String getDiplomaCode() {
+	public void setGraduationTimeMonth(String graduationTimeMonth) {
+		this.graduationTimeMonth = graduationTimeMonth;
+	}
+
+	public String getGraduationTimeDay() {
+		return graduationTimeDay;
+	}
+
+	public void setGraduationTimeDay(String graduationTimeDay) {
+		this.graduationTimeDay = graduationTimeDay;
+	}
+
+
+    public String getDiplomaUrl() {
+		return diplomaUrl;
+	}
+
+	public void setDiplomaUrl(String diplomaUrl) {
+		this.diplomaUrl = diplomaUrl;
+	}
+
+	public String getDegreeDiplomaUrl() {
+		return degreeDiplomaUrl;
+	}
+
+	public void setDegreeDiplomaUrl(String degreeDiplomaUrl) {
+		this.degreeDiplomaUrl = degreeDiplomaUrl;
+	}
+
+	public String getDiplomaCode() {
         return diplomaCode;
     }
 
@@ -109,13 +159,6 @@ public class UserEdu {
         this.diplomaCode = diplomaCode;
     }
 
-    public String getDegreeDiploma() {
-        return degreeDiploma;
-    }
-
-    public void setDegreeDiploma(String degreeDiploma) {
-        this.degreeDiploma = degreeDiploma;
-    }
 
     public String getDegreeCode() {
         return degreeCode;

+ 67 - 52
src/main/java/com/goafanti/common/model/UserIdentity.java

@@ -21,9 +21,14 @@ public class UserIdentity {
     private String sex;
 
     /**
-    * 出生年
+    * 出生年
     */
-    private String dateOfBirth;
+    private String dateOfBirthYear;
+    
+    /**
+     * 出生月
+     */
+    private String dateOfBirthMonth;
 
     /**
     * 身份证号码
@@ -36,74 +41,84 @@ public class UserIdentity {
     /**
     * 身份证正面照
     */
-    private String positiveId;
+    private String positiveIdUrl;
 
     /**
     * 身份证反面照
     */
-    private String oppositeId;
+    private String oppositeIdUrl;
+
+	public String getId() {
+		return id;
+	}
+
+	public void setId(String id) {
+		this.id = id;
+	}
+
+	public String getUid() {
+		return uid;
+	}
 
-    public String getId() {
-        return id;
-    }
+	public void setUid(String uid) {
+		this.uid = uid;
+	}
 
-    public void setId(String id) {
-        this.id = id;
-    }
+	public String getUsername() {
+		return username;
+	}
 
-    public String getUid() {
-        return uid;
-    }
+	public void setUsername(String username) {
+		this.username = username;
+	}
 
-    public void setUid(String uid) {
-        this.uid = uid;
-    }
+	public String getSex() {
+		return sex;
+	}
 
-    public String getUsername() {
-        return username;
-    }
+	public void setSex(String sex) {
+		this.sex = sex;
+	}
 
-    public void setUsername(String username) {
-        this.username = username;
-    }
+	public String getDateOfBirthYear() {
+		return dateOfBirthYear;
+	}
 
-    public String getSex() {
-        return sex;
-    }
+	public void setDateOfBirthYear(String dateOfBirthYear) {
+		this.dateOfBirthYear = dateOfBirthYear;
+	}
 
-    public void setSex(String sex) {
-        this.sex = sex;
-    }
+	public String getDateOfBirthMonth() {
+		return dateOfBirthMonth;
+	}
 
-    public String getDateOfBirth() {
-        return dateOfBirth;
-    }
+	public void setDateOfBirthMonth(String dateOfBirthMonth) {
+		this.dateOfBirthMonth = dateOfBirthMonth;
+	}
 
-    public void setDateOfBirth(String dateOfBirth) {
-        this.dateOfBirth = dateOfBirth;
-    }
+	public String getIdNumber() {
+		return idNumber;
+	}
 
-    public String getIdNumber() {
-        return idNumber;
-    }
+	public void setIdNumber(String idNumber) {
+		this.idNumber = idNumber;
+	}
 
-    public void setIdNumber(String idNumber) {
-        this.idNumber = idNumber;
-    }
+	public String getPositiveIdUrl() {
+		return positiveIdUrl;
+	}
 
-    public String getPositiveId() {
-        return positiveId;
-    }
+	public void setPositiveIdUrl(String positiveIdUrl) {
+		this.positiveIdUrl = positiveIdUrl;
+	}
 
-    public void setPositiveId(String positiveId) {
-        this.positiveId = positiveId;
-    }
+	public String getOppositeIdUrl() {
+		return oppositeIdUrl;
+	}
 
-    public String getOppositeId() {
-        return oppositeId;
-    }
+	public void setOppositeIdUrl(String oppositeIdUrl) {
+		this.oppositeIdUrl = oppositeIdUrl;
+	}
 
-    public void setOppositeId(String oppositeId) {
-        this.oppositeId = oppositeId;
-    }
+    
 }

+ 86 - 16
src/main/java/com/goafanti/common/model/UserInfo.java

@@ -6,19 +6,29 @@ public class UserInfo {
     private String uid;
 
     /**
-    * 居住地
+    * 居住地--省
     */
-    private String residence;
+    private String residenceProvince;
+    
+    /**
+     * 居住地--市
+     */
+     private String residenceCity;
+     
+     /**
+      * 居住地--区
+      */
+      private String residenceArea;
 
     /**
     * 个人头像
     */
-    private String personPortrait;
+    private String personPortraitUrl;
 
     /**
     * 生活照
     */
-    private String lifePhoto;
+    private String lifePhotoUrl;
 
     /**
     * 个人简介
@@ -26,11 +36,24 @@ public class UserInfo {
     private String personalProfile;
 
     /**
+    * 固定电话区号
+    */
+    private String fixedTelArea;
+    
+
+    /**
     * 固定电话
     */
     private String fixedTel;
+    
 
     /**
+    * 固定电话分机号
+    */
+    private String fixedTelExtension;
+
+
+	/**
     * QQ号码
     */
     private String qq;
@@ -44,6 +67,12 @@ public class UserInfo {
     * 邮政编码
     */
     private String postcode;
+    
+    /**
+     * 所在单位
+     * 
+     */
+    private String workUnit;
 
     public String getId() {
         return id;
@@ -61,28 +90,44 @@ public class UserInfo {
         this.uid = uid;
     }
 
-    public String getResidence() {
-        return residence;
+    public String getResidenceProvince() {
+        return residenceProvince;
     }
 
-    public void setResidence(String residence) {
-        this.residence = residence;
+    public void setResidenceProvince(String residenceProvince) {
+        this.residenceProvince = residenceProvince;
     }
 
-    public String getPersonPortrait() {
-        return personPortrait;
+    public String getResidenceCity() {
+		return residenceCity;
+	}
+
+	public void setResidenceCity(String residenceCity) {
+		this.residenceCity = residenceCity;
+	}
+
+	public String getResidenceArea() {
+		return residenceArea;
+	}
+
+	public void setResidenceArea(String residenceArea) {
+		this.residenceArea = residenceArea;
+	}
+
+	public String getPersonPortraitUrl() {
+        return personPortraitUrl;
     }
 
-    public void setPersonPortrait(String personPortrait) {
-        this.personPortrait = personPortrait;
+    public void setPersonPortraitUrl(String personPortraitUrl) {
+        this.personPortraitUrl = personPortraitUrl;
     }
 
-    public String getLifePhoto() {
-        return lifePhoto;
+    public String getLifePhotoUrl() {
+        return lifePhotoUrl;
     }
 
-    public void setLifePhoto(String lifePhoto) {
-        this.lifePhoto = lifePhoto;
+    public void setLifePhotoUrl(String lifePhotoUrl) {
+        this.lifePhotoUrl = lifePhotoUrl;
     }
 
     public String getPersonalProfile() {
@@ -124,4 +169,29 @@ public class UserInfo {
     public void setPostcode(String postcode) {
         this.postcode = postcode;
     }
+
+	public String getFixedTelArea() {
+		return fixedTelArea;
+	}
+
+	public void setFixedTelArea(String fixedTelArea) {
+		this.fixedTelArea = fixedTelArea;
+	}
+
+	public String getFixedTelExtension() {
+		return fixedTelExtension;
+	}
+
+	public void setFixedTelExtension(String fixedTelExtension) {
+		this.fixedTelExtension = fixedTelExtension;
+	}
+
+	public String getWorkUnit() {
+		return workUnit;
+	}
+
+	public void setWorkUnit(String workUnit) {
+		this.workUnit = workUnit;
+	}
+	
 }

+ 312 - 0
src/main/java/com/goafanti/common/utils/HttpUtils.java

@@ -0,0 +1,312 @@
+package com.goafanti.common.utils;
+
+import java.io.UnsupportedEncodingException;
+import java.net.URLEncoder;
+import java.security.KeyManagementException;
+import java.security.NoSuchAlgorithmException;
+import java.security.cert.X509Certificate;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+import javax.net.ssl.SSLContext;
+import javax.net.ssl.TrustManager;
+import javax.net.ssl.X509TrustManager;
+
+import org.apache.commons.lang.StringUtils;
+import org.apache.http.HttpResponse;
+import org.apache.http.NameValuePair;
+import org.apache.http.client.HttpClient;
+import org.apache.http.client.entity.UrlEncodedFormEntity;
+import org.apache.http.client.methods.HttpDelete;
+import org.apache.http.client.methods.HttpGet;
+import org.apache.http.client.methods.HttpPost;
+import org.apache.http.client.methods.HttpPut;
+import org.apache.http.conn.ClientConnectionManager;
+import org.apache.http.conn.scheme.Scheme;
+import org.apache.http.conn.scheme.SchemeRegistry;
+import org.apache.http.conn.ssl.SSLSocketFactory;
+import org.apache.http.entity.ByteArrayEntity;
+import org.apache.http.entity.StringEntity;
+import org.apache.http.impl.client.DefaultHttpClient;
+import org.apache.http.message.BasicNameValuePair;
+
+public class HttpUtils {
+	
+	/**
+	 * get
+	 * 
+	 * @param host
+	 * @param path
+	 * @param method
+	 * @param headers
+	 * @param querys
+	 * @return
+	 * @throws Exception
+	 */
+	public static HttpResponse doGet(String host, String path, String method, 
+			Map<String, String> headers, 
+			Map<String, String> querys)
+            throws Exception {    	
+    	HttpClient httpClient = wrapClient(host);
+
+    	HttpGet request = new HttpGet(buildUrl(host, path, querys));
+        for (Map.Entry<String, String> e : headers.entrySet()) {
+        	request.addHeader(e.getKey(), e.getValue());
+        }
+        
+        return httpClient.execute(request);
+    }
+	
+	/**
+	 * post form
+	 * 
+	 * @param host
+	 * @param path
+	 * @param method
+	 * @param headers
+	 * @param querys
+	 * @param bodys
+	 * @return
+	 * @throws Exception
+	 */
+	public static HttpResponse doPost(String host, String path, String method, 
+			Map<String, String> headers, 
+			Map<String, String> querys, 
+			Map<String, String> bodys)
+            throws Exception {    	
+    	HttpClient httpClient = wrapClient(host);
+
+    	HttpPost request = new HttpPost(buildUrl(host, path, querys));
+        for (Map.Entry<String, String> e : headers.entrySet()) {
+        	request.addHeader(e.getKey(), e.getValue());
+        }
+
+        if (bodys != null) {
+            List<NameValuePair> nameValuePairList = new ArrayList<NameValuePair>();
+
+            for (String key : bodys.keySet()) {
+                nameValuePairList.add(new BasicNameValuePair(key, bodys.get(key)));
+            }
+            UrlEncodedFormEntity formEntity = new UrlEncodedFormEntity(nameValuePairList, "utf-8");
+            formEntity.setContentType("application/x-www-form-urlencoded; charset=UTF-8");
+            request.setEntity(formEntity);
+        }
+
+        return httpClient.execute(request);
+    }	
+	
+	/**
+	 * Post String
+	 * 
+	 * @param host
+	 * @param path
+	 * @param method
+	 * @param headers
+	 * @param querys
+	 * @param body
+	 * @return
+	 * @throws Exception
+	 */
+	public static HttpResponse doPost(String host, String path, String method, 
+			Map<String, String> headers, 
+			Map<String, String> querys, 
+			String body)
+            throws Exception {    	
+    	HttpClient httpClient = wrapClient(host);
+
+    	HttpPost request = new HttpPost(buildUrl(host, path, querys));
+        for (Map.Entry<String, String> e : headers.entrySet()) {
+        	request.addHeader(e.getKey(), e.getValue());
+        }
+
+        if (StringUtils.isNotBlank(body)) {
+        	request.setEntity(new StringEntity(body, "utf-8"));
+        }
+
+        return httpClient.execute(request);
+    }
+	
+	/**
+	 * Post stream
+	 * 
+	 * @param host
+	 * @param path
+	 * @param method
+	 * @param headers
+	 * @param querys
+	 * @param body
+	 * @return
+	 * @throws Exception
+	 */
+	public static HttpResponse doPost(String host, String path, String method, 
+			Map<String, String> headers, 
+			Map<String, String> querys, 
+			byte[] body)
+            throws Exception {    	
+    	HttpClient httpClient = wrapClient(host);
+
+    	HttpPost request = new HttpPost(buildUrl(host, path, querys));
+        for (Map.Entry<String, String> e : headers.entrySet()) {
+        	request.addHeader(e.getKey(), e.getValue());
+        }
+
+        if (body != null) {
+        	request.setEntity(new ByteArrayEntity(body));
+        }
+
+        return httpClient.execute(request);
+    }
+	
+	/**
+	 * Put String
+	 * @param host
+	 * @param path
+	 * @param method
+	 * @param headers
+	 * @param querys
+	 * @param body
+	 * @return
+	 * @throws Exception
+	 */
+	public static HttpResponse doPut(String host, String path, String method, 
+			Map<String, String> headers, 
+			Map<String, String> querys, 
+			String body)
+            throws Exception {    	
+    	HttpClient httpClient = wrapClient(host);
+
+    	HttpPut request = new HttpPut(buildUrl(host, path, querys));
+        for (Map.Entry<String, String> e : headers.entrySet()) {
+        	request.addHeader(e.getKey(), e.getValue());
+        }
+
+        if (StringUtils.isNotBlank(body)) {
+        	request.setEntity(new StringEntity(body, "utf-8"));
+        }
+
+        return httpClient.execute(request);
+    }
+	
+	/**
+	 * Put stream
+	 * @param host
+	 * @param path
+	 * @param method
+	 * @param headers
+	 * @param querys
+	 * @param body
+	 * @return
+	 * @throws Exception
+	 */
+	public static HttpResponse doPut(String host, String path, String method, 
+			Map<String, String> headers, 
+			Map<String, String> querys, 
+			byte[] body)
+            throws Exception {    	
+    	HttpClient httpClient = wrapClient(host);
+
+    	HttpPut request = new HttpPut(buildUrl(host, path, querys));
+        for (Map.Entry<String, String> e : headers.entrySet()) {
+        	request.addHeader(e.getKey(), e.getValue());
+        }
+
+        if (body != null) {
+        	request.setEntity(new ByteArrayEntity(body));
+        }
+
+        return httpClient.execute(request);
+    }
+	
+	/**
+	 * Delete
+	 *  
+	 * @param host
+	 * @param path
+	 * @param method
+	 * @param headers
+	 * @param querys
+	 * @return
+	 * @throws Exception
+	 */
+	public static HttpResponse doDelete(String host, String path, String method, 
+			Map<String, String> headers, 
+			Map<String, String> querys)
+            throws Exception {    	
+    	HttpClient httpClient = wrapClient(host);
+
+    	HttpDelete request = new HttpDelete(buildUrl(host, path, querys));
+        for (Map.Entry<String, String> e : headers.entrySet()) {
+        	request.addHeader(e.getKey(), e.getValue());
+        }
+        
+        return httpClient.execute(request);
+    }
+	
+	private static String buildUrl(String host, String path, Map<String, String> querys) throws UnsupportedEncodingException {
+    	StringBuilder sbUrl = new StringBuilder();
+    	sbUrl.append(host);
+    	if (!StringUtils.isBlank(path)) {
+    		sbUrl.append(path);
+        }
+    	if (null != querys) {
+    		StringBuilder sbQuery = new StringBuilder();
+        	for (Map.Entry<String, String> query : querys.entrySet()) {
+        		if (0 < sbQuery.length()) {
+        			sbQuery.append("&");
+        		}
+        		if (StringUtils.isBlank(query.getKey()) && !StringUtils.isBlank(query.getValue())) {
+        			sbQuery.append(query.getValue());
+                }
+        		if (!StringUtils.isBlank(query.getKey())) {
+        			sbQuery.append(query.getKey());
+        			if (!StringUtils.isBlank(query.getValue())) {
+        				sbQuery.append("=");
+        				sbQuery.append(URLEncoder.encode(query.getValue(), "utf-8"));
+        			}        			
+                }
+        	}
+        	if (0 < sbQuery.length()) {
+        		sbUrl.append("?").append(sbQuery);
+        	}
+        }
+    	
+    	return sbUrl.toString();
+    }
+	
+	private static HttpClient wrapClient(String host) {
+		HttpClient httpClient = new DefaultHttpClient();
+		if (host.startsWith("https://")) {
+			sslClient(httpClient);
+		}
+		
+		return httpClient;
+	}
+	
+	private static void sslClient(HttpClient httpClient) {
+        try {
+            SSLContext ctx = SSLContext.getInstance("TLS");
+            X509TrustManager tm = new X509TrustManager() {
+                public X509Certificate[] getAcceptedIssuers() {
+                    return null;
+                }
+                public void checkClientTrusted(X509Certificate[] xcs, String str) {
+                	
+                }
+                public void checkServerTrusted(X509Certificate[] xcs, String str) {
+                	
+                }
+            };
+            ctx.init(null, new TrustManager[] { tm }, null);
+            SSLSocketFactory ssf = new SSLSocketFactory(ctx);
+            ssf.setHostnameVerifier(SSLSocketFactory.ALLOW_ALL_HOSTNAME_VERIFIER);
+            ClientConnectionManager ccm = httpClient.getConnectionManager();
+            SchemeRegistry registry = ccm.getSchemeRegistry();
+            registry.register(new Scheme("https", 443, ssf));
+        } catch (KeyManagementException ex) {
+            throw new RuntimeException(ex);
+        } catch (NoSuchAlgorithmException ex) {
+        	throw new RuntimeException(ex);
+        }
+	}
+}

+ 357 - 327
src/main/java/com/goafanti/common/utils/VerifyCodeUtils.java

@@ -1,327 +1,357 @@
-package com.goafanti.common.utils;
-
-import java.awt.Color;
-import java.awt.Font;
-import java.awt.Graphics;
-import java.awt.Graphics2D;
-import java.awt.RenderingHints;
-import java.awt.geom.AffineTransform;
-import java.awt.image.BufferedImage;
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.OutputStream;
-import java.util.Arrays;
-import java.util.Random;
-
-import javax.imageio.ImageIO;
-
-import com.goafanti.core.shiro.token.TokenManager;
-
-public class VerifyCodeUtils {
-
-	// 使用到Algerian字体,系统里没有的话需要安装字体,字体只显示大写,去掉了1,0,i,o几个容易混淆的字符
-	public static final String VERIFY_CODES = "23456789ABCDEFGHJKLMNPQRSTUVWXYZ";
-	// 验证码的Key
-	public static final String V_CODE = "_CODE";
-	private static Random random = new Random();
-
-	/**
-	 * 验证码对象
-	 * 
-	 */
-	public static class Verify {
-
-		private String code;// 如 1 + 2
-
-		private Integer value;// 如 3
-
-		public String getCode() {
-			return code;
-		}
-
-		public void setCode(String code) {
-			this.code = code;
-		}
-
-		public Integer getValue() {
-			return value;
-		}
-
-		public void setValue(Integer value) {
-			this.value = value;
-		}
-	}
-
-	/**
-	 * 使用系统默认字符源生成验证码
-	 * 
-	 * @param verifySize
-	 *            验证码长度
-	 * @return
-	 */
-	public static Verify generateVerify() {
-		int number1 = new Random().nextInt(10) + 1;
-		int number2 = new Random().nextInt(10) + 1;
-		Verify entity = new Verify();
-		entity.setCode(number1 + " x " + number2);
-		entity.setValue(number1 + number2);
-		return entity;
-	}
-
-	/**
-	 * 使用系统默认字符源生成验证码
-	 * 
-	 * @param verifySize
-	 *            验证码长度
-	 * @return
-	 */
-	public static String generateVerifyCode(int verifySize) {
-		return generateVerifyCode(verifySize, VERIFY_CODES);
-	}
-
-	/**
-	 * 清除验证码
-	 */
-	public static void clearVerifyCode() {
-		TokenManager.getSession().removeAttribute(V_CODE);
-	}
-
-	/**
-	 * 对比验证码
-	 */
-	public static boolean verifyCode(String code) {
-		String v = (String) TokenManager.getVal2Session(V_CODE);
-		return StringUtils.equals(v, StringUtils.lowerCase(code));
-	}
-
-	/**
-	 * 使用指定源生成验证码
-	 * 
-	 * @param verifySize
-	 *            验证码长度
-	 * @param sources
-	 *            验证码字符源
-	 * @return
-	 */
-	public static String generateVerifyCode(int verifySize, String sources) {
-		if (sources == null || sources.length() == 0) {
-			sources = VERIFY_CODES;
-		}
-		int codesLen = sources.length();
-		Random rand = new Random(System.currentTimeMillis());
-		StringBuilder verifyCode = new StringBuilder(verifySize);
-		for (int i = 0; i < verifySize; i++) {
-			verifyCode.append(sources.charAt(rand.nextInt(codesLen - 1)));
-		}
-		return verifyCode.toString();
-	}
-
-	/**
-	 * 生成随机验证码文件,并返回验证码值
-	 * 
-	 * @param w
-	 * @param h
-	 * @param outputFile
-	 * @param verifySize
-	 * @return
-	 * @throws IOException
-	 */
-	public static String outputVerifyImage(int w, int h, File outputFile, int verifySize) throws IOException {
-		String verifyCode = generateVerifyCode(verifySize);
-		outputImage(w, h, outputFile, verifyCode);
-		return verifyCode;
-	}
-
-	/**
-	 * 输出随机验证码图片流,并返回验证码值
-	 * 
-	 * @param w
-	 * @param h
-	 * @param os
-	 * @param verifySize
-	 * @return
-	 * @throws IOException
-	 */
-	public static String outputVerifyImage(int w, int h, OutputStream os, int verifySize) throws IOException {
-		String verifyCode = generateVerifyCode(verifySize);
-		outputImage(w, h, os, verifyCode);
-		return verifyCode;
-	}
-
-	/**
-	 * 生成指定验证码图像文件
-	 * 
-	 * @param w
-	 * @param h
-	 * @param outputFile
-	 * @param code
-	 * @throws IOException
-	 */
-	public static void outputImage(int w, int h, File outputFile, String code) throws IOException {
-		if (outputFile == null) {
-			return;
-		}
-		File dir = outputFile.getParentFile();
-		if (!dir.exists()) {
-			dir.mkdirs();
-		}
-		try {
-			outputFile.createNewFile();
-			FileOutputStream fos = new FileOutputStream(outputFile);
-			outputImage(w, h, fos, code);
-			fos.close();
-		} catch (IOException e) {
-			throw e;
-		}
-	}
-
-	/**
-	 * 输出指定验证码图片流
-	 * 
-	 * @param w
-	 * @param h
-	 * @param os
-	 * @param code
-	 * @throws IOException
-	 */
-	public static void outputImage(int w, int h, OutputStream os, String code) throws IOException {
-		int verifySize = code.length();
-		BufferedImage image = new BufferedImage(w, h, BufferedImage.TYPE_INT_RGB);
-		Random rand = new Random();
-		Graphics2D g2 = image.createGraphics();
-		g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
-		Color[] colors = new Color[5];
-		Color[] colorSpaces = new Color[] { Color.WHITE, Color.CYAN, Color.GRAY, Color.LIGHT_GRAY, Color.MAGENTA,
-				Color.ORANGE, Color.PINK, Color.YELLOW };
-		float[] fractions = new float[colors.length];
-		for (int i = 0; i < colors.length; i++) {
-			colors[i] = colorSpaces[rand.nextInt(colorSpaces.length)];
-			fractions[i] = rand.nextFloat();
-		}
-		Arrays.sort(fractions);
-
-		g2.setColor(Color.GRAY);// 设置边框色
-		g2.fillRect(0, 0, w, h);
-
-		Color c = getRandColor(200, 250);
-		g2.setColor(c);// 设置背景色
-		g2.fillRect(0, 2, w, h - 4);
-
-		// 绘制干扰线
-		Random random = new Random();
-		g2.setColor(getRandColor(160, 200));// 设置线条的颜色
-		for (int i = 0; i < 20; i++) {
-			int x = random.nextInt(w - 1);
-			int y = random.nextInt(h - 1);
-			int xl = random.nextInt(6) + 1;
-			int yl = random.nextInt(12) + 1;
-			g2.drawLine(x, y, x + xl + 40, y + yl + 20);
-		}
-
-		// 添加噪点
-		float yawpRate = 0.05f;// 噪声率
-		int area = (int) (yawpRate * w * h);
-		for (int i = 0; i < area; i++) {
-			int x = random.nextInt(w);
-			int y = random.nextInt(h);
-			int rgb = getRandomIntColor();
-			image.setRGB(x, y, rgb);
-		}
-
-		shear(g2, w, h, c);// 使图片扭曲
-
-		g2.setColor(getRandColor(100, 160));
-		int fontSize = h - 4;
-		Font font = new Font("Algerian", Font.ITALIC, fontSize);
-		g2.setFont(font);
-		char[] chars = code.toCharArray();
-		for (int i = 0; i < verifySize; i++) {
-			AffineTransform affine = new AffineTransform();
-			affine.setToRotation(Math.PI / 4 * rand.nextDouble() * (rand.nextBoolean() ? 1 : -1),
-					(w / verifySize) * i + fontSize / 2, h / 2);
-			g2.setTransform(affine);
-			g2.drawChars(chars, i, 1, ((w - 10) / verifySize) * i + 5, h / 2 + fontSize / 2 - 10);
-		}
-
-		g2.dispose();
-		ImageIO.write(image, "jpg", os);
-	}
-
-	private static Color getRandColor(int fc, int bc) {
-		if (fc > 255)
-			fc = 255;
-		if (bc > 255)
-			bc = 255;
-		int r = fc + random.nextInt(bc - fc);
-		int g = fc + random.nextInt(bc - fc);
-		int b = fc + random.nextInt(bc - fc);
-		return new Color(r, g, b);
-	}
-
-	private static int getRandomIntColor() {
-		int[] rgb = getRandomRgb();
-		int color = 0;
-		for (int c : rgb) {
-			color = color << 8;
-			color = color | c;
-		}
-		return color;
-	}
-
-	private static int[] getRandomRgb() {
-		int[] rgb = new int[3];
-		for (int i = 0; i < 3; i++) {
-			rgb[i] = random.nextInt(255);
-		}
-		return rgb;
-	}
-
-	private static void shear(Graphics g, int w1, int h1, Color color) {
-		shearX(g, w1, h1, color);
-		shearY(g, w1, h1, color);
-	}
-
-	private static void shearX(Graphics g, int w1, int h1, Color color) {
-
-		int period = random.nextInt(2);
-
-		boolean borderGap = true;
-		int frames = 1;
-		int phase = random.nextInt(2);
-
-		for (int i = 0; i < h1; i++) {
-			double d = (double) (period >> 1)
-					* Math.sin((double) i / (double) period + (6.2831853071795862D * (double) phase) / (double) frames);
-			g.copyArea(0, i, w1, 1, (int) d, 0);
-			if (borderGap) {
-				g.setColor(color);
-				g.drawLine((int) d, i, 0, i);
-				g.drawLine((int) d + w1, i, w1, i);
-			}
-		}
-
-	}
-
-	private static void shearY(Graphics g, int w1, int h1, Color color) {
-
-		int period = random.nextInt(40) + 10; // 50;
-
-		boolean borderGap = true;
-		int frames = 20;
-		int phase = 7;
-		for (int i = 0; i < w1; i++) {
-			double d = (double) (period >> 1)
-					* Math.sin((double) i / (double) period + (6.2831853071795862D * (double) phase) / (double) frames);
-			g.copyArea(i, 0, 1, h1, 0, (int) d);
-			if (borderGap) {
-				g.setColor(color);
-				g.drawLine(i, (int) d, i, 0);
-				g.drawLine(i, (int) d + h1, i, h1);
-			}
-
-		}
-
-	}
-
-}
+package com.goafanti.common.utils;
+
+import java.awt.Color;
+import java.awt.Font;
+import java.awt.Graphics;
+import java.awt.Graphics2D;
+import java.awt.RenderingHints;
+import java.awt.geom.AffineTransform;
+import java.awt.image.BufferedImage;
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.OutputStream;
+import java.util.Arrays;
+import java.util.Random;
+
+import javax.imageio.ImageIO;
+
+import com.goafanti.core.shiro.token.TokenManager;
+
+public class VerifyCodeUtils {
+
+	// 使用到Algerian字体,系统里没有的话需要安装字体,字体只显示大写,去掉了1,0,i,o几个容易混淆的字符
+	public static final String VERIFY_CODES = "23456789ABCDEFGHJKLMNPQRSTUVWXYZ";
+	// 验证码的Key
+	public static final String V_CODE = "_CODE";
+	
+	//手机验证码
+	public static final String M_VERIFY_CODES = "23456789";
+	//手机验证码Key
+	public static final String 	M_CODE = "M_CODE";
+	//手机验证码生成时间
+	public static final String M_CODE_TIME = "M_CODE_TIME";
+	
+	private static Random random = new Random();
+
+	/**
+	 * 验证码对象
+	 * 
+	 */
+	public static class Verify {
+
+		private String code;// 如 1 + 2
+
+		private Integer value;// 如 3
+
+		public String getCode() {
+			return code;
+		}
+
+		public void setCode(String code) {
+			this.code = code;
+		}
+
+		public Integer getValue() {
+			return value;
+		}
+
+		public void setValue(Integer value) {
+			this.value = value;
+		}
+	}
+
+	/**
+	 * 使用系统默认字符源生成验证码
+	 * 
+	 * @param verifySize
+	 *            验证码长度
+	 * @return
+	 */
+	public static Verify generateVerify() {
+		int number1 = new Random().nextInt(10) + 1;
+		int number2 = new Random().nextInt(10) + 1;
+		Verify entity = new Verify();
+		entity.setCode(number1 + " x " + number2);
+		entity.setValue(number1 + number2);
+		return entity;
+	}
+
+	/**
+	 * 使用系统默认字符源生成验证码
+	 * 
+	 * @param verifySize
+	 *            验证码长度
+	 * @return
+	 */
+	public static String generateVerifyCode(int verifySize) {
+		return generateVerifyCode(verifySize, VERIFY_CODES);
+	}
+	
+	/**
+	 * 手机验证码
+	 * @param verifySize
+	 * @return
+	 */
+	public static String generateMobileVerifyCode(int verifySize) {
+		return generateMobileVerifyCode(verifySize, M_VERIFY_CODES);
+	}
+
+	private static String generateMobileVerifyCode(int verifySize, String sources) {
+		if (sources == null || sources.length() == 0) {
+			sources = M_VERIFY_CODES;
+		}
+		int codesLen = sources.length();
+		Random rand = new Random(System.currentTimeMillis());
+		StringBuilder verifyCode = new StringBuilder(verifySize);
+		for (int i = 0; i < verifySize; i++) {
+			verifyCode.append(sources.charAt(rand.nextInt(codesLen - 1)));
+		}
+		return verifyCode.toString();
+	}
+
+	/**
+	 * 清除验证码
+	 */
+	public static void clearVerifyCode() {
+		TokenManager.getSession().removeAttribute(V_CODE);
+	}
+
+	/**
+	 * 对比验证码
+	 */
+	public static boolean verifyCode(String code) {
+		String v = (String) TokenManager.getVal2Session(V_CODE);
+		return StringUtils.equals(v, StringUtils.lowerCase(code));
+	}
+
+	/**
+	 * 使用指定源生成验证码
+	 * 
+	 * @param verifySize
+	 *            验证码长度
+	 * @param sources
+	 *            验证码字符源
+	 * @return
+	 */
+	public static String generateVerifyCode(int verifySize, String sources) {
+		if (sources == null || sources.length() == 0) {
+			sources = VERIFY_CODES;
+		}
+		int codesLen = sources.length();
+		Random rand = new Random(System.currentTimeMillis());
+		StringBuilder verifyCode = new StringBuilder(verifySize);
+		for (int i = 0; i < verifySize; i++) {
+			verifyCode.append(sources.charAt(rand.nextInt(codesLen - 1)));
+		}
+		return verifyCode.toString();
+	}
+
+	/**
+	 * 生成随机验证码文件,并返回验证码值
+	 * 
+	 * @param w
+	 * @param h
+	 * @param outputFile
+	 * @param verifySize
+	 * @return
+	 * @throws IOException
+	 */
+	public static String outputVerifyImage(int w, int h, File outputFile, int verifySize) throws IOException {
+		String verifyCode = generateVerifyCode(verifySize);
+		outputImage(w, h, outputFile, verifyCode);
+		return verifyCode;
+	}
+
+	/**
+	 * 输出随机验证码图片流,并返回验证码值
+	 * 
+	 * @param w
+	 * @param h
+	 * @param os
+	 * @param verifySize
+	 * @return
+	 * @throws IOException
+	 */
+	public static String outputVerifyImage(int w, int h, OutputStream os, int verifySize) throws IOException {
+		String verifyCode = generateVerifyCode(verifySize);
+		outputImage(w, h, os, verifyCode);
+		return verifyCode;
+	}
+
+	/**
+	 * 生成指定验证码图像文件
+	 * 
+	 * @param w
+	 * @param h
+	 * @param outputFile
+	 * @param code
+	 * @throws IOException
+	 */
+	public static void outputImage(int w, int h, File outputFile, String code) throws IOException {
+		if (outputFile == null) {
+			return;
+		}
+		File dir = outputFile.getParentFile();
+		if (!dir.exists()) {
+			dir.mkdirs();
+		}
+		try {
+			outputFile.createNewFile();
+			FileOutputStream fos = new FileOutputStream(outputFile);
+			outputImage(w, h, fos, code);
+			fos.close();
+		} catch (IOException e) {
+			throw e;
+		}
+	}
+
+	/**
+	 * 输出指定验证码图片流
+	 * 
+	 * @param w
+	 * @param h
+	 * @param os
+	 * @param code
+	 * @throws IOException
+	 */
+	public static void outputImage(int w, int h, OutputStream os, String code) throws IOException {
+		int verifySize = code.length();
+		BufferedImage image = new BufferedImage(w, h, BufferedImage.TYPE_INT_RGB);
+		Random rand = new Random();
+		Graphics2D g2 = image.createGraphics();
+		g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
+		Color[] colors = new Color[5];
+		Color[] colorSpaces = new Color[] { Color.WHITE, Color.CYAN, Color.GRAY, Color.LIGHT_GRAY, Color.MAGENTA,
+				Color.ORANGE, Color.PINK, Color.YELLOW };
+		float[] fractions = new float[colors.length];
+		for (int i = 0; i < colors.length; i++) {
+			colors[i] = colorSpaces[rand.nextInt(colorSpaces.length)];
+			fractions[i] = rand.nextFloat();
+		}
+		Arrays.sort(fractions);
+
+		g2.setColor(Color.GRAY);// 设置边框色
+		g2.fillRect(0, 0, w, h);
+
+		Color c = getRandColor(200, 250);
+		g2.setColor(c);// 设置背景色
+		g2.fillRect(0, 2, w, h - 4);
+
+		// 绘制干扰线
+		Random random = new Random();
+		g2.setColor(getRandColor(160, 200));// 设置线条的颜色
+		for (int i = 0; i < 20; i++) {
+			int x = random.nextInt(w - 1);
+			int y = random.nextInt(h - 1);
+			int xl = random.nextInt(6) + 1;
+			int yl = random.nextInt(12) + 1;
+			g2.drawLine(x, y, x + xl + 40, y + yl + 20);
+		}
+
+		// 添加噪点
+		float yawpRate = 0.05f;// 噪声率
+		int area = (int) (yawpRate * w * h);
+		for (int i = 0; i < area; i++) {
+			int x = random.nextInt(w);
+			int y = random.nextInt(h);
+			int rgb = getRandomIntColor();
+			image.setRGB(x, y, rgb);
+		}
+
+		shear(g2, w, h, c);// 使图片扭曲
+
+		g2.setColor(getRandColor(100, 160));
+		int fontSize = h - 4;
+		Font font = new Font("Algerian", Font.ITALIC, fontSize);
+		g2.setFont(font);
+		char[] chars = code.toCharArray();
+		for (int i = 0; i < verifySize; i++) {
+			AffineTransform affine = new AffineTransform();
+			affine.setToRotation(Math.PI / 4 * rand.nextDouble() * (rand.nextBoolean() ? 1 : -1),
+					(w / verifySize) * i + fontSize / 2, h / 2);
+			g2.setTransform(affine);
+			g2.drawChars(chars, i, 1, ((w - 10) / verifySize) * i + 5, h / 2 + fontSize / 2 - 10);
+		}
+
+		g2.dispose();
+		ImageIO.write(image, "jpg", os);
+	}
+
+	private static Color getRandColor(int fc, int bc) {
+		if (fc > 255)
+			fc = 255;
+		if (bc > 255)
+			bc = 255;
+		int r = fc + random.nextInt(bc - fc);
+		int g = fc + random.nextInt(bc - fc);
+		int b = fc + random.nextInt(bc - fc);
+		return new Color(r, g, b);
+	}
+
+	private static int getRandomIntColor() {
+		int[] rgb = getRandomRgb();
+		int color = 0;
+		for (int c : rgb) {
+			color = color << 8;
+			color = color | c;
+		}
+		return color;
+	}
+
+	private static int[] getRandomRgb() {
+		int[] rgb = new int[3];
+		for (int i = 0; i < 3; i++) {
+			rgb[i] = random.nextInt(255);
+		}
+		return rgb;
+	}
+
+	private static void shear(Graphics g, int w1, int h1, Color color) {
+		shearX(g, w1, h1, color);
+		shearY(g, w1, h1, color);
+	}
+
+	private static void shearX(Graphics g, int w1, int h1, Color color) {
+
+		int period = random.nextInt(2);
+
+		boolean borderGap = true;
+		int frames = 1;
+		int phase = random.nextInt(2);
+
+		for (int i = 0; i < h1; i++) {
+			double d = (double) (period >> 1)
+					* Math.sin((double) i / (double) period + (6.2831853071795862D * (double) phase) / (double) frames);
+			g.copyArea(0, i, w1, 1, (int) d, 0);
+			if (borderGap) {
+				g.setColor(color);
+				g.drawLine((int) d, i, 0, i);
+				g.drawLine((int) d + w1, i, w1, i);
+			}
+		}
+
+	}
+
+	private static void shearY(Graphics g, int w1, int h1, Color color) {
+
+		int period = random.nextInt(40) + 10; // 50;
+
+		boolean borderGap = true;
+		int frames = 20;
+		int phase = 7;
+		for (int i = 0; i < w1; i++) {
+			double d = (double) (period >> 1)
+					* Math.sin((double) i / (double) period + (6.2831853071795862D * (double) phase) / (double) frames);
+			g.copyArea(i, 0, 1, h1, 0, (int) d);
+			if (borderGap) {
+				g.setColor(color);
+				g.drawLine(i, (int) d, i, 0);
+				g.drawLine(i, (int) d + h1, i, h1);
+			}
+
+		}
+
+	}
+
+}

+ 160 - 160
src/main/java/com/goafanti/core/shiro/token/TokenManager.java

@@ -1,160 +1,160 @@
-package com.goafanti.core.shiro.token;
-
-import java.util.List;
-
-import org.apache.shiro.SecurityUtils;
-import org.apache.shiro.session.Session;
-import org.apache.shiro.subject.SimplePrincipalCollection;
-
-import com.goafanti.common.model.User;
-import com.goafanti.common.utils.SpringContextUtils;
-import com.goafanti.core.shiro.session.CustomSessionManager;
-
-public class TokenManager {
-	// 用户登录管理
-	public static final UserRealm realm = SpringContextUtils.getBean("userRealm", UserRealm.class);
-	// 用户session管理
-	public static final CustomSessionManager customSessionManager = SpringContextUtils.getBean("customSessionManager",
-			CustomSessionManager.class);
-
-	/**
-	 * 获取当前登录的用户User对象
-	 * 
-	 * @return
-	 */
-	public static User getToken() {
-		User token = (User) SecurityUtils.getSubject().getPrincipal();
-		return token;
-	}
-
-	/**
-	 * 获取当前用户的Session
-	 * 
-	 * @return
-	 */
-	public static Session getSession() {
-		return SecurityUtils.getSubject().getSession();
-	}
-
-	/**
-	 * 获取当前用户ID
-	 * 
-	 * @return
-	 */
-	public static String getUserId() {
-		return getToken() == null ? null : getToken().getId();
-	}
-
-	/**
-	 * 获取当前用户WebSocketID
-	 * 
-	 * @return
-	 */
-	public static String getWebSocketKey() {
-		return (String) TokenManager.getSession().getId() + "|" + getUserId();
-	}
-
-	/**
-	 * 把值放入到当前登录用户的Session里
-	 * 
-	 * @param key
-	 * @param value
-	 */
-	public static void setVal2Session(Object key, Object value) {
-		getSession().setAttribute(key, value);
-	}
-
-	/**
-	 * 从当前登录用户的Session里取值
-	 * 
-	 * @param key
-	 * @return
-	 */
-	public static Object getVal2Session(Object key) {
-		return getSession().getAttribute(key);
-	}
-
-	/**
-	 * 获取验证码,获取一次后删除
-	 * 
-	 * @return
-	 */
-	public static String getYZM() {
-		String code = (String) getSession().getAttribute("CODE");
-		getSession().removeAttribute("CODE");
-		return code;
-	}
-
-	/**
-	 * 登录
-	 * 
-	 * @param user
-	 * @param rememberMe
-	 * @return
-	 */
-	public static User login(User user, Boolean rememberMe) {
-		ShiroToken token = new ShiroToken(user.getMobile(), user.getPassword());
-		token.setRememberMe(null == rememberMe ? false : rememberMe);
-		SecurityUtils.getSubject().login(token);
-		return getToken();
-	}
-
-	/**
-	 * 判断是否登录
-	 * 
-	 * @return
-	 */
-	public static boolean isLogin() {
-		return null != SecurityUtils.getSubject().getPrincipal();
-	}
-
-	/**
-	 * 退出登录
-	 */
-	public static void logout() {
-		SecurityUtils.getSubject().logout();
-	}
-
-	/**
-	 * 清空当前用户权限信息。 目的:为了在判断权限的时候,再次会再次
-	 * <code>doGetAuthorizationInfo(...)  </code>方法。 ps: 当然你可以手动调用
-	 * <code> doGetAuthorizationInfo(...)  </code>方法。
-	 * 这里只是说明下这个逻辑,当你清空了权限,<code> doGetAuthorizationInfo(...)  </code>就会被再次调用。
-	 */
-	public static void clearNowUserAuth() {
-		realm.clearCachedAuthorizationInfo();
-	}
-
-	/**
-	 * 根据UserIds 清空权限信息。
-	 * 
-	 * @param id
-	 *            用户ID
-	 */
-	public static void clearUserAuthByUserId(Long... userIds) {
-
-		if (null == userIds || userIds.length == 0)
-			return;
-		List<SimplePrincipalCollection> result = customSessionManager.getSimplePrincipalCollectionByUserId(userIds);
-
-		for (SimplePrincipalCollection simplePrincipalCollection : result) {
-			realm.clearCachedAuthorizationInfo(simplePrincipalCollection);
-		}
-	}
-
-	/**
-	 * 方法重载
-	 * 
-	 * @param userIds
-	 */
-	public static void clearUserAuthByUserId(List<Long> userIds) {
-		if (null == userIds || userIds.size() == 0) {
-			return;
-		}
-		clearUserAuthByUserId(userIds.toArray(new Long[0]));
-	}
-
-	// public static void forbidUser(Long userId) {
-	// customSessionManager.forbidUserById(userId, ShiroConstants.USER_DISABLE);
-	// }
-}
+package com.goafanti.core.shiro.token;
+
+import java.util.List;
+
+import org.apache.shiro.SecurityUtils;
+import org.apache.shiro.session.Session;
+import org.apache.shiro.subject.SimplePrincipalCollection;
+
+import com.goafanti.common.model.User;
+import com.goafanti.common.utils.SpringContextUtils;
+import com.goafanti.core.shiro.session.CustomSessionManager;
+
+public class TokenManager {
+	// 用户登录管理
+	public static final UserRealm realm = SpringContextUtils.getBean("userRealm", UserRealm.class);
+	// 用户session管理
+	public static final CustomSessionManager customSessionManager = SpringContextUtils.getBean("customSessionManager",
+			CustomSessionManager.class);
+
+	/**
+	 * 获取当前登录的用户User对象
+	 * 
+	 * @return
+	 */
+	public static User getToken() {
+		User token = (User) SecurityUtils.getSubject().getPrincipal();
+		return token;
+	}
+
+	/**
+	 * 获取当前用户的Session
+	 * 
+	 * @return
+	 */
+	public static Session getSession() {
+		return SecurityUtils.getSubject().getSession();
+	}
+
+	/**
+	 * 获取当前用户ID
+	 * 
+	 * @return
+	 */
+	public static String getUserId() {
+		return getToken() == null ? null : getToken().getId();
+	}
+
+	/**
+	 * 获取当前用户WebSocketID
+	 * 
+	 * @return
+	 */
+	public static String getWebSocketKey() {
+		return (String) TokenManager.getSession().getId() + "|" + getUserId();
+	}
+
+	/**
+	 * 把值放入到当前登录用户的Session里
+	 * 
+	 * @param key
+	 * @param value
+	 */
+	public static void setVal2Session(Object key, Object value) {
+		getSession().setAttribute(key, value);
+	}
+
+	/**
+	 * 从当前登录用户的Session里取值
+	 * 
+	 * @param key
+	 * @return
+	 */
+	public static Object getVal2Session(Object key) {
+		return getSession().getAttribute(key);
+	}
+
+	/**
+	 * 获取验证码,获取一次后删除
+	 * 
+	 * @return
+	 */
+	public static String getYZM() {
+		String code = (String) getSession().getAttribute("CODE");
+		getSession().removeAttribute("CODE");
+		return code;
+	}
+
+	/**
+	 * 登录
+	 * 
+	 * @param user
+	 * @param rememberMe
+	 * @return
+	 */
+	public static User login(User user, Boolean rememberMe) {
+		ShiroToken token = new ShiroToken(user.getMobile(), user.getPassword());
+		token.setRememberMe(null == rememberMe ? false : rememberMe);
+		SecurityUtils.getSubject().login(token);
+		return getToken();
+	}
+
+	/**
+	 * 判断是否登录
+	 * 
+	 * @return
+	 */
+	public static boolean isLogin() {
+		return null != SecurityUtils.getSubject().getPrincipal();
+	}
+
+	/**
+	 * 退出登录
+	 */
+	public static void logout() {
+		SecurityUtils.getSubject().logout();
+	}
+
+	/**
+	 * 清空当前用户权限信息。 目的:为了在判断权限的时候,再次会再次
+	 * <code>doGetAuthorizationInfo(...)  </code>方法。 ps: 当然你可以手动调用
+	 * <code> doGetAuthorizationInfo(...)  </code>方法。
+	 * 这里只是说明下这个逻辑,当你清空了权限,<code> doGetAuthorizationInfo(...)  </code>就会被再次调用。
+	 */
+	public static void clearNowUserAuth() {
+		realm.clearCachedAuthorizationInfo();
+	}
+
+	/**
+	 * 根据UserIds 清空权限信息。
+	 * 
+	 * @param id
+	 *            用户ID
+	 */
+	public static void clearUserAuthByUserId(Long... userIds) {
+
+		if (null == userIds || userIds.length == 0)
+			return;
+		List<SimplePrincipalCollection> result = customSessionManager.getSimplePrincipalCollectionByUserId(userIds);
+
+		for (SimplePrincipalCollection simplePrincipalCollection : result) {
+			realm.clearCachedAuthorizationInfo(simplePrincipalCollection);
+		}
+	}
+
+	/**
+	 * 方法重载
+	 * 
+	 * @param userIds
+	 */
+	public static void clearUserAuthByUserId(List<Long> userIds) {
+		if (null == userIds || userIds.size() == 0) {
+			return;
+		}
+		clearUserAuthByUserId(userIds.toArray(new Long[0]));
+	}
+
+	// public static void forbidUser(Long userId) {
+	// customSessionManager.forbidUserById(userId, ShiroConstants.USER_DISABLE);
+	// }
+}

+ 76 - 76
src/main/java/com/goafanti/core/shiro/token/UserRealm.java

@@ -1,76 +1,76 @@
-package com.goafanti.core.shiro.token;
-
-import org.apache.shiro.SecurityUtils;
-import org.apache.shiro.authc.AuthenticationException;
-import org.apache.shiro.authc.AuthenticationInfo;
-import org.apache.shiro.authc.AuthenticationToken;
-import org.apache.shiro.authz.AuthorizationInfo;
-import org.apache.shiro.realm.AuthorizingRealm;
-import org.apache.shiro.subject.PrincipalCollection;
-import org.apache.shiro.subject.SimplePrincipalCollection;
-
-public class UserRealm extends AuthorizingRealm {
-
-	public UserRealm() {
-		super();
-	}
-
-	/**
-	 * 认证信息,主要针对用户登录,
-	 */
-	protected AuthenticationInfo doGetAuthenticationInfo(AuthenticationToken authcToken)
-			throws AuthenticationException {
-
-//		ShiroToken token = (ShiroToken) authcToken;
-//		User user = userService.findUserByEmail(token.getUsername());
-//		if (null == user) {
-//			throw new UnknownAccountException();
-//		} else if (ShiroConstants.USER_DISABLE.equals(user.getStatus())) {
-//			/**
-//			 * 如果用户的status为禁用。那么就抛出<code>DisabledAccountException</code>
-//			 */
-//			throw new DisabledAccountException("帐号已经禁止登录!");
-//		} else {
-//			user.setLastLoginTime(new Date());
-//			userService.updateByPrimaryKeySelective(user);
-//			user.setRoomids(userService.selectRoomIdByUserId(user.getId()));
-//		}
-//		return new SimpleAuthenticationInfo(user, user.getPwd(), passwordUtil.getSalt(user), getName());
-		return null;
-	}
-
-	/**
-	 * 授权
-	 */
-	@Override
-	protected AuthorizationInfo doGetAuthorizationInfo(PrincipalCollection principals) {
-
-//		Long userId = TokenManager.getUserId();
-//		SimpleAuthorizationInfo info = new SimpleAuthorizationInfo();
-//		// 根据用户ID查询角色(role),放入到Authorization里。
-//		Set<String> roles = roleService.findRoleByUserId(userId);
-//		info.setRoles(roles);
-//		// 根据用户ID查询权限(permission),放入到Authorization里。
-//		Set<String> permissions = permissionService.findPermissionByUserId(userId);
-//		info.setStringPermissions(permissions);
-//		return info;
-		return null;
-	}
-
-	/**
-	 * 清空当前用户权限信息
-	 */
-	public void clearCachedAuthorizationInfo() {
-		PrincipalCollection principalCollection = SecurityUtils.getSubject().getPrincipals();
-		SimplePrincipalCollection principals = new SimplePrincipalCollection(principalCollection, getName());
-		super.clearCachedAuthorizationInfo(principals);
-	}
-
-	/**
-	 * 指定principalCollection 清除
-	 */
-	public void clearCachedAuthorizationInfo(PrincipalCollection principalCollection) {
-		SimplePrincipalCollection principals = new SimplePrincipalCollection(principalCollection, getName());
-		super.clearCachedAuthorizationInfo(principals);
-	}
-}
+package com.goafanti.core.shiro.token;
+
+import org.apache.shiro.SecurityUtils;
+import org.apache.shiro.authc.AuthenticationException;
+import org.apache.shiro.authc.AuthenticationInfo;
+import org.apache.shiro.authc.AuthenticationToken;
+import org.apache.shiro.authc.UnknownAccountException;
+import org.apache.shiro.authz.AuthorizationInfo;
+import org.apache.shiro.realm.AuthorizingRealm;
+import org.apache.shiro.subject.PrincipalCollection;
+import org.apache.shiro.subject.SimplePrincipalCollection;
+
+public class UserRealm extends AuthorizingRealm {
+
+	public UserRealm() {
+		super();
+	}
+
+	/**
+	 * 认证信息,主要针对用户登录,
+	 */
+	protected AuthenticationInfo doGetAuthenticationInfo(AuthenticationToken authcToken)
+			throws AuthenticationException {
+
+		ShiroToken token = (ShiroToken) authcToken;
+//		User user = userService.findUserByEmail(token.getUsername());
+//		if (null == user) {
+//			throw new UnknownAccountException();
+//		} else if (ShiroConstants.USER_DISABLE.equals(user.getStatus())) {
+//			/**
+//			 * 如果用户的status为禁用。那么就抛出<code>DisabledAccountException</code>
+//			 */
+//			throw new DisabledAccountException("帐号已经禁止登录!");
+//		} else {
+//			user.setLastLoginTime(new Date());
+//			userService.updateByPrimaryKeySelective(user);
+//		}
+//		return new SimpleAuthenticationInfo(user, user.getPwd(), passwordUtil.getSalt(user), getName());
+		return null;
+	}
+
+	/**
+	 * 授权
+	 */
+	@Override
+	protected AuthorizationInfo doGetAuthorizationInfo(PrincipalCollection principals) {
+
+//		Long userId = TokenManager.getUserId();
+//		SimpleAuthorizationInfo info = new SimpleAuthorizationInfo();
+//		// 根据用户ID查询角色(role),放入到Authorization里。
+//		Set<String> roles = roleService.findRoleByUserId(userId);
+//		info.setRoles(roles);
+//		// 根据用户ID查询权限(permission),放入到Authorization里。
+//		Set<String> permissions = permissionService.findPermissionByUserId(userId);
+//		info.setStringPermissions(permissions);
+//		return info;
+		return null;
+	}
+
+	/**
+	 * 清空当前用户权限信息
+	 */
+	public void clearCachedAuthorizationInfo() {
+		PrincipalCollection principalCollection = SecurityUtils.getSubject().getPrincipals();
+		SimplePrincipalCollection principals = new SimplePrincipalCollection(principalCollection, getName());
+		super.clearCachedAuthorizationInfo(principals);
+	}
+
+	/**
+	 * 指定principalCollection 清除
+	 */
+	public void clearCachedAuthorizationInfo(PrincipalCollection principalCollection) {
+		SimplePrincipalCollection principals = new SimplePrincipalCollection(principalCollection, getName());
+		super.clearCachedAuthorizationInfo(principals);
+	}
+}

+ 2 - 0
src/main/java/com/goafanti/user/bo/OrgIdentityBo.java

@@ -11,6 +11,8 @@ public class OrgIdentityBo extends OrganizationIdentity{@Size(min = 0, max = 127
 		+ ErrorConstants.EMAIL_PATTERN_ERROR + "}")
 	private String email;
 
+    
+
 	public String getEmail() {
 		return email;
 	}

+ 24 - 0
src/main/java/com/goafanti/user/bo/OrgProBo.java

@@ -0,0 +1,24 @@
+package com.goafanti.user.bo;
+
+import com.goafanti.common.model.OrganizationInfo;
+import com.goafanti.common.model.OrganizationProperties;
+
+public class OrgProBo {
+      private OrganizationInfo info;
+      private OrganizationProperties pro;
+      
+	public OrganizationInfo getInfo() {
+		return info;
+	}
+	public void setInfo(OrganizationInfo info) {
+		this.info = info;
+	}
+	public OrganizationProperties getPro() {
+		return pro;
+	}
+	public void setPro(OrganizationProperties pro) {
+		this.pro = pro;
+	}
+      
+      
+}

+ 2 - 0
src/main/java/com/goafanti/user/bo/UserIdentityBo.java

@@ -5,6 +5,8 @@ import com.goafanti.common.model.UserIdentity;
 public class UserIdentityBo extends UserIdentity{
 	private Long number;
 	private String mobile;
+	
+	
 	public Long getNumber() {
 		return number;
 	}

+ 1 - 0
src/main/java/com/goafanti/user/bo/UserInfoBo.java

@@ -8,6 +8,7 @@ import com.goafanti.common.model.UserInfo;
 
 
 public class UserInfoBo extends UserInfo{
+	
 	private String nickname;
 	
 	@Size(min = 0, max = 127, message = "{" + ErrorConstants.EMAIL_SIZE_ERROR + "}")

+ 61 - 44
src/main/java/com/goafanti/user/controller/UserApiController.java

@@ -7,7 +7,6 @@ import java.util.UUID;
 
 import javax.annotation.Resource;
 import javax.servlet.http.HttpServletRequest;
-import javax.validation.Valid;
 
 import org.springframework.stereotype.Controller;
 import org.springframework.validation.BindingResult;
@@ -20,6 +19,7 @@ import com.goafanti.common.constant.ErrorConstants;
 import com.goafanti.common.controller.BaseApiController;
 import com.goafanti.common.model.OrganizationIdentity;
 import com.goafanti.common.model.OrganizationInfo;
+import com.goafanti.common.model.OrganizationProperties;
 import com.goafanti.common.model.OrganizationTech;
 import com.goafanti.common.model.User;
 import com.goafanti.common.model.UserAbility;
@@ -31,11 +31,13 @@ import com.goafanti.common.utils.LoggerUtils;
 import com.goafanti.common.utils.PasswordUtil;
 import com.goafanti.core.shiro.token.TokenManager;
 import com.goafanti.user.bo.OrgIdentityBo;
+import com.goafanti.user.bo.OrgProBo;
 import com.goafanti.user.bo.UidAndTypeBo;
 import com.goafanti.user.bo.UserIdentityBo;
 import com.goafanti.user.bo.UserInfoBo;
 import com.goafanti.user.service.OrganizationIdentityService;
 import com.goafanti.user.service.OrganizationInfoService;
+import com.goafanti.user.service.OrganizationPropertiesService;
 import com.goafanti.user.service.OrganizationTechService;
 import com.goafanti.user.service.UserAbilityService;
 import com.goafanti.user.service.UserCareerService;
@@ -70,6 +72,8 @@ public class UserApiController extends BaseApiController {
 	private OrganizationInfoService organizationInfoService;
 	@Resource
 	private OrganizationTechService organizationTechService;
+	@Resource
+	private OrganizationPropertiesService organizationPropertiesService;
 	
 	@RequestMapping(value = "/pwd", method = RequestMethod.POST)
 	public Result updatePwd(String password, String newPassword) {
@@ -77,6 +81,10 @@ public class UserApiController extends BaseApiController {
 		if (password == null || newPassword == null) {
 			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "必须指定", "密码"));
 		}
+		if (password.equals(newPassword)){
+			res.getError().add(buildError(ErrorConstants.PWD_SAME_ERROR,"新密码必须与原密码不同!"));
+		}
+		
 		if (res.getError().isEmpty() && TokenManager.isLogin()) {
 			User u = new User();
 			User user = userService.selectByPrimaryKey(TokenManager.getUserId());
@@ -95,12 +103,12 @@ public class UserApiController extends BaseApiController {
 	
 	/**
 	 * 个人会员基本信息
-	 * @param userIdentityBo
+	 * @param userIdentity
 	 * @param bindingResult
 	 * @return
 	 */
-	@RequestMapping(value = "/basicinfo", method = RequestMethod.POST)
-	public Result basicInfo(@Valid UserIdentityBo userIdentityBo,BindingResult bindingResult){
+	@RequestMapping(value = "/userIndentity", method = RequestMethod.POST)
+	public Result basicInfo(UserIdentity userIdentity,BindingResult bindingResult){
 		Result res = new Result();
 		if (bindingResult.hasErrors()) {
 			res.getError().add(buildErrorByMsg(bindingResult.getFieldError().getDefaultMessage(),
@@ -108,14 +116,7 @@ public class UserApiController extends BaseApiController {
 			return res;
 		}
 		if(res.getError().isEmpty()){
-			UserIdentity userIdentity = new UserIdentity();
 			UserIdentity identity= userIdentityService.selectUserIdentityByUserId(TokenManager.getUserId());
-			userIdentity.setUsername(userIdentityBo.getUsername());
-			userIdentity.setIdNumber(userIdentityBo.getIdNumber());
-			userIdentity.setSex(userIdentityBo.getSex());
-			userIdentity.setDateOfBirth(userIdentityBo.getDateOfBirth());
-			userIdentity.setPositiveId(userIdentityBo.getPositiveId());
-			userIdentity.setOppositeId(userIdentityBo.getOppositeId());
 			if(identity == null){
 				userIdentity.setId(UUID.randomUUID().toString());
 				userIdentity.setUid(TokenManager.getUserId());
@@ -125,16 +126,11 @@ public class UserApiController extends BaseApiController {
 				userIdentityService.updateByPrimaryKeySelective(userIdentity);
 			}
 		}
-		res.setData(userIdentityBo);
+		res.setData(userIdentity);
 		return res;
 	}
 	
-	/**
-	 * 个人资料
-	 * @param userInfoBo
-	 * @param bindingResult
-	 * @return
-	 */
+	
 	@RequestMapping(value = "/avatar/upload", method = RequestMethod.POST)
 	public Result avatar(HttpServletRequest req) {
 		Result res = new Result();
@@ -169,14 +165,19 @@ public class UserApiController extends BaseApiController {
 		return fileName;
 	}
 	
-	@RequestMapping(value = "/personaldata", method = RequestMethod.POST)
-	public Result personalData(@Valid UserInfoBo userInfoBo,BindingResult bindingResult){
+	/**
+	 * 个人资料
+	 * @param userInfoBo
+	 * @param bindingResult
+	 * @return
+	 */
+	@RequestMapping(value = "/userInfo", method = RequestMethod.POST)
+	public Result personalData(UserInfoBo userInfoBo,BindingResult bindingResult){
 		Result res = new Result();
 		if (bindingResult.hasErrors()) {
 			res.getError().add(buildErrorByMsg(bindingResult.getFieldError().getDefaultMessage(),
 					bindingResult.getFieldError().getField()));
 			return res;
-
 		}
 		if(res.getError().isEmpty()){
 		    UserInfo info= userInfoService.selectUserInfoByUserId(TokenManager.getUserId());
@@ -185,14 +186,19 @@ public class UserApiController extends BaseApiController {
 		    u.setEmail(userInfoBo.getEmail());
 		    userService.updateByPrimaryKeySelective(u);
 		    UserInfo userInfo = new UserInfo();
-		    userInfo.setResidence(userInfoBo.getResidence());
-		    userInfo.setPersonPortrait(userInfoBo.getPersonPortrait());
+		    userInfo.setResidenceProvince(userInfoBo.getResidenceProvince());
+		    userInfo.setResidenceCity(userInfoBo.getResidenceCity());
+		    userInfo.setResidenceArea(userInfoBo.getResidenceArea());
+		    userInfo.setPersonPortraitUrl(userInfoBo.getPersonPortraitUrl());
 		    userInfo.setPersonalProfile(userInfoBo.getPersonalProfile());
-		    userInfo.setLifePhoto(userInfoBo.getLifePhoto());
+		    userInfo.setLifePhotoUrl(userInfoBo.getLifePhotoUrl());
+		    userInfo.setFixedTelArea(userInfoBo.getFixedTelArea());
 		    userInfo.setFixedTel(userInfoBo.getFixedTel());
+		    userInfo.setFixedTelExtension(userInfoBo.getFixedTelExtension());
 		    userInfo.setQq(userInfoBo.getQq());
 		    userInfo.setPostalAddress(userInfoBo.getPostalAddress());
 		    userInfo.setPostcode(userInfoBo.getPostcode());
+		    userInfo.setWorkUnit(userInfoBo.getWorkUnit());
 			if(info == null){
 				userInfo.setId(UUID.randomUUID().toString());
 				userInfo.setUid(TokenManager.getUserId());
@@ -201,7 +207,6 @@ public class UserApiController extends BaseApiController {
 				userInfo.setId(info.getId());
 				userInfoService.updateByPrimaryKeySelective(userInfo);
 			}
-		
 	  }
 		res.setData(userInfoBo);
 		return res;
@@ -212,7 +217,7 @@ public class UserApiController extends BaseApiController {
 	 * @param userEdu
 	 * @return
 	 */
-	@RequestMapping(value = "/eduinfo", method = RequestMethod.POST)
+	@RequestMapping(value = "/userEdu", method = RequestMethod.POST)
 	public Result educationInfo(UserEdu userEdu){
 		Result res = new Result();
 		UserEdu edu = userEduService.selectUserEduByUserId(TokenManager.getUserId());
@@ -222,6 +227,7 @@ public class UserApiController extends BaseApiController {
 			userEdu.setUid(TokenManager.getUserId());
 			userEduService.insert(userEdu);
 		}else{
+			userEdu.setId(edu.getId());
 			userEduService.updateByPrimaryKeySelective(userEdu);
 		}
 		res.setData(userEdu);
@@ -234,7 +240,7 @@ public class UserApiController extends BaseApiController {
 	 * @return
 	 */
 	
-	@RequestMapping(value = "/careerinfo", method = RequestMethod.POST)
+	@RequestMapping(value = "/userCareer", method = RequestMethod.POST)
 	public Result careerInfo(UserCareer userCareer){
 		Result res = new Result();
 		UserCareer career = userCareerService.selectUserCareerByUserId(TokenManager.getUserId());
@@ -257,7 +263,7 @@ public class UserApiController extends BaseApiController {
 	 * @return
 	 */
 	
-	@RequestMapping(value = "/abilitylabel", method = RequestMethod.POST)
+	@RequestMapping(value = "/userAbility", method = RequestMethod.POST)
 	public Result abilityLabel(UserAbility userAbility){
 		Result res = new Result();
 		UserCareer ability = userAbilityService.selectUserAbilityByUserId(TokenManager.getUserId());
@@ -269,6 +275,7 @@ public class UserApiController extends BaseApiController {
 					userAbility.setId(ability.getId());
 					userAbilityService.updateByPrimaryKeySelective(userAbility);
 				}
+				res.setData(userAbility);
 		return res;
 	}
 	
@@ -277,7 +284,7 @@ public class UserApiController extends BaseApiController {
 	 * @param orgIdentityBo
 	 * @return
 	 */
-	@RequestMapping(value="/groupbasicinfo",method = RequestMethod.POST)
+	@RequestMapping(value="/orgIdentity",method = RequestMethod.POST)
 	public Result groupBasicInfo(OrgIdentityBo orgIdentityBo){
 		Result res = new Result();
 		OrganizationIdentity organizationIdentity = new OrganizationIdentity();
@@ -290,6 +297,7 @@ public class UserApiController extends BaseApiController {
 		organizationIdentity.setQq(orgIdentityBo.getQq());
 		organizationIdentity.setPostalAddress(orgIdentityBo.getPostalAddress());
 		organizationIdentity.setPostcode(orgIdentityBo.getPostcode());
+		organizationIdentity.setLegalPerson(orgIdentityBo.getLegalPerson());
 		if(identity==null){
 			organizationIdentity.setId(UUID.randomUUID().toString());
 			organizationIdentity.setUid(TokenManager.getUserId());
@@ -307,19 +315,27 @@ public class UserApiController extends BaseApiController {
 	 * @param orgInfo
 	 * @return
 	 */
-	@RequestMapping(value="/unitdata",method = RequestMethod.POST)
-	public Result groupBasicInfo(OrganizationInfo orgInfo){
+	@RequestMapping(value="/orgPro",method = RequestMethod.POST)
+	public Result groupProInfo(OrgProBo proBo){
 		Result res = new Result();
+		OrganizationInfo orgInfo = proBo.getInfo();
+		OrganizationProperties orgPro = proBo.getPro();
 		OrganizationInfo info = organizationInfoService.selectOrgInfoByUserId(TokenManager.getUserId());
-		if(info == null){
-			orgInfo.setId(UUID.randomUUID().toString());
-			orgInfo.setUid(TokenManager.getUserId());
-			organizationInfoService.insert(orgInfo);
-		}else{
-			orgInfo.setId(info.getId());
-			organizationInfoService.updateByPrimaryKeySelective(orgInfo);
-		}
-		res.setData(orgInfo);
+		OrganizationProperties pro = organizationPropertiesService.selectOrgProByUserId(TokenManager.getUserId());
+		 if(info == null){
+			 orgInfo.setId(UUID.randomUUID().toString());
+			 orgInfo.setUid(TokenManager.getUserId());
+			 orgInfo = organizationInfoService.insert(orgInfo);
+		 }else{
+			 orgInfo.setId(info.getId());
+			 organizationInfoService.updateByPrimaryKeySelective(orgInfo);
+		 }
+		 if(pro == null){
+			 
+		 }else{
+			 
+		 }
+		 res.setData(proBo);
 		return res;
 	}
 	
@@ -328,7 +344,7 @@ public class UserApiController extends BaseApiController {
 	 * @param orgTech
 	 * @return
 	 */
-	@RequestMapping(value="/tech",method = RequestMethod.POST)
+	@RequestMapping(value="/orgTech",method = RequestMethod.POST)
 	public Result tech(OrganizationTech orgTech){
 		Result res = new Result();
 		OrganizationTech tech = organizationTechService.selectOrgTechByUserId(TokenManager.getUserId());
@@ -340,10 +356,13 @@ public class UserApiController extends BaseApiController {
 			orgTech.setId(tech.getId());
 			organizationTechService.updateByPrimaryKeySelective(orgTech);
 		}
+		res.setData(orgTech);
 		return res;
 	}
 	
 	
+	
+	
 	@RequestMapping(value="/base",method = RequestMethod.POST)
 	public Result basic(){
 		Result res = new Result();
@@ -398,9 +417,7 @@ public class UserApiController extends BaseApiController {
 	@RequestMapping(value="/ability",method = RequestMethod.POST)
 	public Result ability(){
 		Result res = new Result();
-		UidAndTypeBo ub =basicInfo(userService);
-		
-		UserCareer u = userAbilityService.selectUserAbilityByUserId(ub.getUid());
+		UserCareer u = userAbilityService.selectUserAbilityByUserId(basicInfo(userService).getUid());
 		res.setData(u);
 		return res;
 	}

+ 24 - 5
src/main/java/com/goafanti/user/controller/UserRegisterController.java

@@ -1,5 +1,6 @@
 package com.goafanti.user.controller;
 
+import java.util.Calendar;
 import java.util.UUID;
 
 import javax.annotation.Resource;
@@ -33,13 +34,24 @@ public class UserRegisterController extends BaseController{
 	 * @return
 	 */
 	@RequestMapping(value = "/register", method = RequestMethod.POST)
-	public Result register(@Valid User user,
-			String companyName,String verificationCode,String contacts,BindingResult bindingResult){
+	public Result register(User user,
+			String companyName,String verificationCode,String contacts,
+			String mobileCode,BindingResult bindingResult){
 		Result res = new Result();
+		
 		if(!TokenManager.getSession().getAttribute(VerifyCodeUtils.V_CODE).equals(verificationCode)){
 			res.getError().add(buildError(ErrorConstants.VCODE_ERROR,"验证码错误"));
 			return res;
 		}
+		//验证码15分钟有效
+		if(System.currentTimeMillis()-(Long) TokenManager.getSession().getAttribute(VerifyCodeUtils.M_CODE_TIME)>900000){
+			res.getError().add(buildError(ErrorConstants.MCODE_OVERTIME_ERROR,"手机验证码超时失效"));
+			return res;
+		}
+		if(!TokenManager.getSession().getAttribute(VerifyCodeUtils.M_CODE).equals(mobileCode)){
+			res.getError().add(buildError(ErrorConstants.MCODE_ERROR,"手机验证码错误"));
+			return res;
+		}
 		if (bindingResult.hasErrors()) {
 			res.getError().add(buildErrorByMsg(bindingResult.getFieldError().getDefaultMessage(),
 					bindingResult.getFieldError().getField()));
@@ -51,16 +63,23 @@ public class UserRegisterController extends BaseController{
 			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "必须指定", "密码"));
 		}else{
 		    User u = userService.selectByMobieAndType(user.getMobile(),user.getType());
-				if(u.getMobile().equals(user.getMobile())&&u.getType() == user.getType()){
-					res.getError().add(buildError(ErrorConstants.USER_ALREADY_EXIST, "用户名", "已存在"));
+		    if(null!=u){
+				if(u.getMobile().equals(user.getMobile())&& u.getType() == user.getType()){
+					res.getError().add(buildError(ErrorConstants.USER_ALREADY_EXIST, "用户名已存在"));
 				}
 			}
+		}
 		if(res.getError().isEmpty()){
 			user.setId(UUID.randomUUID().toString());
+			Calendar now = Calendar.getInstance();
+			now.set(Calendar.MILLISECOND, 0);
+			user.setCreateTime(now.getTime());
 			user.setPassword(passwordUtil.getEncryptPwd(user));
-			userService.insertRegister(user,contacts,companyName,TokenManager.getUserId());
+			userService.insertRegister(user,contacts,companyName,user.getId());
 			}
 			
 		return res;
 	}
+	
+	
 }

+ 3 - 1
src/main/java/com/goafanti/user/service/OrganizationInfoService.java

@@ -1,13 +1,15 @@
 package com.goafanti.user.service;
 
 import com.goafanti.common.model.OrganizationInfo;
+import com.goafanti.common.model.OrganizationProperties;
 
 public interface OrganizationInfoService{
 
-	OrganizationInfo insert(OrganizationInfo organizationInfo);
 
 	OrganizationInfo selectOrgInfoByUserId(String userId);
 
 	int updateByPrimaryKeySelective(OrganizationInfo orgInfo);
 
+	OrganizationInfo insert(OrganizationInfo orgInfo);
+
 }

+ 9 - 0
src/main/java/com/goafanti/user/service/OrganizationPropertiesService.java

@@ -0,0 +1,9 @@
+package com.goafanti.user.service;
+
+import com.goafanti.common.model.OrganizationProperties;
+
+public interface OrganizationPropertiesService {
+
+	  OrganizationProperties selectOrgProByUserId(String userId);
+	
+}

+ 3 - 1
src/main/java/com/goafanti/user/service/UserService.java

@@ -7,7 +7,9 @@ public interface UserService {
 
 	User selectByPrimaryKey(String userId);
 
-	Object updateByPrimaryKeySelective(User u);
+	int updateByPrimaryKeySelective(User u);
+	
+	int updateByPrimaryKey(User u);
 
 	User insert(User user);
 

+ 1 - 0
src/main/java/com/goafanti/user/service/impl/OrganizationIdentityServiceImpl.java

@@ -7,6 +7,7 @@ import com.goafanti.common.dao.OrganizationIdentityMapper;
 import com.goafanti.common.model.OrganizationIdentity;
 import com.goafanti.user.bo.OrgIdentityBo;
 import com.goafanti.user.service.OrganizationIdentityService;
+
 @Service
 public class OrganizationIdentityServiceImpl implements OrganizationIdentityService{
     @Autowired

+ 9 - 5
src/main/java/com/goafanti/user/service/impl/OrganizationInfoServiceImpl.java

@@ -4,18 +4,16 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
 import com.goafanti.common.dao.OrganizationInfoMapper;
+import com.goafanti.common.dao.OrganizationPropertiesMapper;
 import com.goafanti.common.model.OrganizationInfo;
 import com.goafanti.user.service.OrganizationInfoService;
 @Service
 public class OrganizationInfoServiceImpl implements OrganizationInfoService {
     @Autowired
     OrganizationInfoMapper organizationInfoMapper;
+    @Autowired
+    OrganizationPropertiesMapper  organizationPropertiesMapper; 
     
-	@Override
-	public OrganizationInfo insert(OrganizationInfo organizationInfo) {
-		organizationInfoMapper.insert(organizationInfo);
-		return organizationInfo;
-	}
 
 	@Override
 	public OrganizationInfo selectOrgInfoByUserId(String uid) {
@@ -27,5 +25,11 @@ public class OrganizationInfoServiceImpl implements OrganizationInfoService {
 		return organizationInfoMapper.updateByPrimaryKeySelective(orgInfo);
 	}
 
+	@Override
+	public OrganizationInfo insert(OrganizationInfo orgInfo) {
+		organizationInfoMapper.insert(orgInfo);
+		return orgInfo;
+	}
+
 
 }

+ 18 - 0
src/main/java/com/goafanti/user/service/impl/OrganizationPropertiesServiceImpl.java

@@ -0,0 +1,18 @@
+package com.goafanti.user.service.impl;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import com.goafanti.common.dao.OrganizationPropertiesMapper;
+import com.goafanti.common.model.OrganizationProperties;
+import com.goafanti.user.service.OrganizationPropertiesService;
+@Service
+public class OrganizationPropertiesServiceImpl implements OrganizationPropertiesService{
+	@Autowired
+    OrganizationPropertiesMapper organizationPropertiesMapper;
+
+	@Override
+	public OrganizationProperties selectOrgProByUserId(String uid) {
+		return organizationPropertiesMapper.selectOrgProByUserId(uid);
+	}
+}

+ 7 - 3
src/main/java/com/goafanti/user/service/impl/UserServiceImpl.java

@@ -18,7 +18,6 @@ import com.goafanti.user.service.UserService;
 
 @Service
 public class UserServiceImpl implements UserService {
-	private static final String String = null;
 	@Autowired
 	UserMapper userMapper;
 	@Autowired
@@ -61,8 +60,8 @@ public class UserServiceImpl implements UserService {
 	}
 
 	@Override
-	public Object updateByPrimaryKeySelective(User u) {
-		return null;
+	public int updateByPrimaryKeySelective(User u) {
+		return userMapper.updateByPrimaryKeySelective(u);
 	}
 
 	@Override
@@ -71,6 +70,11 @@ public class UserServiceImpl implements UserService {
 		return user;
 	}
 
+	@Override
+	public int updateByPrimaryKey(User u) {
+		return userMapper.updateByPrimaryKey(u);
+	}
+
 
 
 

+ 6 - 6
src/main/webapp/WEB-INF/html/test.html

@@ -53,12 +53,12 @@
 <body>
   <div id="root">
     <label>
-      <span>接口前缀</span>
+      <span>1接口前缀</span>
       <input type="text" id="context" value="aft">
     </label>
     <label>
       <span>接口地址</span>
-      <input type="text" id="path" value="api/pushwarning">
+      <input type="text" id="path" value="/open/getMCode">
     </label>
     <label>
       <span>post or get</span>
@@ -71,10 +71,10 @@
     <label>
       <span>params json data:</span>
       <textarea id="data" cols="30" rows="10">
-        {
-"mobile":"13628002797", 
-"password":"123"
-}
+      
+	{
+	"mobile": "18273127971"
+    }
       </textarea>
     </label>
     <br>

+ 51 - 0
src/main/webapp/WEB-INF/views/header.jsp

@@ -0,0 +1,51 @@
+<%@ page contentType="text/html;charset=UTF-8" language="java"%>
+<%@ taglib prefix="shiro" uri="http://shiro.apache.org/tags"%>
+<!DOCTYPE HTML>
+<html xmlns=http://www.w3.org/1999/xhtml>
+<head>
+	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+	<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1" />
+	<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no">
+	<!--[if lt IE 9]>
+    <script src="//cdn.bootcss.com/html5shiv/r29/html5.min.js"></script>
+	<script src="//cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>
+  	<![endif]-->
+  	<link href="${basePath}/static/vendors.bundle.css" rel="stylesheet">
+  	<script type="text/javascript">
+  		<!--
+  		<shiro:hasRole name="999999">
+ 		window.showSystem = true;
+ 		window.showConfigure = true;
+ 		window.showConfigview = true;
+ 		window.showSheet = true;
+ 		window.showPue = true;
+ 		window.showVideo = true;
+ 		window.showDevice = true;
+  		</shiro:hasRole>
+  		
+  		<shiro:hasPermission name="configure">
+ 		window.showConfigure = true;
+  		</shiro:hasPermission>
+  		<shiro:hasPermission name="configview">
+ 		window.showConfigview = true;
+  		</shiro:hasPermission>
+  		<shiro:hasPermission name="sheet">
+ 		window.showSheet = true;
+  		</shiro:hasPermission>
+  		<shiro:hasPermission name="pue">
+ 		window.showPue = true;
+  		</shiro:hasPermission>
+
+  		<shiro:hasPermission name="video">
+ 		window.showVideo = true;
+  		</shiro:hasPermission>
+  		<shiro:hasPermission name="device">
+ 		window.showDevice = true;
+  		</shiro:hasPermission>
+      -->
+  		window.globalConfig = {
+	  		context: "${basePath}"
+	  		staticHost: "${staticHost}"
+	  	}
+  	</script>
+  	<script type="text/javascript" src="${basePath}/static/vendors.js"></script>

+ 126 - 126
src/main/webapp/WEB-INF/web.xml

@@ -1,126 +1,126 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-	xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee  
-                             http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"
-	version="3.1">
-
-	<display-name>AFT</display-name>
-
-	<!-- The definition of the Root Spring Container shared by all Servlets 
-		and Filters -->
-	<context-param>
-		<param-name>spring.profiles.active</param-name>
-		<param-value>local</param-value>
-	</context-param>
-
-	<!-- Creates the Spring Container shared by all Servlets and Filters -->
-	<listener>
-		<listener-class>org.springframework.web.util.IntrospectorCleanupListener</listener-class>
-	</listener>
-	<!-- 开放所有的跨域操作 -->
-	<filter>
-		<filter-name>CorsFilter</filter-name>
-		<filter-class>org.apache.catalina.filters.CorsFilter</filter-class>
-		<async-supported>true</async-supported>
-	</filter>
-	<filter-mapping>
-		<filter-name>CorsFilter</filter-name>
-		<url-pattern>/*</url-pattern>
-	</filter-mapping>
-	<filter>
-		<filter-name>encodingFilter</filter-name>
-		<filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>
-		<async-supported>true</async-supported>
-		<init-param>
-			<param-name>encoding</param-name>
-			<param-value>UTF-8</param-value>
-		</init-param>
-		<init-param>
-			<param-name>forceEncoding</param-name>
-			<param-value>false</param-value>
-		</init-param>
-	</filter>
-	<filter-mapping>
-		<filter-name>encodingFilter</filter-name>
-		<url-pattern>/*</url-pattern>
-	</filter-mapping>
-	<filter>
-		<filter-name>shiroFilter</filter-name>
-		<filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
-		<async-supported>true</async-supported>
-		<init-param>
-			<param-name>targetFilterLifecycle</param-name>
-			<param-value>true</param-value>
-		</init-param>
-	</filter>
-	<filter-mapping>
-		<filter-name>shiroFilter</filter-name>
-		<url-pattern>/*</url-pattern>
-	</filter-mapping>
-	<!-- Resolve PUT Request Parameters -->
-	<filter>
-		<filter-name>HttpMethodFilter</filter-name>
-		<filter-class>org.springframework.web.filter.HttpPutFormContentFilter</filter-class>
-		<async-supported>true</async-supported>
-	</filter>
-	<filter-mapping>
-		<filter-name>HttpMethodFilter</filter-name>
-		<servlet-name>aft</servlet-name>
-	</filter-mapping>
-	<!-- Processes application requests -->
-	<servlet>
-		<servlet-name>aft</servlet-name>
-		<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
-		<init-param>
-			<param-name>contextConfigLocation</param-name>
-			<param-value>classpath:applicationContext.xml</param-value>
-		</init-param>
-		<load-on-startup>1</load-on-startup>
-		<async-supported>true</async-supported>
-	</servlet>
-	<!-- 配置 Druid 监控信息显示页面 -->
-	<!-- <servlet>
-		<servlet-name>DruidStatView</servlet-name>
-		<servlet-class>com.alibaba.druid.support.http.StatViewServlet</servlet-class>
-		<init-param>
-			允许清空统计数据
-			<param-name>resetEnable</param-name>
-			<param-value>true</param-value>
-		</init-param>
-		<init-param>
-			用户名
-			<param-name>loginUsername</param-name>
-			<param-value>druid</param-value>
-		</init-param>
-		<init-param>
-			密码
-			<param-name>loginPassword</param-name>
-			<param-value>aft@2016</param-value>
-		</init-param>
-	</servlet>
-	<servlet-mapping>
-		<servlet-name>DruidStatView</servlet-name>
-		<url-pattern>/druid/*</url-pattern>
-	</servlet-mapping> -->
-	<!-- url -->
-	<servlet-mapping>
-		<servlet-name>aft</servlet-name>
-		<url-pattern>/</url-pattern>
-	</servlet-mapping>
-	<error-page>
-		<error-code>400</error-code>
-		<location>/WEB-INF/views/error.jsp</location>
-	</error-page>
-	<error-page>
-		<error-code>403</error-code>
-		<location>/WEB-INF/views/error.jsp</location>
-	</error-page>
-	<error-page>
-		<error-code>404</error-code>
-		<location>/WEB-INF/views/error.jsp</location>
-	</error-page>
-	<error-page>
-		<error-code>500</error-code>
-		<location>/WEB-INF/views/error.jsp</location>
-	</error-page>
-</web-app>
+<?xml version="1.0" encoding="UTF-8"?>
+<web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee  
+                             http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"
+	version="3.1">
+
+	<display-name>AFT</display-name>
+
+	<!-- The definition of the Root Spring Container shared by all Servlets 
+		and Filters -->
+	<context-param>
+		<param-name>spring.profiles.active</param-name>
+		<param-value>local</param-value>
+	</context-param>
+
+	<!-- Creates the Spring Container shared by all Servlets and Filters -->
+	<listener>
+		<listener-class>org.springframework.web.util.IntrospectorCleanupListener</listener-class>
+	</listener>
+	<!-- 开放所有的跨域操作 -->
+	<filter>
+		<filter-name>CorsFilter</filter-name>
+		<filter-class>org.apache.catalina.filters.CorsFilter</filter-class>
+		<async-supported>true</async-supported>
+	</filter>
+	<filter-mapping>
+		<filter-name>CorsFilter</filter-name>
+		<url-pattern>/*</url-pattern>
+	</filter-mapping>
+	<filter>
+		<filter-name>encodingFilter</filter-name>
+		<filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>
+		<async-supported>true</async-supported>
+		<init-param>
+			<param-name>encoding</param-name>
+			<param-value>UTF-8</param-value>
+		</init-param>
+		<init-param>
+			<param-name>forceEncoding</param-name>
+			<param-value>false</param-value>
+		</init-param>
+	</filter>
+	<filter-mapping>
+		<filter-name>encodingFilter</filter-name>
+		<url-pattern>/*</url-pattern>
+	</filter-mapping>
+	<filter>
+		<filter-name>shiroFilter</filter-name>
+		<filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
+		<async-supported>true</async-supported>
+		<init-param>
+			<param-name>targetFilterLifecycle</param-name>
+			<param-value>true</param-value>
+		</init-param>
+	</filter>
+	<filter-mapping>
+		<filter-name>shiroFilter</filter-name>
+		<url-pattern>/*</url-pattern>
+	</filter-mapping>
+	<!-- Resolve PUT Request Parameters -->
+	<filter>
+		<filter-name>HttpMethodFilter</filter-name>
+		<filter-class>org.springframework.web.filter.HttpPutFormContentFilter</filter-class>
+		<async-supported>true</async-supported>
+	</filter>
+	<filter-mapping>
+		<filter-name>HttpMethodFilter</filter-name>
+		<servlet-name>aft</servlet-name>
+	</filter-mapping>
+	<!-- Processes application requests -->
+	<servlet>
+		<servlet-name>aft</servlet-name>
+		<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
+		<init-param>
+			<param-name>contextConfigLocation</param-name>
+			<param-value>classpath:applicationContext.xml</param-value>
+		</init-param>
+		<load-on-startup>1</load-on-startup>
+		<async-supported>true</async-supported>
+	</servlet>
+	<!-- 配置 Druid 监控信息显示页面 -->
+	<!-- <servlet>
+		<servlet-name>DruidStatView</servlet-name>
+		<servlet-class>com.alibaba.druid.support.http.StatViewServlet</servlet-class>
+		<init-param>
+			允许清空统计数据
+			<param-name>resetEnable</param-name>
+			<param-value>true</param-value>
+		</init-param>
+		<init-param>
+			用户名
+			<param-name>loginUsername</param-name>
+			<param-value>druid</param-value>
+		</init-param>
+		<init-param>
+			密码
+			<param-name>loginPassword</param-name>
+			<param-value>aft@2016</param-value>
+		</init-param>
+	</servlet>
+	<servlet-mapping>
+		<servlet-name>DruidStatView</servlet-name>
+		<url-pattern>/druid/*</url-pattern>
+	</servlet-mapping> -->
+	<!-- url -->
+	<servlet-mapping>
+		<servlet-name>aft</servlet-name>
+		<url-pattern>/</url-pattern>
+	</servlet-mapping>
+	<error-page>
+		<error-code>400</error-code>
+		<location>/WEB-INF/views/error.jsp</location>
+	</error-page>
+	<error-page>
+		<error-code>403</error-code>
+		<location>/WEB-INF/views/error.jsp</location>
+	</error-page>
+	<error-page>
+		<error-code>404</error-code>
+		<location>/WEB-INF/views/error.jsp</location>
+	</error-page>
+	<error-page>
+		<error-code>500</error-code>
+		<location>/WEB-INF/views/error.jsp</location>
+	</error-page>
+</web-app>