diff --git a/blockchain-server/blockchain-server-user/src/main/java/com/blockchain/server/user/entity/UserAuthentication.java b/blockchain-server/blockchain-server-user/src/main/java/com/blockchain/server/user/entity/UserAuthentication.java
index 86c9551..013add1 100644
--- a/blockchain-server/blockchain-server-user/src/main/java/com/blockchain/server/user/entity/UserAuthentication.java
+++ b/blockchain-server/blockchain-server-user/src/main/java/com/blockchain/server/user/entity/UserAuthentication.java
@@ -74,7 +74,7 @@ public class UserAuthentication extends BaseModel {
/**
* 修改时间
*/
- @Column(name = "midify_time")
- private java.util.Date midifyTime;
+ @Column(name = "modify_time")
+ private java.util.Date modifyTime;
}
\ No newline at end of file
diff --git a/blockchain-server/blockchain-server-user/src/main/java/com/blockchain/server/user/service/impl/AuthenticationApplyServiceImpl.java b/blockchain-server/blockchain-server-user/src/main/java/com/blockchain/server/user/service/impl/AuthenticationApplyServiceImpl.java
index 08447c2..8ed132b 100644
--- a/blockchain-server/blockchain-server-user/src/main/java/com/blockchain/server/user/service/impl/AuthenticationApplyServiceImpl.java
+++ b/blockchain-server/blockchain-server-user/src/main/java/com/blockchain/server/user/service/impl/AuthenticationApplyServiceImpl.java
@@ -7,12 +7,10 @@ import com.blockchain.server.user.common.constants.sql.UserInfoConstant;
import com.blockchain.server.user.common.enums.UserEnums;
import com.blockchain.server.user.common.exceprion.UserException;
import com.blockchain.server.user.common.utils.FileUploadHelper;
-import com.blockchain.server.user.entity.AuthenticationApply;
-import com.blockchain.server.user.entity.AuthenticationApplyLog;
-import com.blockchain.server.user.entity.HighAuthenticationApply;
-import com.blockchain.server.user.entity.UserInfo;
+import com.blockchain.server.user.entity.*;
import com.blockchain.server.user.mapper.AuthenticationApplyMapper;
import com.blockchain.server.user.mapper.HighAuthenticationApplyMapper;
+import com.blockchain.server.user.mapper.UserAuthenticationMapper;
import com.blockchain.server.user.service.AuthenticationApplyLogService;
import com.blockchain.server.user.service.AuthenticationApplyService;
import com.blockchain.server.user.service.UserInfoService;
@@ -38,6 +36,8 @@ public class AuthenticationApplyServiceImpl implements AuthenticationApplyServic
private HighAuthenticationApplyMapper highAuthenticationApplyMapper;
@Autowired
private AuthenticationApplyLogService authenticationApplyLogService;
+ @Autowired
+ private UserAuthenticationMapper userAuthenticationMapper;
@Override
@@ -75,7 +75,7 @@ public class AuthenticationApplyServiceImpl implements AuthenticationApplyServic
String[] filePath = imgs.split(",");
- AuthenticationApply apply = new AuthenticationApply();
+ UserAuthentication apply = new UserAuthentication();
apply.setId(UUID.randomUUID().toString());
apply.setUserId(userId);
apply.setCreateTime(now);
@@ -86,10 +86,9 @@ public class AuthenticationApplyServiceImpl implements AuthenticationApplyServic
apply.setRealName(realName);
apply.setType(type);
apply.setModifyTime(now);
- apply.setStatus(AuthenticationApplyConstant.STATUS_WAIT);
- authenticationApplyMapper.insert(apply);
+ userAuthenticationMapper.insert(apply);
- userInfo.setLowAuth(UserInfoConstant.STATUS_LOW_AUTH_WAIT);
+ userInfo.setLowAuth(UserInfoConstant.STATUS_LOW_AUTH_YES);
userInfo.setModifyTime(now);
userInfoService.updateUserInfo(userInfo);
}
@@ -114,17 +113,24 @@ public class AuthenticationApplyServiceImpl implements AuthenticationApplyServic
}
Date now = new Date();
- HighAuthenticationApply apply = new HighAuthenticationApply();
- apply.setId(UUID.randomUUID().toString());
- apply.setCreateTime(now);
- apply.setFileUrl(img);
- apply.setModifyTime(now);
- apply.setStatus(AuthenticationApplyConstant.STATUS_WAIT);
- apply.setUserId(userId);
-
- highAuthenticationApplyMapper.insert(apply);
-
- userInfo.setHighAuth(UserInfoConstant.STATUS_HIGHT_AUTH_WAIT);
+// HighAuthenticationApply apply = new HighAuthenticationApply();
+// apply.setId(UUID.randomUUID().toString());
+// apply.setCreateTime(now);
+// apply.setFileUrl(img);
+// apply.setModifyTime(now);
+// apply.setStatus(AuthenticationApplyConstant.STATUS_WAIT);
+// apply.setUserId(userId);
+//
+// highAuthenticationApplyMapper.insert(apply);
+
+ UserAuthentication exist = new UserAuthentication();
+ exist.setUserId(userId);
+ UserAuthentication userAuthentication = userAuthenticationMapper.selectOne(exist);
+ userAuthentication.setFileUrl3(img);
+ userAuthentication.setModifyTime(now);
+ userAuthenticationMapper.updateByPrimaryKey(userAuthentication);
+
+ userInfo.setHighAuth(UserInfoConstant.STATUS_HIGHT_AUTH_YES);
userInfo.setModifyTime(now);
userInfoService.updateUserInfo(userInfo);
}
diff --git a/blockchain-server/blockchain-server-user/src/main/resources/mapper/UserAuthenticationMapper.xml b/blockchain-server/blockchain-server-user/src/main/resources/mapper/UserAuthenticationMapper.xml
index 6e17e5b..77ae3b1 100644
--- a/blockchain-server/blockchain-server-user/src/main/resources/mapper/UserAuthenticationMapper.xml
+++ b/blockchain-server/blockchain-server-user/src/main/resources/mapper/UserAuthenticationMapper.xml
@@ -9,7 +9,7 @@
-
+