def UpdateTaskProcess(characterId,taskID,props): '''更新任务的进度''' sql = "UPDATE tb_task_process SET " sql = util.forEachUpdatePropsForIncrement(sql, props) sql += " where characterId=%d and taskId =%d" %(characterId,taskID) cursor = dbaccess.dbpool.cursor() count = cursor.execute(sql) dbaccess.dbpool.commit() cursor.close() if count: return True return False
def updateMainTaskRecord(characterId,props): '''更新角色的主线任务记录''' sql = "UPDATE tb_task_main_record SET " sql = util.forEachUpdatePropsForIncrement(sql, props) sql += " where characterId=%d " %(characterId) cursor = dbaccess.dbpool.cursor() count = cursor.execute(sql) dbaccess.dbpool.commit() cursor.close() if count: return True return False
def updateMainTaskRecord(characterId, props): '''更新角色的主线任务记录''' sql = "UPDATE tb_task_main_record SET " sql = util.forEachUpdatePropsForIncrement(sql, props) sql += " where characterId=%d " % (characterId) cursor = dbaccess.dbpool.cursor() count = cursor.execute(sql) dbaccess.dbpool.commit() cursor.close() if count: return True return False
def UpdateTaskProcess(characterId, taskID, props): '''更新任务的进度''' sql = "UPDATE tb_task_process SET " sql = util.forEachUpdatePropsForIncrement(sql, props) sql += " where characterId=%d and taskId =%d" % (characterId, taskID) cursor = dbaccess.dbpool.cursor() count = cursor.execute(sql) dbaccess.dbpool.commit() cursor.close() if count: return True return False
def updateQuestGoal(questRecordId,questGoalId,props,limitprops= {}): '''更新角色任务进度 @param characterId: int 角色的id @param taskId: int 任务的id ''' sql = 'update `tb_task_goal_progress` set' sql = util.forEachUpdatePropsForIncrement(sql, props) sql += " where questRecordId=%d and questGoalId = %d" %(questRecordId,questGoalId) sql = util.produceSQLlimit(sql, limitprops) cursor = dbaccess.dbpool.cursor() count = cursor.execute(sql) dbaccess.dbpool.commit() cursor.close() if count: return True return False
def updateQuestGoal(questRecordId, questGoalId, props, limitprops={}): '''更新角色任务进度 @param characterId: int 角色的id @param taskId: int 任务的id ''' sql = 'update `tb_task_goal_progress` set' sql = util.forEachUpdatePropsForIncrement(sql, props) sql += " where questRecordId=%d and questGoalId = %d" % (questRecordId, questGoalId) sql = util.produceSQLlimit(sql, limitprops) cursor = dbaccess.dbpool.cursor() count = cursor.execute(sql) dbaccess.dbpool.commit() cursor.close() if count: return True return False