添加用户状态并且在用户数据第一次导入的时候默认设置用户为需要校验
This commit is contained in:
parent
c3fc377bb8
commit
99b784acd7
|
@ -4,6 +4,7 @@ package com.usvisatrack.core.dao.model;
|
|||
import java.util.Date;
|
||||
|
||||
import com.usvisatrack.core.common.DataObject;
|
||||
import com.usvisatrack.core.dao.model.data.UserStatus;
|
||||
|
||||
/**
|
||||
* User ORM
|
||||
|
@ -16,6 +17,7 @@ public class User extends DataObject {
|
|||
private String userName;
|
||||
private String password;
|
||||
private String email;
|
||||
private UserStatus userStatus;
|
||||
private Date dateRegistered;
|
||||
|
||||
public User() {
|
||||
|
@ -46,6 +48,14 @@ public class User extends DataObject {
|
|||
this.email = email;
|
||||
}
|
||||
|
||||
public UserStatus getUserStatus() {
|
||||
return userStatus;
|
||||
}
|
||||
|
||||
public void setUserStatus(UserStatus userStatus) {
|
||||
this.userStatus = userStatus;
|
||||
}
|
||||
|
||||
public Date getDateRegistered() {
|
||||
return dateRegistered;
|
||||
}
|
||||
|
|
|
@ -21,6 +21,12 @@
|
|||
<column name="email" length="255" />
|
||||
</property>
|
||||
|
||||
<property name="UserStatus" column="user_status">
|
||||
<type name="org.hibernate.type.EnumType">
|
||||
<param name="enumClass">com.usvisatrack.core.dao.model.data.UserStatus</param>
|
||||
</type>
|
||||
</property>
|
||||
|
||||
<property name="dateRegistered" type="timestamp">
|
||||
<column name="date_registered" />
|
||||
</property>
|
||||
|
|
|
@ -23,13 +23,13 @@
|
|||
|
||||
<property name="visaStatus" column="visa_status">
|
||||
<type name="org.hibernate.type.EnumType">
|
||||
<param name="enumClass">com.usvisatrack.core.common.data.VisaStatus</param>
|
||||
<param name="enumClass">com.usvisatrack.core.dao.model.data.VisaStatus</param>
|
||||
</type>
|
||||
</property>
|
||||
|
||||
<property name="visaEntry" column="visa_entry">
|
||||
<type name="org.hibernate.type.EnumType">
|
||||
<param name="enumClass">com.usvisatrack.core.common.data.VisaEntry</param>
|
||||
<param name="enumClass">com.usvisatrack.core.dao.model.data.VisaEntry</param>
|
||||
</type>
|
||||
</property>
|
||||
|
||||
|
|
|
@ -19,8 +19,9 @@ import org.jsoup.select.Elements;
|
|||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import com.usvisatrack.core.common.data.VisaEntry;
|
||||
import com.usvisatrack.core.common.data.VisaStatus;
|
||||
import com.usvisatrack.core.dao.model.data.UserStatus;
|
||||
import com.usvisatrack.core.dao.model.data.VisaEntry;
|
||||
import com.usvisatrack.core.dao.model.data.VisaStatus;
|
||||
import com.usvisatrack.core.dao.model.CheckeeVisa;
|
||||
import com.usvisatrack.core.dao.model.User;
|
||||
import com.usvisatrack.core.dao.model.Visa;
|
||||
|
@ -291,6 +292,7 @@ public class VisaImporter extends DataCrawl {
|
|||
user = new User();
|
||||
user.setUserName(userName);
|
||||
user.setEmail(userEmail);
|
||||
user.setUserStatus(UserStatus.NEEDVERIFY);
|
||||
UserFactory.save(user);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue