From c5bdd8fd4a633b95e98e179e1286bc78b32dbb88 Mon Sep 17 00:00:00 2001 From: Michael Wilson Date: Thu, 2 Oct 2014 14:14:53 +0200 Subject: -Suchfenster "Image bearbeiten", "Image löschen", Veranstaltung bearbeiten", "Veranstaltung löschen" wurden vereinfacht (nur Anzeige, noch nicht Logik) -Login speichert nun den gesamten Login als User, nicht nur den String vor dem "@uni......." -SQL wurde umgebogen um den Login als primary key für den User festzulegen und damit umzugehen --- dozentenmodulserver/src/main/java/sql/SQL.java | 50 +++++++++++++++++++++++--- 1 file changed, 45 insertions(+), 5 deletions(-) (limited to 'dozentenmodulserver/src/main/java/sql/SQL.java') diff --git a/dozentenmodulserver/src/main/java/sql/SQL.java b/dozentenmodulserver/src/main/java/sql/SQL.java index 349f7f80..92af9f14 100644 --- a/dozentenmodulserver/src/main/java/sql/SQL.java +++ b/dozentenmodulserver/src/main/java/sql/SQL.java @@ -189,9 +189,9 @@ public class SQL { if (ret.next() == false) { - String id = UUID.randomUUID().toString(); + //String id = UUID.randomUUID().toString(); stm.executeUpdate("INSERT INTO `bwLehrpool`.`m_user`(`userID`,`loginName`,`nachname`,`vorname`,`mail`,`lastLogin`,`institution`)VALUES('" - + id + + login + "','" + login + "','" @@ -251,6 +251,40 @@ public class SQL { Statement stm = con.createStatement(); String uid = UUID.randomUUID().toString(); + + log.info(" - Query is: "+"INSERT INTO `bwLehrpool`.`m_VLData_imageInfo`(`GUID_imageID`,`imageVersion`,`image_name`,`image_description`,`image_path`,`image_lastCall`,`image_create_time`,`image_update_time`,`image_owner`,`image_change_by`,`rec_create_time`,`rec_change_time`,`rec_owner`,`rec_change_by`,`content_operatingSystem`,`status_isCompressed`,`status_isSecure`,`status_isOptimzed`,`status_isValid`,`status_isReady`,`status_isDeleted`,`status_isLastOfficialVersion`,`cond_hasLicenseRestriction`,`cond_hasInternetRestriction`,`cond_minRAM`,`cond_minCPUs`,`image_isTemplate`,`image_filesize`,`image_syncMode`)VALUES('" + + uid // GUID_imageID + + "',1,'" // imageVersion + + imagename // image_name + // Ticket #1144 ist hier zu lösen, desc sollte nicht zu lang sein, sonst merkert die DB + + "','" +desc //image_description + + "','" + imagePath // image_path + + "','" + formatter.format(new Date()) // image_lastCall + + "','" + formatter.format(new Date()) // image_create_time + + "','" + formatter.format(new Date()) // image_update_time + + "','" + pk_person // image_owner + + "','" + pk_person // image_change_by + + "','" + formatter.format(new Date()) // rec_create_time + + "','" + formatter.format(new Date()) // rec_change_time + + "','" + pk_person // rec_owner + + "','" + pk_person // rec_change_by + + "','" + pk_os // content_operatingSystem + + "',1" // status_isCompressed + + ",1" // status_isSecure + + ",1" // status_isOptimzed + + ",1" // status_isValid + + ",1" // status_isReady + + ",0" // status_isDeleted + + ",0,'" // status_isLastOfficialVersion + + license_bol // cond_hasLicenseRestriction + + "','" + internet_bol // cond_hasInternetRestriction + + "','" + ram // cond_minRAM + + "','" + cpu // cond_minCPUs + + "','0'" //image_isTemplate + + ",'" + filesize //image_filesize + + "','" + shareMode //shareMode + + "');"); + stm.executeUpdate("INSERT INTO `bwLehrpool`.`m_VLData_imageInfo`(`GUID_imageID`,`imageVersion`,`image_name`,`image_description`,`image_path`,`image_lastCall`,`image_create_time`,`image_update_time`,`image_owner`,`image_change_by`,`rec_create_time`,`rec_change_time`,`rec_owner`,`rec_change_by`,`content_operatingSystem`,`status_isCompressed`,`status_isSecure`,`status_isOptimzed`,`status_isValid`,`status_isReady`,`status_isDeleted`,`status_isLastOfficialVersion`,`cond_hasLicenseRestriction`,`cond_hasInternetRestriction`,`cond_minRAM`,`cond_minCPUs`,`image_isTemplate`,`image_filesize`,`image_syncMode`)VALUES('" + uid // GUID_imageID + "',1,'" // imageVersion @@ -279,8 +313,8 @@ public class SQL { + "','" + internet_bol // cond_hasInternetRestriction + "','" + ram // cond_minRAM + "','" + cpu // cond_minCPUs - + "',0'" //image_isTemplate - + "','" + filesize //image_filesize + + "','0'" //image_isTemplate + + ",'" + filesize //image_filesize + "','" + shareMode //shareMode + "');"); con.commit(); @@ -563,7 +597,8 @@ public class SQL { + "',`cond_minCPUs` = '" + cpu + "',`image_isTemplate` = '" - + isTemplate + //+ isTemplate + + "'0'" + "',`content_operatingSystem` = '" + ospk + "',`image_filesize` = '" @@ -754,6 +789,11 @@ public class SQL { Statement stm = con.createStatement(); String image_path="prod/"+name; + log.info(new Date() + " - Updating ImagePath with: UPDATE `bwLehrpool`.`m_VLData_imageInfo` SET `image_path` = '" + + image_path + + "' WHERE `image_path` = '" + + "temp/"+name + "';"); + stm.executeUpdate("UPDATE `bwLehrpool`.`m_VLData_imageInfo` SET `image_path` = '" + image_path + "' WHERE `image_path` = '" -- cgit v1.2.3-55-g7522