TASK:便利查询,查询所有用户id时根据用户身份限定查询范围

This commit is contained in:
2025-08-28 11:29:30 +08:00
parent 9e2ea2de62
commit 56b56981b1
2 changed files with 7 additions and 1 deletions

View File

@@ -105,7 +105,6 @@ public class GenerateTask {
// 万相 -> pose transformation 补偿 一小时执行一次
@Scheduled(fixedDelay = 5 * 60 * 1000)
public void wxCompensationMechanism(){
log.info("万相补偿机制开始执行");
List<APIGenerate> apiGenerates = apiGenerateService.getPendingTaskByStatus("wx");
if (apiGenerates != null && !apiGenerates.isEmpty()){
for (APIGenerate apiGenerate : apiGenerates){

View File

@@ -660,8 +660,15 @@ public class ConvenientInquiryServiceImpl extends ServiceImpl<QuestionnaireMappe
}
public List<Map<String, Object>> getAllUserIdList() {
Long accountId = UserContext.getUserHolder().getId();
Account account = accountMapper.selectById(accountId);
QueryWrapper<Account> queryWrapper = new QueryWrapper<>();
queryWrapper.select("id as value, user_name as label");
if ((account.getSystemUser().equals(7) || account.getSystemUser().equals(5))
&& !StringUtil.isNullOrEmpty(account.getOrganizationName())) {
queryWrapper.lambda().eq(Account::getOrganizationName, account.getOrganizationName());
}
return accountMapper.selectMaps(queryWrapper);
// return maps.stream().map(map -> (Long)map.get("id")).collect(Collectors.toList());