Пример #1
0
 def updateUserInfo(self, parameter):
     oparameter = self.getUserParameter()
     oparameter.update(parameter)
     template = t_update_user
     #print oparameter
     r = db.runInsertSql(template, oparameter)
     return r
Пример #2
0
 def unfollowUser(self, parameter):
     template = t_delete_unfollow_user
     r = db.runInsertSql(template, parameter)
     self.updateUserInfo({'fol': self.follow - 1})
     foluser = self.queryByUserid({'id': parameter['uid_2']})
     foluser.updateUserInfo({'fan': foluser.fans - 1})
     return r
Пример #3
0
 def insertWorks(parameter):
     template = t_insert_works
     #r = db.insert_works(u_id, w_name, cont, img, d_post, p_id)
     r = db.runInsertSql(template, parameter)
     template = t_query_lastworks
     r = db.runQuerySql(template, parameter, 1)
     return r[0]
Пример #4
0
 def registerUser(parameter):
     template = t_insert_user
     r = db.runInsertSql(template, parameter)
     return r
Пример #5
0
 def deleteUser(parameter):
     template = t_delete_user
     r = db.runInsertSql(template, parameter)
     return r
Пример #6
0
 def signActivity(parameter):
     template = t_delete_sign_ac
     r = db.runInsertSql(template, parameter)
     return r
Пример #7
0
 def insertActivity(parameter):
     template = t_insert_activity
     r = db.runInsertSql(template, parameter)
     return r
Пример #8
0
 def insertComment(parameter):
     template = t_insert_comment
     r = db.runInsertSql(template, parameter)
     return r