refactor(sis): 定时授权任务通过snail-job触发
Some checks are pending
Gitea Actions Demo / Explore-Gitea-Actions (push) Waiting to run

This commit is contained in:
2025-08-02 15:50:40 +08:00
parent c366a30488
commit f7cdf4bc09
9 changed files with 550 additions and 409 deletions

View File

@@ -13,8 +13,7 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import lombok.extern.slf4j.Slf4j;
import org.dromara.property.domain.vo.ResidentUnitVo;
import org.dromara.property.service.IResidentUnitService;
import org.dromara.sis.api.RemoteSisAuth;
import org.dromara.sis.api.domain.RemotePersonAuth;
import org.dromara.sis.api.RemoteSisAuthService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Service;
@@ -30,7 +29,6 @@ import java.util.List;
import java.util.Map;
import java.util.Collection;
import java.util.Objects;
import java.util.stream.Collectors;
/**
* 入驻员工Service业务层处理
@@ -50,7 +48,7 @@ public class ResidentPersonServiceImpl implements IResidentPersonService {
private IResidentUnitService residentUnitService;
@DubboReference
private RemoteSisAuth remoteSisAuth;
private RemoteSisAuthService remoteSisAuthService;
/**
* 查询入驻员工
@@ -159,7 +157,7 @@ public class ResidentPersonServiceImpl implements IResidentPersonService {
if (flag && e8Id != null) {
log.info("开始修改授权记录, {}", bo.getUserName());
// 先删除,定时任务增加
Boolean auth = remoteSisAuth.deletePersonAuth(List.of(update.getId()), List.of(e8Id));
Boolean auth = remoteSisAuthService.deletePersonAuth(List.of(update.getId()), List.of(e8Id));
Assert.isTrue(auth, "修改授权记录失败!");
}
@@ -217,7 +215,7 @@ public class ResidentPersonServiceImpl implements IResidentPersonService {
.filter(Objects::nonNull)
.toList();
if (!e8Ids.isEmpty()) {
boolean auth = remoteSisAuth.deletePersonAuth(ids, e8Ids);
boolean auth = remoteSisAuthService.deletePersonAuth(ids, e8Ids);
Assert.isTrue(auth, "删除授权记录失败!");
}
}