From: Sweidan Omar Date: Mon, 6 Dec 2021 13:51:58 +0000 (+0000) Subject: git-tfs-id: [http://tfs.userrendszerhaz.hu:8080/tfs/DefaultCollection]$/MediaCube... X-Git-Url: http://git.useribm.hu/?a=commitdiff_plain;h=971b4e784ca2610bc1987f78cf9b9e56af467602;p=mediacube.git git-tfs-id: [tfs.userrendszerhaz.hu:8080/tfs/DefaultCollection]$/MediaCube;C32502 --- diff --git a/server/hu.user.mediacube.executors.tests/src/hu/user/mediacube/executors/tests/SupportCheckItem.java b/server/hu.user.mediacube.executors.tests/src/hu/user/mediacube/executors/tests/SupportCheckItem.java index 9fcab493..525e9ac2 100644 --- a/server/hu.user.mediacube.executors.tests/src/hu/user/mediacube/executors/tests/SupportCheckItem.java +++ b/server/hu.user.mediacube.executors.tests/src/hu/user/mediacube/executors/tests/SupportCheckItem.java @@ -51,7 +51,8 @@ public class SupportCheckItem { } public Connection process(Connection connection) throws Exception { - return PlanAirExtensions.search(connection, type, manager, "jdbc:sqlserver://10.10.1.45;databaseName=PA_Echo;", "MAM", "Echotv.hu", this, this); + return PlanAirExtensions.search(connection, type, manager, + "jdbc:sqlserver://10.10.1.45;databaseName=PA_Echo;", "MAM", "Echotv.hu", this, this); } @Override @@ -70,25 +71,29 @@ public class SupportCheckItem { } protected static IItemManager manager = null; - private static final String LOWRES_ROOT = "//10.10.1.27/mclowres/www/video"; +// private static final String LOWRES_ROOT = "//10.10.1.27/mclowres/www/video"; - private static final long[] duplicateLength = { 0 }; +// private static final long[] duplicateLength = { 0 }; @BeforeClass static public void setUpConnection() { - // System.setProperty("jobengine.octopus.rundowns.name", "test_rundowns"); - // System.setProperty("jobengine.octopus.stories.name", "test_stories"); - // System.setProperty("jobengine.octopus.storyfolders.name", "test_storyfolders"); - // System.setProperty("jobengine.octopus.rundowns.name", "rundowns180620"); - // System.setProperty("jobengine.octopus.stories.name", "stories180620"); - // System.setProperty("jobengine.octopus.storyfolders.name", "storyfolders180620"); + // System.setProperty("jobengine.octopus.rundowns.name", "test_rundowns"); + // System.setProperty("jobengine.octopus.stories.name", "test_stories"); + // System.setProperty("jobengine.octopus.storyfolders.name", + // "test_storyfolders"); + // System.setProperty("jobengine.octopus.rundowns.name", "rundowns180620"); + // System.setProperty("jobengine.octopus.stories.name", "stories180620"); + // System.setProperty("jobengine.octopus.storyfolders.name", + // "storyfolders180620"); // - // System.setProperty("jobengine.nosql.db.url", "jdbc:db2://10.10.1.27:50000/mc:retrieveMessagesFromServerOnGetMessage=true;"); - // System.setProperty("jobengine.nosql.db.user", "db2admin"); - // System.setProperty("jobengine.nosql.db.password", "password"); - // System.setProperty(ItemManager.DBURL, "jdbc:db2://10.10.1.27:50000/mc:retrieveMessagesFromServerOnGetMessage=true;"); - // System.setProperty(ItemManager.DBUSERNAME, "db2admin"); - // System.setProperty(ItemManager.DBPASSWORD, "password"); + // System.setProperty("jobengine.nosql.db.url", + // "jdbc:db2://10.10.1.27:50000/mc:retrieveMessagesFromServerOnGetMessage=true;"); + // System.setProperty("jobengine.nosql.db.user", "db2admin"); + // System.setProperty("jobengine.nosql.db.password", "password"); + // System.setProperty(ItemManager.DBURL, + // "jdbc:db2://10.10.1.27:50000/mc:retrieveMessagesFromServerOnGetMessage=true;"); + // System.setProperty(ItemManager.DBUSERNAME, "db2admin"); + // System.setProperty(ItemManager.DBPASSWORD, "password"); // System.setProperty(ItemManager.DBURL, manager = new ItemManager(); @@ -121,7 +126,8 @@ public class SupportCheckItem { String itemTitle2 = p.getItemTitle() == null ? "" : p.getItemTitle(); if (!itemHouseId2.equals(itemHouseId) || !itemTitle2.equals(itemTitle)) { Item item = manager.getItem(itemId); - System.out.println(itemId + " : wrong | " + rs.getString("mediaFileHouseId") + ", " + itemHouseId + ", " + itemTitle + ", " + mediaType); + System.out.println(itemId + " : wrong | " + rs.getString("mediaFileHouseId") + ", " + itemHouseId + + ", " + itemTitle + ", " + mediaType); System.out.println("\t good | " + itemHouseId2 + ", " + itemTitle2 + ", " + progress + "%"); item.setId(0); item.setTitle(itemTitle2); @@ -131,11 +137,11 @@ public class SupportCheckItem { Media media = manager.getMedia(mediaId); media.setItemId(item.getId()); manager.modify(media); - //item.setMedias(null); + // item.setMedias(null); updateMediaDescription(itemId, mediaId, mediaFileId); - //delete from MEDIADESCRIPTION where MEDIAID=364228; + // delete from MEDIADESCRIPTION where MEDIAID=364228; } @@ -150,9 +156,13 @@ public class SupportCheckItem { final Connection[] con = { null }; final int[] count = { 0 }; final int[] processed = { 0 }; - String sqlb = "select %s from vw_items where (mediatype = 'ECHO műsor' or mediatype = 'Műsor')"; // and mediaFileHouseId like '%%M109138A%%' + String sqlb = "select %s from vw_items where (mediatype = 'ECHO műsor' or mediatype = 'Műsor')"; // and + // mediaFileHouseId + // like + // '%%M109138A%%' String sqlc = String.format(sqlb, "count(*)"); - String sql = String.format(sqlb + " order by mediacreated desc", "itemid, itemhouseid, itemtitle, mediaid, mediafilehouseid, mediafileid, mediatype"); + String sql = String.format(sqlb + " order by mediacreated desc", + "itemid, itemhouseid, itemtitle, mediaid, mediafilehouseid, mediafileid, mediatype"); manager.executeQuery(sqlc, rs -> { count[0] = rs.getInt(1); @@ -177,10 +187,12 @@ public class SupportCheckItem { } private void updateMediaDescription(long itemId, long mediaId, long mediaFileId) { - // TODO Auto-generated method stub - manager.executeUpdate(String.format("delete from MEDIADESCRIPTION where ITEMID=%d and MEDIAID=%d", itemId, mediaId), null, null); + manager.executeUpdate( + String.format("delete from MEDIADESCRIPTION where ITEMID=%d and MEDIAID=%d", itemId, mediaId), null, + null); String sql = String.format("insert into mediadescription (itemid, mediaid, mediafileid, description) " - + "select itemid, mediaid, mediafileid, fulldesc(itemid, mediaid, mediafileid) from vw_items " + "where mediafileid=%d", mediaFileId); + + "select itemid, mediaid, mediafileid, fulldesc(itemid, mediaid, mediafileid) from vw_items " + + "where mediafileid=%d", mediaFileId); manager.executeUpdate(sql, null, null); }