Преглед на файлове

个人及团体会员认证相关接口

Antiloveg преди 9 години
родител
ревизия
d33cdfb5c9

+ 18 - 8
src/main/java/com/goafanti/common/controller/PublicController.java

@@ -29,6 +29,7 @@ import com.aliyuncs.sms.model.v20160927.SingleSendSmsResponse;
 import com.goafanti.common.bo.Result;
 import com.goafanti.common.constant.ErrorConstants;
 import com.goafanti.common.utils.LoggerUtils;
+import com.goafanti.common.utils.PictureUtils;
 import com.goafanti.common.utils.TimeUtils;
 import com.goafanti.common.utils.VerifyCodeUtils;
 import com.goafanti.core.shiro.token.TokenManager;
@@ -74,7 +75,6 @@ public class PublicController extends BaseController {
 			String verifyCode = VerifyCodeUtils.generateVerifyCode(4);
 			// 存入Shiro会话session
 			TokenManager.setVal2Session(VerifyCodeUtils.V_CODE, verifyCode.toLowerCase());
-			System.out.println(TokenManager.getSession().getAttribute(VerifyCodeUtils.V_CODE));
 			// 生成图片
 			int w = 146, h = 33;
 			VerifyCodeUtils.outputImage(w, h, response.getOutputStream(), verifyCode);
@@ -241,13 +241,23 @@ public class PublicController extends BaseController {
 	    }  
 	}
 	
-	@RequestMapping(value = "/test", method = RequestMethod.POST)
-	@ResponseBody
-	public Result test(){
-		Result res = new Result();
-		res.setData(UUID.randomUUID().toString());
-		return res;
+    /**
+     * 获取并输出private图片	
+     */
+	@RequestMapping(value = "/writeImage" , method = RequestMethod.POST)
+	public void writeImage (HttpServletResponse response, HttpServletRequest request, String path){
+		try {
+			response.setHeader("Pragma", "No-cache");
+			response.setHeader("Cache-Control", "no-cache");
+			response.setDateHeader("Expires", 0);
+			response.setContentType("image/jpg");
+			String realPath = uploadPrivatePath + path;
+			PictureUtils.outputImage(response.getOutputStream(), realPath);
+		} catch (IOException e) {
+			LoggerUtils.fmtError(getClass(), e, "获取图片异常:%s", e.getMessage());
+		}
+		
+		
 	}
-	
 
 }

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

