|
|
@ -7,10 +7,7 @@ import cn.hutool.core.util.StrUtil; |
|
|
import com.ccsens.cloudutil.feign.TallFeignClient; |
|
|
import com.ccsens.cloudutil.feign.TallFeignClient; |
|
|
import com.ccsens.health.bean.dto.JourneyDto; |
|
|
import com.ccsens.health.bean.dto.JourneyDto; |
|
|
import com.ccsens.health.bean.dto.UserDto; |
|
|
import com.ccsens.health.bean.dto.UserDto; |
|
|
import com.ccsens.health.bean.po.Employee; |
|
|
import com.ccsens.health.bean.po.*; |
|
|
import com.ccsens.health.bean.po.EmployeeExample; |
|
|
|
|
|
import com.ccsens.health.bean.po.HealthQRCodeExample; |
|
|
|
|
|
import com.ccsens.health.bean.po.RealNameAuth; |
|
|
|
|
|
import com.ccsens.health.bean.vo.UserVo; |
|
|
import com.ccsens.health.bean.vo.UserVo; |
|
|
import com.ccsens.health.persist.dao.EmployeeDao; |
|
|
import com.ccsens.health.persist.dao.EmployeeDao; |
|
|
import com.ccsens.health.persist.dao.HealthRecordsDao; |
|
|
import com.ccsens.health.persist.dao.HealthRecordsDao; |
|
|
@ -78,10 +75,19 @@ public class UserService implements IUserService{ |
|
|
//获取个人信息和tall的userId
|
|
|
//获取个人信息和tall的userId
|
|
|
UserDto.UserInfo userInfo = params.getParam(); |
|
|
UserDto.UserInfo userInfo = params.getParam(); |
|
|
Long userId = params.getUserId(); |
|
|
Long userId = params.getUserId(); |
|
|
|
|
|
//检查是否认证过
|
|
|
|
|
|
RealNameAuthExample realNameAuthExample = new RealNameAuthExample(); |
|
|
|
|
|
realNameAuthExample.createCriteria().andUserIdEqualTo(userId); |
|
|
|
|
|
List<RealNameAuth> realNameAuthList = realNameAuthDao.selectByExample(realNameAuthExample); |
|
|
|
|
|
if(CollectionUtil.isNotEmpty(realNameAuthList)){ |
|
|
|
|
|
//如果不为空代表已经认证过,直接返回认证信息
|
|
|
|
|
|
throw new BaseException(CodeEnum.ALREADY_REAL_AUTH); |
|
|
|
|
|
} |
|
|
//实名认证,检查是否属于该学校的学生
|
|
|
//实名认证,检查是否属于该学校的学生
|
|
|
//保存信息
|
|
|
//保存信息
|
|
|
RealNameAuth realNameAuth = new RealNameAuth(); |
|
|
RealNameAuth realNameAuth = new RealNameAuth(); |
|
|
realNameAuth.setId(snowflake.nextId()); |
|
|
realNameAuth.setId(snowflake.nextId()); |
|
|
|
|
|
realNameAuth.setUserId(userId); |
|
|
realNameAuth.setIdCard(userInfo.getIdCard()); |
|
|
realNameAuth.setIdCard(userInfo.getIdCard()); |
|
|
realNameAuth.setName(userInfo.getName()); |
|
|
realNameAuth.setName(userInfo.getName()); |
|
|
realNameAuth.setNo(userInfo.getNo()); |
|
|
realNameAuth.setNo(userInfo.getNo()); |
|
|
|