Forráskód Böngészése

增加属性名常量,删除无用的属性

zhouhao 8 éve
szülő
commit
436069a444

+ 0 - 2
hsweb-system/hsweb-system-authorization/hsweb-system-authorization-controller/src/main/java/org/hswebframework/web/controller/authorization/AuthorizationController.java

@@ -94,8 +94,6 @@ public class AuthorizationController {
                 reason = AuthorizationFailedEvent.Reason.PASSWORD_ERROR;
                 throw new BusinessException("{password_error}", 400);
             }
-
-            userService.updateLoginInfo(entity.getId(), WebUtil.getIpAddr(request), System.currentTimeMillis());
             // 验证通过
             Authentication authentication = userService.initUserAuthorization(entity.getId());
             AuthorizationSuccessEvent event = new AuthorizationSuccessEvent(authentication, parameterGetter);

+ 0 - 2
hsweb-system/hsweb-system-authorization/hsweb-system-authorization-dao/hsweb-system-authorization-dao-mybatis/src/main/resources/org/hswebframework/web/dao/mybatis/mappers/authorization/UserMapper.xml

@@ -28,10 +28,8 @@
         <result property="password" column="password" javaType="String" jdbcType="VARCHAR"/>
         <result property="salt" column="salt" javaType="String" jdbcType="VARCHAR"/>
         <result property="enabled" column="enabled" javaType="Boolean" jdbcType="NUMERIC"/>
-        <result property="lastLoginIp" column="last_login_ip" javaType="string" jdbcType="VARCHAR"/>
         <result property="createTime" column="create_time" javaType="Long" jdbcType="NUMERIC"/>
         <result property="creatorId" column="creator_id" javaType="String" jdbcType="VARCHAR"/>
-        <result property="lastLoginTime" column="last_login_time" javaType="Long" jdbcType="NUMERIC"/>
     </resultMap>
 
     <!--用于动态生成sql所需的配置-->

+ 0 - 21
hsweb-system/hsweb-system-authorization/hsweb-system-authorization-entity/src/main/java/org/hswebframework/web/entity/authorization/SimpleUserEntity.java

@@ -20,12 +20,8 @@ public class SimpleUserEntity extends SimpleGenericEntity<String> implements Use
 
     private String creatorId;
 
-    private Long lastLoginTime;
-
     private Boolean enabled;
 
-    private String lastLoginIp;
-
     @Override
     public String getName() {
         return name;
@@ -82,15 +78,6 @@ public class SimpleUserEntity extends SimpleGenericEntity<String> implements Use
         this.creatorId = creatorId;
     }
 
-    public void setLastLoginTime(Long lastLoginDate) {
-        this.lastLoginTime = lastLoginDate;
-    }
-
-    @Override
-    public Long getLastLoginTime() {
-        return lastLoginTime;
-    }
-
     @Override
     public void setEnabled(Boolean enabled) {
         this.enabled = enabled;
@@ -101,14 +88,6 @@ public class SimpleUserEntity extends SimpleGenericEntity<String> implements Use
         return enabled;
     }
 
-    public String getLastLoginIp() {
-        return lastLoginIp;
-    }
-
-    public void setLastLoginIp(String lastLoginIp) {
-        this.lastLoginIp = lastLoginIp;
-    }
-
     @Override
     public SimpleUserEntity clone() {
         return ((SimpleUserEntity) super.clone());

+ 6 - 8
hsweb-system/hsweb-system-authorization/hsweb-system-authorization-entity/src/main/java/org/hswebframework/web/entity/authorization/UserEntity.java

@@ -27,6 +27,12 @@ import org.hswebframework.web.commons.entity.RecordCreationEntity;
  * @author zhouhao
  */
 public interface UserEntity extends GenericEntity<String>, RecordCreationEntity {
+    String name     = "name";
+    String username = "username";
+    String salt     = "salt";
+    @SuppressWarnings("unchecked")
+    String password = "password";
+    String enabled = "enabled";
 
     void setName(String name);
 
@@ -44,18 +50,10 @@ public interface UserEntity extends GenericEntity<String>, RecordCreationEntity
 
     String getSalt();
 
-    Long getLastLoginTime();
-
-    void setLastLoginTime(Long lastLoginTime);
-
     Boolean isEnabled();
 
     void setEnabled(Boolean enabled);
 
-    String getLastLoginIp();
-
-    void setLastLoginIp(String lastLoginIp);
-
     @Override
     UserEntity clone();
 }