예제 #1
0
	def getLawByKeywordId(self,keywordId):
		if keywordId:
			try:
				self.cursor_hyperlink.execute("SELECT origin_id,provider_id,isEnglish,target_id,action_type FROM article_en WHERE keyword_id=%s AND content_type='T' ORDER BY provider_id asc;" % keywordId)
				articleList=[]
				for row in self.cursor_hyperlink.fetchall():
					article=Law()
					article.originId=row[0]
					article.providerId=row[1]
					article.isEnglish=row[2]
					article.targetId=row[3]
					article.id=row[3]
					article.actionType=row[4]
					articleList.append(article)
				return articleList
			except Exception,e:
				self.log.error(e)