com.quhaodian.user.freemaker.NewUserDirective Maven / Gradle / Ivy
package com.quhaodian.user.freemaker;
import com.quhaodian.common.freemarker.ListDirective;
import com.quhaodian.data.page.Order;
import com.quhaodian.user.data.entity.UserInfo;
import com.quhaodian.user.data.service.UserInfoService;
import com.quhaodian.user.utils.ListUtils;
import org.springframework.beans.factory.annotation.Autowired;
import java.util.List;
/**
* Created by cng19 on 2017/6/26.
*/
public class NewUserDirective extends ListDirective {
@Override
public List list() {
List list = userInfoService.list(0,getInt("size"), null, ListUtils.list(Order.desc("id")));
return list;
}
@Autowired
UserInfoService userInfoService;
}