{"title":"@ActionMethod(UserInfoCmd.getAllAudioFileIds)\n public void getAllAudioFileIds(long trainingGroundId, long deviceId, FlowContext flowContext) {\n try {\n long userId = flowContext.getUserId();\n LogDebug.log("getAllAudioFileIds trainingGroundId:" + trainingGroundId + " deviceId:" + deviceId);\n UserIdType userIdType = GM.me.checkUserId(userId);\n if (userIdType == UserIdType.CAR_USER\n || userIdType == UserIdType.ERROR_USERID) {\n return;\n }\n \n List audioAndRegularList = new ArrayList<>();\n long regularId = trainingGroundId != 0 ? GM.me.getTrainingGroundDataById(trainingGroundId).getRegularId() : 0;\n if (regularId != 0) {\n // 该训练场绑定了规则\n audioAndRegularList.addAll(getAudioAndRegularListByRegularId(regularId));\n } else {\n // 该训练场没有绑定规则,去查询基站绑定规则\n DeviceEntity deviceEntity = GM.me.getBaseDeviceById(deviceId);\n long baseRegularId = deviceEntity != null ? deviceEntity.getRegularId() : 0;\n if (baseRegularId != 0) {\n // 该基站绑定了规则\n audioAndRegularList.addAll(getAudioAndRegularListByRegularId(baseRegularId));\n } else {\n // 基站和训练场都没有绑定规则\n }\n }\n \n BroadcastContext broadcastContext = BrokerClientHelper.getBroadcastContext();\n CmdInfo cmdInfo = CmdInfo.getCmdInfo(UserInfoCmd.cmd, UserInfoCmd.getAllAudioFileIds);\n broadcastContext.broadcast(cmdInfo, audioAndRegularList, userId);\n } catch (Exception ignored) {\n }\n }\n\nprivate List getAudioAndRegularListByRegularId(long regularId) {\n List specificRegularList = GM.me.getSpecificRegularListByRegularId(regularId);\n List audioAndRegularList = new ArrayList<>();\n for (SpecificRegular specificRegular : specificRegularList) {\n if (specificRegular.getAudioFileId() != 0) {\n AudioAndRegular audioAndRegular = new AudioAndRegular();\n audioAndRegular.setAudioFileId(specificRegular.getAudioFileId());\n audioAndRegularList.add(audioAndRegular);\n }\n }\n return audioAndRegularList;\n}