TASK:便利查询,查询所有用户id时根据用户身份限定查询范围
This commit is contained in:
@@ -105,7 +105,6 @@ public class GenerateTask {
|
|||||||
// 万相 -> pose transformation 补偿 一小时执行一次
|
// 万相 -> pose transformation 补偿 一小时执行一次
|
||||||
@Scheduled(fixedDelay = 5 * 60 * 1000)
|
@Scheduled(fixedDelay = 5 * 60 * 1000)
|
||||||
public void wxCompensationMechanism(){
|
public void wxCompensationMechanism(){
|
||||||
log.info("万相补偿机制开始执行");
|
|
||||||
List<APIGenerate> apiGenerates = apiGenerateService.getPendingTaskByStatus("wx");
|
List<APIGenerate> apiGenerates = apiGenerateService.getPendingTaskByStatus("wx");
|
||||||
if (apiGenerates != null && !apiGenerates.isEmpty()){
|
if (apiGenerates != null && !apiGenerates.isEmpty()){
|
||||||
for (APIGenerate apiGenerate : apiGenerates){
|
for (APIGenerate apiGenerate : apiGenerates){
|
||||||
|
|||||||
@@ -660,8 +660,15 @@ public class ConvenientInquiryServiceImpl extends ServiceImpl<QuestionnaireMappe
|
|||||||
}
|
}
|
||||||
|
|
||||||
public List<Map<String, Object>> getAllUserIdList() {
|
public List<Map<String, Object>> getAllUserIdList() {
|
||||||
|
Long accountId = UserContext.getUserHolder().getId();
|
||||||
|
Account account = accountMapper.selectById(accountId);
|
||||||
|
|
||||||
QueryWrapper<Account> queryWrapper = new QueryWrapper<>();
|
QueryWrapper<Account> queryWrapper = new QueryWrapper<>();
|
||||||
queryWrapper.select("id as value, user_name as label");
|
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 accountMapper.selectMaps(queryWrapper);
|
||||||
// return maps.stream().map(map -> (Long)map.get("id")).collect(Collectors.toList());
|
// return maps.stream().map(map -> (Long)map.get("id")).collect(Collectors.toList());
|
||||||
|
|||||||
Reference in New Issue
Block a user