test_class.declarator: logService
test_class.modifier: @Autowired
      private
test_class.original_string: @Autowired
      private LogService logService;
test_class.type: LogService
test_class.var_name: logService
test_class.file: myth-admin/src/test/java/org/dromara/myth/admin/service/log/MongoLogServiceImplTest.java
test_class.identifier: MongoLogServiceImplTest
test_case.body: @Test
      public void listByPage() {
  
          ConditionQuery query = new ConditionQuery();
  
          query.setApplicationName("alipay-service");
  
          PageParameter pageParameter = new PageParameter(1, 5);
  
          query.setPageParameter(pageParameter);
  
          final CommonPager<LogVO> voCommonPager = logService.listByPage(query);
  
  
      }
test_case.class_method_signature: MongoLogServiceImplTest.listByPage()
test_case.full_signature: @Test public void listByPage()
test_case.identifier: listByPage
test_case.invocations: setApplicationName setPageParameter listByPage
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void listByPage()
focal_class.declarator: mongoTemplate
focal_class.modifier: private final
focal_class.original_string: private final MongoTemplate mongoTemplate;
focal_class.type: MongoTemplate
focal_class.var_name: mongoTemplate
focal_class.file: myth-admin/src/main/java/org/dromara/myth/admin/service/log/MongoLogServiceImpl.java
focal_class.identifier: MongoLogServiceImpl
focal_class.interfaces: implements LogService
focal_class.class_method_signature: MongoLogServiceImpl.listByPage(final ConditionQuery query)
focal_class.full_signature: @Override public CommonPager<LogVO> listByPage(final ConditionQuery query)
focal_class.identifier: listByPage
focal_class.modifiers: @Override public
focal_class.parameters: (final ConditionQuery query)
focal_class.return: CommonPager<LogVO>
focal_class.signature: CommonPager<LogVO> listByPage(final ConditionQuery query)
focal_class.class_method_signature: MongoLogServiceImpl.batchRemove(final List<String> ids, final String appName)
focal_class.full_signature: @Override public Boolean batchRemove(final List<String> ids, final String appName)
focal_class.identifier: batchRemove
focal_class.modifiers: @Override public
focal_class.parameters: (final List<String> ids, final String appName)
focal_class.return: Boolean
focal_class.signature: Boolean batchRemove(final List<String> ids, final String appName)
focal_class.class_method_signature: MongoLogServiceImpl.updateRetry(final String id, final Integer retry, final String appName)
focal_class.full_signature: @Override public Boolean updateRetry(final String id, final Integer retry, final String appName)
focal_class.identifier: updateRetry
focal_class.modifiers: @Override public
focal_class.parameters: (final String id, final Integer retry, final String appName)
focal_class.return: Boolean
focal_class.signature: Boolean updateRetry(final String id, final Integer retry, final String appName)
focal_method.body: @Override
      public CommonPager<LogVO> listByPage(final ConditionQuery query) {
          CommonPager<LogVO> voCommonPager = new CommonPager<>();
          final String mongoTableName =
                  RepositoryPathUtils.buildMongoTableName(query.getApplicationName());
          final PageParameter pageParameter = query.getPageParameter();
          Query baseQuery = new Query();
          if (StringUtils.isNoneBlank(query.getTransId())) {
              baseQuery.addCriteria(new Criteria("transId").is(query.getTransId()));
          }
          final long totalCount = mongoTemplate.count(baseQuery, mongoTableName);
          if (totalCount <= 0) {
              return voCommonPager;
          }
          final int currentPage = pageParameter.getCurrentPage();
          final int pageSize = pageParameter.getPageSize();
          int start = (currentPage - 1) * pageSize;
          voCommonPager.setPage(PageHelper.buildPage(query.getPageParameter(), (int) totalCount));
          baseQuery.skip(start).limit(pageSize);
          final List<MongoAdapter> mongoAdapters =
                  mongoTemplate.find(baseQuery, MongoAdapter.class, mongoTableName);
          if (CollectionUtils.isNotEmpty(mongoAdapters)) {
              final List<LogVO> recoverVOS =
                      mongoAdapters
                              .stream()
                              .map(ConvertHelper::buildVO)
                              .collect(Collectors.toList());
              voCommonPager.setDataList(recoverVOS);
          }
          return voCommonPager;
      }
focal_method.class_method_signature: MongoLogServiceImpl.listByPage(final ConditionQuery query)
focal_method.full_signature: @Override public CommonPager<LogVO> listByPage(final ConditionQuery query)
focal_method.identifier: listByPage
focal_method.invocations: buildMongoTableName getApplicationName getPageParameter isNoneBlank getTransId addCriteria is getTransId count getCurrentPage getPageSize setPage buildPage getPageParameter limit skip find isNotEmpty collect map stream toList setDataList
focal_method.modifiers: @Override public
focal_method.parameters: (final ConditionQuery query)
focal_method.return: CommonPager<LogVO>
focal_method.signature: CommonPager<LogVO> listByPage(final ConditionQuery query)