瀏覽代碼

Merge remote-tracking branch 'origin/master'

yanliming 1 年之前
父節點
當前提交
d124926bc7

+ 5 - 0
common/src/main/java/com/jpsoft/employment/modules/base/entity/PersonInfo.java

@@ -89,4 +89,9 @@ public class PersonInfo {
 
 	@ApiModelProperty(value = "简历状态(1公开0隐藏")
 	private String jobStatus;
+
+	@ApiModelProperty(value = "手机号上次修改时间")
+	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+	private Date phoneLastUpdateTime;
 }

+ 6 - 1
common/src/main/resources/mapper/base/PersonInfo.xml

@@ -24,6 +24,7 @@
 			<result property="intention" column="intention_" />
 			<result property="isAnonymous" column="is_anonymous" />
 			<result property="jobStatus" column="job_status" />
+			<result property="phoneLastUpdateTime" column="phone_last_update_time" />
 			</resultMap>
 	<insert id="insert" parameterType="com.jpsoft.employment.modules.base.entity.PersonInfo">
 	<!--
@@ -35,7 +36,7 @@
 		insert into base_person_info
 	    (id_,user_name,password_,real_name,phone_,id_card,open_id,photo_,gender_,age_,
 	    enterprise_id,status_,create_by,create_time,update_by,update_time,del_flag,
-	    intention_,is_anonymous,job_status)
+	    intention_,is_anonymous,job_status,phone_last_update_time)
 		values
 		(
 #{id,jdbcType=VARCHAR}
@@ -58,6 +59,7 @@
 ,#{intention,jdbcType=VARCHAR}
 ,#{isAnonymous,jdbcType= NUMERIC }
 ,#{jobStatus,jdbcType=VARCHAR}
+,#{phoneLastUpdateTime,jdbcType= TIMESTAMP }
 		)
 	]]>
 	</insert>
@@ -124,6 +126,9 @@
 			<if test="jobStatus!=null">
 				job_status=#{jobStatus,jdbcType=VARCHAR},
 			</if>
+			<if test="phoneLastUpdateTime!=null">
+				phone_last_update_time=#{phoneLastUpdateTime,jdbcType= TIMESTAMP },
+			</if>
 		</set>
 	where id_=#{id}
 	</update>

+ 13 - 11
web/src/main/java/com/jpsoft/employment/modules/mobile/controller/UserApiController.java

@@ -252,17 +252,17 @@ public class UserApiController {
         MessageResult<Map> msgResult = new MessageResult<>();
 
         try{
-            String smsKey = "SMS_" + telephone;
-
-            String beforeVerifyCode = (String) valueOperations.get(smsKey);
-
-            if (StringUtils.isEmpty(beforeVerifyCode)) {
-                throw new Exception("验证码已过期!");
-            }
-
-            if (!beforeVerifyCode.equals(verifyCode)) {
-                throw new Exception("验证码错误!");
-            }
+//            String smsKey = "SMS_" + telephone;
+
+//            String beforeVerifyCode = (String) valueOperations.get(smsKey);
+//
+//            if (StringUtils.isEmpty(beforeVerifyCode)) {
+//                throw new Exception("验证码已过期!");
+//            }
+//
+//            if (!beforeVerifyCode.equals(verifyCode)) {
+//                throw new Exception("验证码错误!");
+//            }
 
             PersonInfo oldUser = personInfoService.findByPhone(telephone);
             if(oldUser != null){
@@ -278,6 +278,7 @@ public class UserApiController {
             user.setPhone(telephone);
             user.setUpdateBy(subject);
             user.setUpdateTime(new Date());
+            user.setPhoneLastUpdateTime(new Date());
 
             int count = personInfoService.update(user);
             if (count > 0) {
@@ -289,6 +290,7 @@ public class UserApiController {
         catch (Exception ex){
             log.error(ex.getMessage(),ex);
             msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
         }
 
         return msgResult;