Commit 4b162fc0 authored by hanfeng's avatar hanfeng

修改实名认证

parent 9412b2a6
......@@ -47,7 +47,7 @@ public class IdInformation implements Serializable {
* 用户id
*/
@Column(name = "user_login_id")
private Integer userLonginId;
private Integer userLoginId;
/**
*
......
......@@ -4,6 +4,7 @@ package com.xxfc.platform.universal.service;
import cn.hutool.core.map.MapUtil;
import com.alibaba.fastjson.JSONObject;
import com.github.wxiaoqi.security.admin.feign.UserFeign;
import com.github.wxiaoqi.security.common.exception.BaseException;
import com.github.wxiaoqi.security.common.msg.ObjectRestResponse;
import com.github.wxiaoqi.security.common.util.process.ResultCode;
import com.xxfc.platform.universal.entity.IdInformation;
......@@ -335,20 +336,21 @@ public class CertificationService {
Example exa = new Example(IdInformation.class);
Example.Criteria criteria = exa.createCriteria();
criteria.andEqualTo("idNumber",idInformation.getIdNumber());
criteria.andEqualTo("userLonginId",idInformation.getUserLonginId());
List<IdInformation> idInformations = idInformationMapper.selectByExample(exa);
if (CollectionUtils.isEmpty(idInformations)) {
// criteria.andEqualTo("userLoginId",idInformation.getUserLoginId());
List<IdInformation> idInformatics = idInformationMapper.selectByExample(exa);
if (CollectionUtils.isEmpty(idInformatics)) {
idInformation.setCrtTime(new Date());
idInformationMapper.insertSelective(idInformation);
}else {
IdInformation idInformation1 = idInformations.get(0);
idInformation.setId(idInformation1.getId());
idInformation.setUpdTime(new Date());
idInformationMapper.updateByPrimaryKeySelective(idInformation);
// IdInformation idInformation1 = idInformatics.get(0);
// idInformation.setId(idInformation1.getId());
// idInformation.setUpdTime(new Date());
// idInformationMapper.updateByPrimaryKeySelective(idInformation);
throw new BaseException("该身份证已存在,不要重复认证!");
}
log.info("----addIdInformation---userid==="+idInformation.getUserLonginId()+"----name====" + idInformation.getName()+"---IdNumber==="+idInformation.getIdNumber());
log.info("----addIdInformation---userid==="+idInformation.getUserLoginId()+"----name====" + idInformation.getName()+"---IdNumber==="+idInformation.getIdNumber());
//认证成功后修改用户,用户认证状态
ObjectRestResponse authentication = userFeign.authentication(idInformation.getUserLonginId(), idInformation.getName(), idInformation.getIdNumber(), 1);
ObjectRestResponse authentication = userFeign.authentication(idInformation.getUserLoginId(), idInformation.getName(), idInformation.getIdNumber(), 1);
return ObjectRestResponse.succ(idInformation.getId());
} catch (Exception e) {
e.printStackTrace();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment