엔티티/테이블 공통 필드/컬럼 추가 -> REG_DT, RGTR, MDFCN_DT, MDFR

master
mjkhan21 2 years ago
parent b41783c363
commit a8bd23921e

@ -1,7 +1,5 @@
package cokr.xit.base.user; package cokr.xit.base.user;
import java.util.Date;
import cokr.xit.foundation.Assert; import cokr.xit.foundation.Assert;
import cokr.xit.foundation.User; import cokr.xit.foundation.User;
@ -54,6 +52,7 @@ public abstract class GenericUser extends User {
key, key,
passwordHint, passwordHint,
passwordHintAnswer, passwordHintAnswer,
gender,
emailAddress, emailAddress,
areaNo, areaNo,
zipCode, zipCode,
@ -66,9 +65,7 @@ public abstract class GenericUser extends User {
locked, locked,
status; status;
private int lockCount; private int lockCount;
private Date private String lockedDate;
registeredDate,
lockedDate;
/** . /** .
* @return * @return
@ -117,6 +114,20 @@ public abstract class GenericUser extends User {
this.passwordHintAnswer = passwordHintAnswer; this.passwordHintAnswer = passwordHintAnswer;
} }
/** .
* @return gender
*/
public String getGender() {
return gender;
}
/** .
* @param gender
*/
public void setGender(String gender) {
this.gender = gender;
}
/** . /** .
* @return * @return
*/ */
@ -275,31 +286,17 @@ public abstract class GenericUser extends User {
/** . /** .
* @return * @return
*/ */
public Date getLockedDate() { public String getLockedDate() {
return lockedDate; return lockedDate;
} }
/** . /** .
* @param lockedDate * @param lockedDate
*/ */
public void setLockedDate(Date lockedDate) { public void setLockedDate(String lockedDate) {
this.lockedDate = lockedDate; this.lockedDate = lockedDate;
} }
/** .
* @return
*/
public Date getRegisteredDate() {
return registeredDate;
}
/** .
* @param registeredDate
*/
public void setRegisteredDate(Date registeredDate) {
this.registeredDate = registeredDate;
}
/** . /** .
* @return * @return
* <ul><li>A - </li> * <ul><li>A - </li>

@ -9,7 +9,7 @@ public class ManagedUser extends GenericUser {
empNo, empNo,
residentRegNo, residentRegNo,
orgID, orgID,
gender, deptCode,
birthday, birthday,
positionName, positionName,
institute, institute,
@ -62,18 +62,18 @@ public class ManagedUser extends GenericUser {
this.orgID = orgID; this.orgID = orgID;
} }
/** . /** .
* @return gender * @return
*/ */
public String getGender() { public String getDeptCode() {
return gender; return deptCode;
} }
/** . /** .
* @param gender * @param deptCode
*/ */
public void setGender(String gender) { public void setDeptCode(String deptCode) {
this.gender = gender; this.deptCode = deptCode;
} }
/** . /** .

@ -11,18 +11,4 @@ public class MemberUser extends GenericUser {
public String getType() { public String getType() {
return "USR01"; //"gnr"; return "USR01"; //"gnr";
} }
/** .
* @return
*/
public String getGender() {
return gender;
}
/** .
* @param gender
*/
public void setGender(String gender) {
this.gender = gender;
}
} }

@ -1,6 +1,6 @@
/** . /** .
* <ul><li> ManagedUser .</li> * <ul><li> ManagedUser .</li>
* <li> <a href="{@docRoot}/doc-files/xit-base-mysql.sql" target="_blank">TB_USER </a> </li> * <li> <a href="{@docRoot}/doc-files/xit-base-mariadb.sql" target="_blank">TB_USER </a> </li>
* <li> * <li>
* <ul><li> .</li> * <ul><li> .</li>
* <li> TB_USER .</li> * <li> TB_USER .</li>

@ -81,6 +81,7 @@ public class UserBean extends AbstractComponent {
String password = user.getPassword(); String password = user.getPassword();
user.setPassword(passwordEncoder.encode(password)); user.setPassword(passwordEncoder.encode(password));
user.setCreatedBy(currentUser().getId());
return userMapper.insertUser(user) > 0; return userMapper.insertUser(user) > 0;
} }
@ -92,7 +93,10 @@ public class UserBean extends AbstractComponent {
* </ul> * </ul>
*/ */
public boolean update(User user) { public boolean update(User user) {
return user!= null && userMapper.updateUser(user) > 0; if (user == null) return false;
user.setModifiedBy(currentUser().getId());
return userMapper.updateUser(user) > 0;
} }
/** . {@link cokr.xit.foundation.util.CharsEncoder } . /** . {@link cokr.xit.foundation.util.CharsEncoder } .

Loading…
Cancel
Save