|
|
@@ -75,6 +75,10 @@ public class TbMsWebMember implements Serializable {
|
|
|
@Column(name = "DEL_YN", columnDefinition = "CHAR", length = 1)
|
|
|
private String delYn;
|
|
|
|
|
|
+ public String getPassword() {
|
|
|
+ return this.password;
|
|
|
+ }
|
|
|
+
|
|
|
public void setAccountLockFree() {
|
|
|
this.loginFailCount = 0;
|
|
|
this.isAccountLock = "N";
|
|
|
@@ -97,21 +101,10 @@ public class TbMsWebMember implements Serializable {
|
|
|
}
|
|
|
|
|
|
public void updateInfo(TbMsWebMemberDto.TbMsWebMemberUpdReq req) {
|
|
|
- AES256Util aes = null;
|
|
|
- String encodePassword = "";
|
|
|
- try {
|
|
|
- aes = new AES256Util(AES256Util.DEFAULT_KEY);
|
|
|
- encodePassword = aes.aesEncode(req.getPassword()); // 암호화
|
|
|
- //decodePassword = aes.aesDecode(password); // 복호화
|
|
|
- } catch (UnsupportedEncodingException e) {
|
|
|
- encodePassword = req.getPassword();
|
|
|
- } catch (Exception e) {
|
|
|
- encodePassword = req.getPassword();
|
|
|
- }
|
|
|
|
|
|
this.email = req.getEmail();
|
|
|
this.username = req.getUsername();
|
|
|
- this.password = encodePassword;
|
|
|
+ setPassword(req.getPassword());
|
|
|
this.contactnum = req.getContactnum();
|
|
|
this.userauth = req.getUserauth();
|
|
|
this.question = req.getQuestion();
|
|
|
@@ -123,4 +116,23 @@ public class TbMsWebMember implements Serializable {
|
|
|
this.delYn = req.getDelYn();
|
|
|
}
|
|
|
|
|
|
+ public void setPassword(String password) {
|
|
|
+ if (this.password != password) {
|
|
|
+ this.password = encodePassword(password);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ public String encodePassword(String password) {
|
|
|
+ AES256Util aes = null;
|
|
|
+ String encodePassword = "";
|
|
|
+ try {
|
|
|
+ aes = new AES256Util(AES256Util.DEFAULT_KEY);
|
|
|
+ encodePassword = aes.aesEncode(this.password); // 암호화
|
|
|
+ //decodePassword = aes.aesDecode(password); // 복호화
|
|
|
+ } catch (UnsupportedEncodingException e) {
|
|
|
+ encodePassword = this.password;
|
|
|
+ } catch (Exception e) {
|
|
|
+ encodePassword = this.password;
|
|
|
+ }
|
|
|
+ return encodePassword;
|
|
|
+ }
|
|
|
}
|