企微前后台联调。

This commit is contained in:
2026-04-24 20:54:14 +08:00
parent 1f7b1e6d55
commit 1627e486a2
7 changed files with 26 additions and 14 deletions

View File

@@ -167,11 +167,11 @@ public class QweiDepartmentServiceImpl extends ServiceImpl<QweiDepartmentMapper,
@Override
@Transactional(rollbackFor = Exception.class)
public Map<String, Object> syncFromQiWei() {
public Map<String, Object> syncFromQiWei(String tenantIdParam) {
Map<String, Object> result = new HashMap<>();
try {
QiWeiConfig cfg = loadQiWeiConfig();
String tenantId = resolveTenantId(null);
String tenantId = resolveTenantId(tenantIdParam);
// 确保后续对 qwei_department 的查询/写入都带 tenant_id 条件
TenantContextHolder.setTenantId(tenantId);
String corpId = requireNonBlank(cfg.getCorpid(), "qiwei_config.corpid不能为空");

View File

@@ -173,11 +173,11 @@ public class QweiUserServiceImpl extends ServiceImpl<QweiUserMapper, QweiUser> i
@Override
@Transactional(rollbackFor = Exception.class)
public Map<String, Object> syncFromQiWei() {
public Map<String, Object> syncFromQiWei(String tenantIdParam) {
Map<String, Object> result = new HashMap<>();
String tenantId = null;
try {
tenantId = resolveTenantId(null);
tenantId = resolveTenantId(tenantIdParam);
TenantContextHolder.setTenantId(tenantId);
QiWeiConfig cfg = loadQiWeiConfig();