| | |
| | | ){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST); |
| | | } |
| | | if(Objects.nonNull(identityInfo.getId())){ |
| | | IdentityInfo model = identityInfoMapper.selectOne(new QueryWrapper<IdentityInfo>().lambda() |
| | | .eq(IdentityInfo::getMemberId,identityInfo.getMemberId()) |
| | | .eq(IdentityInfo::getType,identityInfo.getType()) |
| | | .last("limit 1") |
| | | ); |
| | | if(Objects.nonNull(model)){ |
| | | identityInfo.setId(model.getId()); |
| | | this.updateById(identityInfo); |
| | | }else{ |
| | | return identityInfo.getId(); |
| | | } |
| | | |
| | | |
| | | //查询用户是否已存在当前身份 |
| | | if(identityInfoMapper.selectCount(new QueryWrapper<IdentityInfo>().lambda() |
| | | .eq(IdentityInfo::getDeleted,Constants.ZERO) |
| | |
| | | .set(Constants.equalsInteger(identityInfo.getType(),Constants.ONE),Member::getDriverIdentity,Constants.ONE) |
| | | .set(Constants.equalsInteger(identityInfo.getType(),Constants.TWO),Member::getChefIdentity,Constants.ONE) |
| | | .eq(Member::getId,identityInfo.getMemberId())); |
| | | } |
| | | return identityInfo.getId(); |
| | | } |
| | | |
| | |
| | | memberMapper.update(new UpdateWrapper<Member>().lambda() |
| | | .set(Member::getUpdateUser,user.getId()) |
| | | .set(Member::getUpdateTime,date) |
| | | .set(Constants.equalsInteger(auditDTO.getAuditStatus(),Constants.ZERO),Member::getAutoReceiveStatus,Constants.ONE) |
| | | .set(Constants.equalsInteger(identityInfo.getType(),Constants.ZERO),Member::getWorkerIdentity, auditDTO.getAuditStatus() ) |
| | | .set(Constants.equalsInteger(identityInfo.getType(),Constants.ONE),Member::getDriverIdentity , auditDTO.getAuditStatus() ) |
| | | .set(Constants.equalsInteger(identityInfo.getType(),Constants.TWO),Member::getChefIdentity , auditDTO.getAuditStatus() ) |