def show_list(self): qry = UserQuery(""" u.userId, u.loginName, u.nickName, u.trueName, u.userIcon, u.userStatus, u.pushState,u.pushUserId, u.email, u.subjectId, u.gradeId, u.createDate, u.blogIntroduce, subj.subjectName, grad.gradeName, unit.unitName, u.positionId """) qry.userStatus = 0 qry.pushState = 2 # 待推送 qry.isFamous = True pager = self.params.createPager() pager.itemName = u"名师" pager.itemUnit = u"位" pager.pageSize = 25 pager.totalRows = qry.count() user_list = qry.query_map(pager) request.setAttribute("user_list", user_list) request.setAttribute("pager", pager) return "/WEB-INF/push/admin_push_famous_list.ftl"
def get_channel_teacher(self): qry = UserQuery(""" u.loginName, u.userIcon, u.nickName, subj.subjectId """) qry.isFamous = True channel_teachers = qry.query_map(6) request.setAttribute("channel_teachers", channel_teachers)