身份认证不需要审核

pull/1/head
huangxinlu 5 years ago
parent f2b5db2aeb
commit 8248a1d530
  1. 4
      blockchain-server/blockchain-server-user/src/main/java/com/blockchain/server/user/entity/UserAuthentication.java
  2. 44
      blockchain-server/blockchain-server-user/src/main/java/com/blockchain/server/user/service/impl/AuthenticationApplyServiceImpl.java
  3. 2
      blockchain-server/blockchain-server-user/src/main/resources/mapper/UserAuthenticationMapper.xml

@ -74,7 +74,7 @@ public class UserAuthentication extends BaseModel {
/** /**
* 修改时间 * 修改时间
*/ */
@Column(name = "midify_time") @Column(name = "modify_time")
private java.util.Date midifyTime; private java.util.Date modifyTime;
} }

@ -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.enums.UserEnums;
import com.blockchain.server.user.common.exceprion.UserException; import com.blockchain.server.user.common.exceprion.UserException;
import com.blockchain.server.user.common.utils.FileUploadHelper; import com.blockchain.server.user.common.utils.FileUploadHelper;
import com.blockchain.server.user.entity.AuthenticationApply; import com.blockchain.server.user.entity.*;
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.mapper.AuthenticationApplyMapper; import com.blockchain.server.user.mapper.AuthenticationApplyMapper;
import com.blockchain.server.user.mapper.HighAuthenticationApplyMapper; 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.AuthenticationApplyLogService;
import com.blockchain.server.user.service.AuthenticationApplyService; import com.blockchain.server.user.service.AuthenticationApplyService;
import com.blockchain.server.user.service.UserInfoService; import com.blockchain.server.user.service.UserInfoService;
@ -38,6 +36,8 @@ public class AuthenticationApplyServiceImpl implements AuthenticationApplyServic
private HighAuthenticationApplyMapper highAuthenticationApplyMapper; private HighAuthenticationApplyMapper highAuthenticationApplyMapper;
@Autowired @Autowired
private AuthenticationApplyLogService authenticationApplyLogService; private AuthenticationApplyLogService authenticationApplyLogService;
@Autowired
private UserAuthenticationMapper userAuthenticationMapper;
@Override @Override
@ -75,7 +75,7 @@ public class AuthenticationApplyServiceImpl implements AuthenticationApplyServic
String[] filePath = imgs.split(","); String[] filePath = imgs.split(",");
AuthenticationApply apply = new AuthenticationApply(); UserAuthentication apply = new UserAuthentication();
apply.setId(UUID.randomUUID().toString()); apply.setId(UUID.randomUUID().toString());
apply.setUserId(userId); apply.setUserId(userId);
apply.setCreateTime(now); apply.setCreateTime(now);
@ -86,10 +86,9 @@ public class AuthenticationApplyServiceImpl implements AuthenticationApplyServic
apply.setRealName(realName); apply.setRealName(realName);
apply.setType(type); apply.setType(type);
apply.setModifyTime(now); apply.setModifyTime(now);
apply.setStatus(AuthenticationApplyConstant.STATUS_WAIT); userAuthenticationMapper.insert(apply);
authenticationApplyMapper.insert(apply);
userInfo.setLowAuth(UserInfoConstant.STATUS_LOW_AUTH_WAIT); userInfo.setLowAuth(UserInfoConstant.STATUS_LOW_AUTH_YES);
userInfo.setModifyTime(now); userInfo.setModifyTime(now);
userInfoService.updateUserInfo(userInfo); userInfoService.updateUserInfo(userInfo);
} }
@ -114,17 +113,24 @@ public class AuthenticationApplyServiceImpl implements AuthenticationApplyServic
} }
Date now = new Date(); Date now = new Date();
HighAuthenticationApply apply = new HighAuthenticationApply(); // HighAuthenticationApply apply = new HighAuthenticationApply();
apply.setId(UUID.randomUUID().toString()); // apply.setId(UUID.randomUUID().toString());
apply.setCreateTime(now); // apply.setCreateTime(now);
apply.setFileUrl(img); // apply.setFileUrl(img);
apply.setModifyTime(now); // apply.setModifyTime(now);
apply.setStatus(AuthenticationApplyConstant.STATUS_WAIT); // apply.setStatus(AuthenticationApplyConstant.STATUS_WAIT);
apply.setUserId(userId); // apply.setUserId(userId);
//
highAuthenticationApplyMapper.insert(apply); // highAuthenticationApplyMapper.insert(apply);
userInfo.setHighAuth(UserInfoConstant.STATUS_HIGHT_AUTH_WAIT); 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); userInfo.setModifyTime(now);
userInfoService.updateUserInfo(userInfo); userInfoService.updateUserInfo(userInfo);
} }

@ -9,7 +9,7 @@
<result property="fileUrl2" column="file_url2"/> <result property="fileUrl2" column="file_url2"/>
<result property="fileUrl1" column="file_url1"/> <result property="fileUrl1" column="file_url1"/>
<result property="fileUrl4" column="file_url4"/> <result property="fileUrl4" column="file_url4"/>
<result property="midifyTime" column="midify_time"/> <result property="modifyTime" column="modify_time"/>
<result property="fileUrl3" column="file_url3"/> <result property="fileUrl3" column="file_url3"/>
<result property="id" column="id"/> <result property="id" column="id"/>
<result property="type" column="type"/> <result property="type" column="type"/>

Loading…
Cancel
Save