Commit 45672db0 authored by liwei's avatar liwei

增加了人脸识别通过身份证获取性别

parent 2e900013
......@@ -271,6 +271,8 @@ public class FaceVerifyServiceImpl extends ServiceImpl<MemInfoRepository, MemInf
Integer coinCount = Integer.valueOf(dictData.getDictValue());
memInfo.setMemRealAuthen("1");
memInfo.setMemRealAuthenDate(new Date());
//根据身份证号获取性别
memInfo.setMemSex(Integer.valueOf(idCard.substring(16, 17)) % 2 == 0 ? "1" : "0");
//截取idCard身份证号 获取出生年月日20021029 变成2002-10-29
String birth = idCard.substring(6, 14);
String birthDate = birth.substring(0, 4) + "-" + birth.substring(4, 6) + "-" + birth.substring(6);
......
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