def updateUserInfo(self, parameter): oparameter = self.getUserParameter() oparameter.update(parameter) template = t_update_user #print oparameter r = db.runInsertSql(template, oparameter) return r
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
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]
def registerUser(parameter): template = t_insert_user r = db.runInsertSql(template, parameter) return r
def deleteUser(parameter): template = t_delete_user r = db.runInsertSql(template, parameter) return r
def signActivity(parameter): template = t_delete_sign_ac r = db.runInsertSql(template, parameter) return r
def insertActivity(parameter): template = t_insert_activity r = db.runInsertSql(template, parameter) return r
def insertComment(parameter): template = t_insert_comment r = db.runInsertSql(template, parameter) return r