MrShi
2025-08-21 d98b610bd0793dd5d29f623400a1d0a81bb55334
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();
    }
@@ -459,6 +467,7 @@
        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() )