def outputByMysql(self, articles): try: service = MysqlService(self.log) service.setArticles(articles) return True except Exception as e: self.log.printError("outputByMysql error: '%s'" %(e)) return False
def markCover(self, images): '''mark cover image in mysql, change ifused value, ifused=1 ''' try: service = MysqlService(self.log) service.updateImages(images) return True except Exception as e: self.log.printError("markCover error: '%s'" %(e)) return False
def markContentImages(self, images): '''save content image in mysql, ifused=1 ''' try: service = MysqlService(self.log) service.setImages(images) return True except Exception as e: self.log.printError("markContentImages error: '%s'" %(e)) return False
def loadArticles(self, time): strTime = self.checkTime(time) service = MysqlService(self.log) articles = service.getArticles(strTime) return articles
def loadImages(self, num): service = MysqlService(self.log) images = service.getImages(num) return images