111
k94314517
2025-07-19 99b600d34ee5e2d82eecc4df233c33ecd0e18841
server/services/src/main/java/com/doumee/service/business/impl/IdentityInfoServiceImpl.java
@@ -73,9 +73,18 @@
        ){
            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)
@@ -94,7 +103,6 @@
                    .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();
    }