|
@@ -1,18 +1,18 @@
|
|
|
package com.mooctest.crowd.site.anticorruption.impl.data;
|
|
|
|
|
|
+import com.mooctest.crowd.domain.domainobject.User;
|
|
|
+import com.mooctest.crowd.site.command.ModifyEmailCommand;
|
|
|
import com.mooctest.crowd.site.command.RestPasswordCommand;
|
|
|
import lombok.AllArgsConstructor;
|
|
|
import lombok.Data;
|
|
|
import lombok.NoArgsConstructor;
|
|
|
|
|
|
+import java.lang.reflect.InvocationTargetException;
|
|
|
+
|
|
|
@Data
|
|
|
@AllArgsConstructor
|
|
|
@NoArgsConstructor
|
|
|
public class UserCommon extends UserInfo {
|
|
|
- private Long id;
|
|
|
-
|
|
|
- private String password;
|
|
|
-
|
|
|
private String verifyCode;
|
|
|
|
|
|
private String password2;
|
|
@@ -32,10 +32,20 @@ public class UserCommon extends UserInfo {
|
|
|
private String unionid;
|
|
|
|
|
|
public UserCommon(RestPasswordCommand command){
|
|
|
- this.password = command.getPassword();
|
|
|
+ super.setId(command.getId());
|
|
|
+ super.setPassword(command.getPassword());
|
|
|
this.oldPassword = command.getOldPassword();
|
|
|
this.verifyCode = command.getVerifyCode();
|
|
|
this.password2 = command.getPassword2();
|
|
|
- this.id = command.getId();
|
|
|
+ }
|
|
|
+
|
|
|
+ public UserCommon(User user) throws InvocationTargetException, IllegalAccessException {
|
|
|
+ super(user);
|
|
|
+ }
|
|
|
+
|
|
|
+ public void obtainValue(ModifyEmailCommand command) {
|
|
|
+ super.setId(command.getId());
|
|
|
+ super.setEmail(command.getEmail());
|
|
|
+ this.verifyCode = command.getVerifyCode();
|
|
|
}
|
|
|
}
|