Commit 8a92a0920de81fec7efb5a829fa200f536f0ad03
1 parent
6f9b560e
1.
Showing
2 changed files
with
7 additions
and
2 deletions
src/main/java/com/bsth/entity/sys/SysUser.java
| ... | ... | @@ -2,6 +2,7 @@ package com.bsth.entity.sys; |
| 2 | 2 | |
| 3 | 3 | import com.fasterxml.jackson.annotation.JsonIgnore; |
| 4 | 4 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; |
| 5 | +import org.springframework.format.annotation.DateTimeFormat; | |
| 5 | 6 | import org.springframework.util.StringUtils; |
| 6 | 7 | import org.joda.time.DateTime; |
| 7 | 8 | import javax.persistence.*; |
| ... | ... | @@ -37,10 +38,12 @@ public class SysUser implements Serializable { |
| 37 | 38 | |
| 38 | 39 | @Column(name = "update_date", columnDefinition = "timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP") |
| 39 | 40 | private Date updateDate; |
| 40 | - | |
| 41 | + | |
| 42 | + @DateTimeFormat(pattern = "yyyy-MM-dd") | |
| 41 | 43 | private Date lastLoginDate; |
| 42 | 44 | |
| 43 | 45 | /** 最近密码更新时间 */ |
| 46 | + @DateTimeFormat(pattern = "yyyy-MM-dd") | |
| 44 | 47 | private Date lastPwdDate; |
| 45 | 48 | /** 密码有效期 */ |
| 46 | 49 | private Integer pwdValidPeriod; | ... | ... |
src/main/resources/static/pages/permission/user/edit.html
| ... | ... | @@ -31,6 +31,7 @@ |
| 31 | 31 | <input type="hidden" id="id" name="id"> |
| 32 | 32 | <input type="hidden" id="jobCode" name="jobCode"> |
| 33 | 33 | <input type="hidden" id="realName" name="realName"> |
| 34 | + <input type="hidden" id="lastLoginDate" name="lastLoginDate"> | |
| 34 | 35 | <input type="hidden" id="lastPwdDate" name="lastPwdDate"> |
| 35 | 36 | <input type="hidden" id="pwdValidPeriod" name="pwdValidPeriod"> |
| 36 | 37 | <input type="text" class="form-control" id="userName" name="userName" readonly="readonly"> |
| ... | ... | @@ -113,7 +114,8 @@ |
| 113 | 114 | $("#agencies").attr('value',obj.agencies); |
| 114 | 115 | $("#jobCode").attr('value',obj.jobCode); |
| 115 | 116 | $("#realName").attr('value',obj.realName); |
| 116 | - $("#lastPwdDate").attr('value',obj.lastPwdDate); | |
| 117 | + $("#lastLoginDate").attr('value',moment(obj.lastLoginDate).format('YYYY-MM-DD')); | |
| 118 | + $("#lastPwdDate").attr('value',moment(obj.lastPwdDate).format('YYYY-MM-DD')); | |
| 117 | 119 | $("#pwdValidPeriod").attr('value',obj.pwdValidPeriod); |
| 118 | 120 | /*$get('/role/all',null,function(result){ |
| 119 | 121 | $.each(result,function(i,r){ | ... | ... |