@@ -17,10 +17,8 @@ public interface OrganizationIdentityMapper {
     int updateByPrimaryKeySelective(OrganizationIdentity record);
 
     int updateByPrimaryKey(OrganizationIdentity record);
-    
-    
 
-	OrganizationIdentity selectOrgIdentityByUserId(String userId);
+	OrganizationIdentity selectOrgIdentityByUserId(String uid);
 
 	OrgIdentityBo selectOrgIdentityBoByUserId(String uid);
 

+ 0 - 3
src/main/java/com/goafanti/common/dao/UserIdentityMapper.java

@@ -16,9 +16,6 @@ public interface UserIdentityMapper {
 
     int updateByPrimaryKey(UserIdentity record);
 
-    
-    
-    
 	UserIdentity selectUserIdentityByUserId(String uid);
 
 	UserIdentityBo selectUserIdentityBoByUserId(String uid);

+ 1 - 2
src/main/java/com/goafanti/common/dao/UserMapper.java

@@ -1,7 +1,6 @@
 package com.goafanti.common.dao;
 
 import com.goafanti.common.model.User;
-import com.goafanti.common.model.UserInfo;
 import com.goafanti.user.bo.UserDownLoadBo;
 import com.goafanti.user.bo.UserPageHomeBo;
 
@@ -19,7 +18,7 @@ public interface UserMapper {
 
     int updateByPrimaryKey(User record);
 
-	User selectByMobieAndType(java.lang.String mobile, Integer type);
+	User selectByMobieAndType(String mobile, Integer type);
 
 	UserPageHomeBo selectUserPageHomeBoByUserId(String uid);
 

+ 137 - 33
src/main/java/com/goafanti/common/mapper/OrganizationIdentityMapper.xml

@@ -5,10 +5,12 @@
     <id column="id" property="id" jdbcType="VARCHAR" />
     <result column="uid" property="uid" jdbcType="VARCHAR" />
     <result column="contacts" property="contacts" jdbcType="VARCHAR" />
+    <result column="contact_mobile" property="contactMobile" 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="aft_username" property="aftUsername" jdbcType="VARCHAR" />
     <result column="unit_name" property="unitName" jdbcType="VARCHAR" />
     <result column="registered_capital" property="registeredCapital" jdbcType="INTEGER" />
     <result column="licence_number" property="licenceNumber" jdbcType="VARCHAR" />
@@ -20,19 +22,28 @@
     <result column="org_code_url" property="orgCodeUrl" jdbcType="VARCHAR" />
     <result column="bank_account" property="bankAccount" jdbcType="VARCHAR" />
     <result column="banks" property="banks" jdbcType="VARCHAR" />
-    <result column="validation_amount" property="validationAmount" jdbcType="INTEGER" />
+    <result column="bank_branch" property="bankBranch" jdbcType="VARCHAR" />
+    <result column="bank_card_number" property="bankCardNumber" jdbcType="VARCHAR" />
+    <result column="validation_amount" property="validationAmount" jdbcType="DECIMAL" />
     <result column="identity_type" property="identityType" jdbcType="INTEGER" />
     <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="audit_status" property="auditStatus" jdbcType="INTEGER" />
+    <result column="legal_person" property="legalPerson" jdbcType="VARCHAR" />
+    <result column="legal_person_id_card" property="legalPersonIdCard" jdbcType="VARCHAR" />
     <result column="last_year_tax_report_url" property="lastYearTaxReportUrl" jdbcType="VARCHAR" />
+    <result column="audit_status" property="auditStatus" jdbcType="INTEGER" />
+    <result column="process" property="process" jdbcType="INTEGER" />
+    <result column="wrong_count" property="wrongCount" jdbcType="INTEGER" />
+    <result column="payment_date" property="paymentDate" jdbcType="TIMESTAMP" />
   </resultMap>
   <sql id="Base_Column_List" >
-    id, uid, contacts, fixed_tel, qq, postal_address, postcode, unit_name, registered_capital, 
-    licence_number, licence_province, licence_city, licence_area, licence_scanning_url, 
-    org_code, org_code_url, bank_account, banks, validation_amount, identity_type, location_province, 
-    location_city, location_area, audit_status, last_year_tax_report_url
+    id, uid, contacts, contact_mobile, fixed_tel, qq, postal_address, postcode, aft_username, 
+    unit_name, registered_capital, licence_number, licence_province, licence_city, licence_area, 
+    licence_scanning_url, org_code, org_code_url, bank_account, banks, bank_branch, bank_card_number, 
+    validation_amount, identity_type, location_province, location_city, location_area, 
+    legal_person, legal_person_id_card, last_year_tax_report_url, audit_status, process, wrong_count, 
+    payment_date
   </sql>
   <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
     select 
@@ -46,23 +57,27 @@
   </delete>
   <insert id="insert" parameterType="com.goafanti.common.model.OrganizationIdentity" >
     insert into organization_identity (id, uid, contacts, 
-      fixed_tel, qq, postal_address, 
-      postcode, unit_name, registered_capital, 
-      licence_number, licence_province, licence_city, 
-      licence_area, licence_scanning_url, org_code, 
-      org_code_url, bank_account, banks, 
-      validation_amount, identity_type, location_province, 
-      location_city, location_area, audit_status, 
-      last_year_tax_report_url)
+      contact_mobile, fixed_tel, qq, 
+      postal_address, postcode, aft_username, 
+      unit_name, registered_capital, licence_number, 
+      licence_province, licence_city, licence_area, 
+      licence_scanning_url, org_code, org_code_url, 
+      bank_account, banks, bank_branch, 
+      bank_card_number, validation_amount, identity_type, 
+      location_province, location_city, location_area, 
+      legal_person, legal_person_id_card, last_year_tax_report_url, 
+      audit_status, process, wrong_count, payment_date)
     values (#{id,jdbcType=VARCHAR}, #{uid,jdbcType=VARCHAR}, #{contacts,jdbcType=VARCHAR}, 
-      #{fixedTel,jdbcType=VARCHAR}, #{qq,jdbcType=VARCHAR}, #{postalAddress,jdbcType=VARCHAR}, 
-      #{postcode,jdbcType=VARCHAR}, #{unitName,jdbcType=VARCHAR}, #{registeredCapital,jdbcType=INTEGER}, 
-      #{licenceNumber,jdbcType=VARCHAR}, #{licenceProvince,jdbcType=VARCHAR}, #{licenceCity,jdbcType=VARCHAR}, 
-      #{licenceArea,jdbcType=VARCHAR}, #{licenceScanningUrl,jdbcType=VARCHAR}, #{orgCode,jdbcType=VARCHAR}, 
-      #{orgCodeUrl,jdbcType=VARCHAR}, #{bankAccount,jdbcType=VARCHAR}, #{banks,jdbcType=VARCHAR}, 
-      #{validationAmount,jdbcType=INTEGER}, #{identityType,jdbcType=INTEGER}, #{locationProvince,jdbcType=VARCHAR}, 
-      #{locationCity,jdbcType=VARCHAR}, #{locationArea,jdbcType=VARCHAR}, #{auditStatus,jdbcType=INTEGER}, 
-      #{lastYearTaxReportUrl,jdbcType=VARCHAR})
+      #{contactMobile,jdbcType=VARCHAR}, #{fixedTel,jdbcType=VARCHAR}, #{qq,jdbcType=VARCHAR}, 
+      #{postalAddress,jdbcType=VARCHAR}, #{postcode,jdbcType=VARCHAR}, #{aftUsername,jdbcType=VARCHAR}, 
+      #{unitName,jdbcType=VARCHAR}, #{registeredCapital,jdbcType=INTEGER}, #{licenceNumber,jdbcType=VARCHAR}, 
+      #{licenceProvince,jdbcType=VARCHAR}, #{licenceCity,jdbcType=VARCHAR}, #{licenceArea,jdbcType=VARCHAR}, 
+      #{licenceScanningUrl,jdbcType=VARCHAR}, #{orgCode,jdbcType=VARCHAR}, #{orgCodeUrl,jdbcType=VARCHAR}, 
+      #{bankAccount,jdbcType=VARCHAR}, #{banks,jdbcType=VARCHAR}, #{bankBranch,jdbcType=VARCHAR}, 
+      #{bankCardNumber,jdbcType=VARCHAR}, #{validationAmount,jdbcType=DECIMAL}, #{identityType,jdbcType=INTEGER}, 
+      #{locationProvince,jdbcType=VARCHAR}, #{locationCity,jdbcType=VARCHAR}, #{locationArea,jdbcType=VARCHAR}, 
+      #{legalPerson,jdbcType=VARCHAR}, #{legalPersonIdCard,jdbcType=VARCHAR}, #{lastYearTaxReportUrl,jdbcType=VARCHAR}, 
+      #{auditStatus,jdbcType=INTEGER}, #{process,jdbcType=INTEGER}, #{wrongCount,jdbcType=INTEGER}, #{paymentDate,jdbcType=TIMESTAMP})
   </insert>
   <insert id="insertSelective" parameterType="com.goafanti.common.model.OrganizationIdentity" >
     insert into organization_identity
@@ -76,6 +91,9 @@
       <if test="contacts != null" >
         contacts,
       </if>
+      <if test="contactMobile != null" >
+        contact_mobile,
+      </if>
       <if test="fixedTel != null" >
         fixed_tel,
       </if>
@@ -88,6 +106,9 @@
       <if test="postcode != null" >
         postcode,
       </if>
+      <if test="aftUsername != null" >
+        aft_username,
+      </if>
       <if test="unitName != null" >
         unit_name,
       </if>
@@ -121,6 +142,12 @@
       <if test="banks != null" >
         banks,
       </if>
+      <if test="bankBranch != null" >
+        bank_branch,
+      </if>
+      <if test="bankCardNumber != null" >
+        bank_card_number,
+      </if>
       <if test="validationAmount != null" >
         validation_amount,
       </if>
@@ -136,12 +163,27 @@
       <if test="locationArea != null" >
         location_area,
       </if>
-      <if test="auditStatus != null" >
-        audit_status,
+      <if test="legalPerson != null" >
+        legal_person,
+      </if>
+      <if test="legalPersonIdCard != null" >
+        legal_person_id_card,
       </if>
       <if test="lastYearTaxReportUrl != null" >
         last_year_tax_report_url,
       </if>
+      <if test="auditStatus != null" >
+        audit_status,
+      </if>
+      <if test="process != null" >
+        process,
+      </if>
+      <if test="wrongCount != null" >
+        wrong_count,
+      </if>
+      <if test="paymentDate != null" >
+        payment_date,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides="," >
       <if test="id != null" >
@@ -153,6 +195,9 @@
       <if test="contacts != null" >
         #{contacts,jdbcType=VARCHAR},
       </if>
+      <if test="contactMobile != null" >
+        #{contactMobile,jdbcType=VARCHAR},
+      </if>
       <if test="fixedTel != null" >
         #{fixedTel,jdbcType=VARCHAR},
       </if>
@@ -165,6 +210,9 @@
       <if test="postcode != null" >
         #{postcode,jdbcType=VARCHAR},
       </if>
+      <if test="aftUsername != null" >
+        #{aftUsername,jdbcType=VARCHAR},
+      </if>
       <if test="unitName != null" >
         #{unitName,jdbcType=VARCHAR},
       </if>
@@ -198,8 +246,14 @@
       <if test="banks != null" >
         #{banks,jdbcType=VARCHAR},
       </if>
+      <if test="bankBranch != null" >
+        #{bankBranch,jdbcType=VARCHAR},
+      </if>
+      <if test="bankCardNumber != null" >
+        #{bankCardNumber,jdbcType=VARCHAR},
+      </if>
       <if test="validationAmount != null" >
-        #{validationAmount,jdbcType=INTEGER},
+        #{validationAmount,jdbcType=DECIMAL},
       </if>
       <if test="identityType != null" >
         #{identityType,jdbcType=INTEGER},
@@ -213,12 +267,27 @@
       <if test="locationArea != null" >
         #{locationArea,jdbcType=VARCHAR},
       </if>
-      <if test="auditStatus != null" >
-        #{auditStatus,jdbcType=INTEGER},
+      <if test="legalPerson != null" >
+        #{legalPerson,jdbcType=VARCHAR},
+      </if>
+      <if test="legalPersonIdCard != null" >
+        #{legalPersonIdCard,jdbcType=VARCHAR},
       </if>
       <if test="lastYearTaxReportUrl != null" >
         #{lastYearTaxReportUrl,jdbcType=VARCHAR},
       </if>
+      <if test="auditStatus != null" >
+        #{auditStatus,jdbcType=INTEGER},
+      </if>
+      <if test="process != null" >
+        #{process,jdbcType=INTEGER},
+      </if>
+      <if test="wrongCount != null" >
+        #{wrongCount,jdbcType=INTEGER},
+      </if>
+       <if test="paymentDate != null" >
+        #{paymentDate,jdbcType=TIMESTAMP},
+      </if>
     </trim>
   </insert>
   <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.OrganizationIdentity" >
@@ -230,6 +299,9 @@
       <if test="contacts != null" >
         contacts = #{contacts,jdbcType=VARCHAR},
       </if>
+      <if test="contactMobile != null" >
+        contact_mobile = #{contactMobile,jdbcType=VARCHAR},
+      </if>
       <if test="fixedTel != null" >
         fixed_tel = #{fixedTel,jdbcType=VARCHAR},
       </if>
@@ -242,6 +314,9 @@
       <if test="postcode != null" >
         postcode = #{postcode,jdbcType=VARCHAR},
       </if>
+      <if test="aftUsername != null" >
+        aft_username = #{aftUsername,jdbcType=VARCHAR},
+      </if>
       <if test="unitName != null" >
         unit_name = #{unitName,jdbcType=VARCHAR},
       </if>
@@ -275,8 +350,14 @@
       <if test="banks != null" >
         banks = #{banks,jdbcType=VARCHAR},
       </if>
+      <if test="bankBranch != null" >
+        bank_branch = #{bankBranch,jdbcType=VARCHAR},
+      </if>
+      <if test="bankCardNumber != null" >
+        bank_card_number = #{bankCardNumber,jdbcType=VARCHAR},
+      </if>
       <if test="validationAmount != null" >
-        validation_amount = #{validationAmount,jdbcType=INTEGER},
+        validation_amount = #{validationAmount,jdbcType=DECIMAL},
       </if>
       <if test="identityType != null" >
         identity_type = #{identityType,jdbcType=INTEGER},
@@ -290,12 +371,27 @@
       <if test="locationArea != null" >
         location_area = #{locationArea,jdbcType=VARCHAR},
       </if>
-      <if test="auditStatus != null" >
-        audit_status = #{auditStatus,jdbcType=INTEGER},
+      <if test="legalPerson != null" >
+        legal_person = #{legalPerson,jdbcType=VARCHAR},
+      </if>
+      <if test="legalPersonIdCard != null" >
+        legal_person_id_card = #{legalPersonIdCard,jdbcType=VARCHAR},
       </if>
       <if test="lastYearTaxReportUrl != null" >
         last_year_tax_report_url = #{lastYearTaxReportUrl,jdbcType=VARCHAR},
       </if>
+      <if test="auditStatus != null" >
+        audit_status = #{auditStatus,jdbcType=INTEGER},
+      </if>
+      <if test="process != null" >
+        process = #{process,jdbcType=INTEGER},
+      </if>
+      <if test="wrongCount != null" >
+        wrong_count = #{wrongCount,jdbcType=INTEGER},
+      </if>
+      <if test="paymentDate != null" >
+        payment_date = #{paymentDate,jdbcType=TIMESTAMP},
+      </if>
     </set>
     where id = #{id,jdbcType=VARCHAR}
   </update>
@@ -303,10 +399,12 @@
     update organization_identity
     set uid = #{uid,jdbcType=VARCHAR},
       contacts = #{contacts,jdbcType=VARCHAR},
+      contact_mobile = #{contactMobile,jdbcType=VARCHAR},
       fixed_tel = #{fixedTel,jdbcType=VARCHAR},
       qq = #{qq,jdbcType=VARCHAR},
       postal_address = #{postalAddress,jdbcType=VARCHAR},
       postcode = #{postcode,jdbcType=VARCHAR},
+      aft_username = #{aftUsername,jdbcType=VARCHAR},
       unit_name = #{unitName,jdbcType=VARCHAR},
       registered_capital = #{registeredCapital,jdbcType=INTEGER},
       licence_number = #{licenceNumber,jdbcType=VARCHAR},
@@ -318,13 +416,20 @@
       org_code_url = #{orgCodeUrl,jdbcType=VARCHAR},
       bank_account = #{bankAccount,jdbcType=VARCHAR},
       banks = #{banks,jdbcType=VARCHAR},
-      validation_amount = #{validationAmount,jdbcType=INTEGER},
+      bank_branch = #{bankBranch,jdbcType=VARCHAR},
+      bank_card_number = #{bankCardNumber,jdbcType=VARCHAR},
+      validation_amount = #{validationAmount,jdbcType=DECIMAL},
       identity_type = #{identityType,jdbcType=INTEGER},
       location_province = #{locationProvince,jdbcType=VARCHAR},
       location_city = #{locationCity,jdbcType=VARCHAR},
       location_area = #{locationArea,jdbcType=VARCHAR},
+      legal_person = #{legalPerson,jdbcType=VARCHAR},
+      legal_person_id_card = #{legalPersonIdCard,jdbcType=VARCHAR},
+      last_year_tax_report_url = #{lastYearTaxReportUrl,jdbcType=VARCHAR},
       audit_status = #{auditStatus,jdbcType=INTEGER},
-      last_year_tax_report_url = #{lastYearTaxReportUrl,jdbcType=VARCHAR}
+      process = #{process,jdbcType=INTEGER},
+      wrong_count = #{wrongCount,jdbcType=INTEGER},
+      payment_date = #{paymentDate,jdbcType=TIMESTAMP}
     where id = #{id,jdbcType=VARCHAR}
   </update>
   
@@ -348,6 +453,5 @@
    select 
    <include refid="Base_Column_List" />
     from organization_identity
-   
   </select>
 </mapper>

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

@@ -11,26 +11,24 @@
     <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="aft_username" property="aftUsername" jdbcType="VARCHAR" />
+    <result column="province" property="province" jdbcType="VARCHAR" />
+    <result column="city" property="city" jdbcType="VARCHAR" />
+    <result column="area" property="area" jdbcType="VARCHAR" />
+    <result column="contact_mobile" property="contactMobile" jdbcType="VARCHAR" />
+    <result column="bank_name" property="bankName" jdbcType="VARCHAR" />
+    <result column="bank_account" property="bankAccount" jdbcType="VARCHAR" />
+    <result column="bank_card_number" property="bankCardNumber" jdbcType="VARCHAR" />
+    <result column="amount_money" property="amountMoney" jdbcType="DECIMAL" />
+    <result column="audit_status" property="auditStatus" jdbcType="INTEGER" />
+    <result column="process" property="process" jdbcType="INTEGER" />
+    <result column="wrong_count" property="wrongCount" jdbcType="INTEGER" />
+    <result column="payment_date" property="paymentDate" jdbcType="TIMESTAMP" />
   </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_year,date_of_birth_month, id_number, positive_id_url, opposite_id_url
+    id, uid, username, sex, date_of_birth_year, date_of_birth_month, id_number, positive_id_url, 
+    opposite_id_url, aft_username, province, city, area, contact_mobile, bank_name, bank_account, 
+    bank_card_number, amount_money, audit_status, process , wrong_count, payment_date
   </sql>
   <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
     select 
@@ -44,11 +42,19 @@
   </delete>
   <insert id="insert" parameterType="com.goafanti.common.model.UserIdentity" >
     insert into user_identity (id, uid, username, 
-      sex, date_of_birth_year, date_of_birth_month, id_number, 
-      positive_id_url, opposite_id_url)
+      sex, date_of_birth_year, date_of_birth_month, 
+      id_number, positive_id_url, opposite_id_url, 
+      aft_username, province, city, 
+      area, contact_mobile, bank_name, 
+      bank_account, bank_card_number, amount_money, 
+      audit_status, process, payment_date)
     values (#{id,jdbcType=VARCHAR}, #{uid,jdbcType=VARCHAR}, #{username,jdbcType=VARCHAR}, 
-      #{sex,jdbcType=VARCHAR}, #{dateOfBirthYear,jdbcType=VARCHAR},#{dateOfBirthMonth,jdbcType=VARCHAR}, #{idNumber,jdbcType=VARCHAR}, 
-      #{positiveIdUrl,jdbcType=VARCHAR}, #{oppositeIdUrl,jdbcType=VARCHAR})
+      #{sex,jdbcType=VARCHAR}, #{dateOfBirthYear,jdbcType=VARCHAR}, #{dateOfBirthMonth,jdbcType=VARCHAR}, 
+      #{idNumber,jdbcType=VARCHAR}, #{positiveIdUrl,jdbcType=VARCHAR}, #{oppositeIdUrl,jdbcType=VARCHAR}, 
+      #{aftUsername,jdbcType=VARCHAR}, #{province,jdbcType=VARCHAR}, #{city,jdbcType=VARCHAR}, 
+      #{area,jdbcType=VARCHAR}, #{contactMobile,jdbcType=VARCHAR}, #{bankName,jdbcType=VARCHAR}, 
+      #{bankAccount,jdbcType=VARCHAR}, #{bankCardNumber,jdbcType=VARCHAR}, #{amountMoney,jdbcType=DECIMAL}, 
+      #{auditStatus,jdbcType=INTEGER}, #{process,jdbcType=INTEGER}, #{wrongCount,jdbcType=INTEGER}, #{paymentDate,jdbcType=TIMESTAMP})
   </insert>
   <insert id="insertSelective" parameterType="com.goafanti.common.model.UserIdentity" >
     insert into user_identity
@@ -66,10 +72,10 @@
         sex,
       </if>
       <if test="dateOfBirthYear != null" >
-        date_of_birth_Year,
+        date_of_birth_year,
       </if>
-       <if test="dateOfBirthMonth != null" >
-        date_of_birth_Month,
+      <if test="dateOfBirthMonth != null" >
+        date_of_birth_month,
       </if>
       <if test="idNumber != null" >
         id_number,
@@ -80,6 +86,45 @@
       <if test="oppositeIdUrl != null" >
         opposite_id_url,
       </if>
+      <if test="aftUsername != null" >
+        aft_username,
+      </if>
+      <if test="province != null" >
+        province,
+      </if>
+      <if test="city != null" >
+        city,
+      </if>
+      <if test="area != null" >
+        area,
+      </if>
+      <if test="contactMobile != null" >
+        contact_mobile,
+      </if>
+      <if test="bankName != null" >
+        bank_name,
+      </if>
+      <if test="bankAccount != null" >
+        bank_account,
+      </if>
+      <if test="bankCardNumber != null" >
+        bank_card_number,
+      </if>
+      <if test="amountMoney != null" >
+        amount_money,
+      </if>
+      <if test="auditStatus != null" >
+        audit_status,
+      </if>
+      <if test="process != null" >
+        process,
+      </if>
+      <if test="wrongCount != null" >
+        wrong_count,
+      </if>
+      <if test="paymentDate != null" >
+        payment_date,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides="," >
       <if test="id != null" >
@@ -109,6 +154,45 @@
       <if test="oppositeIdUrl != null" >
         #{oppositeIdUrl,jdbcType=VARCHAR},
       </if>
+      <if test="aftUsername != null" >
+        #{aftUsername,jdbcType=VARCHAR},
+      </if>
+      <if test="province != null" >
+        #{province,jdbcType=VARCHAR},
+      </if>
+      <if test="city != null" >
+        #{city,jdbcType=VARCHAR},
+      </if>
+      <if test="area != null" >
+        #{area,jdbcType=VARCHAR},
+      </if>
+      <if test="contactMobile != null" >
+        #{contactMobile,jdbcType=VARCHAR},
+      </if>
+      <if test="bankName != null" >
+        #{bankName,jdbcType=VARCHAR},
+      </if>
+      <if test="bankAccount != null" >
+        #{bankAccount,jdbcType=VARCHAR},
+      </if>
+      <if test="bankCardNumber != null" >
+        #{bankCardNumber,jdbcType=VARCHAR},
+      </if>
+      <if test="amountMoney != null" >
+        #{amountMoney,jdbcType=DECIMAL},
+      </if>
+      <if test="auditStatus != null" >
+        #{auditStatus,jdbcType=INTEGER},
+      </if>
+      <if test="process != null" >
+        #{process,jdbcType=INTEGER},
+      </if>
+      <if test="wrongCount != null" >
+        #{wrongCount,jdbcType=INTEGER},
+      </if>
+      <if test="paymentDate != null" >
+        #{paymentDate,jdbcType=TIMESTAMP},
+      </if>
     </trim>
   </insert>
   <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.UserIdentity" >
@@ -138,6 +222,45 @@
       <if test="oppositeIdUrl != null" >
         opposite_id_url = #{oppositeIdUrl,jdbcType=VARCHAR},
       </if>
+      <if test="aftUsername != null" >
+        aft_username = #{aftUsername,jdbcType=VARCHAR},
+      </if>
+      <if test="province != null" >
+        province = #{province,jdbcType=VARCHAR},
+      </if>
+      <if test="city != null" >
+        city = #{city,jdbcType=VARCHAR},
+      </if>
+      <if test="area != null" >
+        area = #{area,jdbcType=VARCHAR},
+      </if>
+      <if test="contactMobile != null" >
+        contact_mobile = #{contactMobile,jdbcType=VARCHAR},
+      </if>
+      <if test="bankName != null" >
+        bank_name = #{bankName,jdbcType=VARCHAR},
+      </if>
+      <if test="bankAccount != null" >
+        bank_account = #{bankAccount,jdbcType=VARCHAR},
+      </if>
+      <if test="bankCardNumber != null" >
+        bank_card_number = #{bankCardNumber,jdbcType=VARCHAR},
+      </if>
+      <if test="amountMoney != null" >
+        amount_money = #{amountMoney,jdbcType=DECIMAL},
+      </if>
+      <if test="auditStatus != null" >
+        audit_status = #{auditStatus,jdbcType=INTEGER},
+      </if>
+      <if test="process != null" >
+        process = #{process,jdbcType=INTEGER},
+      </if>
+      <if test="wrongCount != null" >
+        wrong_count = #{wrongCount,jdbcType=INTEGER},
+      </if>
+      <if test="paymentDate != null" >
+        payment_date = #{paymentDate,jdbcType=TIMESTAMP},
+      </if>
     </set>
     where id = #{id,jdbcType=VARCHAR}
   </update>
@@ -150,11 +273,24 @@
       date_of_birth_month = #{dateOfBirthMonth,jdbcType=VARCHAR},
       id_number = #{idNumber,jdbcType=VARCHAR},
       positive_id_url = #{positiveIdUrl,jdbcType=VARCHAR},
-      opposite_id_url = #{oppositeIdUrl,jdbcType=VARCHAR}
+      opposite_id_url = #{oppositeIdUrl,jdbcType=VARCHAR},
+      aft_username = #{aftUsername,jdbcType=VARCHAR},
+      province = #{province,jdbcType=VARCHAR},
+      city = #{city,jdbcType=VARCHAR},
+      area = #{area,jdbcType=VARCHAR},
+      contact_mobile = #{contactMobile,jdbcType=VARCHAR},
+      bank_name = #{bankName,jdbcType=VARCHAR},
+      bank_account = #{bankAccount,jdbcType=VARCHAR},
+      bank_card_number = #{bankCardNumber,jdbcType=VARCHAR},
+      amount_money = #{amountMoney,jdbcType=DECIMAL},
+      audit_status = #{auditStatus,jdbcType=INTEGER},
+      process = #{process,jdbcType=INTEGER},
+      wrong_count = #{wrongCount,jdbcType=INTEGER},
+      payment_date = #{paymentDate,jdbcType=TIMESTAMP}
     where id = #{id,jdbcType=VARCHAR}
   </update>
   
-  <select id="selectUserIdentityByUserId" parameterType="java.lang.String" resultMap="BaseResultMap">
+   <select id="selectUserIdentityByUserId" parameterType="java.lang.String" resultMap="BaseResultMap">
   	 select 
     <include refid="Base_Column_List" />
     from user_identity
@@ -162,10 +298,10 @@
   </select>
   
    
-  <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 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_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>

+ 149 - 12
src/main/java/com/goafanti/common/model/OrganizationIdentity.java

@@ -1,5 +1,10 @@
 package com.goafanti.common.model;
 
+import java.math.BigDecimal;
+import java.util.Date;
+
+import org.apache.commons.lang3.time.DateFormatUtils;
+
 public class OrganizationIdentity {
     private String id;
 
@@ -11,6 +16,11 @@ public class OrganizationIdentity {
     private String contacts;
 
     /**
+    * 联系方式
+    */
+    private String contactMobile;
+
+    /**
     * 固定电话
     */
     private String fixedTel;
@@ -31,6 +41,11 @@ public class OrganizationIdentity {
     private String postcode;
 
     /**
+    * 用户名
+    */
+    private String aftUsername;
+
+    /**
     * 单位名称
     */
     private String unitName;
@@ -86,9 +101,19 @@ public class OrganizationIdentity {
     private String banks;
 
     /**
+    * 开户行支行
+    */
+    private String bankBranch;
+
+    /**
+    * 银行卡号
+    */
+    private String bankCardNumber;
+
+    /**
     * 打入账内信息
     */
-    private Integer validationAmount;
+    private BigDecimal validationAmount;
 
     /**
     * 身份类型
@@ -96,30 +121,55 @@ public class OrganizationIdentity {
     private Integer identityType;
 
     /**
-    * 所在地-省
+    * 开户行所在地-省
     */
     private String locationProvince;
 
     /**
-    * 所在地-市
+    * 开户行所在地-市
     */
     private String locationCity;
 
     /**
-    * 所在地-区(县)
+    * 开户行所在地-区(县)
     */
     private String locationArea;
 
     /**
-    * 审核状态
+    * 法人
     */
-    private Integer auditStatus;
+    private String legalPerson;
+
+    /**
+    * 法人身份证号
+    */
+    private String legalPersonIdCard;
 
     /**
     * 上年度纳税报表
     */
     private String lastYearTaxReportUrl;
 
+    /**
+    * 审核状态
+    */
+    private Integer auditStatus;
+
+    /**
+    * 实名认证流程
+    */
+    private Integer process;
+    
+    /**
+     * 输入错误打款金额次数
+     */
+    private Integer wrongCount;
+    
+    /**
+     * 打款日期
+     */
+    private Date paymentDate;
+
     public String getId() {
         return id;
     }
@@ -144,6 +194,14 @@ public class OrganizationIdentity {
         this.contacts = contacts;
     }
 
+    public String getContactMobile() {
+        return contactMobile;
+    }
+
+    public void setContactMobile(String contactMobile) {
+        this.contactMobile = contactMobile;
+    }
+
     public String getFixedTel() {
         return fixedTel;
     }
@@ -176,6 +234,14 @@ public class OrganizationIdentity {
         this.postcode = postcode;
     }
 
+    public String getAftUsername() {
+        return aftUsername;
+    }
+
+    public void setAftUsername(String aftUsername) {
+        this.aftUsername = aftUsername;
+    }
+
     public String getUnitName() {
         return unitName;
     }
@@ -264,11 +330,27 @@ public class OrganizationIdentity {
         this.banks = banks;
     }
 
-    public Integer getValidationAmount() {
+    public String getBankBranch() {
+        return bankBranch;
+    }
+
+    public void setBankBranch(String bankBranch) {
+        this.bankBranch = bankBranch;
+    }
+
+    public String getBankCardNumber() {
+        return bankCardNumber;
+    }
+
+    public void setBankCardNumber(String bankCardNumber) {
+        this.bankCardNumber = bankCardNumber;
+    }
+
+    public BigDecimal getValidationAmount() {
         return validationAmount;
     }
 
-    public void setValidationAmount(Integer validationAmount) {
+    public void setValidationAmount(BigDecimal validationAmount) {
         this.validationAmount = validationAmount;
     }
 
@@ -304,12 +386,20 @@ public class OrganizationIdentity {
         this.locationArea = locationArea;
     }
 
-    public Integer getAuditStatus() {
-        return auditStatus;
+    public String getLegalPerson() {
+        return legalPerson;
     }
 
-    public void setAuditStatus(Integer auditStatus) {
-        this.auditStatus = auditStatus;
+    public void setLegalPerson(String legalPerson) {
+        this.legalPerson = legalPerson;
+    }
+
+    public String getLegalPersonIdCard() {
+        return legalPersonIdCard;
+    }
+
+    public void setLegalPersonIdCard(String legalPersonIdCard) {
+        this.legalPersonIdCard = legalPersonIdCard;
     }
 
     public String getLastYearTaxReportUrl() {
@@ -319,4 +409,51 @@ public class OrganizationIdentity {
     public void setLastYearTaxReportUrl(String lastYearTaxReportUrl) {
         this.lastYearTaxReportUrl = lastYearTaxReportUrl;
     }
+
+    public Integer getAuditStatus() {
+        return auditStatus;
+    }
+
+    public void setAuditStatus(Integer auditStatus) {
+        this.auditStatus = auditStatus;
+    }
+
+    public Integer getProcess() {
+        return process;
+    }
+
+    public void setProcess(Integer process) {
+        this.process = process;
+    }
+
+	public Integer getWrongCount() {
+		return wrongCount;
+	}
+
+	public void setWrongCount(Integer wrongCount) {
+		this.wrongCount = wrongCount;
+	}
+
+	public Date getPaymentDate() {
+		return paymentDate;
+	}
+
+	public void setPaymentDate(Date paymentDate) {
+		this.paymentDate = paymentDate;
+	}
+	
+	//打款日期
+	public String getPaymentDateFormattedDate(){
+		if (this.paymentDate == null) {
+			 return null;
+		   } else {
+			 return DateFormatUtils.format(this.getPaymentDate(), "yyyy-MM-dd");
+		   }
+	}
+		
+	public void setPaymentDateFormattedDate(String paymentDateFormattedDate){
+			
+	}
+    
+    
 }

+ 241 - 61
src/main/java/com/goafanti/common/model/UserIdentity.java

@@ -1,9 +1,9 @@
 package com.goafanti.common.model;
 
-import javax.validation.constraints.Pattern;
-import javax.validation.constraints.Size;
+import java.math.BigDecimal;
+import java.util.Date;
 
-import com.goafanti.common.constant.ErrorConstants;
+import org.apache.commons.lang3.time.DateFormatUtils;
 
 public class UserIdentity {
     private String id;
@@ -24,18 +24,15 @@ public class UserIdentity {
     * 出生年
     */
     private String dateOfBirthYear;
-    
+
     /**
-     * 出生月
-     */
+    * 出生月
+    */
     private String dateOfBirthMonth;
 
     /**
-    * 份证号码
+    * 份证号码
     */
-    @Size(min = 15, max = 18, message = "{" + ErrorConstants.IDNUMBER_SIZE_ERROR + "}")
-    @Pattern(regexp= "\\d{14}[0-9X])|(\\d{17}[0-9X])" , message = "{"
-			+ ErrorConstants.IDNUMBER_PATTERN_ERROR + "}")
     private String idNumber;
 
     /**
@@ -48,77 +45,260 @@ public class UserIdentity {
     */
     private String oppositeIdUrl;
 
-	public String getId() {
-		return id;
-	}
+    /**
+    * 用户名
+    */
+    private String aftUsername;
 
-	public void setId(String id) {
-		this.id = id;
-	}
+    /**
+    * 所在地-省份
+    */
+    private String province;
 
-	public String getUid() {
-		return uid;
-	}
+    /**
+    * 所在地--市
+    */
+    private String city;
 
-	public void setUid(String uid) {
-		this.uid = uid;
-	}
+    /**
+    * 所在地--区
+    */
+    private String area;
 
-	public String getUsername() {
-		return username;
-	}
+    /**
+    * 联系方式
+    */
+    private String contactMobile;
 
-	public void setUsername(String username) {
-		this.username = username;
-	}
+    /**
+    * 银行开户名
+    */
+    private String bankName;
 
-	public String getSex() {
-		return sex;
-	}
+    /**
+    * 开户银行
+    */
+    private String bankAccount;
 
-	public void setSex(String sex) {
-		this.sex = sex;
-	}
+    /**
+    * 银行卡号
+    */
+    private String bankCardNumber;
 
-	public String getDateOfBirthYear() {
-		return dateOfBirthYear;
-	}
+    /**
+    * 打款金额
+    */
+    private BigDecimal amountMoney;
 
-	public void setDateOfBirthYear(String dateOfBirthYear) {
-		this.dateOfBirthYear = dateOfBirthYear;
-	}
+    /**
+    * 审核状态(0--未提交审核,1-提交审核,2-未通过,3-审核通过)
+    */
+    private Integer auditStatus;
 
-	public String getDateOfBirthMonth() {
-		return dateOfBirthMonth;
-	}
+    /**
+    * 实名认证流程
+    */
+    private Integer process;
+    
+    /**
+     * 输入错误打款金额次数
+     */
+    private Integer wrongCount;
+    
+    /**
+     * 打款日期
+     */
+    private Date paymentDate;
 
-	public void setDateOfBirthMonth(String dateOfBirthMonth) {
-		this.dateOfBirthMonth = dateOfBirthMonth;
-	}
+    public String getId() {
+        return id;
+    }
 
-	public String getIdNumber() {
-		return idNumber;
-	}
+    public void setId(String id) {
+        this.id = id;
+    }
 
-	public void setIdNumber(String idNumber) {
-		this.idNumber = idNumber;
-	}
+    public String getUid() {
+        return uid;
+    }
 
-	public String getPositiveIdUrl() {
-		return positiveIdUrl;
-	}
+    public void setUid(String uid) {
+        this.uid = uid;
+    }
+
+    public String getUsername() {
+        return username;
+    }
+
+    public void setUsername(String username) {
+        this.username = username;
+    }
+
+    public String getSex() {
+        return sex;
+    }
+
+    public void setSex(String sex) {
+        this.sex = sex;
+    }
+
+    public String getDateOfBirthYear() {
+        return dateOfBirthYear;
+    }
+
+    public void setDateOfBirthYear(String dateOfBirthYear) {
+        this.dateOfBirthYear = dateOfBirthYear;
+    }
+
+    public String getDateOfBirthMonth() {
+        return dateOfBirthMonth;
+    }
+
+    public void setDateOfBirthMonth(String dateOfBirthMonth) {
+        this.dateOfBirthMonth = dateOfBirthMonth;
+    }
+
+    public String getIdNumber() {
+        return idNumber;
+    }
+
+    public void setIdNumber(String idNumber) {
+        this.idNumber = idNumber;
+    }
+
+    public String getPositiveIdUrl() {
+        return positiveIdUrl;
+    }
+
+    public void setPositiveIdUrl(String positiveIdUrl) {
+        this.positiveIdUrl = positiveIdUrl;
+    }
+
+    public String getOppositeIdUrl() {
+        return oppositeIdUrl;
+    }
+
+    public void setOppositeIdUrl(String oppositeIdUrl) {
+        this.oppositeIdUrl = oppositeIdUrl;
+    }
+
+    public String getAftUsername() {
+        return aftUsername;
+    }
+
+    public void setAftUsername(String aftUsername) {
+        this.aftUsername = aftUsername;
+    }
+
+    public String getProvince() {
+        return province;
+    }
+
+    public void setProvince(String province) {
+        this.province = province;
+    }
+
+    public String getCity() {
+        return city;
+    }
 
-	public void setPositiveIdUrl(String positiveIdUrl) {
-		this.positiveIdUrl = positiveIdUrl;
+    public void setCity(String city) {
+        this.city = city;
+    }
+
+    public String getArea() {
+        return area;
+    }
+
+    public void setArea(String area) {
+        this.area = area;
+    }
+
+    public String getContactMobile() {
+        return contactMobile;
+    }
+
+    public void setContactMobile(String contactMobile) {
+        this.contactMobile = contactMobile;
+    }
+
+    public String getBankName() {
+        return bankName;
+    }
+
+    public void setBankName(String bankName) {
+        this.bankName = bankName;
+    }
+
+    public String getBankAccount() {
+        return bankAccount;
+    }
+
+    public void setBankAccount(String bankAccount) {
+        this.bankAccount = bankAccount;
+    }
+
+    public String getBankCardNumber() {
+        return bankCardNumber;
+    }
+
+    public void setBankCardNumber(String bankCardNumber) {
+        this.bankCardNumber = bankCardNumber;
+    }
+
+    public BigDecimal getAmountMoney() {
+        return amountMoney;
+    }
+
+    public void setAmountMoney(BigDecimal amountMoney) {
+        this.amountMoney = amountMoney;
+    }
+
+    public Integer getAuditStatus() {
+        return auditStatus;
+    }
+
+    public void setAuditStatus(Integer auditStatus) {
+        this.auditStatus = auditStatus;
+    }
+
+    public Integer getProcess() {
+        return process;
+    }
+
+    public void setProcess(Integer process) {
+        this.process = process;
+    }
+
+	public Integer getWrongCount() {
+		return wrongCount;
 	}
 
-	public String getOppositeIdUrl() {
-		return oppositeIdUrl;
+	public void setWrongCount(Integer wrongCount) {
+		this.wrongCount = wrongCount;
 	}
 
-	public void setOppositeIdUrl(String oppositeIdUrl) {
-		this.oppositeIdUrl = oppositeIdUrl;
+	public Date getPaymentDate() {
+		return paymentDate;
 	}
 
+	public void setPaymentDate(Date paymentDate) {
+		this.paymentDate = paymentDate;
+	}
+	
+	//打款金额
+	public String getPaymentDateFormattedDate(){
+		if (this.paymentDate == null) {
+			 return null;
+		   } else {
+			 return DateFormatUtils.format(this.getPaymentDate(), "yyyy-MM-dd");
+		   }
+	}
+		
+	public void setPaymentDateFormattedDate(String paymentDateFormattedDate){
+			
+	}
+	
+    
     
 }

+ 24 - 0
src/main/java/com/goafanti/common/utils/PictureUtils.java

@@ -0,0 +1,24 @@
+package com.goafanti.common.utils;
+
+import java.awt.image.BufferedImage;
+import java.io.File;
+import java.io.IOException;
+import java.io.OutputStream;
+
+import javax.imageio.ImageIO;
+
+public class PictureUtils {
+	/**
+	 * 输出图片流
+	 * @param os
+	 * @param path
+	 * @throws IOException
+	 */
+	public static void outputImage(OutputStream os, String path) throws IOException{
+		File file = new File(path);
+		BufferedImage image = 
+				new BufferedImage(ImageIO.read(file).getWidth(), ImageIO.read(file).getHeight(), BufferedImage.TYPE_INT_RGB);
+		ImageIO.write(image, "jpg", os);
+	}
+
+}

+ 34 - 34
src/main/java/com/goafanti/techservice/patent/controller/PatentApiController.java

@@ -528,19 +528,19 @@ public class PatentApiController extends BaseApiController {
 		
 		HSSFSheet sheet = workbook.getSheet(sheetName);
 		
-		for(int i = 0 ;i < fees.size();i++){
+		for (int i = 0 ;i < fees.size();i++){
 			PatentApplicationFeeBo obj = fees.get(i);
 			HSSFRow row = sheet.createRow(i + 2);// 创建所需的行数
-			if(null == obj.getSerialNumber()){
+			if (null == obj.getSerialNumber()){
 				row.createCell(0).setCellValue("");
-			}else{
+			} else {
 				row.createCell(0).setCellValue(obj.getSerialNumber());
 			}
 			row.createCell(1).setCellValue(obj.getPatentNumber());
 			row.createCell(2).setCellValue(obj.getLocationProvince());
 			row.createCell(3).setCellValue(obj.getUnitName());
 			row.createCell(4).setCellValue(obj.getPatentName());
-			if(null != obj.getPaymentState()){
+			if (null != obj.getPaymentState()){
 				switch (obj.getPaymentState()){
 				case 0 :
 					row.createCell(5).setCellValue("未缴费");
@@ -548,14 +548,14 @@ public class PatentApiController extends BaseApiController {
 				case 1 :
 					row.createCell(5).setCellValue("已缴费");
 				}
-			}else{
+			} else {
 				row.createCell(5).setCellValue("未缴费");
 			}
 			row.createCell(6).setCellValue(null == obj.getApplicationFee() ? 0 : obj.getApplicationFee());
 			row.createCell(7).setCellValue(null == obj.getTrialFee() ? 0 : obj.getTrialFee());
 			row.createCell(8).setCellValue(null == obj.getPrintingFee() ? 0 : obj.getPrintingFee());
 			
-			if(null != obj.getFunds()){
+			if (null != obj.getFunds()){
 				switch (obj.getFunds()){
 				case 0 :
 					row.createCell(9).setCellValue("否");
@@ -563,11 +563,11 @@ public class PatentApiController extends BaseApiController {
 				case 1 :
 					row.createCell(9).setCellValue("是");
 				}
-			}else{
+			} else {
 				row.createCell(9).setCellValue("否");
 			}
 			
-			if(null != obj.getReimbursement()){
+			if (null != obj.getReimbursement()){
 				switch (obj.getReimbursement()){
 				case 0 :
 					row.createCell(10).setCellValue("否");
@@ -575,7 +575,7 @@ public class PatentApiController extends BaseApiController {
 				case 1 :
 					row.createCell(10).setCellValue("是");
 				}
-			}else{
+			} else {
 				row.createCell(10).setCellValue("否");
 			}
 			
@@ -595,18 +595,18 @@ public class PatentApiController extends BaseApiController {
 		
 		HSSFSheet sheet = workbook.getSheet(sheetName);
 		
-		for(int i = 0 ;i < pendings.size();i++){
+		for (int i = 0 ;i < pendings.size();i++){
 			PatentPendingBo obj = pendings.get(i);
 			HSSFRow row = sheet.createRow(i + 2);// 创建所需的行数
-			if(null == obj.getSerialNumber()){
+			if (null == obj.getSerialNumber()){
 				row.createCell(0).setCellValue("");
-			}else{
+			} else {
 				row.createCell(0).setCellValue(obj.getSerialNumber());
 			}
 			row.createCell(1).setCellValue(obj.getPatentNumber());
 			row.createCell(2).setCellValue(obj.getLocationProvince());
 			row.createCell(3).setCellValue(obj.getUnitName());
-			if(null != obj.getPatentCatagory()){
+			if (null != obj.getPatentCatagory()){
 				switch (obj.getPatentCatagory()){
 				 	case 0:
 				 		row.createCell(4).setCellValue("发明型专利");
@@ -618,12 +618,12 @@ public class PatentApiController extends BaseApiController {
 				 		row.createCell(4).setCellValue("外观型专利");
 				 		break;
 				}
-			}else{
+			} else {
 				row.createCell(4).setCellValue("");
 			}
 			row.createCell(5).setCellValue(obj.getPatentName());
 			row.createCell(6).setCellValue(null == obj.getPatentState() ? "" : switchPatState(obj.getPatentState()));
-			if(null != obj.getAnnualFeeState()){
+			if (null != obj.getAnnualFeeState()){
 				switch (obj.getAnnualFeeState()){
 				case 0 :
 					row.createCell(7).setCellValue("未缴费");
@@ -632,7 +632,7 @@ public class PatentApiController extends BaseApiController {
 					row.createCell(7).setCellValue("已缴费");
 					break;
 				}
-			}else{
+			} else {
 				row.createCell(7).setCellValue("未缴费");
 			}
 			row.createCell(8).setCellValue(null == obj.getAuthorizedDateFormattedDate() ? "" : calDeadline(obj.getAuthorizedDateFormattedDate()));
@@ -654,9 +654,9 @@ public class PatentApiController extends BaseApiController {
 		for (int i = 0; i < composites.size(); i++) {
 			PatentCompositeBo obj = composites.get(i);// 遍历每个对象
 			HSSFRow row = sheet.createRow(i + 2);// 创建所需的行数
-			if(null == obj.getSerialNumber()){
+			if (null == obj.getSerialNumber()){
 				row.createCell(0).setCellValue("");
-			}else{
+			} else {
 				row.createCell(0).setCellValue(obj.getSerialNumber());
 			}
 			row.createCell(1).setCellValue(obj.getPatentNumber());
@@ -704,12 +704,12 @@ public class PatentApiController extends BaseApiController {
 	 public Result patentFile(HttpServletRequest req ,String sign ,String oid) {
 		 Result res = new Result();
 		 String fileName = "";
-		 if(StringUtils.isBlank(oid)){
+		 if (StringUtils.isBlank(oid)){
 			 fileName = "/patent/" + TokenManager.getUserId()+ "_" + sign + ".doc";
-		 }else{
-			 if(sign.equals("patent_prory_statement") || sign.equals("patent_writing")){
+		 } else {
+			 if (sign.equals("patent_prory_statement") || sign.equals("patent_writing")){
 				 fileName = "/patent/" + oid + "_" + sign + ".doc";	 
-			 }else{
+			 } else {
 				 fileName = "/patent/" + oid + "_" + sign + ".jpg"; 
 			 }
 		 }
@@ -738,14 +738,14 @@ public class PatentApiController extends BaseApiController {
 	@RequestMapping(value="/downloadFile",method = RequestMethod.GET)
 	public Result downloadPatentFile(HttpServletResponse response,  String path , String sign ,HttpServletRequest request){
 		Result res = new Result();
-		if(StringUtils.isBlank(path)){
+		if (StringUtils.isBlank(path)){
 			res.getError().add(buildError(ErrorConstants.FILE_NON_EXISTENT, "下载文件不存在!"));
 			return res;
 		}
 		String filename = "";
-		if(sign.equals("patent_prory_statement") || sign.equals("patent_writing")){
+		if (sign.equals("patent_prory_statement") || sign.equals("patent_writing")){
 		    filename =Long.toString(System.nanoTime())+".doc"; 
-		}else{
+		} else {
 			filename =Long.toString(System.nanoTime())+".jpg"; 
 		}
 		String fileSaveRootPath = uploadPrivatePath + path;
@@ -864,13 +864,13 @@ public class PatentApiController extends BaseApiController {
 		if (!StringUtils.isBlank(patentRegistrationBo.getAcceptanceIssueTime())) {
 				patentRegistration.setAcceptanceIssueTime(
 						DateUtils.parseDate(patentRegistrationBo.getAcceptanceIssueTime(), "yyyy-MM-dd"));
-		}else{
+		} else {
 			patentRegistration.setAcceptanceIssueTime(null);
 		}
 		if (!StringUtils.isBlank(patentRegistrationBo.getAcceptanceReceiveTime())) {
 				patentRegistration.setAcceptanceReceiveTime(
 						DateUtils.parseDate(patentRegistrationBo.getAcceptanceReceiveTime(), "yyyy-MM-dd"));
-		}else{
+		} else {
 			patentRegistration.setAcceptanceReceiveTime(null);
 		}
 		patentRegistration.setAcceptanceTrackingNumber(patentRegistrationBo.getAcceptanceTrackingNumber());
@@ -878,13 +878,13 @@ public class PatentApiController extends BaseApiController {
 		if (!StringUtils.isBlank(patentRegistrationBo.getAuthorizationIssueTime())) {
 				patentRegistration.setAuthorizationIssueTime(
 						DateUtils.parseDate(patentRegistrationBo.getAuthorizationIssueTime(), "yyyy-MM-dd"));
-		}else{
+		} else {
 			patentRegistration.setAuthorizationIssueTime(null);
 		}
 		if (!StringUtils.isBlank(patentRegistrationBo.getAuthorizationReceiveTime())) {
 				patentRegistration.setAuthorizationReceiveTime(
 						DateUtils.parseDate(patentRegistrationBo.getAuthorizationReceiveTime(), "yyyy-MM-dd"));
-		}else{
+		} else {
 			patentRegistration.setAuthorizationReceiveTime(null);
 		}
 		patentRegistration.setAuthorizationTrackingNumber(patentRegistrationBo.getAuthorizationTrackingNumber());
@@ -893,13 +893,13 @@ public class PatentApiController extends BaseApiController {
 				patentRegistration.setCertificateIssueTime(
 						DateUtils.parseDate(patentRegistrationBo.getCertificateIssueTime(), "yyyy-MM-dd"));
 
-		}else{
+		} else {
 			patentRegistration.setCertificateIssueTime(null);
 		}
 		if (!StringUtils.isBlank(patentRegistrationBo.getCertificateRecieveTime())) {
 				patentRegistration.setCertificateRecieveTime(
 						DateUtils.parseDate(patentRegistrationBo.getCertificateRecieveTime(), "yyyy-MM-dd"));
-		}else{
+		} else {
 			patentRegistration.setCertificateRecieveTime(null);
 		}
 		patentRegistration.setCertificateTrackingNumber(patentRegistrationBo.getCertificateTrackingNumber());
@@ -913,13 +913,13 @@ public class PatentApiController extends BaseApiController {
 		String y = arr[0];
 		String m = arr[1];
 		String d = arr[2];
-		if("11".equals(arr[0])){
+		if ("11".equals(arr[0])){
 			m = "01";
 			y = String.valueOf(Integer.parseInt(y)+1);
-		}else if("12".equals(arr[0])){
+		} else if ("12".equals(arr[0])){
 			m = "02";
 			y = String.valueOf(Integer.parseInt(y)+1);
-		}else{
+		} else {
 			m = String.valueOf(Integer.parseInt(m)+2);
 		}
 		return y + m + d;

+ 107 - 13
src/main/java/com/goafanti/user/controller/UserApiController.java

@@ -444,12 +444,12 @@ public class UserApiController extends BaseApiController {
 		organizationIdentity.setPostalAddress(orgIdentityBo.getPostalAddress());
 		organizationIdentity.setPostcode(orgIdentityBo.getPostcode());
 		OrganizationInfo info = organizationInfoService.selectOrgInfoByUserId(TokenManager.getUserId());
-		if(null == info){
+		if (null == info){
 			OrganizationInfo i = new OrganizationInfo();
 			i.setId(UUID.randomUUID().toString());
 			i.setUid(TokenManager.getUserId());
 			organizationInfoService.insert(i);
-		}else{
+		} else {
 			info.setLegalPerson(orgIdentityBo.getLegalPerson());
 			organizationInfoService.updateByPrimaryKeySelective(info);
 		}
@@ -461,7 +461,6 @@ public class UserApiController extends BaseApiController {
 			organizationIdentity.setId(identity.getId());
 			organizationIdentityService.updateByPrimaryKeySelective(organizationIdentity);
 		}
-		System.out.println(orgIdentityBo.getPostalAddress()+" "+orgIdentityBo.getFixedTel()+" "+orgIdentityBo.getLegalPerson());
 		res.setData(orgIdentityBo);
 		return res;
 	}
@@ -616,14 +615,7 @@ public class UserApiController extends BaseApiController {
 	
 	
 	
-	private UidAndTypeBo basicInfo(UserService userService) {
-		User u = userService.selectByPrimaryKey(TokenManager.getUserId());
-		UidAndTypeBo ub = new UidAndTypeBo();
-
-		ub.setType(u.getType());
-		ub.setUid(u.getId());
-		return ub;
-	}
+	
 	
 	
 	/**
@@ -633,7 +625,7 @@ public class UserApiController extends BaseApiController {
 	@RequestMapping(value ="/homePage",method = RequestMethod.GET)
 	public Result homePage(){
 		Result res = new Result();
-		if(TokenManager.isLogin()){
+		if (TokenManager.isLogin()){
 			UserPageHomeBo userPageHomeBo = userService.selectUserPageHomeBoByUserId(TokenManager.getUserId());
 			res.setData(userPageHomeBo);
 		}
@@ -651,17 +643,119 @@ public class UserApiController extends BaseApiController {
 		Result res = new Result();
 		if (TokenManager.isLogin()) {
 			User u = userService.selectByPrimaryKey(TokenManager.getUserId());
-			u.setPassword("");
 			res.setData(u);
 		}
 		return res;
 	}
 	
+	/**
+	 * 个人实名认证流程入口
+	 * @return
+	 */
+	@RequestMapping(value="/userPro",method = RequestMethod.GET)
+	public Result userProcess(){
+		Result res = new Result();
+		if (TokenManager.isLogin()){
+			res.setData(userIdentityService.selectUserIdentityByUserId(TokenManager.getUserId()));
+		}
+		return res;
+	}
+	
+	/**
+	 * 个人实名认证流程下一步
+	 */
+	@RequestMapping(value="/userNextPro",method = RequestMethod.POST)
+	public Result userNextProcess(UserIdentity userIdentity ,String verificationCode){
+		Result res = new Result();
+		if (1 == userIdentity.getProcess()){
+			if (!TokenManager.getSession().getAttribute(VerifyCodeUtils.V_CODE).equals(verificationCode)){
+				res.getError().add(buildError(ErrorConstants.VCODE_ERROR,"验证码错误"));
+				return res;
+			}
+		}
+		return dealUserProcess(res,userIdentity,TokenManager.getUserId());
+	}
+	
+	/**
+	 * 团体实名认证流程入口
+	 */
+	@RequestMapping(value="/orgProcess",method = RequestMethod.GET)
+	public Result orgProcess(){
+		Result res = new Result();
+		if (TokenManager.isLogin()){
+			res.setData(organizationIdentityService.selectOrgIdentityByUserId(TokenManager.getUserId()));
+		}
+		return res;
+	}
+	
+	/**
+	 * 团体实名认证流程下一步
+	 */
+	@RequestMapping(value="/orgNextPro",method = RequestMethod.POST)
+	public Result orgNextProcess(OrganizationIdentity o, String verificationCode){
+		Result res = new Result();
+		if (1 == o.getProcess()){
+			if (!TokenManager.getSession().getAttribute(VerifyCodeUtils.V_CODE).equals(verificationCode)){
+				res.getError().add(buildError(ErrorConstants.VCODE_ERROR,"验证码错误"));
+				return res;
+			}
+		}
+		
+		if (5 == o.getProcess()){
+			OrganizationIdentity orgIdentity =	organizationIdentityService.selectOrgIdentityByUserId(TokenManager.getUserId());
+			if (3 == orgIdentity.getWrongCount()){
+				res.getError().add(buildError("","输入错误金额次数过多"));
+				return res;
+			} else {
+				
+			}
+		}
+		return dealOrgProcess(res, o ,TokenManager.getUserId());
+	}
+	
+	
+	
+	
+	
+	private Result dealOrgProcess(Result res, OrganizationIdentity o ,String uid){
+		OrganizationIdentity org = organizationIdentityService.selectOrgIdentityByUserId(uid);
+		if (null == org){
+			o.setId(UUID.randomUUID().toString());
+			o.setUid(uid);
+			res.setData(organizationIdentityService.insert(o));
+		} else {
+			o.setId(org.getId());
+			res.setData(organizationIdentityService.updateByPrimaryKeySelective(o));
+		}
+		return res;
+	}
+	
+	private Result dealUserProcess(Result res,UserIdentity userIdentity,String uid){
+		UserIdentity identity = userIdentityService.selectUserIdentityByUserId(uid);
+		if (null == identity){
+			userIdentity.setId(UUID.randomUUID().toString());
+			userIdentity.setUid(uid);
+			res.setData(userIdentityService.insert(userIdentity));
+		} else {
+			userIdentity.setId(identity.getId());
+			res.setData(userIdentityService.updateByPrimaryKeySelective(userIdentity));
+		}
+		return res;
+	}
+	
 	private void cleanCodeSession(){
 		TokenManager.getSession().removeAttribute(VerifyCodeUtils.RESET_CODE);
 		TokenManager.getSession().removeAttribute(VerifyCodeUtils.RESET_CODE_TIME);
 		TokenManager.getSession().removeAttribute(VerifyCodeUtils.M_CODE);
 		TokenManager.getSession().removeAttribute(VerifyCodeUtils.M_CODE_TIME);
 	}
+	
+	private UidAndTypeBo basicInfo(UserService userService) {
+		User u = userService.selectByPrimaryKey(TokenManager.getUserId());
+		UidAndTypeBo ub = new UidAndTypeBo();
+		ub.setType(u.getType());
+		ub.setUid(u.getId());
+		return ub;
+	}
 
 }

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

@@ -1,7 +1,6 @@
 package com.goafanti.user.service;
 
 import com.goafanti.common.model.User;
-import com.goafanti.common.model.UserInfo;
 import com.goafanti.user.bo.UserDownLoadBo;
 import com.goafanti.user.bo.UserPageHomeBo;
 

+ 2 - 2
src/main/java/com/goafanti/user/service/impl/UserIdentityServiceImpl.java

@@ -13,8 +13,8 @@ public class UserIdentityServiceImpl implements UserIdentityService{
 	@Autowired
 	UserIdentityMapper userIdentityMapper;
 	@Override
-	public UserIdentity selectUserIdentityByUserId(String userId) {
-		return userIdentityMapper.selectUserIdentityByUserId(userId);
+	public UserIdentity selectUserIdentityByUserId(String uid) {
+		return userIdentityMapper.selectUserIdentityByUserId(uid);
 	}
 
 	@Override

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

@@ -12,7 +12,6 @@ import com.goafanti.common.dao.UserMapper;
 import com.goafanti.common.model.OrganizationIdentity;
 import com.goafanti.common.model.OrganizationInfo;
 import com.goafanti.common.model.User;
-import com.goafanti.common.model.UserInfo;
 import com.goafanti.user.bo.UserDownLoadBo;
 import com.goafanti.user.bo.UserPageHomeBo;
 import com.goafanti.user.service.UserService;
@@ -32,15 +31,15 @@ public class UserServiceImpl implements UserService {
 	@Override
 	public User insertRegister(User user,String contacts,String companyName,String uid) {
 		userMapper.insert(user);
-		if(user.getType()==1){
-			if(!StringUtils.isBlank(companyName)){
+		if (1 == user.getType()){
+			if (!StringUtils.isBlank(companyName)){
 				OrganizationInfo organizationInfo = new OrganizationInfo();
 				organizationInfo.setUid(uid);
 				organizationInfo.setCompanyName(companyName);
 				organizationInfo.setId(UUID.randomUUID().toString());
 				organizationInfoMapper.insert(organizationInfo);
 			}
-			if(!StringUtils.isBlank(contacts)){
+			if (!StringUtils.isBlank(contacts)){
 				OrganizationIdentity organizationIdentity = new OrganizationIdentity();
 				organizationIdentity.setUid(uid);
 				organizationIdentity.setId(UUID.randomUUID().toString());

+ 1 - 1
src/main/resources/spring/spring-shiro.xml

@@ -21,7 +21,7 @@
 	    <constructor-arg index="1" value="${jedis.host}" name="host" type="java.lang.String"/>
 	    <constructor-arg index="2" value="${jedis.port}"  name="port" type="int"/>
 	    <constructor-arg index="3" value="${jedis.timeout}"  name="timeout" type="int"/>
-	    <constructor-arg index="4" value="${jedis.password}"  name="password" type="java.lang.String"/>
+	    <!-- <constructor-arg index="4" value="${jedis.password}"  name="password" type="java.lang.String"/> -->
 	  
 	</bean>
 	

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

@@ -10,7 +10,7 @@
 		and Filters -->
 	<context-param>
 		<param-name>spring.profiles.active</param-name>
-		<param-value>dev</param-value>
+		<param-value>local</param-value>
 	</context-param>
 
 	<!-- Creates the Spring Container shared by all Servlets and Filters -->