REQ-3581: 备份

This commit is contained in:
yanglin 2025-02-13 18:14:46 +08:00
parent 755b44b4cb
commit 9ef5e0a32d
5 changed files with 11 additions and 5 deletions

View File

@ -24,6 +24,10 @@ public class EssOrgDao extends ServiceImpl<EssOrgMapper, EssOrg> {
return lambdaQuery().in(EssOrg::getOuId, ouIds).list();
}
public Optional<EssOrg> find(Long ouId) {
return find(ouId, false);
}
public Optional<EssOrg> find(Long ouId, boolean forUpdate) {
return lambdaQuery()
.eq(EssOrg::getOuId, ouId)

View File

@ -59,6 +59,10 @@ public class EssSealPersonDao extends ServiceImpl<EssSealPersonMapper, EssSealPe
.list();
}
public Optional<EssSealPerson> find(String essSealId, Long personId) {
return find(essSealId, personId, false);
}
public Optional<EssSealPerson> find(String essSealId, Long personId, boolean forUpdate) {
return lambdaQuery()
.eq(EssSealPerson::getEssSealId, essSealId)

View File

@ -78,7 +78,7 @@ public class EssService {
EssSeal seal = essSealDao.findByEssSealId(request.getEssSealId()).orElse(null);
BizAssertions.assertNotNull(seal, "印章不存在: {}", request.getEssSealId());
EssSealPerson sealPerson = essSealPersonDao
.find(request.getEssSealId(), request.getPersonId(), false)
.find(request.getEssSealId(), request.getPersonId())
.orElse(null);
BizAssertions.assertNotNull(sealPerson, "印章人员不存在: {}", request.getEssSealId(), request.getPersonId());
return new SealAndPerson(seal, sealPerson);

View File

@ -93,7 +93,7 @@ public class OrgManager {
}
Optional<EssPerson> findSuperAdmin(Long ouId) {
EssOrg org = essOrgDao.find(ouId, true).orElse(null);
EssOrg org = essOrgDao.find(ouId).orElse(null);
BizAssertions.assertNotNull(org, "单位不存在: {}", ouId);
//noinspection DataFlowIssue
if (org.getSuperAdminPersonId() <= 0L)

View File

@ -15,8 +15,6 @@ import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
/**
@ -34,7 +32,7 @@ public class PrivateController {
@SuppressWarnings("DataFlowIssue")
@PostMapping("/private/ess/getOrgUsers")
public ApiResult<?> getOrgUsers(@RequestParam("ouId") Long ouId) {
EssOrg org = essOrgDao.find(ouId, false).orElse(null);
EssOrg org = essOrgDao.find(ouId).orElse(null);
BizAssertions.assertNotNull(org, "电子签单位不存在");
EssPerson superAdmin = orgManager.getSuperAdminOrThrow(ouId);
HashMap<String, Staff> staffs = new HashMap<>();