예제 #1
0
 def add_full(self, email_id, tomail, title, auth, attach_file):
     self.cur.execute(
         '''INSERT INTO gk7_douban_wait_emails(email_id, email_to_user, email_attach_file, email_title, email_auth, email_send_status, addtime) VALUES (%s, %s, %s, %s, %s, %s, %s)''',
         (email_id, tomail, attach_file, title, auth,
          gk7.STATUS.get('wait'),
          DateUtil.getDate(format='%Y-%m-%d %H:%M:%S')))
     self.conn.commit()
예제 #2
0
 def add(self, convert_id, request_user, book_html_local_path):
     self.cur.execute(
         '''INSERT INTO gk7_douban_wait_converts(convert_id, request_user, book_html_local_path, convert_status, addtime) VALUES(%s, %s, %s, %s, %s)''',
         (convert_id, request_user, book_html_local_path,
          gk7.STATUS.get('wait'),
          DateUtil.getDate(format='%Y-%m-%d %H:%M:%S')))
     self.conn.commit()
예제 #3
0
 def add(self, book_id, ebook_id, book_title, book_subtitle, book_author,
         book_size, book_cover_remote_path):
     self.cur.execute(
         '''INSERT INTO gk7_douban_books(id, ebook_id, book_title, book_subtitle, book_author, book_size, book_cover_remote_path, addtime) VALUES (%s, %s, %s, %s, %s, %s, %s, %s)''',
         (book_id, ebook_id, book_title, book_subtitle, book_author,
          book_size, book_cover_remote_path,
          DateUtil.getDate(format='%Y-%m-%d %H:%M:%S')))
     self.conn.commit()
예제 #4
0
 def add(self, convert_id, request_user, book_html_local_path):
     self.cur.execute('''INSERT INTO gk7_douban_wait_converts(convert_id, request_user, book_html_local_path, convert_status, addtime) VALUES(%s, %s, %s, %s, %s)''', (convert_id, request_user, book_html_local_path, gk7.STATUS.get('wait'), DateUtil.getDate(format='%Y-%m-%d %H:%M:%S')))
     self.conn.commit()
예제 #5
0
 def add(self, book_id, ebook_id, book_title, book_subtitle, book_author, book_size, book_cover_remote_path):
     self.cur.execute('''INSERT INTO gk7_douban_books(id, ebook_id, book_title, book_subtitle, book_author, book_size, book_cover_remote_path, addtime) VALUES (%s, %s, %s, %s, %s, %s, %s, %s)''', (book_id, ebook_id, book_title, book_subtitle, book_author, book_size, book_cover_remote_path, DateUtil.getDate(format='%Y-%m-%d %H:%M:%S')))
     self.conn.commit()
예제 #6
0
 def update_local_path(self, book_id, book_images_local_path):
     self.cur.execute('''UPDATE gk7_douban_book_img SET book_images_local_path = %s, updatetime = %s WHERE book_id = %s''', (gk7.BOOK_IMG_PATH_SPLIT.join(book_images_local_path), DateUtil.getDate(format='%Y-%m-%d %H:%M:%S'), book_id))
     self.conn.commit()
예제 #7
0
 def add(self, images_id, book_id, book_images_remote_path):
     self.cur.execute('''INSERT INTO gk7_douban_book_img(images_id, book_id, book_images_remote_path, addtime) VALUES (%s, %s, %s, %s)''', (images_id, book_id, gk7.BOOK_IMG_PATH_SPLIT.join(book_images_remote_path), DateUtil.getDate(format='%Y-%m-%d %H:%M:%S')))
     self.conn.commit()
예제 #8
0
 def add_full(self, email_id, tomail, title, auth, attach_file):
     self.cur.execute('''INSERT INTO gk7_douban_wait_emails(email_id, email_to_user, email_attach_file, email_title, email_auth, email_send_status, addtime) VALUES (%s, %s, %s, %s, %s, %s, %s)''', (email_id, tomail, attach_file, title, auth, gk7.STATUS.get('wait'), DateUtil.getDate(format='%Y-%m-%d %H:%M:%S')))
     self.conn.commit()