All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.quhaodian.notice.freemarker.UserNotificationCatalogDirective Maven / Gradle / Ivy

package com.quhaodian.notice.freemarker;

import com.quhaodian.common.freemarker.ListDirective;
import com.quhaodian.data.page.Filter;
import com.quhaodian.data.page.Order;
import com.quhaodian.data.page.Pageable;
import com.quhaodian.notice.data.entity.UserNotificationCatalog;
import com.quhaodian.notice.data.service.UserNotificationCatalogService;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;

public class UserNotificationCatalogDirective extends ListDirective {
  @Override
  public List list() {

    Integer size = getInt("size");
    Integer id = getInt("id");
    Pageable pagex = new Pageable();
    pagex.setPageSize(size);
    pagex.setPageNumber(1);
    pagex.getFilters().add(Filter.eq("parent.id", id));
    pagex.getOrders().add(Order.asc("code"));
    return catalogService.list(0, size, pagex.getFilters(), pagex.getOrders());
  }

  @Autowired
  private UserNotificationCatalogService catalogService;
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy