def get_method(self): self.collectionQueryString() qry = VideoQuery( """ v.title, v.videoId, v.flvThumbNailHref, v.createDate, v.href, v.flvHref, v.categoryId, v.addIp, v.typeState, v.userId, v.auditState,u.loginName """) qry.subjectId = self.subject.metaSubject.msubjId qry.gradeId = self.subject.metaGrade.gradeId if self.approveState == "" or self.approveState.isdigit() == False: qry.auditState = None else: qry.auditState = int(self.approveState) qry.k = self.params.safeGetStringParam("k") qry.f = self.params.safeGetStringParam("f") pager = self.params.createPager() pager.itemName = u"视频" pager.itemUnit = u"个" pager.pageSize = 25 pager.totalRows = qry.count() video_list = qry.query_map(pager) request.setAttribute("video_list", video_list) request.setAttribute("pager", pager) request.setAttribute("subject", self.subject) request.setAttribute("k", qry.k) request.setAttribute("f", qry.f) return "/WEB-INF/subjectmanage/video.ftl"
def get_video_querylist(self): qry = VideoQuery( " v.videoId, v.title, v.createDate, v.href, v.flvHref, v.userId, v.flvThumbNailHref,v.auditState " ) qry.auditState = None qry.orderType = VideoQuery.ORDER_TYPE_VIDEOID_DESC vIds = self.params.getStringParam("id") qry.videoIds = vIds video_list = qry.query_map() request.setAttribute("video_list", video_list)