111
tjx
5 天以前 9d0ce1368fc71660a8b9873af8f275e7689b7394
src/main/java/com/gs/dingtalk/service/WorkWXService.java
@@ -226,22 +226,20 @@
                continue;
            }
            QwStaff existingStaff = qwStaffMapper.selectOne(
            qwStaffMapper.delete(
                new LambdaQueryWrapper<QwStaff>().eq(QwStaff::getAccount, user.getUserid())
            );
            if (existingStaff == null) {
                QwStaff qwStaff = new QwStaff();
                qwStaff.setName(user.getName());
                qwStaff.setAccount(user.getUserid());
                qwStaff.setDept(user.getDepartment() != null ? user.getDepartment().toString() : null);
            QwStaff qwStaff = new QwStaff();
            qwStaff.setName(user.getName());
            qwStaff.setAccount(user.getUserid());
            qwStaff.setDept(user.getDepartment() != null ? user.getDepartment().toString() : null);
                qwStaffMapper.insert(qwStaff);
                insertCount++;
            }
            qwStaffMapper.insert(qwStaff);
            insertCount++;
        }
        log.info("同步用户到QW_STAFF表完成,新增用户数: {}", insertCount);
        log.info("同步用户到QW_STAFF表完成,同步用户数: {}", insertCount);
        return insertCount;
    }